若干bug修改
parent
d3b41ecf7b
commit
eebf95ff9e
|
@ -136,17 +136,20 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
xgfUserMapper.edit(x);
|
||||
xgfUserDetailsMapper.edit(x);
|
||||
}
|
||||
|
||||
/* 2、保存相关方人员流程审批信息 */
|
||||
condition.clear();
|
||||
condition.put("FLOWS_ID", x.getString("USER_ID"));
|
||||
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_ID", x.getString("USER_ID"));
|
||||
flows.put("FLOWS_STEP", 0);
|
||||
flows.put("FOREIGN_KEY_ID", x.getString("USER_ID"));
|
||||
flows.put("FOREIGN_KEY_NAME", "xgf_user=>XGF_USER_ID");
|
||||
flows.put("IS_DELETE", "0");
|
||||
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_ZERO_CORP_ID", x.getString("APPOINT_CORP_ID"));
|
||||
flows.put("APPOINT_ZERO_CORP_NAME", x.getString("APPOINT_CORP_NAME"));
|
||||
flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_DEPARTMENT_ID"));
|
||||
|
@ -156,8 +159,10 @@ 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("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");
|
||||
flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_DEPARTMENT_ID"));
|
||||
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_DEPARTMENT_NAME"));
|
||||
flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_USER_ID"));
|
||||
|
@ -264,6 +269,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
}
|
||||
condition.clear();
|
||||
condition.put("STATUS", request.getString("STATUS"));
|
||||
condition.put("OPINION", request.getString("OPINION"));
|
||||
condition.put("APPOINT_CORP_ID", request.getString("APPOINT_CORP_ID"));
|
||||
condition.put("APPOINT_CORP_NAME", request.getString("APPOINT_CORP_NAME"));
|
||||
condition.put("APPOINT_DEPARTMENT_ID", request.getString("APPOINT_DEPARTMENT_ID"));
|
||||
|
@ -298,6 +304,10 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
/* 获取当前用户是否有权限审批 */
|
||||
private String getPower(PageData x) {
|
||||
switch (Integer.parseInt(x.get("CHECK_STEP").toString())) {
|
||||
case 0:
|
||||
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_ZERO_USER_ID"))) {
|
||||
return "1";
|
||||
}
|
||||
case 1:
|
||||
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_ONE_USER_ID"))) {
|
||||
return "1";
|
||||
|
@ -335,18 +345,23 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
PageData condition = new PageData();
|
||||
switch (Integer.parseInt(flows.get("FLOWS_STEP").toString())) {
|
||||
case 0:// 相关方端推送数据至企业端
|
||||
flows.put("APPOINT_ZERO_CORP_ID", info.getString("APPOINT_CORP_ID"));
|
||||
flows.put("APPOINT_ZERO_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
|
||||
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_ZERO_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
|
||||
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
|
||||
flows.put("APPOINT_ZERO_USER_ID", info.getString("APPOINT_USER_ID"));
|
||||
flows.put("APPOINT_ZERO_USER_NAME", info.getString("APPOINT_USER_NAME"));
|
||||
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ZERO_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_ZERO_OPINION", info.getString("OPINION"));
|
||||
|
||||
flows.put("APPOINT_ONE_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
|
||||
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
|
||||
flows.put("APPOINT_ONE_USER_ID", info.getString("APPOINT_USER_ID"));
|
||||
flows.put("APPOINT_ONE_USER_NAME", info.getString("APPOINT_USER_NAME"));
|
||||
flows.put("APPOINT_ONE_CORP_ID", flows.getString("APPOINT_ZERO_CORP_ID"));
|
||||
flows.put("APPOINT_ONE_CORP_NAME", flows.getString("APPOINT_ZERO_CORP_NAME"));
|
||||
flows.put("FLOWS_STEP", 1);
|
||||
xgfFlowsMapper.edit(flows);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||
PageData user = xgfUserMapper.findById(condition);
|
||||
user.put("CHECK_STEP", 1);
|
||||
return "0";
|
||||
// 相关方选择的审批人审批,并指定下一位监管部门审批人,不过打回相关方端
|
||||
case 1: {
|
||||
|
@ -368,24 +383,39 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
xgfUserMapper.edit(entity);
|
||||
return "0";
|
||||
} else {
|
||||
condition.clear();
|
||||
flows.put("APPOINT_ONE_CORP_ID", Jurisdiction.getCORPINFO_ID());
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData corpInfo = corpInfoMapper.findById(condition);
|
||||
if (corpInfo != null && corpInfo.size() > 0) {
|
||||
flows.put("APPOINT_ONE_CORP_NAME", corpInfo.getString("CORP_NAME"));
|
||||
if ("1".equals(info.getString("FLOWS_TYPE"))) {
|
||||
entity.put("CHECK_STATUS", 1);
|
||||
entity.put("VALID_FLAG", "2");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
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("FLOWS_STEP", 2);
|
||||
|
||||
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 {
|
||||
entity.put("CHECK_STATUS", 2);
|
||||
entity.put("VALID_FLAG", "1");
|
||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||
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"));
|
||||
flows.put("FLOWS_STEP", 2);
|
||||
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "1";
|
||||
}
|
||||
flows.put("APPOINT_ONE_CORP_TYPE", "0");
|
||||
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
|
||||
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
|
||||
flows.put("APPOINT_ONE_USER_ID", info.getString("APPOINT_USER_ID"));
|
||||
flows.put("APPOINT_ONE_USER_NAME", info.getString("APPOINT_USER_NAME"));
|
||||
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
|
||||
flows.put("APPOINT_ONE_STATUS", info.getString("STATUS"));
|
||||
flows.put("APPOINT_ONE_OPINION", info.getString("OPINION"));
|
||||
flows.put("FLOWS_STEP", 2);
|
||||
xgfFlowsMapper.edit(flows);
|
||||
return "0";
|
||||
}
|
||||
}
|
||||
//监管部门审批人审批,并根据不同类型的审批规则进行处理
|
||||
|
@ -588,7 +618,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
}
|
||||
}
|
||||
|
||||
void saveLog(String id, String status, String endFlag) throws Exception {
|
||||
private void saveLog(String id, String status, String endFlag) throws Exception {
|
||||
/* 保存审批记录 */
|
||||
PageData condition = new PageData();
|
||||
condition.clear();
|
||||
|
@ -601,6 +631,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
}
|
||||
condition.clear();
|
||||
condition.put("FLOW_ID", flow.getString("FLOW_ID"));
|
||||
condition.put("STEP_FLAG", "1");
|
||||
PageData currentNode = flowDetailMapper.selectOne(condition);
|
||||
PageData nextNode = new PageData();
|
||||
nextNode.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
||||
|
@ -626,4 +657,15 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
currentNode.put("STEP_FLAG", "0");
|
||||
flowDetailMapper.edit(currentNode);
|
||||
}
|
||||
|
||||
private String getType(String corpInfoId) {
|
||||
// 集团单位id(河港机械 jtdw002 1e6dbbe16004402f8d2c0e52afd9a676),(河港港工 jtdw003 3a854eefa7894e06aaa1a2611bca80f6),(河港检测 jtdw004 020578a4c1f04bc692ee25145c2efbe5),(方宇物业 jtdw005 90966974de3c4b83aca6f8fd6432d5c2)
|
||||
// String jituandanwei = "1e6dbbe16004402f8d2c0e52afd9a676,3a854eefa7894e06aaa1a2611bca80f6,020578a4c1f04bc692ee25145c2efbe5,90966974de3c4b83aca6f8fd6432d5c2";
|
||||
// if (jituandanwei.contains(corpInfoId)) {
|
||||
// return "1";
|
||||
// }else {
|
||||
// return "0";
|
||||
// }
|
||||
return "0";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.XgfFlowsMapper">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.XgfFlowsMapper">
|
||||
|
||||
<sql id="tableName">
|
||||
xgf_flows
|
||||
|
|
Loading…
Reference in New Issue