ccjgmwz 3 年之前
父節點
當前提交
5050baaa0f

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

@@ -1038,7 +1038,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     weightedDetails.setOriginalStock(original);
                     // 查询入库全加权成本
                     List<WeightedDetails> weightedDetailsList = weightedDetailsService.selectList(new EntityWrapper<WeightedDetails>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                            .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()).orderBy("update_date", false));
+                            .eq("goods_name", warehouseInOutInfo.getGoodsName()).orderBy("update_date", false));
 
                     // 计算新加权成本
                     Double newCost = 0d;
@@ -1074,7 +1074,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     // 修改成本信息表
                     CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", weightedDetails.getWarehouseId())
                             .eq("comp_id", weightedDetails.getCompId())
-                            .eq("goods_name_key", weightedDetails.getGoodsNameKey()));
+                            .eq("goods_name", weightedDetails.getGoodsName()));
 //                    List<WeightedDetails> weightedDetailsLists = weightedDetailsService.selectList(new EntityWrapper<WeightedDetails>().eq("warehouse_id", warehouseInOutInfo.getWarehouseName())
 //                            .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()).orderBy("update_date", false));
                     Double net = 0d;
@@ -1398,7 +1398,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                 }
                                 //出库时打入成本
                                 CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                                        .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
+                                        .eq("goods_name", warehouseInOutInfo.getGoodsName()));
                                 if(costManagementInfo != null) {
                                     tranCarInfo.setCost(costManagementInfo.getCost());
                                 }
@@ -1492,7 +1492,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                         if ("移库出库".equals(warehouseInOutInfo.getInOutType())){
                         //移库出库时打入成本
                         CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                                .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
+                                .eq("goods_name", warehouseInOutInfo.getGoodsName()));
                             if(costManagementInfo != null) {
                                 tranCarInfo.setCost(costManagementInfo.getCost());
                             }
@@ -1541,7 +1541,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                         }
                         //出库时打入成本
                         CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                                .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
+                                .eq("goods_name", warehouseInOutInfo.getGoodsName()));
                         if (costManagementInfo != null) {
                             warehouseInOutInfo.setWeightedCost(Float.valueOf(String.valueOf(costManagementInfo.getCost())));
                             warehouseInOutInfoService.updateById(warehouseInOutInfo);
@@ -1766,7 +1766,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                             else {
                                 //出库时打入成本
                                 CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                                        .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
+                                        .eq("goods_name", warehouseInOutInfo.getGoodsName()));
                                 if (costManagementInfo != null) {
                                     tranCarInfo.setCost(costManagementInfo.getCost());
                                 }
@@ -1817,7 +1817,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                             else {
                                 //出库时打入成本
                                 CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                                        .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
+                                        .eq("goods_name", warehouseInOutInfo.getGoodsName()));
                                 if (costManagementInfo != null) {
                                     tranCarInfo.setCost(costManagementInfo.getCost());
                                 }
@@ -1849,7 +1849,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     if (warehouseBaseInfo != null) {
                         //出库时打入成本
                         CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
-                                .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
+                                .eq("goods_name", warehouseInOutInfo.getGoodsNameKey()));
                         if (costManagementInfo != null) {
                             warehouseInOutInfo.setWeightedCost(Float.valueOf(String.valueOf(costManagementInfo.getCost())));
                             warehouseInOutInfoService.updateById(warehouseInOutInfo);
@@ -2016,7 +2016,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
     @Override
     public List<WarehouseInOutInfo> selectTemporaryGoodsNameList(String baseId) {
         List<WarehouseInOutInfo> warehouseInOutInfoList = this.selectList(new EntityWrapper<WarehouseInOutInfo>()
-                .eq("base_id", baseId).eq("delete_flag", "0").eq("status_flag", "3").groupBy("goods_name_key"));
+                .eq("base_id", baseId).eq("delete_flag", "0").eq("status_flag", "3").groupBy("goods_name"));
         return warehouseInOutInfoList;
     }