|
|
@@ -858,7 +858,8 @@ public class MakePrepareServiceImpl implements MakePrepareService {
|
|
|
throw new SystemException("料卷号:" + barcode + "不存在!");
|
|
|
}
|
|
|
//MD_COLOR 不为空 料架备料不允许退回
|
|
|
- rs = baseDao.queryForRowSet("select md_location,md_barcode,md_color,md_status,md_prodcode from MakePrepareDetail where instr(MD_barcode,'"+barcode+"'||'|')>0 ");
|
|
|
+ rs = baseDao.queryForRowSet("select md_location,md_barcode,md_color,md_status,md_prodcode from MakePrepareDetail " +
|
|
|
+ " where instr(MD_barcode,'"+barcode+"'||'|')>0 and md_mpid ="+mpid);
|
|
|
if(!rs.next()){
|
|
|
throw new SystemException("料卷号:" + barcode + ",未备料!");
|
|
|
}
|
|
|
@@ -873,7 +874,6 @@ public class MakePrepareServiceImpl implements MakePrepareService {
|
|
|
"md_qty = md_qty - nvl((select sum(MDD_QTY) from MakePrepareDetaildet where MDD_MPID = md_mpid and MDD_PRODCODE = md_prodcode and MDD_LOCATION = MD_LOCATION and MDD_barcode = '"+barcode+"' ),0) " +
|
|
|
"where md_mpid=" + mpid + " and md_prodcode ='"+rs.getGeneralString("md_prodcode")+"' and MD_LOCATION ='"+rs.getGeneralString("md_location")+"' and instr(MD_barcode,'"+barcode+"'||'|')>0 ");
|
|
|
baseDao.execute("delete MakePrepareDetaildet where MDD_MPID ="+mpid+" and MDD_PRODCODE = '"+rs.getGeneralString("md_prodcode")+"' and MDD_LOCATION = '"+rs.getGeneralString("md_location")+"' and MDD_barcode='"+barcode+"'");
|
|
|
-
|
|
|
// 更新条码所在场所bar_place
|
|
|
//baseDao.updateByCondition("barcode", "bar_place=''", "bar_code='" + barcode + "'");
|
|
|
baseDao.execute(baseDao.logger.getMessageLog("备料退回", "退回成功,料卷号:"+barcode, "MakePrepare2", "mp_id", mpid).getSql());
|