|
|
@@ -85,8 +85,6 @@ public class PurchaseNotifyTask extends AbstractTask {
|
|
|
if (anStr.length() > 0) {
|
|
|
sqls.add("update AcceptNotify set (an_currency,an_rate,an_paymentcode,an_payment,an_buyer,an_buyerid)=(select pu_currency,pu_rate,pu_paymentscode,pu_payments,pu_buyername,em_id from purchase left join acceptnotifydetail on pu_code=and_ordercode left join employee on pu_buyercode=em_code where and_anid=an_id and rownum=1) where an_id in ("
|
|
|
+ anStr.toString() + ")");
|
|
|
-// sqls.add("update AcceptNotify set (an_vendcode,an_vendname)=(select ve_code,ve_name from vendor where ve_uu=to_char(an_venduu)) where an_id in ("
|
|
|
-// + anStr.toString() + ")");
|
|
|
sqls.add("update AcceptNotify set (an_vendcode,an_vendname)=(select pu_vendcode,pu_vendname from purchase left join acceptnotifydetail on pu_code=and_ordercode where and_anid=an_id and rownum=1) where an_id in ("
|
|
|
+ anStr.toString() + ") and an_vendcode is null");
|
|
|
sqls.add("update AcceptNotifyDetail set (and_orderid,and_prodcode,and_taxrate)=(select pd_id,pd_prodcode,nvl(pd_rate,0) from purchasedetail left join purchase on pd_puid=pu_id where pu_code=and_ordercode and pd_detno=and_orderdetno) where and_anid in ("
|
|
|
@@ -94,9 +92,9 @@ public class PurchaseNotifyTask extends AbstractTask {
|
|
|
sqls.add("update purchasenotify set pn_endqty=(select sum(and_inqty) from AcceptNotifyDetail where and_pnid=pn_id) where pn_id in ("
|
|
|
+ pnStr.toString() + ")");
|
|
|
sqls.add("update purchasenotify set pn_status='部分发货' where nvl(pn_endqty,0)>0 and nvl(pn_endqty,0)<nvl(pn_qty,0) and pn_id in ("
|
|
|
- + pnStr.toString() + ")");
|
|
|
+ + pnStr.toString() + ") and nvl(pn_status, '') <> '已取消'");
|
|
|
sqls.add("update purchasenotify set pn_status='已发货' where nvl(pn_endqty,0)=nvl(pn_qty,0) and pn_id in ("
|
|
|
- + pnStr.toString() + ")");
|
|
|
+ + pnStr.toString() + ") and nvl(pn_status, '') <> '已取消'");
|
|
|
jdbcTemplate.batchExecute(sqls);
|
|
|
}
|
|
|
}
|