Selaa lähdekoodia

存在条码不允许使用物料上料

callm 2 vuotta sitten
vanhempi
commit
e0d7650749
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

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

@@ -226,6 +226,12 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 			pr_code = rs.getString("bar_prodcode");
 			bar_remain = rs.getDouble("bar_remain");
 		}else{
+			if(baseDao.getFieldDataByCondition("configs","data","caller='MESSetting' and  code='PRCODE'").toString().equals("1")){
+				rs = baseDao.queryForRowSet("select bar_remain,nvl(bar_place,1)bar_place,bar_prodcode,bar_code from barcode where bar_prodcode=?  and bar_remain>0 and ",bar_code);
+				if(rs.next()){
+					showSmtError(APIErrorCode.DATA_NOT_FOUND,"料号["+rs.getString("bar_prodcode")+"]存在条码,不允许使用料号进行上料",handleType,linecode,location,ps_prodcode,"料卷"+bar_code,bool,table);
+				}
+			}
 			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"),bar_code,bar_code);
 			if(rs.next()){