技术监督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 = "实施状态")
private String effectStatus;
@ApiModelProperty(value = "实施人")
private String effectUserId;
@EqualsAndHashCode(callSuper = true)
@Data

View File

@@ -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{

View File

@@ -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;
/**
* <p>
@@ -95,6 +96,12 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
supvPlan.setIsUploadHead(0);
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);
return true;
}
@@ -117,6 +124,12 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
if(StrUtil.isNotBlank(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);
return true;
}