使用用户通过生活频道账号在生活频道操作平台(https://civetpublic.foxconn.com/)进行服务的申请
用户在智能回复开发者模式中,点击申请开通数据服务按钮,进入申请权限变更,填写并提交申请资料之后,需打印PDF文档。注明:请确认PDF文档与申请信息相同。
目录[隐藏] |
---|
1 申请、查看状态 2 设置密钥 3 查看接口调用记录 4 调用SDK或Web API |
数据服务申请:1.用户点击“申请权限变更”,进入申请页面。勾选所需接口、栏位的权限并填写用户信息,点击“修改申请”提交 2.打印PDF文档,上传已签核的PDF文档,即完成数据服务的申请,等待系统管理员的审核即可。
查看状态:点击申请记录栏的“展开”即可查看审核的状态和详情
在页面点击”修改密钥“进行设置密钥
在接口调用统计操作栏点击”详情“,可查看接口调用的详细信息
若您使用.net开发建使用.net SDK,Web API接口说明可以忽略。若使用其它语言开发,可直接调用Web API。
.net SDK下载的地址:https://civetpublic.foxconn.com/content/CivetUserInfoAPP.zip
调用方法,按工号查询信息为例:
所有接口必须包含以下四个请求值
timestamp:时间截,格式为yyyy-MM-dd HH:mm:ss,如:2017-04-01 11:54:00
app_id:你的生活频道的APPID,如:LznNo6l-CTUU4h6ssfw12
nonce_str: 随机数,任意英文字母或数字组成的字符串,如:6677
sign:签名,除自己外所有参数按参数字段名称英文字母排序(升序),再加&key=[你的密钥,假设为:666666]的MD5加密值。
接口返值包含
return_result:执行结果,值有Success(成功)、Fail(失败)。
message:执行的错误信息。
Data:相关数据。
一:按工号查询员工信息
名称、识别字 | 按工号查询员工信息 |
功能描述 | 按工号查询员工信息 |
.net SDK | public static string SearchByEmpNo(string emp_no) |
URL | https://civetinterface.foxconn.com/UserInfoAPI/Interface/SearchByEmpNo |
Method | POST 方法 |
request type | text/json |
Request Body | { "timestamp": "2017-04-01 11:54:00", "app_id": "LznNo6l-CTUU4h6ssfw12", "nonce_str": "6677", "emp_no": "X0000001", "sign": "4D484DNH345HJR33H7H8900fw123" } |
Response type | text/json |
Response Body | { "return_result": "Success", "message": "", "data": [ { "USERNAME": "X0000001", "FN": "张三", "SEX": "男", "COUNTRY": "CN", "SUBORG": "J", "ORGNAME": "XXX(深圳)有限公司", "BG": "总部周边", "BU": "XXXX", "COST_CODE": "DAAA07", "AREA": "龙华", "BIRTHDAY": "1987/01/27", "EDU_DEGREE": "本科", "CLASS": "师三", "TITLE": "课长", "GRADE": "XX 工程", "JOB_STATUS": "在职", "HIREDATE": "2016-08-10", "LEAVEDATE": "", "CIVETID": "Zhang", "HEAD": "http://qaicivetmedia.foxconn.com/group1/M00/08/C2/CoaWx1cEn_2EEbajAAAAAKz3WPs002.png" } ] } |
补充说明 | 请求值说明: emp_no:工号,必填 返回值说明: data:返回数据的栏位,根据数据栏位显示。 |
二:按姓名查询员工信息
名称、识别字 | 按姓名查询员工信息 |
功能描述 | 按姓名查询员工信息 |
.net SDK | public static string SearchByEmpName(string emp_name, string bg_name = null, string bu_name = null, int page_num = -1, int page_size = -1) |
URL | https://civetinterface.foxconn.com/UserInfoAPI/Interface/SearchByEmpName |
Method | POST 方法 |
request type | text/json |
Request Body | { "timestamp": "2017-04-01 11:54:00", "app_id": "LznNo6l-CTUU4h6ssfw12", "nonce_str": "6677", "emp_name": "张三", "bg_name": "总部周边", "bu_name": "XXXX", "dept_name": "XXX(部门)", "page_size": 20, "page_num": 1, "sign": "4D484DNH345HJR33H7H8900fw123" } |
Response type | text/json |
Response Body | { "return_result": "Success", "message": "", "data": [ { "USERNAME": "X0000001", "FN": "张三", "SEX": "男", "COUNTRY": "CN", "SUBORG": "J", "ORGNAME": "XXX(深圳)有限公司", "BG": "总部周边", "BU": "XXXX", "COST_CODE": "DAAA07", "AREA": "龙华", "BIRTHDAY": "1987/01/27", "EDU_DEGREE": "本科", "CLASS": "师3", "TITLE": "课长", "GRADE": "XX 工程", "JOB_STATUS": "在职", "HIREDATE": "2016-08-10", "LEAVEDATE": "", "CIVETID": "Zhang", "HEAD": "http://qaicivetmedia.foxconn.com/group1/M00/08/C2/CoaWx1cEn_2EEbajAAAAAKz3WPs002.png" } ] } |
补充说明 | 请求值说明: emp_name:姓名,必填 bg_name:[不必填]事业群 bu_name:[不必填]事业处 dept_name:[不必填]部门 page_size:[不必填]每页多少条 page_num:[不必填]页码 返回值说明: data:返回数据的栏位,根据申请栏位显示。 |
三:按入职日期查询员工信息
名称、识别字 | 按入职日期查询员工信息 |
功能描述 | 按入职日期查询员工信息 |
.net SDK | public static string SearchByHiredate(DateTime hiredate, string bg_name = null, string bu_name = null, int page_num = -1, int page_size = -1) |
URL | https://civetinterface.foxconn.com/UserInfoAPI/Interface/SearchByHiredate |
Method | POST 方法 |
request type | text/json |
Request Body | { "timestamp": "2017-04-01 11:54:00", "app_id": "LznNo6l-CTUU4h6ssfw12", "nonce_str": "6677", "hiredate": "2016-08-10", "bg_name": "总部周边", "bu_name": "XXXX", "dept_name": "XX(部门)", "page_size": 20, "page_num": 1, "sign": "4D484DNH345HJR33H7H8900fw123" } |
Response type | text/json |
Response Body | { "return_result": "Success", "message": "", "data": [...] } |
补充说明 | 请求值说明: hiredate:入职日期,必填 bg_name:[不必填]事业群 bu_name:[不必填]事业处 dept_name:[不必填]部门 page_size:[不必填]每页多少条 page_num:[不必填]页码 返回值说明: data:返回数据的栏位,根据申请栏位显示。 |
四:获得某天入职的员工工号、姓名列表
名称、识别字 | 获得某天入职的员工工号、姓名列表 |
功能描述 | 获得某天入职的员工工号、姓名列表 |
.net SDK | public static string GetEmpNoByHiredate(DateTime hiredate, string bg_name = null, string bu_name = null, int page_num = -1, int page_size = -1) |
URL | https://civetinterface.foxconn.com/UserInfoAPI/Interface/GetEmpNoByHiredate |
Method | POST 方法 |
request type | text/json |
Request Body | { "timestamp": "2017-04-01 11:54:00", "app_id": "LznNo6l-CTUU4h6ssfw12", "nonce_str": "6677", "hiredate": "2016-08-10", "bg_name": "总部周边", "bu_name": "XXXX", "dept_name": "XX(部门)", "page_size": 20, "page_num": 1, "sign": "4D484DNH345HJR33H7H8900fw123" } |
Response type | text/json |
Response Body | { "return_result": "Success", "message": "", "data": [...] } |
补充说明 | 请求值说明: hiredate:入职日期,必填 bg_name:[不必填]事业群 bu_name:[不必填]事业处 dept_name:[不必填]部门 page_size:[不必填]每页多少条 page_num:[不必填]页码 返回值说明: data:返回数据的栏位,根据申请栏位显示。 |
五:获得某天离职的员工工号、姓名列表
名称、识别字 | 获得某天离职的员工工号、姓名列表 |
功能描述 | 获得某天离职的员工工号、姓名列表 |
.net SDK | public static string GetEmpNoByResigningDate(DateTime resigning_date, string bg_name = null, string bu_name = null, int page_num = -1, int page_size = -1) |
URL | https://civetinterface.foxconn.com/UserInfoAPI/Interface/GetEmpNoByResigningDate |
Method | POST 方法 |
request type | text/json |
Request Body | { "timestamp": "2017-04-01 11:54:00", "app_id": "LznNo6l-CTUU4h6ssfw12", "nonce_str": "6677", "resigning_date": "2016-08-10", "bg_name": "总部周边", "bu_name": "XXXX", "dept_name": "XX(部门)", "page_size": 20, "page_num": 1, "sign": "4D484DNH345HJR33H7H8900fw123" } |
Response type | text/json |
Response Body | { "return_result": "Success", "message": "", "data": [...] } |
补充说明 | 请求值说明: resigning_dat:离职日期,必填 bg_name:[不必填]事业群 bu_name:[不必填]事业处 dept_name:[不必填]部门 page_size:[不必填]每页多少条 page_num:[不必填]页码 |