|
|
@ -309,11 +309,11 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper, |
|
|
|
if (bdWorkorder == null) { |
|
|
|
throw new BadRequestException("未找到工单号[" + workorderCode + "]的记录!"); |
|
|
|
} |
|
|
|
if ((bdWorkorder.getWorkorder_status().equals(WorkOrderStatusEnum.ISSUED.getCode()) |
|
|
|
|| bdWorkorder.getWorkorder_status().equals(WorkOrderStatusEnum.UNPRODUCED.getCode())) |
|
|
|
&& (ObjectUtil.isNotEmpty(entity.getProduce_date()) && entity.getProduce_date().equals(today))) { |
|
|
|
throw new BadRequestException("工单号[" + workorderCode + "]未生产不能完成工!"); |
|
|
|
} |
|
|
|
// if ((bdWorkorder.getWorkorder_status().equals(WorkOrderStatusEnum.ISSUED.getCode())
|
|
|
|
// || bdWorkorder.getWorkorder_status().equals(WorkOrderStatusEnum.UNPRODUCED.getCode()))
|
|
|
|
// && (ObjectUtil.isNotEmpty(entity.getProduce_date()) && entity.getProduce_date().equals(today))) {
|
|
|
|
// throw new BadRequestException("工单号[" + workorderCode + "]未生产不能完成工!");
|
|
|
|
// }
|
|
|
|
if (bdWorkorder.getWorkorder_status().equals(WorkOrderStatusEnum.COMPLETE.getCode())) { |
|
|
|
throw new BadRequestException("工单号[" + workorderCode + "]已完工,不能重复完工!"); |
|
|
|
} |
|
|
|