From 138b5fc883c3ccb25f4bed7114a60f93e78aaa9a Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期日, 02 六月 2024 13:30:37 +0800 Subject: [PATCH] #条码检测 --- src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java index c9cf88c..0660704 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java @@ -9,6 +9,7 @@ import com.zy.asrs.entity.*; import com.zy.asrs.entity.param.*; import com.zy.asrs.service.*; +import com.zy.asrs.utils.CodeDetectionUtil; import com.zy.common.model.DetlDto; import com.zy.common.service.AgvCommonService; import lombok.Synchronized; @@ -67,6 +68,9 @@ public String comb(CombParam param, Long userId) { if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { throw new CoolException(BaseRes.PARAM); + } + if (!CodeDetectionUtil.barcodeDetection(param.getBarcode())){ + throw new CoolException(param.getBarcode() + "璐ф灦鐮佹湁璇紝璇锋纭壂鐮侊紒锛侊紒"); } param.setContainerType(Short.valueOf(param.getBarcode().substring(0,2))); @@ -636,6 +640,12 @@ @Override @Transactional public String doBack(AgvMobileStartPakin param, Long userId) { + if (Cools.isEmpty(param.getBarcode()) || !CodeDetectionUtil.barcodeDetection(param.getBarcode())){ + throw new CoolException(param.getBarcode() + "璐ф灦鐮佹湁璇紝璇锋纭壂鐮侊紒锛侊紒"); + } + if (Cools.isEmpty(param.getDevNo()) || !CodeDetectionUtil.carCodeDetection(param.getDevNo())){ + throw new CoolException(param.getDevNo() + "灏忚溅鍦扮爜鏈夎锛岃姝g‘鎵爜锛侊紒锛�"); + } Date now = new Date(); AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", param.getDevNo())); AgvWrkMast agvWrkMastSource = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", param.getDevNo())); -- Gitblit v1.9.1