|
@@ -101,16 +101,19 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
|
|
|
DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanSelect=new DetailsOfTheRefuelingPlan();
|
|
|
detailsOfTheRefuelingPlanSelect.setMachineId(id);
|
|
|
detailsOfTheRefuelingPlanSelect.setProductType("A面");
|
|
|
+ detailsOfTheRefuelingPlanSelect.setPlanStatus("1");
|
|
|
List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlanSelect);
|
|
|
- List<DetailsOfTheRefuelingPlan> collect = detailsOfTheRefuelingPlans.stream().filter(item -> item.getPlanStatus().equals("1")).collect(Collectors.toList());
|
|
|
- if(collect.size()>0){
|
|
|
+ //有没有上机的,有的话把他改成停机
|
|
|
+ if(detailsOfTheRefuelingPlans.size()>0){
|
|
|
DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanUpdate=new DetailsOfTheRefuelingPlan();
|
|
|
detailsOfTheRefuelingPlanUpdate.setPlanStatus("2");
|
|
|
detailsOfTheRefuelingPlanUpdate.setMachineId(id);
|
|
|
detailsOfTheRefuelingPlanUpdate.setProductType("A面");
|
|
|
+ detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("1");
|
|
|
detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlanByMachineIdAndProductType(detailsOfTheRefuelingPlanUpdate);
|
|
|
}
|
|
|
}else {
|
|
|
+ //就是把所有停机的变成待上机
|
|
|
DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanConditions=new DetailsOfTheRefuelingPlan();
|
|
|
detailsOfTheRefuelingPlanConditions.setMachineId(id);
|
|
|
detailsOfTheRefuelingPlanConditions.setPlanStatus("2");
|
|
@@ -120,6 +123,7 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
|
|
|
detailsOfTheRefuelingPlanUpdate.setMachineId(id);
|
|
|
detailsOfTheRefuelingPlanUpdate.setPlanStatus("1");
|
|
|
detailsOfTheRefuelingPlanUpdate.setProductType("A面");
|
|
|
+ detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("2");
|
|
|
detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlanByMachineIdAndProductType(detailsOfTheRefuelingPlanUpdate);
|
|
|
}
|
|
|
}
|
|
@@ -142,6 +146,7 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
|
|
|
detailsOfTheRefuelingPlanUpdate.setPlanStatus("2");
|
|
|
detailsOfTheRefuelingPlanUpdate.setMachineId(id);
|
|
|
detailsOfTheRefuelingPlanUpdate.setProductType("B面");
|
|
|
+ detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("1");
|
|
|
detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlanByMachineIdAndProductType(detailsOfTheRefuelingPlanUpdate);
|
|
|
}
|
|
|
}else {
|
|
@@ -154,6 +159,7 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
|
|
|
detailsOfTheRefuelingPlanUpdate.setMachineId(id);
|
|
|
detailsOfTheRefuelingPlanUpdate.setPlanStatus("1");
|
|
|
detailsOfTheRefuelingPlanUpdate.setProductType("B面");
|
|
|
+ detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("2");
|
|
|
detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlanByMachineIdAndProductType(detailsOfTheRefuelingPlanUpdate);
|
|
|
}
|
|
|
}
|