| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.DeviceMaintenanceFile; |
| | | import com.ruoyi.device.pojo.DeviceRepairFile; |
| | | import com.ruoyi.device.service.DeviceMaintenanceFileService; |
| | | import com.ruoyi.device.service.DeviceRepairFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤ä¿å
»éä»¶ |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/device/deviceMaintenanceFile") |
| | | @Api(tags = "设å¤ä¿å
»éä»¶") |
| | | public class DeviceMaintenanceFileController { |
| | | |
| | | |
| | | @Resource |
| | | private DeviceMaintenanceFileService deviceMaintenanceFileService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | * @param deviceMaintenanceFile |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody DeviceMaintenanceFile deviceMaintenanceFile) { |
| | | return AjaxResult.success(deviceMaintenanceFileService.save(deviceMaintenanceFile)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("å é¤") |
| | | public AjaxResult delDeviceMaintenanceFile(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | //å é¤ä¿å
»éä»¶ |
| | | return AjaxResult.success(deviceMaintenanceFileService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *å页æ¥è¯¢ |
| | | * @param page |
| | | * @param deviceMaintenanceFile |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public AjaxResult deviceMaintenanceFileListPage(Page page, DeviceMaintenanceFile deviceMaintenanceFile) { |
| | | return AjaxResult.success(deviceMaintenanceFileService.deviceMaintenanceFileListPage(page, deviceMaintenanceFile)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.DeviceRepairFile; |
| | | import com.ruoyi.device.service.DeviceRepairFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è®¾å¤æ¥ä¿®éä»¶ |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/device/deviceRepairFile") |
| | | @Api(tags = "è®¾å¤æ¥ä¿®éä»¶") |
| | | public class DeviceRepairFileController { |
| | | |
| | | |
| | | @Resource |
| | | private DeviceRepairFileService deviceRepairFileService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | * @param deviceRepairFile |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody DeviceRepairFile deviceRepairFile) { |
| | | return AjaxResult.success(deviceRepairFileService.save(deviceRepairFile)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("å é¤") |
| | | public AjaxResult delAccountFile(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | //å 餿£éªéä»¶ |
| | | return AjaxResult.success(deviceRepairFileService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *å页æ¥è¯¢ |
| | | * @param page |
| | | * @param deviceRepairFile |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public AjaxResult deviceRepairFileListPage(Page page, DeviceRepairFile deviceRepairFile) { |
| | | return AjaxResult.success(deviceRepairFileService.deviceRepairFileListPage(page, deviceRepairFile)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("å建人åç§°") |
| | | private String createUserName; |
| | | @ApiModelProperty("ä¿å
»è¿åº¦æè¿°") |
| | | private String maintenanceProcessDesc; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("æ¥ä¿®å
容") |
| | | private String remark; |
| | | @ApiModelProperty("ä¿å
»è¿åº¦æè¿°") |
| | | private String maintenanceProcessDesc; |
| | | |
| | | @ApiModelProperty("维修人") |
| | | private String maintenanceName; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.DeviceMaintenanceFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface DeviceMaintenanceFileMapper extends BaseMapper<DeviceMaintenanceFile> { |
| | | |
| | | |
| | | |
| | | IPage<DeviceMaintenanceFile> deviceMaintenanceFileListPage(Page page, @Param("deviceMaintenanceFile") DeviceMaintenanceFile deviceMaintenanceFile); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.DeviceRepairFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface DeviceRepairFileMapper extends BaseMapper<DeviceRepairFile> { |
| | | |
| | | |
| | | |
| | | IPage<DeviceRepairFile> deviceRepairFileListPage(Page page, @Param("deviceRepairFile") DeviceRepairFile deviceRepairFile); |
| | | } |
| | |
| | | @ApiModelProperty("ç§æ·id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | @ApiModelProperty("ä¿å
»è¿åº¦æè¿°") |
| | | private String maintenanceProcessDesc; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 设å¤ä¿å
»éä»¶ |
| | | * device_maintenance_file |
| | | */ |
| | | @TableName(value = "device_maintenance_file") |
| | | @Data |
| | | public class DeviceMaintenanceFile implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "æä»¶è·¯å¾") |
| | | private String url; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å¤§å°") |
| | | private int fileSize; |
| | | |
| | | @ApiModelProperty(value = "设å¤ä¿å
»ID") |
| | | @NotBlank(message = "设å¤ä¿å
»idä¸è½ä¸ºç©º!") |
| | | private Long deviceMaintenanceId; |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("æ¥ä¿®å
容") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ä¿å
»è¿åº¦æè¿°") |
| | | private String maintenanceProcessDesc; |
| | | @ApiModelProperty("维修人") |
| | | private String maintenanceName; |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * è®¾å¤æ¥ä¿®éä»¶ |
| | | * device_repair_file |
| | | */ |
| | | @TableName(value = "device_repair_file") |
| | | @Data |
| | | public class DeviceRepairFile implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "æä»¶è·¯å¾") |
| | | private String url; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å¤§å°") |
| | | private int fileSize; |
| | | |
| | | @ApiModelProperty(value = "è®¾å¤æ¥ä¿®ID") |
| | | @NotBlank(message = "è®¾å¤æ¥ä¿®idä¸è½ä¸ºç©º!") |
| | | private Long deviceRepairId; |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceMaintenanceFile; |
| | | |
| | | |
| | | public interface DeviceMaintenanceFileService extends IService<DeviceMaintenanceFile> { |
| | | |
| | | IPage<DeviceMaintenanceFile> deviceMaintenanceFileListPage(Page page, DeviceMaintenanceFile deviceMaintenanceFile); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceRepairFile; |
| | | |
| | | |
| | | public interface DeviceRepairFileService extends IService<DeviceRepairFile> { |
| | | |
| | | IPage<DeviceRepairFile> deviceRepairFileListPage(Page page, DeviceRepairFile deviceRepairFile); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceMaintenanceFileMapper; |
| | | import com.ruoyi.device.pojo.DeviceMaintenanceFile; |
| | | import com.ruoyi.device.service.DeviceMaintenanceFileService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class DeviceMaintenanceFileServiceImpl extends ServiceImpl<DeviceMaintenanceFileMapper, DeviceMaintenanceFile> implements DeviceMaintenanceFileService { |
| | | |
| | | private DeviceMaintenanceFileMapper deviceMaintenanceFileMapper; |
| | | |
| | | |
| | | @Override |
| | | public IPage<DeviceMaintenanceFile> deviceMaintenanceFileListPage(Page page, DeviceMaintenanceFile deviceMaintenanceFile) { |
| | | return deviceMaintenanceFileMapper.deviceMaintenanceFileListPage(page,deviceMaintenanceFile); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.device.mapper.DeviceRepairFileMapper; |
| | | import com.ruoyi.device.pojo.DeviceRepairFile; |
| | | import com.ruoyi.device.service.DeviceRepairFileService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class DeviceRepairFileServiceImpl extends ServiceImpl<DeviceRepairFileMapper, DeviceRepairFile> implements DeviceRepairFileService { |
| | | |
| | | private DeviceRepairFileMapper deviceRepairFileMapper; |
| | | |
| | | |
| | | @Override |
| | | public IPage<DeviceRepairFile> deviceRepairFileListPage(Page page, DeviceRepairFile deviceRepairFile) { |
| | | return deviceRepairFileMapper.deviceRepairFileListPage(page,deviceRepairFile); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceMaintenanceFileMapper"> |
| | | <select id="deviceMaintenanceFileListPage" resultType="com.ruoyi.device.pojo.DeviceMaintenanceFile"> |
| | | SELECT |
| | | * |
| | | FROM device_maintenance_file |
| | | where |
| | | 1=1 |
| | | <if test="deviceMaintenanceFile.deviceMaintenanceId != null and deviceMaintenanceFile.deviceMaintenanceId != ''"> |
| | | AND device_maintenance_id = #{deviceMaintenanceFile.deviceMaintenanceId} |
| | | </if> |
| | | <if test="deviceMaintenanceFile.name != null and deviceMaintenanceFile.name != '' "> |
| | | AND name = #{deviceMaintenanceFile.name} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | dm.update_user, |
| | | dm.tenant_id, |
| | | dm.maintenance_actually_name, |
| | | dm.maintenance_process_desc, |
| | | dl.device_name, |
| | | dl.device_model, |
| | | su.user_name as create_user_name |
| | |
| | | dm.update_user, |
| | | dm.tenant_id, |
| | | dm.maintenance_actually_name, |
| | | dm.maintenance_process_desc, |
| | | dl.device_name, |
| | | dl.device_model, |
| | | su.user_name as create_user_name |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceRepairFileMapper"> |
| | | <select id="deviceRepairFileListPage" resultType="com.ruoyi.device.pojo.DeviceRepairFile"> |
| | | SELECT |
| | | * |
| | | FROM device_repair_file |
| | | where |
| | | 1=1 |
| | | <if test="deviceRepairFile.deviceRepairId != null and deviceRepairFile.deviceRepairId != ''"> |
| | | AND device_repair_id = #{deviceRepairFile.deviceRepairId} |
| | | </if> |
| | | <if test="deviceRepairFile.name != null and deviceRepairFile.name != '' "> |
| | | AND name = #{deviceRepairFile.name} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | dr.update_user, |
| | | dr.tenant_id, |
| | | dl.device_name, |
| | | dl.device_model |
| | | dl.device_model, |
| | | dr.maintenance_process_desc |
| | | from device_repair dr |
| | | left join device_ledger dl on dr.device_ledger_id = dl.id |
| | | <where> |
| | |
| | | dr.update_user, |
| | | dr.tenant_id, |
| | | dl.device_name, |
| | | dl.device_model |
| | | dl.device_model, |
| | | dr.maintenance_process_desc |
| | | from device_repair dr |
| | | left join device_ledger dl on dr.device_ledger_id = dl.id |
| | | where dr.id = #{id} |