|
|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
|