From cf3699824bbdb75608e143c613f0985226be166c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E6=9C=A8c?= <857448963@qq.com> Date: Tue, 1 Aug 2023 09:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/njcn/process/pojo/param/SupvPlanParam.java | 3 +++ .../njcn/process/pojo/param/SupvProblemParam.java | 4 ++++ .../process/service/impl/SupvPlanServiceImpl.java | 13 +++++++++++++ .../com/njcn/user/controller/UserController.java | 2 +- .../com/njcn/user/service/impl/UserServiceImpl.java | 4 ++-- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java index 216a90194..3727af210 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java @@ -149,6 +149,9 @@ public class SupvPlanParam extends BaseParam { @ApiModelProperty(value = "实施状态") private String effectStatus; + @ApiModelProperty(value = "实施人") + private String effectUserId; + @EqualsAndHashCode(callSuper = true) @Data diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java index cf6c2ad9f..9e8d19953 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java @@ -149,6 +149,10 @@ public class SupvProblemParam extends BaseParam { @NotBlank(message = "整改情况不可为空") private String rectificationStatus; + @NotBlank(message = "问题发现时间") + @DateTimeStrValid(message = "问题发现时间格式有误") + private String discoveryTime; + @EqualsAndHashCode(callSuper = true) @Data public static class UpdateSupvProblemParam extends SupvProblemParam{ diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java index faba6dc51..1de11c8c0 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java @@ -47,6 +47,7 @@ import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; /** *

@@ -95,6 +96,12 @@ public class SupvPlanServiceImpl extends ServiceImpl i supvPlan.setIsUploadHead(0); supvPlan.setPlanUserId(RequestUtil.getUserIndex()); + if(StrUtil.isNotBlank(supvPlan.getEffectUserId())){ + List userList = userFeignClient.getUserByIdList(Stream.of(supvPlan.getEffectUserId()).collect(Collectors.toList())).getData(); + if(CollUtil.isNotEmpty(userList)){ + supvPlan.setEffectUserName(userList.get(0).getName()); + } + } this.save(supvPlan); return true; } @@ -117,6 +124,12 @@ public class SupvPlanServiceImpl extends ServiceImpl i if(StrUtil.isNotBlank(supvPlanParam.getReportIssueTime())) { supvPlan.setReportIssueTime(PubUtils.localDateTimeFormat(supvPlanParam.getReportIssueTime())); } + if(StrUtil.isNotBlank(supvPlan.getEffectUserId())){ + List userList = userFeignClient.getUserByIdList(Stream.of(supvPlan.getEffectUserId()).collect(Collectors.toList())).getData(); + if(CollUtil.isNotEmpty(userList)){ + supvPlan.setEffectUserName(userList.get(0).getName()); + } + } this.updateById(supvPlan); return true; } diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/controller/UserController.java b/pqs-user/user-boot/src/main/java/com/njcn/user/controller/UserController.java index ce0b7080e..7d272a7b8 100644 --- a/pqs-user/user-boot/src/main/java/com/njcn/user/controller/UserController.java +++ b/pqs-user/user-boot/src/main/java/com/njcn/user/controller/UserController.java @@ -399,7 +399,7 @@ public class UserController extends BaseController { * @date 2023/7/31 */ @OperateInfo(info = LogEnum.SYSTEM_COMMON) - @PostMapping("/getUserListByDeptId") + @GetMapping("/getUserListByDeptId") @ApiOperation("根据用户id集合查询用户信息") @ApiImplicitParam(name = "deptId", value = "用户部门id", required = true) public HttpResult> getUserListByDeptId(@RequestParam("deptId") String deptId) { diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java index ce70081eb..615d92233 100644 --- a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java +++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java @@ -474,14 +474,14 @@ public class UserServiceImpl extends ServiceImpl implements IU @Override public List getUserListByDeptId(String deptId) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.like(Dept::getPids,deptId); + lambdaQueryWrapper.like(Dept::getPids,deptId).select(Dept::getId); List deptIds = new ArrayList<>(); deptIds.add(deptId); List deptList = deptService.list(lambdaQueryWrapper); if(CollectionUtil.isNotEmpty(deptIds)){ deptIds.addAll(deptList.stream().map(Dept::getId).distinct().collect(Collectors.toList())); } - return this.list(new LambdaQueryWrapper().in(User::getDeptId,deptIds)); + return this.list(new LambdaQueryWrapper().in(User::getDeptId,deptIds).select(User::getId,User::getName,User::getLoginName)); } /**