From 37ef81255a1600878255827019a33e9d14850ec9 Mon Sep 17 00:00:00 2001 From: xs Date: Fri, 21 Jun 2024 18:22:44 +0800 Subject: [PATCH] =?UTF-8?q?2.4.4=20MES:web=E7=89=A9=E6=96=99=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=E5=AE=8C=E5=96=84=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E8=A6=81=E4=BF=AE=E6=94=B9=E8=BF=87=E5=B8=B8=E5=A4=87=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=92=8C=E6=89=B9=E6=AC=A1=E6=A0=87=E8=AF=86=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=86=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/MesBaseMaterialInfoServiceImpl.java | 26 +++++++++++++++++++ hw-ui/src/views/mes/materialinfo/index.vue | 6 ++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java index 50d293e..31b6059 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java @@ -4,8 +4,13 @@ import java.math.BigDecimal; import java.util.List; import com.hw.common.core.constant.MesConstants; +import com.hw.common.core.exception.ServiceException; import com.hw.common.core.utils.DateUtils; import com.hw.common.security.utils.SecurityUtils; +import com.hw.mes.api.domain.MesBaseBarcodeInfo; +import com.hw.mes.domain.MesOrderBind; +import com.hw.mes.mapper.MesBaseBarcodeInfoMapper; +import com.hw.mes.mapper.MesOrderBindMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hw.mes.mapper.MesBaseMaterialInfoMapper; @@ -23,6 +28,12 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi @Autowired private MesBaseMaterialInfoMapper mesBaseMaterialInfoMapper; + @Autowired + private MesBaseBarcodeInfoMapper mesBaseBarcodeInfoMapper; + + @Autowired + private MesOrderBindMapper mesOrderBindMapper; + /** * 查询物料信息 * @@ -65,6 +76,21 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi */ @Override public int updateMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) { +// MesBaseBarcodeInfo queryBaseBarcodeInfo = new MesBaseBarcodeInfo(); +// queryBaseBarcodeInfo.setMaterialId(mesBaseMaterialInfo.getMaterialId()); +// int barcodeInfoCount = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoCount(queryBaseBarcodeInfo); +// if (barcodeInfoCount > 0) { +// throw new ServiceException("此物料已经有条码信息,不能修改"); +// } +// +// MesOrderBind queryOrderBind = new MesOrderBind(); +// queryOrderBind.setMaterialId(mesBaseMaterialInfo.getMaterialId()); +// List orderBinds = mesOrderBindMapper.selectMesOrderBindList(queryOrderBind); +// if (orderBinds != null && orderBinds.size() > 0) { +// throw new ServiceException("此物料已经有采购订单和销售订单绑定信息,不能修改"); +// } + + mesBaseMaterialInfo.setUpdateTime(DateUtils.getNowDate()); mesBaseMaterialInfo.setUpdateBy(SecurityUtils.getUsername()); if (!mesBaseMaterialInfo.getBatchFlag().equals(MesConstants.IS_BATCH)) { diff --git a/hw-ui/src/views/mes/materialinfo/index.vue b/hw-ui/src/views/mes/materialinfo/index.vue index e0d00bd..26b516f 100644 --- a/hw-ui/src/views/mes/materialinfo/index.vue +++ b/hw-ui/src/views/mes/materialinfo/index.vue @@ -184,7 +184,7 @@ placeholder="请选择物料类型"/> - + - + - +