|
|
@@ -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()) {
|