|
@@ -582,12 +582,14 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
result += omstruckOrderMapper.deleteUnloadResult(resultTotalId);
|
|
|
result += omstruckOrderMapper.deleteLoadResult(resultTotalId);
|
|
|
result += omstruckOrderMapper.deleteLeaveResult(resultTotalId);
|
|
|
- if(orderType == 15 || orderType == 16 || orderType == 19){
|
|
|
+ if(orderType == 12 || orderType == 13 || orderType == 14 || orderType == 19){
|
|
|
Map<String, Object> sporadicOrderTimes = omstruckOrderMapper.getSporadicOrderTimes(orderId);
|
|
|
BigDecimal orderTimes =(BigDecimal)sporadicOrderTimes.get("orderTimes");
|
|
|
BigDecimal transTimes = (BigDecimal)sporadicOrderTimes.get("transTimes");
|
|
|
//更新趟次
|
|
|
omstruckOrderSeparateService.updateTimes(orderPlanId,orderTimes.intValue()+1);
|
|
|
+ //更新状态
|
|
|
+ omstruckOrderSeparateMapper.updateSporadicStatus(orderPlanId,1);
|
|
|
//更新已运输趟次
|
|
|
if (transTimes.intValue()>0) {
|
|
|
omstruckOrderSeparateMapper.updateTranTimes(orderPlanId, transTimes.intValue() - 1);
|
|
@@ -803,7 +805,7 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
omstruckOrderSeparateService.addAllSonResult(orderMessage);
|
|
|
}
|
|
|
//判断订单是否是一车多单
|
|
|
- if (orderType ==15 || orderType ==16 || orderType ==19) {
|
|
|
+ if (orderType ==12 || orderType ==13 || orderType ==14 || orderType ==19) {
|
|
|
//通过订单查询趟次
|
|
|
Map<String, Object> sporadicOrderTimes = omstruckOrderMapper.getSporadicOrderTimes(orderId);
|
|
|
BigDecimal orderTimes = DataChange.dataToBigDecimal(sporadicOrderTimes.get("orderTimes"));
|
|
@@ -812,10 +814,14 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
//生成作业实绩之后、更改订单数量
|
|
|
if (orderMessage.containsKey("orderPlanId") && orderTimes.intValue() > 0) {
|
|
|
int state =0;
|
|
|
+ //如果运输趟次,接完之后将变成0
|
|
|
+ if(orderTimes.intValue() == 1){
|
|
|
+ //修改零星订单运输状态
|
|
|
+ state +=omstruckOrderSeparateMapper.updateSporadicStatus(DataChange.dataToBigDecimal(orderMessage.get("orderPlanId")),0);
|
|
|
+ }
|
|
|
state+=omstruckOrderSeparateService.updateTimes(new BigDecimal(orderMessage.get("orderPlanId").toString()), orderTimes.intValue() - 1);
|
|
|
//接收订单以后已运输订单趟次+1
|
|
|
state+=omstruckOrderSeparateMapper.updateTranTimes(DataChange.dataToBigDecimal(orderMessage.get("orderPlanId").toString()),transTimes.intValue()+1);
|
|
|
- System.out.println(state);
|
|
|
}
|
|
|
}
|
|
|
} else { //其他状态都视为 拒绝接单
|
|
@@ -1938,15 +1944,11 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
mesMap = omstruckOrderMapper.getInwardOrderMessageToApp(map);
|
|
|
inwardType += "计重";
|
|
|
mesMap.put("inwardType", inwardType);
|
|
|
- mesMap.put("shipperName","四川省达州钢铁集团有限责任公司");
|
|
|
- mesMap.put("consigneeCompanyName","四川省达州钢铁集团有限责任公司");
|
|
|
break;
|
|
|
case 21:
|
|
|
mesMap = omstruckOrderMapper.getInwardTimeOrderMessageToApp(map);
|
|
|
inwardType += "计时";
|
|
|
mesMap.put("inwardType", inwardType);
|
|
|
- mesMap.put("shipperName","四川省达州钢铁集团有限责任公司");
|
|
|
- mesMap.put("consigneeCompanyName","四川省达州钢铁集团有限责任公司");
|
|
|
break;
|
|
|
case 12:
|
|
|
case 13:
|
|
@@ -1990,6 +1992,13 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
+ if(orderType == 12|| orderType == 13 || orderType == 14 || orderType == 19){
|
|
|
+ Integer sporadicStatus = omstruckOrderSeparateMapper.getSporadicStatus(orderMesMap.get("orderId"));
|
|
|
+ omstruckOrderMapper.closeTruckOrder(DataChange.dataToBigDecimal(orderMesMap.get("orderId")));
|
|
|
+ if(sporadicStatus == 0){ // 数据为0则失效
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
//如果订单类型为11 当订单大于截止日期时,不显示订单
|
|
|
if(orderType == 11){
|
|
|
int result = omstruckOrderSeparateMapper.getInward(orderMesMap.get("orderId"));
|