Browse Source

工具寿命校验 需要<=0

master
常熟吴彦祖 14 hours ago
parent
commit
8511ec3412
  1. 6
      src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java

6
src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java

@ -2299,7 +2299,7 @@ public class DailyPlanServiceImpl implements DailyPlanService {
if (!"已投用".equals(toolDetailData.getStatus())){
throw new RuntimeException("模具状态不正确,状态应为已投用");
}
if (toolDetailData.getEstUseQty().compareTo(toolDetailData.getActualUseQty()) < 0){
if (toolDetailData.getEstUseQty().compareTo(toolDetailData.getActualUseQty()) <= 0){
throw new RuntimeException("模具使用寿命超过预计寿命!");
}
// 查询生产订单
@ -2379,7 +2379,7 @@ public class DailyPlanServiceImpl implements DailyPlanService {
throw new RuntimeException("模具不在库中,无法出库。");
}
if (toolDetailData.getEstUseQty().compareTo(toolDetailData.getActualUseQty()) < 0){
if (toolDetailData.getEstUseQty().compareTo(toolDetailData.getActualUseQty()) <= 0){
throw new RuntimeException("模具使用寿命超过预计寿命!");
}
// 查询生产订单
@ -2444,7 +2444,7 @@ public class DailyPlanServiceImpl implements DailyPlanService {
if (!"生产使用中".equals(toolDetailData.getUseStatus())){
throw new RuntimeException("模具使用状态不正确,当前状态:"+toolDetailData.getUseStatus());
}
if (toolDetailData.getEstUseQty().compareTo(toolDetailData.getActualUseQty()) < 0){
if (toolDetailData.getEstUseQty().compareTo(toolDetailData.getActualUseQty()) <= 0){
throw new RuntimeException("模具使用寿命超过预计寿命!");
}
// 查询生产订单

Loading…
Cancel
Save