ccj 2 rokov pred
rodič
commit
36bb9454bd

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/BiInfoController.java

@@ -178,7 +178,7 @@ public class BiInfoController {
                 .eq("delete_flag", "0").eq("comp_id", companyId).orderBy("create_date", false));
         if (CollectionUtils.isNotEmpty(contractManagementInfos)) {
             for (int i = 0; i < 10; i++) {
-                if (contractManagementInfos.size() < i) {
+                if (contractManagementInfos.size() <= i) {
                     break;
                 }
                 contractManagementInfoList.add(contractManagementInfos.get(i));

+ 9 - 9
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/XmlUtil.java

@@ -145,9 +145,9 @@ public class XmlUtil implements InitializingBean {
         Float weight = paymentManagement.getNetWeight();
         Double as = paymentManagement.getAmountIngPayable()/weight * 100;
         String goodsName = paymentManagement.getGoodsName();
-        if("玉米(潮粮)".equals(paymentManagement.getGoodsName())){
-//            paymentManagement.setGoodsName("玉米");
-            goodsName = "玉米";
+        if(paymentManagement.getGoodsName()!= null && paymentManagement.getGoodsName().contains("潮粮")){
+            paymentManagement.setGoodsName(paymentManagement.getGoodsName().replace("(潮粮)",""));
+//            goodsName = "玉米";
             weight = paymentManagement.getPureWeight();
         }
         if(paymentManagement.getPureWeight() == null){
@@ -260,9 +260,9 @@ public class XmlUtil implements InitializingBean {
         Float weight = paymentManagement.getNetWeight();
         Double as = paymentManagement.getAmountIngPayable()/weight * 100;
         String goodsName = paymentManagement.getGoodsName();
-        if("玉米(潮粮)".equals(paymentManagement.getGoodsName())){
-//            paymentManagement.setGoodsName("玉米");
-            goodsName = "玉米";
+        if(paymentManagement.getGoodsName()!= null && paymentManagement.getGoodsName().contains("潮粮")){
+            paymentManagement.setGoodsName(paymentManagement.getGoodsName().replace("(潮粮)",""));
+//            goodsName = "玉米";
             weight = paymentManagement.getPureWeight();
         }
         if(paymentManagement.getPureWeight() == null){
@@ -374,9 +374,9 @@ public class XmlUtil implements InitializingBean {
         Float weight = paymentManagement.getPureWeight();
         Double as = paymentManagement.getAmountIngPayable()/weight * 100;
         String goodsName = paymentManagement.getGoodsName();
-        if("玉米(潮粮)".equals(paymentManagement.getGoodsName())){
-//            paymentManagement.setGoodsName("玉米");
-            goodsName = "玉米";
+        if(paymentManagement.getGoodsName()!= null && paymentManagement.getGoodsName().contains("潮粮")){
+            paymentManagement.setGoodsName(paymentManagement.getGoodsName().replace("(潮粮)",""));
+//            goodsName = "玉米";
             weight = paymentManagement.getPureWeight();
         }
         if(paymentManagement.getPureWeight() == null){

+ 5 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -119,7 +119,7 @@
         case when m.deliver_type = '1' then ifNull(r.amount_ed_payable,0) else 0 end as freight,
         '' as supplier,
         w.goods_name as goodsName,
-        case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
+        case when w.goods_name like '%潮粮%' then '潮粮' else '干粮' end as type,
         w.grade as grade,
         IFNULL(wd.water_content,q.water_content) as waterContent,
         IFNULL(wd.impurity,q.impurity) as impurity,
@@ -192,7 +192,7 @@
         ROUND(IFNULL(r.amount_ed_payable,IFNULL(t.tran_price,0)*t.load_net_weight),2) as freight,
         '' as supplier,
         w.goods_name as goodsName,
-        case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
+        case when w.goods_name like '%潮粮%' then '潮粮' else '干粮' end as type,
         w.grade as grade,
         q.water_content as waterContent,
         q.impurity as impurity,
@@ -271,7 +271,7 @@
         0 as freight,
         '' as supplier,
         w.goods_name as goodsName,
-        case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
+        case when w.goods_name = like '%潮粮%' then '潮粮' else '干粮' end as type,
         w.grade as grade,
         d.water_content as waterContent,
         d.impurity as impurity,
@@ -335,7 +335,7 @@
         '' as remark,
         w.in_out_task_no as inOutTaskNo,
         w.goods_name as goodsName,
-        case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
+        case when w.goods_name like '%潮粮%' then '潮粮' else '干粮' end as type,
         w.grade as grade,
         d.water_content as waterContent,
         d.impurity as impurity,
@@ -408,7 +408,7 @@
         wm.customer as remark,
         w.in_out_task_no as inOutTaskNo,
         g.goods_name as goodsName,
-        case when g.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
+        case when g.goods_name like '%潮粮%' then '潮粮' else '干粮' end as type,
         g.grade as grade,
         g.water_content as waterContent,
         g.impurity as impurity,

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehousingOrderMapper.xml

@@ -335,7 +335,7 @@
     <select id="getGoodCostListByCondition" parameterType="Map"
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.WarehousingOrder">
         SELECT
-            case when (wioi.goods_name not like '%潮粮%' and wioi.goods_name like '%玉米%') then  '玉米'  else wioi.goods_name end as goodsName,
+            REPLACE(wioi.goods_name,'(潮粮)','')as goodsName,
             SUM(IFNULL(spr.amount_ing_payable,0)+IFNULL(pm.amount_ing_payable,0)) /SUM(wioi.net_weight) AS avgCost
         FROM
             warehouse_in_out_info wioi
@@ -349,7 +349,7 @@
             AND wioi.status_flag = '3'
             and wioi.update_date> #{beforeDay}
         GROUP BY
-            case when (wioi.goods_name not like '%潮粮%' and wioi.goods_name like '%玉米%') then  '玉米'  else wioi.goods_name end;
+            REPLACE(wioi.goods_name,'(潮粮)','');
     </select>
     <!-- 移库入库单查询 -->
     <select id="getMoveListByCondition"