diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java index 7b0f3ae3..04a244cd 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.GuFen; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeSwitchComponent; import com.zcloud.entity.PageData; @@ -9,13 +10,19 @@ import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; import com.zcloud.flow.xgf.util.XgfFlowDto; +import com.zcloud.util.HttpClientService; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; +import java.util.Map; @LiteflowComponent("GuFenCharge") public class GuFenCharge extends NodeSwitchComponent { + @Value("${preventionxgf.api.url}") + private String url; + @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -66,7 +73,11 @@ public class GuFenCharge extends NodeSwitchComponent { condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData userInfo = xgfUserDetailsMapper.findById(condition); +// PageData userInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData userInfo = JSONObject.parseObject(userInfoString, PageData.class); // 如果不是当前流程,进入下一流程判断 if (!"0".equals(info.getIterator())) { @@ -99,7 +110,8 @@ public class GuFenCharge extends NodeSwitchComponent { // created by liu jun 2024-02-04 如果有委托书则保存委托书 if (StringUtils.isNotBlank(info.getATTORNEY())) { userInfo.put("ATTORNEY", info.getAPPOINT_ANNEX()); - xgfUserDetailsMapper.edit(userInfo); +// xgfUserDetailsMapper.edit(userInfo); + HttpClientService.doPost(url + "openApi/updateXgfUserDetails", userInfo); } xgfUserMapper.edit(entity); // 将指针清空 diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java index 243958aa..e11b7d3b 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.GuFen; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeComponent; import com.zcloud.entity.PageData; @@ -11,17 +12,22 @@ import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; import com.zcloud.flow.xgf.util.XgfFlowDto; +import com.zcloud.util.HttpClientService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; +import java.util.Map; @LiteflowComponent("GuFenSupervise") @SuppressWarnings("all") public class GuFenSupervise extends NodeComponent { + @Value("${preventionxgf.api.url}") + private String url; + @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -99,7 +105,12 @@ public class GuFenSupervise extends NodeComponent { // created by liu jun 2024-06-26 工匠学院对接 condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData entityInfo = xgfUserDetailsMapper.findById(condition); + // PageData entityInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData entityInfo = JSONObject.parseObject(userInfoString, PageData.class); + UserDTO userDTO = UserDTO.builder() .userName(entity.getString("USERNAME")) .realName(entity.getString("NAME")) diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java index 18c62222..e0560726 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.GuFen; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeComponent; import com.zcloud.entity.PageData; @@ -11,6 +12,7 @@ import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper; import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; import com.zcloud.util.Jurisdiction; import com.zcloud.flow.xgf.util.XgfFlowDto; import org.apache.commons.lang3.StringUtils; @@ -19,11 +21,15 @@ import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; +import java.util.Map; @LiteflowComponent("GuFenWeiTuoSupervise") @SuppressWarnings("all") public class GuFenWeiTuoSupervise extends NodeComponent { + @Value("${preventionxgf.api.url}") + private String url; + @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -103,7 +109,12 @@ public class GuFenWeiTuoSupervise extends NodeComponent { // created by liu jun 2024-06-26 工匠学院对接 condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData entityInfo = xgfUserDetailsMapper.findById(condition); + // PageData entityInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData entityInfo = JSONObject.parseObject(userInfoString, PageData.class); + UserDTO userDTO = UserDTO.builder() .userName(entity.getString("USERNAME")) .realName(entity.getString("NAME")) diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java index 1b88bcae..281721d2 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.JiTuan; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeSwitchComponent; import com.zcloud.entity.PageData; @@ -9,13 +10,18 @@ import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper; import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; +import java.util.Map; @LiteflowComponent("JiTuanCharge") public class JiTuanCharge extends NodeSwitchComponent { + @Value("${preventionxgf.api.url}") + private String url; @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -67,7 +73,12 @@ public class JiTuanCharge extends NodeSwitchComponent { condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData userInfo = xgfUserDetailsMapper.findById(condition); +// PageData userInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); +// PageData userInfo = (PageData) result.get("userInfo"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData userInfo = JSONObject.parseObject(userInfoString, PageData.class); // 如果不是当前流程,进入下一流程判断 if (!"1".equals(info.getIterator())) { @@ -99,7 +110,8 @@ public class JiTuanCharge extends NodeSwitchComponent { // created by liu jun 2024-02-04 如果有委托书则保存委托书 if (StringUtils.isNotBlank(info.getATTORNEY())) { userInfo.put("ATTORNEY", info.getATTORNEY()); - xgfUserDetailsMapper.edit(userInfo); + // xgfUserDetailsMapper.edit(userInfo); + HttpClientService.doPost(url + "openApi/updateXgfUserDetails", userInfo); } xgfUserMapper.edit(entity); // 将指针清空 diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java index a6de4cf4..1eae060b 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.JiTuan; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeComponent; import com.zcloud.entity.PageData; @@ -12,16 +13,21 @@ import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper; import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; +import java.util.Map; @LiteflowComponent("JiTuanSupervise") public class JiTuanSupervise extends NodeComponent { + @Value("${preventionxgf.api.url}") + private String url; + @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -102,7 +108,12 @@ public class JiTuanSupervise extends NodeComponent { // created by liu jun 2024-06-26 工匠学院对接 condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData entityInfo = xgfUserDetailsMapper.findById(condition); + // PageData entityInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData entityInfo = JSONObject.parseObject(userInfoString, PageData.class); + UserDTO userDTO = UserDTO.builder() .userName(entity.getString("USERNAME")) .realName(entity.getString("NAME")) diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java index 759c5727..7807822d 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.JiTuan; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeComponent; import com.zcloud.entity.PageData; @@ -12,6 +13,7 @@ import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper; import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; import com.zcloud.util.Jurisdiction; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; @@ -19,10 +21,14 @@ import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; +import java.util.Map; @LiteflowComponent("JiTuanWeiTuoSupervise") public class JiTuanWeiTuoSupervise extends NodeComponent { + @Value("${preventionxgf.api.url}") + private String url; + @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -102,7 +108,11 @@ public class JiTuanWeiTuoSupervise extends NodeComponent { // created by liu jun 2024-06-26 工匠学院对接 condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData entityInfo = xgfUserDetailsMapper.findById(condition); +// PageData entityInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData entityInfo = JSONObject.parseObject(userInfoString, PageData.class); UserDTO userDTO = UserDTO.builder() .userName(entity.getString("USERNAME")) .realName(entity.getString("NAME")) diff --git a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java index 4617bbd3..73dfee84 100644 --- a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java @@ -1,5 +1,7 @@ package com.zcloud.flow.xgf.YiBan; +import cn.hutool.http.HttpRequest; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeComponent; import com.zcloud.entity.PageData; @@ -9,13 +11,19 @@ import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.flow.xgf.util.XgfFlowDto; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; +import java.util.Map; @LiteflowComponent("YiBanCharge") public class YiBanCharge extends NodeComponent { + @Value("${preventionxgf.api.url}") + private String url; + @Resource private XgfUserMapper xgfUserMapper; @@ -84,9 +92,18 @@ public class YiBanCharge extends NodeComponent { if (StringUtils.isNotBlank(info.getAPPOINT_ANNEX())) { condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData userInfo = xgfUserDetailsMapper.findById(condition); + /** + * 2024-10-12 huang yu xuan + * 移除企业端 xgf_user_details表,调用xgf接口获取详情数据 + */ + // PageData userInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData userInfo = JSONObject.parseObject(userInfoString, PageData.class); userInfo.put("COMMITMENT_LETTER", info.getAPPOINT_ANNEX()); - xgfUserDetailsMapper.edit(userInfo); + // xgfUserDetailsMapper.edit(userInfo); + HttpClientService.doPost(url + "openApi/updateXgfUserDetails", userInfo); } xgfUserMapper.edit(user); // 将指针清空 diff --git a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java index 7b7b7c70..cf0d1ece 100644 --- a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java @@ -1,5 +1,6 @@ package com.zcloud.flow.xgf.YiBan; +import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.core.NodeComponent; import com.zcloud.entity.PageData; @@ -12,6 +13,7 @@ import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.flow.xgf.util.XgfFlowDto; import com.zcloud.service.xgf.XgfUserService; import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; import com.zcloud.util.Jurisdiction; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; @@ -19,11 +21,14 @@ import org.springframework.beans.factory.annotation.Value; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; +import java.util.Map; @LiteflowComponent("YiBanSupervise") @SuppressWarnings("all") public class YiBanSupervise extends NodeComponent { + @Value("${preventionxgf.api.url}") + private String url; @Resource private XgfFlowsMapper xgfFlowsMapper; @@ -134,7 +139,13 @@ public class YiBanSupervise extends NodeComponent { // created by liu jun 2024-06-26 工匠学院对接 condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData entityInfo = xgfUserDetailsMapper.findById(condition); + +// PageData entityInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData entityInfo = JSONObject.parseObject(userInfoString, PageData.class); + UserDTO userDTO = UserDTO.builder() .userName(entity.getString("USERNAME")) .realName(entity.getString("NAME")) diff --git a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java index 3180bb9d..fb6c45cc 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -1,5 +1,7 @@ package com.zcloud.service.xgf.impl; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSONObject; import com.yomahub.liteflow.core.FlowExecutor; import com.yomahub.liteflow.flow.LiteflowResponse; @@ -64,12 +66,17 @@ public class XgfUserServiceImpl implements XgfUserService { @Override public void saveDetail(PageData pd) throws Exception { - xgfUserDetailsMapper.save(pd); +// xgfUserDetailsMapper.save(pd); + HttpClientService.doPost(prevention_xgf_url + "openApi/saveXgfUserDetails", pd); } @Override public List list(Page page) throws Exception { - return xgfUserDetailsMapper.listPage(page); +// return xgfUserDetailsMapper.listPage(page); + HttpResponse res = HttpRequest.post(prevention_xgf_url + "openApi/saveXgfUserDetails").form("page", page).execute(); + JSONObject json = JSONObject.parseObject(res.body()); + List userDetailsList = (List) json.get("userDetailsList"); + return userDetailsList; } @Override @@ -131,7 +138,8 @@ public class XgfUserServiceImpl implements XgfUserService { entity = new PageData(); entity.putAll(x); xgfUserMapper.save(x); - xgfUserDetailsMapper.save(x); + //xgfUserDetailsMapper.save(x); + HttpClientService.doPost(prevention_xgf_url + "openApi/saveXgfUserDetails", x); } else { x.put("XGF_USER_ID", x.get("USER_ID")); x.put("XGF_USER_DETAILS_ID", x.get("USER_ID")); @@ -188,7 +196,8 @@ public class XgfUserServiceImpl implements XgfUserService { // 2024-02-26 created by liu jun 清空上传文件信息 x.put("ATTORNEY", ""); x.put("COMMITMENT_LETTER", ""); - xgfUserDetailsMapper.edit(x); + //xgfUserDetailsMapper.edit(x); + HttpClientService.doPost(prevention_xgf_url + "openApi/updateXgfUserDetails",x); } /* 2、保存相关方人员流程审批信息 */ @@ -620,9 +629,15 @@ public class XgfUserServiceImpl implements XgfUserService { if (StringUtils.isNotBlank(info.getString("APPOINT_ANNEX"))) { condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData userInfo = xgfUserDetailsMapper.findById(condition); +// PageData userInfo = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData userInfo = JSONObject.parseObject(userInfoString, PageData.class); + userInfo.put("COMMITMENT_LETTER", info.getString("APPOINT_ANNEX")); - xgfUserDetailsMapper.edit(userInfo); +// xgfUserDetailsMapper.edit(userInfo); + HttpClientService.doPost(prevention_xgf_url + "openApi/updateXgfUserDetails", userInfo); } xgfUserMapper.edit(user); return "0"; @@ -1042,9 +1057,15 @@ public class XgfUserServiceImpl implements XgfUserService { if (clearWeiTuo(flowEntity, info.getBACK_STEP())) { condition.clear(); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); - PageData infoEntity = xgfUserDetailsMapper.findById(condition); +// PageData infoEntity = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData infoEntity = JSONObject.parseObject(userInfoString, PageData.class); infoEntity.put("ATTORNEY", null); - xgfUserDetailsMapper.edit(infoEntity); +// xgfUserDetailsMapper.edit(infoEntity); + HttpClientService.doPost(prevention_xgf_url + "openApi/updateXgfUserDetails", condition); + } } } @@ -1178,12 +1199,17 @@ public class XgfUserServiceImpl implements XgfUserService { public void syncPhoto(PageData request) throws Exception { PageData condition = new PageData(); condition.put("XGF_USER_DETAILS_ID",request.get("USER_ID")); - PageData detailEntity = xgfUserDetailsMapper.findById(condition); +// PageData detailEntity = xgfUserDetailsMapper.findById(condition); + Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/selectXgfUserDetails", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + String userInfoString = JSONObject.toJSONString(result.get("userInfo")); + PageData detailEntity = JSONObject.parseObject(userInfoString, PageData.class); if (detailEntity == null || detailEntity.size() == 0){ throw new RuntimeException("未找到该用户详细信息"); } detailEntity.put("PHOTO",request.get("PHOTO")); - xgfUserDetailsMapper.edit(detailEntity); +// xgfUserDetailsMapper.edit(detailEntity); + HttpClientService.doPost(prevention_xgf_url + "openApi/updateXgfUserDetails", condition); } private String getType(String corpInfoId) { @@ -1224,9 +1250,11 @@ public class XgfUserServiceImpl implements XgfUserService { // details syncInfo.put("XGF_USER_DETAILS_ID",localData.getString("XGF_USER_ID")); - PageData localDetailsData = xgfUserDetailsMapper.findById(syncInfo); +// PageData localDetailsData = xgfUserDetailsMapper.findById(syncInfo); + Map localDetailsData = HttpClientService.doPost(prevention_xgf_url + "openApi/selectXgfUserDetails", syncInfo); if (localDetailsData != null && !localDetailsData.isEmpty()){ - xgfUserDetailsMapper.edit(syncInfo); +// xgfUserDetailsMapper.edit(syncInfo); + HttpClientService.doPost(prevention_xgf_url + "openApi/updateXgfUserDetails", syncInfo); } } } diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml index e6affd5f..a0e15ca7 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml @@ -4,23 +4,16 @@ - XGF_USER + XGF_USER_STATUS f.XGF_USER_ID, - f.USERNAME, - f.NAME, f.VALID_FLAG, - f.BELONG_TO_CORP, - f.BELONG_TO_CORP_NAME, - f.IS_DELETE, f.CREATE_TIME, - f.CORPINFO_ID, f.STATUS, f.OPERATOR_TIME, - f.ISFLOW, f.STUDY_STATUS, f.CHECK_STATUS, f.CHECK_STEP, @@ -30,17 +23,10 @@ XGF_USER_ID, - USERNAME, - NAME, VALID_FLAG, - BELONG_TO_CORP, - BELONG_TO_CORP_NAME, - IS_DELETE, CREATE_TIME, - CORPINFO_ID, STATUS, OPERATOR_TIME, - ISFLOW, STUDY_STATUS, CHECK_STATUS, CHECK_STEP, @@ -50,17 +36,10 @@ #{XGF_USER_ID}, - #{USERNAME}, - #{NAME}, #{VALID_FLAG}, - #{BELONG_TO_CORP}, - #{BELONG_TO_CORP_NAME}, - #{IS_DELETE}, #{CREATE_TIME}, - #{CORPINFO_ID}, #{STATUS}, #{OPERATOR_TIME}, - #{ISFLOW}, #{STUDY_STATUS}, #{CHECK_STATUS}, #{CHECK_STEP}, @@ -93,17 +72,10 @@ update set - USERNAME = #{USERNAME}, - NAME = #{NAME}, VALID_FLAG = #{VALID_FLAG}, - BELONG_TO_CORP = #{BELONG_TO_CORP}, - BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME}, - IS_DELETE = #{IS_DELETE}, CREATE_TIME = #{CREATE_TIME}, - CORPINFO_ID = #{CORPINFO_ID}, STATUS = #{STATUS}, OPERATOR_TIME = #{OPERATOR_TIME}, - ISFLOW = #{ISFLOW}, STUDY_STATUS = #{STUDY_STATUS}, CHECK_STATUS = #{CHECK_STATUS}, CHECK_STEP = #{CHECK_STEP}, @@ -211,18 +183,19 @@