| | |
| | | return powerInfService.getPowerModelByUid(uinf.getId()); |
| | | } |
| | | |
| | | @ApiOperation("获取电源协议(下拉)") |
| | | @GetMapping("getProtocolByUid") |
| | | public Response getProtocolByUid() { |
| | | User uinf= ActionUtil.getUser(); |
| | | return powerInfService.getProtocolByUid(uinf.getId()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "当前用户所在包机组下所有的用户(下拉)") |
| | | @GetMapping("getBaojiUserByUid") |
| | |
| | | List<String> getCompanyByUid(Integer uid); |
| | | //获取电源型号(下拉) |
| | | List<String> getPowerModelByUid(Integer uid); |
| | | //获取电源协议(下拉) |
| | | List<String> getProtocolByUid(Integer uid); |
| | | } |
| | |
| | | List<String> list=mapper.getPowerModelByUid(uid); |
| | | return new Response().setII(1,list.size()>0,list,"获取电源型号(下拉)"); |
| | | } |
| | | //获取电源协议(下拉) |
| | | public Response getProtocolByUid(Integer uid) { |
| | | List<String> list=mapper.getProtocolByUid(uid); |
| | | return new Response().setII(1,list.size()>0,list,"获取电源协议(下拉)"); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getProtocolByUid" resultType="java.lang.String"> |
| | | select distinct protocol from db_station.tb_power_inf |
| | | <where> |
| | | <if test="uid>100"> |
| | | and tb_power_inf.power_id in( |
| | | select distinct power_id from db_user.tb_baojigroup_power,db_user.tb_baojigroup_usr |
| | | where tb_baojigroup_power.baoji_group_id=tb_baojigroup_usr.baoji_group_id |
| | | and tb_baojigroup_usr.uid=#{uid} |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |