From 1ed94a6706612450c85e80225fa9029900d008ed Mon Sep 17 00:00:00 2001 From: mashuai Date: Tue, 30 Apr 2024 15:14:27 +0800 Subject: [PATCH 1/2] bug --- .../com/bonus/sgzb/base/mapper/MaMachineMapper.java | 7 +++++++ .../sgzb/base/service/impl/MaMachineServiceImpl.java | 12 +++++++++++- .../main/resources/mapper/base/MaMachineMapper.xml | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java index 71a97bcb..cf20251d 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java @@ -42,4 +42,11 @@ public interface MaMachineMapper { SltAgreementApply getLeaseProject(MaMachine ma); SltAgreementApply getBackProject(MaMachine ma); + + /** + * 根据typeId修改库存 + * @param typeId + * @return + */ + int updateNum(long typeId); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java index 479940e6..7d9744e1 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java @@ -90,7 +90,17 @@ public class MaMachineServiceImpl implements MaMachineService { @Override public int remove(Long[] maIds) { - return maMachineMapper.remove(maIds); + int res = 0; + if (maIds != null || maIds.length > 0) { + for (Long maId : maIds) { + MaMachine maMachine = maMachineMapper.selectMaMachineByMaId(maId); + if (maMachine.getTypeId() != 0 && ("15").equals(maMachine.getMaStatus())) { + res = maMachineMapper.updateNum(maMachine.getTypeId()); + } + } + } + res += maMachineMapper.remove(maIds); + return res; } @Override diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml index eedad0f4..485e5a3b 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml @@ -262,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ma_id = #{maId} + + update ma_type set num = num - 1 where type_id = #{typeId} + delete from ma_machine where ma_id in From e1d74486b7c767419d3fc1428f06c6506e7cab55 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Tue, 30 Apr 2024 15:50:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=201443=20=E5=87=BA=E5=BA=93=E7=9A=84?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8E=E5=87=BA=E5=BA=93=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E4=B8=AD=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/claimAndRefund/receive/receiveOut.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveOut.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveOut.vue index 765452ca..8712d5f6 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveOut.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveOut.vue @@ -325,8 +325,8 @@ export default { proList: [], //工程集合 statusList: [ { id: '33', name: '待出库' }, - { id: '34', name: '出库中' }, - { id: '35', name: '已出库' }, + { id: '34', name: '出库进行中' }, + { id: '35', name: '完成' }, ], //工程集合 //搜索下拉数据 typeList: [],