|
@@ -186,11 +186,13 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
|
|
|
SqlRowList rs = null;
|
|
|
|
|
|
- Object bar_code = map1.get("dsl_barcode");
|
|
|
+
|
|
|
+
|
|
|
Object dl_macode = map.get("DL_MACODE");
|
|
|
Object linecode= map.get("DL_LINECODE"),location = map1.get("dsl_location");
|
|
|
Object table = map.get("DL_TABLE");
|
|
|
- Object fe_code = map1.get("dsl_fecode");
|
|
|
+ Object fe_code = map1.get("dsl_barcode");
|
|
|
+ Object bar_code = map1.get("dsl_barcode");
|
|
|
String type="barcode",ps_prodcode = null;
|
|
|
int has_make=0;
|
|
|
String handleType = "上料";
|
|
@@ -219,7 +221,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
if(rs.next()){
|
|
|
showSmtError(APIErrorCode.DATA_NOT_FOUND,"该站位已上料",handleType,linecode,location,ps_prodcode,"",bool,table);
|
|
|
}
|
|
|
- rs=baseDao.queryForRowSet("select fe_code,fe_location,fe_barcode from feeder where fe_code='"+fe_code+"'");
|
|
|
+ rs=baseDao.queryForRowSet("select fe_code,fe_location,fe_barcode from feeder where fe_code='"+fe_code+"' and fe_code is not null");
|
|
|
|
|
|
if(rs.next()){
|
|
|
String fe_location=rs.getString("fe_location");
|
|
@@ -2038,12 +2040,16 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> bindFeederBarcode(String barcode,String fe_code) {
|
|
|
+ public Map<String, Object> bindFeederBarcode(String barcode,String fe_code,String prodcode) {
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
- SqlRowList rs=baseDao.queryForRowSet("select fe_location,fe_barcode from feeder where fe_code='"+fe_code+"'");
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select fe_festatus,fe_location,fe_barcode from feeder where fe_code='"+fe_code+"'");
|
|
|
if(!rs.next()){
|
|
|
throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND, "飞达"+fe_code+"不存在");
|
|
|
+ }else if (!rs.getString("fe_festatus").contains("正常"))
|
|
|
+ {
|
|
|
+ throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND, "飞达"+fe_code+"状态为"+rs.getString("fe_festatus")+",不可操作");
|
|
|
}
|
|
|
+
|
|
|
String fe_location=rs.getString("fe_location");
|
|
|
|
|
|
if(fe_location!=null&&!fe_location.equals("")) {
|
|
@@ -2058,6 +2064,10 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
if(!rs.next()){
|
|
|
throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND, "料卷"+barcode+"不存在");
|
|
|
}
|
|
|
+ SqlRowList rsb = baseDao.queryForRowSet(" select * from bomdetail left join bom on bd_bomid = bo_id where bo_mothercode = '"+prodcode+"' and (bd_soncode = '"+rs.getString("bar_prodcode")+"' OR bd_repcode LIKE '%"+rs.getString("bar_prodcode")+"%') ");
|
|
|
+ if(!rsb.next()){
|
|
|
+ throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND, "料卷"+barcode+"对应料号"+rs.getString("bar_prodcode")+"不存在与产品"+prodcode+"BOM中,不允许采集");
|
|
|
+ }
|
|
|
if(rs.getDouble("bar_remain") <= 0){
|
|
|
throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND,"料卷号数量必须大于0");
|
|
|
}else if(!"1".equals(rs.getString("bar_place"))){
|