Просмотр исходного кода

k3对接退货单查询报错修复

hu 2 лет назад
Родитель
Сommit
30d8b88664

+ 1 - 1
src/custom/restcontroller/webmanage/lsak3/aftersalesmag/aftersalesmag.java

@@ -27,7 +27,7 @@ public class aftersalesmag extends Controller {
      */
     @API(title = "获取DRP返退单", apiversion = R.ID20230715093903.v1.class,accesstoken = false)
     public String getAftersalesmag() throws YosException{
-        Rows rows = dbConnect.runSqlQuery("select t2.k3outcode fk3outcode,t1.updatek3flag fupdatek3flag,t1.sa_aftersalesmagid salereturnbillid,t1.billno fbillnum,t1.createby,t1.billdate fdate,t2.agentnum fagentnum,t1.reason fnotes from sa_aftersalesmag t1 inner join sa_agents t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t1.siteid=t2.siteid where (t1.fupdatek3flag='0' or t1.fupdatek3flag='2') and t1.createby !='LSA总0001' and t1.siteid='lsa'");
+        Rows rows = dbConnect.runSqlQuery("select t2.k3outcode fk3outcode,t1.updatek3flag fupdatek3flag,t1.sa_aftersalesmagid salereturnbillid,t1.billno fbillnum,t1.createby,t1.billdate fdate,t2.agentnum fagentnum,t1.reason fnotes from sa_aftersalesmag t1 inner join sa_agents t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t1.siteid=t2.siteid where (t1.updatek3flag='0' or t1.updatek3flag='2') and t1.createby !='LSA总0001' and t1.siteid='lsa'");
         for (Row row : rows) {
             String sa_aftersalesmagid = row.getString("sa_aftersalesmagid");
             Rows detailRows = dbConnect.runSqlQuery("select t2.k3outcode fk3outcode,t1.st_stockbill_itemsid salereturnbilldeid,t2.itemno fitemno,t1.qty fqty,t1.price fprice,t1.reason fnotes,t4.billno fsaleissuebillno, t3.rowno fsaleissuebillentryid from sa_aftersalesmag_items t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join st_stockbill_items t3 on t1.st_stockbill_itemsid=t3.st_stockbill_itemsid and t1.siteid=t3.siteid left join st_stockbill t4 on t3.st_stockbillid=t4.st_stockbillid and t3.siteid=t4.siteid where t1.sa_aftersalesmagid='" + sa_aftersalesmagid + "' and t1.siteid='lsa'");