|
|
@@ -110,7 +110,17 @@ public class PdaMsdServiceImpl implements PdaMsdService {
|
|
|
}
|
|
|
// 2、要求输入的bar_code 值不在 msdbarcode 表中存在,即必须是唯一
|
|
|
if(baseDao.checkIf("MSDBARCODE", "MB_BARCODE = '"+bar_code+"'")){
|
|
|
- throw new APIErrorException(APIErrorCode.ILLEGAL_ARGUMENTS, "条码:"+bar_code+"已登记!");
|
|
|
+ if(baseDao.getFieldDataByCondition("MSDBARCODE","mb_status","mb_barcode='"+bar_code+"'").toString().equals("密封中"))
|
|
|
+ {
|
|
|
+ baseDao.updateByCondition("MSDBARCODE","mb_status='暴露中',MB_EXPOSURETIME="+expTime*60 ,"mb_barcode='"+bar_code+"'");
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select MB_BARCODE,MB_PRODCODE,PR_DETAIL,PR_SPEC,MB_MSDLEVEL,round(MB_EXPOSURETIME/60,2) MB_EXPOSURETIME,MB_FLOORLIFE from msdbarcode left join product on pr_code = mb_prodcode where mb_barcode =?"
|
|
|
+ , bar_code);
|
|
|
+ if(rs.next()){
|
|
|
+ return rs.getCurrentMap();
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ throw new APIErrorException(APIErrorCode.ILLEGAL_ARGUMENTS, "条码:"+bar_code+"已登记!");
|
|
|
+ }
|
|
|
}
|
|
|
// 3、通过bar_code 能够解析出物料(物料包含在barcode中),如果无法解析则不能进行登记
|
|
|
Object pr_code = null;
|
|
|
@@ -218,7 +228,11 @@ public class PdaMsdServiceImpl implements PdaMsdService {
|
|
|
}else if(rs.getString("mb_status").equals("防潮柜")){
|
|
|
// 如果是防潮柜则提示:目前是入防潮柜状态请先出防潮柜再入烘烤
|
|
|
throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"条码:" + bar_code + ",入防潮柜状态请先出防潮柜再入烘烤!");
|
|
|
- }else if(rs.getString("mb_status").equals("暴露中")){
|
|
|
+ }else if(rs.getString("mb_status").equals("密封中")){
|
|
|
+// 如果是防潮柜则提示:目前是入防潮柜状态请先出防潮柜再入烘烤
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"条码:" + bar_code + ",状态为密封中");
|
|
|
+ }
|
|
|
+ else if(rs.getString("mb_status").equals("暴露中")){
|
|
|
// 3、获取物料资料表中维护的烘烤温度,烘烤时长返回至客户端
|
|
|
Object msdLevel = rs.getGeneralString("mb_msdlevel");
|
|
|
if(StringUtil.hasText(msdLevel)){
|