Commit e09a59dd by hzc

修改bug

parent 2be163f3
...@@ -79,7 +79,7 @@ public class TaskCtrl { ...@@ -79,7 +79,7 @@ public class TaskCtrl {
@ApiOperation("获取我的任务(数据填报、数据审核)") @ApiOperation("获取我的任务(数据填报、数据审核)")
@PostMapping("findMyTask") @PostMapping("findMyTask")
public List<Task> findMyTask(@RequestBody QueryAllTaskParam param) { public List<Task> findMyTask(@RequestBody QueryAllTaskParam param) {
param.setUserId(SystemUserUtil.getCurrentUserId()); //param.setUserId(SystemUserUtil.getCurrentUserId());
LogManager.logInfo(Constants.LOG_CONTEXT_API, "{}查询了我任务的", LogManager.logInfo(Constants.LOG_CONTEXT_API, "{}查询了我任务的",
SystemUserUtil.getCurrentUser()); SystemUserUtil.getCurrentUser());
return taskService.findAllTask(param); return taskService.findAllTask(param);
......
...@@ -17,11 +17,13 @@ import io.swagger.annotations.Api; ...@@ -17,11 +17,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.rmi.dgc.Lease;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
...@@ -102,16 +104,31 @@ public class TaskRuleCtrl { ...@@ -102,16 +104,31 @@ public class TaskRuleCtrl {
} }
@ApiOperation("根据机构编号获取对应的规则名类别") @ApiOperation("根据机构编号获取对应的规则名类别")
@GetMapping("findRuleLevelsByOrgNo") @GetMapping("findRuleLevelsByOrgNo")
public List<String> findRuleLevelsByOrgNo(@RequestParam("orgNo") String orgNo){ public List<String> findRuleLevelsByOrgNo(@RequestParam("orgNo") String orgNo,@RequestParam(value = "sysAdmin",required = false) Boolean sysAdmin){
List<String> levels = new ArrayList<>(); List<String> levels = new ArrayList<>();
String key = ""; String key = "";
if(StringUtils.isNotBlank(orgNo)){ if(BooleanUtils.isTrue(sysAdmin)){
//省对应的规则级别
ConfigInfo prinvinceConfigInfo= configInfoService.getConfigInfoById(Constants.RULE_NAME_PRINVINCE);
//市对应的规则级别
ConfigInfo cityConfigInfo= configInfoService.getConfigInfoById(Constants.RULE_NAME_CITY);
//县对应的规则级别
ConfigInfo countyConfigInfo= configInfoService.getConfigInfoById(Constants.RULE_NAME_COUNTY);
StringBuffer value = new StringBuffer( prinvinceConfigInfo.getCfValue());
value.append(Constants.SEP_COMMA);
value.append(cityConfigInfo.getCfValue());
value.append(Constants.SEP_COMMA);
value.append(countyConfigInfo.getCfValue());
String[] split = value.toString().split(Constants.SEP_COMMA);
levels = Arrays.asList(split);
}else if(StringUtils.isNotBlank(orgNo)){
switch (orgNo.length()){ switch (orgNo.length()){
case 2: key="RULE_NAME_PRINVINCE"; case 2: key=Constants.RULE_NAME_PRINVINCE;
break; break;
case 4: key = "RULE_NAME_CITY"; case 4: key = Constants.RULE_NAME_CITY;
break; break;
case 6: key = "RULE_NAME_COUNTY"; case 6: key = Constants.RULE_NAME_COUNTY;
break; break;
default: key=null; default: key=null;
} }
...@@ -120,6 +137,7 @@ public class TaskRuleCtrl { ...@@ -120,6 +137,7 @@ public class TaskRuleCtrl {
String cfValue = configInfoById.getCfValue(); String cfValue = configInfoById.getCfValue();
String[] split = cfValue.split(Constants.SEP_COMMA); String[] split = cfValue.split(Constants.SEP_COMMA);
levels = Arrays.asList(split); levels = Arrays.asList(split);
} }
} }
......
...@@ -179,4 +179,8 @@ public class Constants { ...@@ -179,4 +179,8 @@ public class Constants {
public static final String PRIVINCE_TO_COUNTY = "省对县"; public static final String PRIVINCE_TO_COUNTY = "省对县";
public static final String CITY_TO_COUNTY = "市对县"; public static final String CITY_TO_COUNTY = "市对县";
public static final String RULE_NAME_PRINVINCE = "RULE_NAME_PRINVINCE";
public static final String RULE_NAME_CITY = "RULE_NAME_CITY";
public static final String RULE_NAME_COUNTY = "RULE_NAME_COUNTY";
} }
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
and ref_ind_dept = #{refIndDept} and ref_ind_dept = #{refIndDept}
</if> </if>
<if test="userId != null"> <if test="userId != null and userId ==''">
<choose> <choose>
<when test="queryType == 1"> <when test="queryType == 1">
and enter_users like concat('%,', #{userId}, ',%') and enter_users like concat('%,', #{userId}, ',%')
......
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