|
|
@@ -185,7 +185,11 @@ public class GEServiceImpl implements GEService {
|
|
|
"nvl(pc_prodcode,custPartNo),nvl(pr_detail,custPartDesc),cd_varchar50_3,cd_varchar50_4,reqDate," +
|
|
|
"case when orderedQty = 'null' then '0' else orderedQty end, case when unitPrice = 'null' then '0' else unitPrice end,case when totalAmount = 'null' then '0' else totalAmount end, " +
|
|
|
"PONO,case when HID = 'null' then '0' else HID end,DPOID,DETID " +
|
|
|
- "from POORDERDETAILSGR left join N_HUASL_QD.PRODUCTCUSTOMER on custPartNo = pc_custprodcode and pc_custcode = 'GOERTEK' left join Product on pc_prodid=pr_id " +
|
|
|
+ "from POORDERDETAILSGR left join (select APOID,nvl(cd_varchar50_1,PARTYCODE) cucode from POORDERADDRINFOSGR " +
|
|
|
+ "left join N_HUASL_QD.CUSTOMTABLE on ct_caller='GECUSTDZ' and CT_STATUS = '已审核' left join N_HUASL_QD.CUSTOMTABLEDETAIL ON CD_CTID = CT_ID and cd_varchar50_4 = PARTYNAME " +
|
|
|
+ "where nvl(PARTYTYPE,' ') = 'BY') on DPOID = APOID" +
|
|
|
+ //"left join N_HUASL_QD.PRODUCTCUSTOMER on custPartNo = pc_custprodcode and pc_custcode = cucode left join Product on pc_prodid=pr_id " +
|
|
|
+ "left join (select * from PRODUCTCUSTOMER left join Product on pc_prodid=pr_id where nvl(pr_status,' ') = '已审核') on custPartNo = pc_custprodcode and pc_custcode = cucode " +
|
|
|
"left join N_HUASL_QD.CUSTOMTABLE on CT_CALLER = 'GESELLERBRAND' and CT_STATUS = '已审核' left join N_HUASL_QD.CUSTOMTABLEDETAIL on CD_CTID = CT_ID and cd_varchar50_1 = pr_brand " +
|
|
|
"where DPOID = " + poid);
|
|
|
sqls.add("update SALECONFIRMGRDETAIL set SCGD_TOTAL = round(nvl(SCGD_QTY,0)*nvl(SCGD_PRICE,0),2) where SCGD_SCGID = " + scgid);
|