| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.service.DeviceService; |
| | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectDeviceParameter(Page page, Device itemParameter) { |
| | | public Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(Device.class)); |
| | | map.put("head", PrintChina.printChina(DeviceDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDeviceParameter"); |
| | | if(map1.get("look")==1) itemParameter.setCreateUser(map1.get("userId")); |
| | | map.put("body", deviceMapper.selectDeviceParameter(page, QueryWrappers.queryWrappers(itemParameter))); |
| | | if (map1.get("look") == 1) itemParameter.setCreateUser(map1.get("userId")); |
| | | IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter)); |
| | | map.put("body", iPage); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int addDeviceParameter(Device itemParameter) { |
| | | return deviceMapper.insert(itemParameter); |
| | | return deviceMapper.insert(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public List<Device> selectEquipmentOverview() { |
| | | return deviceMapper.selectEquipmentOverview(); |
| | | return deviceMapper.selectEquipmentOverview(new Page(1, 10), QueryWrappers.queryWrappers(new Device())); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> authorizedPerson() { |
| | | return deviceMapper.authorizedPerson(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> search(Integer status, String deviceName, String specificationModel, String largeCategory) { |
| | | return deviceMapper.search(status, deviceName, specificationModel, largeCategory); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectDevicePrincipal() { |
| | | return deviceMapper.selectDevicePrincipal(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectDeviceByCategory(String category) { |
| | | return deviceMapper.selectList(Wrappers.<Device>lambdaQuery().eq(Device::getLargeCategory, category).eq(Device::getDeviceStatus, 0)); |
| | | } |
| | | } |
| | | |