1、bug修复-系统异常后事务未回滚

2、指定人员打回
liujun0703-新项目开发^2^2
liujun 2024-06-11 17:42:13 +08:00
parent 813fd36a88
commit 4d59fba200
13 changed files with 501 additions and 414 deletions

View File

@ -65,13 +65,14 @@ public class XgfUserController extends BaseController {
*/ */
@RequestMapping(value = "/approvePlus") @RequestMapping(value = "/approvePlus")
@ResponseBody @ResponseBody
public Object approvePlus(@RequestParam(value="chengNuoShu",required=false) MultipartFile[] chengNuoShu) throws Exception { public Object approvePlus(@RequestParam(value = "chengNuoShu", required = false) MultipartFile[] chengNuoShu) throws Exception {
PageData request = this.getPageData();
xgfUserService.approvePlus(request,chengNuoShu);
PageData response = new PageData(); PageData response = new PageData();
response.put("result", "success"); response.put("result", "success");
PageData request = this.getPageData();
xgfUserService.approvePlus(request, chengNuoShu);
response.put("data", request); response.put("data", request);
return response; return response;
} }
/** /**
@ -79,18 +80,26 @@ public class XgfUserController extends BaseController {
*/ */
@RequestMapping(value = "/approveMax") @RequestMapping(value = "/approveMax")
@ResponseBody @ResponseBody
public Object approveMax(@RequestParam(value="chengNuoShu",required=false) MultipartFile[] chengNuoShu) throws Exception { public Object approveMax(@RequestParam(value = "chengNuoShu", required = false) MultipartFile[] chengNuoShu) throws Exception {
PageData request = this.getPageData(); PageData request = this.getPageData();
xgfUserService.approveMax(request,chengNuoShu);
PageData response = new PageData(); PageData response = new PageData();
response.put("result", "success"); response.put("result", "success");
response.put("code","0");
response.put("data", request); response.put("data", request);
try {
xgfUserService.approveMax(request, chengNuoShu);
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("errorMessage", e.getMessage());
return response;
}
return response; return response;
} }
@RequestMapping(value = "/regulatoryUserList") @RequestMapping(value = "/regulatoryUserList")
@ResponseBody @ResponseBody
public Object regulatoryUserList() throws Exception{ public Object regulatoryUserList() throws Exception {
PageData request = this.getPageData(); PageData request = this.getPageData();
PageData response = new PageData(); PageData response = new PageData();
response.put("result", "success"); response.put("result", "success");
@ -132,7 +141,7 @@ public class XgfUserController extends BaseController {
@RequestMapping(value = "/getAppointApproveList") @RequestMapping(value = "/getAppointApproveList")
@ResponseBody @ResponseBody
public Object getAppointApproveList(Page page) throws Exception{ public Object getAppointApproveList(Page page) throws Exception {
PageData request = this.getPageData(); PageData request = this.getPageData();
request.put("USER_ID", Jurisdiction.getUSER_ID()); request.put("USER_ID", Jurisdiction.getUSER_ID());
page.setPd(request); page.setPd(request);
@ -145,11 +154,11 @@ public class XgfUserController extends BaseController {
@RequestMapping(value = "/getWorkTask") @RequestMapping(value = "/getWorkTask")
@ResponseBody @ResponseBody
public Object getWorkTask() throws Exception{ public Object getWorkTask() throws Exception {
PageData request = this.getPageData(); PageData request = this.getPageData();
PageData response = new PageData(); PageData response = new PageData();
response.put("result", "success"); response.put("result", "success");
response.put("list",xgfUserService.getWorkTask(request)); response.put("list", xgfUserService.getWorkTask(request));
return response; return response;
} }
@ -159,7 +168,7 @@ public class XgfUserController extends BaseController {
*/ */
@RequestMapping(value = "/appointApprove") @RequestMapping(value = "/appointApprove")
@ResponseBody @ResponseBody
public Object appointApprove() throws Exception{ public Object appointApprove() throws Exception {
PageData request = this.getPageData(); PageData request = this.getPageData();
PageData response = new PageData(); PageData response = new PageData();
response.put("result", "success"); response.put("result", "success");
@ -172,7 +181,7 @@ public class XgfUserController extends BaseController {
*/ */
@RequestMapping(value = "/getApproveInfo") @RequestMapping(value = "/getApproveInfo")
@ResponseBody @ResponseBody
public Object getApproveInfo() throws Exception{ public Object getApproveInfo() throws Exception {
PageData request = this.getPageData(); PageData request = this.getPageData();
PageData response = new PageData(); PageData response = new PageData();
response.put("list", xgfUserService.getApproveInfo(request)); response.put("list", xgfUserService.getApproveInfo(request));

View File

@ -54,70 +54,79 @@ public class GuFenCharge extends NodeSwitchComponent {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); PageData entity = xgfUserMapper.findById(condition);
condition.clear(); condition.clear();
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
PageData userInfo = xgfUserDetailsMapper.findById(condition); PageData userInfo = xgfUserDetailsMapper.findById(condition);
// 如果不是当前流程,进入下一流程判断 // 如果不是当前流程,进入下一流程判断
if (!"0".equals(info.getIterator())) { if (!"0".equals(info.getIterator())) {
// 根据是否有委托书判断是否走委托流程 // 根据是否有委托书判断是否走委托流程
if (userInfo.get("ATTORNEY") != null && StringUtils.isNotBlank(userInfo.getString("ATTORNEY"))) { if (userInfo.get("ATTORNEY") != null && StringUtils.isNotBlank(userInfo.getString("ATTORNEY"))) {
return "GuFenWeiTuo";
}
return "GuFenSupervise";
}
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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
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())) {
userInfo.put("ATTORNEY", info.getAPPOINT_ANNEX());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(entity);
// 将指针清空
info.setIterator("");
}
if (StringUtils.isNotBlank(info.getATTORNEY())) {
xgfUserService.saveLog(info, "1", "0");
return "GuFenWeiTuo"; return "GuFenWeiTuo";
} else {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} }
return "GuFenSupervise"; return "GuFenSupervise";
} } catch (Exception e) {
e.printStackTrace();
flows.put("APPOINT_ZERO_CORP_ID", "1"); info.setErrorMsg(e.getMessage());
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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
return ""; 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())) {
userInfo.put("ATTORNEY", info.getAPPOINT_ANNEX());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(entity);
// 将指针清空
info.setIterator("");
} }
if (StringUtils.isNotBlank(info.getATTORNEY())) {
xgfUserService.saveLog(info, "1", "0");
return "GuFenWeiTuo";
}else {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
return "GuFenSupervise";
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -50,49 +50,55 @@ public class GuFenSupervise extends NodeComponent {
@Override @Override
public void process() throws Exception { public void process() throws Exception {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) { if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常"); throw new RuntimeException("系统异常");
} }
flows.put("APPOINT_ONE_CORP_ID", "1"); flows.put("APPOINT_ONE_CORP_ID", "1");
flows.put("APPOINT_ONE_CORP_NAME", "秦港股份有限公司"); flows.put("APPOINT_ONE_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
flows.put("APPOINT_ONE_STATUS", info.getSTATUS()); flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
flows.put("APPOINT_ONE_OPINION", info.getOPINION()); flows.put("APPOINT_ONE_OPINION", info.getOPINION());
flows.put("OPINION",info.getOPINION()); flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) { if ("0".equals(info.getSTATUS())) {
// 打回至相关方端 // 打回至相关方端
xgfUserService.repulse(flows,info); xgfUserService.repulse(flows, info);
// 保存操作记录 // 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0"); xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else { } else {
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2); entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1"); entity.put("VALID_FLAG", "1");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("STATUS", "2"); entity.put("STATUS", "2");
xgfUserMapper.edit(entity); xgfUserMapper.edit(entity);
// 保存操作记录 // 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1"); xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
} catch (Exception e) {
info.setErrorMsg(e.getMessage());
e.printStackTrace();
} }
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS())) { if ("0".equals(info.getSTATUS())) {
return true; return true;
} }

View File

@ -53,69 +53,72 @@ public class GuFenWeiTuoCharge extends NodeComponent {
@Override @Override
public void process() throws Exception { public void process() throws Exception {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束 // 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) { if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1"); info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0"); flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID()); flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME()); 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_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME()); flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1); flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
return; return;
} }
// 如果不是当前流程,进入下一流程判断 // 如果不是当前流程,进入下一流程判断
if (!"1".equals(info.getIterator())) { if (!"1".equals(info.getIterator())) {
return; 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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows,info);
} else {
xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData entity = xgfUserMapper.findById(condition); PageData corpEntity = corpInfoMapper.findById(condition);
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2"); flows.put("APPOINT_ONE_CORP_ID", Jurisdiction.getCORPINFO_ID());
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); flows.put("APPOINT_ONE_CORP_NAME", corpEntity.getString("CORP_NAME"));
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME()); flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
xgfUserMapper.edit(entity); flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
// 清空指针 flows.put("APPOINT_ONE_OPINION", info.getOPINION());
info.setIterator(""); flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
} 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");
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
} }
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -56,46 +56,54 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
public void process() throws Exception { public void process() throws Exception {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows,info);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData entity = xgfUserMapper.findById(condition); PageData corpEntity = corpInfoMapper.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);
// 保存操作记录 flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID());
xgfUserService.saveLog(info, info.getSTATUS(), "1"); flows.put("APPOINT_TWO_CORP_NAME", corpEntity.getString("CORP_NAME"));
info.setIterator(""); 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, info);
// 保存操作记录
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");
info.setIterator("");
}
} catch (Exception e) {
info.setErrorMsg(e.getMessage());
e.printStackTrace();
} }
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -52,72 +52,81 @@ public class JiTuanCharge extends NodeSwitchComponent {
@Override @Override
@SuppressWarnings("all") @SuppressWarnings("all")
public String processSwitch() throws Exception { public String processSwitch() throws Exception {
System.out.println(getName()+ "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); PageData entity = xgfUserMapper.findById(condition);
condition.clear(); condition.clear();
condition.put("XGF_USER_DETAILS_ID",flows.getString("FLOWS_ID")); condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
PageData userInfo = xgfUserDetailsMapper.findById(condition); PageData userInfo = xgfUserDetailsMapper.findById(condition);
// 如果不是当前流程,进入下一流程判断 // 如果不是当前流程,进入下一流程判断
if (!"1".equals(info.getIterator())) { if (!"1".equals(info.getIterator())) {
if (userInfo.get("ATTORNEY") != null && StringUtils.isNotBlank(userInfo.getString("ATTORNEY"))){ if (userInfo.get("ATTORNEY") != null && StringUtils.isNotBlank(userInfo.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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
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())) {
userInfo.put("ATTORNEY", info.getATTORNEY());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(entity);
// 将指针清空
info.setIterator("");
}
// 保存操作记录
if (StringUtils.isNotBlank(info.getATTORNEY())) {
xgfUserService.saveLog(info, "1", "0");
return "WeiTuo"; return "WeiTuo";
} else {
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} }
return "JiTuanSupervise"; return "JiTuanSupervise";
} } catch (Exception e) {
e.printStackTrace();
flows.put("APPOINT_ONE_CORP_ID", "1"); info.setErrorMsg(e.getMessage());
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());
flows.put("OPINION",info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows,info);
return ""; 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())) {
userInfo.put("ATTORNEY", info.getATTORNEY());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(entity);
// 将指针清空
info.setIterator("");
} }
// 保存操作记录
if (StringUtils.isNotBlank(info.getATTORNEY())){
xgfUserService.saveLog(info, "1", "0");
return "WeiTuo";
}else {
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
return "JiTuanSupervise";
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -54,45 +54,53 @@ public class JiTuanSupervise extends NodeComponent {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) { if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常"); throw new RuntimeException("系统异常");
} }
flows.put("APPOINT_TWO_CORP_ID", "1"); flows.put("APPOINT_TWO_CORP_ID", "1");
flows.put("APPOINT_TWO_CORP_NAME", "秦港股份有限公司"); flows.put("APPOINT_TWO_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
flows.put("APPOINT_TWO_STATUS", info.getSTATUS()); flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
flows.put("APPOINT_TWO_OPINION", info.getOPINION()); flows.put("APPOINT_TWO_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION()); flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) { if ("0".equals(info.getSTATUS())) {
// 打回至相关方端 // 打回至相关方端
xgfUserService.repulse(flows,info); xgfUserService.repulse(flows, info);
// 保存操作记录 // 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0"); xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else { } else {
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2); entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1"); entity.put("VALID_FLAG", "1");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("STATUS", "2"); entity.put("STATUS", "2");
xgfUserMapper.edit(entity); xgfUserMapper.edit(entity);
// 保存操作记录 // 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1"); xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
} }
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS())) { if ("0".equals(info.getSTATUS())) {
return true; return true;
} }

