|
@@ -31,6 +31,13 @@ public class PdaSpmServiceImpl implements PdaSpmService {
|
|
|
if (StringUtil.hasText(spb_status) && ((!spb_status.equals("开封回存")) && (!spb_status.equals("回温回存")))) {
|
|
|
throw new APIErrorException(APIErrorCode.BUSINESS_FAILED, "条码" + barcode + ",状态为:" + spb_status + ",不允许出库回温!");
|
|
|
}
|
|
|
+ String prcode = baseDao.getFieldDataByCondition("barcode","bar_prodcode","bar_code = '"+barcode+"'").toString();
|
|
|
+ String minbarcode = baseDao.getFieldDataByCondition("barcode","min(bar_code)","bar_prodcode = '"+prcode+"' and not exists (select * from SPMBARCODE where spb_barcode = bar_code) and bar_pdaget <>1").toString();
|
|
|
+ if (!(barcode.contains(minbarcode)))
|
|
|
+ {
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED, "条码" + barcode + "对应物料编号"+prcode+"最小未采集条码为"+minbarcode+",不相符不允许采集!");
|
|
|
+ }
|
|
|
+ baseDao.execute("update barcode set bar_pdaget = 1 where bar_code = '"+barcode+"'");
|
|
|
return spmBarcode;
|
|
|
}
|
|
|
|
|
@@ -41,7 +48,7 @@ public class PdaSpmServiceImpl implements PdaSpmService {
|
|
|
|
|
|
for (String barcodeItem:barcodeArr) {
|
|
|
|
|
|
- checkRewarm(barcodeItem);
|
|
|
+
|
|
|
|
|
|
sqls.add("MERGE INTO spmbarcode spm1 " +
|
|
|
"USING (SELECT '"+barcodeItem+"' barcode FROM dual) spm2 " +
|
|
@@ -53,6 +60,7 @@ public class PdaSpmServiceImpl implements PdaSpmService {
|
|
|
" VALUES(spmbarcode_seq.nextval,'"+barcodeItem+"','出库回温',sysdate,0,0)");
|
|
|
|
|
|
sqls.add(getSpmlog (barcodeItem,"出库","条码: "+barcodeItem+",出库回温成功。",""));
|
|
|
+ baseDao.execute("update barcode set bar_pdaget = 0 where bar_code = '"+barcodeItem+"'");
|
|
|
}
|
|
|
baseDao.execute(sqls);
|
|
|
}
|
|
@@ -297,10 +305,10 @@ public class PdaSpmServiceImpl implements PdaSpmService {
|
|
|
if(!rs.getGeneralString("SPEC").contains("锡膏")){
|
|
|
throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"条码"+barcode+",非锡膏条码!");
|
|
|
}
|
|
|
-
|
|
|
- if(rs.getGeneralDouble("validMonth") >= 6.0){
|
|
|
- throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"条码"+barcode+",已过有效期:"+rs.getGeneralDouble("validMonth")+"个月!");
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return rs.getCurrentMap();
|
|
|
}else {
|
|
|
throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND,"条码"+barcode+",不存在或非在库状态!");
|