Browse Source

【漳州万利达MES】[bar_place(条码被占用字段)判空处理]

caosy 5 years ago
parent
commit
1ec640256d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

+ 2 - 2
src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

@@ -577,7 +577,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 				showSmtError(APIErrorCode.BUSINESS_FAILED,"不允许接同一个料卷号",handleType,linecode,location,ps_prodcode,"料卷"+bar_code,bool,table);
 			}
 		}
-		rs1=baseDao.queryForRowSet("select bar_prodcode,bar_place,bar_remain,bar_code from barcode where bar_code=?",bar_code);
+		rs1=baseDao.queryForRowSet("select bar_prodcode,nvl(bar_place,1)bar_place,bar_remain,bar_code from barcode where bar_code=?",bar_code);
 		if(rs1.next()){
 			rs = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder,psl_id from productsmtlocation "
 					+" where psl_psid=? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),rs1.getString("bar_prodcode"),rs1.getString("bar_prodcode"));
@@ -715,7 +715,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 			showSmtError(APIErrorCode.BUSINESS_FAILED,"站位未上料无需换料",handleType,linecode,location,ps_prodcode,"",bool,table);
 		}
 		
-		rs2 = baseDao.queryForRowSet("select bar_remain,bar_place,bar_prodcode,bar_code from barcode where bar_code=?",bar_code);
+		rs2 = baseDao.queryForRowSet("select bar_remain,nvl(bar_place,1)bar_place,bar_prodcode,bar_code from barcode where bar_code=?",bar_code);
 		if(rs2.next()){
 			rs = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder,psl_id from productsmtlocation "
 					+" where psl_psid=? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),rs2.getString("bar_prodcode"),rs2.getString("bar_prodcode"));