From 167dc7d5aef5f4859662e6855a73a761110f5991 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 2 Aug 2024 16:47:09 +0800 Subject: [PATCH] numlog --- .../java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java | 2 ++ .../sgzb/app/service/impl/BackReceiveServiceImpl.java | 5 ++++- .../src/main/resources/mapper/app/BackReceiveMapper.xml | 7 ++++++- .../src/main/resources/mapper/system/BmNumLogsMapper.xml | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java index 53072fd1..58fc154c 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java @@ -78,6 +78,8 @@ public interface BackReceiveMapper { */ int updateMaStatus(@Param("maId") int maId,@Param("maStatus") String maStatus); + int getmaChineByCt(BackApplyInfo record); + /** * getHgList * @param record diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java index c3cb6125..e4e76a9b 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java @@ -177,6 +177,8 @@ public class BackReceiveServiceImpl implements BackReceiveService { if (StringUtils.isNotBlank(record.getTypeId())) { for (String s : record.getTypeId().split(",")) { record.setTypeId(s); + int num = backReceiveMapper.getmaChineByCt(record); + record.setNum(String.valueOf(num)); if (allZeros) { //修改back_apply_details为已退料(1) res = updateStatus(record); @@ -238,7 +240,8 @@ public class BackReceiveServiceImpl implements BackReceiveService { } //完成退料的部分,更新 back_check_details 为 is_finished=1,此部分不支持撤回 - finishBackCheckDetails(record); + int count = finishBackCheckDetails(record); + record.setBackNum(count); } } else { throw new RuntimeException("typeId为空"); diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml index 1e119f50..1cfcc065 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml @@ -618,7 +618,7 @@ update back_apply_details set back_status = 1 where parent_id = #{parentId} and type_id = #{typeId} - update back_check_details set is_finished = 1 where parent_id = #{parentId} and type_id = #{typeId} + update back_check_details set is_finished = 1 where parent_id = #{parentId} and type_id = #{typeId} and (is_finished is null or is_finished != 1) delete from back_check_details where parent_id = #{parentId} and type_id = #{typeId} and (is_finished is null or is_finished != 1) @@ -759,6 +759,11 @@ + + + select bnl.id, bnl.model_title, bnl.`method`, bnl.task_id, bnl.type_id, bnl.pre_num, bnl.audit_num, bnl.pre_store_num, bnl.in_num, bnl.out_num, - bnl.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type, + bnl.back_num, bnl.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type, bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name from bm_num_logs bnl left join ma_type mt on bnl.type_id = mt.type_id