|
@@ -1367,8 +1367,8 @@ public class PdaOutMaterialServiceImpl implements PdaOutMaterialService {
|
|
|
if(rs.next() && rs.getInt("cn") > 0){ //有一行以上备料记录则是备料中
|
|
|
baseDao.execute("update prodinout set pi_pdastatus ='备料中' where pi_id=?",piid);
|
|
|
rs = baseDao.queryForRowSet("select count(1) cn from (select pd_prodcode,sum(pd_outqty)qty from prodiodetail " +
|
|
|
- " where pd_piid=? group by pd_prodcode)A left join (select bi_prodcode,sum(bi_outqty)qty " +
|
|
|
- " from barcodeio where bi_piid=? group by bi_prodcode)B on (pd_prodcode=bi_prodcode ) where A.qty>NVL(B.qty,0)",piid,piid);
|
|
|
+ " where pd_piid=? and substr(pd_prodcode,0,3) in ('138','168') group by pd_prodcode)A left join (select bi_prodcode,sum(bi_outqty)qty " +
|
|
|
+ " from barcodeio where bi_piid=? and substr(bi_prodcode,0,3) in ('138','168') group by bi_prodcode)B on (pd_prodcode=bi_prodcode ) where A.qty>NVL(B.qty,0)",piid,piid);
|
|
|
if (rs.next() && rs.getInt("cn") == 0) {
|
|
|
baseDao.execute("update prodinout set pi_pdastatus ='已备料' where pi_id=?", piid);
|
|
|
status = true;
|