|
@@ -1355,7 +1355,6 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
Integer ps_id = 0;
|
|
Integer ps_id = 0;
|
|
|
Integer dl_id = 0;
|
|
Integer dl_id = 0;
|
|
|
boolean success = Boolean.valueOf(String.valueOf(map1.get("success")));
|
|
boolean success = Boolean.valueOf(String.valueOf(map1.get("success")));
|
|
|
- success = true;
|
|
|
|
|
SqlRowList rs;
|
|
SqlRowList rs;
|
|
|
int cn=0;
|
|
int cn=0;
|
|
|
cn=baseDao.getCount("select count(1) from devsmtlocation where dsl_linecode='"+linecode+"' and dsl_table ='"+map.get("DL_TABLE")+"' and dsl_location = '"+map1.get("dsl_location")+"' and dsl_status = 0");
|
|
cn=baseDao.getCount("select count(1) from devsmtlocation where dsl_linecode='"+linecode+"' and dsl_table ='"+map.get("DL_TABLE")+"' and dsl_location = '"+map1.get("dsl_location")+"' and dsl_status = 0");
|
|
@@ -1387,7 +1386,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
i =-1;
|
|
i =-1;
|
|
|
meg = "校验失败";
|
|
meg = "校验失败";
|
|
|
}
|
|
}
|
|
|
- baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"校验",meg+",料号:"+prodcode,linecode,location,i,map.get("DL_PRODCODE"),"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
|
|
|
|
+ baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"校验",meg+",料号:"+prodcode,linecode,location,i,map.get("DL_PRODCODE"),prodcode,map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
//ps_id,table,linecode,ma_code,table
|
|
//ps_id,table,linecode,ma_code,table
|
|
|
Map<String,Object> mapR = new HashMap <String, Object>();
|
|
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 "
|
|
rs=baseDao.queryForRowSet("select * from (select psl_location from(select min(psl_detno)psl_detno,psl_location from productsmtlocation "
|
|
@@ -1494,7 +1493,48 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //获取未上料站位
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void ForecastDataCheck(String dsl, String deviceLineMake) {
|
|
|
|
|
+ SqlRowList rs = null;
|
|
|
|
|
+ Map<Object, Object> map = FlexJsonUtil.fromJson(deviceLineMake);
|
|
|
|
|
+ Map<Object, Object> map1 = FlexJsonUtil.fromJson(dsl);
|
|
|
|
|
+ Object linecode = map.get("DL_LINECODE");
|
|
|
|
|
+ Object prodcode = map1.get("dsl_prodcode");
|
|
|
|
|
+ Object location = map1.get("dsl_location");
|
|
|
|
|
+ Object dl_prodcode = map.get("DL_PRODCODE");
|
|
|
|
|
+ boolean ifRecord = false;
|
|
|
|
|
+ ifRecord = baseDao.isDBSetting("smtcheckerrlog");
|
|
|
|
|
+ rs=baseDao.queryForRowSet("select dsl_barcode,dsl_prodcode from devsmtlocation where dsl_linecode=? and dsl_table =? and dsl_location = ? and dsl_status = 0 and dsl_barcode = ? order by dsl_indate desc",linecode,map.get("DL_TABLE"),map1.get("dsl_location"),prodcode);
|
|
|
|
|
+ if(rs.next()){
|
|
|
|
|
+ String dsl_barcode = rs.getString("dsl_barcode");
|
|
|
|
|
+ String dsl_prodcode = rs.getString("dsl_prodcode");
|
|
|
|
|
+ if(dsl_barcode != null && !("").equals(dsl_barcode)){
|
|
|
|
|
+ if(prodcode.equals(dsl_barcode)){
|
|
|
|
|
+ baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"接料原物料号校验","校验成功"+",料卷:"+prodcode,linecode,location,0,dl_prodcode,"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(ifRecord){
|
|
|
|
|
+ baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"接料原物料号校验","原料卷校验失败"+",料号:"+prodcode,linecode,location,-1,dl_prodcode,"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"校验错误,料卷校验错误!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(!prodcode.equals(dsl_prodcode)){
|
|
|
|
|
+ if(ifRecord){
|
|
|
|
|
+ baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"接料原物料号校验","原物料校验失败"+",料号:"+prodcode,linecode,location,-1,dl_prodcode,"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"校验错误,物料校验错误!");
|
|
|
|
|
+ }
|
|
|
|
|
+ baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"接料原物料号校验","校验成功"+",料号:"+prodcode,linecode,location,0,dl_prodcode,"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(ifRecord){
|
|
|
|
|
+ baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"接料原物料号校验","校验失败,无上料记录"+",料号:"+prodcode,linecode,location,-1,dl_prodcode,"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"校验失败,无上料记录!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //获取未上料站位
|
|
|
@Override
|
|
@Override
|
|
|
public Map<String, Object> getUnLoadingLocation(String linecode) {
|
|
public Map<String, Object> getUnLoadingLocation(String linecode) {
|
|
|
SqlRowList rs = null;
|
|
SqlRowList rs = null;
|