|
@@ -71,7 +71,6 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
private FlowMainCcService flowMainCcService;
|
|
|
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private FrameUserDeptService frameUserDeptService;
|
|
|
@Autowired
|
|
@@ -79,22 +78,23 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
|
|
|
public String doConfirmResult(AddConfirmResult addConfirmResult, String deploymentid, String constantFlowType, FlowMainPush flowMainPush, HashMap<String, Object> conditionMap, String targetId) throws FlowException {
|
|
|
|
|
|
- String isOkString=this.doConfirmResult2( addConfirmResult, deploymentid, constantFlowType, flowMainPush, conditionMap, targetId);
|
|
|
- if (!"ok_end".equals(isOkString) && !"ok_noEnd".equals(isOkString)&&!"no_end".equals(isOkString)) {
|
|
|
+ String isOkString = this.doConfirmResult2(addConfirmResult, deploymentid, constantFlowType, flowMainPush, conditionMap, targetId);
|
|
|
+ if (!"ok_end".equals(isOkString) && !"ok_noEnd".equals(isOkString) && !"no_end".equals(isOkString)) {
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// 该审核人审核结束 信息在flowMainPush中
|
|
|
|
|
|
}
|
|
|
|
|
|
return isOkString;
|
|
|
}
|
|
|
- /**
|
|
|
- * 添加审核结果
|
|
|
- * 根据不同的状态值confirmResult判断是 1:审核通过,转下一步;2:退回发起人;3:退回上节点;4:结束流程(不同意,并且结束流程);
|
|
|
- *
|
|
|
- * @return string 如果为ok就是成功,不然就是失败message
|
|
|
- */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加审核结果
|
|
|
+ * 根据不同的状态值confirmResult判断是 1:审核通过,转下一步;2:退回发起人;3:退回上节点;4:结束流程(不同意,并且结束流程);
|
|
|
+ *
|
|
|
+ * @return string 如果为ok就是成功,不然就是失败message
|
|
|
+ */
|
|
|
public String doConfirmResult2(AddConfirmResult addConfirmResult, String deploymentid, String constantFlowType, FlowMainPush flowMainPush, HashMap<String, Object> conditionMap, String targetId) throws FlowException {
|
|
|
if (addConfirmResult.getConfirmResult() == null) {
|
|
|
return "没有获取到confirmResult值";
|
|
@@ -1781,7 +1781,7 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
* 默认根据groupid查询对应角色,但是其他情况可以特殊处理
|
|
|
*
|
|
|
* @param roleKey
|
|
|
- * @param roleType 单独指数据角色类型 默认都是flow 其他地方的roleType指的是流程节点值,例如:flow_fgld_1_0_3
|
|
|
+ * @param roleType 单独指数据角色类型 默认都是flow 其他地方的roleType指的是流程节点值,例如:flow_fgld_1_0_3
|
|
|
* @param groupId
|
|
|
* @param
|
|
|
* @return
|
|
@@ -1807,7 +1807,7 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
// }
|
|
|
//
|
|
|
// } else
|
|
|
- if (roleKey.equals("fgld")) {
|
|
|
+ if (roleKey.equals("fgld")) {
|
|
|
// 找分管领导
|
|
|
frameUsersByRoleKey = flowMainExtendMapper.findFrameUsersByRoleKeyAndDept(flowMain.getDeptId());
|
|
|
|
|
@@ -1941,7 +1941,6 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取流程步骤(后端查询各个节点名称用),逻辑同上 todo 新增流程要在这里加_步骤2
|
|
|
*
|
|
@@ -1965,7 +1964,7 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
flowStep = ConstantFlowType.onlyFlow_INVOICE_RED_FLOWSTEPS;
|
|
|
} else if (flowMain.getFlowType().equals(ConstantFlowType.BUYING_MORE)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_BUYING_MORE_FLOWSTEPS;
|
|
|
- } else if (flowMain.getFlowType().equals(ConstantFlowType.FINANCE)){
|
|
|
+ } else if (flowMain.getFlowType().equals(ConstantFlowType.FINANCE)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_FINANCE_FLOWSTEPS;
|
|
|
}
|
|
|
|
|
@@ -1974,7 +1973,6 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取全流程信息 todo 新增流程要在这里加_步骤1
|
|
|
*
|
|
@@ -1986,19 +1984,19 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
{
|
|
|
if (flowType.equals(ConstantFlowType.OFF_WORK)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_OFF_WORK_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.PAYMENT)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.PAYMENT)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_PAYMENT_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.CHECK_IN)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.CHECK_IN)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_CHECK_IN_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.CONTRACT)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.CONTRACT)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_CONTRACT_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.RECEIVABLES_ADJUST)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.RECEIVABLES_ADJUST)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_RECEIVABLES_ADJUST_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.INVOICE_RED)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.INVOICE_RED)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_INVOICE_RED_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.BUYING_MORE)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.BUYING_MORE)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_BUYING_MORE_FLOWSTEPS_ALL;
|
|
|
- }else if (flowType.equals(ConstantFlowType.FINANCE)) {
|
|
|
+ } else if (flowType.equals(ConstantFlowType.FINANCE)) {
|
|
|
flowStep = ConstantFlowType.onlyFlow_FINANCE_FLOWSTEPS_ALL;
|
|
|
}
|
|
|
}
|
|
@@ -2006,8 +2004,6 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 前端流程图使用查看各个流程节点目前的情况
|
|
|
*
|
|
@@ -2091,7 +2087,7 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
|
|
|
} else if (flowMain.getFlowStatus().equals(3)) {//'申请状态(1审批中,2,退回发起人,3,已结束,4已撤回)',
|
|
|
//需要找到最新操作日志
|
|
|
- FlowMainLog flowMainLog= flowMainLogService.selectLastOneByFlowMainId(flowMainId);
|
|
|
+ FlowMainLog flowMainLog = flowMainLogService.selectLastOneByFlowMainId(flowMainId);
|
|
|
if (flowMainLog == null) {
|
|
|
return null;
|
|
|
}
|
|
@@ -2102,12 +2098,12 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
if (flowStep[i].startsWith(pushUserKey)) {
|
|
|
IMGFlowHistoryInfo imgFlowHistoryInfo = new IMGFlowHistoryInfo();
|
|
|
imgFlowHistoryInfo.setNodeKey(flowStep[i]);
|
|
|
-// if ("1".equals(flowMainLog.getAuditResult())) {//1,同意
|
|
|
-// imgFlowHistoryInfo.setType("1");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
-// imgFlowHistoryInfo.setIsPass("1");
|
|
|
-// } else {
|
|
|
+ if (new Integer(1).equals(flowMain.getFlowResult())) {//1,同意
|
|
|
+ imgFlowHistoryInfo.setType("1");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
+ imgFlowHistoryInfo.setIsPass("1");
|
|
|
+ } else {
|
|
|
imgFlowHistoryInfo.setType("6");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
-// }
|
|
|
+ }
|
|
|
imgFlowHistoryInfos.add(imgFlowHistoryInfo);
|
|
|
isLastLogFind = true;
|
|
|
|
|
@@ -2122,24 +2118,24 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
if (!isLastLogFind) {
|
|
|
IMGFlowHistoryInfo imgFlowHistoryInfo = new IMGFlowHistoryInfo();
|
|
|
imgFlowHistoryInfo.setNodeKey(pushUserKey);
|
|
|
-// if ("1".equals(flowMainLog.getAuditResult())) {//1,同意
|
|
|
-// imgFlowHistoryInfo.setType("1");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
-// imgFlowHistoryInfo.setIsPass("1");
|
|
|
-// } else {
|
|
|
+ if (new Integer(1).equals(flowMain.getFlowResult())) {//1,同意
|
|
|
+ imgFlowHistoryInfo.setType("1");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
+ imgFlowHistoryInfo.setIsPass("1");
|
|
|
+ } else {
|
|
|
imgFlowHistoryInfo.setType("6");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
-// }
|
|
|
+ }
|
|
|
imgFlowHistoryInfos.add(imgFlowHistoryInfo);
|
|
|
}
|
|
|
|
|
|
{//最后添加结束
|
|
|
IMGFlowHistoryInfo imgFlowHistoryInfo = new IMGFlowHistoryInfo();
|
|
|
imgFlowHistoryInfo.setNodeKey("end");
|
|
|
-// if ("1".equals(flowMainLog.getAuditResult())) {//1,同意
|
|
|
-// imgFlowHistoryInfo.setType("1");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
-// imgFlowHistoryInfo.setIsPass("1");
|
|
|
-// } else {
|
|
|
+ if (new Integer(1).equals(flowMain.getFlowResult())) {//1,同意
|
|
|
+ imgFlowHistoryInfo.setType("1");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
+ imgFlowHistoryInfo.setIsPass("1");
|
|
|
+ } else {
|
|
|
imgFlowHistoryInfo.setType("6");// 1 审核通过,2退回,3审核中,4申请人撤回,5,监控室撤回,6审核不同意,结束流程
|
|
|
-// }
|
|
|
+ }
|
|
|
imgFlowHistoryInfos.add(imgFlowHistoryInfo);
|
|
|
}
|
|
|
// return imgFlowHistoryInfos;
|