Commit 4195a80d authored by chenhao's avatar chenhao

修改Bug 5476

parent caa5b1d8
......@@ -240,7 +240,9 @@ public class LatentDangerController extends BaseController {
@PostMapping(value = "/page/list")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel listDanger(@ApiParam(value = "查询条件", required = true) @RequestBody PageParam pageParam) throws Exception {
IPage<LatentDanger> result = iLatentDangerService.pageListDanger(pageParam);
AgencyUserModel user = getUserInfo();
String userId = user.getUserId();
IPage<LatentDanger> result = iLatentDangerService.pageListDanger(pageParam,userId);
return ResponseHelper.buildResponse(result);
}
......@@ -339,7 +341,9 @@ public class LatentDangerController extends BaseController {
@PostMapping(value = "/supervision/page/reviewList")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel reviewListDanger(@ApiParam(value = "查询条件", required = true) @RequestBody PageParam pageParam) throws Exception {
IPage<LatentDanger> result = iLatentDangerService.reviewListDanger(pageParam);
AgencyUserModel user = getUserInfo();
String userId = user.getUserId();
IPage<LatentDanger> result = iLatentDangerService.reviewListDanger(pageParam,userId);
return ResponseHelper.buildResponse(result);
}
......
......@@ -101,7 +101,7 @@ public interface ILatentDangerService {
*/
JSONObject getReviewInfo(Long dangerId);
IPage<LatentDanger> pageListDanger(PageParam pageParam) throws Exception;
IPage<LatentDanger> pageListDanger(PageParam pageParam,String userId) throws Exception;
List<DangerListResponse> export(PageParam pageParam);
......@@ -147,7 +147,7 @@ public interface ILatentDangerService {
* @param pageParam
* @return
*/
IPage<LatentDanger> reviewListDanger(PageParam pageParam) throws Exception;
IPage<LatentDanger> reviewListDanger(PageParam pageParam,String userId) throws Exception;
/**
* 获取多个业务的隐患等级
......
......@@ -163,7 +163,11 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
List<Long> dangerIds = Lists.transform(dangers, HiddenDangerDto::getLatentDangerId);
String dangerIdsStr = "".equals(Joiner.on(",").join(dangerIds)) ? "-1" : Joiner.on(",").join(dangerIds);
Map<String, Object> param = buildRequestBody(page, level, status, dangerIdsStr);
//可以获取导入的隐患列表信息,不加入instanceId 的判断,因为这个接口调用了隐患列表,需要一个参数判断是否有使用 --- by 陈浩 2022-04-14 --start
param.put("isDraft", 1);
FeignClientResult<Page<DangerDto>> feignClientResult = feignClient.pageList(param);
param.remove("isDraft");
//可以获取导入的隐患列表信息,不加入instanceId 的判断,因为这个接口调用了隐患列表,需要一个参数判断是否有使用 --- by 陈浩 2022-04-14 --end
Page<DangerDto> dangerDtoIPage = feignClientResult.getResult();
Map<Long, HiddenDangerDto> keyMap = dangers.stream().collect(Collectors.toMap(HiddenDangerDto::getLatentDangerId, Function.identity()));
dangerDtoIPage.getRecords().forEach(r -> {
......
......@@ -973,8 +973,14 @@
a.biz_info
from p_latent_danger a
<where>
deleted = 0 and instance_id is not null
deleted = 0
<foreach collection="paramMap" index="key" item="value">
<if test="key == 'isDraft' and value == 1">
\ and a.danger_state = 'draft' and discoverer_user_id = #{paramMap[userId]}
</if>
<if test="key == 'isDraft' and value == 0">
\ and a.danger_state != 'draft'
</if>
<if test="key == 'bizType' and value != null and value != ''">
and a.biz_type = #{value}
</if>
......
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