|
@@ -172,10 +172,11 @@ public class GEServiceImpl implements GEService {
|
|
|
"SCG_CUSTGRCODE,SCG_CUSTGRNAME,SCG_CUSTCODE,SCG_CUSTNAME,SCG_SAKIND,SCG_POCODE,SCG_CURRENCY,SCG_RATE," +
|
|
"SCG_CUSTGRCODE,SCG_CUSTGRNAME,SCG_CUSTCODE,SCG_CUSTNAME,SCG_SAKIND,SCG_POCODE,SCG_CURRENCY,SCG_RATE," +
|
|
|
"SCG_SADATE,SCG_GRPOCODE,SCG_GRHID,SCG_GRPOID)" +
|
|
"SCG_SADATE,SCG_GRPOCODE,SCG_GRHID,SCG_GRPOID)" +
|
|
|
"select "+scgid+",'"+scgcode+"',sysdate,'王平','在录入','ENTERING','','','', " +
|
|
"select "+scgid+",'"+scgcode+"',sysdate,'王平','在录入','ENTERING','','','', " +
|
|
|
- "PARTYCODE,PARTYNAME,nvl(cd_varchar50_1,PARTYCODE),nvl(cd_varchar50_2,PARTYNAME),'正常订单',poNo,currency,case when rate = 'null' then '0' else rate end," +
|
|
|
|
|
|
|
+ "PARTYCODE,PARTYNAME,nvl(cd_varchar50_1,PARTYCODE),nvl(cd_varchar50_2,PARTYNAME),'正常订单',poNo,case when currency = 'CNY' then 'RMB' else currency end,case when rate = 'null' then '0' else rate end," +
|
|
|
"poDate,soNo,case when HID = 'null' then '0' else HID end,POID " +
|
|
"poDate,soNo,case when HID = 'null' then '0' else HID end,POID " +
|
|
|
"from POORDERGR left join POORDERADDRINFOSGR on APOID = POID and nvl(PARTYTYPE,' ') = 'BY' " +
|
|
"from POORDERGR left join POORDERADDRINFOSGR on APOID = POID and nvl(PARTYTYPE,' ') = 'BY' " +
|
|
|
- "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 " +
|
|
|
|
|
|
|
+ //"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 " +
|
|
|
|
|
+ "left join (select * from N_HUASL_QD.CUSTOMTABLE left join N_HUASL_QD.CUSTOMTABLEDETAIL ON CD_CTID = CT_ID where ct_caller='GECUSTDZ' and CT_STATUS = '已审核') on cd_varchar50_4 = PARTYNAME " +
|
|
|
"where POID = " + poid);
|
|
"where POID = " + poid);
|
|
|
sqls.add("insert into SALECONFIRMGRDETAIL (SCGD_ID,SCGD_SCGID,SCGD_DETNO,SCGD_REMARK,SCGD_GRDETNO,SCGD_GRPRCODE,SCGD_GRPRNAME," +
|
|
sqls.add("insert into SALECONFIRMGRDETAIL (SCGD_ID,SCGD_SCGID,SCGD_DETNO,SCGD_REMARK,SCGD_GRDETNO,SCGD_GRPRCODE,SCGD_GRPRNAME," +
|
|
|
"SCGD_PRCODE,SCGD_PRDETAIL,SCGD_SELLERCODE,SCGD_SELLERNAME,SCGD_DELIVERY," +
|
|
"SCGD_PRCODE,SCGD_PRDETAIL,SCGD_SELLERCODE,SCGD_SELLERNAME,SCGD_DELIVERY," +
|
|
@@ -186,11 +187,14 @@ public class GEServiceImpl implements GEService {
|
|
|
"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, " +
|
|
"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 " +
|
|
"PONO,case when HID = 'null' then '0' else HID end,DPOID,DETID " +
|
|
|
"from POORDERDETAILSGR left join (select APOID,nvl(cd_varchar50_1,PARTYCODE) cucode from POORDERADDRINFOSGR " +
|
|
"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 " +
|
|
|
|
|
|
|
+ //"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 " +
|
|
|
|
|
+ "left join (select * from N_HUASL_QD.CUSTOMTABLE left join N_HUASL_QD.CUSTOMTABLEDETAIL ON CD_CTID = CT_ID where ct_caller='GECUSTDZ' and CT_STATUS = '已审核') on cd_varchar50_4 = PARTYNAME " +
|
|
|
"where nvl(PARTYTYPE,' ') = 'BY') on DPOID = APOID " +
|
|
"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 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 (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 " +
|
|
|
|
|
|
|
+ //"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 " +
|
|
|
|
|
+ "left join (select * from N_HUASL_QD.CUSTOMTABLE left join N_HUASL_QD.CUSTOMTABLEDETAIL on CD_CTID = CT_ID " +
|
|
|
|
|
+ "where CT_CALLER = 'GESELLERBRAND' and CT_STATUS = '已审核') on cd_varchar50_1 = pr_brand " +
|
|
|
"where DPOID = " + poid);
|
|
"where DPOID = " + poid);
|
|
|
sqls.add("update SALECONFIRMGRDETAIL set SCGD_TOTAL = round(nvl(SCGD_QTY,0)*nvl(SCGD_PRICE,0),2) where SCGD_SCGID = " + scgid);
|
|
sqls.add("update SALECONFIRMGRDETAIL set SCGD_TOTAL = round(nvl(SCGD_QTY,0)*nvl(SCGD_PRICE,0),2) where SCGD_SCGID = " + scgid);
|
|
|
baseDao.execute(sqls);
|
|
baseDao.execute(sqls);
|