Commit 26762fba by 张祺

修改任务生成的问题

parent 5b3dc947
......@@ -165,4 +165,10 @@ public class Constants {
* ruleType=3 县级对标
*/
public static final int RULE_TYPE_COUNTY = 3;
public static final String PRIVINCE_TO_CITY = "省对市";
public static final String PRIVINCE_TO_COUNTY = "省对县";
public static final String CITY_TO_COUNTY = "市对县";
}
......@@ -277,21 +277,14 @@ public class TaskServiceImpl implements TaskService {
Result result = null;
Date now = new Date();
Task task = taskMapper.getById(taskId);
Integer ruleType = task.getRuleType();
String ruleLevel = task.getRuleLevel();
ConfigInfo configInfo = null;
switch (ruleType) {
case Constants.RULE_TYPE_PROVINCE:
if (Constants.PRIVINCE_TO_CITY.equals(ruleLevel)) {
configInfo = configInfoService.getConfigInfoById(Constants.RULE_PROVINCE_AUDIT_ROLE);
break;
case Constants.RULE_TYPE_CITY:
} else if (Constants.PRIVINCE_TO_COUNTY.equals(ruleLevel)) {
configInfo = configInfoService.getConfigInfoById(Constants.RULE_CITY_AUDIT_ROLE);
break;
case Constants.RULE_TYPE_COUNTY:
} else if (Constants.CITY_TO_COUNTY.equals(ruleLevel)) {
configInfo = configInfoService.getConfigInfoById(Constants.RULE_COUNTY_AUDIT_ROLE);
break;
default:
configInfo = configInfoService.getConfigInfoById(Constants.RULE_PROVINCE_AUDIT_ROLE);
break;
}
if (configInfo != null) {
String indDept = task.getRefIndDept();
......@@ -346,15 +339,15 @@ public class TaskServiceImpl implements TaskService {
LogManager.logInfo(Constants.LOG_CONTEXT_API, "{}提交任务id:{},name:{}到审核",
user, taskId, task.getRuleName());
} else {
result = Result.genFailedResult("此配置此任务审批人,ruleType=" + ruleType + ",归属部门=" + indDept);
result = Result.genFailedResult("此配置此任务审批人,ruleLevel=" + ruleLevel + ",归属部门=" + indDept);
}
} else {
result = Result.genFailedResult("系统配置的角色没有用户,ruleType=" + ruleType);
result = Result.genFailedResult("系统配置的角色没有用户,ruleLevel=" + ruleLevel);
}
} else {
result = Result.genFailedResult("系统没有配置此任务的审批角色,ruleType=" + ruleType);
LogManager.logInfo(Constants.LOG_CONTEXT_API, "提交任务taskId={}失败没有配置ruleType={}的审批角色",
taskId, ruleType);
result = Result.genFailedResult("系统没有配置此任务的审批角色,ruleLevel=" + ruleLevel);
LogManager.logInfo(Constants.LOG_CONTEXT_API, "提交任务taskId={}失败没有配置ruleLevel={}的审批角色",
taskId, ruleLevel);
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment