| | |
| | | import com.whyc.mapper.KeyInfMapper; |
| | | import com.whyc.pojo.db_area.KeyInf; |
| | | import com.whyc.pojo.db_area.LockInf; |
| | | import com.whyc.pojo.db_user.UserInf; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | .collect(Collectors.toList()); // 转换为列表*/ |
| | | return new Response().setII(1,list!=null,lnameList,"查询所有钥匙名信息(用于下拉)"); |
| | | } |
| | | //当前人所在区域的所有id卡钥匙 |
| | | public Response getKeyInAreaByIdCard() { |
| | | //获取当前用户管理的区域 |
| | | UserInf uinf= ActionUtil.getUser(); |
| | | List areaList=new ArrayList(); |
| | | areaList.add(uinf.getAreaId()); |
| | | areaInfService.getAllAreaId(uinf.getAreaId(),areaList); |
| | | //查询区域下的钥匙 |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.in("area_id",areaList); |
| | | wrapper.eq("key_type",1); |
| | | List<KeyInf> list=mapper.selectList(wrapper); |
| | | return new Response().setII(1,list!=null,list,"当前人所在区域的所有id卡钥匙"); |
| | | } |
| | | } |