From 346333eaaceabf85bc1a3fe12bb951da3885bc21 Mon Sep 17 00:00:00 2001 From: "1539530615@qq.com" <1539530615@qq.com> Date: Fri, 19 Jan 2024 10:53:02 +0800 Subject: [PATCH 1/6] =?UTF-8?q?1/19=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java | 2 ++ .../sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java | 4 ++++ .../src/main/resources/mapper/app/LeaseOutDetailsMapper.xml | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java index ab830e3e..cec88c8d 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java @@ -49,4 +49,6 @@ public interface LeaseOutDetailsMapper { String getTaskId(Integer parentId); int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status); + + String getMachineStatus(LeaseOutDetails record); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java index 80bd3716..f1260027 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java @@ -53,6 +53,10 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { if (StringUtils.isNull(record)) { return AjaxResult.error("领料出库失败,请检查参数是否填写完整!"); } + String status = leaseOutDetailsMapper.getMachineStatus(record); + if (status.equals("16")){ + return AjaxResult.error("领料出库失败,该设备不是在库状态!"); + } if (record.getOutNum() == null || record.getOutNum() < 0.1) { record.setOutNum(1.00); } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml index 78463002..c784a62c 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml @@ -19,6 +19,11 @@ from lease_apply_info where id = #{parentId} + UPDATE From e229db14af71a66047de0f5de6bd2291545765b8 Mon Sep 17 00:00:00 2001 From: bns_han <1604366271@qq.com> Date: Fri, 19 Jan 2024 11:30:59 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=80=80=E6=96=99=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml index 7c54bf42..0607fff8 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml @@ -470,6 +470,7 @@ bai.phone, bpl.lot_name as lotName, bui.unit_name as unitName, + bai.back_time as backTime, bagi.plan_start_time as planStartTime, tt.task_status as taskStatus, GROUP_CONCAT(DISTINCT bad.type_id) as typeId, From 0733651fd4ea8e7b51664b92e700cad404d589ec Mon Sep 17 00:00:00 2001 From: bns_han <1604366271@qq.com> Date: Fri, 19 Jan 2024 13:29:02 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E9=80=80=E6=96=99=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/app/BackApplyMapper.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml index 0607fff8..7c5a76f1 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml @@ -496,15 +496,13 @@ SELECT mt.type_name typeCode, CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName, - bad.pre_num as num, - mm.ma_code as maCode + bad.pre_num as num FROM back_apply_details bad LEFT JOIN back_apply_info bai on bai.id=bad.parent_id LEFT JOIN ma_type mt on mt.type_id=bad.type_id LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id - LEFT JOIN ma_machine mm on mm.type_id=bad.type_id WHERE bai.id=#{id} From aa3ca8b7c3dcb941a0f8686f039de24e955b298e Mon Sep 17 00:00:00 2001 From: bns_han <1604366271@qq.com> Date: Fri, 19 Jan 2024 14:55:21 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=80=80=E6=96=99=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/app/BackApplyMapper.xml | 21 +++++++------------ .../mapper/material/BackApplyMapper.xml | 16 +++++++------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml index 7c5a76f1..57d26c0d 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml @@ -410,10 +410,9 @@ WHERE tta.agreement_id = #{agreementId} and tt.task_type = '29' and mt.`level`='4' - - and mt.type_name like concat('%', #{keyWord}, '%') or - and mt2.type_name like concat('%', #{keyWord}, '%') + and (mt.type_name like concat('%', #{keyWord}, '%') or + mt2.type_name like concat('%', #{keyWord}, '%')) GROUP BY mt.type_id ) AS subquery1 @@ -435,8 +434,8 @@ and tt.task_type = '36' and mt.`level`='4' - and mt.type_name like concat('%', #{keyWord}, '%') or - and mt2.type_name like concat('%', #{keyWord}, '%') + and (mt.type_name like concat('%', #{keyWord}, '%') or + mt2.type_name like concat('%', #{keyWord}, '%')) GROUP BY mt.type_id ) AS subquery2 @@ -448,18 +447,13 @@ @@ -491,6 +485,7 @@ WHERE bad.type_id is not null GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time + ORDER BY bai.create_time desc