| | |
| | | return Result.success(deviceService.selectEquipmentOverview()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取被授权人") |
| | | @GetMapping("/authorizedPerson") |
| | | @ValueAuth |
| | | public Result authorizedPerson() { |
| | | return Result.success(deviceService.authorizedPerson()); |
| | | } |
| | | |
| | | @ApiOperation(value = "搜索") |
| | | @GetMapping("/search") |
| | | @ValueAuth |
| | | public Result search(Integer status, String deviceName, String specificationModel, String largeCategory) { |
| | | return Result.success(deviceService.search(status, deviceName, specificationModel, largeCategory)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | IPage<Device> selectDeviceParameter(Page page, QueryWrapper<Device> ew); |
| | | |
| | | List<Device> selectEquipmentOverview(); |
| | | |
| | | List<Device> authorizedPerson(); |
| | | |
| | | List<Device> search(@Param(value = "status") Integer status, @Param(value = "deviceName") String deviceName, |
| | | @Param(value = "specificationModel") String specificationModel, @Param(value = "largeCategory") String largeCategory); |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "校准证书") |
| | | private String calibrationCerticate; |
| | | |
| | | @ValueTableShow(26) |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | } |
| | |
| | | |
| | | List<Device> selectEquipmentOverview(); |
| | | |
| | | List<Device> authorizedPerson(); |
| | | |
| | | List<Device> search( Integer status, String deviceName, String specificationModel, String largeCategory); |
| | | |
| | | } |
| | | |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(Device.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDeviceParameter"); |
| | | if(map1.get("look")==1) itemParameter.setCreateUser(map1.get("userId")); |
| | | if (map1.get("look") == 1) itemParameter.setCreateUser(map1.get("userId")); |
| | | map.put("body", deviceMapper.selectDeviceParameter(page, QueryWrappers.queryWrappers(itemParameter))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int addDeviceParameter(Device itemParameter) { |
| | | return deviceMapper.insert(itemParameter); |
| | | return deviceMapper.insert(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | |
| | | return deviceMapper.selectEquipmentOverview(); |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time |
| | | update_time, |
| | | status, |
| | | from device |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | |
| | | specificationModel, |
| | | deviceStatus, |
| | | create_user, |
| | | status, |
| | | update_time |
| | | from device |
| | | ) a |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="authorizedPerson" resultType="com.yuanchu.mom.pojo.Device"> |
| | | select * |
| | | from (select id, |
| | | authorized_person, |
| | | status |
| | | from device) a |
| | | </select> |
| | | <select id="search" resultType="com.yuanchu.mom.pojo.Device"> |
| | | select * |
| | | from device |
| | | <where> |
| | | <if test="status!=null"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="deviceName!=null and deviceName!=''"> |
| | | and device_name like concat('%',#{deviceName},'%') |
| | | </if> |
| | | <if test="specificationModel!=null and specificationModel!= ''"> |
| | | and specification_model = #{specificationModel} |
| | | </if> |
| | | <if test="largeCategory!=null and largeCategory!= ''"> |
| | | and large_category = #{largeCategory} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |