急件维护

liweidong
张乾翔 5 days ago
parent 4a717cbc6d
commit b0be5cbf10
  1. 3
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/service/impl/UrgentPartServiceImpl.java

@ -169,7 +169,7 @@ public class UrgentPartServiceImpl extends BaseServiceImpl<UrgentPartMapper, Urg
if (StrUtil.isEmpty(excel.getPlanNo()) || StrUtil.isEmpty(excel.getPartCode())) { if (StrUtil.isEmpty(excel.getPlanNo()) || StrUtil.isEmpty(excel.getPartCode())) {
throw new RuntimeException("计划单号和零件号为必填项"); throw new RuntimeException("计划单号和零件号为必填项");
} }
UrgentPart urgentPart = BeanUtil.copyProperties(excel, UrgentPart.class); UrgentPart urgentPart = BeanUtil.copyProperties(excel, UrgentPart.class, "status");
if (BeanUtil.isEmpty(urgentPart)){ if (BeanUtil.isEmpty(urgentPart)){
return null; return null;
} }
@ -181,7 +181,6 @@ public class UrgentPartServiceImpl extends BaseServiceImpl<UrgentPartMapper, Urg
if (StrUtil.isNotEmpty(excel.getStatus())) { if (StrUtil.isNotEmpty(excel.getStatus())) {
urgentPart.setStatus(UrgentPart.UrgentPartStatusEnum.of(excel.getStatus()).getCode()); urgentPart.setStatus(UrgentPart.UrgentPartStatusEnum.of(excel.getStatus()).getCode());
} }
if (urgentPart.getStatus() == null) { if (urgentPart.getStatus() == null) {
urgentPart.setStatus(urgentPart.getExpireDate().after(now) ? 0 : 1); urgentPart.setStatus(urgentPart.getExpireDate().after(now) ? 0 : 1);
} }

Loading…
Cancel
Save