|
@@ -3,6 +3,7 @@ package com.steerinfo.dil.service.impl;
|
|
import com.steerinfo.dil.feign.OmsFeign;
|
|
import com.steerinfo.dil.feign.OmsFeign;
|
|
import com.steerinfo.dil.mapper.TmstruckReturnResultMapper;
|
|
import com.steerinfo.dil.mapper.TmstruckReturnResultMapper;
|
|
import com.steerinfo.dil.mapper.TmstruckTotalResultMapper;
|
|
import com.steerinfo.dil.mapper.TmstruckTotalResultMapper;
|
|
|
|
+import com.steerinfo.dil.mapper.UtilsMapper;
|
|
import com.steerinfo.dil.model.TmstruckReturnResult;
|
|
import com.steerinfo.dil.model.TmstruckReturnResult;
|
|
import com.steerinfo.dil.model.TmstruckTotalResult;
|
|
import com.steerinfo.dil.model.TmstruckTotalResult;
|
|
|
|
|
|
@@ -43,6 +44,9 @@ public class TmstruckReturnResultServiceImpl implements ITmstruckReturnResultSer
|
|
@Autowired
|
|
@Autowired
|
|
private OmsFeign omsFeign;
|
|
private OmsFeign omsFeign;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ UtilsMapper utilsMapper;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private TmstruckTotalResultMapper tmstruckTotalResultMapper;
|
|
private TmstruckTotalResultMapper tmstruckTotalResultMapper;
|
|
|
|
|
|
@@ -53,6 +57,8 @@ public class TmstruckReturnResultServiceImpl implements ITmstruckReturnResultSer
|
|
@Autowired
|
|
@Autowired
|
|
private TmstruckWeightResultServiceImpl tmstruckWeightResultService;
|
|
private TmstruckWeightResultServiceImpl tmstruckWeightResultService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -75,23 +81,45 @@ public class TmstruckReturnResultServiceImpl implements ITmstruckReturnResultSer
|
|
//生成主键
|
|
//生成主键
|
|
BigDecimal maxId = tmstruckReturnResultMapper.selectMaxId();
|
|
BigDecimal maxId = tmstruckReturnResultMapper.selectMaxId();
|
|
tmstruckReturnResult.setResultId(maxId);
|
|
tmstruckReturnResult.setResultId(maxId);
|
|
-// //通过运输订单号获得 运输订单ID
|
|
|
|
-// map.putAll(tmstruckReturnResultMapper.getResultTotalIdByOrderNumber((String) map.get("orderNumber")));
|
|
|
|
tmstruckReturnResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
|
|
tmstruckReturnResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
|
|
-// BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
|
-// //调用更新退货实绩接口
|
|
|
|
-// omsFeign.updateOmsTruckOrder(map);
|
|
|
|
-// //设置首次新增时的常规字段
|
|
|
|
|
|
+ tmstruckReturnResult.setInsertUpdateRemark((String) map.get("returnReason"));
|
|
addRegularField(tmstruckReturnResult);
|
|
addRegularField(tmstruckReturnResult);
|
|
//新增退货实绩
|
|
//新增退货实绩
|
|
int i = tmstruckReturnResultMapper.insertSelective(tmstruckReturnResult);
|
|
int i = tmstruckReturnResultMapper.insertSelective(tmstruckReturnResult);
|
|
-// //逻辑删除运单
|
|
|
|
-// int i1 = utilsService.updateOrderStatus(map, 7);
|
|
|
|
-// //重新新增销售运输订单
|
|
|
|
-// int i2 = addNewOrder(orderId);
|
|
|
|
|
|
+ i += utilsService.updateOrderLineSequence(map); //当前新订单路段顺序号 + 1
|
|
|
|
+ //通过运输订单ID查询物资ID
|
|
|
|
+ List<Integer> orderIdList = utilsMapper.getMaterialIdByOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
|
|
|
|
+ Integer materialId = orderIdList.get(0);
|
|
|
|
+ map.put("materialId", materialId);
|
|
|
|
+ //通过物资ID匹配汽车衡 --遗留问题
|
|
|
|
+ map.put("grossPlaceId", 6);
|
|
|
|
+ //发送计量委托
|
|
|
|
+ i += tmstruckMeasureCommissionService.addMaoMeasureCommission(map);
|
|
return i;
|
|
return i;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ TmstruckReturnResult tmstruckReturnResult = new TmstruckReturnResult();
|
|
|
|
+ //生成主键
|
|
|
|
+ BigDecimal maxId = tmstruckReturnResultMapper.selectMaxId();
|
|
|
|
+ tmstruckReturnResult.setResultId(maxId);
|
|
|
|
+ //通过运输订单号获得 运输订单ID
|
|
|
|
+ map.putAll(tmstruckReturnResultMapper.getResultTotalIdByOrderNumber((String) map.get("orderNumber")));
|
|
|
|
+ tmstruckReturnResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
|
|
|
|
+ BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
|
+ //调用更新退货实绩接口
|
|
|
|
+ omsFeign.updateOmsTruckOrder(map);
|
|
|
|
+ //设置首次新增时的常规字段
|
|
|
|
+ addRegularField(tmstruckReturnResult);
|
|
|
|
+ //新增退货实绩
|
|
|
|
+ int i = tmstruckReturnResultMapper.insertSelective(tmstruckReturnResult);
|
|
|
|
+ //逻辑删除运单
|
|
|
|
+ int i1 = utilsService.updateOrderStatus(map, 7);
|
|
|
|
+ //重新新增销售运输订单
|
|
|
|
+ int i2 = addNewOrder(orderId);
|
|
|
|
+ return i;
|
|
|
|
+ */
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询退货实绩
|
|
* 查询退货实绩
|
|
* @param map
|
|
* @param map
|