若干bug修改
parent
a52ccd1f50
commit
0cd60ce5e3
|
@ -143,7 +143,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
PageData flows = xgfFlowsMapper.findById(condition);
|
||||
if (flows == null || flows.size() <= 0) {
|
||||
flows = new PageData();
|
||||
flows.put("FLOWS_TYPE", getType(x.getString("CORPINOF_ID")));
|
||||
flows.put("FLOWS_TYPE", getType(x.getString("CORPINFO_ID")));
|
||||
flows.put("FLOWS_ID", x.getString("USER_ID"));
|
||||
flows.put("FLOWS_STEP", 0);
|
||||
flows.put("FOREIGN_KEY_ID", x.getString("USER_ID"));
|
||||
|
@ -159,7 +159,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
xgfFlowsMapper.save(flows);
|
||||
} else {
|
||||
flows.put("FLOWS_STEP", 0);
|
||||
flows.put("FLOWS_TYPE", getType(x.getString("CORPINOF_ID")));
|
||||
flows.put("FLOWS_TYPE", getType(x.getString("CORPINFO_ID")));
|
||||
flows.put("APPOINT_ZERO_CORP_NAME", x.getString("APPOINT_CORP_NAME"));
|
||||
flows.put("APPOINT_ZERO_CORP_ID", x.getString("APPOINT_CORP_ID"));
|
||||
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
|
||||
|
@ -279,7 +279,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
condition.put("APPOINT_USER_NAME", request.getString("APPOINT_USER_NAME"));
|
||||
|
||||
// 保存审批记录
|
||||
this.saveLog(x, request.getString("STATUS"), this.handle(condition, flows));
|
||||
this.saveLog(condition, request.getString("STATUS"), this.handle(condition, flows));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,6 +362,11 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ZERO_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_ZERO_OPINION", info.getString("OPINION"));
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "0";
|
||||
} else {
|
||||
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
|
||||
|
@ -403,6 +408,11 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ONE_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_ONE_OPINION", info.getString("OPINION"));
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "0";
|
||||
} else {
|
||||
if ("1".equals(flows.getString("FLOWS_TYPE"))) {
|
||||
|
@ -427,6 +437,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
} else {
|
||||
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);
|
||||
|
||||
|
@ -458,6 +469,10 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_TWO_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_TWO_OPINION", info.getString("OPINION"));
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "0";
|
||||
} else {
|
||||
// 2、通过审核后,根据不同的流程进行不同的处理
|
||||
|
@ -474,13 +489,13 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
flows.put("APPOINT_TWO_CORP_ID", info.getString("APPOINT_CORP_ID"));
|
||||
flows.put("APPOINT_TWO_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
|
||||
flows.put("APPOINT_TWO_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
|
||||
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
|
||||
flows.put("APPOINT_TWO_USER_ID", info.getString("APPOINT_USER_ID"));
|
||||
flows.put("APPOINT_TWO_USER_NAME", info.getString("APPOINT_USER_NAME"));
|
||||
flows.put("APPOINT_THREE_CORP_ID", info.getString("APPOINT_CORP_ID"));
|
||||
flows.put("APPOINT_THREE_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
|
||||
flows.put("APPOINT_THREE_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_THREE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
|
||||
flows.put("APPOINT_THREE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
|
||||
flows.put("APPOINT_THREE_USER_ID", info.getString("APPOINT_USER_ID"));
|
||||
flows.put("APPOINT_THREE_USER_NAME", info.getString("APPOINT_USER_NAME"));
|
||||
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_TWO_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_TWO_OPINION", info.getString("OPINION"));
|
||||
|
@ -509,6 +524,9 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
flows.put("APPOINT_THREE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_THREE_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_THREE_OPINION", info.getString("OPINION"));
|
||||
return "0";
|
||||
} else {
|
||||
// TODO 根据是否委托辖区单位进行处理(前端传回来)
|
||||
|
@ -560,6 +578,10 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
flows.put("APPOINT_FOUR_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_FOUR_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_FOUR_OPINION", info.getString("OPINION"));
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "0";
|
||||
} else {
|
||||
// TODO 根据是否委托辖区单位进行处理(前端传回来)
|
||||
|
@ -580,7 +602,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
flows.put("APPOINT_FOUR_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_FOUR_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_FOUR_OPINION", info.getString("OPINION"));
|
||||
flows.put("FLOWS_STEP", 4);
|
||||
flows.put("FLOWS_STEP", 5);
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "1";
|
||||
default:
|
||||
|
@ -607,6 +629,10 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
flows.put("APPOINT_FIVE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_FIVE_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_FIVE_OPINION", info.getString("OPINION"));
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "0";
|
||||
} else {
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
|
@ -650,11 +676,11 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
}
|
||||
}
|
||||
|
||||
private void saveLog(String id, String status, String endFlag) throws Exception {
|
||||
private void saveLog(PageData info, String status, String endFlag) throws Exception {
|
||||
/* 保存审批记录 */
|
||||
PageData condition = new PageData();
|
||||
condition.clear();
|
||||
condition.put("FOREIGN_KEY", id);
|
||||
condition.put("FOREIGN_KEY", info.getString("FLOWS_ID"));
|
||||
condition.put("TYPE", "1");
|
||||
condition.put("VALID_FLAG", "1");
|
||||
PageData flow = flowMapper.findByCondition(condition);
|
||||
|
@ -675,19 +701,27 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
nextNode.put("APPROVER_NAME", Jurisdiction.getName());
|
||||
nextNode.put("APPROVER_TIME", DateUtil.getTime());
|
||||
nextNode.put("APPROVER_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
nextNode.put("APPROVER_OPINION", info.get("OPINION"));
|
||||
if ("1".equals(Jurisdiction.getCORPINFO_ID())) {
|
||||
nextNode.put("APPROVER_CORPINFO_NAME", "秦皇岛股份有限公司");
|
||||
} else {
|
||||
condition.clear();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData corpInfo = corpInfoMapper.findById(condition);
|
||||
if (corpInfo != null && corpInfo.size() > 0) {
|
||||
nextNode.put("APPROVER_CORPINFO_NAME", corpInfo.getString("NAME"));
|
||||
nextNode.put("APPROVER_CORPINFO_NAME", corpInfo.getString("CORP_NAME"));
|
||||
}
|
||||
}
|
||||
nextNode.put("PASS_FLAG", status);
|
||||
nextNode.put("END_FLAG", endFlag);
|
||||
nextNode.put("ISDELETE", "0");
|
||||
nextNode.put("PARENT_ID", currentNode.getString("FLOW_DETAIL_ID"));
|
||||
|
||||
flowDetailMapper.save(nextNode);
|
||||
currentNode.put("STEP_FLAG", "0");
|
||||
flowDetailMapper.edit(currentNode);
|
||||
flow.put("END_FLAG", endFlag);
|
||||
flowMapper.edit(flow);
|
||||
}
|
||||
|
||||
private String getType(String corpInfoId) {
|
||||
|
|
Loading…
Reference in New Issue