From a7d4a943721e9207ecf933c7abdf9298d11c5850 Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 19 Mar 2024 17:37:37 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9=E7=AB=AF?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=93=E5=9B=9E=E6=89=93=E5=9B=9E=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=202=E3=80=81=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=B5=81=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/xgf/XgfUserController.java | 11 ++++++++++ .../zcloud/flow/xgf/GuFen/GuFenCharge.java | 1 + .../zcloud/flow/xgf/GuFen/GuFenSupervise.java | 1 + .../flow/xgf/GuFen/GuFenWeiTuoCharge.java | 1 + .../flow/xgf/GuFen/GuFenWeiTuoSupervise.java | 1 + .../java/com/zcloud/flow/xgf/InitCompany.java | 6 +++--- .../zcloud/flow/xgf/JiTuan/JiTuanCharge.java | 1 + .../flow/xgf/JiTuan/JiTuanSupervise.java | 1 + .../flow/xgf/JiTuan/JiTuanWeiTuoCharge.java | 1 + .../xgf/JiTuan/JiTuanWeiTuoSupervise.java | 1 + .../zcloud/flow/xgf/YiBan/YiBanCharge.java | 1 + .../zcloud/flow/xgf/YiBan/YiBanSupervise.java | 13 +++++++++++- .../com/zcloud/flow/xgf/util/XgfFlowDto.java | 2 ++ .../mapper/datasource/xgf/XgfUserMapper.java | 2 ++ .../zcloud/service/xgf/XgfUserService.java | 2 ++ .../service/xgf/impl/XgfUserServiceImpl.java | 9 ++++++++ .../mybatis/datasource/xgf/XgfUserMapper.xml | 21 +++++++++++++++++++ 17 files changed, 71 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zcloud/controller/xgf/XgfUserController.java b/src/main/java/com/zcloud/controller/xgf/XgfUserController.java index 195a70f7..aad1eeb9 100644 --- a/src/main/java/com/zcloud/controller/xgf/XgfUserController.java +++ b/src/main/java/com/zcloud/controller/xgf/XgfUserController.java @@ -143,6 +143,17 @@ public class XgfUserController extends BaseController { return response; } + @RequestMapping(value = "/getWorkTask") + @ResponseBody + public Object getWorkTask() throws Exception{ + PageData request = this.getPageData(); + PageData response = new PageData(); + response.put("result", "success"); + response.put("list",xgfUserService.getWorkTask(request)); + return response; + } + + /** * 人员指定审核 */ 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 721fa25d..2d709960 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java @@ -70,6 +70,7 @@ public class GuFenCharge extends NodeSwitchComponent { flows.put("APPOINT_ZERO_TIME", DateUtil.getTime()); flows.put("APPOINT_ZERO_STATUS", info.getSTATUS()); flows.put("APPOINT_ZERO_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); 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 e15f55ac..75dd4590 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java @@ -61,6 +61,7 @@ public class GuFenSupervise extends NodeComponent { flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); flows.put("APPOINT_ONE_STATUS", info.getSTATUS()); flows.put("APPOINT_ONE_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java index dc85a451..bb6d448a 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java @@ -67,6 +67,7 @@ public class GuFenWeiTuoCharge extends NodeComponent { flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); flows.put("APPOINT_ONE_STATUS", info.getSTATUS()); flows.put("APPOINT_ONE_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 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 e54ab341..f821b45a 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java @@ -66,6 +66,7 @@ public class GuFenWeiTuoSupervise extends NodeComponent { flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); flows.put("APPOINT_TWO_STATUS", info.getSTATUS()); flows.put("APPOINT_TWO_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); diff --git a/src/main/java/com/zcloud/flow/xgf/InitCompany.java b/src/main/java/com/zcloud/flow/xgf/InitCompany.java index c83d7cec..ae5f74c3 100644 --- a/src/main/java/com/zcloud/flow/xgf/InitCompany.java +++ b/src/main/java/com/zcloud/flow/xgf/InitCompany.java @@ -15,13 +15,13 @@ public class InitCompany extends NodeSwitchComponent { // 0-一般单位处理流程 // 1-集团单位处理流程 // 2-股份端单位处理流程 - if ("0".equals(info.getFLOWS_STEP())) { + if ("0".equals(info.getFLOWS_TYPE())) { return "YiBan"; } - if ("1".equals(info.getFLOWS_STEP())){ + if ("1".equals(info.getFLOWS_TYPE())){ return "JiTuan"; } - if ("2".equals(info.getFLOWS_STEP())){ + if ("2".equals(info.getFLOWS_TYPE())){ return "GuFen"; } throw new RuntimeException("系统异常,请联系管理员"); 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 8cde2fe4..d3678417 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java @@ -73,6 +73,7 @@ public class JiTuanCharge extends NodeSwitchComponent { flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); flows.put("APPOINT_ONE_STATUS", info.getSTATUS()); flows.put("APPOINT_ONE_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); 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 7f44c158..52c4bf35 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java @@ -60,6 +60,7 @@ public class JiTuanSupervise extends NodeComponent { flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); flows.put("APPOINT_TWO_STATUS", info.getSTATUS()); flows.put("APPOINT_TWO_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java index 3c164f3a..4bc659ca 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java @@ -65,6 +65,7 @@ public class JiTuanWeiTuoCharge extends NodeComponent { flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); flows.put("APPOINT_TWO_STATUS", info.getSTATUS()); flows.put("APPOINT_TWO_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 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 88d86582..3bb34a63 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java @@ -65,6 +65,7 @@ public class JiTuanWeiTuoSupervise extends NodeComponent { flows.put("APPOINT_THREE_TIME", DateUtil.getTime()); flows.put("APPOINT_THREE_STATUS", info.getSTATUS()); flows.put("APPOINT_THREE_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); 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 695956a7..a0da9f72 100644 --- a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java @@ -60,6 +60,7 @@ public class YiBanCharge extends NodeComponent { flows.put("APPOINT_ZERO_TIME", DateUtil.getTime()); flows.put("APPOINT_ZERO_STATUS", info.getSTATUS()); flows.put("APPOINT_ZERO_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); 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 c23d1d10..01685f8b 100644 --- a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java @@ -33,8 +33,18 @@ public class YiBanSupervise extends NodeComponent { @Override public void process() throws Exception { System.out.println("YiBanSupervise节点"); - XgfFlowDto info = this.getRequestData(); + + // 如果指针没有数据,赋值后自动结束 + if (StringUtils.isBlank(info.getIterator())) { + info.setIterator("1"); + return; + } + // 如果不是当前流程,进入下一流程判断 + if (!"1".equals(info.getIterator())) { + return; + } + PageData condition = new PageData(); condition.put("FLOWS_ID", info.getFLOWS_ID()); @@ -62,6 +72,7 @@ public class YiBanSupervise extends NodeComponent { flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); flows.put("APPOINT_ONE_STATUS", info.getSTATUS()); flows.put("APPOINT_ONE_OPINION", info.getOPINION()); + flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 xgfUserService.repulse(flows); diff --git a/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java b/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java index 3d59a2d8..35c70859 100644 --- a/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java +++ b/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java @@ -14,6 +14,8 @@ public class XgfFlowDto { // 步骤编码 public String FLOWS_STEP; + public String FLOWS_TYPE; + // 审批结果0-不通过,1-通过 private String STATUS; diff --git a/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java b/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java index 87f11474..dca91ad8 100644 --- a/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java @@ -72,4 +72,6 @@ public interface XgfUserMapper { List findRecordList(PageData condition); List appointlistPage(Page page); + + List getWorkTask(PageData condition); } diff --git a/src/main/java/com/zcloud/service/xgf/XgfUserService.java b/src/main/java/com/zcloud/service/xgf/XgfUserService.java index f331b7b0..9e948b61 100644 --- a/src/main/java/com/zcloud/service/xgf/XgfUserService.java +++ b/src/main/java/com/zcloud/service/xgf/XgfUserService.java @@ -42,4 +42,6 @@ public interface XgfUserService { void repulse(PageData flows) throws Exception; void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception; + + List getWorkTask(PageData condition) throws Exception; } 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 2c205e05..4307a85d 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -959,6 +959,7 @@ public class XgfUserServiceImpl implements XgfUserService { key.putAll(entity); key.put("USER_ID", condition.get("XGF_USER_ID")); key.put("STATUS", "1"); + key.put("OPINION",flows.get("OPINION")); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); @@ -990,6 +991,7 @@ public class XgfUserServiceImpl implements XgfUserService { XgfFlowDto info = new XgfFlowDto(); info.setFLOWS_STEP(flows.getString("FLOWS_STEP")); info.setIterator(flows.getString("FLOWS_STEP")); + info.setFLOWS_TYPE(flows.getString("FLOWS_TYPE")); info.setFLOWS_ID(x); info.setSTATUS(request.getString("STATUS")); info.setOPINION(request.getString("OPINION")); @@ -1007,6 +1009,8 @@ public class XgfUserServiceImpl implements XgfUserService { // 进行数据审核 LiteflowResponse response = flowExecutor.execute2Resp("chain1", info); if (!response.isSuccess()){ + Exception e = response.getCause(); + e.printStackTrace(); System.out.println(response.getMessage()); throw new RuntimeException("系统异常"); } @@ -1014,6 +1018,11 @@ public class XgfUserServiceImpl implements XgfUserService { } + @Override + public List getWorkTask(PageData condition) throws Exception { + return xgfUserMapper.getWorkTask(condition); + } + private String getType(String corpInfoId) { // 集团单位id // (河港机械 jtdw002 1e6dbbe16004402f8d2c0e52afd9a676), diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml index 1040b2c6..8a4169db 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml @@ -360,5 +360,26 @@ and a.CHECK_STEP = #{pd.CHECK_STEP} +