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} +