1、自测流程混乱bug修复

2、页面按钮样式调整
limingyu-20240401-app登录曹实业判断修改
liujun 2024-03-20 10:34:33 +08:00
parent 1b065cf7d7
commit 794b5df30b
14 changed files with 267 additions and 161 deletions

View File

@ -1,15 +1,14 @@
package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
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.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@ -30,18 +29,14 @@ public class GuFenCharge extends NodeSwitchComponent {
private XgfUserDetailsMapper xgfUserDetailsMapper;
@Override
public String processSwitch() throws Exception {
System.out.println("GuFenCharge" + "节点");
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("0");
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
flows.put("APPOINT_ZERO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
@ -50,8 +45,20 @@ public class GuFenCharge extends NodeSwitchComponent {
flows.put("APPOINT_ZERO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 0);
xgfFlowsMapper.edit(flows);
return "";
return false;
}
return super.isAccess();
}
@Override
public String processSwitch() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
@ -59,7 +66,8 @@ public class GuFenCharge extends NodeSwitchComponent {
// 如果不是当前流程,进入下一流程判断
if (!"1".equals(info.getIterator())) {
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
// 根据是否有委托书判断是否走委托流程
if (entity.get("ATTORNEY") != null && StringUtils.isNotBlank(entity.getString("ATTORNEY"))) {
return "WeiTuo";
}
return "JiTuanSupervise";
@ -70,7 +78,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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
@ -100,9 +108,9 @@ public class GuFenCharge extends NodeSwitchComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
return "WeiTuo";
if (entity.get("ATTORNEY") != null && StringUtils.isNotBlank(entity.getString("ATTORNEY"))) {
return "GuFenWeiTuo";
}
return "JiTuanSupervise";
return "GuFenSupervise";
}
}

View File

@ -3,16 +3,17 @@ package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
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 org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("GuFenSupervise")
@SuppressWarnings("all")
public class GuFenSupervise extends NodeComponent {
@Resource
@ -24,9 +25,31 @@ public class GuFenSupervise extends NodeComponent {
@Resource
private XgfUserMapper xgfUserMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("2");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return "1".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println("GuFenSupervise" + "节点");
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
@ -39,23 +62,6 @@ public class GuFenSupervise extends NodeComponent {
throw new RuntimeException("系统异常");
}
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("2");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"2".equals(info.getIterator())) {
return;
}
flows.put("APPOINT_ONE_CORP_ID", "1");
flows.put("APPOINT_ONE_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());

View File

@ -3,13 +3,13 @@ package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@ -29,10 +29,32 @@ public class GuFenWeiTuoCharge extends NodeComponent {
@Resource
private CorpInfoMapper corpInfoMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return "1".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println("GuFenWeiTuoCharge" + "节点");
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
@ -67,7 +89,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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
@ -80,7 +102,7 @@ public class GuFenWeiTuoCharge extends NodeComponent {
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("LIMIT_END_TIME",info.getLIMIT_END_TIME());
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
xgfUserMapper.edit(entity);
// 清空指针
info.setIterator("");

View File

@ -3,18 +3,19 @@ package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("GuFenWeiTuoSupervise")
@SuppressWarnings("all")
public class GuFenWeiTuoSupervise extends NodeComponent {
@Resource
@ -30,18 +31,13 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
private CorpInfoMapper corpInfoMapper;
@Override
public void process() throws Exception {
System.out.println("GuFenWeiTuoSupervise" + "节点");
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("2");
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
@ -50,12 +46,19 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"3".equals(info.getIterator())) {
return;
return false;
}
return "2".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
@ -85,6 +88,7 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
info.setIterator("");
}
}

View File

@ -2,11 +2,8 @@ package com.zcloud.flow.xgf;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import java.util.Map;
@LiteflowComponent("InitCompany")
public class InitCompany extends NodeSwitchComponent {
@Override

View File

@ -1,18 +1,14 @@
package com.zcloud.flow.xgf.JiTuan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.core.NodeIfComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
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.Jurisdiction;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@ -33,18 +29,14 @@ public class JiTuanCharge extends NodeSwitchComponent {
private XgfUserDetailsMapper xgfUserDetailsMapper;
@Override
@SuppressWarnings("all")
public String processSwitch() throws Exception {
System.out.println("JiTuanCharge"+"节点");
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
@ -53,9 +45,23 @@ public class JiTuanCharge extends NodeSwitchComponent {
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return "";
return false;
}
return super.isAccess();
}
@Override
@SuppressWarnings("all")
public String processSwitch() throws Exception {
System.out.println(getName()+ "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
@ -103,7 +109,7 @@ public class JiTuanCharge extends NodeSwitchComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
if (entity.get("ATTORNEY") != null && StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
return "WeiTuo";
}
return "JiTuanSupervise";

View File

@ -24,9 +24,34 @@ public class JiTuanSupervise extends NodeComponent {
@Resource
private XgfUserMapper xgfUserMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("2");
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_TWO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return false;
}
// 如果不是当前流程,进入下一流程判断
return "2".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println("JiTuanSupervise"+"节点");
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
@ -37,30 +62,12 @@ public class JiTuanSupervise extends NodeComponent {
if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常");
}
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("2");
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_TWO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"2".equals(info.getIterator())) {
return;
}
flows.put("APPOINT_TWO_CORP_ID", "1");
flows.put("APPOINT_TWO_CORP_NAME", "秦港股份有限公司");
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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);

View File

@ -30,17 +30,14 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
private CorpInfoMapper corpInfoMapper;
@Override
public void process() throws Exception {
System.out.println("JiTuanWeiTuoCharge"+"节点");
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("2");
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
@ -49,13 +46,22 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"2".equals(info.getIterator())) {
return;
return false;
}
return "2".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);
@ -65,7 +71,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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
@ -78,7 +84,7 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("LIMIT_END_TIME",info.getLIMIT_END_TIME());
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
xgfUserMapper.edit(entity);
// 清空指针
info.setIterator("");

View File

@ -30,17 +30,15 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
private CorpInfoMapper corpInfoMapper;
@Override
public void process() throws Exception {
System.out.println("JiTuanWeiTuoSupervise"+"节点");
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("3");
flows.put("APPOINT_THREE_CORP_TYPE", "0");
flows.put("APPOINT_THREE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
@ -49,12 +47,20 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
flows.put("APPOINT_THREE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 3);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"3".equals(info.getIterator())) {
return;
return false;
}
return "3".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
@ -65,7 +71,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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);

View File

@ -3,19 +3,15 @@ package com.zcloud.flow.xgf.YiBan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.flow.xgf.util.XgfUtil;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
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 {
@ -29,27 +25,39 @@ public class YiBanCharge extends NodeComponent {
@Resource
private XgfUserDetailsMapper xgfUserDetailsMapper;
@Value("${preventionxgf.api.url}")
private String prevention_xgf_url;
@Resource
private XgfUserService xgfUserService;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("0");
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
flows.put("APPOINT_ZERO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ZERO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ZERO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 0);
xgfFlowsMapper.edit(flows);
return false;
}
// 如果不是当前流程,进入下一流程判断
return "0".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println("YiBanCharge节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("0");
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"0".equals(info.getIterator())) {
return;
}
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);

View File

@ -3,10 +3,10 @@ package com.zcloud.flow.xgf.YiBan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
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.Jurisdiction;
@ -31,13 +31,48 @@ public class YiBanSupervise extends NodeComponent {
private CorpInfoMapper corpInfoMapper;
@Override
public void process() throws Exception {
System.out.println("YiBanSupervise节点");
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return "1".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName());
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
@ -45,11 +80,6 @@ public class YiBanSupervise extends NodeComponent {
return;
}
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);

View File

@ -200,7 +200,7 @@ public class XgfUserServiceImpl implements XgfUserService {
flow.put("CREATOR_TIME", DateUtil.getTime());
flow.put("VALID_FLAG", "1");
flow.put("ISDELETE", "0");
flow.put("END_FLAG","0");
flow.put("END_FLAG", "0");
flow.put("FOREIGN_KEY", x.getString("XGF_USER_ID"));
flowMapper.save(flow);
/* 保存审批流程明细信息 */
@ -302,7 +302,7 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.put("APPOINT_DEPARTMENT_NAME", request.getString("APPOINT_DEPARTMENT_NAME"));
condition.put("APPOINT_USER_ID", request.getString("APPOINT_USER_ID"));
condition.put("APPOINT_USER_NAME", request.getString("APPOINT_USER_NAME"));
condition.put("LIMIT_END_TIME",request.get("LIMIT_END_TIME"));
condition.put("LIMIT_END_TIME", request.get("LIMIT_END_TIME"));
if (request.get("APPOINT_ANNEX") != null) {
condition.put("APPOINT_ANNEX", request.getString("APPOINT_ANNEX"));
}
@ -338,10 +338,10 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.put("FOREIGN_KEY", request.getString("XGF_USER_ID"));
condition.put("TYPE", "1");
List<PageData> list = flowMapper.getList(condition);
for(PageData x : list){
for (PageData x : list) {
condition.clear();
condition.put("FLOW_ID", x.getString("FLOW_ID"));
x.put("flow",flowDetailMapper.getList(condition));
x.put("flow", flowDetailMapper.getList(condition));
}
return list;
}
@ -357,7 +357,7 @@ public class XgfUserServiceImpl implements XgfUserService {
PageData zero = new PageData();
int index = Integer.parseInt(entity.getString("FLOWS_STEP"));
if (index >= 0){
if (index >= 0) {
zero.put("INDEX", "0");
zero.put("APPOINT_CORP_ID", entity.getString("APPOINT_ZERO_CORP_ID"));
zero.put("APPOINT_CORP_NAME", entity.getString("APPOINT_ZERO_CORP_NAME"));
@ -472,7 +472,7 @@ public class XgfUserServiceImpl implements XgfUserService {
@Transactional
public void approvePlus(PageData request, MultipartFile[] chengNuoShu) throws Exception {
if (chengNuoShu != null && chengNuoShu.length > 0) {
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu),Jurisdiction.getCORPINFO_ID()));
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu), Jurisdiction.getCORPINFO_ID()));
}
this.approve(request);
}
@ -573,7 +573,7 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData user = xgfUserMapper.findById(condition);
user.put("CHECK_STEP", 1);
user.put("LIMIT_END_TIME",info.get("LIMIT_END_TIME"));
user.put("LIMIT_END_TIME", info.get("LIMIT_END_TIME"));
// created by liu jun 2024-02-26 如果有委托书则保存委托书
if (StringUtils.isNotBlank(info.getString("APPOINT_ANNEX"))) {
condition.clear();
@ -681,7 +681,7 @@ public class XgfUserServiceImpl implements XgfUserService {
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("LIMIT_END_TIME",info.get("LIMIT_END_TIME"));
entity.put("LIMIT_END_TIME", info.get("LIMIT_END_TIME"));
xgfUserMapper.edit(entity);
flows.put("APPOINT_THREE_CORP_ID", info.getString("APPOINT_CORP_ID"));
@ -879,7 +879,7 @@ public class XgfUserServiceImpl implements XgfUserService {
}
}
private void clearInfo(PageData flow){
private void clearInfo(PageData flow) {
flow.put("APPOINT_ONE_USER_ID", "");
flow.put("APPOINT_TWO_USER_ID", "");
flow.put("APPOINT_THREE_USER_ID", "");
@ -888,6 +888,7 @@ public class XgfUserServiceImpl implements XgfUserService {
flow.put("APPOINT_SIX_USER_ID", "");
flow.put("APPOINT_SEVEN_USER_ID", "");
}
public void saveLog(PageData info, String status, String endFlag) throws Exception {
/* 保存审批记录 */
PageData condition = new PageData();
@ -941,10 +942,10 @@ public class XgfUserServiceImpl implements XgfUserService {
@Override
public void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception {
PageData _info = new PageData();
_info.put("OPINION",info.getOPINION());
_info.put("APPOINT_ANNEX",info.getAPPOINT_ANNEX());
_info.put("FLOWS_ID",info.getFLOWS_ID());
this.saveLog(_info,status,endFlag);
_info.put("OPINION", info.getOPINION());
_info.put("APPOINT_ANNEX", info.getAPPOINT_ANNEX());
_info.put("FLOWS_ID", info.getFLOWS_ID());
this.saveLog(_info, status, endFlag);
}
@Override
@ -959,7 +960,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"));
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("请求失败");
@ -972,7 +973,7 @@ public class XgfUserServiceImpl implements XgfUserService {
@Override
public void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception {
if (chengNuoShu != null && chengNuoShu.length > 0) {
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu),Jurisdiction.getCORPINFO_ID()));
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu), Jurisdiction.getCORPINFO_ID()));
}
List<PageData> _list = Warden.getList(request.getString("list"));
@ -995,11 +996,11 @@ public class XgfUserServiceImpl implements XgfUserService {
info.setFLOWS_ID(x);
info.setSTATUS(request.getString("STATUS"));
info.setOPINION(request.getString("OPINION"));
info.setAPPOINT_DEPARTMENT_ID( request.getString("APPOINT_DEPARTMENT_ID"));
info.setAPPOINT_DEPARTMENT_ID(request.getString("APPOINT_DEPARTMENT_ID"));
info.setAPPOINT_DEPARTMENT_NAME(request.getString("APPOINT_DEPARTMENT_NAME"));
info.setAPPOINT_USER_ID(request.getString("APPOINT_USER_ID"));
info.setAPPOINT_USER_NAME(request.getString("APPOINT_USER_NAME"));
if (request.get("LIMIT_END_TIME") != null){
if (request.get("LIMIT_END_TIME") != null) {
info.setLIMIT_END_TIME(request.getString("LIMIT_END_TIME"));
}
if (request.get("APPOINT_ANNEX") != null) {
@ -1008,11 +1009,13 @@ public class XgfUserServiceImpl implements XgfUserService {
// 进行数据审核
LiteflowResponse response = flowExecutor.execute2Resp("chain1", info);
if (!response.isSuccess()){
if (!response.isSuccess()) {
Exception e = response.getCause();
e.printStackTrace();
System.out.println(response.getMessage());
throw new RuntimeException("系统异常");
} else {
System.out.println("流程信息:" + response.getExecuteStepStrWithTime());
}
}
@ -1034,7 +1037,7 @@ public class XgfUserServiceImpl implements XgfUserService {
return "1";
}
// created bu liu jun - 港务局要求,可以直接指定集团单位
if ("1".equals(corpInfoId)){
if ("1".equals(corpInfoId)) {
return "2";
}
return "0";

View File

@ -128,3 +128,6 @@ mq.gwj.file.topic=czks_dockingPicture
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
#河北秦安文件服务器前缀
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
liteflow.rule-source=flow.xml
liteflow.print-execution-log=false

View File

@ -12,7 +12,7 @@
).id("JiTuan"),
SWITCH(GuFenCharge).to(
GuFenSupervise,
THEN(GuFenWeiTuoCharge,GuFenWeiTuoSupervise).id("WeiTuo")
THEN(GuFenWeiTuoCharge,GuFenWeiTuoSupervise).id("GuFenWeiTuo")
).DEFAULT(DefaultNode).id("GuFen")
);
</chain>