|
@@ -358,4 +358,41 @@ public class PdaSpmServiceImpl implements PdaSpmService {
|
|
|
"values (SPMLOG_SEQ.nextval,sysdate,'"+SystemSession.getUser().getEm_name()+"("+SystemSession.getUser().getEm_code()+")"
|
|
"values (SPMLOG_SEQ.nextval,sysdate,'"+SystemSession.getUser().getEm_name()+"("+SystemSession.getUser().getEm_code()+")"
|
|
|
+"','"+linecode+"','"+barcode+"','"+operation+"','"+content+"')";
|
|
+"','"+linecode+"','"+barcode+"','"+operation+"','"+content+"')";
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void mixing(String barcode) {
|
|
|
|
|
+ String[] barcodeArr = barcode.split(",");
|
|
|
|
|
+ String barcodeStr = "'"+barcode.replace(",","','")+"'";
|
|
|
|
|
+ for (String barcodeItem:barcodeArr) {
|
|
|
|
|
+ //1、空瓶退回校验(调用方法checkRecovery)。
|
|
|
|
|
+ checkRecovery(barcodeItem);
|
|
|
|
|
+ }
|
|
|
|
|
+ //2、批量更新条码状态为”空瓶”
|
|
|
|
|
+ baseDao.execute("update spmbarcode set spb_status = '已搅拌' where spb_barcode in ("+barcodeStr+")");
|
|
|
|
|
+ //3、插入日志到SPMLOG记录条码空瓶回收
|
|
|
|
|
+ saveSpmlog(barcodeStr,"搅拌","入搅拌成功。","");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Map<String, Object> checkmixing(String barcode) {
|
|
|
|
|
+ //锡膏条码通用校验
|
|
|
|
|
+ Map<String, Object> spmBarcode = validSpmBarcode(barcode);
|
|
|
|
|
+ Object spb_status = spmBarcode.get("SPB_STATUS");
|
|
|
|
|
+ // PDA扫码空瓶回收,限制状态必须为‘已用尽’
|
|
|
|
|
+ if(StringUtil.hasText(spb_status)){
|
|
|
|
|
+ if(!spb_status.equals("已用尽")){
|
|
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"条码"+barcode+"状态为:"+spb_status+",不允许回收!");
|
|
|
|
|
+ }
|
|
|
|
|
+ return spmBarcode;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ throw new APIErrorException(APIErrorCode.BUSINESS_FAILED,"条码"+barcode+",尚未出库回温,不允许空瓶回收!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Map<String, Object> getLine() {
|
|
|
|
|
+ //锡膏条码通用校验
|
|
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select li_code,li_name from line where li_wccode='SMT'");
|
|
|
|
|
+ return rs.getCurrentMap();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|