From 8b61a6e558880dd8d677cb44f629e7bbc0a483d0 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Sat, 4 Feb 2023 11:42:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E5=BA=93=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=90=88=E6=B3=95=E6=80=A7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DepositoryRecordController.java | 26 +- .../controller/MaterialController.java | 2 +- .../controller/PageController.java | 12 +- .../mapper/DepositoryRecordMapper.java | 17 + .../mapper/DepositoryRecordMapper.xml | 430 ++++++++++-------- .../depository_manage/pojo/InventoryP.java | 5 + .../service/DepositoryRecordService.java | 35 ++ .../service/MaterialService.java | 8 + .../impl/DepositoryRecordServiceImpl.java | 109 +++++ .../service/impl/MaterialServiceImpl.java | 17 + .../templates/pages/depository/table-in.html | 8 +- .../depository_manage/TestOther.java | 41 ++ 12 files changed, 504 insertions(+), 206 deletions(-) create mode 100644 src/test/java/com/dreamchaser/depository_manage/TestOther.java diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java index f78eec21..c221a046 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java @@ -46,6 +46,10 @@ public class DepositoryRecordController { private SplitUnitService splitUnitService; + @Autowired + private RoleService roleService; + + @GetMapping("/myApply") public RestResponse findDepositoryInAndOutRecordPByCondition(@RequestParam Map map, HttpServletRequest request) { UserByPort userToken = (UserByPort) request.getAttribute("userToken"); @@ -356,7 +360,7 @@ public class DepositoryRecordController { }).start();*/ // 开启一个线程开启审批 - new Thread(new Runnable() { + /*new Thread(new Runnable() { @Override public void run() { JSONObject jsonObject = qyWxOperationService.sendOutApprovalTemplate(crypt, userToken, ObjectFormatUtil.toInteger(id)); @@ -368,7 +372,7 @@ public class DepositoryRecordController { // 设置过期为7天 redisTemplateForHash.expire(sp_no, 7, TimeUnit.DAYS); } - }).start(); + }).start();*/ } } else { @@ -460,11 +464,12 @@ public class DepositoryRecordController { // 查看入库申请 @GetMapping("/applicationInView") public RestResponse findApplicationInRecordByCondition(@RequestParam Map map, HttpServletRequest request) { - List list = depositoryRecordService.findApplicationInRecordPByCondition(map, request); + UserByPort userToken = (UserByPort) request.getAttribute("userToken"); + List list = depositoryRecordService.findApplicationInRecordPByUser(userToken,map); for (ApplicationInRecordP applicationInRecordP : list) { applicationInRecordP.setPrice(applicationInRecordP.getPrice() / 100); } - return new RestResponse(list, depositoryRecordService.findApplicationInRecordPCountByCondition(map), 200); + return new RestResponse(list, depositoryRecordService.findApplicationInRecordPCountByUser(userToken,map), 200); } // 当前仓库中该用户的子订单详情 @@ -596,8 +601,7 @@ public class DepositoryRecordController { public RestResponse findApplicationOutRecordByCondition(@RequestParam Map map, HttpServletRequest request) { // 获取对应主订单 List list = depositoryRecordService.findApplicationOutRecordPByCondition(map, request); - for (int i = 0; i < list.size(); i++) { - ApplicationOutRecordP outRecordP = list.get(i); + for (ApplicationOutRecordP outRecordP : list) { // 根据主订单获取所有子订单 List applicationOutMinByParentId = depositoryRecordService.findApplicationOutMinByParentId(outRecordP.getId()); StringBuilder mname = new StringBuilder(); @@ -618,11 +622,11 @@ public class DepositoryRecordController { sumQuantity += applicationOutRecordMin.getQuantity(); sumPrice += (inventory.getPrice() * applicationOutRecordMin.getQuantity()); } - list.get(i).setMcode(mcode.toString()); - list.get(i).setMname(mname.toString()); - list.get(i).setDepositoryName(depositoryName.toString()); - list.get(i).setQuantity(sumQuantity); - list.get(i).setPrice(sumPrice); + outRecordP.setMcode(mcode.toString()); + outRecordP.setMname(mname.toString()); + outRecordP.setDepositoryName(depositoryName.toString()); + outRecordP.setQuantity(sumQuantity); + outRecordP.setPrice(sumPrice); } return new RestResponse(list, depositoryRecordService.findApplicationOutRecordPCountByCondition(map), 200); } diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java index baac68bc..4bfe8fa6 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java @@ -614,7 +614,7 @@ public class MaterialController { if ("-1".equals(unit)) { // 如果是基础单位 for (InventoryP inventoryP : inventoryPList) { - Integer integer = inventoryP.getShowQuantity().get(inventoryP.getBaseUnit()); + Integer integer = inventoryP.getBaseUnitQuantity(); if (quantity <= (integer - inventoryP.getNumberOfTemporary())) { // 如果当前数量合适则跳出循环 flag = true; break; diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index 22e7032b..c1f5a127 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -748,8 +748,18 @@ public class PageController { } @GetMapping("/table_in") - public ModelAndView table_in() { + public ModelAndView table_in(HttpServletRequest request) { ModelAndView mv = new ModelAndView(); + UserByPort userToken = (UserByPort) request.getAttribute("userToken"); + Integer isadmin = userToken.getIsadmin(); + if (isadmin == null) { + isadmin = 1; + } + if (isadmin == 4) { + mv.addObject("display", "inline-block"); + } else { + mv.addObject("display", "none"); + } mv.setViewName("pages/depository/table-in"); return mv; } diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.java b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.java index 51b86ba3..ef64e11b 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.java +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.java @@ -216,6 +216,20 @@ public interface DepositoryRecordMapper { */ List findApplicationInRecordPByCondition(Map map); + /** + * 查询当前用户入库记录及其管理仓库的入库记录 + * @param map 查询条件 + * @return + */ + List findApplicationInRecordPByUser(Map map); + + /** + * 查询当前用户入库记录及其管理仓库的入库记录数目 + * @param map 查询条件 + * @return + */ + Integer findApplicationInRecordPCountByUser(Map map); + /** * 查询当前仓库的入库记录 * @param depositoryId 待查询仓库id @@ -237,6 +251,9 @@ public interface DepositoryRecordMapper { * @return */ List findApplicationOutRecordPByCondition(Map map); + + + /** * 根据条件查询入库记录数目 * @param map 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 f8336c14..f40534d4 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -6,112 +6,113 @@ - - - - - + + + + + - + - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - + + + + + + + + + @@ -177,8 +178,8 @@ count(*) FROM applicationOutRecordInfo WHERE 1=1 - and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 2) - or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and DepartmentheadPass != 2) + and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 2) + or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and DepartmentheadPass != 2) and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0) @@ -249,13 +250,13 @@ @@ -263,7 +264,7 @@ SELECT - + FROM applicationOutRecordInfo WHERE 1=1 - and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3) - or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass = 3) + and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3) + or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass = + 3) and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3) - or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass != 3) + or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass + != 3) group by aorid ORDER BY applicantTime desc @@ -310,23 +313,74 @@ - + + + + + + + - + - + - + - + - + - + SELECT - + FROM DepositoryRecordByCondition dr WHERE 1 = 1 @@ -638,14 +692,14 @@ - + insert into application_in_record (id,mid,quantity,price,applicant_id,applicant_time,depository_id,code,applyRemark,unit,flagForGroup,placeId) values( @@ -664,7 +718,7 @@ ) - + insert into application_out_record (id,applicant_id,applicant_time,code,price,quantity,departmenthead,departmenthead_pass,departmenthead_time, @@ -713,7 +767,7 @@ ) - + insert into application_out_record_min (id,mid,quantity,code,depositoryId,placeId,checkId,parentId,transferId,trueOut,unit) values( @@ -731,13 +785,13 @@ ) - + @@ -745,19 +799,19 @@ select - + from application_out_record_min as aorm where 1 = 1 and aorm.parentId = #{parentId} - select - + from application_out_record_min aorm left join application_out_record aor on aorm.parentId = aor.id where 1 = 1 and aor.pass = 1 and aor.applicant_time between #{start} and #{end} - + INSERT INTO depository_record ( - id, application_id, mname, depository_id, type, quantity, price, state, - applicant_id, apply_remark, apply_time, - reviewer_id, review_remark, review_time,review_pass, checker_id, check_remark, - check_time,check_pass,oldId + id, application_id, mname, depository_id, type, quantity, price, state, + applicant_id, apply_remark, apply_time, + reviewer_id, review_remark, review_time,review_pass, checker_id, check_remark, + check_time,check_pass,oldId ) VALUES ( - #{id}, - #{applicationId}, - #{mname}, - #{depositoryId}, - #{type}, - #{quantity}, - #{price}, - #{state}, - #{applicantId}, - #{applyRemark}, - - 0, - - - #{applyTime}, - - #{reviewerId}, - #{reviewRemark}, + #{id}, + #{applicationId}, + #{mname}, + #{depositoryId}, + #{type}, + #{quantity}, + #{price}, + #{state}, + #{applicantId}, + #{applyRemark}, + + 0, + + + #{applyTime}, + + #{reviewerId}, + #{reviewRemark}, @@ -840,52 +894,53 @@ #{reviewTime}, - #{reviewPass}, - #{checkerId}, - #{checkRemark}, + #{reviewPass}, + #{checkerId}, + #{checkRemark}, 0, #{checkTime}, - #{checkPass}, + #{checkPass}, #{oldId} ) - + INSERT INTO depository_record ( id, application_id, mname, depository_id, type, quantity, price, state, - applicant_id, apply_remark, apply_time, reviewer_id, review_remark, review_time,review_pass, checker_id, check_remark, + applicant_id, apply_remark, apply_time, reviewer_id, review_remark, review_time,review_pass, checker_id, + check_remark, check_time,check_pass ) VALUES ( - #{id}, - #{applicationId}, - #{mname}, - #{depositoryId}, - #{type}, - #{quantity}, - #{price}, - #{state}, - #{applicantId}, - #{applyRemark}, - #{applyTime}, - #{reviewerId}, - #{reviewRemark}, - #{reviewTime}, - #{reviewPass}, - #{checkerId}, - #{checkRemark}, - #{checkTime}, - #{checkPass} + #{id}, + #{applicationId}, + #{mname}, + #{depositoryId}, + #{type}, + #{quantity}, + #{price}, + #{state}, + #{applicantId}, + #{applyRemark}, + #{applyTime}, + #{reviewerId}, + #{reviewRemark}, + #{reviewTime}, + #{reviewPass}, + #{checkerId}, + #{checkRemark}, + #{checkTime}, + #{checkPass} ) - + UPDATE depository_record @@ -948,7 +1003,7 @@ WHERE id = #{id} - + update application_out_record_min @@ -982,7 +1037,7 @@ - + UPDATE application_out_record @@ -1014,10 +1069,10 @@ departmenthead_pass = #{departmentheadPass}, - departmenthead_time = #{departmentheadTime}, + departmenthead_time = #{departmentheadTime}, - departmenthead_messgae = #{departmentheadMessage}, + departmenthead_messgae = #{departmentheadMessage}, depository_manager = #{depositoryManager}, @@ -1106,12 +1161,12 @@ WHERE id = #{item.id} - + DELETE FROM depository_record WHERE id = #{id} - + DELETE FROM depository_record WHERE id IN @@ -1120,14 +1175,14 @@ - + - + @@ -1203,7 +1258,7 @@ and did = #{depository_id} - and applicant_time between #{start} and #{end} + and applicant_time between #{start} and #{end} and tname = #{tname} @@ -1219,7 +1274,7 @@ and did = #{depository_id} - and applicant_time between #{start} and #{end} + and applicant_time between #{start} and #{end} and tname = #{tname} @@ -1248,7 +1303,7 @@ and depositoryId = #{depository_id} - and depositoryManagerTime between #{start} and #{end} + and depositoryManagerTime between #{start} and #{end} and tname = #{tname} @@ -1271,6 +1326,7 @@ and dr.check_time between #{start} and #{end} + DELETE FROM application_in_record WHERE id = #{id} @@ -1298,8 +1354,4 @@ - - - - \ No newline at end of file diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java index 3e99e8e1..e62843c6 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java @@ -191,6 +191,11 @@ public class InventoryP { */ private String baseUnit; + /** + * 基础单位对应数目 + */ + private Integer baseUnitQuantity; + /** * 默认单位 */ diff --git a/src/main/java/com/dreamchaser/depository_manage/service/DepositoryRecordService.java b/src/main/java/com/dreamchaser/depository_manage/service/DepositoryRecordService.java index 88b7d24d..7bbfe098 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/DepositoryRecordService.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/DepositoryRecordService.java @@ -87,6 +87,41 @@ public interface DepositoryRecordService { */ List findApplicationInRecordPByCondition(Map map,HttpServletRequest request); + + /** + * 查询当前用户入库记录及其管理仓库的入库记录 + * @param userByPort 待查询用户 + * @param map 查询条件 + * @return + */ + List findApplicationInRecordPByUser(UserByPort userByPort,Map map); + + /** + * 查询当前用户入库记录及其管理仓库的入库记录数目 + * @param map 查询条件 + * @return + */ + Integer findApplicationInRecordPCountByUser(UserByPort userByPort,Map map); + + + + + /** + * 查询当前用户出库记录及其管理仓库的出库记录 + * @param userByPort 待查询用户 + * @param map 查询条件 + * @return + */ + List findApplicationOutRecordPByUser(UserByPort userByPort,Map map); + + /** + * 查询当前用户出库记录及其管理仓库的出库记录数目 + * @param map 查询条件 + * @return + */ + Integer findApplicationOutRecordPCountByUser(UserByPort userByPort,Map map); + + /** * 根据条件查询出库记录,同时支持分页查询 * @param map diff --git a/src/main/java/com/dreamchaser/depository_manage/service/MaterialService.java b/src/main/java/com/dreamchaser/depository_manage/service/MaterialService.java index e178dc29..0b5c5d75 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/MaterialService.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/MaterialService.java @@ -66,6 +66,14 @@ public interface MaterialService { List findInventory(Map map); + /** + * 根据物料编码及所处仓库查询库存 + * @param map 待查询条件 + * @return + */ + List findInventoryByMcodeAndDepository(Map map); + + /** * 根据条件查询符合条件的库存 * @param map diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java index bee19415..ec3f1469 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java @@ -2887,6 +2887,115 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { return list; } + /** + * 查询当前用户入库记录及其管理仓库的入库记录 + * @param userByPort 待查询用户 + * @param map 查询条件 + * @return + */ + @Override + public List findApplicationInRecordPByUser(UserByPort userByPort, Map map) { + Integer size = 10, page = 1; + if (map.containsKey("size")) { + size = ObjectFormatUtil.toInteger(map.get("size")); + map.put("size", size); + } + if (map.containsKey("page")) { + page = ObjectFormatUtil.toInteger(map.get("page")); + map.put("begin", (page - 1) * size); + } + if (map.containsKey("applyTime")) { + String applyTime = (String) map.get("applyTime"); + map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); + } + + List depositoryAndRole = roleService.findDepositoryAndRole(userByPort.getId()); + List depositoryIdList = new ArrayList<>(); + for (RoleAndDepository depository: depositoryAndRole + ) { + depositoryIdList.add(depository.getDepositoryId()); + } + if(depositoryIdList.size() == 0){ + depositoryIdList = null; + } + map.put("depositoryIdList",depositoryIdList); + map.put("applicantId",userByPort.getId()); + List list = depositoryRecordMapper.findApplicationInRecordPByUser(map); + for (ApplicationInRecordP applicationInRecordP : list) { + UserByPort userByPortById = LinkInterfaceUtil.FindUserById(applicationInRecordP.getApplicantId(),userByPort); + String time = DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordP.getApplicantTime())); + applicationInRecordP.setApplicantName(userByPortById.getName()); + applicationInRecordP.setApplicantTime(time); + applicationInRecordP.setApplyRemark(applicationInRecordP.getApplyRemark() == null ? "" : applicationInRecordP.getApplyRemark()); + if (Integer.compare(applicationInRecordP.getFlagForGroup(), 2) == 0) { + // 如果入库的是组合 + Group group = groupMapper.findGroupOnlyById(applicationInRecordP.getMid()); + applicationInRecordP.setMname(group.getGname()); + applicationInRecordP.setAirUnit(""); + applicationInRecordP.setMcode(group.getCode()); + applicationInRecordP.setMversion("组合"); + } + } + + return list; + } + + @Override + public Integer findApplicationInRecordPCountByUser(UserByPort userByPort, Map map) { + if (map.containsKey("applyTime")) { + String applyTime = (String) map.get("applyTime"); + map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); + } + + List depositoryAndRole = roleService.findDepositoryAndRole(userByPort.getId()); + List depositoryIdList = new ArrayList<>(); + for (RoleAndDepository depository: depositoryAndRole + ) { + depositoryIdList.add(depository.getDepositoryId()); + } + if(depositoryIdList.size() == 0){ + depositoryIdList = null; + } + map.put("depositoryIdList",depositoryIdList); + map.put("applicantId",userByPort.getId()); + return depositoryRecordMapper.findApplicationInRecordPCountByUser(map); + } + + + /** + * 查询当前用户出库记录及其管理仓库的出库记录 + * @param userByPort 待查询用户 + * @param map 查询条件 + * @return + */ + @Override + public List findApplicationOutRecordPByUser(UserByPort userByPort, Map map) { + if (map.containsKey("applyTime")) { + String applyTime = (String) map.get("applyTime"); + map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); + } + List list = depositoryRecordMapper.findApplicationOutRecordPByCondition(map); + for (ApplicationOutRecordP recordP : list) { + UserByPort userByPortById = LinkInterfaceUtil.FindUserById(recordP.getApplicantId(), userByPort); + String time = DateUtil.TimeStampToDateTime(Long.valueOf(recordP.getApplicantTime())); + recordP.setApplicantName(userByPortById.getName()); + recordP.setApplicantTime(time); + recordP.setApplyRemark(recordP.getApplyRemark() == null ? "" : recordP.getApplyRemark()); + } + return list; + } + + /** + * 查询当前用户出库记录及其管理仓库的出库记录数目 + * @param map 查询条件 + * @return + */ + @Override + public Integer findApplicationOutRecordPCountByUser(UserByPort userByPort, Map map) { + return null; + } + + /** * 根据条件查询出库记录,同时支持分页查询 * diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java index 729ce44b..e1e9641f 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java @@ -299,6 +299,22 @@ public class MaterialServiceImpl implements MaterialService { return pack(list); } + /** + * 根据物料编码及所处仓库查询库存 + * @param map 待查询条件 + * @return + */ + @Override + public List findInventoryByMcodeAndDepository(Map map) { + Object state = 1; + if (map.containsKey("state")) { + state = map.get("state"); + } + map.put("state", state); + List list = materialMapper.findInventory(map); + return list; + } + /** * 根据条件查询符合条件的库存 * @@ -704,6 +720,7 @@ public class MaterialServiceImpl implements MaterialService { Map splitInventoryForUnit = new HashMap<>(); splitInventoryForUnit.put(inventory.getUnit(), inventory.getQuantity()); + m.setBaseUnitQuantity(inventory.getQuantity()); // 定义最后展示单位及数目 String unit = inventory.getUnit(); diff --git a/src/main/resources/templates/pages/depository/table-in.html b/src/main/resources/templates/pages/depository/table-in.html index ba7770f8..25c47aae 100644 --- a/src/main/resources/templates/pages/depository/table-in.html +++ b/src/main/resources/templates/pages/depository/table-in.html @@ -68,7 +68,7 @@ @@ -76,7 +76,7 @@ @@ -102,7 +102,7 @@ var parentId = parent.id; layer.open({ type: 2, - title: '弹窗内容', + title: '仓库列表', skin: 'layui-layer-rim', maxmin: true, shadeClose: true, //点击遮罩关闭层 @@ -206,7 +206,7 @@ table.on('toolbar(currentTableFilter)', function (obj) { if (obj.event === 'add') { // 监听添加操作 var index = layer.open({ - title: '申请提交', + title: '入库申请', type: 2, shade: 0.2, maxmin: true, diff --git a/src/test/java/com/dreamchaser/depository_manage/TestOther.java b/src/test/java/com/dreamchaser/depository_manage/TestOther.java new file mode 100644 index 00000000..054bf30b --- /dev/null +++ b/src/test/java/com/dreamchaser/depository_manage/TestOther.java @@ -0,0 +1,41 @@ +package com.dreamchaser.depository_manage; + +import com.alibaba.fastjson.JSONObject; +import com.dreamchaser.depository_manage.config.PortConfig; +import com.dreamchaser.depository_manage.config.QyWxConfig; +import com.dreamchaser.depository_manage.entity.UserByPort; +import com.dreamchaser.depository_manage.entity.qywxDepartment; +import com.dreamchaser.depository_manage.mapper.DepositoryRecordMapper; +import com.dreamchaser.depository_manage.pojo.ApplicationInRecordP; +import com.dreamchaser.depository_manage.utils.LinkInterfaceUtil; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class TestOther { + + @Autowired + DepositoryRecordMapper depositoryRecordMapper; + + @Test + public void Test(){ + + Map map = new HashMap<>(); + List depositoryRecordList = new ArrayList<>(); + depositoryRecordList.add(48); + map.put("depositoryIdList",depositoryRecordList); + List applicationInRecordPByCondition = depositoryRecordMapper.findApplicationInRecordPByCondition(map); + System.out.println(applicationInRecordPByCondition); + + + } +}