|
|
@@ -644,6 +644,12 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
}else{
|
|
|
showSmtError(APIErrorCode.BUSINESS_FAILED,"站位未上料无需接料",handleType,linecode,location,ps_prodcode,"",bool,table);
|
|
|
}
|
|
|
+
|
|
|
+ rs = baseDao.queryForRowSet("select * from (select dsl_id,dsl_barcode,dsl_repcode,dsl_prodcode from devSMTLocation where dsl_linecode=? and dsl_makecode=? and dsl_location=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = 0 order by dsl_id desc) where rownum=1",linecode,ma_code,location,map.get("DL_TABLE"));
|
|
|
+ if(rs.next()){
|
|
|
+ showSmtError(APIErrorCode.BUSINESS_FAILED,"站位存在未校验条码,无法接料",handleType,linecode,location,ps_prodcode,"",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=? ",map.get("PS_ID"),location, map.get("DL_TABLE"));
|
|
|
if (rs.next())
|
|
|
@@ -651,7 +657,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
psl_prodcode = rs.getString("psl_prodcode");
|
|
|
}
|
|
|
String type="barcode";
|
|
|
- rs = baseDao.queryForRowSet("select dsl_barcode,dsl_repcode from devSMTLocation where dsl_linecode=? and dsl_makecode=? and dsl_location=? and dsl_table =? and dsl_status=0 and dsl_barcode=?",linecode,ma_code,location,map.get("DL_TABLE"),bar_code);
|
|
|
+ rs = baseDao.queryForRowSet("select dsl_barcode,dsl_repcode from devSMTLocation where dsl_linecode=? and dsl_makecode=? and dsl_location=? and dsl_table =? and dsl_barcode=?",linecode,ma_code,location,map.get("DL_TABLE"),bar_code);
|
|
|
if(rs.next()){
|
|
|
if(isBarcode){
|
|
|
showSmtError(APIErrorCode.BUSINESS_FAILED,"不允许接同一个料卷号",handleType,linecode,location,ps_prodcode,"料卷"+bar_code,bool,table);
|
|
|
@@ -1416,8 +1422,8 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
//ps_id,table,linecode,ma_code,table
|
|
|
Map<String,Object> mapR = new HashMap <String, Object>();
|
|
|
rs=baseDao.queryForRowSet("select * from (select psl_location from(select min(psl_detno)psl_detno,psl_location from productsmtlocation "
|
|
|
- +" where psl_psid=? and psl_table=? and psl_location not in (select distinct dsl_location from devsmtlocation where "
|
|
|
- +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = -1) "
|
|
|
+ +" where psl_psid=? and psl_table=? and psl_location in (select distinct dsl_location from devsmtlocation where "
|
|
|
+ +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = 0) "
|
|
|
+" group by psl_location order by psl_detno asc)) where rownum<=20 ",ps_id,table,linecode,ma_code,table);
|
|
|
if(rs.next()){
|
|
|
mapR.put("NotCheckLocation", rs.getResultList());
|
|
|
@@ -1425,8 +1431,8 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
mapR.put("NotCheckLocation", "");
|
|
|
}
|
|
|
rs=baseDao.queryForRowSet("select count(1) cn from (select distinct psl_location from productsmtlocation where psl_psid=? and psl_table=? and "
|
|
|
- +" psl_location not in (select distinct dsl_location from devsmtlocation where "
|
|
|
- +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = -1)) ",ps_id,table,linecode,ma_code,table);
|
|
|
+ +" psl_location in (select distinct dsl_location from devsmtlocation where "
|
|
|
+ +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = 0)) ",ps_id,table,linecode,ma_code,table);
|
|
|
if(rs.next()){
|
|
|
mapR.put("NotCheckCount", rs.getInt("cn"));
|
|
|
}else{
|
|
|
@@ -1650,8 +1656,8 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
|
|
|
//未校验站位前二十条
|
|
|
rs=baseDao.queryForRowSet("select * from (select psl_location from(select min(psl_detno)psl_detno,psl_location from productsmtlocation left join productsmt on ps_id=psl_psid "
|
|
|
- +" where ps_linecode = ? and ps_prodcode = ? and psl_table = ? and psl_location not in (select distinct dsl_location from devsmtlocation where "
|
|
|
- +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = -1) "
|
|
|
+ +" where ps_linecode = ? and ps_prodcode = ? and psl_table = ? and psl_location in (select distinct dsl_location from devsmtlocation where "
|
|
|
+ +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = 0) "
|
|
|
+" group by psl_location order by psl_detno)) where rownum<=20 ",linecode,ps_prodcode,table,linecode,macode,table);
|
|
|
if(rs.next()){
|
|
|
mapR.put("NotCheckLocation", rs.getResultList());
|
|
|
@@ -1660,8 +1666,8 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
}
|
|
|
//未校验站位数量
|
|
|
rs=baseDao.queryForRowSet("select count(1) cn from (select distinct psl_location from productsmtlocation left join productsmt on ps_id=psl_psid where ps_linecode = ? and "
|
|
|
- +" ps_prodcode = ? and psl_table = ? and psl_location not in (select distinct dsl_location from devsmtlocation where "
|
|
|
- +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = -1)) ",linecode,ps_prodcode,table,linecode,macode,table);
|
|
|
+ +" ps_prodcode = ? and psl_table = ? and psl_location in (select distinct dsl_location from devsmtlocation where "
|
|
|
+ +" dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0 and dsl_ifcheck = 0)) ",linecode,ps_prodcode,table,linecode,macode,table);
|
|
|
if(rs.next()){
|
|
|
mapR.put("NotCheckCount", rs.getInt("cn"));
|
|
|
}else{
|