|
|
|
@ -167,13 +167,21 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
|
ArrayList<String> strings = new ArrayList<>();
|
|
|
|
|
for (ProOrderWorkorder proOrderWorkorder : proOrderWorkorders) {
|
|
|
|
|
String status = proOrderWorkorder.getStatus();
|
|
|
|
|
strings.add(status);
|
|
|
|
|
// strings.add(status);
|
|
|
|
|
// 更新代码逻辑-wws
|
|
|
|
|
if (status.equals("w0")){
|
|
|
|
|
strings.add(proOrderWorkorder.getWorkorderId());
|
|
|
|
|
} else {
|
|
|
|
|
throw new ServiceException("工单已经下单,不能删除!");
|
|
|
|
|
}
|
|
|
|
|
// 判断是否含有湿料计划 boolean值(存在为true,不存在为false)
|
|
|
|
|
if (proWetMaterialPlanDetailService.selectProWetMaterialPlanDetailByWorkId(proOrderWorkorder.getWorkorderId())) {
|
|
|
|
|
throw new ServiceException("工单已创建湿料计划,不能删除!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String[] orderWorkerIds= strings.toArray(new String[0]);
|
|
|
|
|
// 更新代码逻辑-wws
|
|
|
|
|
/*
|
|
|
|
|
for (String orderWorkerId : orderWorkerIds) {
|
|
|
|
|
if (orderWorkerId.equals("w0")){
|
|
|
|
|
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
|
|
|
|
@ -181,6 +189,7 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
|
throw new ServiceException("工单已经下单,不能删除!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ProOrderWorkorder proOrderWorkorder = new ProOrderWorkorder();
|
|
|
|
@ -197,7 +206,11 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
|
// throw new ServiceException("订单未拆分或工单已经下单");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
|
|
|
|
|
|
|
|
|
|
// 更新代码逻辑-wws
|
|
|
|
|
//return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
|
|
|
|
|
|
|
|
|
|
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(orderWorkerIds));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|