相关方人员信息审批流程新增,股份端直接审批功能。
parent
362fbc72ea
commit
cf538631ff
7
pom.xml
7
pom.xml
|
@ -476,6 +476,13 @@
|
|||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- liteflow -->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>2.11.4.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<!-- <finalName>qa-prevention-gwj</finalName>
|
||||
|
|
|
@ -74,6 +74,20 @@ public class XgfUserController extends BaseController {
|
|||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员信息审核
|
||||
*/
|
||||
@RequestMapping(value = "/approveMax")
|
||||
@ResponseBody
|
||||
public Object approveMax(@RequestParam(value="chengNuoShu",required=false) MultipartFile[] chengNuoShu) throws Exception {
|
||||
PageData request = this.getPageData();
|
||||
xgfUserService.approveMax(request,chengNuoShu);
|
||||
PageData response = new PageData();
|
||||
response.put("result", "success");
|
||||
response.put("data", request);
|
||||
return response;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/regulatoryUserList")
|
||||
@ResponseBody
|
||||
public Object regulatoryUserList() throws Exception{
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("GuFenCharge")
|
||||
public class GuFenCharge extends NodeSwitchComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||
|
||||
@Override
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("GuFenCharge" + "节点");
|
||||
|
||||
|
||||
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 "";
|
||||
}
|
||||
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
|
||||
// 如果不是当前流程,进入下一流程判断
|
||||
if (!"1".equals(info.getIterator())) {
|
||||
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
|
||||
return "WeiTuo";
|
||||
}
|
||||
return "JiTuanSupervise";
|
||||
}
|
||||
|
||||
flows.put("APPOINT_ZERO_CORP_ID", "1");
|
||||
flows.put("APPOINT_ZERO_CORP_NAME", "秦港股份有限公司");
|
||||
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ZERO_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_ZERO_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
return "";
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
entity.put("CHECK_STATUS", 1);
|
||||
entity.put("VALID_FLAG", "2");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
// created by liu jun 2024-03-01 港务局开会后,将入场告知培训的有效期设置权限给发包单位
|
||||
if (StringUtils.isNotBlank(info.getLIMIT_END_TIME())) {
|
||||
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
|
||||
}
|
||||
// created by liu jun 2024-02-04 如果有委托书则保存委托书
|
||||
if (StringUtils.isNotBlank(info.getATTORNEY())) {
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||
PageData userInfo = xgfUserDetailsMapper.findById(condition);
|
||||
userInfo.put("ATTORNEY", info.getAPPOINT_ANNEX());
|
||||
xgfUserDetailsMapper.edit(userInfo);
|
||||
}
|
||||
xgfUserMapper.edit(entity);
|
||||
// 将指针清空
|
||||
info.setIterator("");
|
||||
}
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
|
||||
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
|
||||
return "WeiTuo";
|
||||
}
|
||||
return "JiTuanSupervise";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("GuFenSupervise")
|
||||
public class GuFenSupervise extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
System.out.println("GuFenSupervise" + "节点");
|
||||
|
||||
|
||||
XgfFlowDto info = this.getRequestData();
|
||||
PageData condition = new PageData();
|
||||
|
||||
condition.put("FLOWS_ID", info.getFLOWS_ID());
|
||||
PageData flows = xgfFlowsMapper.findById(condition);
|
||||
|
||||
if (flows == null || flows.size() == 0) {
|
||||
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());
|
||||
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
entity.put("VALID_FLAG", "1");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
entity.put("STATUS", "2");
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("GuFenWeiTuoCharge")
|
||||
public class GuFenWeiTuoCharge extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
|
||||
System.out.println("GuFenWeiTuoCharge" + "节点");
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
// 如果不是当前流程,进入下一流程判断
|
||||
if (!"1".equals(info.getIterator())) {
|
||||
return;
|
||||
}
|
||||
|
||||
condition.clear();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData corpEntity = corpInfoMapper.findById(condition);
|
||||
|
||||
flows.put("APPOINT_ONE_CORP_ID", Jurisdiction.getCORPINFO_ID());
|
||||
flows.put("APPOINT_ONE_CORP_NAME", corpEntity.getString("CORP_NAME"));
|
||||
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
|
||||
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
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());
|
||||
xgfUserMapper.edit(entity);
|
||||
// 清空指针
|
||||
info.setIterator("");
|
||||
}
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("GuFenWeiTuoSupervise")
|
||||
public class GuFenWeiTuoSupervise extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
|
||||
System.out.println("GuFenWeiTuoSupervise" + "节点");
|
||||
|
||||
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("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 (!"3".equals(info.getIterator())) {
|
||||
return;
|
||||
}
|
||||
|
||||
condition.clear();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData corpEntity = corpInfoMapper.findById(condition);
|
||||
|
||||
flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID());
|
||||
flows.put("APPOINT_TWO_CORP_NAME", corpEntity.getString("CORP_NAME"));
|
||||
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_TWO_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
entity.put("VALID_FLAG", "1");
|
||||
entity.put("STATUS", "2");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
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
|
||||
public String processSwitch() throws Exception {
|
||||
XgfFlowDto info = this.getRequestData();
|
||||
// 0-一般单位处理流程
|
||||
// 1-集团单位处理流程
|
||||
// 2-股份端单位处理流程
|
||||
if ("0".equals(info.getFLOWS_STEP())) {
|
||||
return "YiBan";
|
||||
}
|
||||
if ("1".equals(info.getFLOWS_STEP())){
|
||||
return "JiTuan";
|
||||
}
|
||||
if ("2".equals(info.getFLOWS_STEP())){
|
||||
return "GuFen";
|
||||
}
|
||||
throw new RuntimeException("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
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;
|
||||
|
||||
@LiteflowComponent("JiTuanCharge")
|
||||
public class JiTuanCharge extends NodeSwitchComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public String processSwitch() throws Exception {
|
||||
System.out.println("JiTuanCharge"+"节点");
|
||||
|
||||
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 "";
|
||||
}
|
||||
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
|
||||
// 如果不是当前流程,进入下一流程判断
|
||||
if (!"1".equals(info.getIterator())) {
|
||||
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
|
||||
return "WeiTuo";
|
||||
}
|
||||
return "JiTuanSupervise";
|
||||
}
|
||||
|
||||
flows.put("APPOINT_ONE_CORP_ID", "1");
|
||||
flows.put("APPOINT_ONE_CORP_NAME", "秦港股份有限公司");
|
||||
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
return "";
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
entity.put("CHECK_STATUS", 1);
|
||||
entity.put("VALID_FLAG", "2");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
// created by liu jun 2024-03-01 港务局开会后,将入场告知培训的有效期设置权限给发包单位
|
||||
if (StringUtils.isNotBlank(info.getLIMIT_END_TIME())) {
|
||||
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
|
||||
}
|
||||
// created by liu jun 2024-02-04 如果有委托书则保存委托书
|
||||
if (StringUtils.isNotBlank(info.getATTORNEY())) {
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||
PageData userInfo = xgfUserDetailsMapper.findById(condition);
|
||||
userInfo.put("ATTORNEY", info.getAPPOINT_ANNEX());
|
||||
xgfUserDetailsMapper.edit(userInfo);
|
||||
}
|
||||
xgfUserMapper.edit(entity);
|
||||
// 将指针清空
|
||||
info.setIterator("");
|
||||
}
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
|
||||
if (entity.get("ATTORNEY") == null || StringUtils.isNotBlank(entity.getString("ATTORNEY"))){
|
||||
return "WeiTuo";
|
||||
}
|
||||
return "JiTuanSupervise";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
package com.zcloud.flow.xgf.JiTuan;
|
||||
|
||||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("JiTuanSupervise")
|
||||
public class JiTuanSupervise extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
System.out.println("JiTuanSupervise"+"节点");
|
||||
|
||||
XgfFlowDto info = this.getRequestData();
|
||||
PageData condition = new PageData();
|
||||
|
||||
condition.put("XGF_USER_ID", info.getFLOWS_ID());
|
||||
PageData flows = xgfFlowsMapper.findById(condition);
|
||||
|
||||
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());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
entity.put("VALID_FLAG", "1");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
entity.put("STATUS", "2");
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package com.zcloud.flow.xgf.JiTuan;
|
||||
|
||||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("JiTuanWeiTuoCharge")
|
||||
public class JiTuanWeiTuoCharge extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
System.out.println("JiTuanWeiTuoCharge"+"节点");
|
||||
|
||||
XgfFlowDto info = this.getRequestData();
|
||||
PageData condition = new PageData();
|
||||
|
||||
condition.put("XGF_USER_ID", info.getFLOWS_ID());
|
||||
PageData flows = xgfFlowsMapper.findById(condition);
|
||||
|
||||
// 如果指针没有数据,赋值后自动结束
|
||||
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;
|
||||
}
|
||||
|
||||
condition.clear();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData corpEntity = corpInfoMapper.findById(condition);
|
||||
|
||||
flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID());
|
||||
flows.put("APPOINT_TWO_CORP_NAME", corpEntity.getString("CORP_NAME"));
|
||||
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_TWO_OPINION", info.getOPINION());
|
||||
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
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());
|
||||
xgfUserMapper.edit(entity);
|
||||
// 清空指针
|
||||
info.setIterator("");
|
||||
}
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
package com.zcloud.flow.xgf.JiTuan;
|
||||
|
||||
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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("JiTuanWeiTuoSupervise")
|
||||
public class JiTuanWeiTuoSupervise extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
System.out.println("JiTuanWeiTuoSupervise"+"节点");
|
||||
|
||||
XgfFlowDto info = this.getRequestData();
|
||||
PageData condition = new PageData();
|
||||
|
||||
condition.put("XGF_USER_ID", info.getFLOWS_ID());
|
||||
PageData flows = xgfFlowsMapper.findById(condition);
|
||||
|
||||
// 如果指针没有数据,赋值后自动结束
|
||||
if (StringUtils.isBlank(info.getIterator())) {
|
||||
info.setIterator("3");
|
||||
flows.put("APPOINT_THREE_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_THREE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
|
||||
flows.put("APPOINT_THREE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
|
||||
flows.put("APPOINT_THREE_USER_ID", info.getAPPOINT_USER_ID());
|
||||
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;
|
||||
}
|
||||
|
||||
condition.clear();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData corpEntity = corpInfoMapper.findById(condition);
|
||||
|
||||
flows.put("APPOINT_THREE_CORP_ID", Jurisdiction.getCORPINFO_ID());
|
||||
flows.put("APPOINT_THREE_CORP_NAME", corpEntity.getString("CORP_NAME"));
|
||||
flows.put("APPOINT_THREE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_THREE_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_THREE_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
entity.put("VALID_FLAG", "1");
|
||||
entity.put("STATUS", "2");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
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.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 {
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||
|
||||
@Value("${preventionxgf.api.url}")
|
||||
private String prevention_xgf_url;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
|
||||
@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);
|
||||
|
||||
if (flows == null || flows.size() == 0) {
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
|
||||
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ZERO_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_ZERO_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
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.getLIMIT_END_TIME());
|
||||
// created by liu jun 2024-02-26 如果有委托书则保存委托书
|
||||
if (StringUtils.isNotBlank(info.getAPPOINT_ANNEX())) {
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||
PageData userInfo = xgfUserDetailsMapper.findById(condition);
|
||||
userInfo.put("COMMITMENT_LETTER", info.getAPPOINT_ANNEX());
|
||||
xgfUserDetailsMapper.edit(userInfo);
|
||||
}
|
||||
xgfUserMapper.edit(user);
|
||||
// 将指针清空
|
||||
info.setIterator("");
|
||||
}
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
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.service.xgf.XgfUserService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@LiteflowComponent("YiBanSupervise")
|
||||
@SuppressWarnings("all")
|
||||
public class YiBanSupervise extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private XgfFlowsMapper xgfFlowsMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
System.out.println("YiBanSupervise节点");
|
||||
|
||||
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);
|
||||
|
||||
// 如果指针没有数据,赋值后自动结束
|
||||
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;
|
||||
}
|
||||
|
||||
flows.put("APPOINT_ONE_CORP_ID", Jurisdiction.getCORPINFO_ID());
|
||||
flows.put("APPOINT_ONE_CORP_NAME", corpEntity.getString("CORP_NAME"));
|
||||
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
|
||||
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
|
||||
if ("0".equals(info.getSTATUS())) {
|
||||
// 打回至相关方端
|
||||
xgfUserService.repulse(flows);
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||
} else {
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
entity.put("VALID_FLAG", "1");
|
||||
entity.put("STATUS", "2");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
// 保存操作记录
|
||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.zcloud.flow.xgf.util;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
@LiteflowComponent("DefaultNode")
|
||||
public class DefaultNode extends NodeComponent {
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
System.out.println("do nothing");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.zcloud.flow.xgf.util;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class XgfFlowDto {
|
||||
|
||||
private String iterator;
|
||||
|
||||
// 流程id
|
||||
private String FLOWS_ID;
|
||||
|
||||
// 步骤编码
|
||||
public String FLOWS_STEP;
|
||||
|
||||
// 审批结果0-不通过,1-通过
|
||||
private String STATUS;
|
||||
|
||||
// 审批意见
|
||||
private String OPINION;
|
||||
|
||||
// 审批部门
|
||||
private String APPOINT_DEPARTMENT_ID;
|
||||
|
||||
// 审批部门名称
|
||||
private String APPOINT_DEPARTMENT_NAME;
|
||||
|
||||
// 审批人
|
||||
private String APPOINT_USER_ID;
|
||||
|
||||
// 审批人名称
|
||||
private String APPOINT_USER_NAME;
|
||||
|
||||
//培训有效期
|
||||
private String LIMIT_END_TIME;
|
||||
|
||||
// 承诺书
|
||||
private String APPOINT_ANNEX;
|
||||
|
||||
//委托书
|
||||
private String ATTORNEY;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.zcloud.flow.xgf.util;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
public class XgfUtil {
|
||||
|
||||
public static void clearInfo(PageData flow){
|
||||
flow.put("APPOINT_ONE_USER_ID", "");
|
||||
flow.put("APPOINT_TWO_USER_ID", "");
|
||||
flow.put("APPOINT_THREE_USER_ID", "");
|
||||
flow.put("APPOINT_FOUR_USER_ID", "");
|
||||
flow.put("APPOINT_FIVE_USER_ID", "");
|
||||
flow.put("APPOINT_SIX_USER_ID", "");
|
||||
flow.put("APPOINT_SEVEN_USER_ID", "");
|
||||
}
|
||||
}
|
|
@ -2,6 +2,8 @@ package com.zcloud.service.xgf;
|
|||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||
import org.springframework.dao.EmptyResultDataAccessException;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -33,4 +35,11 @@ public interface XgfUserService {
|
|||
Object getFlowInfo(PageData request);
|
||||
|
||||
void approvePlus(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
||||
|
||||
void saveLog(PageData info, String status, String endFlag) throws Exception;
|
||||
void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception;
|
||||
|
||||
void repulse(PageData flows) throws Exception;
|
||||
|
||||
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.zcloud.service.xgf.impl;
|
||||
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||
import com.zcloud.entity.Page;
|
||||
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.*;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
|
@ -14,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -47,6 +51,9 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
@Value("${preventionxgf.api.url}")
|
||||
private String prevention_xgf_url;
|
||||
|
||||
@Resource
|
||||
private FlowExecutor flowExecutor;
|
||||
|
||||
@Override
|
||||
public void save(PageData pd) throws Exception {
|
||||
xgfUserMapper.save(pd);
|
||||
|
@ -881,7 +888,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
flow.put("APPOINT_SIX_USER_ID", "");
|
||||
flow.put("APPOINT_SEVEN_USER_ID", "");
|
||||
}
|
||||
private void saveLog(PageData info, String status, String endFlag) throws Exception {
|
||||
public void saveLog(PageData info, String status, String endFlag) throws Exception {
|
||||
/* 保存审批记录 */
|
||||
PageData condition = new PageData();
|
||||
condition.clear();
|
||||
|
@ -931,6 +938,82 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
flowMapper.edit(flow);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void repulse(PageData flows) throws Exception {
|
||||
PageData condition = new PageData();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
entity.put("STATUS", "0");
|
||||
entity.put("VALID_FLAG", "0");
|
||||
entity.put("CHECK_STATUS", "-2");
|
||||
PageData key = new PageData();
|
||||
key.putAll(entity);
|
||||
key.put("USER_ID", condition.get("XGF_USER_ID"));
|
||||
key.put("STATUS", "1");
|
||||
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key);
|
||||
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
xgfUserMapper.edit(entity);
|
||||
this.clearInfo(flows);
|
||||
xgfFlowsMapper.edit(flows);
|
||||
}
|
||||
|
||||
@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()));
|
||||
}
|
||||
|
||||
List<PageData> _list = Warden.getList(request.getString("list"));
|
||||
if (_list == null || _list.size() == 0) {
|
||||
throw new RuntimeException("请求数据异常");
|
||||
}
|
||||
|
||||
List<String> list = _list.stream().map(x -> x.getString("XGF_USER_ID")).collect(Collectors.toList());
|
||||
PageData condition = new PageData();
|
||||
for (String x : list) {
|
||||
condition.put("FLOWS_ID", x);
|
||||
PageData flows = xgfFlowsMapper.findById(condition);
|
||||
if (flows == null || flows.size() == 0) {
|
||||
throw new RuntimeException("未找到该用户详细信息");
|
||||
}
|
||||
XgfFlowDto info = new XgfFlowDto();
|
||||
info.setFLOWS_STEP(flows.getString("FLOWS_STEP"));
|
||||
info.setIterator(flows.getString("FLOWS_STEP"));
|
||||
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_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){
|
||||
info.setLIMIT_END_TIME(request.getString("LIMIT_END_TIME"));
|
||||
}
|
||||
if (request.get("APPOINT_ANNEX") != null) {
|
||||
info.setAPPOINT_ANNEX(request.getString("APPOINT_ANNEX"));
|
||||
}
|
||||
|
||||
// 进行数据审核
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", info);
|
||||
if (!response.isSuccess()){
|
||||
System.out.println(response.getMessage());
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String getType(String corpInfoId) {
|
||||
// 集团单位id
|
||||
// (河港机械 jtdw002 1e6dbbe16004402f8d2c0e52afd9a676),
|
||||
|
@ -940,8 +1023,12 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
String jituandanwei = "1e6dbbe16004402f8d2c0e52afd9a676,3a854eefa7894e06aaa1a2611bca80f6,020578a4c1f04bc692ee25145c2efbe5,90966974de3c4b83aca6f8fd6432d5c2";
|
||||
if (jituandanwei.contains(corpInfoId)) {
|
||||
return "1";
|
||||
} else {
|
||||
return "0";
|
||||
}
|
||||
// created bu liu jun - 港务局要求,可以直接指定集团单位
|
||||
if ("1".equals(corpInfoId)){
|
||||
return "2";
|
||||
}
|
||||
return "0";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow id="one">
|
||||
<chain name="chain1">
|
||||
SWITCH(InitCompany).to(
|
||||
THEN(YiBanCharge,YiBanSupervise).id("YiBan"),
|
||||
THEN(
|
||||
YiBanCharge,
|
||||
SWITCH(JiTuanCharge).to(
|
||||
JiTuanSupervise,
|
||||
THEN(JiTuanWeiTuoCharge,JiTuanWeiTuoSupervise).id("WeiTuo")
|
||||
).DEFAULT(DefaultNode)
|
||||
).id("JiTuan"),
|
||||
SWITCH(GuFenCharge).to(
|
||||
GuFenSupervise,
|
||||
THEN(GuFenWeiTuoCharge,GuFenWeiTuoSupervise).id("WeiTuo")
|
||||
).DEFAULT(DefaultNode).id("GuFen")
|
||||
);
|
||||
</chain>
|
||||
</flow>
|
Loading…
Reference in New Issue