Commit ad672332 authored by hongguangwu's avatar hongguangwu

MVP1.7.7-项目

parent 4d6ec441
......@@ -67,13 +67,15 @@ public class SocialFriendConfig {
private static final String VERSION = "version";
/**
* @param : listVo 同一类(户、增减)的前100个
* @param : vo 第一个,存账密等信息
* @param : type 1社保增 2社保减 3医保增 4医保减
* @Description: 推送任务接口
* @Author: hgw
* @Date: 2024-12-9 16:54:31
* @return: java.lang.String
**/
public String pushFriendByInfo(RestTemplate restTemplate, SociaFriendYgsAddVo vo, int type, String thisTime
public String pushFriendByInfo(RestTemplate restTemplate, SociaFriendYgsAddVo vo, List<SociaFriendYgsAddVo> listVo, int type, String thisTime
, List<TSocialFriendBackLog> backLogList) {
String addId = "";
String appAddUrl = urlPre;
......@@ -137,7 +139,7 @@ public class SocialFriendConfig {
}
json.put("ywblzhlb", ywblzhlbArr);
// type 1社保增 2社保减 3医保增 4医保减
setEmpInfo(json, vo, type);
setEmpInfo(json, listVo, type);
HttpEntity<String> formEntity = new HttpEntity<>(json.toString(), headers);
// 推的json
......@@ -153,7 +155,11 @@ public class SocialFriendConfig {
if (Common.isNotNull(dataResultList)) {
// 拉取的数据日志
backLog = new TSocialFriendBackLog();
backLog.setSocialId(vo.getSocialId());
StringBuilder ids = new StringBuilder();
for (SociaFriendYgsAddVo tempVo : listVo) {
ids = ids.append(tempVo).append( ",");
}
backLog.setSocialId(ids.toString());
backLog.setType(type);
backLog.setLogInfo(dataResultList);
backLog.setCreateTime(LocalDateTime.now());
......@@ -242,9 +248,9 @@ public class SocialFriendConfig {
* @Date: 2024/12/11 10:24
* @return: void
**/
private void setEmpInfo(JSONObject json, SociaFriendYgsAddVo vo, int type) {
private void setEmpInfo(JSONObject json, List<SociaFriendYgsAddVo> listVo, int type) {
if (type == 1 || type == 3) {
setEmpInfoAdd(json, vo, type);
setEmpInfoAdd(json, listVo, type);
} else {
setEmpInfoReduce(json, vo, type);
}
......@@ -257,10 +263,14 @@ public class SocialFriendConfig {
* @Date: 2024/12/10 18:05
* @return: void
**/
private void setEmpInfoAdd(JSONObject json, SociaFriendYgsAddVo vo, int type) {
private void setEmpInfoAdd(JSONObject json, List<SociaFriendYgsAddVo> listVo, int type) {
// 参保人员名单 数组
JSONArray cbrymdArr = new JSONArray();
JSONObject cbrymdOne = new JSONObject();
JSONObject cbrymdOne;
// 2025-3-6 15:44:32 单个改造为批量
for (SociaFriendYgsAddVo vo : listVo) {
cbrymdOne = new JSONObject();
// 姓名
cbrymdOne.put("xm", vo.getEmpName());
// 证件类型
......@@ -393,6 +403,7 @@ public class SocialFriendConfig {
jyxx.put("ldhtjzrq", vo.getContractEnd());
cbrymdOne.put("jyxx", jyxx);
cbrymdArr.add(cbrymdOne);
}
// 人员名单
String buyType = "cbrymd";
json.put(buyType, cbrymdArr);
......
......@@ -190,6 +190,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
logList.add(socialLog);
}
}
List<SociaFriendYgsAddVo> listVo,
if (!backLogList.isEmpty()) {
tSocialFriendBackLogService.saveBatch(backLogList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment