src/main/java/com/whyc/controller/ConditionController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/mapper/UserInfMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/BaojigroupService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/ExportService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/UserInfMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/controller/ConditionController.java
@@ -1,7 +1,9 @@ package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.mapper.BaojigroupUsrMapper; import com.whyc.pojo.plus_user.UserInf; import com.whyc.service.BaojigroupService; import com.whyc.service.LockInfService; import com.whyc.service.StationInfService; import com.whyc.util.ActionUtil; @@ -20,6 +22,9 @@ @Autowired private LockInfService lockInfService; @Autowired private BaojigroupService bjGroupService; @ApiOperation("获取所有的省份(下拉)") @GetMapping("getProviceByUid") @@ -77,4 +82,13 @@ return lockInfService.getLockInHis(stationId,baojiId); } @ApiOperation(value = "当前用户所在包机组下所有的用户(下拉)") @GetMapping("getBaojiUserByUid") public Response getBaojiUserByUid(){ UserInf uinf= ActionUtil.getUser(); return bjGroupService.getBaojiUserByUid(uinf.getUid()); } } src/main/java/com/whyc/mapper/UserInfMapper.java
@@ -26,4 +26,6 @@ UserInf getUinfByUname(@Param("uname") String uname); List<UserInf> searchCS_All2(); //当前用户所在包机组下所有的用户(下拉) List<UserInf> getBaojiUserByUid(@Param("baojiIdList") List<Integer> baojiIdList); } src/main/java/com/whyc/service/BaojigroupService.java
@@ -137,4 +137,18 @@ return resultMap; } //当前用户所在包机组下所有的用户(下拉) public Response getBaojiUserByUid(Integer uid) { //查询当前人所在包机组 QueryWrapper wrapper=new QueryWrapper(); wrapper.select("baoji_id"); wrapper.eq("uid",uid); List<BaojigroupUsr> usrList=bjUsrmapper.selectList(wrapper); if(usrList.size()==0){ return new Response().setII(1,null,null,"当前用户未加入包机组"); } List<Integer> baojiIdList=usrList.stream().map(BaojigroupUsr::getBaojiId).collect(Collectors.toList()); List<UserInf> list=userInfMapper.getBaojiUserByUid(baojiIdList); return new Response().setII(1,list!=null,list,"当前用户所在包机组下所有的用户(下拉)"); } } src/main/java/com/whyc/service/ExportService.java
@@ -58,7 +58,6 @@ Row row2 = sheet.createRow(rowNumSheet); row2.setHeightInPoints(20.0f); switch (linf.getLockState()){ case -1:row2.createCell(0).setCellValue("锁的状态:未安装");break; case 0:row2.createCell(0).setCellValue("锁的状态:闭锁");break; case 1:row2.createCell(0).setCellValue("锁的状态:开锁");break; } src/main/resources/mapper/UserInfMapper.xml
@@ -49,5 +49,19 @@ SELECT uid,uname FROM plus_user.tb_user_inf where uid not in (select distinct uid from plus_user.tb_user_permitgroup_data) and uid!=0 order by uid </select> <select id="getBaojiUserByUid" resultType="com.whyc.pojo.plus_user.UserInf"> SELECT uid,uname FROM plus_user.tb_user_inf <where> uid in( select distinct uid from plus_user.tb_baojigroup_usr <where> baoji_id in( <foreach collection="baojiIdList" item="baojiId" open="(" separator="," close=")"> #{baojiId} </foreach> ) </where> ) </where> </select> </mapper>