Browse Source

修改 报关对接 PO没有物料的问题

chenjx 5 years ago
parent
commit
93891126aa
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/main/java/com/uas/eis/serviceImpl/ErpServiceImpl.java

+ 6 - 4
src/main/java/com/uas/eis/serviceImpl/ErpServiceImpl.java

@@ -387,15 +387,17 @@ public class ErpServiceImpl implements ErpService {
         //主表数据(业务类型、成交方式、单号、结算方式)
         Object[] formData = baseDao.getFieldsDataByCondition("CUSTOMTABLE left join employee on ct_recorder=em_name",new String[]{"ct_biz_type_user","transaction_mode_user","ct_code","settlemethod_user","ct_recorder",
                 "em_mobile","invoice_user","packing_list_user","conf_includes_user"},"CT_CALLER='ZX-0001' and CT_ID="+poId);
+        //第一行数据
+        SqlRowList firstRs = baseDao.queryForRowSet("select pu_vendcode,pu_currency,pr_spec,pr_brand,pr_detail,pr_unit,cd_varchar50_8,cd_number_1,round(pd_total*(cd_number_1/pd_qty),2) amount,round(round(pd_total*(cd_number_1/pd_qty),2)/cd_number_1,6) price,cd_number_2,cd_number_3,cd_number_4 from customtabledetail left join Purchase on pu_code=cd_varchar50_1 left join PurchaseDetail on pd_puid=pu_id left join Product on cd_varchar50_3 = pr_code where cd_ctid="+poId+" order by cd_detno");
         //从表数据
-        SqlRowList rs = baseDao.queryForRowSet("select pu_vendcode,pu_currency,pr_spec,pr_brand,pr_detail,pr_unit,cd_varchar50_8,cd_number_1,round(pd_total*(cd_number_1/pd_qty),2) amount,round(round(pd_total*(cd_number_1/pd_qty),2)/cd_number_1,6) price,cd_number_2,cd_number_3 from customtabledetail left join Purchase on pu_code=cd_varchar50_1 left join PurchaseDetail on pd_puid=pu_id left join Product on cd_varchar50_3 = pr_code where cd_ctid="+poId+" order by cd_detno");
+        SqlRowList rs = baseDao.queryForRowSet("select pu_vendcode,pu_currency,pr_spec,pr_brand,pr_detail,pr_unit,cd_varchar50_8,cd_number_1,round(pd_total*(cd_number_1/pd_qty),2) amount,round(round(pd_total*(cd_number_1/pd_qty),2)/cd_number_1,6) price,cd_number_2,cd_number_3,cd_number_4 from customtabledetail left join Purchase on pu_code=cd_varchar50_1 left join PurchaseDetail on pd_puid=pu_id left join Product on cd_varchar50_3 = pr_code where cd_ctid="+poId+" order by cd_detno");
         //供应商
         String vendName="";
         //订单币别
         String currency="";
-        if (rs.next()){
-            vendName=rs.getGeneralString("pu_vendcode");
-            currency=rs.getGeneralString("pu_currency");
+        if (firstRs.next()){
+            vendName=firstRs.getGeneralString("pu_vendcode");
+            currency=firstRs.getGeneralString("pu_currency");
         }
         //业务类型
         dataMaps.put("bizType",formData[0]);