change - 重复补打条码校验逻辑

master
yinq 7 months ago
parent a5809e2707
commit 4a71b5aa4f

@ -205,10 +205,10 @@ public class PdaApiController {
@PostMapping("/rebarCode") @PostMapping("/rebarCode")
public AjaxResult rebarCode(String barCode) { public AjaxResult rebarCode(String barCode) {
String result = service.rebarCode(barCode); String result = service.rebarCode(barCode);
if (StringUtils.isEmpty(result)){ if (StringUtils.isNotEmpty(result)){
return error("条码信息输入错误!"); return error(result);
} }
return success(result); return success( "请到条码打印机旁进行补打条码!");
} }
/** /**

@ -63,17 +63,19 @@ public class PdaServiceImpl implements IPdaBindingService {
*/ */
@Override @Override
public String rebarCode(String barCode) { public String rebarCode(String barCode) {
String result = null;
if (StringUtils.isEmpty(barCode)){ if (StringUtils.isEmpty(barCode)){
return null; return "条码信息输入错误!";
} }
List<HashMap<String, String>> barcodeList = mapper.selectPrintBarcode(barCode); List<HashMap<String, String>> barcodeList = mapper.selectPrintBarcode(barCode);
if (barcodeList.size() > 0){ if (barcodeList.size() > 0){
if (StringUtils.isNotEmpty(barcodeList.get(0).get("IS_PRINT")) &&
barcodeList.get(0).get("IS_PRINT").equals("0")){
return "请勿重复补打条码!";
}
// 维护条码补打记录表 // 维护条码补打记录表
mapper.printSupplementBarcode(barcodeList.get(0)); mapper.printSupplementBarcode(barcodeList.get(0));
result = "请到条码打印机旁进行补打条码!";
} }
return result; return null;
} }
/** /**

@ -66,12 +66,12 @@
PB.MATERIAL_CODE, PB.MATERIAL_CODE,
PB.MATERIAL_NAME, PB.MATERIAL_NAME,
PB.MATERIAL_BARCODE, PB.MATERIAL_BARCODE,
PB.PRINT_TIME, NVL(MIN(PS.IS_PRINT), 1) IS_PRINT
PB.PRINT_BARTYPE,
OI.PRINT_NAME
FROM BASE_ORDERINFO OI FROM BASE_ORDERINFO OI
JOIN C##AUCMA_SCADA.PRINT_BARCODE PB ON PB.ORDER_CODE = OI.ORDER_CODE JOIN C##AUCMA_SCADA.PRINT_BARCODE PB ON PB.ORDER_CODE = OI.ORDER_CODE
LEFT JOIN C##AUCMA_SCADA.PRINT_SUPPLEMENTBARCODE PS ON PS.MATERIAL_BARCODE = PB.MATERIAL_BARCODE
WHERE PB.MATERIAL_BARCODE = #{boxCode} WHERE PB.MATERIAL_BARCODE = #{boxCode}
GROUP BY PB.ORDER_CODE, PB.MATERIAL_CODE, PB.MATERIAL_NAME, PB.MATERIAL_BARCODE
</select> </select>
<update id="unbindBarCode"> <update id="unbindBarCode">

Loading…
Cancel
Save