huangfuli %!s(int64=3) %!d(string=hai) anos
pai
achega
d1935bb9f6

+ 3 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -4191,7 +4191,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(date);
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(6);
-                cell.setCellValue(editString(exportVView.getContractNo()));
+                if(!StringUtils.isEmpty(exportVView.getContractNo())){
+                    cell.setCellValue(editString(exportVView.getContractNo()));
+                }
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(7);
                 cell.setCellValue(editString(exportVView.getContractStatus()));

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

@@ -314,7 +314,8 @@
         w.bin_number as binNumber,
         w.create_date as createDate,
         IFNULL(m.unit_contract_price,IFNULL(w.cost,0))+IFNULL(t.tran_price,0) as costPrice,
-        w.warehouse_name as contractNo,
+--         w.warehouse_name as contractNo,
+        case when m.contract_type = '1' then m.contract_no else '' end as contractNo,
         '' as customerName,
         w.goods_name as goodsName,
         case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
@@ -382,7 +383,7 @@
         w.bin_number as binNumber,
         s.delivery_date as createDate,
         cm.cost as costPrice,
-        s.contract_no as contractNo,
+        case when m.contract_type = '1' then m.contract_no else '' end as contractNo,
         m.buyer as customerName,
         g.goods_name as goodsName,
         case when g.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
@@ -431,8 +432,7 @@
         left join tran_settlement_report r on r.car_id = i.id and r.delete_flag = 0
         left join cost_management_info cm on cm.warehouse_name = t.send_warehouse and cm.comp_id = t.comp_id and
         cm.goods_name = t.goods_name and cm.delete_flag = 0
-        left join contract_management_info m on m.contract_no = s.contract_no and m.comp_id=s.comp_id and m.delete_flag
-        = 0
+        left join contract_management_info m on m.contract_no = s.contract_no and m.comp_id=s.comp_id and m.delete_flag = 0
         left join contract_goods_info g on m.id=g.contract_id and g.delete_flag = 0
         WHERE s.delete_flag = '0'
         AND s.comp_id = #{compId}