|
@@ -280,6 +280,10 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
map.put("newWeight",newWeight);
|
|
map.put("newWeight",newWeight);
|
|
//更新运输订单物资子表的件数和理论重量
|
|
//更新运输订单物资子表的件数和理论重量
|
|
}
|
|
}
|
|
|
|
+ if(map.get("theoryWeight") != null && !"".equals(map.get("theoryWeight"))) {
|
|
|
|
+ newWeight = DataChange.dataToBigDecimal(map.get("theoryWeight"));
|
|
|
|
+ map.put("newWeight",newWeight);
|
|
|
|
+ }
|
|
tmstruckWeightResultMapper.updateOrderMaterial(map);
|
|
tmstruckWeightResultMapper.updateOrderMaterial(map);
|
|
tmstruckWeightResultMapper.updateSaleMaterialId(saleMaterialId,materialNum,newWeight);
|
|
tmstruckWeightResultMapper.updateSaleMaterialId(saleMaterialId,materialNum,newWeight);
|
|
}else{
|
|
}else{
|
|
@@ -831,12 +835,30 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public String linkUpdateAPO(Map<String, Object> map, Integer orderType){
|
|
public String linkUpdateAPO(Map<String, Object> map, Integer orderType){
|
|
|
|
+
|
|
//如果等于1 则代表是需要变更采购订单号的订单
|
|
//如果等于1 则代表是需要变更采购订单号的订单
|
|
Map<String, Object> mesMap = tmstruckWeightResultMapper.getAPOMes(String.valueOf(map.get("ArrivalBillNo")));
|
|
Map<String, Object> mesMap = tmstruckWeightResultMapper.getAPOMes(String.valueOf(map.get("ArrivalBillNo")));
|
|
if (mesMap == null){
|
|
if (mesMap == null){
|
|
return map.get("ArrivalBillNo") + "系统没有此订单号!失败";
|
|
return map.get("ArrivalBillNo") + "系统没有此订单号!失败";
|
|
}
|
|
}
|
|
mesMap.put("orderNumber", map.get("orderNumber"));
|
|
mesMap.put("orderNumber", map.get("orderNumber"));
|
|
|
|
+
|
|
|
|
+ try{
|
|
|
|
+ new Thread( new Runnable() {
|
|
|
|
+ public void run(){
|
|
|
|
+ try {
|
|
|
|
+ Map<String,Object> oldOrderMes = tmstruckWeightResultMapper.getOldOrderMes(mesMap);
|
|
|
|
+ map.put("oldOrderMes",oldOrderMes);
|
|
|
|
+ JSONObject jsonObject = new JSONObject(map);
|
|
|
|
+ newFileTool.newFile(jsonObject.toString(),"计量-物流联动换单");
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }).start();
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
if(orderType == 20 || orderType == 15 || orderType == 16 || orderType == 23 || orderType == 24){
|
|
if(orderType == 20 || orderType == 15 || orderType == 16 || orderType == 23 || orderType == 24){
|
|
//20订单修改的表不一样呀,找寻该采购订单对应的最新需求id和计划id
|
|
//20订单修改的表不一样呀,找寻该采购订单对应的最新需求id和计划id
|
|
BigDecimal planId = tmstruckWeightResultMapper.selectNewPlanId(mesMap);
|
|
BigDecimal planId = tmstruckWeightResultMapper.selectNewPlanId(mesMap);
|
|
@@ -884,6 +906,11 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
//根据运输订单号查询计量实绩ID
|
|
//根据运输订单号查询计量实绩ID
|
|
BigDecimal weightTaskResultId = tmstruckWeightResultMapper.getWeightTaskResultIdNoNet(map);
|
|
BigDecimal weightTaskResultId = tmstruckWeightResultMapper.getWeightTaskResultIdNoNet(map);
|
|
BigDecimal saleMaterialId = tmstruckWeightResultMapper.getSaleMaterialId(map);
|
|
BigDecimal saleMaterialId = tmstruckWeightResultMapper.getSaleMaterialId(map);
|
|
|
|
+ //判断该分录在计量实绩表里有没有净重,如果有
|
|
|
|
+ //Map<String,Object> weightMesBySaleMaterialId = tmstruckWeightResultMapper.getWeightMesBySaleMaterialId(saleMaterialId);
|
|
|
|
+ //if(weightMesBySaleMaterialId != null && weightMesBySaleMaterialId.get("poundNo") != null) {
|
|
|
|
+ // //系统自动走删皮
|
|
|
|
+ //}
|
|
if(weightTaskResultId != null && saleMaterialId != null) {
|
|
if(weightTaskResultId != null && saleMaterialId != null) {
|
|
//更新计量实绩
|
|
//更新计量实绩
|
|
System.out.println("更新计量实绩校验");
|
|
System.out.println("更新计量实绩校验");
|