From b31cc4f07c4fa7cd3640f5ce4be4d588efc3609a Mon Sep 17 00:00:00 2001 From: xs Date: Fri, 21 Jun 2024 18:09:30 +0800 Subject: [PATCH] =?UTF-8?q?2.4.3=20MES:web=E7=89=A9=E6=96=99=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=89=A9=E6=96=99=E5=A4=A7=E7=B1=BB=E3=80=81=E7=89=A9?= =?UTF-8?q?=E6=96=99=E7=B1=BB=E5=9E=8B=E3=80=81=E5=B8=B8=E5=A4=87=E7=89=A9?= =?UTF-8?q?=E6=96=99=E3=80=81=E6=89=B9=E6=AC=A1=E6=A0=87=E8=AF=86=E5=92=8C?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/MesBaseMaterialInfoServiceImpl.java | 44 ++++++++---------- hw-ui/src/views/mes/materialinfo/index.vue | 45 +++++++++++++------ 2 files changed, 50 insertions(+), 39 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 73c1b17..50d293e 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 @@ -1,7 +1,11 @@ package com.hw.mes.service.impl; +import java.math.BigDecimal; import java.util.List; + +import com.hw.common.core.constant.MesConstants; import com.hw.common.core.utils.DateUtils; +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hw.mes.mapper.MesBaseMaterialInfoMapper; @@ -15,8 +19,7 @@ import com.hw.mes.service.IMesBaseMaterialInfoService; * @date 2023-12-21 */ @Service -public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoService -{ +public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoService { @Autowired private MesBaseMaterialInfoMapper mesBaseMaterialInfoMapper; @@ -27,8 +30,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 物料信息 */ @Override - public MesBaseMaterialInfo selectMesBaseMaterialInfoByMaterialId(Long materialId) - { + public MesBaseMaterialInfo selectMesBaseMaterialInfoByMaterialId(Long materialId) { return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialId(materialId); } @@ -39,8 +41,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 物料信息 */ @Override - public List selectMesBaseMaterialInfoList(MesBaseMaterialInfo mesBaseMaterialInfo) - { + public List selectMesBaseMaterialInfoList(MesBaseMaterialInfo mesBaseMaterialInfo) { return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoList(mesBaseMaterialInfo); } @@ -51,8 +52,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 结果 */ @Override - public int insertMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) - { + public int insertMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) { mesBaseMaterialInfo.setCreateTime(DateUtils.getNowDate()); return mesBaseMaterialInfoMapper.insertMesBaseMaterialInfo(mesBaseMaterialInfo); } @@ -64,9 +64,12 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 结果 */ @Override - public int updateMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) - { + public int updateMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) { mesBaseMaterialInfo.setUpdateTime(DateUtils.getNowDate()); + mesBaseMaterialInfo.setUpdateBy(SecurityUtils.getUsername()); + if (!mesBaseMaterialInfo.getBatchFlag().equals(MesConstants.IS_BATCH)) { + mesBaseMaterialInfo.setBatchAmount(BigDecimal.ONE); + } return mesBaseMaterialInfoMapper.updateMesBaseMaterialInfo(mesBaseMaterialInfo); } @@ -77,8 +80,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 结果 */ @Override - public int deleteMesBaseMaterialInfoByMaterialIds(Long[] materialIds) - { + public int deleteMesBaseMaterialInfoByMaterialIds(Long[] materialIds) { return mesBaseMaterialInfoMapper.deleteMesBaseMaterialInfoByMaterialIds(materialIds); } @@ -89,14 +91,11 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 结果 */ @Override - public int deleteMesBaseMaterialInfoByMaterialId(Long materialId) - { + public int deleteMesBaseMaterialInfoByMaterialId(Long materialId) { return mesBaseMaterialInfoMapper.deleteMesBaseMaterialInfoByMaterialId(materialId); } - - /** * 查询物料信息列表 * @@ -104,8 +103,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 物料信息 */ @Override - public List selectMesBaseMaterialInfoListByMaterialIds(Long[] materialIds) - { + public List selectMesBaseMaterialInfoListByMaterialIds(Long[] materialIds) { return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoListByMaterialIds(materialIds); } @@ -117,16 +115,11 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 物料信息 */ @Override - public List selectMaterialInfos4AllocationWarehouse(MesBaseMaterialInfo mesBaseMaterialInfo) - { + public List selectMaterialInfos4AllocationWarehouse(MesBaseMaterialInfo mesBaseMaterialInfo) { return mesBaseMaterialInfoMapper.selectMaterialInfos4AllocationWarehouse(mesBaseMaterialInfo); } - - - - /** * 查询物料信息 * @@ -134,8 +127,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi * @return 物料信息 */ @Override - public MesBaseMaterialInfo selectMesBaseMaterialInfoByErpId(Long erpId) - { + public MesBaseMaterialInfo selectMesBaseMaterialInfoByErpId(Long erpId) { return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByErpId(erpId); } } diff --git a/hw-ui/src/views/mes/materialinfo/index.vue b/hw-ui/src/views/mes/materialinfo/index.vue index 8003213..e0d00bd 100644 --- a/hw-ui/src/views/mes/materialinfo/index.vue +++ b/hw-ui/src/views/mes/materialinfo/index.vue @@ -111,15 +111,18 @@ + + + - + - -