|
|
|
@ -167,12 +167,10 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
|
ArrayList<String> strings = new ArrayList<>();
|
|
|
|
|
for (ProOrderWorkorder proOrderWorkorder : proOrderWorkorders) {
|
|
|
|
|
String status = proOrderWorkorder.getStatus();
|
|
|
|
|
// strings.add(status);
|
|
|
|
|
// 更新代码逻辑-wws
|
|
|
|
|
if (status.equals("w0")){
|
|
|
|
|
strings.add(proOrderWorkorder.getWorkorderId());
|
|
|
|
|
} else {
|
|
|
|
|
throw new ServiceException("工单已经下单,不能删除!");
|
|
|
|
|
throw new ServiceException("工单已经下发,不能删除!");
|
|
|
|
|
}
|
|
|
|
|
// 判断是否含有湿料计划 boolean值(存在为true,不存在为false)
|
|
|
|
|
if (proWetMaterialPlanDetailService.selectProWetMaterialPlanDetailByWorkId(proOrderWorkorder.getWorkorderId())) {
|
|
|
|
@ -180,36 +178,6 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String[] orderWorkerIds= strings.toArray(new String[0]);
|
|
|
|
|
// 更新代码逻辑-wws
|
|
|
|
|
/*
|
|
|
|
|
for (String orderWorkerId : orderWorkerIds) {
|
|
|
|
|
if (orderWorkerId.equals("w0")){
|
|
|
|
|
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
|
|
|
|
|
} else {
|
|
|
|
|
throw new ServiceException("工单已经下单,不能删除!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ProOrderWorkorder proOrderWorkorder = new ProOrderWorkorder();
|
|
|
|
|
// String status = proOrderWorkorder.getStatus();
|
|
|
|
|
// ProOrder proOrder = new ProOrder();
|
|
|
|
|
// String status1 = proOrder.getStatus();
|
|
|
|
|
// if (proOrderWorkorder != null) {
|
|
|
|
|
// int parsedStatus1 = Integer.parseInt(status1);
|
|
|
|
|
// int parsedStatus = Integer.parseInt(status);
|
|
|
|
|
//
|
|
|
|
|
// if (parsedStatus1 == 1 && parsedStatus == 0) {
|
|
|
|
|
// proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds);
|
|
|
|
|
// } else {
|
|
|
|
|
// throw new ServiceException("订单未拆分或工单已经下单");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 更新代码逻辑-wws
|
|
|
|
|
//return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
|
|
|
|
|
|
|
|
|
|
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(orderWorkerIds));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|