|
@@ -618,6 +618,7 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
//撤销订单的同时删除计量数据
|
|
|
String url = "http://172.16.33.122:44325/api/logistics/delEntrust";
|
|
|
String sendUrl = url + "?orderNumber=" + orderNumber;
|
|
|
+ System.out.println(sendUrl);
|
|
|
String jsonData = getRequestUtils.doGet(sendUrl);
|
|
|
System.out.println(jsonData);
|
|
|
JSONObject jsonObject=null;
|
|
@@ -994,29 +995,25 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
long time = receiveTime.getTime() - issueTime.getTime();
|
|
|
long min = time / (1000 * 60);
|
|
|
omstruckOrder.setOrderCommunicationDuration(new BigDecimal(min));
|
|
|
- try{
|
|
|
- new Thread( new Runnable() {
|
|
|
- public void run(){
|
|
|
- if (orderType == 1) {
|
|
|
- //如果是钢材订单,判断两天有没有进厂
|
|
|
- Date enFactoryTime = omstruckOrderMapper.selectCapacityTimesTwoDay((String) map.get("capacityNumber"));
|
|
|
- if (enFactoryTime != null) {
|
|
|
- //如果两天内进厂时间不为空,那么看着两天后车辆有没有出厂纪录
|
|
|
- if(omstruckOrderMapper.selectOutFactoryTimes((String) map.get("capacityNumber"),enFactoryTime) == 0) {
|
|
|
- //该车两天内有进厂,且进厂后没有出厂纪录
|
|
|
- //更新ok
|
|
|
- omstruckOrderMapper.updateEnFactoryResultRemark(DataChange.dataToBigDecimal(orderMessage.get("resultTotalId")));
|
|
|
- tmsTruckFeign.enFactoryResultByPDA(orderMessage);
|
|
|
- saleLogUtil.logOrder(orderId,"两天内进厂且无出厂纪录,系统自动补扫进厂",map,1);
|
|
|
- }
|
|
|
- }
|
|
|
+ try {
|
|
|
+ if (orderType == 1) {
|
|
|
+ //如果是钢材订单,判断两天有没有进厂
|
|
|
+ Date enFactoryTime = omstruckOrderMapper.selectCapacityTimesTwoDay((String) map.get("capacityNumber"));
|
|
|
+ if (enFactoryTime != null) {
|
|
|
+ //如果两天内进厂时间不为空,那么看着两天后车辆有没有出厂纪录
|
|
|
+ if(omstruckOrderMapper.selectOutFactoryTimes((String) map.get("capacityNumber"),enFactoryTime) == 0) {
|
|
|
+ //该车两天内有进厂,且进厂后没有出厂纪录
|
|
|
+ //更新ok
|
|
|
+ System.out.println("自动补扫进厂");
|
|
|
+ omstruckOrderMapper.updateEnFactoryResultRemark(DataChange.dataToBigDecimal(orderMessage.get("resultTotalId")));
|
|
|
+ tmsTruckFeign.enFactoryResultByPDA(orderMessage);
|
|
|
+ saleLogUtil.logOrder(orderId,"两天内进厂且无出厂纪录,系统自动补扫进厂",map,1);
|
|
|
}
|
|
|
}
|
|
|
- }).start();
|
|
|
- }catch (Exception e) {
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
return omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
|
|
|
}
|
|
|
|