zhangyuewww 3 vuotta sitten
vanhempi
commit
13a281cc5a

+ 22 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -257,9 +257,18 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     if (contractManagementInfo!=null){
                         overNeight=inOutWarehouseTask.getWeight()*(contractManagementInfo.getOverShort()/100);
                     }
-                    //移库可超出百分之8
                     else {
-                        overNeight=inOutWarehouseTask.getWeight()*0.08f;
+                        //临时库出库
+                        contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                                .eq("comp_id",inOutWarehouseTask.getCompId())
+                                .eq("contract_no",inOutWarehouseTask.getWarehouseName()));
+                        if (contractManagementInfo!=null){
+                            overNeight=inOutWarehouseTask.getWeight()*(contractManagementInfo.getOverShort()/100);
+                        }
+                        //移库可超出百分之8
+                        else {
+                            overNeight=inOutWarehouseTask.getWeight()*0.08f;
+                        }
                     }
                     inOutWarehouseTask.setCompletedQuantity(inOutWarehouseTask.getCompletedQuantity()+warehouseInOutInfo.getNetWeight());
                     if (inOutWarehouseTask.getCompletedQuantity()>inOutWarehouseTask.getWeight()+overNeight){
@@ -289,9 +298,18 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     if (contractManagementInfo!=null){
                         overNeight=inOutWarehouseTask.getWeight()*(contractManagementInfo.getOverShort()/100);
                     }
-                    //移库可超出百分之8
                     else {
-                        overNeight=inOutWarehouseTask.getWeight()*0.08f;
+                        //临时库出库
+                        contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                                .eq("comp_id",inOutWarehouseTask.getCompId())
+                                .eq("contract_no",inOutWarehouseTask.getWarehouseName()));
+                        if (contractManagementInfo!=null){
+                            overNeight=inOutWarehouseTask.getWeight()*(contractManagementInfo.getOverShort()/100);
+                        }
+                        //移库可超出百分之8
+                        else {
+                            overNeight=inOutWarehouseTask.getWeight()*0.08f;
+                        }
                     }
                     inOutWarehouseTask.setCompletedQuantity(inOutWarehouseTask.getCompletedQuantity()+warehouseInOutInfo.getNetWeight());
                     if (inOutWarehouseTask.getCompletedQuantity()>inOutWarehouseTask.getWeight()+overNeight){