|
@@ -1449,6 +1449,47 @@ 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) {
|