跳转至

title: "HR接口配置说明" created: "2026-04-22" updated: "2026-04-22" type: reference tags: [ehr, hengyineng] source: "内部资料"



title: "HR接口配置说明" created: "2026-04-22" updated: "2026-04-22" type: reference tags: [ehr, hengyineng] source: "内部资料"


汇成OA对接HR接口说明

日期:2024-11-05

作者:同享软件EHR项目组 李先生

版本:V1.0

深圳市同享软件科技有限公司

目录

A对接HR接口说明**

日期:2024-11-05

作者:同享软件EHR项目组 李先生

版本:V1.0

深圳市同享软件科技有限公司

目录# 目录

1 目录 [2](#目录)

2 接口配置 [3](#接口配置)

3 验证密钥 [4](#验证密钥)

4 调用方法 [4](#调用方法)

5 特别说明 [4](#特别说明)

6 组织架构查询 [5](#组织架构查询)

7 部门岗位查询 [6](#部门岗位查询)

8 全部档案信息查询 [7](#全部档案信息查询)

9 单人查询 [8](#单人查询)

10 请假类型查询 [9](#请假类型查询)

11 请假单插入 [10](#请假单插入)

12 出差单 [11](#出差单)

13 补卡申请插入 [12](#补卡申请插入)

14 打卡数据插入 [13](#打卡数据插入)

15 加班单插入 [14](#加班单插入)

16 转正申请单插入 [15](#转正申请单插入)

17 调动单插入 [16](#调动单插入)

18 离职申请 [19](#离职申请)

19 离职交接接口 [21](#离职交接接口)

20 调薪单插入(待调整) [21](#调薪单插入待调整)

21 审批人员替换 [23](#审批人员替换)

22 合同转入接口 [24](#合同转入接口)

23 项目名单转入接口 [25](#项目名单转入接口)

24 员工缺卡日期查询接口 [25](#员工缺卡日期查询接口)

25 消息推送异常人员名单查询接口 [26](#消息推送异常人员名单查询接口)

26 查锁定或禁用用户 [26](#查锁定或禁用用户)

27 请假时长计算 [27](#请假时长计算)

28 原始卡数据查询 [27](#原始卡数据查询)

29 电子合同转入接口(暂停) [28](#电子合同转入接口暂停)

30 考勤结果单人查询 [29](#考勤结果单人查询)

31 考勤结果日期查询 [31](#考勤结果日期查询)

32 个人当月加班时长查询 [32](#个人当月加班时长查询)

33 项目申报接口 [32](#项目申报接口)

34 加班扣休接口 [33](#加班扣休接口)

35 请假单验证 [34](#请假单验证)

36 出差单验证 [34](#出差单验证)

37 加班单验证 [35](#加班单验证)

38 MES班制接入接口 [35](#mes班制接入接口)

39 MES工时接入接口 [36](#mes工时接入接口) )](#加班单验证)

38 MES班制接入接口 [35](#mes班制接入接口)

39 MES工时接入接口 [36](#mes工时接入接口)40 MES连班接入接口 [37](#mes连班接入接口)

41 HR续签合同转OA审批接口 [37](#hr续签合同转oa审批接口)

42 合同审批状态接收接口 [38](#合同审批状态接收接口)

43 开发人员更新接口 [38](#开发人员更新接口)

44 有薪假附件接入接口 [39](#有薪假附件接入接口)

45 外包人员工作超15小时人员名单 [39](#外包人员工作超15小时人员名单)

46 离职交接状态传入接口 [40](#离职交接状态传入接口)

47 部门岗位申请接入接口 [40](#部门岗位申请接入接口)

48 明天预入职人员名单查询 [41](#明天预入职人员名单查询)

49 近一个月待转正人员名单查询 [42](#近一个月待转正人员名单查询)

50 月考勤年假调休查询语句 [42](#月考勤年假调休查询语句)

51 风险岗位体检到期提醒名单 [43](#风险岗位体检到期提醒名单)

52 部门昨日出勤状况统计查询 [43](#部门昨日出勤状况统计查询)

53 昨日异常出勤人员名单查询 [45](#昨日异常出勤人员名单查询)

54 月出勤工时查询 [47](#月出勤工时查询)

55 更新离职申请单交接状态 [47](#更新离职申请单交接状态)

56 薪资核算无效名单接入 [48](#薪资核算无效名单接入)

57 薪资核算即时结算名单接入 [48](#薪资核算即时结算名单接入)

58 考勤汇总确认查询清单 [49](#考勤汇总确认查询清单) 57 薪资核算即时结算名单接入 [48](#薪资核算即时结算名单接入)

58 考勤汇总确认查询清单 [49](#考勤汇总确认查询清单)# 接口配置

  1. 系统管理开发平台接口配置 新增如图

C:\Users\laifeir\AppData\Local\Temp\企业微信截图_1730878968202.png

2、根据需要配置好对应的查询插入语句,如下图所示,根据需要配置相关参数

C:\Users\laifeir\AppData\Local\Temp\企业微信截图_17308790215720.png

验证密钥

AppID:e100a5cc-f77c-4a5e-affc-010b553a3a83

Secret:99dab169c75b40ffad648072450c4126

调用方法

https://hr.hynn.com:7004/api/Auth/ApplyToken

https://hr.hynn.com:7004/api/txapi/DoRequest +接口id +参数

特别说明

年月参数YYYYMM 需是XXXX年01月 至 XXXX年12月 ://hr.hynn.com:7004/api/txapi/DoRequest) +接口id +参数

特别说明

年月参数YYYYMM 需是XXXX年01月 至 XXXX年12月# 组织架构查询

接口ID:65 无参

返回信息如下

\"code\": \"0\",

\"status\": true,

\"msg\": null,

\"data\": [

{

\"公司编码\": \"01\",

\"公司名称\": \"\",

\"部门编码\": \"01\",

\"部门名称\": \"广东科技股份有限公司\",

\"上级部门编码\": null,

\"部门级别\": 1,

\"序号\": null,

\"负责人工号\": null,

\"负责人姓名\": null,

\"间接负责人工号\": null,

\"间接负责人姓名\": null,

\"一级审批工号\": null,

\"一级审批姓名\": null,

\"二级审批工号\": null,

\"二级审批姓名\": null,

\"三级审批工号\": null,

\"三级审批姓名\": null,

\"四级审批工号\": null,

\"四级审批姓名\": null,

\"状态\": true,

\"更新时间\": \"2025-04-29T14:51:10.587\"

}

]

对应接口Code

select 公司编码 =comp_code

,公司名称 =(select comp_name from sys_company where comp_code =d.comp_code)

-- (select top 1 Dept_name from Emp_Department where Dept_code =left(d.Dept_code,2))

,Dept_code 部门编码

,Dept_name 部门名称

,Dept_parent 上级部门编码

,Dept_level 部门级别

,Dept_xuhao 序号

,负责人工号 =(select emp_code from emp_baseinfo where emp_id =Dept_manager)

,负责人姓名 =(select emp_name from emp_baseinfo where emp_id =Dept_manager)

,间接负责人工号 =(select emp_code from emp_baseinfo where emp_id =Dept_IndirectManager)

,间接负责人姓名 =(select emp_name from emp_baseinfo where emp_id =Dept_IndirectManager) t_IndirectManager)

,间接负责人姓名 =(select emp_name from emp_baseinfo where emp_id =Dept_IndirectManager),一级审批工号 =(select top 1 emp_code from emp_baseinfo where emp_id =d.g_sh1)

,一级审批姓名 =(select top 1 emp_name from emp_baseinfo where emp_id =d.g_sh1)

,二级审批工号 =(select top 1 emp_code from emp_baseinfo where emp_id =d.g_sh2)

,二级审批姓名 =(select top 1 emp_name from emp_baseinfo where emp_id =d.g_sh2)

,三级审批工号 =(select top 1 emp_code from emp_baseinfo where emp_id =d.g_sh3)

,三级审批姓名 =(select top 1 emp_name from emp_baseinfo where emp_id =d.g_sh3)

,四级审批工号 =(select top 1 emp_code from emp_baseinfo where emp_id =d.g_sh4)

,四级审批姓名 =(select top 1 emp_name from emp_baseinfo where emp_id =d.g_sh4)

,Dept_State 状态

,updatetime 更新时间

from Emp_Department d me from emp_baseinfo where emp_id =d.g_sh4)

,Dept_State 状态

,updatetime 更新时间

from Emp_Department d# 部门岗位查询

接口ID:66 无参

返回信息如下

\"code\": \"0\",

\"status\": true,

\"msg\": null,

\"data\": [

{

\"公司编码\": \"01\",

\"公司名称\": \"\",

\"部门编码\": \"0101\",

\"部门名称\": \"董事会办公室\",

\"岗位编码\": \"142\",

\"岗位名称\": \"董事会秘书、财务总监\",

\"编制人数\": null,

\"岗位状态\": true

}

]

对应接口Code

select

left(Dpzw_dept,2) 公司编码

,公司名称 =(select top 1 Dept_name from Emp_Department where Dept_code =left(a.Dpzw_dept,2))

,Dpzw_dept 部门编码

,部门名称 =(select top 1 Dept_name from Emp_Department where Dept_code =Dpzw_dept)

, Dpzw_code 岗位编码

,zhiwei_name 岗位名称 ,Dpzw_BianZhi 编制人数,Dpzw_State 岗位状态,更新时间 = b.updatetime

from Emp_Depart_ZhiWei a

left join Emp_ZhiWei b on a.Comp_Code =b.Comp_Code and a.Dpzw_code =b.ZhiWei_code

order by a.Comp_Code,Dpzw_dept,Dpzw_code on a.Comp_Code =b.Comp_Code and a.Dpzw_code =b.ZhiWei_code

order by a.Comp_Code,Dpzw_dept,Dpzw_code# 全部档案信息查询

接口ID:67 无参,

返回信息如下

\"code\": \"0\",

\"status\": true,

\"msg\": null,

\"data\": [

{

\"公司编码\": \"01\",

\"部门编码\": \"0207\",

\"所在部门\": \"惠州钣金厂(灵活用工)\",

\"员工编码\": \"2000440\",

\"姓名\": \"吴远滨\",

\"性别\": \"男\",

\"昵称\": null,

\"手机号码\": \"136****4200\",

\"邮件地址\": null,

\"关键字\": \"WYB\",

\"职务编码\": \"023\",

\"职务\": \"员工\",

\"岗位编码\": \"217\",

\"岗位\": \"激光割学徒\",

\"计薪方式编码\": \"02\",

\"计薪方式名称\": \"时薪\",

\"员工类型编码\": \"01\",

\"员工类型名称\": \"正式工\",

\"直接上司工号\": \"2000001\",

\"直接上司姓名\": \"杨阳\",

\"聘用日期\": \"2025-04-26T00:00:00\",

\"离职日期\": null,

\"员工状态标识\": 2,

\"状态\": \"在职\",

\"更新时间\": null

}]

对应接口Code

select 公司编码=comp_code,部门编码 =emp_dept ,所在部门 =emp_deptname

,员工编码=emp_code,姓名 =emp_name,性别=emp_sextext

,昵称 =null,手机号码=Emp_mobile

,邮件地址=Emp_email ,关键字 =Emp_Zjm

,职务编码=emp_zhiwu,职务 =emp_zhiwuname

,岗位编码 =emp_zhiwei,岗位 =emp_zhiweiname,

计薪方式编码=emp_jxfs,计薪方式名称=emp_jxfsname,

员工类型编码=emp_type,员工类型名称 =emp_typename

,直接上司工号 =(select top 1 emp_code from emp_baseinfo where emp_id =e.emp_manager)

,直接上司姓名 =(select top 1 emp_name from emp_baseinfo where emp_id =e.emp_manager)

,聘用日期 =Emp_pydate,离职日期=Emp_lzdate ect top 1 emp_name from emp_baseinfo where emp_id =e.emp_manager)

,聘用日期 =Emp_pydate,离职日期=Emp_lzdate,员工状态标识=Emp_State,状态 =emp_statetext,

更新时间 =updatetime

from employeeview e ,员工状态标识=Emp_State,状态 =emp_statetext,

更新时间 =updatetime

from employeeview e# 单人查询

接口ID:68

必须传入参数

empcode 工号 字符 必填

返回信息如下

{

\"code\": \"0\",

\"status\": true,

\"msg\": null,

\"data\": {

\"部门编码\": \"011104\",

\"手机号码\": \"13622677xxx\",

\"员工类型编码\": \"01\",

\"计薪方式编码\": \"01\",

\"邮件地址\": null,

\"性别\": \"男\",

\"状态\": \"在职\",

\"岗位编码\": \"363\",

\"员工类型名称\": \"正式工\",

\"员工状态标识\": 2,

\"离职日期\": null,

\"职务编码\": \"012\",

\"直接上司工号\": \"1001244\",

\"聘用日期\": \"2024-11-11T00:00:00\",

\"直接上司姓名\": \"xxx\",

\"岗位\": \"系统工程师\",

\"所在部门\": \"流程推进课\",

\"关键字\": \"LJH\",

\"姓名\": \"xxx\",

\"员工编码\": \"1007659\",

\"昵称\": null,

\"计薪方式名称\": \"月薪\",

\"更新时间\": null,

\"公司编码\": \"01\",

\"职务\": \"工程师\"

}

}

对应接口Code

select 公司编码=comp_code,部门编码 =emp_dept ,所在部门 =emp_deptname

,员工编码=emp_code,姓名 =emp_name,性别=emp_sextext

,昵称 =null,手机号码=Emp_mobile

,邮件地址=Emp_email ,关键字 =Emp_Zjm

,职务编码=emp_zhiwu,职务 =emp_zhiwuname

,岗位编码 =emp_zhiwei,岗位 =emp_zhiweiname,

计薪方式编码=emp_jxfs,计薪方式名称=emp_jxfsname,

员工类型编码=emp_type,员工类型名称 =emp_typename

,直接上司工号 =(select top 1 emp_code from emp_baseinfo where emp_id =e.emp_manager)

,直接上司姓名 =(select top 1 emp_name from emp_baseinfo where emp_id =e.emp_manager)

,聘用日期 =Emp_pydate,离职日期=Emp_lzdate

,员工状态标识=Emp_State,状态 =emp_statetext,

更新时间 =e.updatetime anager)

,聘用日期 =Emp_pydate,离职日期=Emp_lzdate

,员工状态标识=Emp_State,状态 =emp_statetext,

更新时间 =e.updatetime-- ,基本工资 =Gt_jbgz,竞业限制金 =Gt_jyxzj ,绩效工资 =Gt_jxkhgz

from employeeview e

left join (select a.* from Gz_TiaoXin a

inner join (select Gtx_EmpId,max(Gtx_SDate) Gtx_SDate from Gz_TiaoXin group by Gtx_EmpId,Gtx_SDate ) b on a.Gtx_EmpId=b.Gtx_EmpId and a.Gtx_SDate=b.Gtx_SDate) x

on e.emp_id =x.Gtx_EmpId

where emp_code={empcode}

参数示例

{\"empcode\": \"1007659\"} b.Gtx_SDate) x

on e.emp_id =x.Gtx_EmpId

where emp_code={empcode}

参数示例

{\"empcode\": \"1007659\"}# 请假类型查询

接口ID:70,无需参数

返回信息如下

\"code\": \"0\",

\"status\": true,

\"msg\": null,

\"data\": [

{

\"假别类型\": \"Kj_nj\",

\"假别名称\": \"年假\"

},

对应接口Code

select 假别类型=code,假别名称 =name from Kq_ALtype order by xuhao \": \"年假\"

},

对应接口Code

select 假别类型=code,假别名称 =name from Kq_ALtype order by xuhao# 请假单插入

接口ID:71(请假、调休模式一样,调一个接口)


数据库表 字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空


kq_askleave alid alid int 4 0 True True False

kq_askleave alempid 请假员工 int 4 0 False False False

kq_askleave alwholeday 整天请假 bit 1 0 False False True

kq_askleave alstime 开始时间 datetime 8 3 False False True

kq_askleave aletime 结束时间 datetime 8 3 False False True

kq_askleave alftype 请假类型 varchar 20 0 False False True

kq_askleave alday 天数 int 4 0 False False True

kq_askleave alhour 小时 numeric 9 1 False False True

kq_askleave alfile 附件 nvarchar 1000 0 False False True lfile 附件 nvarchar 1000 0 False False Truekq_askleave alreason 请假原因 nvarchar 1000 0 False False True

kq_askleave almemo 备注 nvarchar 1000 0 False False True

kq_askleave holder 拥有者 int 4 0 False False True

kq_askleave issend 是否提交 bit 1 0 False False True

kq_askleave senddate 提交时间 datetime 8 3 False False True

kq_askleave appstatus 单据状态 int 4 0 False False True

kq_askleave appdate 审批时间 datetime 8 3 False False True

kq_askleave appnote 审批意见 nvarchar 1000 0 False False True

kq_askleave createby 创建人 nvarchar 100 0 False False True

kq_askleave createtime 创建时间 datetime 8 3 False False True

kq_askleave updateby 更新人 nvarchar 100 0 False False True updateby 更新人 nvarchar 100 0 False False Truekq_askleave updatetime 更新时间 datetime 8 3 False False True


必须传入参数

empcode 工号 字符 必填

Alwholeday 必填,是否是整天请假 1整天 0非整天,如无整天与非整天区分可传入 0值

alstime 开始时间 必填

aletime 结束时间 必填

alftype 请假类型 需与HR中的类型一样必填

alday 天数 必填

alhour 小时 必填

alreason 请假原因 必填

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号

请假类型数据表

select 假别类型=code,假别名称 =name from Kq_ALtype where status =1 order by xuhao

返回值

{

\"code\": \"0\",

\"status\": true,

\"msg\": null,

\"data\": null

对应接口Code

insert into kq_askleave(alempid,alwholeday,alstime,aletime,alftype,alday,alhour,alreason,almemo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select alempid =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,{alwholeday},{alstime},{aletime},{alftype},{alday},{alhour},{alreason},almemo ={docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=2,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

参数示例语句 =2,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

参数示例语句[{\"empcode\": \"1007659\",\"alwholeday\": \"1\",\"alstime\": \"2025-5-25\",\"aletime\": \"2025-5-25\",\"alftype\": \"Kj_sj\",\"alday\": \"1\",\"alhour\": \"0\",\"alreason\": \"test\",\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}] lreason\": \"test\",\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}]# 出差单

接口ID:75 与请假调用接口ID不同

参数传递值与请假相似,企业方规定为整天出差,所以小时数无需传递

必须传入参数

empcode 工号 字符 必填

alwholeday 必填,是否是整天出差 1整天 0非整天,如无整天与非整天区分可传入 0值

alstime 开始时间 必填

aletime 结束时间 必填

alday 天数 必填

alhour 小时 必填

alreason 出差原因 必填

alsaddress 出发地

aleaddress 目的地

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号必填

参数示例语句

[{\"empcode\": \"80094\",\"alwholeday\": \"1\",\"alstime\": \"2024-11-25\",\"aletime\": \"2024-11-25\",\"alday\": \"1\",\"alreason\": \"test\",\"alsaddress\": \"a\",\"aleaddress\": \"b\",\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}]

传递,成功,返回值{\"code\":\"0\",\"status\":true,\"msg\":null,\"data\":null},

对应接口Code

insert into kq_askleavecc(alempid,alwholeday,alstime,aletime,alftype,alday,alhour,alreason,almemo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select alempid =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,{alwholeday},{alstime},{aletime},\'kj_cc\',{alday},{alhour},{alreason},almemo ={docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=2,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate() e},appstatus=2,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()# 补卡申请插入

补签卡接口ID:77


数据库表 字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空


kq_recordqk qkid qkid int 4 0 True True False

kq_recordqk qkempid 签卡员工 int 4 0 False False False

kq_recordqk qkdatetime 签卡时间 datetime 8 3 False False True

kq_recordqk qkftype1 刷卡类型 int 4 0 False False True

kq_recordqk qkftype2 签卡方式 nvarchar 100 0 False False True

kq_recordqk qkreason 签卡原因 nvarchar 400 0 False False True

kq_recordqk qkfile 附件 nvarchar 1000 0 False False True

kq_recordqk qkmemo 备注 nvarchar 400 0 False False True


必须传入参数

empcode 工号 必填

必须传入参数

empcode 工号 必填qkftype 必填 签卡方式 (值:1、因公 2、因私)必填

qkreason 必填 签卡原因 必填

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号

qkftype1 必填 刷卡类型 int (1、上班 2、下班 3、上下班)

对应接口Code

insert into kq_recordqk(qkempid,qkdatetime,qkftype1,qkftype2,qkftype3,qkreason,qkmemo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,{qkdatetime},3,0,{qkftype},{qkreason},qkmemo={docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

参数传递示例语句

[{\"empcode\": \"1007659\",\"qkdatetime\": \"2025-5-25 12:00\",\"qkftype\": \"1\",\"qkreason\": \"test\",\"senddate\": \"2025-5-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}] qkreason\": \"test\",\"senddate\": \"2025-5-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}]# 打卡数据插入

接口ID:81

必须传入参数

empcode 工号 必填

fdatetime 打卡时间 必填

machno 机器号 必填

对应接口Code

insert into kq_record(machno,fdatetime,cardno,empid,ftype,ifcancel,createby,createtime,updateby,updatetime)

select {machno},{fdatetime},cardno=0

,empid=(select emp_id from emp_baseinfo where emp_code={empcode})

,3,0,createby=\'接口转入\',createtime=getdate(),updateby=\'接口转入\',updatetime=getdate()

where not exists(select * from kq_record where machno={machno} and fdatetime={fdatetime}

and empid=(select emp_id from emp_baseinfo where emp_code={empcode}))

参数示例

[{\"empcode\": \"1007659\",\"fdatetime\": \"2025-5-14 12:03\",\"machno\": \"01\"}] pcode}))

参数示例

[{\"empcode\": \"1007659\",\"fdatetime\": \"2025-5-14 12:03\",\"machno\": \"01\"}]# 加班单插入

接口ID:78


数据库表 字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空


kq_outtime otid otid int 4 0 True True False

kq_outtime otempid 加班员工 int 4 0 False False True

kq_outtime otfdate 加班日期 datetime 8 3 False False True

kq_outtime otftype 加班类型 int 4 0 False False True

kq_outtime otstime 开始时间 int 4 0 False False True

kq_outtime otetime 结束时间 int 4 0 False False True

kq_outtime otresttime 扣休息时间(分) int 4 0 False False True

kq_outtime otzsj 上班总时间(分) int 4 0 False False True otzsj 上班总时间(分) int 4 0 False False Truekq_outtime otjbsj 加班时间(分) int 4 0 False False True

kq_outtime otjbxs 加班小时 numeric 9 2 False False True

kq_outtime otreason 加班原因 nvarchar 510 0 False False True

kq_outtime otmemo 备注 nvarchar 510 0 False False True


必须传入参数

empcode 必填,员工工号

otfdate 必填,加班日期

otstime 必填,开始时间

otetime 必填,结束时间

otzsj 加班总时长 分 必填

otresttime 必填,扣休息时间(分)

otjbsj 必填,加班分钟 分

otreason 必填,加班原因

jbortx 加班统计方式 0 调休 1加班 必传

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号必填

对应接口Code

if (select count(1) from kq_outtime

where otempid = (select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

and otfdate =cast({otstime} as date)

and {otstime} between dateadd(minute,otstime,otfdate) and dateadd(minute,otetime,otfdate))>0

begin

raiserror (\'此时间区间已有相同资料,转入失败\',15,1)

end

else

begin

insert into kq_outtime(otempid,otfdate,otftype,otstime,otetime,otresttime,otzsj,otjbsj,otjbxs,otreason,otmemo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime,G_jbortx)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode}) ateby,updatetime,G_jbortx)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode}),cast({otstime} as date),otftype=0

,otstime=datediff(minute,cast({otstime} as date),{otstime})

,otetime=datediff(minute,cast({otstime} as date),{otetime})

,otresttime={otresttime}

,{otzsj},otjbsj={otjbsj},otjbxs={otzsj}/60.0,{otreason},qkmemo={docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

,case when {jbortx}=0 then \'tx\' else \'jb\' end

end

实用示例

[{\"empcode\":\"1007659\",\"otstime\":\"2025-5-25 12:00\",\"otetime\":\"2025-5-25 13:00\",\"otzsj\":\"60\",\"otjbsj\":\"60\",\"otresttime\":\"0\",\"otreason\":\"test\",\"senddate\":\"2024-11-25\",\"appdate\":\"2024-11-25\",\"docno\":\"docno\",\"jbortx\":\"0\"}]

标准示例

[{\"empcode\": \"1007659\",\"otfdate\": \"2025-5-25\",\"otftype\": \"1\",\"otstime\": \"2025-5-25 12:00\",\"otetime\": \"2025-5-25 13:00\",\"otresttime\": \"0\",\"otzsj\": \"60\",\"otjbsj\": \"60\",\"otreason\": \"test\"

,\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}] eason\": \"test\"

,\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}]# 转正申请单插入

接口ID:79 表结构


数据库表 字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空


emp_zhuanz zz_id zz_id int 4 0 True True False

emp_zhuanz zz_empid 转正员工 int 4 0 False False False

emp_zhuanz zz_symonth1 实际试用期(月) int 4 0 False False True

emp_zhuanz zz_zzdate1 实际转正日期 datetime 8 3 False False True

emp_zhuanz zz_cause 转正原因 nvarchar 1000 0 False False True


必须传入参数

empcode 工号必填

zz_symonth 实际试用期(月) 必填

zz_zzdate 实际转正日期 必填

zz_cause 转正原因

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号必填

对应接口Code

insert into emp_zhuanz(zz_empid,zz_comp,zz_dept,zz_zhiwei,zz_zhiwu,zz_zhiji,zz_jxfs,zz_type,zz_pydate

,zz_symonth,zz_zzdate,zz_symonth1,zz_zzdate1,zz_state,zz_cause,zz_memo ji,zz_jxfs,zz_type,zz_pydate

,zz_symonth,zz_zzdate,zz_symonth1,zz_zzdate1,zz_state,zz_cause,zz_memo,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,zz_comp =(select top 1 comp_code from emp_baseinfo where emp_code ={empcode})

,zz_dept=(select top 1 emp_dept from emp_baseinfo where emp_code ={empcode})

,zz_zhiwei=(select top 1 emp_zhiwei from emp_baseinfo where emp_code ={empcode})

,zz_zhiwu=(select top 1 emp_zhiwu from emp_baseinfo where emp_code ={empcode})

,zz_zhiji=(select top 1 emp_zhiji from emp_baseinfo where emp_code ={empcode})

,zz_jxfs=(select top 1 emp_jxfs from emp_baseinfo where emp_code ={empcode})

,zz_type=(select top 1 emp_type from emp_baseinfo where emp_code ={empcode})

,zz_pydate=(select top 1 emp_pydate from emp_baseinfo where emp_code ={empcode})

,zz_symonth=(select top 1 emp_symonth from emp_baseinfo where emp_code ={empcode})

,zz_zzdate=(select top 1 emp_zzdate from emp_baseinfo where emp_code ={empcode})

,{zz_symonth},{zz_zzdate},0,{zz_cause},zz_memo={docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

参数传递示例

[{\"empcode\": \"80094\",\"zz_zzdate\": \"2024-11-25\",\"zz_symonth\": \"1\",\"zz_cause\": \"test\",\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}] z_cause\": \"test\",\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"docno\": \"docno\"}]# 调动单插入

接口ID:80


数据库表 字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空


emp_diaozhi dz_id dz_id int 4 0 True True False

emp_diaozhi dz_empid 调职员工 int 4 0 False False True

emp_diaozhi dz_date 调职日期 datetime 8 3 False False True

emp_diaozhi dz_type 调职类型 varchar 20 0 False False True

emp_diaozhi dz_oldcomp 原机构 varchar 20 0 False False True

emp_diaozhi dz_newcomp 新机构 varchar 20 0 False False True

emp_diaozhi dz_olddept 原部门 varchar 20 0 False False True

emp_diaozhi dz_newdept 新部门 varchar 20 0 False False True

emp_diaozhi dz_oldzhiwei 原岗位 varchar 20 0 False False True oldzhiwei 原岗位 varchar 20 0 False False Trueemp_diaozhi dz_newzhiwei 新岗位 varchar 20 0 False False True

emp_diaozhi dz_oldzhiwu 原职务 varchar 20 0 False False True

emp_diaozhi dz_newzhiwu 新职务 varchar 20 0 False False True

emp_diaozhi dz_oldzhiji 原职级 varchar 20 0 False False True

emp_diaozhi dz_newzhiji 新职级 varchar 20 0 False False True

emp_diaozhi dz_oldzhic 原职称 varchar 20 0 False False True

emp_diaozhi dz_newzhic 新职称 varchar 20 0 False False True

emp_diaozhi dz_oldjxfs 原计薪方式 varchar 20 0 False False True

emp_diaozhi dz_newjxfs 新计薪方式 varchar 20 0 False False True

emp_diaozhi dz_oldtype 原员工类型 varchar 20 0 False False True

emp_diaozhi dz_newtype 新员工类型 varchar 20 0 False False True

emp_diaozhi dz_oldsymonth 原试用期 int 4 0 False False True _oldsymonth 原试用期 int 4 0 False False Trueemp_diaozhi dz_newsymonth 新试用期 int 4 0 False False True

emp_diaozhi dz_oldzzdate 原转正日期 datetime 8 3 False False True

emp_diaozhi dz_newzzdate 新转正日期 datetime 8 3 False False True

emp_diaozhi dz_causetype 调职原因类型 varchar 20 0 False False True

emp_diaozhi dz_cause 调职原因 nvarchar 400 0 False False True

emp_diaozhi dz_memo 备注 nvarchar 400 0 False False True


必须传入参数

empcode 工号

dz_date 调职日期

dz_type 调职类型

dz_newcomp 新机构

dz_newdept 新部门

dz_newzhiwei 新岗位

dz_newzhiwu 新职务

dz_newzhiji 新职级

dz_newzhic 新职称

dz_newjxfs 新计薪方式

dz_newtype 新员工类型

dz_causetype 调职原因类型

dz_cause 调职原因

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号必填

部门

Select 编码=dept_code, 名称=deptname from emp_department where dept_state =1

部门岗位

select 编码=ZhiWei_code,名称=ZhiWei_name

from emp_depart_zhiwei a

left join emp_zhiwei b on a.Dpzw_code =b.ZhiWei_code

where Dpzw_dept=@部门编码

职务

select ZhiWu_code,ZhiWu_name from Emp_ZhiWu

职级

select ZhiJi_code,ZhiJi_name from Emp_ZhiJi

员工类型: 编码及名称 参考HR配置 _code,ZhiWu_name from Emp_ZhiWu

职级

select ZhiJi_code,ZhiJi_name from Emp_ZhiJi

员工类型: 编码及名称 参考HR配置Select 编码= et_code, 名称 = et_name from emp_type

计薪方式:计薪编码 计薪名称

Select 编码=jxfs_code, 名称 =jxfs_name from emp_jxfs

调动类型: 编码及名称 参考HR配置

Select 编码=b_name, 名称=b_name from emp_dztype

调动原因类型: 编码及名称 参考HR配置

Select 编码= t_code, 名称= t_name from emp_dzcausetype

对应接口Code

insert into emp_diaozhi(dz_empid,dz_date,dz_num,dz_type

,dz_oldcomp,dz_newcomp,dz_olddept,dz_newdept

,dz_oldzhiwei,dz_newzhiwei

,dz_oldzhiwu,dz_newzhiwu

,dz_oldzhiji,dz_newzhiji

,dz_oldjxfs,dz_newjxfs

,dz_oldtype,dz_newtype

,dz_causetype,dz_cause,dz_memo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,emp_dzdate={dz_date}

,dz_num=(select count(1)+1 from emp_diaozhi where dz_empid =(select emp_id from emp_baseinfo where emp_code ={empcode}))

,{dz_type}

,dz_oldcomp =(select top 1 comp_code from emp_baseinfo where emp_code ={empcode}),{dz_newcomp}

,dz_olddept =(select top 1 emp_dept from emp_baseinfo where emp_code ={empcode}),{dz_newdept}

,dz_oldzhiwei =(select top 1 emp_zhiwei from emp_baseinfo where emp_code ={empcode}),{dz_newzhiwei}

,dz_oldzhiwu =(select top 1 emp_zhiwu from emp_baseinfo where emp_code ={empcode}),{dz_newzhiwu}

,dz_oldzhiji =(select top 1 emp_zhiji from emp_baseinfo where emp_code ={empcode}),{dz_newzhiji}

,dz_oldjxfs =(select top 1 emp_jxfs from emp_baseinfo where emp_code ={empcode}),{dz_newjxfs} hiji}

,dz_oldjxfs =(select top 1 emp_jxfs from emp_baseinfo where emp_code ={empcode}),{dz_newjxfs},dz_oldtype =(select top 1 emp_type from emp_baseinfo where emp_code ={empcode}),{dz_newtype}

,{dz_causetype},{dz_cause},{docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

示例代码

[{\"empcode\":\"1007659\",\"dz_date\":\"2025-5-25\",\"dz_type\":\"DZ001\",\"dz_newcomp\":\"01\",\"dz_newdept\":\"011104\",\"dz_newzhiwei\":\"363\",\"dz_newzhiwu\":\"012\",\"dz_newzhiji\":\"045\",\"dz_newzhic\":\"01\",\"dz_newjxfs\":\"01\",\"dz_newtype\":\"01\",\"dz_causetype\":\"LX001\",\"dz_cause\":\"工作需要\",\"senddate\":\"2024-11-25\",\"appdate\":\"2024-11-25\",\"docno\":\"docno\"}] ,\"dz_cause\":\"工作需要\",\"senddate\":\"2024-11-25\",\"appdate\":\"2024-11-25\",\"docno\":\"docno\"}]# 离职申请

接口ID:69

表结构


emp_lizhiapplay数据表结构


字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空

lz_id lz_id int 4 0 True True False

lz_empid 员工 int 4 0 False False True

lz_comp 机构 varchar 20 0 False False True

lz_dept 部门 varchar 20 0 False False True

lz_zhiwei 岗位 varchar 20 0 False False True

lz_zhiwu 职务 varchar 20 0 False False True

lz_zhiji 职级 varchar 20 0 False False True 职级 varchar 20 0 False False Truelz_pydate 聘用日期 datetime 8 3 False False True

lz_state lz_state int 4 0 False False True

lz_lzdate0 期望离职日期 datetime 8 3 False False True

lz_lzdate1 批准离职日期 datetime 8 3 False False True

lz_lzdate 实际离职日期 datetime 8 3 False False True

lz_type 离职类型 varchar 20 0 False False True

lz_causetype 离职原因 varchar 20 0 False False True

lz_cause lz_cause nvarchar 400 0 False False True

lz_file lz_file nvarchar 1000 0 False False True

lz_memo 备注 nvarchar 510 0 False False True

lz_status lz_status int 4 0 False False True

lz_hisid lz_hisid int 4 0 False False True lz_hisid int 4 0 False False Trueowner owner nvarchar 100 0 False False True

holder holder int 4 0 False False True

issend issend bit 1 0 False False True

senddate 提交时间 datetime 8 3 False False True

apper apper int 4 0 False False True

appstatus appstatus int 4 0 False False True

appdate 审批时间 datetime 8 3 False False True

appnote 审批意见 nvarchar 1000 0 False False True

createby 创建人 nvarchar 100 0 False False True

createtime 创建时间 datetime 8 3 False False True

updateby 更新人 nvarchar 100 0 False False True 更新人 nvarchar 100 0 False False Trueupdatetime 更新时间 datetime 8 3 False False True


必须传入参数

empcode 工号 字符 必填

lzdate0 期望离职日期 必填

lzdate1 批准离职日期 必填

lztype 离职类型 必填

lzcausetype 离职类型原因 必填

lzcause 离职原因 必填

senddate 提交时间 必填

appdate 审批通过时间 必填

docno 单号

isjy 是否参与离职竞业协议 值 是或否

xyje 协议金额

sdate 开始日期

edate 结束日期

workflag 是否交接完成 值 是或否 必填

isjsjs 是否即时结算 值 是或否 必填

对应接口Code

insert into Emp_LiZhiApplay(Lz_empid,Lz_comp,Lz_dept,Lz_zhiwei,Lz_pydate

,Lz_lzdate0,Lz_lzdate1,Lz_type,Lz_causeType,Lz_cause,Lz_memo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,Lz_comp =(select top 1 comp_code from emp_baseinfo where emp_code ={empcode})

,Lz_dept =(select top 1 emp_dept from emp_baseinfo where emp_code ={empcode})

,Lz_zhiwei =(select top 1 emp_zhiwei from emp_baseinfo where emp_code ={empcode})

,Lz_pydate =(select top 1 Emp_pydate from emp_baseinfo where emp_code ={empcode})

,{lzdate0},{lzdate1},{lztype},{lzcausetype},{lzcause},{docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

离职类型

01 辞职,02自离,03劝退,04 其它,05 协商一致解除劳动关系

类型数据库查询语句 etdate(),updateby=\'第三方\',updatetime=getdate()

离职类型

01 辞职,02自离,03劝退,04 其它,05 协商一致解除劳动关系

类型数据库查询语句Select 编码 =b_code, 名称=b_name from emp_lztype order by b_xuhao

离职原因类型

01 个人原因,02 公司原因

原因类型查询语句

Select 编码 =t_code, 名称=t_name from emp_lzcausetype order by t_xuhao

示例

[{\"empcode\":\"1007659\",\"lzdate0\":\"2025-11-29\",\"lzdate1\":\"2025-11-29\",\"lztype\":\"01\",\"lzcausetype\":\"01\",\"lzcause\":\"测试\",\"senddate\":\"2024-11-25\",\"appdate\":\"2024-11-25\",\"docno\":\" docno \"}] ",\"lzcause\":\"测试\",\"senddate\":\"2024-11-25\",\"appdate\":\"2024-11-25\",\"docno\":\" docno \"}]# 离职交接接口

接口ID:115

必须传入参数

docno 单号

workflag 是否交接完成 值 是或否 必填

离职交接接口

接口ID:115

必须传入参数

docno 单号

workflag 是否交接完成 值 是或否 必填# 调薪单插入(待调整)

接口ID:15


数据库表 字段名 字段描述 数据类型 数据长度 小数位数 自动增长 主键 允许为空


gz_tiaoxin gtx_id gtx_id int 4 0 True False False

gz_tiaoxin gtx_empid 调薪员工 int 4 0 False True False

gz_tiaoxin gtx_num 调薪次数 int 4 0 False True False

gz_tiaoxin gtx_sdate 调薪日期 datetime 8 3 False False True

gz_tiaoxin gtx_type 调薪类型 varchar 20 0 False False True

gz_tiaoxin gtx_reason 调薪原因 nvarchar 400 0 False False True

gz_tiaoxin gtx_memo 备注 nvarchar 510 0 False False True


必须传入参数

empcode 工号必填

tx_month 调薪生效月份 固定格式 "XXXX年XX月"(gtx_sdate即生效月的第一天)必填

tx_type 调薪类型(gtx_type)必填

tx_reason 调薪原因(gtx_reason)必填

senddate 提交时间 必填 年XX月"(gtx_sdate即生效月的第一天)必填

tx_type 调薪类型(gtx_type)必填

tx_reason 调薪原因(gtx_reason)必填

senddate 提交时间 必填appdate 审批通过时间 必填

docno 单号必填

调职类型

类型编码 类型名称

01 普调

02 普升

03 入职

04 降级

--调薪单插入

insert into Gz_TiaoXin(Gtx_EmpId,Gtx_Num

,gt_jbgz,gt_jyxzj,gt_jxkhgz,Gtx_SDate,Gtx_Type,Gtx_Reason,Gtx_Memo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select (select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,Gtx_Num =(select count(1)+1 from Gz_TiaoXin where Gtx_EmpId =(select emp_id from emp_baseinfo where emp_code ={empcode}))

,{JBGZ},{JYXZJ},{JXKHGZ},{Gtx_SDate},{Gtx_Type},{Gtx_Reason},{DocNO}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()

where not exists(select 1 from Gz_TiaoXin where Gtx_EmpId =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode}) and Gtx_SDate ={Gtx_SDate})

update t set Gtx_EDate=dateadd(dd,-1,cast({Gtx_SDate} as date))

from gz_tiaoxin t where Gtx_EmpId=(select emp_id from emp_baseinfo where emp_code ={empcode}) and Gtx_EDate is null

and Gtx_SDate \<>cast({Gtx_SDate} as date)

接口参数示例

[{\"empcode\": \"80094\",\"JBGZ\": \"1\",\"JYXZJ\": \"2\",\"JXKHGZ\": \"3\",\"Gtx_SDate\": \"2024-12-01\",\"Gtx_Type\": \"01\",\"Gtx_Reason\": \"test\",\"senddate\": \"2024-11-25\",\"appdate\": \"2024-11-25\",\"DocNO\": \"DocNO\"}]

如果是单据传递,成功,返回的参数 会有这样的返回值{\"code\":\"0\",\"status\":true,\"msg\":null,\"data\":null},如果是调用查询数据接口会返回对应的数据 据传递,成功,返回的参数 会有这样的返回值{\"code\":\"0\",\"status\":true,\"msg\":null,\"data\":null},如果是调用查询数据接口会返回对应的数据# 审批人员替换

接口ID:76

必须传入参数

oldempcode 替换前工号 字符 必填

newempcode 替换后工号 字符 必填

对应接口Code

declare \@oldempid int,@newempid int

set \@oldempid =(select emp_id from emp_Baseinfo where emp_code ={oldempcode})

set \@newempid =(select emp_id from emp_Baseinfo where emp_code ={newempcode})

update emp_department set Dept_manager =@newempid where \@newempid is not null and Dept_manager=@oldempid

update emp_department set Dept_IndirectManager =@newempid where \@newempid is not null and Dept_IndirectManager=@oldempid

update emp_department set g_sh1 =@newempid where \@newempid is not null and g_sh1=@oldempid

update emp_department set g_sh2 =@newempid where \@newempid is not null and g_sh2=@oldempid

update emp_department set g_sh3 =@newempid where \@newempid is not null and g_sh3=@oldempid

update emp_department set g_sh4 =@newempid where \@newempid is not null and g_sh4=@oldempid

update emp_baseinfo set emp_manager =@newempid where \@newempid is not null and emp_manager =@oldempid

update emp_baseinfo set emp_indirectmanager =@newempid where \@newempid is not null and emp_indirectmanager =@oldempid

参数示例

[{\"oldempcode\": \"1007659\",\"newempcode\": \"1007659\"}] emp_indirectmanager =@oldempid

参数示例

[{\"oldempcode\": \"1007659\",\"newempcode\": \"1007659\"}]# 合同转入接口

接口ID:83

必须传入参数

empcode 工号 字符 必填

htname 合同类型 字符 必填

htcompany 合同公司

htsdate 合同开始日期

htedate 合同结束日期

htyearnum 合同签定年数

docno 单号

senddate 提交时间

appdate 审批通过时间

合同类型查询语句

select 编码=hc_code , 名称 =hc_name from emp_hetongtype

参数示例

[{\"empcode\":\"1007659\",\"htname\":\"劳动合同\",\"htcompany\":\"\",\"htsdate\":\"2025-5-25\",\"htedate\":\"2025-5-25\",\"htyearnum\":\"1\",\"docno\":\"docno\",\"senddate\":\"2025-5-25 08:00\",\"appdate\":\"2025-5-25 08:00\"}]

对应接口Code

insert into Emp_HeTong(

Ht_code,Ht_empid,Ht_type,Ht_Num,Ht_Company,Ht_SDate,Ht_EDate,Ht_Year,Ht_Status,Ht_IsZhiXing,Ht_memo

,holder,issend,senddate,appstatus,appdate,createby,createtime,updateby,updatetime)

select

Ht_code = {empcode} + datename(year,{htsdate})

,Ht_empid =(select emp_id from emp_baseinfo where emp_code ={empcode})

,Ht_type = (select hc_code from Emp_HeTongType where hc_name ={htname})

,Ht_Num =(select count(1)+1 from Emp_HeTong where Ht_empid =(select emp_id from emp_baseinfo where emp_code ={empcode}))

,Ht_Company ={htcompany}

,Ht_SDate ={htsdate}

,Ht_EDate ={htedate}

,Ht_Year ={htyearnum}

,Ht_Status =1

,Ht_IsZhiXing =1

,Ht_memo ={docno}

,holder =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode})

,issend=1,{senddate},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate() e},appstatus=0,{appdate},createby=\'第三方\',createtime=getdate(),updateby=\'第三方\',updatetime=getdate()# 项目名单转入接口

接口ID:84

必须传入参数

xmcode 编号 字符 必填

xmname 项目名称 字符 必填

sdate 立项开始日期

edate 立项结束日期

deptname 部门名称

参数示例

[{\"xmcode\":\"02\",\"xmname\":\"B项目\",\"sdate\":\"2025-07-01\",\"edate\":\"2025-07-01\",\"deptname\":\"XX部门\"}]

对应接口Code

update emp_productionline set sdate ={sdate},edate ={edate},deptname={deptname},epl_state =(case when {edate}\<cast(getdate() as date) then 0 else 1 end)

,updatetime =getdate()

where epl_code ={xmcode} and

exists (select 1 from emp_productionline where epl_code ={xmcode})

insert into emp_productionline(epl_code,epl_name,epl_state,sdate,edate,deptname,updatetime)

select {xmcode},{xmname},case when {edate}\<cast(getdate() as date) then 0 else 1 end,{sdate},{edate},{deptname},getdate()

where not exists (select 1 from emp_productionline where epl_code ={xmcode}) },{deptname},getdate()

where not exists (select 1 from emp_productionline where epl_code ={xmcode})# 员工缺卡日期查询接口

接口ID:86

必须传入参数

empcode 工号 字符 必填

参数示例

{\" empcode \": \" 1007659 \"}

对应接口Code

-- declare \@empcode varchar(20);set \@empcode =\'1000005\'

select emp_code empCode,emp_name empName,emp_deptname empDeptname,emp_zhiweiname empZhiweiname,emp_jxfsname

,fdate=convert(varchar(10),fdate,120),

k1=(case when b1sbtime is null then null else dbo.converttimestring(b1sbtime) end),

k2=(case when b1xbtime is null then null else dbo.converttimestring(b1xbtime) end),

k3=(case when b2sbtime is null then null else dbo.converttimestring(b2sbtime) end),

k4=(case when b2xbtime is null then null else dbo.converttimestring(b2xbtime) end)

from (select * from kq_result where fdate between dateadd(day,-40,cast(getdate() as date)) and dateadd(day,-1,cast(getdate() as date) ) and fdate >=\'2025-06-01\' and Kgsj>0) a

left join Employeeview e on a.EmpID =e.emp_id

where emp_code ={empcode} 025-06-01\' and Kgsj>0) a

left join Employeeview e on a.EmpID =e.emp_id

where emp_code ={empcode}# 消息推送异常人员名单查询接口

接口ID:87

必须传入参数

ydate 查询日期

参数示例

{\" ydate \": \" 2025-6-25 \"}

对应接口Code

select emp_code empCode,emp_name empName,emp_deptname empDeptname,emp_zhiweiname empZhiweiname, emp_ddid

,fdate=convert(varchar(10),fdate,120),

k1=(case when b1sbtime is null then null else dbo.converttimestring(b1sbtime) end),

k2=(case when b1xbtime is null then null else dbo.converttimestring(b1xbtime) end),

k3=(case when b2sbtime is null then null else dbo.converttimestring(b2sbtime) end),

k4=(case when b2xbtime is null then null else dbo.converttimestring(b2xbtime) end),

出勤状况=cqqk

from (select * from kq_result where fdate ={ydate} and Kgsj>0) a

left join Employeeview e on a.EmpID =e.emp_id -- dateadd(day,-1,cast(getdate() as date)

查锁定或禁用用户

接口ID:89

无参

对应接口Code

select User_code,username =e.Emp_name,b.role_name

,User_statustext=case when User_status =0 then \'禁用\' else \'启用\' end

,User_locktext =case when User_lock =1 then \'锁定\' else \'正常\' end

from Sys_User a

left join Sys_Role b on a.User_roles =b.role_code

left join emp_baseinfo e on a.User_empid=e.emp_id

where user_code not in(\'administrator\',\'tx\',\'txad\')

and (User_status=0 or User_lock=1) mp_id

where user_code not in(\'administrator\',\'tx\',\'txad\')

and (User_status=0 or User_lock=1)# 请假时长计算

接口ID:89

必须传入参数

empcode 工号 字符 必填

alstime 开始时间 必填

aletime 结束时间 必填

alftype 请假类型 需与HR中的类型一样必填

参数示例

{\"empcode\": \"1007659\",\"stime\": \"2025/7/6 08:30:00\",\"etime\": \"2025/7/8 12:00:00\",\"qqtype\": \"Kj_nj\"}

对应接口Code

declare \@qjdays float ;set \@qjdays=0

declare \@qjhours float ;set \@qjhours=0

declare \@empid int

set \@empid =(select emp_id from emp_baseinfo where emp_code ={empcode})

exec sp_CalculateKqAskLeaveTime \@empid,{stime},{etime},0,{qqtype},@qjdays output,@qjhours output

select \@qjdays qjdays, \@qjhours qjhours {stime},{etime},0,{qqtype},@qjdays output,@qjhours output

select \@qjdays qjdays, \@qjhours qjhours# 原始卡数据查询

接口ID:90

必须传入参数

sdate 开始日期 必填

edate 结束日期 必填

参数示例

接口CODE

select emp_code,emp_name,emp_deptname,MachNo,FDateTime,CardNo,EmpID,LocationAddress,Memo,createby,createtime,updateby,updatetime,ismobiletext

from (select t.*

,ismobiletext=case when isnull(ismobile,0)=0 then \'\' else \'是\' end,

app_areatypetext=(case isnull(app_areatype,0) when 1 then \'范围外\' when 2 then \'范围内\' else \'\'end)

,emp_code,emp_name,emp_deptname

from

(

select FDateTime,CardNo,EmpID,LocationAddress,Memo,createby,createtime,updateby,updatetime,ismobile,app_areatype,MachNo

from kq_record (nolock) where fdatetime >=\'2025-06-01\' and FDateTime between {sdate} and dateadd(day,1,{edate}) and EmpID is not null and isnull(ifcancel,0)=0

union

select QkDateTime,null,QkEmpID,\'签卡\',QkMemo,createby,createtime,updateby,updatetime,null,null,null from Kq_RecordQk (nolock)

where QkDateTime between {sdate} and dateadd(day,1,{edate})

)t

Left join employeeview(nolock) t1 on t.empid=t1.emp_id ) x

电子合同转入接口(暂停)

接口ID:暂停

必须传入参数

htcode 合同编码

htfile 合同文件

合同文件调用接口传入示例

D:\WeChat Files\WeChat
Files\wxid_br91c58j6j6m41\FileStorage\Temp\1752916160338.jpg

接口CODE

update Emp_HeTong set g_dzht ={htfile},updatetime =getdate(),createby =\'OA\'

where ht_code ={htcode} date Emp_HeTong set g_dzht ={htfile},updatetime =getdate(),createby =\'OA\'

where ht_code ={htcode}# 考勤结果单人查询

接口ID:92

必须传入参数

empcode 工号 字符 必填

sdate 开始日期 字符 必填

edate 结束日期 字符 必填

接口CODE

select EmpID,empcode =emp_code,empname =emp_name,

compname=(select top 1 dept_name from emp_department with(nolock) where dept_code =left(dept,2)),

deptname=(select top 1 dept_name from emp_department with(nolock) where dept_code =left(dept,4)),

zhiweiname=(select top 1 zhiwei_name from emp_zhiwei with(nolock) where zhiwei_code=zhiwei)

,statustext=case when isnull(cqqk,\'\')=\'\' and isnull(Kgsj,0)=0 and banzhi is not null then \'正常\'

when banzhi is null then \'未排班\' else cqqk end

,fdate=convert(varchar(10),fdate, 120)

,bname=x.name,btype=x.type

,k1=(case when b1sbtime is null then null else convert(varchar(20),dateadd(minute,b1sbtime,fdate),120) end)

,kc_place1

,k2=(case when b1xbtime is null then null else convert(varchar(20),dateadd(minute,b1xbtime,fdate),120) end)

,kc_place2

,k3=(case when b2sbtime is null then null else convert(varchar(20),dateadd(minute,b2sbtime,fdate),120) end)

,kc_place3

,k4=(case when b2xbtime is null then null else convert(varchar(20),dateadd(minute,b2xbtime,fdate),120) end)

,kc_place4

,k5=(case when b3sbtime is null then null else convert(varchar(20),dateadd(minute,b3sbtime,fdate),120) end)

,kc_place5

,k6=(case when b3xbtime is null then null else convert(varchar(20),dateadd(minute,b3xbtime,fdate),120) end)

,kc_place6 time is null then null else convert(varchar(20),dateadd(minute,b3xbtime,fdate),120) end)

,kc_place6,bkflag =(case when (select count(1) from Kq_RecordQk where QkEmpID =t.EmpID and QkDateTime =dateadd(minute,b1sbtime,t.fdate)) >0 then \'k1\' else \'\' end)

+(case when (select count(1) from Kq_RecordQk where QkEmpID =t.EmpID and QkDateTime =dateadd(minute,b1xbtime,t.fdate)) >0 then \'k2\' else \'\' end)

+(case when (select count(1) from Kq_RecordQk where QkEmpID =t.EmpID and QkDateTime =dateadd(minute,b2sbtime,t.fdate)) >0 then \'k3\' else \'\' end)

+(case when (select count(1) from Kq_RecordQk where QkEmpID =t.EmpID and QkDateTime =dateadd(minute,b2xbtime,t.fdate)) >0 then \'k4\' else \'\' end)

+(case when (select count(1) from Kq_RecordQk where QkEmpID =t.EmpID and QkDateTime =dateadd(minute,b3sbtime,t.fdate)) >0 then \'k5\' else \'\' end)

+(case when (select count(1) from Kq_RecordQk where QkEmpID =t.EmpID and QkDateTime =dateadd(minute,b3xbtime,t.fdate)) >0 then \'k6\' else \'\' end)

,sjcqsj

,Dkcs =(case when b1sbtime is not null and cs1=1 then 1 else 0 end)

+(case when b1xbtime is not null and cs2=1 then 1 else 0 end)

+(case when b2sbtime is not null and cs3=1 then 1 else 0 end)

+(case when b2xbtime is not null and cs4=1 then 1 else 0 end)

+(case when b3sbtime is not null then 1 else 0 end)

+(case when b3xbtime is not null then 1 else 0 end)

,qkcs =(case when b1sbtime is null and cs1=1 then 1 else 0 end)

+(case when b1xbtime is null and cs2=1 then 1 else 0 end)

+(case when b2sbtime is null and cs3=1 then 1 else 0 end) time is null and cs2=1 then 1 else 0 end)

+(case when b2sbtime is null and cs3=1 then 1 else 0 end)+(case when b2xbtime is null and cs4=1 then 1 else 0 end)

+(case when b3sbtime is null and cs5=1 then 1 else 0 end)

+(case when b3xbtime is null and cs6=1 then 1 else 0 end)

,islock=(case when isnull(iflock,0)=0 then \'未锁\' else \'已锁定\' end)

,t.updatetime

from kq_result t with (nolock)

left join employeeview t1 on t.empid=t1.emp_id

left join kq_cbtype t3 on t.dttype=t3.cb_code

left join (

select a.id,code,name,type=(case when a.type =\'01\'then \'白班\' else \'夜班\' end)

,case when isnull(b.IFSbDk,0) =0 and b.Zbxs>0 then 1 else 0 end cs1 ,case when isnull(b.IfXbDk,0) =0 and b.Zbxs>0 then 1 else 0 end cs2

,case when isnull(c.IFSbDk,0) =0 and c.Zbxs>0 then 1 else 0 end cs3, case when isnull(c.IfXbDk,0) =0 and c.Zbxs>0 then 1 else 0 end cs4

,case when isnull(d.IFSbDk,0) =0 and d.Zbxs>0 then 1 else 0 end cs5 ,case when isnull(d.IfXbDk,0) =0 and d.Zbxs>0 then 1 else 0 end cs6

from Kq_Banzhi a

left join (select * from Kq_Banzhi_D where BanCiXh =1) b on a.id=b.bzid

left join (select * from Kq_Banzhi_D where BanCiXh =2) c on a.id=c.bzid

left join (select * from Kq_Banzhi_D where BanCiXh =3) d on a.id=d.bzid

) x on t.Banzhi =x.id

where t.empid =(select top 1 emp_id from emp_Baseinfo where emp_code ={empcode})

and t.fdate between {sdate} and (case when {edate}>getdate() then getdate() else {edate} end) de})

and t.fdate between {sdate} and (case when {edate}>getdate() then getdate() else {edate} end)# 考勤结果日期查询

接口ID:85

必须传入参数

sdate 开始日期 字符 必填

edate 结束日期 字符 必填

参数示例

{\"sdate\": \"2025-06-01\",\"edate\":\"2025-06-10\"}

对应接口Code

select EmpID,empcode =emp_code,empname =emp_name,

compname=(select top 1 dept_name from emp_department with(nolock) where dept_code =left(dept,2)),

deptname=(select top 1 dept_name from emp_department with(nolock) where dept_code =left(dept,4)),

zhiweiname=(select top 1 zhiwei_name from emp_zhiwei with(nolock) where zhiwei_code=zhiwei)

,statustext=case when isnull(cqqk,\'\')=\'\' and isnull(Kgsj,0)=0 and banzhi is not null then \'正常\' when banzhi is null then \'未排班\' else cqqk end

--banzhicode=(case when banzhi is null then null else isnull(t2.code,\'\') end),

--banzhiname=(case when banzhi is null then \'未排班\' else isnull(t2.name,\'当日班制\') end)

,fdate=convert(varchar(10),fdate, 120),

k1=(case when b1sbtime is null then null else convert(varchar(20),dateadd(minute,b1sbtime,fdate),120) end)

,kc_place1

,k2=(case when b1xbtime is null then null else convert(varchar(20),dateadd(minute,b1xbtime,fdate),120) end)

,kc_place2

,k3=(case when b2sbtime is null then null else convert(varchar(20),dateadd(minute,b2sbtime,fdate),120) end)

,kc_place3

,k4=(case when b2xbtime is null then null else convert(varchar(20),dateadd(minute,b2xbtime,fdate),120) end)

,kc_place4

,k5=(case when b3sbtime is null then null else convert(varchar(20),dateadd(minute,b3sbtime,fdate),120) end)

,kc_place5 time is null then null else convert(varchar(20),dateadd(minute,b3sbtime,fdate),120) end)

,kc_place5,k6=(case when b3xbtime is null then null else convert(varchar(20),dateadd(minute,b3xbtime,fdate),120) end)

,kc_place6

,sjcqsj=cast((case when t.type in(\'04\',\'06\',\'07\') then isnull(sjcqsj,0)+isnull(dkjb,0)*60 else sjcqsj end) as int)

,jbsj=(case when t.type in(\'04\',\'06\',\'07\') then 0 else cast(sqjbxs*60 as int) end)

,psjb=(case when t.type in(\'04\',\'06\',\'07\') then 0 else cast(psjbxs*60 as int) end)

,zljb=(case when t.type in(\'04\',\'06\',\'07\') then 0 else cast(zljbxs*60 as int) end)

,zrjb=(case when t.type in(\'04\',\'06\',\'07\') then 0 else cast(zrjbxs*60 as int) end)

,jrjb=(case when t.type in(\'04\',\'06\',\'07\') then 0 else cast(jrjbxs*60 as int) end)

,islock=(case when isnull(iflock,0)=0 then \'未锁\' else \'已锁定\' end)

,yxxs,ccts,ycqxs

,t.updatetime

from kq_result t with (nolock)

left join employeeview t1 on t.empid=t1.emp_id

left join kq_cbtype t3 on t.dttype=t3.cb_code

where t.fdate between {sdate} and (case when {edate}>getdate() then getdate() else {edate} end) de

where t.fdate between {sdate} and (case when {edate}>getdate() then getdate() else {edate} end)# 个人当月加班时长查询

接口ID:93

必须传入参数

empcode 工号 字符 必填

sdate 加班开始日期 字符 必填

接口CODE

select sum(sqjbxs) jbxs from kq_result where empid =(select top 1 emp_id from emp_baseinfo where emp_code ={empcode}) and fdate between dateadd(month,datediff(month,0,{sdate}),0) and dateadd(month,datediff(month,0,{sdate})+1,-1)

项目申报接口

接口ID:95

必须传入参数

empcode 工号 字符 必填

fdate 申报日期 字符 必填

xmcode 项目编码

dayreason 申报或变更备注说明

docno 单号

sqreason 原因

接口CODE

if (select count(1) from kq_daychangexm

where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and dayfdate={fdate})>0

begin

update kq_daychangexm set xmcode ={xmcode},updatetime =getdate(),dayreason={dayreason},sqreason ={sqreason}

where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and dayfdate={fdate}

end

else

begin

insert into kq_daychangexm(dayempid,dayfdate,xmcode,dayreason,daymemo,createtime,updatetime,sqreason)

select empid =(select emp_id from emp_baseinfo where emp_code ={empcode}),{fdate},{xmcode},{dayreason},{docno},getdate(),getdate(),{sqreason}

end

加班扣休接口

接口ID:96

必须传入参数

empcode 工号 字符 必填

sdate 加班开始时间 必填

edate 加班结束时间 必填

接口CODE

declare \@empid int,@rettime int

-- declare \@sdate datetime,@edate datetime;set \@sdate=\'2025-08-01 10:00\' ;set \@edate=\'2025-08-01 20:05\'

set \@empid =(select emp_id from emp_baseinfo where emp_code ={empcode})

exec sp_kqcalxxtime \@empid,{sdate},{edate},@rettime out

select \@rettime ere emp_code ={empcode})

exec sp_kqcalxxtime \@empid,{sdate},{edate},@rettime out

select \@rettime# 请假单验证

接口ID:97

必须传入参数

empcode 工号 字符 必填

stime 开始时间 必填

etime 结束时间 必填

存在返回0 提示信息重复,不存在返回1 可录单

接口CODE

declare \@alempid int

select \@alempid =emp_id from emp_baseinfo where emp_code ={empcode}

select ret=(case when (select Count(1) from Kq_AskLeave

where AlEmpID=@alempid and isnull(appstatus,0) not in (3,6) -- 未通过 或 撤消

and ({stime} >= alstime and {stime} \<aletime

or {etime} >alstime and {etime} \<=aletime

or alstime >= {stime} and alstime\<{etime}

or aletime > {stime} and aletime\<={etime}))>0

then 0 else 1 end)

出差单验证

接口ID:98

必须传入参数

empcode 工号 字符 必填

stime 开始时间 必填

etime 结束时间 必填

存在返回0 提示信息重复,不存在返回1 可录单

接口CODE

declare \@alempid int

select \@alempid =emp_id from emp_baseinfo where emp_code ={empcode}

select ret=(case when (select Count(1) from Kq_AskLeavecc

where AlEmpID=@alempid and isnull(appstatus,0) not in (3,6) -- 未通过 或 撤消

and ({stime} >= alstime and {stime} \<aletime

or {etime} >alstime and {etime} \<=aletime

or alstime >= {stime} and alstime\<{etime}

or aletime > {stime} and aletime\<={etime}))>0

then 0 else 1 end) = {stime} and alstime\<{etime}

or aletime > {stime} and aletime\<={etime}))>0

then 0 else 1 end)# 加班单验证

接口ID:99

必须传入参数

empcode 工号 字符 必填

stime 开始时间 必填

etime 结束时间 必填

-- 存在返回0 提示信息重复,不存在返回1 可录单

接口CODE

declare \@otempid int,@otfdate datetime,@otstime datetime,@otetime datetime

select \@otempid =emp_id from emp_baseinfo where emp_code ={empcode}

set \@otfdate =cast({otstime} as date)

set \@otstime=datediff(minute,@otfdate,{otstime})

set \@otetime=datediff(minute,@otfdate,{otetime})

select ret=(case when isnull((select count(1) from kq_outtime

where otempid=@otempid and isnull(appstatus,0) not in(3,6)

and otfdate=@otfdate

and ((@otstime>=otstime and \@otstime\<otetime)

or (@otetime>otstime and \@otetime\<=otetime)

or (otstime>=@otstime and otstime\<@otetime)

or (otetime>@otstime and otetime\<=@otetime))),0)>0 then 0 else 1 end)

MES班制接入接口

接口ID:101

必须传入参数

empcode 工号 字符 必填

kqdate 日期 必填

bzcode 班制编码 必填

参数示例

[{\"empcode\": \"999999\",\"kqdate\": \"2025/10/8\",\"bzcode\": \"02\"}]

接口CODE

if (select count(1) from kq_daychange where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and DayFdate ={kqdate})>0

update kq_daychange set kd_mesbz ={bzcode},updatetime =getdate()

where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and DayFdate ={kqdate}

else

insert into kq_daychange(dayempid,DayFdate,kd_mesbz,updatetime)

select dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode})

,DayFdate ={kqdate},kd_mesbz ={bzcode},getdate() mp_id from emp_baseinfo where emp_code ={empcode})

,DayFdate ={kqdate},kd_mesbz ={bzcode},getdate()# MES工时接入接口

接口ID:102

必须传入参数

empcode工号 字符 必填

kqdate 日期 必填

cqxs 出勤工时 必填

参数示例

[{\"empcode\": \"999999\",\"kqdate\": \"2025/10/8\",\"cqxs\": \"2.1\"}]

接口CODE

if (select count(1) from kq_daychange where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and DayFdate ={kqdate})>0

update kq_daychange set kd_mescq= {cqxs},updatetime =getdate()

where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and DayFdate ={kqdate}

else

insert into kq_daychange(dayempid,DayFdate,kd_mescq,Kd_cqupdatetime)

select dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode})

,DayFdate ={kqdate},kd_mescq= {cqxs},getdate() emp_id from emp_baseinfo where emp_code ={empcode})

,DayFdate ={kqdate},kd_mescq= {cqxs},getdate()# MES连班接入接口

接口ID:103

必须传入参数

Empcode 工号 字符 必填

kqdate 日期 必填

lbflag 整型 班制标识 传入1或0 代表是与否 必填

参数示例

[{\"empcode\": \"999999\",\"kqdate\": \"2025/10/8\",\"lbflag\": \"1\"}]

接口CODE

if (select count(1) from kq_daychange where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and DayFdate ={kqdate})>0

update kq_daychange set Kd_islb= {lbflag},Kd_cqupdatetime =getdate()

where dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and DayFdate ={kqdate}

else

insert into kq_daychange(dayempid,DayFdate,Kd_islb,Kd_cqupdatetime)

select dayempid =(select emp_id from emp_baseinfo where emp_code ={empcode})

,DayFdate ={kqdate},kd_mescq= {lbflag},getdate()

update kq_result set Kd_islb ={lbflag} where empid =(select emp_id from emp_baseinfo where emp_code ={empcode}) and fdate ={kqdate} and isnull(iflock,0)=0 elect emp_id from emp_baseinfo where emp_code ={empcode}) and fdate ={kqdate} and isnull(iflock,0)=0# HR续签合同转OA审批接口

地址:oa.hynn.com.cn:21010/out/createLaborContractFlow

参数示例

{\"createGh\":\"1007378\",\"sqrgh\":\"1007378\",\"workflowName\":\"劳动合同审批\",\"paramsList\":[{\"fieldName\":\"sqrgh\",\"fieldValue\":\"1007378\"},{\"fieldName\":\"htbh\",\"fieldValue\":\"合同编号\"},{\"fieldName\":\"wjfqfzd\",\"fieldValue\":\"入职公司\"},{\"fieldName\":\"xmfz\",\"fieldValue\":\"乙方姓名\"},{\"fieldName\":\"gwfz\",\"fieldValue\":\"岗位\"},{\"fieldName\":\"xbfz\",\"fieldValue\":\"乙方性别\"},{\"fieldName\":\"lxdhfz\",\"fieldValue\":\"联系的话\"},{\"fieldName\":\"sfzhmfz\",\"fieldValue\":\"身份证号码\"},{\"fieldName\":\"hjdzfz\",\"fieldValue\":\"户籍地址\"},{\"fieldName\":\"xzzfz\",\"fieldValue\":\"现住址\"},{\"fieldName\":\"gdqxksrqfz\",\"fieldValue\":\"2025-10-15\"},{\"fieldName\":\"gdqxjsrqfz\",\"fieldValue\":\"2025-10-15\"},{\"fieldName\":\"syqksfz\",\"fieldValue\":\"2025-10-15\"},{\"fieldName\":\"syqjsfz\",\"fieldValue\":\"2025-10-15\"},{\"fieldName\":\"syqyjgysyqfz\",\"fieldValue\":\"试用期月\"},{\"fieldName\":\"sfsqgzl\",\"fieldValue\":0},{\"fieldName\":\"zscqsm\",\"fieldValue\":\"知识产权说明\"},{\"fieldName\":\"sqsl\",\"fieldValue\":\"100\"}]}

合同审批状态接收接口

接口ID:91

必须传入参数

htcode 合同编号 字符 必填

appstatus 审批状态,2:已通过、3:未通过、6:已撤消

参数示例

[{\"htcode \": \"999999\",\" appstatus \": \"2\"}]

接口CODE

update Emp_HeTong set appstatus ={appstatus},updatetime =getdate() where ht_code ={htcode}

接口CODE

update Emp_HeTong set appstatus ={appstatus},updatetime =getdate() where ht_code ={htcode}# 开发人员更新接口

接口ID:104

必须传入参数

empcode 工号 字符填

yfflag 字符 值:是 或 否

参数示例

[{\"empcode\": \"999999\",\" yfflag \": \"是\"}]

接口CODE

update emp_baseinfo set g_isyf ={yfflag} where emp_code ={empcode}

有薪假附件接入接口

接口ID:105

必须传入参数

Docno 单号

upfile 附件链接

接口代码

update kq_askleave set g_oafile =(case when right({upfile},1)=\';\' then left({upfile},len({upfile})-1) else {upfile} end )

where left(almemo,6) =left({docno},6)

外包人员工作超15小时人员名单

接口ID:106

必须传入参数

Fdate 日期

参数示例

{\"fdate\":\"2025-12-01\"}

接口代码

select fdate,empid

,empcode =emp_code

,empname =emp_name

,empdeptname =emp_deptname

,empzhiweiname=emp_zhiweiname

,Empmanagerid=Emp_manager -- 直接上司

,Empmanagercode=(select top 1 emp_code from emp_baseinfo where emp_id =e.Emp_manager)

,Empmanagername=(select top 1 emp_name from emp_baseinfo where emp_id =e.Emp_manager)

,deptmangerid=(select Dept_manager from Emp_Department where dept_code =a.dept)

,deptmangercode=(select emp_code from emp_baseinfo where emp_id =(select top 1 Dept_manager from Emp_Department where dept_code =a.dept))

,deptmangername=(select emp_name from emp_baseinfo where emp_id =(select top 1 Dept_manager from Emp_Department where dept_code =a.dept))

,isnull(sjcqxs,0)+isnull(dkjb,0) cqxs

from kq_result a

left join employeestate e on a.empid =e.emp_id

where fdate ={fdate} and type in(\'04\',\'06\') and isnull(sjcqxs,0)+isnull(dkjb,0)>=15 =e.emp_id

where fdate ={fdate} and type in(\'04\',\'06\') and isnull(sjcqxs,0)+isnull(dkjb,0)>=15# 离职交接状态传入接口

接口ID:107

交接完成调用

必须传入参数

Empcode 工号

参数示例

[{\"empcode\":\"999999\"}]

接口代码

update a set G_workflag =\'true\'

from emp_lizhiapplay a

where lz_empid =(select emp_id from emp_baseinfo where emp_code ={empcode})

部门岗位申请接入接口

接口ID:108

申请审批完成调用

必须传入参数

dept 部门

zwname 岗位名称

参数示例

[{\"dept \":\"0101\",{\" zwname \":\"test\",}]

接口代码

declare \@zhicode varchar(20) -- ,@dept varchar(20),@zwname varchar(20);set \@zwname =\'HR经理\'

set \@zhicode=(select max(ZhiWei_code)+1 from Emp_ZhiWei)

-- 插入岗位

if (select count(1) from Emp_ZhiWei where ZhiWei_name ={zwname})\<=0

insert into Emp_ZhiWei(comp_code,ZhiWei_code,ZhiWei_name,Zhiwei_status,createby,createtime,updateby,updatetime)

select \'01\',@zhicode,{zwname},1,\'OA\',getdate(),\'OA\',getdate()

else

select top 1 \@zhicode =ZhiWei_code from Emp_ZhiWei where ZhiWei_name ={zwname}

-- 插入部门岗位

if (select count(1) from emp_depart_zhiwei where dpzw_dept ={dept} and dpzw_code =@zhicode)\<=0

insert into emp_depart_zhiwei(comp_code,dpzw_dept,dpzw_code,dpzw_state,createby,createtime,updateby,updatetime)

select \'01\',{dept},@zhicode,1,\'OA\',getdate(),\'OA\',getdate() y,createtime,updateby,updatetime)

select \'01\',{dept},@zhicode,1,\'OA\',getdate(),\'OA\',getdate()# 明天预入职人员名单查询

接口ID:109

查询明天预入职人员名单

无参数

接口代码

select empname =emp_name,Emppydate=Emp_pydate,deptname=t3.dept_name,zhiweiname=t4.zhiwei_name,

sextext=(case when isnull(t.emp_sex,0)=0 then \'男\' else \'女\' end),

nationtext=t1.b_name,xltext=t6.b_name

from emp_baseinfo_pre t

left join emp_nation t1 on t.emp_nation=t1.b_code

left join emp_department t3 on t.comp_code=t3.comp_code and t.emp_dept=t3.dept_code

left join emp_zhiwei t4 on t.comp_code=t4.comp_code and t.emp_zhiwei=t4.zhiwei_code

left join emp_xueli t6 on t.emp_xueli=t6.b_code

where isnull(t.emp_state,0) =0 and Emp_pydate=dateadd(day,1,cast(getdate() as date))

近一个月待转正人员名单查询

接口ID:110

查询明天预入职人员名单

无参数

接口代码

select empcode=emp_code,empname =emp_name,empzzdate=Emp_zzdate,deptname=emp_deptname,zhiweiname=emp_zhiweiname,

sextext=(case when isnull(t.emp_sex,0)=0 then \'男\' else \'女\' end)

from EmployeeState t

where Emp_zzdate\<=dateadd(month,1,cast(getdate() as date)) and Emp_State=1

and emp_type not in(\'04\',\'06\') zdate\<=dateadd(month,1,cast(getdate() as date)) and Emp_State=1

and emp_type not in(\'04\',\'06\')# 月考勤年假调休查询语句

--declare \@lzdate datetime,@empcode varchar(30);SET \@empcode=\'1001244\';SET \@lzdate=\'2025-12-5\'

-- \@lzdate 离职日期 \@empcode 离职工号

----本月应出勤 ycqxs 本月实际出勤 sjcqxs 本月加班时间 Sqjbxs --剩余补休时间 bxsj --剩余年假 njsj

select empid,emp_code,ycqxs,sjcqxs,Sqjbxs,bxsj,njsj from employeeview e

left join (select empid,sjcqxs,ycqxs,Sqjbxs from Kq_ResultSum

where SessionID =(select id from Sys_Session where sdate =DATEFROMPARTS(year(@lzdate),month(@lzdate),1))) a

on a.empid =e.emp_id

left join (select y_empid,bxsj =Y_Synj from Kq_YearHoliday where y_type =\'Kj_tx\' and \@lzdate between y_sdate and y_edate ) b

on b.y_empid =e.emp_id

left join (select y_empid,njsj =Y_Synj from Kq_YearHoliday where y_type =\'Kj_nj\' and \@lzdate between y_sdate and y_edate ) c

on c.y_empid =e.emp_id

where e.emp_code =@empcode j\' and \@lzdate between y_sdate and y_edate ) c

on c.y_empid =e.emp_id

where e.emp_code =@empcode# 风险岗位体检到期提醒名单

接口ID:111

查询体检到期人员名单

无参数

接口代码

select empid=emp_id,empcode=emp_code,empname =emp_name

,empdeptname =emp_deptname,zhiweiname =emp_zhiweiname,emppydate =emp_pydate

,tjdate =T_Date,tjPosition=T_Position

,Empmanagerid=Emp_manager -- 直接上司

,Empmanagercode=(select top 1 emp_code from emp_baseinfo where emp_id =e.Emp_manager)

,Empmanagername=(select top 1 emp_name from emp_baseinfo where emp_id =e.Emp_manager)

,deptmangerid=(select Dept_manager from Emp_Department where dept_code =e.emp_dept) -- 部门负责人

,deptmangercode=(select emp_code from emp_baseinfo where emp_id =(select top 1 Dept_manager from Emp_Department where dept_code =e.emp_dept))

,deptmangername=(select emp_name from emp_baseinfo where emp_id =(select top 1 Dept_manager from Emp_Department where dept_code =e.emp_dept))

from EmployeeState e

inner join (select comp_code,dpzw_dept,dpzw_code,dpzw_isfxgw,dpzw_tjcycle from emp_depart_zhiwei

where dpzw_isfxgw =1

) b on e.emp_dept =b.dpzw_dept and e.Emp_zhiwei =b.dpzw_code

inner join (select * from emp_tijian where t_id in(select max(t_id) from emp_tijian group by t_empid)) c on e.emp_id =c.t_empid

where dateadd(month,isnull(b.dpzw_tjcycle,5),c.t_date)\<getdate() _empid)) c on e.emp_id =c.t_empid

where dateadd(month,isnull(b.dpzw_tjcycle,5),c.t_date)\<getdate()# 部门昨日出勤状况统计查询

接口ID:112

查询昨天出勤状况

无参数

接口代码

declare \@qtdate datetime,@ztdate datetime,@jtdate datetime

set \@jtdate =cast(getdate() as date); set \@qtdate =@jtdate -2 ;set \@ztdate =@jtdate -1

declare \@empdata table(xuhao int,compcode varchar(30),parentdeptcode varchar(30),parentname varchar(100),deptcode varchar(30),deptname varchar(100),Deptlevel int

,detpmanager int,前天在职 int,昨日入职 int,昨日离职 int,昨日在职 int,出差 int,迟到 int,漏打卡 int,病假 int,请假 int,产假 int,旷工 int,实到 int ,出勤率 dec(6,2))

insert into \@empdata(xuhao,compcode,parentdeptcode,parentname,deptcode,deptname ,Deptlevel)

select Dept_xuhao=ROW_NUMBER() over(partition by parentdeptcode order by parentdeptcode)

,left(parentdeptcode,2),parentdeptcode,parentname =d.dept_name,x.dept_code,x.dept_name,x.Dept_level

from

(select parentdeptcode =case when left(dept_code,2)=\'01\' and Dept_level \<>3 or len(dept_code) =2

then dept_code else left(dept_code,len(dept_code)-2) end

,dept_code

,dept_name

,Dept_level

,Dept_Property

from Emp_Department where Dept_State =1 and g_isdept2 =\'true\' and dept_code \<>\'01\'

) x

left join Emp_Department d on x.parentdeptcode =d.dept_code

order by x.dept_code

update a set detpmanager =b.Dept_manager

from \@empdata a

left join Emp_Department b on a.deptcode =b.Dept_code

if object_id(\'tempdb..#emp\') is not null drop table #emp

select emp_id,emp_code,emp_dept,emp_pydate,Emp_lzdate into #emp from emp_Baseinfo nolock

update a

select emp_id,emp_code,emp_dept,emp_pydate,Emp_lzdate into #emp from emp_Baseinfo nolock

update aset 前天在职 =(SELECT COUNT(1) FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode and emp_pydate \<=@qtdate and isnull(emp_lzdate,\'9999-01-01\') >@qtdate)

, 昨日入职 =(SELECT COUNT(1) FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode and emp_pydate =@ztdate)

, 昨日离职 =(SELECT COUNT(1) FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode and emp_lzdate =@ztdate)

, 昨日在职 =(SELECT COUNT(1) FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode and emp_pydate \<=@ztdate and isnull(emp_lzdate,\'9999-01-01\') >@ztdate )

, 出差 =(select count(1) from kq_askleavecc where alempid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode )

and \@ztdate between AlSTime and AlETime and isnull(appstatus,0) in(0,1,2))

, 迟到 =(select count(1) from kq_result where empid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode ) and fdate =@ztdate and ChiDaosj>0)

, 漏打卡 =(select count(1) from kq_result where empid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode )

and fdate =@ztdate and isnull(B1Sbtime,0)+ isnull(B1Xbtime,0)+ isnull(B2Sbtime,0)+ isnull(B2Xbtime,0)+ isnull(B3Sbtime ,0)+isnull(B3Xbtime,0)>0 and kgsj>0)

, 病假 =(select count(1) from kq_askleave where alempid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode )

and \@ztdate between AlSTime and AlETime and isnull(appstatus,0) in(0,1,2) and AlFType =\'kj_bj\')

and \@ztdate between AlSTime and AlETime and isnull(appstatus,0) in(0,1,2) and AlFType =\'kj_bj\'), 请假=(select count(1) from kq_askleave where alempid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode )

and \@ztdate between AlSTime and AlETime and isnull(appstatus,0) in(0,1,2) and AlFType not in(\'kj_bj\',\'kj_cj\'))

, 产假 =(select count(1) from kq_askleave where alempid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode )

and \@ztdate between AlSTime and AlETime and isnull(appstatus,0) in(0,1,2) and AlFType =\'kj_cj\')

, 旷工 =(select count(1) from kq_result where empid in (SELECT emp_id FROM #emp where left(emp_dept,len(a.deptcode))=a.deptcode )

and fdate =@ztdate and isnull(B1Sbtime,0)+ isnull(B1Xbtime,0)+ isnull(B2Sbtime,0)+ isnull(B2Xbtime,0)+ isnull(B3Sbtime ,0)+isnull(B3Xbtime,0)=0 and kgsj>0)

, 实到 =0

from \@empdata a

insert into \@empdata(xuhao ,compcode,deptcode ,deptname ,Deptlevel ,前天在职,昨日入职,昨日离职,昨日在职,出差,迟到,漏打卡,病假,请假,产假,旷工,实到)

select null,compcode,\'合计\',null,null,sum(前天在职),sum(昨日入职),sum(昨日离职),sum(昨日在职),sum(出差),sum(迟到),sum(漏打卡),sum(病假),sum(请假),sum(产假),sum(旷工),sum(实到)

from \@empdata group by compcode

update \@empdata set 实到 = 昨日在职 -isnull(出差,0)-isnull(病假,0)-isnull(请假,0)-isnull(产假,0)-isnull(旷工,0)

update \@empdata set 出勤率 = case when 昨日在职>0 then round(实到*1.0/昨日在职*100,2) else null end

update \@empdata set parentname =null where xuhao\<>1

select parentname 一级部门,deptname 二级部门 ,前天在职,昨日入职,昨日离职,昨日在职,出差,迟到,漏打卡,病假,请假,产假,旷工,实到,出勤率

--,detpmanagerid=detpmanager 一级部门,deptname 二级部门 ,前天在职,昨日入职,昨日离职,昨日在职,出差,迟到,漏打卡,病假,请假,产假,旷工,实到,出勤率

--,detpmanagerid=detpmanager--,deptmanagercode =(select emp_code from emp_baseinfo where emp_id =a.detpmanager)

--,deptmanagername =(select emp_name from emp_baseinfo where emp_id =a.detpmanager)

from \@empdata a where deptcode is not null

order by compcode,deptcode here emp_id =a.detpmanager)

from \@empdata a where deptcode is not null

order by compcode,deptcode# 昨日异常出勤人员名单查询

接口ID:113

查询昨日工作时长超长人员名单

无参数

接口代码

select emp_code 工号,emp_name 姓名,emp_deptname 部门,emp_zhiweiname 岗位,fdate 日期,\'超2点加班\' 异常类型

,Empmanagerid=Emp_manager -- 直接上司

,Empmanagercode=(select top 1 emp_code from emp_baseinfo where emp_id =e.Emp_manager)

,Empmanagername=(select top 1 emp_name from emp_baseinfo where emp_id =e.Emp_manager)

from kq_result k (nolock)

left join employeeview e on k.empid =e.emp_id

where fdate between DATEFROMPARTS(year(dateadd(day,-1,cast(getdate() as date))),month(dateadd(day,-1,cast(getdate() as date))),1)

and dateadd(day,-1,cast(getdate() as date))

and isnull(b3xbtime,b3sbtime)>=1560 and k.banzhi \<>94

union

select emp_code 工号,emp_name 姓名,emp_deptname 部门,emp_zhiweiname 岗位,fdate 日期,\'平时加班超8小时\' 异常类型

,Empmanagerid=Emp_manager -- 直接上司

,Empmanagercode=(select top 1 emp_code from emp_baseinfo where emp_id =e.Emp_manager)

,Empmanagername=(select top 1 emp_name from emp_baseinfo where emp_id =e.Emp_manager)

from kq_result k (nolock)

left join employeeview e on k.empid =e.emp_id

where fdate between DATEFROMPARTS(year(dateadd(day,-1,cast(getdate() as date))),month(dateadd(day,-1,cast(getdate() as date))),1)

and dateadd(day,-1,cast(getdate() as date))

and sqjbxs>=8 and e.emp_type not in(\'04\',\'06\') and DtType not in(8,9)

union

select emp_code 工号,emp_name 姓名,emp_deptname 部门,emp_zhiweiname 岗位,fdate 日期,\'周末加班超16小时\' 异常类型

,Empmanagerid=Emp_manager -- 直接上司 姓名,emp_deptname 部门,emp_zhiweiname 岗位,fdate 日期,\'周末加班超16小时\' 异常类型

,Empmanagerid=Emp_manager -- 直接上司,Empmanagercode=(select top 1 emp_code from emp_baseinfo where emp_id =e.Emp_manager)

,Empmanagername=(select top 1 emp_name from emp_baseinfo where emp_id =e.Emp_manager)

from kq_result k (nolock)

left join employeeview e on k.empid =e.emp_id

where fdate between DATEFROMPARTS(year(dateadd(day,-1,cast(getdate() as date))),month(dateadd(day,-1,cast(getdate() as date))),1)

and dateadd(day,-1,cast(getdate() as date))

and sqjbxs>=16 and e.emp_type not in(\'04\',\'06\') and DtType in(8,9) -1,cast(getdate() as date))

and sqjbxs>=16 and e.emp_type not in(\'04\',\'06\') and DtType in(8,9)# 月出勤工时查询

接口ID:114

月出勤工时查询

无参数

yyyymm 年月,格式:XXXX年XX月 2025年01月

接口代码

declare \@id int

select \@id =id from Sys_Session where memo ={yyyymm} -- \'2025年11月\'

select

工号 =emp_code,姓名 =emp_name,部门 =emp_deptname,岗位 =emp_zhiweiname,入职日期 =emp_pydate

,应出勤 =ycqxs,实际出勤 =sjcqxs,迟到早退 =kc_cdztxs,漏刷卡=qkcs2

,事假=Kj_sjxs,病假=Kj_bjxs,旷工=kgxs,婚假=Kj_hjxs,陪产假=Kj_pcjxs

,产假=Kj_cjxs,丧假=Kj_sangjxs,工伤假=Kj_gsxs,已休调休假=Kj_txxs

,工作日=Psjbxs,休息日=Kc_zmjb,节假日=JrjbXs

,考勤核算周期=s.memo,迟到次数=chidaocs,早退次数=zaotuics

,离职日期 =e.Emp_pydate

,Empmanagerid=Emp_manager

,Empmanagercode=(select top 1 emp_code from emp_baseinfo where emp_id =Emp_manager)

,Empmanagername=(select top 1 emp_name from emp_baseinfo where emp_id =Emp_manager)

,deptmangerid=(select Dept_manager from Emp_Department where dept_code =a.dept)

,deptmangercode=(select emp_code from emp_baseinfo where emp_id =(select top 1 Dept_manager from Emp_Department where dept_code =a.dept))

,deptmangername=(select emp_name from emp_baseinfo where emp_id =(select top 1 Dept_manager from Emp_Department where dept_code =a.dept))

from Kq_ResultSum a

left join employeeview e on a.empid =e.emp_id

left join sys_session s on a.sessionid =s.id

where SessionID =@id

更新离职申请单交接状态

接口ID:115

必传参数

Workflag 交接完成标识:值为:是 or 否

docno 单号

接口代码

update Emp_LiZhiApplay set g_workflag ={workflag},updatetime =getdate() where memo ={docno} *

接口代码

update Emp_LiZhiApplay set g_workflag ={workflag},updatetime =getdate() where memo ={docno}# 薪资核算无效名单接入

接口ID:116

必传参数

empcode 工号

yyyymm 年月,格式:XXXX年XX月 2025年01月

salflag 失效标识:值为:'true' or 'false'

docno 单号

接口代码

declare \@id1 int,@id2 int

select \@id1 =id from Sys_Session where memo ={yyyymm} -- \'2025年11月\'

if not exists (select 1 from gz_month where gzm_SessionID =@id1 and Gzm_EmpID =(select emp_id from emp_baseinfo where emp_code ={empcode}))

insert into gz_month(gzm_SessionID,Gzm_EmpID)

select \@id1,(select emp_id from emp_baseinfo where emp_code ={empcode})

update gm set gm_salflag ={salflag},gm_salflagtime =getdate(),gm_docno ={docno}

from gz_month gm

where gzm_SessionID =@id1

and Gzm_EmpID =(select emp_id from emp_baseinfo where emp_code ={empcode})

update gz set gm_salflag ={salflag},gm_salflagtime =getdate(),gm_docno ={docno}

from gz_result gz

where SessionID =@id1

and empid =(select emp_id from emp_baseinfo where emp_code ={empcode}) lt gz

where SessionID =@id1

and empid =(select emp_id from emp_baseinfo where emp_code ={empcode})# 薪资核算即时结算名单接入

接口ID:118

必传参数

empcode 工号

yyyymm 年月,格式:XXXX年XX月 2025年01月

salflag 失效标识:值为:'true' or 'false'

docno 单号

接口代码

declare \@id1 int,@id2 int

select \@id1 =id from Sys_Session where memo ={yyyymm} -- \'2025年11月\'

if not exists (select 1 from gz_month where gzm_SessionID =@id1 and Gzm_EmpID =(select emp_id from emp_baseinfo where emp_code ={empcode}))

insert into gz_month(gzm_SessionID,Gzm_EmpID)

select \@id1,(select emp_id from emp_baseinfo where emp_code ={empcode})

update gm set Gm_isjsjs ={salflag},Gm_jsjstime =getdate(),Gm_jsjsno ={docno}

from gz_month gm

where gzm_SessionID =@id1

and Gzm_EmpID =(select emp_id from emp_baseinfo where emp_code ={empcode})

update gz set Gm_isjsjs ={salflag},Gm_jsjstime =getdate(),Gm_jsjsno ={docno}

from gz_result gz

where SessionID =@id1

and empid =(select emp_id from emp_baseinfo where emp_code ={empcode}) lt gz

where SessionID =@id1

and empid =(select emp_id from emp_baseinfo where emp_code ={empcode})# 考勤汇总确认查询清单

接口ID:119

必传参数

yyyymm 年月,格式:XXXX年XX月 2025年01月

deptcode 部门编码

接口代码

declare \@id1 int

select \@id1 =id from Sys_Session where memo ={yyyymm} -- \'2025年11月\'

select empcode =emp_code -- 工号

,empname =emp_name -- 姓名

,empdeptcode=emp_dept -- 部门编码

,empdeptname =emp_deptname -- 部门名称

,Emppydate =Emp_pydate -- 聘用日期

,ycqxs -- 应出勤小时

,sjcqxs -- 实出勤小时

,cdztxs =Kc_cdztxs -- 迟到时退时间

,ysqk=Qkcs2 -- 因私签卡

,bjxs=Kj_bjxs -- 病假小时

,sjxs=Kj_sjxs -- 事假小时

,Kgxs -- 旷工小时

,hjxs=Kj_hjxs -- 婚假小时

,pcjxs=Kj_pcjxs -- 陪产假小时

,njxs=Kj_njxs -- 年假小时

,cjxs=Kj_cjxs -- 产假小时

,sangjxs=Kj_sangjxs -- 丧假小时

,gsxs=kj_gsxs -- 工伤小时

,txxs=Kj_txxs -- 调休小时

,Psjbxs -- 平时加班

,zlrjbxs=kc_zmjb -- 周末加班

,JrjbXs -- 节假加班

,jbztx=kc_txjb -- 加班转调休

,isconfirm=case when isconfirm =1 then \'是\' else \'否\' end -- 是否确认

,confirmtime -- 确认时间

from kq_resultsum k (nolock)

left join employeeview e on k.empid =e.emp_id

where k.SessionID =@id1 and e.Emp_dept like isnull({deptcode},\'\')+\'%\'