View File

@ -55,49 +55,55 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
@Override @Override
public void process() throws Exception { public void process() throws Exception {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows,info);
} else {
xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData entity = xgfUserMapper.findById(condition); PageData corpEntity = corpInfoMapper.findById(condition);
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2"); flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID());
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); flows.put("APPOINT_TWO_CORP_NAME", corpEntity.getString("CORP_NAME"));
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME()); flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
xgfUserMapper.edit(entity); flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
// 清空指针 flows.put("APPOINT_TWO_OPINION", info.getOPINION());
info.setIterator(""); flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
} 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");
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
} }
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -55,39 +55,44 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
System.out.println(getName() + "节点"); System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID()); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition); PageData flows = xgfFlowsMapper.findById(condition);
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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows,info);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData entity = xgfUserMapper.findById(condition); PageData corpEntity = corpInfoMapper.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);
// 保存操作记录 flows.put("APPOINT_THREE_CORP_ID", Jurisdiction.getCORPINFO_ID());
xgfUserService.saveLog(info, info.getSTATUS(), "1"); 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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
// 保存操作记录
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");
}
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
} }
} }
@ -95,6 +100,9 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "3".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "3".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -57,47 +57,55 @@ public class YiBanCharge extends NodeComponent {
public void process() throws Exception { public void process() throws Exception {
System.out.println("YiBanCharge节点"); System.out.println("YiBanCharge节点");
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
PageData condition = new PageData(); try {
condition.put("FLOWS_ID", info.getFLOWS_ID()); PageData condition = new PageData();
PageData flows = xgfFlowsMapper.findById(condition); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) { if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常"); throw new RuntimeException("系统异常");
}
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,info);
} 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);
// 将指针清空 flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
info.setIterator(""); 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,info);
} 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");
}catch (Exception e){
e.printStackTrace();
info.setErrorMsg(e.getMessage());
} }
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())){
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) { if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) {
return true; return true;
} }

