From 9cd5594255884330677789e1061702429307e182 Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 18 Jun 2025 17:46:14 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=201=E3=80=81=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E6=98=AF=E5=90=A6=E8=B6=85?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=BA=93=E5=AD=98=E7=AD=9B=E9=80=89=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF=E5=86=85?= =?UTF-8?q?=E7=9A=84=E7=89=A9=E6=96=99=E5=8F=AF=E4=BB=A5=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F=E4=B8=8E?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E5=BA=93=E5=AD=98=E6=AF=94=E8=BE=83=E5=B9=B6?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E3=80=822=E3=80=81=E2=80=9C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=87=BA=E5=BA=93=E6=A0=87=E8=AF=86=E2=80=9D=E2=80=9C?= =?UTF-8?q?bom=E5=86=85=E7=89=A9=E6=96=99=E6=A0=87=E8=AF=86=E2=80=9D?= =?UTF-8?q?=E7=AD=89=E5=AD=97=E6=AE=B5=E6=97=A0=E9=9C=80=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E5=B1=95=E7=A4=BA=E5=87=BA=E5=BA=93=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E3=80=82=E5=BD=93=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=B0=8F=E4=BA=8E=E5=AE=89=E5=85=A8=E5=BA=93=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F=E6=A0=87?= =?UTF-8?q?=E7=BA=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/api/domain/MesBaseMaterialInfo.java | 26 +++ .../impl/MesBaseStationInfoServiceImpl.java | 1 + .../mapper/mes/MesBaseMaterialInfoMapper.xml | 10 +- hw-ui/src/views/mes/materialinfo/index.vue | 193 ++++++++++-------- 4 files changed, 146 insertions(+), 84 deletions(-) diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java index 2412ec78..246ea0a6 100644 --- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java @@ -153,6 +153,32 @@ public class MesBaseMaterialInfo extends BaseEntity private String unitName; + /** + * 库存可用数量 + */ + private BigDecimal availableAmount; + + /** + * 是否超安全库存 + */ + private String isExceeded; + + public BigDecimal getAvailableAmount() { + return availableAmount; + } + + public void setAvailableAmount(BigDecimal availableAmount) { + this.availableAmount = availableAmount; + } + + public String getIsExceeded() { + return isExceeded; + } + + public void setIsExceeded(String isExceeded) { + this.isExceeded = isExceeded; + } + public Long getPurchasePriceUnitId() { return purchasePriceUnitId; } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java index e85f8c49..e8a3ef0a 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java @@ -108,6 +108,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService public MesBaseStationInfo getLoginStationInfo() { String ipAddress = IpUtils.getIpAddr(); // ipAddress = "192.168.2.25"; + log.info(ipAddress+"---"+SecurityUtils.getLoginUser().getIpaddr()); MesBaseStationInfo mesBaseStationInfo = mesBaseStationInfoMapper.selectMesBaseStationInfoByStationIp(ipAddress); diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml index 57a11a73..327c7d2d 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml @@ -46,6 +46,8 @@ + + @@ -88,10 +90,15 @@ bmi.approve_date, bmi.erp_modify_date, bmi.safe_stock_amount, - mbui.unit_name + mbui.unit_name, + wst.availableAmount, + IF(wst.availableAmount >= bmi.safe_stock_amount, '1', '0') isExceeded from mes_base_material_info bmi left join mes_base_material_type bmt on bmt.matrial_type_id = bmi.material_type_id left join mes_base_unit_info mbui on bmi.material_unit_id = mbui.erp_id + left join (select material_id, SUM(total_amount - occupy_amount) availableAmount + from wms_stock_total + GROUP BY material_id) wst on bmi.material_id = wst.material_id