|
@@ -13,6 +13,7 @@ import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
import com.github.zuihou.business.aps.algorithm.ga.GAScheduler;
|
|
|
import com.github.zuihou.business.aps.instance.domain.basicdata.*;
|
|
|
+import com.github.zuihou.business.classSchedule.entity.ScheduleUser;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.*;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dto.OrderProductUpdateDTO;
|
|
@@ -551,7 +552,7 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
|
|
|
|
|
|
// 找出当前所有的订单计划还未开始加工的工件进行重排
|
|
|
QueryWrapper<Plan> planWrapper = new QueryWrapper<Plan>();
|
|
|
- planWrapper.eq("planStatus", "2");
|
|
|
+ planWrapper.eq("plan_status", "2");
|
|
|
List<Plan> plans = planMapper.selectList(planWrapper);
|
|
|
Map<Long,Plan> plansMap = plans.stream().collect(Collectors.toMap(Plan::getId, t->t));
|
|
|
|
|
@@ -561,7 +562,7 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
|
|
|
// 未生产工件表
|
|
|
QueryWrapper<TWorkpiece> tWorkpieceWrapper = new QueryWrapper<TWorkpiece>();
|
|
|
tWorkpieceWrapper.in("planId", planIds);
|
|
|
- tWorkpieceWrapper.in("produceStatus", "1");
|
|
|
+ tWorkpieceWrapper.in("produce_status", "1");
|
|
|
List<TWorkpiece> tWorkpieces = workpieceMapper.selectList(tWorkpieceWrapper);
|
|
|
|
|
|
List<OrderProduct> orderProductList = orderProductService.list(Wraps.<OrderProduct>lbQ().in(OrderProduct::getOrderId,orderIds));
|
|
@@ -709,7 +710,9 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
|
|
|
public Boolean deleteOrder(Order model){
|
|
|
// 判断计划是否在生产中,如果是在生产中不可删除
|
|
|
isFalse(checkPlan(model) > 0, "订单已生产,不可删除");
|
|
|
- int count = planMapper.updatePlanStatus(model);
|
|
|
+ int count = planMapper.delete(Wraps.<Plan>lbQ().eq(Plan::getId,model.getId()));
|
|
|
+ planProductMapper.delete(Wraps.<PlanProduct>lbQ().eq(PlanProduct::getPlanId,model.getId()));
|
|
|
+// int count = planMapper.updatePlanStatus(model);
|
|
|
if(count == 1){
|
|
|
return true;
|
|
|
}else{
|