View File

@ -57,76 +57,83 @@ public class YiBanSupervise extends NodeComponent {
public void process() throws Exception { public void process() throws Exception {
System.out.println(getName()); System.out.println(getName());
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
PageData condition = new PageData(); condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
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;
}
// 如果指针没有数据,赋值后自动结束
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);
// 如果指针没有数据,赋值后自动结束
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());
flows.put("OPINION",info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows,info);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData entity = xgfUserMapper.findById(condition); PageData corpEntity = corpInfoMapper.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"); 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());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows, info);
// 保存操作记录
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");
}
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
} }
} }
@Override @Override
public boolean isEnd() { public boolean isEnd() {
XgfFlowDto info = this.getRequestData(); XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())){
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS())) { if ("0".equals(info.getSTATUS())) {
return true; return true;
} }

View File

@ -49,4 +49,6 @@ public class XgfFlowDto {
// 打回节点游标 // 打回节点游标
private String BACK_STEP; private String BACK_STEP;
private String errorMsg;
private String code;
} }

View File

@ -1007,7 +1007,7 @@ public class XgfUserServiceImpl implements XgfUserService {
key.put("OPINION", flows.get("OPINION")); key.put("OPINION", flows.get("OPINION"));
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key);
if (result == null || !"succeed".equals(result.get("result"))) { if (result == null || !"succeed".equals(result.get("result"))) {
throw new RuntimeException("请求失败"); info.setErrorMsg("请求失败");
} }
xgfUserMapper.edit(entity); xgfUserMapper.edit(entity);
this.clearInfo(flows); this.clearInfo(flows);
@ -1017,15 +1017,19 @@ public class XgfUserServiceImpl implements XgfUserService {
PageData condition = new PageData(); PageData condition = new PageData();
condition.put("FLOWS_ID",flows.getString("FLOWS_ID")); condition.put("FLOWS_ID",flows.getString("FLOWS_ID"));
PageData flowEntity = xgfFlowsMapper.findById(condition); PageData flowEntity = xgfFlowsMapper.findById(condition);
if (flowEntity != null && flowEntity.size() > 0 && flowEntity.getString("FLOWS_STEP").equals(info.getBACK_STEP())){ if (flowEntity != null && flowEntity.size() > 0 && (flowEntity.get("FLOWS_STEP").toString()).equals(info.getBACK_STEP())){
throw new RuntimeException("不能自己打回到自己"); info.setErrorMsg("不能自己打回到自己");
} }
flowEntity.put("FLOWS_STEP", info.getBACK_STEP()); flowEntity.put("FLOWS_STEP", info.getBACK_STEP());
xgfFlowsMapper.edit(flowEntity); xgfFlowsMapper.edit(flowEntity);
// 2、保存审批记录
this.saveLog(info, "0", "0");
} }
} }
@Override @Override
@Transactional
public void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception { public void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception {
if (chengNuoShu != null && chengNuoShu.length > 0) { 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()));
@ -1070,16 +1074,16 @@ public class XgfUserServiceImpl implements XgfUserService {
if (request.get("APPOINT_ANNEX") != null) { if (request.get("APPOINT_ANNEX") != null) {
info.setAPPOINT_ANNEX(request.getString("APPOINT_ANNEX")); info.setAPPOINT_ANNEX(request.getString("APPOINT_ANNEX"));
} }
info.setBACK_STEP(request.getString("BACK_STEP"));
// 进行数据审核 // 进行数据审核
LiteflowResponse response = flowExecutor.execute2Resp("chain1", info); LiteflowResponse response = flowExecutor.execute2Resp("chain1", info);
if (!response.isSuccess()) { if (response.isSuccess()) {
System.out.println("流程信息:" + response.getExecuteStepStrWithTime());
} else {
Exception e = response.getCause(); Exception e = response.getCause();
e.printStackTrace(); e.printStackTrace();
System.out.println(response.getMessage()); throw new RuntimeException(e.getMessage());
throw new RuntimeException("系统异常");
} else {
System.out.println("流程信息:" + response.getExecuteStepStrWithTime());
} }
} }