From ca11c70b287d3e6ea3e8a53e7c4b0436335640d1 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Thu, 23 Feb 2023 10:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E5=90=88=E5=85=A5=E5=BA=93=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E9=A1=B5=E9=9D=A2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GroupController.java | 13 +++ .../mapper/DepositoryRecordMapper.xml | 4 +- .../service/GroupService.java | 8 ++ .../service/impl/GroupServiceImpl.java | 18 +++- .../form-step-look_group_review.html | 86 +++++++++++++++++++ .../mapper/DepositoryRecordMapper.xml | 4 +- 6 files changed, 125 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java b/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java index 68ea8909..e77c7b89 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java @@ -546,6 +546,19 @@ public class GroupController { return CrudUtil.putHandle(result, integer); } + @PutMapping("/reviewIn") + public RestResponse reviewIn(@RequestBody Map map, HttpServletRequest request) { + UserByPort userToken = (UserByPort) request.getAttribute("userToken"); + String header = request.getHeader("user-agent"); + String crypt = Md5.crypt(header); + Integer review = groupService.reviewIn(map, userToken.getId(), userToken, crypt); + if (review != -1) { + return CrudUtil.postHandle(review, 1); + } else { + return new RestResponse("", 666, new StatusInfo("出库失败", "当前存储位库存不足,请重新选择")); + } + } + /** * 用于构造组合出库单 diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml index 6ec74998..6a68b6ef 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -325,7 +325,7 @@ SELECT count(*) - FROM applicationinrecordinfo WHERE 1=1 and airapproverPass != 4 + FROM applicationinrecordinfo WHERE 1=1 and airapproverPass != 4 and airtoGroupId is null and (FIND_IN_SET(#{userId},airapproverId) != 0 and airapproverPass = 3) diff --git a/src/main/java/com/dreamchaser/depository_manage/service/GroupService.java b/src/main/java/com/dreamchaser/depository_manage/service/GroupService.java index b9e3ecae..0e8bdeaf 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/GroupService.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/GroupService.java @@ -208,6 +208,14 @@ public interface GroupService { List findGroupInfoByGid(Integer gid); + /** + * 入库审核申请 + * @param map 仓库调度信息 + * @return 受影响的行数 + */ + Integer reviewIn(Map map,Integer userId,UserByPort userToken,String userAgent); + + diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/GroupServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/GroupServiceImpl.java index 82b905d2..158943f4 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/GroupServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/GroupServiceImpl.java @@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONObject; import com.dreamchaser.depository_manage.entity.*; import com.dreamchaser.depository_manage.exception.MyException; import com.dreamchaser.depository_manage.mapper.*; -import com.dreamchaser.depository_manage.pojo.GroupInfoP; -import com.dreamchaser.depository_manage.pojo.MaterialAndPlaceForView; -import com.dreamchaser.depository_manage.pojo.ResultForGroupReturn; -import com.dreamchaser.depository_manage.pojo.RoleAndDepository; +import com.dreamchaser.depository_manage.pojo.*; import com.dreamchaser.depository_manage.service.DepositoryRecordService; import com.dreamchaser.depository_manage.service.GroupService; import com.dreamchaser.depository_manage.service.SplitUnitService; @@ -1076,6 +1073,19 @@ public class GroupServiceImpl implements GroupService { return groupInfoByGid; } + /** + * 入库审核申请 + * @param map 仓库调度信息 + * @return 受影响的行数 + */ + @Override + public Integer reviewIn(Map map, Integer userId, UserByPort userToken, String userAgent) { + Object id = map.get("id"); // 主订单编号 + // 获取当前主订单 + ApplicationInRecordP mainRecordP = depositoryRecordMapper.findApplicationInRecordPById(ObjectFormatUtil.toInteger(id)); + return null; + } + /** * 构造树形组件数据模板 * diff --git a/src/main/resources/templates/pages/application/form-step-look_group_review.html b/src/main/resources/templates/pages/application/form-step-look_group_review.html index 62c849d4..f204cb2d 100644 --- a/src/main/resources/templates/pages/application/form-step-look_group_review.html +++ b/src/main/resources/templates/pages/application/form-step-look_group_review.html @@ -42,6 +42,8 @@ 组合入库
+ +
@@ -174,14 +176,98 @@
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+
+ +
+ +
+
+
+
+ + diff --git a/target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml b/target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml index 6ec74998..6a68b6ef 100644 --- a/target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -325,7 +325,7 @@ SELECT count(*) - FROM applicationinrecordinfo WHERE 1=1 and airapproverPass != 4 + FROM applicationinrecordinfo WHERE 1=1 and airapproverPass != 4 and airtoGroupId is null and (FIND_IN_SET(#{userId},airapproverId) != 0 and airapproverPass = 3)