Преглед изворни кода

k3对接到yos的接口暂时由lsa站点改为lsa1986测试站点

hu пре 2 година
родитељ
комит
96f2db3106

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

@@ -27,10 +27,10 @@ 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.updatek3flag='0' or t1.updatek3flag='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='lsa1986'");
         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'");
+            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='lsa1986'");
             row.put("salereturnbilldetil", detailRows.toJsonArray());
         }
         if(rows.isEmpty()) {

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

@@ -338,7 +338,7 @@ public class cashbill extends Controller {
     @API(title = "k3获取收入凭证", apiversion = R.ID20230714164903.v1.class,accesstoken = false)
     public String getcashbill() throws YosException{
 
-        Rows rows = dbConnect.runSqlQuery("select t2.k3outcode fk3outcode,t1.billno fbillnum,t1.sa_cashbillid ficashbillid,t1.createby,t1.billdate fdate,t3.accountno faccclsnum,t2.agentnum fagentnum,t1.amount famount,t1.remarks fnotes,t1.updatek3flag fupdatek3flag from sa_cashbill t1 inner join sa_agents t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t2.siteid=t2.siteid left join sa_accountclass t3 on t1.sa_accountclassid=t3.sa_accountclassid and t1.siteid=t3.siteid where t3.accountno!='03' and (updatek3flag='0' or updatek3flag='2') and t1.type=1 and ifnull(t1.amount,0)!=0  and t1.status='审核' and ifnull(t1.description,'')!='K3' and t1.createby !='LSA总0001'");
+        Rows rows = dbConnect.runSqlQuery("select t2.k3outcode fk3outcode,t1.billno fbillnum,t1.sa_cashbillid ficashbillid,t1.createby,t1.billdate fdate,t3.accountno faccclsnum,t2.agentnum fagentnum,t1.amount famount,t1.remarks fnotes,t1.updatek3flag fupdatek3flag from sa_cashbill t1 inner join sa_agents t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t2.siteid=t2.siteid left join sa_accountclass t3 on t1.sa_accountclassid=t3.sa_accountclassid and t1.siteid=t3.siteid where t3.accountno!='03' and (updatek3flag='0' or updatek3flag='2') and t1.type=1 and ifnull(t1.amount,0)!=0  and t1.status='审核' and ifnull(t1.description,'')!='K3' and t1.siteid='lsa1986' and t1.createby !='LSA总0001'");
         if (rows.isEmpty()) {
             JSONArray array = new JSONArray();
             return array.toString();

+ 2 - 2
src/custom/restcontroller/webmanage/lsak3/dispatch/dispatch.java

@@ -27,10 +27,10 @@ public class dispatch extends Controller {
      */
     @API(title = "获取DRP发货单", apiversion = R.ID20230715091603.v1.class,accesstoken = false)
     public String getDispatch() throws YosException{
-        Rows rows = dbConnect.runSqlQuery("select t3.sonum fsonum,t2.k3outcode fk3outcode,t1.updatek3flag fupdatek3flag,t1.billno finvonum,t1.sa_dispatchid sainvoiceid,t1.createby,t1.trantype ftrantype,t1.billdate fdate,t2.agentnum fagentnum,t1.remarks fnotes from sa_dispatch t1 inner join sa_agents t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t1.siteid=t2.siteid left join sa_order t3 on  t3.sa_orderid=t1.sa_orderid and t3.siteid=t1.siteid  where (t1.updatek3flag='0' or t1.updatek3flag='2') and t1.createby !='LSA总0001'  and t1.siteid='lsa'");
+        Rows rows = dbConnect.runSqlQuery("select t3.sonum fsonum,t2.k3outcode fk3outcode,t1.updatek3flag fupdatek3flag,t1.billno finvonum,t1.sa_dispatchid sainvoiceid,t1.createby,t1.trantype ftrantype,t1.billdate fdate,t2.agentnum fagentnum,t1.remarks fnotes from sa_dispatch t1 inner join sa_agents t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t1.siteid=t2.siteid left join sa_order t3 on  t3.sa_orderid=t1.sa_orderid and t3.siteid=t1.siteid  where (t1.updatek3flag='0' or t1.updatek3flag='2') and t1.createby !='LSA总0001'  and t1.siteid='lsa1986'");
         for (Row row : rows) {
             String sa_dispatchid = row.getString("sa_dispatchid");
-            Rows detailRows = dbConnect.runSqlQuery("select t1.sa_dispatch_itemsid sainvoicedetailid,t2.itemno fitemno,t2.k3outcode fk3outcode,t3.qty fqty,t3.price fprice,t1.remarks fnotes,t3.customproperties,t2.spec flong from sa_dispatch_items t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid inner join sa_orderitems t3 on t1.sa_orderitemsid=t3.sa_orderitemsid and t1.siteid=t3.siteid where t1.sa_dispatchid='" + sa_dispatchid + "'  and t1.siteid='lsa'");
+            Rows detailRows = dbConnect.runSqlQuery("select t1.sa_dispatch_itemsid sainvoicedetailid,t2.itemno fitemno,t2.k3outcode fk3outcode,t3.qty fqty,t3.price fprice,t1.remarks fnotes,t3.customproperties,t2.spec flong from sa_dispatch_items t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid inner join sa_orderitems t3 on t1.sa_orderitemsid=t3.sa_orderitemsid and t1.siteid=t3.siteid where t1.sa_dispatchid='" + sa_dispatchid + "'  and t1.siteid='lsa1986'");
             row.put("sainvoicedetail", detailRows.toJsonArray());
         }
         if(rows.isEmpty()) {