|
|
|
@ -1093,7 +1093,16 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public int deleteOrder(String[] orderIds) {
|
|
|
|
|
//可以进行订单关闭的数据
|
|
|
|
|
|
|
|
|
|
//未拆分,直接关闭订单
|
|
|
|
|
List<ProOrderWorkorder> checkOrders = proOrderWorkorderMapper.getOrderByOrders(orderIds);
|
|
|
|
|
if(!CollectionUtils.isEmpty(checkOrders)){
|
|
|
|
|
int m0 = proOrderMapper.deleteProOrderByIds(orderIds);
|
|
|
|
|
logger.info(orderIds[0]+"删除订单m0:"+m0);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//已经存在工单可以进行订单关闭的数据
|
|
|
|
|
List<ProOrderWorkorder> checkWorkOrders = proOrderWorkorderMapper.getWorkOrderByOrders(orderIds);
|
|
|
|
|
if(checkWorkOrders.size() != orderIds.length){
|
|
|
|
|
return 2;
|
|
|
|
@ -1138,7 +1147,6 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
closeR.getCode()+","+
|
|
|
|
|
closeR.getMsg()+","+
|
|
|
|
|
closeR.getData());
|
|
|
|
|
//if(closeR.getCode()==200){
|
|
|
|
|
String[] workorderIds = (String[]) delteIds.toArray(new String[delteIds.size()]);
|
|
|
|
|
if (workorderIds.length > 0) {
|
|
|
|
|
//删除工单(字母)pro_order_workorder
|
|
|
|
@ -1160,11 +1168,6 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
int m5 = proOrderMapper.updateCloseOrderBatch(workers);
|
|
|
|
|
logger.info(workorderCodes.get(0)+"删除订单m5:"+m5);
|
|
|
|
|
}
|
|
|
|
|
// }else{
|
|
|
|
|
// logger.info(workorder.getWorkorderCode()+"删除订单后关闭订单sap返回结果:"+
|
|
|
|
|
// JSONObject.toJSONString(closeR));
|
|
|
|
|
// return 0;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|