|
|
@@ -797,15 +797,16 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
if(rs0.next()) {
|
|
|
//切换数据源
|
|
|
SpObserver.putSp(rs0.getGeneralString("WHICHSYSTEM"));
|
|
|
- SqlRowList rs = baseDao.queryForRowSet("select bar_id,bar_prodcode,bar_remain,pr_spec,to_char(nvl(bar_madedate,sysdate),'yyyy-mm-dd')bar_madedate,bar_status from " +
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select bar_id,bar_prodcode,bar_remain,pr_spec,to_char(nvl(bar_madedate,sysdate),'yyyy-mm-dd')bar_madedate,bar_status," +
|
|
|
+ " bar_vendcode,bar_vendbarcode,pr_detail,bar_ordercode from " +
|
|
|
" barcode left join product on bar_prodcode = pr_code where bar_code=?", ReelId);
|
|
|
if (rs.next()) {
|
|
|
- if (2 != rs.getGeneralInt("bar_status")) {
|
|
|
+ /*if (2 != rs.getGeneralInt("bar_status")) {
|
|
|
rmap.put("Status", "NG");
|
|
|
rmap.put("Meassage", "条码:" + ReelId + "非出库条码,无法更新数量!");
|
|
|
return rmap;
|
|
|
- }
|
|
|
- baseDao.execute("update barcode set bar_remain=?,bar_status = 1,bar_outno = '' where bar_code=?", Quantity, ReelId);
|
|
|
+ }*/
|
|
|
+ baseDao.execute("update barcode set bar_remain=?,bar_status = case when bar_status=2 then 1 else bar_status end,bar_outno = '' where bar_code=?", Quantity, ReelId);
|
|
|
baseDao.execute("insert into barcodechange(BC_ID,BC_INDATE, BC_REASON, BC_QTY, BC_BARCODE, BC_PRODCODE, BC_NEWQTY)" +
|
|
|
"values(barcodechange_seq.nextval,sysdate,'点料机更新条码数量',?,?,?,?)", rs.getString("bar_remain"), ReelId, rs.getString("bar_prodcode"), Quantity);
|
|
|
rmap.put("Status", "OK");
|
|
|
@@ -813,6 +814,10 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
rmap.put("PN", rs.getString("bar_prodcode"));
|
|
|
rmap.put("MPN", rs.getString("pr_spec"));
|
|
|
rmap.put("DataCode", rs.getString("bar_madedate"));
|
|
|
+ rmap.put("VENDCODE",rs.getGeneralString("bar_vendcode"));
|
|
|
+ rmap.put("VENDBARCODE",rs.getGeneralString("bar_vendbarcode"));
|
|
|
+ rmap.put("PRDETAIL",rs.getGeneralString("pr_detail"));
|
|
|
+ rmap.put("ORDERCODE",rs.getGeneralString("bar_ordercode"));
|
|
|
} else {
|
|
|
rmap.put("Status", "NG");
|
|
|
rmap.put("Meassage", "条码不存在");
|