Bladeren bron

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccjgmwz 3 jaren geleden
bovenliggende
commit
c7d484576a

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

@@ -298,19 +298,16 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     ContractManagementInfo contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id",inOutWarehouseTask.getCompId())
                     .eq("contract_no",inOutWarehouseTask.getContractNo()));
-                    if (contractManagementInfo!=null){
+                    //入库
+                    if (contractManagementInfo!=null&&"2".equals(inOutWarehouseTask.getInOutFlag())){
                         overNeight=inOutWarehouseTask.getWeight()*(contractManagementInfo.getOverShort()/100);
                     }
                     else {
-                        //临时库出库
                         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 {
+                        //移库入库
+                        if (contractManagementInfo==null&&"2".equals(inOutWarehouseTask.getInOutFlag())){
                             overNeight=inOutWarehouseTask.getWeight()*0.08f;
                         }
                     }
@@ -342,19 +339,16 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     ContractManagementInfo contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
                             .eq("comp_id",inOutWarehouseTask.getCompId())
                             .eq("contract_no",inOutWarehouseTask.getContractNo()));
-                    if (contractManagementInfo!=null){
+                    //入库
+                    if (contractManagementInfo!=null&&"2".equals(inOutWarehouseTask.getInOutFlag())){
                         overNeight=inOutWarehouseTask.getWeight()*(contractManagementInfo.getOverShort()/100);
                     }
                     else {
-                        //临时库出库
                         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 {
+                        //移库入库
+                        if (contractManagementInfo==null&&"2".equals(inOutWarehouseTask.getInOutFlag())){
                             overNeight=inOutWarehouseTask.getWeight()*0.08f;
                         }
                     }