技术监督bug

This commit is contained in:
2023-08-01 09:52:16 +08:00
parent 729817d281
commit cf3699824b
5 changed files with 23 additions and 3 deletions

View File

@@ -149,6 +149,9 @@ public class SupvPlanParam extends BaseParam {
@ApiModelProperty(value = "实施状态") @ApiModelProperty(value = "实施状态")
private String effectStatus; private String effectStatus;
@ApiModelProperty(value = "实施人")
private String effectUserId;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data

View File

@@ -149,6 +149,10 @@ public class SupvProblemParam extends BaseParam {
@NotBlank(message = "整改情况不可为空") @NotBlank(message = "整改情况不可为空")
private String rectificationStatus; private String rectificationStatus;
@NotBlank(message = "问题发现时间")
@DateTimeStrValid(message = "问题发现时间格式有误")
private String discoveryTime;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
public static class UpdateSupvProblemParam extends SupvProblemParam{ public static class UpdateSupvProblemParam extends SupvProblemParam{

View File

@@ -47,6 +47,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* <p> * <p>
@@ -95,6 +96,12 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
supvPlan.setIsUploadHead(0); supvPlan.setIsUploadHead(0);
supvPlan.setPlanUserId(RequestUtil.getUserIndex()); supvPlan.setPlanUserId(RequestUtil.getUserIndex());
if(StrUtil.isNotBlank(supvPlan.getEffectUserId())){
List<User> userList = userFeignClient.getUserByIdList(Stream.of(supvPlan.getEffectUserId()).collect(Collectors.toList())).getData();
if(CollUtil.isNotEmpty(userList)){
supvPlan.setEffectUserName(userList.get(0).getName());
}
}
this.save(supvPlan); this.save(supvPlan);
return true; return true;
} }
@@ -117,6 +124,12 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
if(StrUtil.isNotBlank(supvPlanParam.getReportIssueTime())) { if(StrUtil.isNotBlank(supvPlanParam.getReportIssueTime())) {
supvPlan.setReportIssueTime(PubUtils.localDateTimeFormat(supvPlanParam.getReportIssueTime())); supvPlan.setReportIssueTime(PubUtils.localDateTimeFormat(supvPlanParam.getReportIssueTime()));
} }
if(StrUtil.isNotBlank(supvPlan.getEffectUserId())){
List<User> userList = userFeignClient.getUserByIdList(Stream.of(supvPlan.getEffectUserId()).collect(Collectors.toList())).getData();
if(CollUtil.isNotEmpty(userList)){
supvPlan.setEffectUserName(userList.get(0).getName());
}
}
this.updateById(supvPlan); this.updateById(supvPlan);
return true; return true;
} }

View File

@@ -399,7 +399,7 @@ public class UserController extends BaseController {
* @date 2023/7/31 * @date 2023/7/31
*/ */
@OperateInfo(info = LogEnum.SYSTEM_COMMON) @OperateInfo(info = LogEnum.SYSTEM_COMMON)
@PostMapping("/getUserListByDeptId") @GetMapping("/getUserListByDeptId")
@ApiOperation("根据用户id集合查询用户信息") @ApiOperation("根据用户id集合查询用户信息")
@ApiImplicitParam(name = "deptId", value = "用户部门id", required = true) @ApiImplicitParam(name = "deptId", value = "用户部门id", required = true)
public HttpResult<List<User>> getUserListByDeptId(@RequestParam("deptId") String deptId) { public HttpResult<List<User>> getUserListByDeptId(@RequestParam("deptId") String deptId) {

View File

@@ -474,14 +474,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
@Override @Override
public List<User> getUserListByDeptId(String deptId) { public List<User> getUserListByDeptId(String deptId) {
LambdaQueryWrapper<Dept> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Dept> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.like(Dept::getPids,deptId); lambdaQueryWrapper.like(Dept::getPids,deptId).select(Dept::getId);
List<String> deptIds = new ArrayList<>(); List<String> deptIds = new ArrayList<>();
deptIds.add(deptId); deptIds.add(deptId);
List<Dept> deptList = deptService.list(lambdaQueryWrapper); List<Dept> deptList = deptService.list(lambdaQueryWrapper);
if(CollectionUtil.isNotEmpty(deptIds)){ if(CollectionUtil.isNotEmpty(deptIds)){
deptIds.addAll(deptList.stream().map(Dept::getId).distinct().collect(Collectors.toList())); deptIds.addAll(deptList.stream().map(Dept::getId).distinct().collect(Collectors.toList()));
} }
return this.list(new LambdaQueryWrapper<User>().in(User::getDeptId,deptIds)); return this.list(new LambdaQueryWrapper<User>().in(User::getDeptId,deptIds).select(User::getId,User::getName,User::getLoginName));
} }
/** /**