# 1 发起计算社保数据 1. 本接口只是以城市为单位进行计算. 2. 结合参数配置, 城市方案, 员工方案进行计算. 3. 当企业开通了代缴时, 忽略城市方案的配置,只结合基本的参数配置和员工方案进行计算. 4. 基数类型: **实际工资** 暂时不支持. ### 1.1 计算请求 可以多个城市一次性提交计算. ##### URI /he/shebao_plan/setting/task POST ##### 参数 String citys; 城市代码, 多个以","逗号间隔. String opt_month; 核算月份 2018-05 或 201805 String ws_id; websocket的会话ID. ### 1.2 计算响应 1. 返回计算任务生成数据的主ID(以城市做为粒度)列表. 2. 计算过程中, 有详细的明细消息由[WebSocket服务](common.html#ws)输出. ##### 状态码 200 计算数据成功完成. 500 有检查异常或计算过程中出错. 600 参数不合要求. ##### 响应示例 { "data": [60, 61], "msg": "", "code": 200 } --- # 2 计算生成的在保增员数据 - 这是计算完成后,需要展示计算数据的结果. - 发送计算完成返回的主ID来请求数据. ### 2.1 请求数据 ##### URI /he/shebao/list/task/data POST 加载在保和增员数据时请求 ##### 参数 | 字段 | 类型 | Length |必须有值| 必传 | 描述 | |:------------------------|:----------|:----------|:------|:------|:-----| |[curr](common.html#page)| int | 值1 ~ 1000| | | 当前页码 | ids | string | | Y | Y | 多个主数据ID以逗号间隔 |inc_normal_dec | int | 值1,5,8 | | | 增减员类型() - inc_normal_dec 的值 ``` INC(1, "增员"), NORMAL(5, "在保"), DEC(8, "减员") ```
### 2.2 响应 数据最外层结构是Map. ##### data 字段 | 字段 | 类型 | 字段名称 | |:--------------------------|:-----------------|:---------------| | datas | WXYJManagerVO | 在保或增员数据 | [page](common.html#page) | Object | 分页数据 ##### data.WXYJManagerVO字段 Map headList; // 社保缴纳项的英文, 中文表头 List dataList; // 数据列表 int inc_count; // 增员数 int normal_count; // 在保数 int dec_count; // 减员数 ##### WXYJManagerVO.dataList字段 | 字段 | 类型 | 字段名称 | |:--------------------------|:-----------------|:---------------| |[ wxyj](t/wxyj.html#TWxyjEmployee)| TWxyjEmployee | 员工的社保/公积金主要数据 |[comUser](t/wxyj.html#TCompanyUser)|TCompanyUser | 员工的信息 |city_name; |string | 城市名称 |[shebao](t/wxyj.html#TWxyjEmployeeData)| TWxyjEmployeeData | 员工的社保数据 |shebao_ent | Map |员工的社保企业缴纳明细数据 |shebao_p | MAP |员工的社保个人缴纳明细数据 |[fund](t/wxyj.html#TWxyjEmployeeData)|TWxyjEmployeeData |员工的公积金数据 ##### 在保或增员的响应数据示例 两个主数据一起请求的数据示例, 广州和深圳. { "code": 200, "msg": "", "data": { "datas": { "headList": { "medical": "基本医疗", "major": "重大疾病", "lose_job": "失业部分", "pension": "养老部分", "birth": "生育部分", "disabled": "残保金", "injury": "工伤部分" }, "dataList": [{ "wxyj": { "id": 53, "summary_id": 8, "ent_id": 1, "city_code": 1001, "opt_month": 201803, "com_userid": 1, "param_name": "标准", "total_fee": 2550.0, "ent_total": 750.0, "p_total": 1800.0, "shebao_month": 201803, "shebao_normal": 1, "fund_month": 201803, "fund_normal": 1, "shebao_status": 31, "fund_status": 31, "gen_time": 1525968000000, "update_time": 1526007314000, "shebao_note": "", "fund_note": "" }, "comUser": { "user_id": 1, "company_id": 1, "user_name": "赖先生", "id_card": "123456789012345678", "nation": "汉", "phone": "12345678901", "gender": 1, "bank_card": "", "bank_name": "", "status": 1, "gen_time": 1526007314000 }, "city_name": "广州", "shebao": { "summary_id": 8, "eid": 53, "wxyj": 1, "radix_type": 2, "radix": 1895.0, "total_fee": 1257.33, "ent_amount": 910.84, "p_amount": 346.49, "charge": 69.0, "card_charge": 0.0, "ent_data": "{\"pension\":443.8,\"medical\":311.85,\"birth\":37.8675,\"lose_job\":12.128,\"injury\":3.79,\"major\":19.305,\"disabled\":82.1}", "p_data": "{\"pension\":253.6,\"medical\":89.1,\"birth\":0.0,\"lose_job\":3.79,\"injury\":0.0,\"major\":0.0,\"disabled\":0.0}", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "采用配置的各项最低基数;未找到操作月(201802)的社保有效数据,作增员。" }, "shebao_ent": { "medical": 311.85, "major": 19.305, "lose_job": 12.128, "pension": 443.8, "birth": 37.8675, "disabled": 82.1, "injury": 3.79 }, "shebao_p": { "medical": 89.1, "major": 0.0, "lose_job": 3.79, "pension": 253.6, "birth": 0.0, "disabled": 0.0, "injury": 0.0 }, "fund": { "summary_id": 8, "eid": 53, "wxyj": 2, "radix_type": 1, "radix": 15000.0, "total_fee": 2550.0, "ent_amount": 750.0, "p_amount": 1800.0, "charge": 69.0, "card_charge": 0.0, "ent_data": "5.0", "p_data": "12.0", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "未找到操作月(201802)的公积金有效数据,作增员。" } }, { "wxyj": { "id": 54, "summary_id": 8, "ent_id": 1, "city_code": 1001, "opt_month": 201803, "com_userid": 11, "param_name": "", "total_fee": 2550.0, "ent_total": 750.0, "p_total": 1800.0, "shebao_month": 0, "shebao_normal": 0, "fund_month": 201803, "fund_normal": 1, "shebao_status": 0, "fund_status": 31, "gen_time": 1525968000000, "update_time": 1526007314000, "shebao_note": "", "fund_note": "" }, "comUser": { "user_id": 11, "company_id": 1, "user_name": "赖先", "id_card": "123456789012345670", "nation": "汉", "phone": "12345678901", "gender": 1, "bank_card": "", "bank_name": "", "status": 1, "gen_time": 1526007314000 }, "city_name": "广州", "shebao": { "summary_id": 8, "eid": 53, "wxyj": 1, "radix_type": 2, "radix": 1895.0, "total_fee": 1257.33, "ent_amount": 910.84, "p_amount": 346.49, "charge": 69.0, "card_charge": 0.0, "ent_data": "{\"pension\":443.8,\"medical\":311.85,\"birth\":37.8675,\"lose_job\":12.128,\"injury\":3.79,\"major\":19.305,\"disabled\":82.1}", "p_data": "{\"pension\":253.6,\"medical\":89.1,\"birth\":0.0,\"lose_job\":3.79,\"injury\":0.0,\"major\":0.0,\"disabled\":0.0}", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "采用配置的各项最低基数;未找到操作月(201802)的社保有效数据,作增员。" }, "shebao_ent": { "medical": 311.85, "major": 19.305, "lose_job": 12.128, "pension": 443.8, "birth": 37.8675, "disabled": 82.1, "injury": 3.79 }, "shebao_p": { "medical": 89.1, "major": 0.0, "lose_job": 3.79, "pension": 253.6, "birth": 0.0, "disabled": 0.0, "injury": 0.0 }, "fund": { "summary_id": 8, "eid": 54, "wxyj": 2, "radix_type": 1, "radix": 15000.0, "total_fee": 2550.0, "ent_amount": 750.0, "p_amount": 1800.0, "charge": 69.0, "card_charge": 0.0, "ent_data": "5.0", "p_data": "12.0", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "未找到操作月(201802)的公积金有效数据,作增员。" } }, { "wxyj": { "id": 57, "summary_id": 11, "ent_id": 1, "city_code": 1014, "opt_month": 201805, "com_userid": 2, "param_name": "", "total_fee": 3000.0, "ent_total": 1200.0, "p_total": 1800.0, "shebao_month": 0, "shebao_normal": 0, "fund_month": 201805, "fund_normal": 1, "shebao_status": 0, "fund_status": 31, "gen_time": 1525968000000, "update_time": 1526011210000, "shebao_note": "", "fund_note": "" }, "comUser": { "user_id": 2, "company_id": 1, "user_name": "刘小", "id_card": "123456789012345681", "nation": "汉", "phone": "12345678901", "gender": 0, "bank_card": "", "bank_name": "", "status": 1, "gen_time": 1526011210000 }, "city_name": "深圳", "shebao": { "summary_id": 8, "eid": 53, "wxyj": 1, "radix_type": 2, "radix": 1895.0, "total_fee": 1257.33, "ent_amount": 910.84, "p_amount": 346.49, "charge": 69.0, "card_charge": 0.0, "ent_data": "{\"pension\":443.8,\"medical\":311.85,\"birth\":37.8675,\"lose_job\":12.128,\"injury\":3.79,\"major\":19.305,\"disabled\":82.1}", "p_data": "{\"pension\":253.6,\"medical\":89.1,\"birth\":0.0,\"lose_job\":3.79,\"injury\":0.0,\"major\":0.0,\"disabled\":0.0}", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "采用配置的各项最低基数;未找到操作月(201802)的社保有效数据,作增员。" }, "shebao_ent": { "medical": 311.85, "major": 19.305, "lose_job": 12.128, "pension": 443.8, "birth": 37.8675, "disabled": 82.1, "injury": 3.79 }, "shebao_p": { "medical": 89.1, "major": 0.0, "lose_job": 3.79, "pension": 253.6, "birth": 0.0, "disabled": 0.0, "injury": 0.0 }, "fund": { "summary_id": 11, "eid": 57, "wxyj": 2, "radix_type": 1, "radix": 15000.0, "total_fee": 3000.0, "ent_amount": 1200.0, "p_amount": 1800.0, "charge": 69.0, "card_charge": 0.0, "ent_data": "8.0", "p_data": "12.0", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "未找到操作月(201804)的公积金有效数据,作增员。" } }, { "wxyj": { "id": 58, "summary_id": 11, "ent_id": 1, "city_code": 1014, "opt_month": 201805, "com_userid": 3, "param_name": "", "total_fee": 3600.0, "ent_total": 1800.0, "p_total": 1800.0, "shebao_month": 0, "shebao_normal": 0, "fund_month": 201805, "fund_normal": 1, "shebao_status": 0, "fund_status": 31, "gen_time": 1525968000000, "update_time": 1526011210000, "shebao_note": "", "fund_note": "" }, "comUser": { "user_id": 3, "company_id": 1, "user_name": "邓小姐", "id_card": "123456789012345660", "nation": "汉", "phone": "12345678901", "gender": 0, "bank_card": "", "bank_name": "", "status": 1, "gen_time": 1526011210000 }, "city_name": "深圳", "shebao": { "summary_id": 8, "eid": 53, "wxyj": 1, "radix_type": 2, "radix": 1895.0, "total_fee": 1257.33, "ent_amount": 910.84, "p_amount": 346.49, "charge": 69.0, "card_charge": 0.0, "ent_data": "{\"pension\":443.8,\"medical\":311.85,\"birth\":37.8675,\"lose_job\":12.128,\"injury\":3.79,\"major\":19.305,\"disabled\":82.1}", "p_data": "{\"pension\":253.6,\"medical\":89.1,\"birth\":0.0,\"lose_job\":3.79,\"injury\":0.0,\"major\":0.0,\"disabled\":0.0}", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "采用配置的各项最低基数;未找到操作月(201802)的社保有效数据,作增员。" }, "shebao_ent": { "medical": 311.85, "major": 19.305, "lose_job": 12.128, "pension": 443.8, "birth": 37.8675, "disabled": 82.1, "injury": 3.79 }, "shebao_p": { "medical": 89.1, "major": 0.0, "lose_job": 3.79, "pension": 253.6, "birth": 0.0, "disabled": 0.0, "injury": 0.0 }, "fund": { "summary_id": 11, "eid": 58, "wxyj": 2, "radix_type": 1, "radix": 15000.0, "total_fee": 3600.0, "ent_amount": 1800.0, "p_amount": 1800.0, "charge": 69.0, "card_charge": 0.0, "ent_data": "12.0", "p_data": "12.0", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "未找到操作月(201804)的公积金有效数据,作增员。" } }, { "wxyj": { "id": 59, "summary_id": 11, "ent_id": 1, "city_code": 1014, "opt_month": 201805, "com_userid": 12, "param_name": "", "total_fee": 3000.0, "ent_total": 1200.0, "p_total": 1800.0, "shebao_month": 0, "shebao_normal": 0, "fund_month": 201805, "fund_normal": 1, "shebao_status": 0, "fund_status": 31, "gen_time": 1525968000000, "update_time": 1526011210000, "shebao_note": "", "fund_note": "" }, "comUser": { "user_id": 12, "company_id": 1, "user_name": "刘小", "id_card": "123456789012345610", "nation": "汉", "phone": "12345678901", "gender": 1, "bank_card": "", "bank_name": "", "status": 1, "gen_time": 1526011210000 }, "city_name": "深圳", "shebao": { "summary_id": 8, "eid": 53, "wxyj": 1, "radix_type": 2, "radix": 1895.0, "total_fee": 1257.33, "ent_amount": 910.84, "p_amount": 346.49, "charge": 69.0, "card_charge": 0.0, "ent_data": "{\"pension\":443.8,\"medical\":311.85,\"birth\":37.8675,\"lose_job\":12.128,\"injury\":3.79,\"major\":19.305,\"disabled\":82.1}", "p_data": "{\"pension\":253.6,\"medical\":89.1,\"birth\":0.0,\"lose_job\":3.79,\"injury\":0.0,\"major\":0.0,\"disabled\":0.0}", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "采用配置的各项最低基数;未找到操作月(201802)的社保有效数据,作增员。" }, "shebao_ent": { "medical": 311.85, "major": 19.305, "lose_job": 12.128, "pension": 443.8, "birth": 37.8675, "disabled": 82.1, "injury": 3.79 }, "shebao_p": { "medical": 89.1, "major": 0.0, "lose_job": 3.79, "pension": 253.6, "birth": 0.0, "disabled": 0.0, "injury": 0.0 }, "fund": { "summary_id": 11, "eid": 59, "wxyj": 2, "radix_type": 1, "radix": 15000.0, "total_fee": 3000.0, "ent_amount": 1200.0, "p_amount": 1800.0, "charge": 69.0, "card_charge": 0.0, "ent_data": "8.0", "p_data": "12.0", "pre_cost": 0.0, "gen_time": 1525968000000, "gen_note": "未找到操作月(201804)的公积金有效数据,作增员。" } }], "inc_count": 5, "normal_count": 0, "dec_count": 0 }, "page": { "size": 20, "first": 1, "curr": 1, "last": 1, "total": 5, "start": 0, "finish": 5 } } } --- # 3 计算生成的减员数据 ### 3.1 请求数据 ##### URI /he/shebao/list/task/dec/data POST ##### 参数 | 字段 | 类型 | Length |必须有值| 必传 | 描述 | |:------------------------|:----------|:----------|:------|:------|:-----| |[curr](common.html#page)| int | 值1 ~ 1000| | | 当前页码 | ids | string | | Y | Y | 多个主数据ID以逗号间隔 ### 3.2 响应 数据最外层结构是Map. ##### data 字段 | 字段 | 类型 | 字段名称 | |:----------------------------------|:---------------|:---------------| | datas | List | 减员的列表数据 | [page](common.html#page) | Object | 分页数据
##### data.datas 字段 | 字段 | 类型 | 字段名称 | |:----------------------------------|:---------------|:---------------| | [dec](t/wxyj.html#TWxyjEmployeeDec)| TWxyjEmployeeDec | 减员的列表数据 | [comUser](t/wxyj.html#TCompanyUser)| TCompanyUser | 员工基本数据 | city_name | string | 城市名称 ##### 响应数据示例 暂时没有, 后期有数据时补上. --- # 4 导出计算生成的数据 - 计算结果页面 [导出结果]调用的接口. ### 4.1 请求 ##### URI /he/shebao/export/task_datas POST ##### 请求参数 String summary_ids 主数据标识, 多个以逗号间隔. ### 4.2 响应 ##### 有异常或无数据 返回JSON格式的异常信息数据. ##### 成功 响应文件内容给客户端. --- # 5 设置成存档或代缴 - 企业用户未开通代缴, 些操作只是存档 - 企业用户开通了代缴, 此操作存档加设置成代缴. ### 5.1 请求处理 ##### URI /he/shebao/setting/in_file_proxy POST ##### 参数 String summary_ids // 多个主数据ID以逗号间隔. ### 5.2 响应 返回各个主数据的处理信息, 结构是 List . ##### 状态码 200 处理成功, 有各主数据的处理情况. 600 参数不合要求. ##### 响应数据示例 { "data": ["广州 成功设置为存档", "深圳 设置为代缴"], "msg": "", "code": 200 } ---

