zhangyuewww %!s(int64=3) %!d(string=hai) anos
pai
achega
e8da688dae

+ 11 - 11
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FreightReceivingDispatchingServiceImpl.java

@@ -228,10 +228,10 @@ public class FreightReceivingDispatchingServiceImpl extends ServiceImpl<FreightR
      */
     @Override
     public String confirmFreightReceivingDispatchingCar(FreightReceivingDispatchingCar freightReceivingDispatchingCar) {
-        freightReceivingDispatchingCar.setId(IdGenerator.generateUUID());
-        freightReceivingDispatchingCar.setStatusFlag("3");
-        freightReceivingDispatchingCar.setStatus("待结算");
-        freightReceivingDispatchingCarService.insert(freightReceivingDispatchingCar);
+        FreightReceivingDispatchingCar freightReceivingDispatchingCar1=freightReceivingDispatchingCarService.selectById(freightReceivingDispatchingCar.getId());
+        freightReceivingDispatchingCar1.setStatusFlag("3");
+        freightReceivingDispatchingCar1.setStatus("待结算");
+
         List<FreightReceivingDispatching> freightReceivingDispatchingList=this.selectList(new EntityWrapper<FreightReceivingDispatching>()
                 .eq("batch",freightReceivingDispatchingCar.getBatch())
                 .eq("delete_flag","0"));
@@ -241,13 +241,13 @@ public class FreightReceivingDispatchingServiceImpl extends ServiceImpl<FreightR
                 this.updateById(freightReceivingDispatching);
             }
             //发货净重小
-            if (freightReceivingDispatchingCar.getReciveNetWeight()< freightReceivingDispatchingCar.getDispatchNetWeight()){
-                freightReceivingDispatchingCar.setGoodsIngPayable(freightReceivingDispatchingCar.getReciveNetWeight()*freightReceivingDispatchingList.get(0).getGoodsPrice());
-                freightReceivingDispatchingCar.setFreightIngPayable(freightReceivingDispatchingCar.getReciveNetWeight()*freightReceivingDispatchingList.get(0).getFreightUnitPrice()-freightReceivingDispatchingCar.getFreightDeductionAmount());
+            if (freightReceivingDispatchingCar1.getReciveNetWeight()< freightReceivingDispatchingCar.getDispatchNetWeight()){
+                freightReceivingDispatchingCar1.setGoodsIngPayable(freightReceivingDispatchingCar1.getReciveNetWeight()*freightReceivingDispatchingList.get(0).getGoodsPrice());
+                freightReceivingDispatchingCar1.setFreightIngPayable(freightReceivingDispatchingCar1.getReciveNetWeight()*freightReceivingDispatchingList.get(0).getFreightUnitPrice()-freightReceivingDispatchingCar.getFreightDeductionAmount());
             }
             else{
-                freightReceivingDispatchingCar.setGoodsIngPayable(freightReceivingDispatchingCar.getDispatchNetWeight()*freightReceivingDispatchingList.get(0).getGoodsPrice());
-                freightReceivingDispatchingCar.setFreightIngPayable(freightReceivingDispatchingCar.getDispatchNetWeight()*freightReceivingDispatchingList.get(0).getFreightUnitPrice()-freightReceivingDispatchingCar.getFreightDeductionAmount());
+                freightReceivingDispatchingCar1.setGoodsIngPayable(freightReceivingDispatchingCar.getDispatchNetWeight()*freightReceivingDispatchingList.get(0).getGoodsPrice());
+                freightReceivingDispatchingCar1.setFreightIngPayable(freightReceivingDispatchingCar.getDispatchNetWeight()*freightReceivingDispatchingList.get(0).getFreightUnitPrice()-freightReceivingDispatchingCar.getFreightDeductionAmount());
 
             }
         }
@@ -258,8 +258,8 @@ public class FreightReceivingDispatchingServiceImpl extends ServiceImpl<FreightR
 //            freightReceivingDispatching.setStatus("收货");
 //            this.updateById(freightReceivingDispatching);
 //        }
-
-        return freightReceivingDispatchingCar.getId();
+        freightReceivingDispatchingCarService.updateById(freightReceivingDispatchingCar1);
+        return freightReceivingDispatchingCar1.getId();
     }
 
     /**