|
|
@@ -306,7 +306,11 @@ public class MESDataServiceImpl implements MESDataService {
|
|
|
if ("".equals(QRCode)){
|
|
|
return ApiResponse.failRsp("10016","条码不能为空!");
|
|
|
}
|
|
|
- if (baseDao.checkIf("ProdQRCode","qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0")){
|
|
|
+ String result = StringUtil.nvl(map.get("result"), "");
|
|
|
+ if ("".equals(result)){
|
|
|
+ return ApiResponse.failRsp("10017","请确认校验结果!");
|
|
|
+ }
|
|
|
+ if (baseDao.checkIf("ProdQRCode","qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0")&&"OK".equals(result)){
|
|
|
baseDao.execute("update ProdQRCode set qr_ldischeck=-1,qr_ldcheckres='OK',qr_ldcheckdate=sysdate where qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0");
|
|
|
return ApiResponse.successRsp("0","Success","","OK");
|
|
|
}else {
|