Merge remote-tracking branch 'origin/tsg' into tsg

master
cxw 2024-10-18 11:35:13 +08:00
commit ae26aa6669
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ public class PersonnelPlanLogController extends AbstractCommonFileController{
throw new IllegalArgumentException("当前培训日期标题名称重复");
}
if (planService.lambdaQuery().eq(PersonnelPlan::getId, dto.getPlanId()).count() == 0) {
if (Objects.nonNull(dto.getPlanId()) && planService.lambdaQuery().eq(PersonnelPlan::getId, dto.getPlanId()).count() == 0) {
throw new IllegalArgumentException("培训计划不存在");
}
dto.setId(IdWorker.getId());
@ -100,7 +100,7 @@ public class PersonnelPlanLogController extends AbstractCommonFileController{
if (query.count() > 0){
throw new IllegalArgumentException("当前培训日期标题名称重复");
}
if (planService.lambdaQuery().eq(PersonnelPlan::getId, dto.getPlanId()).count() == 0) {
if (Objects.nonNull(dto.getPlanId()) && planService.lambdaQuery().eq(PersonnelPlan::getId, dto.getPlanId()).count() == 0) {
throw new IllegalArgumentException("培训计划不存在");
}

View File

@ -52,7 +52,7 @@ public class PersonnelPlanLog extends CommUpdate implements Serializable {
@TableField(value="plan_id")
@Schema(description="培训计划主键")
@JsonSerialize(using = ToStringSerializer.class)
@NotNull(message = "培训计划不能为空",groups = {Insert.class, Update.class})
// @NotNull(message = "培训计划不能为空",groups = {Insert.class, Update.class})
private Long planId;
/**