6 提交计算生成补缴数据

- 需要提交一个核算月份, 此月份必须是当前的核算月份. - 补缴月份必须满足配置上的月数限制. 当前购买月与补缴月份的月数. ### 6.1 请求处理 ##### URI /he/shebao_plan/setting/task/added POST ##### 参数 Integer city_code, // 城市代码 Integer opt_month, // 核算月份 Integer shebao_month, // 社保补缴月份 Integer fund_month, // 公积金补缴月份 String user_ids // 多个员工的ID以逗号间隔. - 不补缴公积金的话, 公积金月份值传0 (fund_month=0). 社保亦如此. ### 6.2 响应 返回计算成功与否. ##### 状态码 200 处理成功. 500 计算过程中有异常, 需要提示前端. 600 参数不合要求. ##### 响应数据示例 - 未成功 { "data": "补缴月份超出了月数限制", "msg": "", "code": 600 } - 成功 { "data": null, "msg": "", "code": 200 } --- # 7 用户历史补缴列表 返回指定用户的补缴列表 ### 7.1 请求数据 ##### URI shebao_plan/list/added POST ##### 参数 Integer user_id // 员工的标识. ### 7.2 响应数据 ##### data字段 List String opt_month; // 核算月份 String month; // 社保 公积金 的补缴月份 String wxyj; // 社保 公积金 int status; // 状态 0: 失败 1:成功. ##### 状态码 200 处理成功. 600 参数不合要求. ##### 响应数据示例 - 未成功 { "data": "无效的员工标识", "msg": "", "code": 600 } - 成功 { "data": [], "msg": "", "code": 200 } ---