| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | /** |
| | | * 这里维保计划创建后, |
| | |
| | | return service.getPageByCondition(pageNum, pageSize,maintainDTO); |
| | | } |
| | | |
| | | @PostMapping("page2") |
| | | @ApiOperation(value = "查询计划分页") |
| | | @ApiIgnore |
| | | public Response getPageByCondition2(@RequestParam Integer pageNum, @RequestParam Integer pageSize, |
| | | @RequestBody DeviceMaintainDTO maintainDTO |
| | | ) { |
| | | return service.getPageByCondition2(pageNum, pageSize,maintainDTO); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation(value = "查询计划") |
| | | public Response get(@RequestParam Integer deviceId) { |
| | |
| | | List<DeviceMaintain> getPageByCondition(DeviceMaintainDTO maintainDTO); |
| | | |
| | | DeviceMaintain get(Integer deviceId); |
| | | |
| | | List<DeviceMaintain> getPageByCondition2(DeviceMaintainDTO maintainDTO); |
| | | } |
| | |
| | | PageInfo<DeviceMaintain> deviceMaintainPageInfo = new PageInfo<>(deviceMaintainList); |
| | | return new Response().set(1,deviceMaintainPageInfo); |
| | | } |
| | | |
| | | public Response getPageByCondition2(Integer pageNum, Integer pageSize, DeviceMaintainDTO maintainDTO) { |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<DeviceMaintain> deviceMaintainList = mapper.getPageByCondition2(maintainDTO); |
| | | PageInfo<DeviceMaintain> deviceMaintainPageInfo = new PageInfo<>(deviceMaintainList); |
| | | return new Response().set(1,deviceMaintainPageInfo); |
| | | } |
| | | } |
| | |
| | | n.useful_life, |
| | | n.debug_time, |
| | | n.site, |
| | | n.owner, |
| | | m.owner as owner1, |
| | | n.OWNER, |
| | | m.OWNER AS owner1, |
| | | m.owner2, |
| | | m.phone, |
| | | m.cycle, |
| | |
| | | m.reminder_ahead_unit, |
| | | m.reminder_type |
| | | FROM |
| | | db_experiment.tb_device_maintain m, |
| | | db_experiment.tb_device_manage n , |
| | | db_experiment.tb_device_type t |
| | | ( db_experiment.tb_device_manage n LEFT JOIN db_experiment.tb_device_maintain m ON m.device_id = n.device_id AND m.is_plan = 1 ) |
| | | LEFT JOIN db_experiment.tb_device_type t ON n.device_type_id = t.device_type_id |
| | | WHERE |
| | | m.device_id = n.device_id |
| | | AND n.device_type_id = t.device_type_id |
| | | AND m.is_plan=1 |
| | | n.device_id = #{deviceId} |
| | | </select> |
| | | <select id="getPageByCondition2" resultType="com.whyc.pojo.DeviceMaintain"> |
| | | |
| | | </select> |
| | | </mapper> |