Commit 97694da9147ec1494530f04385950616fe528d3b
1 parent
7492ecc1
fix: add new ability
Showing
27 changed files
with
1881 additions
and
147 deletions
ruoyi-admin/pom.xml
| @@ -59,6 +59,11 @@ | @@ -59,6 +59,11 @@ | ||
| 59 | <groupId>org.projectlombok</groupId> | 59 | <groupId>org.projectlombok</groupId> |
| 60 | <artifactId>lombok</artifactId> | 60 | <artifactId>lombok</artifactId> |
| 61 | </dependency> | 61 | </dependency> |
| 62 | + <dependency> | ||
| 63 | + <groupId>com.github.xiaoymin</groupId> | ||
| 64 | + <artifactId>knife4j-spring-boot-starter</artifactId> | ||
| 65 | + <version>3.0.3</version> | ||
| 66 | + </dependency> | ||
| 62 | 67 | ||
| 63 | <!-- 代码生成--> | 68 | <!-- 代码生成--> |
| 64 | <dependency> | 69 | <dependency> |
ruoyi-admin/src/main/java/com/ruoyi/driver/controller/DriverController.java
| @@ -2,6 +2,10 @@ package com.ruoyi.driver.controller; | @@ -2,6 +2,10 @@ package com.ruoyi.driver.controller; | ||
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | + | ||
| 6 | +import io.swagger.annotations.Api; | ||
| 7 | +import io.swagger.annotations.ApiOperation; | ||
| 8 | +import io.swagger.annotations.ApiParam; | ||
| 5 | import org.springframework.security.access.prepost.PreAuthorize; | 9 | import org.springframework.security.access.prepost.PreAuthorize; |
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.web.bind.annotation.GetMapping; | 11 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -25,10 +29,11 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -25,10 +29,11 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 25 | * 驾驶员信息Controller | 29 | * 驾驶员信息Controller |
| 26 | * | 30 | * |
| 27 | * @author 古自健 | 31 | * @author 古自健 |
| 28 | - * @date 2023-07-02 | 32 | + * @date 2023-07-04 |
| 29 | */ | 33 | */ |
| 30 | @RestController | 34 | @RestController |
| 31 | @RequestMapping("/driver/driver") | 35 | @RequestMapping("/driver/driver") |
| 36 | +@Api(tags = "驾驶员管理接口") | ||
| 32 | public class DriverController extends BaseController | 37 | public class DriverController extends BaseController |
| 33 | { | 38 | { |
| 34 | @Autowired | 39 | @Autowired |
| @@ -39,6 +44,7 @@ public class DriverController extends BaseController | @@ -39,6 +44,7 @@ public class DriverController extends BaseController | ||
| 39 | */ | 44 | */ |
| 40 | @PreAuthorize("@ss.hasPermi('driver:driver:list')") | 45 | @PreAuthorize("@ss.hasPermi('driver:driver:list')") |
| 41 | @GetMapping("/list") | 46 | @GetMapping("/list") |
| 47 | + @ApiOperation(value = "查询驾驶员信息列表",notes = "查询驾驶员信息列表") | ||
| 42 | public TableDataInfo list(Driver driver) | 48 | public TableDataInfo list(Driver driver) |
| 43 | { | 49 | { |
| 44 | startPage(); | 50 | startPage(); |
| @@ -52,6 +58,7 @@ public class DriverController extends BaseController | @@ -52,6 +58,7 @@ public class DriverController extends BaseController | ||
| 52 | @PreAuthorize("@ss.hasPermi('driver:driver:export')") | 58 | @PreAuthorize("@ss.hasPermi('driver:driver:export')") |
| 53 | @Log(title = "驾驶员信息", businessType = BusinessType.EXPORT) | 59 | @Log(title = "驾驶员信息", businessType = BusinessType.EXPORT) |
| 54 | @PostMapping("/export") | 60 | @PostMapping("/export") |
| 61 | + @ApiOperation("导出驾驶员信息列表") | ||
| 55 | public void export(HttpServletResponse response, Driver driver) | 62 | public void export(HttpServletResponse response, Driver driver) |
| 56 | { | 63 | { |
| 57 | List<Driver> list = driverService.selectDriverList(driver); | 64 | List<Driver> list = driverService.selectDriverList(driver); |
| @@ -64,7 +71,8 @@ public class DriverController extends BaseController | @@ -64,7 +71,8 @@ public class DriverController extends BaseController | ||
| 64 | */ | 71 | */ |
| 65 | @PreAuthorize("@ss.hasPermi('driver:driver:query')") | 72 | @PreAuthorize("@ss.hasPermi('driver:driver:query')") |
| 66 | @GetMapping(value = "/{id}") | 73 | @GetMapping(value = "/{id}") |
| 67 | - public AjaxResult getInfo(@PathVariable("id") Long id) | 74 | + @ApiOperation("获取驾驶员信息详细信息") |
| 75 | + public AjaxResult getInfo(@ApiParam(value = "id",required = true) @PathVariable("id") Long id) | ||
| 68 | { | 76 | { |
| 69 | return success(driverService.selectDriverById(id)); | 77 | return success(driverService.selectDriverById(id)); |
| 70 | } | 78 | } |
| @@ -75,7 +83,8 @@ public class DriverController extends BaseController | @@ -75,7 +83,8 @@ public class DriverController extends BaseController | ||
| 75 | @PreAuthorize("@ss.hasPermi('driver:driver:add')") | 83 | @PreAuthorize("@ss.hasPermi('driver:driver:add')") |
| 76 | @Log(title = "驾驶员信息", businessType = BusinessType.INSERT) | 84 | @Log(title = "驾驶员信息", businessType = BusinessType.INSERT) |
| 77 | @PostMapping | 85 | @PostMapping |
| 78 | - public AjaxResult add(@RequestBody Driver driver) | 86 | + @ApiOperation("新增驾驶员信息") |
| 87 | + public AjaxResult add(@ApiParam("driver") @RequestBody Driver driver) | ||
| 79 | { | 88 | { |
| 80 | return toAjax(driverService.insertDriver(driver)); | 89 | return toAjax(driverService.insertDriver(driver)); |
| 81 | } | 90 | } |
| @@ -86,7 +95,8 @@ public class DriverController extends BaseController | @@ -86,7 +95,8 @@ public class DriverController extends BaseController | ||
| 86 | @PreAuthorize("@ss.hasPermi('driver:driver:edit')") | 95 | @PreAuthorize("@ss.hasPermi('driver:driver:edit')") |
| 87 | @Log(title = "驾驶员信息", businessType = BusinessType.UPDATE) | 96 | @Log(title = "驾驶员信息", businessType = BusinessType.UPDATE) |
| 88 | @PutMapping | 97 | @PutMapping |
| 89 | - public AjaxResult edit(@RequestBody Driver driver) | 98 | + @ApiOperation("修改驾驶员信息") |
| 99 | + public AjaxResult edit(@ApiParam("driver") @RequestBody Driver driver) | ||
| 90 | { | 100 | { |
| 91 | return toAjax(driverService.updateDriver(driver)); | 101 | return toAjax(driverService.updateDriver(driver)); |
| 92 | } | 102 | } |
| @@ -97,7 +107,8 @@ public class DriverController extends BaseController | @@ -97,7 +107,8 @@ public class DriverController extends BaseController | ||
| 97 | @PreAuthorize("@ss.hasPermi('driver:driver:remove')") | 107 | @PreAuthorize("@ss.hasPermi('driver:driver:remove')") |
| 98 | @Log(title = "驾驶员信息", businessType = BusinessType.DELETE) | 108 | @Log(title = "驾驶员信息", businessType = BusinessType.DELETE) |
| 99 | @DeleteMapping("/{ids}") | 109 | @DeleteMapping("/{ids}") |
| 100 | - public AjaxResult remove(@PathVariable Long[] ids) | 110 | + @ApiOperation("删除驾驶员信息") |
| 111 | + public AjaxResult remove(@ApiParam @PathVariable Long[] ids) | ||
| 101 | { | 112 | { |
| 102 | return toAjax(driverService.deleteDriverByIds(ids)); | 113 | return toAjax(driverService.deleteDriverByIds(ids)); |
| 103 | } | 114 | } |
ruoyi-admin/src/main/java/com/ruoyi/driver/domain/Driver.java
| @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; | @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; | ||
| 9 | * 驾驶员信息对象 driver | 9 | * 驾驶员信息对象 driver |
| 10 | * | 10 | * |
| 11 | * @author 古自健 | 11 | * @author 古自健 |
| 12 | - * @date 2023-07-02 | 12 | + * @date 2023-07-04 |
| 13 | */ | 13 | */ |
| 14 | public class Driver extends BaseEntity | 14 | public class Driver extends BaseEntity |
| 15 | { | 15 | { |
ruoyi-admin/src/main/java/com/ruoyi/driver/mapper/DriverMapper.java
| @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; | @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; | ||
| 8 | * 驾驶员信息Mapper接口 | 8 | * 驾驶员信息Mapper接口 |
| 9 | * | 9 | * |
| 10 | * @author 古自健 | 10 | * @author 古自健 |
| 11 | - * @date 2023-07-02 | 11 | + * @date 2023-07-04 |
| 12 | */ | 12 | */ |
| 13 | public interface DriverMapper | 13 | public interface DriverMapper |
| 14 | { | 14 | { |
| @@ -61,8 +61,8 @@ public interface DriverMapper | @@ -61,8 +61,8 @@ public interface DriverMapper | ||
| 61 | public int deleteDriverByIds(Long[] ids); | 61 | public int deleteDriverByIds(Long[] ids); |
| 62 | 62 | ||
| 63 | /** | 63 | /** |
| 64 | - * 批量保存 | ||
| 65 | - * @param drivers | 64 | + * 批量 |
| 65 | + * @param driverList | ||
| 66 | */ | 66 | */ |
| 67 | - void saveDrivers(@Param("drivers") List<Driver> drivers); | 67 | + void saveDrivers(@Param("drivers") List<Driver> driverList); |
| 68 | } | 68 | } |
ruoyi-admin/src/main/java/com/ruoyi/driver/service/IDriverService.java
| @@ -7,9 +7,9 @@ import com.ruoyi.driver.domain.Driver; | @@ -7,9 +7,9 @@ import com.ruoyi.driver.domain.Driver; | ||
| 7 | * 驾驶员信息Service接口 | 7 | * 驾驶员信息Service接口 |
| 8 | * | 8 | * |
| 9 | * @author 古自健 | 9 | * @author 古自健 |
| 10 | - * @date 2023-07-02 | 10 | + * @date 2023-07-04 |
| 11 | */ | 11 | */ |
| 12 | -public interface IDriverService | 12 | +public interface IDriverService |
| 13 | { | 13 | { |
| 14 | /** | 14 | /** |
| 15 | * 查询驾驶员信息 | 15 | * 查询驾驶员信息 |
| @@ -60,8 +60,8 @@ public interface IDriverService | @@ -60,8 +60,8 @@ public interface IDriverService | ||
| 60 | public int deleteDriverById(Long id); | 60 | public int deleteDriverById(Long id); |
| 61 | 61 | ||
| 62 | /** | 62 | /** |
| 63 | - * 批量加入数据 | ||
| 64 | - * @param drivers | 63 | + * 批量导入员工信息 |
| 64 | + * @param driverList | ||
| 65 | */ | 65 | */ |
| 66 | - void insertDrivers(List<Driver> drivers); | 66 | + void insertDrivers(List<Driver> driverList); |
| 67 | } | 67 | } |
ruoyi-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| @@ -12,10 +12,10 @@ import com.ruoyi.driver.service.IDriverService; | @@ -12,10 +12,10 @@ import com.ruoyi.driver.service.IDriverService; | ||
| 12 | * 驾驶员信息Service业务层处理 | 12 | * 驾驶员信息Service业务层处理 |
| 13 | * | 13 | * |
| 14 | * @author 古自健 | 14 | * @author 古自健 |
| 15 | - * @date 2023-07-02 | 15 | + * @date 2023-07-04 |
| 16 | */ | 16 | */ |
| 17 | @Service | 17 | @Service |
| 18 | -public class DriverServiceImpl implements IDriverService | 18 | +public class DriverServiceImpl implements IDriverService |
| 19 | { | 19 | { |
| 20 | @Autowired | 20 | @Autowired |
| 21 | private DriverMapper driverMapper; | 21 | private DriverMapper driverMapper; |
| @@ -93,8 +93,7 @@ public class DriverServiceImpl implements IDriverService | @@ -93,8 +93,7 @@ public class DriverServiceImpl implements IDriverService | ||
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | @Override | 95 | @Override |
| 96 | - public void insertDrivers(List<Driver> drivers) { | ||
| 97 | - driverMapper.saveDrivers(drivers); | 96 | + public void insertDrivers(List<Driver> driverList) { |
| 97 | + driverMapper.saveDrivers(driverList); | ||
| 98 | } | 98 | } |
| 99 | - | ||
| 100 | } | 99 | } |
ruoyi-admin/src/main/java/com/ruoyi/eexception/controller/EquipmentExceptionController.java
0 → 100644
| 1 | +package com.ruoyi.eexception.controller; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import javax.servlet.http.HttpServletResponse; | ||
| 5 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.web.bind.annotation.GetMapping; | ||
| 8 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 9 | +import org.springframework.web.bind.annotation.PutMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 12 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 13 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 14 | +import org.springframework.web.bind.annotation.RestController; | ||
| 15 | +import com.ruoyi.common.annotation.Log; | ||
| 16 | +import com.ruoyi.common.core.controller.BaseController; | ||
| 17 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 18 | +import com.ruoyi.common.enums.BusinessType; | ||
| 19 | +import com.ruoyi.eexception.domain.EquipmentException; | ||
| 20 | +import com.ruoyi.eexception.service.IEquipmentExceptionService; | ||
| 21 | +import com.ruoyi.common.utils.poi.ExcelUtil; | ||
| 22 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 23 | + | ||
| 24 | +/** | ||
| 25 | + * 设备异常记录Controller | ||
| 26 | + * | ||
| 27 | + * @author guzijian | ||
| 28 | + * @date 2023-07-04 | ||
| 29 | + */ | ||
| 30 | +@RestController | ||
| 31 | +@RequestMapping("/eexception/eexception") | ||
| 32 | +public class EquipmentExceptionController extends BaseController | ||
| 33 | +{ | ||
| 34 | + @Autowired | ||
| 35 | + private IEquipmentExceptionService equipmentExceptionService; | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * 查询设备异常记录列表 | ||
| 39 | + */ | ||
| 40 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:list')") | ||
| 41 | + @GetMapping("/list") | ||
| 42 | + public TableDataInfo list(EquipmentException equipmentException) | ||
| 43 | + { | ||
| 44 | + startPage(); | ||
| 45 | + List<EquipmentException> list = equipmentExceptionService.selectEquipmentExceptionList(equipmentException); | ||
| 46 | + return getDataTable(list); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 导出设备异常记录列表 | ||
| 51 | + */ | ||
| 52 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:export')") | ||
| 53 | + @Log(title = "设备异常记录", businessType = BusinessType.EXPORT) | ||
| 54 | + @PostMapping("/export") | ||
| 55 | + public void export(HttpServletResponse response, EquipmentException equipmentException) | ||
| 56 | + { | ||
| 57 | + List<EquipmentException> list = equipmentExceptionService.selectEquipmentExceptionList(equipmentException); | ||
| 58 | + ExcelUtil<EquipmentException> util = new ExcelUtil<EquipmentException>(EquipmentException.class); | ||
| 59 | + util.exportExcel(response, list, "设备异常记录数据"); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 获取设备异常记录详细信息 | ||
| 64 | + */ | ||
| 65 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:query')") | ||
| 66 | + @GetMapping(value = "/{id}") | ||
| 67 | + public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 68 | + { | ||
| 69 | + return success(equipmentExceptionService.selectEquipmentExceptionById(id)); | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 新增设备异常记录 | ||
| 74 | + */ | ||
| 75 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:add')") | ||
| 76 | + @Log(title = "设备异常记录", businessType = BusinessType.INSERT) | ||
| 77 | + @PostMapping | ||
| 78 | + public AjaxResult add(@RequestBody EquipmentException equipmentException) | ||
| 79 | + { | ||
| 80 | + return toAjax(equipmentExceptionService.insertEquipmentException(equipmentException)); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + /** | ||
| 84 | + * 修改设备异常记录 | ||
| 85 | + */ | ||
| 86 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:edit')") | ||
| 87 | + @Log(title = "设备异常记录", businessType = BusinessType.UPDATE) | ||
| 88 | + @PutMapping | ||
| 89 | + public AjaxResult edit(@RequestBody EquipmentException equipmentException) | ||
| 90 | + { | ||
| 91 | + return toAjax(equipmentExceptionService.updateEquipmentException(equipmentException)); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 删除设备异常记录 | ||
| 96 | + */ | ||
| 97 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:remove')") | ||
| 98 | + @Log(title = "设备异常记录", businessType = BusinessType.DELETE) | ||
| 99 | + @DeleteMapping("/{ids}") | ||
| 100 | + public AjaxResult remove(@PathVariable Long[] ids) | ||
| 101 | + { | ||
| 102 | + return toAjax(equipmentExceptionService.deleteEquipmentExceptionByIds(ids)); | ||
| 103 | + } | ||
| 104 | +} |
ruoyi-admin/src/main/java/com/ruoyi/eexception/domain/EquipmentException.java
0 → 100644
| 1 | +package com.ruoyi.eexception.domain; | ||
| 2 | + | ||
| 3 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 4 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 5 | +import com.ruoyi.common.annotation.Excel; | ||
| 6 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 设备异常记录对象 equipment_exception | ||
| 10 | + * | ||
| 11 | + * @author guzijian | ||
| 12 | + * @date 2023-07-04 | ||
| 13 | + */ | ||
| 14 | +public class EquipmentException extends BaseEntity | ||
| 15 | +{ | ||
| 16 | + private static final long serialVersionUID = 1L; | ||
| 17 | + | ||
| 18 | + /** 主键 */ | ||
| 19 | + private Long id; | ||
| 20 | + | ||
| 21 | + /** 标题 */ | ||
| 22 | + @Excel(name = "标题") | ||
| 23 | + private String title; | ||
| 24 | + | ||
| 25 | + /** 设备ip */ | ||
| 26 | + @Excel(name = "设备ip") | ||
| 27 | + private String equipmentIp; | ||
| 28 | + | ||
| 29 | + /** 人员工号 */ | ||
| 30 | + @Excel(name = "人员工号") | ||
| 31 | + private String jobCode; | ||
| 32 | + | ||
| 33 | + /** 设备图片 */ | ||
| 34 | + @Excel(name = "设备图片") | ||
| 35 | + private String image; | ||
| 36 | + | ||
| 37 | + /** 处理状态 */ | ||
| 38 | + @Excel(name = "处理状态") | ||
| 39 | + private Integer status; | ||
| 40 | + | ||
| 41 | + public void setId(Long id) | ||
| 42 | + { | ||
| 43 | + this.id = id; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public Long getId() | ||
| 47 | + { | ||
| 48 | + return id; | ||
| 49 | + } | ||
| 50 | + public void setTitle(String title) | ||
| 51 | + { | ||
| 52 | + this.title = title; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public String getTitle() | ||
| 56 | + { | ||
| 57 | + return title; | ||
| 58 | + } | ||
| 59 | + public void setEquipmentIp(String equipmentIp) | ||
| 60 | + { | ||
| 61 | + this.equipmentIp = equipmentIp; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public String getEquipmentIp() | ||
| 65 | + { | ||
| 66 | + return equipmentIp; | ||
| 67 | + } | ||
| 68 | + public void setJobCode(String jobCode) | ||
| 69 | + { | ||
| 70 | + this.jobCode = jobCode; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public String getJobCode() | ||
| 74 | + { | ||
| 75 | + return jobCode; | ||
| 76 | + } | ||
| 77 | + public void setImage(String image) | ||
| 78 | + { | ||
| 79 | + this.image = image; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public String getImage() | ||
| 83 | + { | ||
| 84 | + return image; | ||
| 85 | + } | ||
| 86 | + public void setStatus(Integer status) | ||
| 87 | + { | ||
| 88 | + this.status = status; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public Integer getStatus() | ||
| 92 | + { | ||
| 93 | + return status; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + @Override | ||
| 97 | + public String toString() { | ||
| 98 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 99 | + .append("id", getId()) | ||
| 100 | + .append("title", getTitle()) | ||
| 101 | + .append("equipmentIp", getEquipmentIp()) | ||
| 102 | + .append("createTime", getCreateTime()) | ||
| 103 | + .append("jobCode", getJobCode()) | ||
| 104 | + .append("image", getImage()) | ||
| 105 | + .append("status", getStatus()) | ||
| 106 | + .append("remark", getRemark()) | ||
| 107 | + .toString(); | ||
| 108 | + } | ||
| 109 | +} |
ruoyi-admin/src/main/java/com/ruoyi/eexception/mapper/EquipmentExceptionMapper.java
0 → 100644
| 1 | +package com.ruoyi.eexception.mapper; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.eexception.domain.EquipmentException; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 设备异常记录Mapper接口 | ||
| 8 | + * | ||
| 9 | + * @author guzijian | ||
| 10 | + * @date 2023-07-04 | ||
| 11 | + */ | ||
| 12 | +public interface EquipmentExceptionMapper | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询设备异常记录 | ||
| 16 | + * | ||
| 17 | + * @param id 设备异常记录主键 | ||
| 18 | + * @return 设备异常记录 | ||
| 19 | + */ | ||
| 20 | + public EquipmentException selectEquipmentExceptionById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询设备异常记录列表 | ||
| 24 | + * | ||
| 25 | + * @param equipmentException 设备异常记录 | ||
| 26 | + * @return 设备异常记录集合 | ||
| 27 | + */ | ||
| 28 | + public List<EquipmentException> selectEquipmentExceptionList(EquipmentException equipmentException); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增设备异常记录 | ||
| 32 | + * | ||
| 33 | + * @param equipmentException 设备异常记录 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + public int insertEquipmentException(EquipmentException equipmentException); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改设备异常记录 | ||
| 40 | + * | ||
| 41 | + * @param equipmentException 设备异常记录 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + public int updateEquipmentException(EquipmentException equipmentException); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 删除设备异常记录 | ||
| 48 | + * | ||
| 49 | + * @param id 设备异常记录主键 | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + public int deleteEquipmentExceptionById(Long id); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 批量删除设备异常记录 | ||
| 56 | + * | ||
| 57 | + * @param ids 需要删除的数据主键集合 | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + public int deleteEquipmentExceptionByIds(Long[] ids); | ||
| 61 | +} |
ruoyi-admin/src/main/java/com/ruoyi/eexception/service/IEquipmentExceptionService.java
0 → 100644
| 1 | +package com.ruoyi.eexception.service; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.eexception.domain.EquipmentException; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 设备异常记录Service接口 | ||
| 8 | + * | ||
| 9 | + * @author guzijian | ||
| 10 | + * @date 2023-07-04 | ||
| 11 | + */ | ||
| 12 | +public interface IEquipmentExceptionService | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询设备异常记录 | ||
| 16 | + * | ||
| 17 | + * @param id 设备异常记录主键 | ||
| 18 | + * @return 设备异常记录 | ||
| 19 | + */ | ||
| 20 | + public EquipmentException selectEquipmentExceptionById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询设备异常记录列表 | ||
| 24 | + * | ||
| 25 | + * @param equipmentException 设备异常记录 | ||
| 26 | + * @return 设备异常记录集合 | ||
| 27 | + */ | ||
| 28 | + public List<EquipmentException> selectEquipmentExceptionList(EquipmentException equipmentException); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增设备异常记录 | ||
| 32 | + * | ||
| 33 | + * @param equipmentException 设备异常记录 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + public int insertEquipmentException(EquipmentException equipmentException); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改设备异常记录 | ||
| 40 | + * | ||
| 41 | + * @param equipmentException 设备异常记录 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + public int updateEquipmentException(EquipmentException equipmentException); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 批量删除设备异常记录 | ||
| 48 | + * | ||
| 49 | + * @param ids 需要删除的设备异常记录主键集合 | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + public int deleteEquipmentExceptionByIds(Long[] ids); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 删除设备异常记录信息 | ||
| 56 | + * | ||
| 57 | + * @param id 设备异常记录主键 | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + public int deleteEquipmentExceptionById(Long id); | ||
| 61 | +} |
ruoyi-admin/src/main/java/com/ruoyi/eexception/service/impl/EquipmentExceptionServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.eexception.service.impl; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.common.utils.DateUtils; | ||
| 5 | +import com.ruoyi.common.utils.SecurityUtils; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import com.ruoyi.eexception.mapper.EquipmentExceptionMapper; | ||
| 9 | +import com.ruoyi.eexception.domain.EquipmentException; | ||
| 10 | +import com.ruoyi.eexception.service.IEquipmentExceptionService; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 设备异常记录Service业务层处理 | ||
| 14 | + * | ||
| 15 | + * @author guzijian | ||
| 16 | + * @date 2023-07-04 | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +public class EquipmentExceptionServiceImpl implements IEquipmentExceptionService | ||
| 20 | +{ | ||
| 21 | + @Autowired | ||
| 22 | + private EquipmentExceptionMapper equipmentExceptionMapper; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 查询设备异常记录 | ||
| 26 | + * | ||
| 27 | + * @param id 设备异常记录主键 | ||
| 28 | + * @return 设备异常记录 | ||
| 29 | + */ | ||
| 30 | + @Override | ||
| 31 | + public EquipmentException selectEquipmentExceptionById(Long id) | ||
| 32 | + { | ||
| 33 | + return equipmentExceptionMapper.selectEquipmentExceptionById(id); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 查询设备异常记录列表 | ||
| 38 | + * | ||
| 39 | + * @param equipmentException 设备异常记录 | ||
| 40 | + * @return 设备异常记录 | ||
| 41 | + */ | ||
| 42 | + @Override | ||
| 43 | + public List<EquipmentException> selectEquipmentExceptionList(EquipmentException equipmentException) | ||
| 44 | + { | ||
| 45 | + return equipmentExceptionMapper.selectEquipmentExceptionList(equipmentException); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 新增设备异常记录 | ||
| 50 | + * | ||
| 51 | + * @param equipmentException 设备异常记录 | ||
| 52 | + * @return 结果 | ||
| 53 | + */ | ||
| 54 | + @Override | ||
| 55 | + public int insertEquipmentException(EquipmentException equipmentException) | ||
| 56 | + { | ||
| 57 | + equipmentException.setCreateTime(DateUtils.getNowDate()); | ||
| 58 | + return equipmentExceptionMapper.insertEquipmentException(equipmentException); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 修改设备异常记录 | ||
| 63 | + * | ||
| 64 | + * @param equipmentException 设备异常记录 | ||
| 65 | + * @return 结果 | ||
| 66 | + */ | ||
| 67 | + @Override | ||
| 68 | + public int updateEquipmentException(EquipmentException equipmentException) | ||
| 69 | + { | ||
| 70 | + return equipmentExceptionMapper.updateEquipmentException(equipmentException); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 批量删除设备异常记录 | ||
| 75 | + * | ||
| 76 | + * @param ids 需要删除的设备异常记录主键 | ||
| 77 | + * @return 结果 | ||
| 78 | + */ | ||
| 79 | + @Override | ||
| 80 | + public int deleteEquipmentExceptionByIds(Long[] ids) | ||
| 81 | + { | ||
| 82 | + return equipmentExceptionMapper.deleteEquipmentExceptionByIds(ids); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 删除设备异常记录信息 | ||
| 87 | + * | ||
| 88 | + * @param id 设备异常记录主键 | ||
| 89 | + * @return 结果 | ||
| 90 | + */ | ||
| 91 | + @Override | ||
| 92 | + public int deleteEquipmentExceptionById(Long id) | ||
| 93 | + { | ||
| 94 | + return equipmentExceptionMapper.deleteEquipmentExceptionById(id); | ||
| 95 | + } | ||
| 96 | +} |
ruoyi-admin/src/main/java/com/ruoyi/equipment/controller/EquipmentController.java
0 → 100644
| 1 | +package com.ruoyi.equipment.controller; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import javax.servlet.http.HttpServletResponse; | ||
| 5 | + | ||
| 6 | +import io.swagger.annotations.ApiOperation; | ||
| 7 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.GetMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 13 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 14 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 16 | +import org.springframework.web.bind.annotation.RestController; | ||
| 17 | +import com.ruoyi.common.annotation.Log; | ||
| 18 | +import com.ruoyi.common.core.controller.BaseController; | ||
| 19 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 20 | +import com.ruoyi.common.enums.BusinessType; | ||
| 21 | +import com.ruoyi.equipment.domain.Equipment; | ||
| 22 | +import com.ruoyi.equipment.service.IEquipmentService; | ||
| 23 | +import com.ruoyi.common.utils.poi.ExcelUtil; | ||
| 24 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 25 | + | ||
| 26 | +/** | ||
| 27 | + * 设备信息Controller | ||
| 28 | + * | ||
| 29 | + * @author guzijian | ||
| 30 | + * @date 2023-07-04 | ||
| 31 | + */ | ||
| 32 | +@RestController | ||
| 33 | +@RequestMapping("/equipment/equipment") | ||
| 34 | +public class EquipmentController extends BaseController | ||
| 35 | +{ | ||
| 36 | + @Autowired | ||
| 37 | + private IEquipmentService equipmentService; | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 查询设备信息列表 | ||
| 41 | + */ | ||
| 42 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:list')") | ||
| 43 | + @GetMapping("/list") | ||
| 44 | + @ApiOperation("查询设备信息列表") | ||
| 45 | + public TableDataInfo list(Equipment equipment) | ||
| 46 | + { | ||
| 47 | + startPage(); | ||
| 48 | + List<Equipment> list = equipmentService.selectEquipmentList(equipment); | ||
| 49 | + return getDataTable(list); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 导出设备信息列表 | ||
| 54 | + */ | ||
| 55 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:export')") | ||
| 56 | + @Log(title = "设备信息", businessType = BusinessType.EXPORT) | ||
| 57 | + @PostMapping("/export") | ||
| 58 | + @ApiOperation("导出设备信息列表") | ||
| 59 | + public void export(HttpServletResponse response, Equipment equipment) | ||
| 60 | + { | ||
| 61 | + List<Equipment> list = equipmentService.selectEquipmentList(equipment); | ||
| 62 | + ExcelUtil<Equipment> util = new ExcelUtil<Equipment>(Equipment.class); | ||
| 63 | + util.exportExcel(response, list, "设备信息数据"); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 获取设备信息详细信息 | ||
| 68 | + */ | ||
| 69 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:query')") | ||
| 70 | + @GetMapping(value = "/{id}") | ||
| 71 | + @ApiOperation("获取设备信息详细信息") | ||
| 72 | + public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 73 | + { | ||
| 74 | + return success(equipmentService.selectEquipmentById(id)); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 新增设备信息 | ||
| 79 | + */ | ||
| 80 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:add')") | ||
| 81 | + @Log(title = "设备信息", businessType = BusinessType.INSERT) | ||
| 82 | + @PostMapping | ||
| 83 | + @ApiOperation("新增设备信息") | ||
| 84 | + public AjaxResult add(@RequestBody Equipment equipment) | ||
| 85 | + { | ||
| 86 | + return toAjax(equipmentService.insertEquipment(equipment)); | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + /** | ||
| 90 | + * 修改设备信息 | ||
| 91 | + */ | ||
| 92 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:edit')") | ||
| 93 | + @Log(title = "设备信息", businessType = BusinessType.UPDATE) | ||
| 94 | + @PutMapping | ||
| 95 | + @ApiOperation("修改设备信息") | ||
| 96 | + public AjaxResult edit(@RequestBody Equipment equipment) | ||
| 97 | + { | ||
| 98 | + return toAjax(equipmentService.updateEquipment(equipment)); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 删除设备信息 | ||
| 103 | + */ | ||
| 104 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:remove')") | ||
| 105 | + @Log(title = "设备信息", businessType = BusinessType.DELETE) | ||
| 106 | + @DeleteMapping("/{ids}") | ||
| 107 | + @ApiOperation("删除设备信息") | ||
| 108 | + public AjaxResult remove(@PathVariable Long[] ids) | ||
| 109 | + { | ||
| 110 | + return toAjax(equipmentService.deleteEquipmentByIds(ids)); | ||
| 111 | + } | ||
| 112 | +} |
ruoyi-admin/src/main/java/com/ruoyi/equipment/domain/Equipment.java
0 → 100644
| 1 | +package com.ruoyi.equipment.domain; | ||
| 2 | + | ||
| 3 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 4 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 5 | +import com.ruoyi.common.annotation.Excel; | ||
| 6 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 设备信息对象 equipment | ||
| 10 | + * | ||
| 11 | + * @author guzijian | ||
| 12 | + * @date 2023-07-04 | ||
| 13 | + */ | ||
| 14 | +public class Equipment extends BaseEntity | ||
| 15 | +{ | ||
| 16 | + private static final long serialVersionUID = 1L; | ||
| 17 | + | ||
| 18 | + /** 主键 */ | ||
| 19 | + private Long id; | ||
| 20 | + | ||
| 21 | + /** 场地名称 */ | ||
| 22 | + @Excel(name = "场地名称") | ||
| 23 | + private String siteName; | ||
| 24 | + | ||
| 25 | + /** 安置地址 */ | ||
| 26 | + @Excel(name = "安置地址") | ||
| 27 | + private String address; | ||
| 28 | + | ||
| 29 | + /** ip地址 */ | ||
| 30 | + @Excel(name = "ip地址") | ||
| 31 | + private String ip; | ||
| 32 | + | ||
| 33 | + /** 设备状态 */ | ||
| 34 | + @Excel(name = "设备状态") | ||
| 35 | + private Integer status; | ||
| 36 | + | ||
| 37 | + /** 设备权限 */ | ||
| 38 | + @Excel(name = "设备权限 ") | ||
| 39 | + private String promise; | ||
| 40 | + | ||
| 41 | + /** 设备图片 */ | ||
| 42 | + @Excel(name = "设备图片") | ||
| 43 | + private String image; | ||
| 44 | + | ||
| 45 | + public void setId(Long id) | ||
| 46 | + { | ||
| 47 | + this.id = id; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public Long getId() | ||
| 51 | + { | ||
| 52 | + return id; | ||
| 53 | + } | ||
| 54 | + public void setSiteName(String siteName) | ||
| 55 | + { | ||
| 56 | + this.siteName = siteName; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public String getSiteName() | ||
| 60 | + { | ||
| 61 | + return siteName; | ||
| 62 | + } | ||
| 63 | + public void setAddress(String address) | ||
| 64 | + { | ||
| 65 | + this.address = address; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public String getAddress() | ||
| 69 | + { | ||
| 70 | + return address; | ||
| 71 | + } | ||
| 72 | + public void setIp(String ip) | ||
| 73 | + { | ||
| 74 | + this.ip = ip; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public String getIp() | ||
| 78 | + { | ||
| 79 | + return ip; | ||
| 80 | + } | ||
| 81 | + public void setStatus(Integer status) | ||
| 82 | + { | ||
| 83 | + this.status = status; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public Integer getStatus() | ||
| 87 | + { | ||
| 88 | + return status; | ||
| 89 | + } | ||
| 90 | + public void setPromise(String promise) | ||
| 91 | + { | ||
| 92 | + this.promise = promise; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public String getPromise() | ||
| 96 | + { | ||
| 97 | + return promise; | ||
| 98 | + } | ||
| 99 | + public void setImage(String image) | ||
| 100 | + { | ||
| 101 | + this.image = image; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getImage() | ||
| 105 | + { | ||
| 106 | + return image; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + @Override | ||
| 110 | + public String toString() { | ||
| 111 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 112 | + .append("id", getId()) | ||
| 113 | + .append("siteName", getSiteName()) | ||
| 114 | + .append("address", getAddress()) | ||
| 115 | + .append("ip", getIp()) | ||
| 116 | + .append("status", getStatus()) | ||
| 117 | + .append("promise", getPromise()) | ||
| 118 | + .append("image", getImage()) | ||
| 119 | + .append("createTime", getCreateTime()) | ||
| 120 | + .append("updateTime", getUpdateTime()) | ||
| 121 | + .append("createBy", getCreateBy()) | ||
| 122 | + .append("updateBy", getUpdateBy()) | ||
| 123 | + .append("remark", getRemark()) | ||
| 124 | + .toString(); | ||
| 125 | + } | ||
| 126 | +} |
ruoyi-admin/src/main/java/com/ruoyi/equipment/mapper/EquipmentMapper.java
0 → 100644
| 1 | +package com.ruoyi.equipment.mapper; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.equipment.domain.Equipment; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 设备信息Mapper接口 | ||
| 8 | + * | ||
| 9 | + * @author guzijian | ||
| 10 | + * @date 2023-07-04 | ||
| 11 | + */ | ||
| 12 | +public interface EquipmentMapper | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询设备信息 | ||
| 16 | + * | ||
| 17 | + * @param id 设备信息主键 | ||
| 18 | + * @return 设备信息 | ||
| 19 | + */ | ||
| 20 | + public Equipment selectEquipmentById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询设备信息列表 | ||
| 24 | + * | ||
| 25 | + * @param equipment 设备信息 | ||
| 26 | + * @return 设备信息集合 | ||
| 27 | + */ | ||
| 28 | + public List<Equipment> selectEquipmentList(Equipment equipment); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增设备信息 | ||
| 32 | + * | ||
| 33 | + * @param equipment 设备信息 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + public int insertEquipment(Equipment equipment); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改设备信息 | ||
| 40 | + * | ||
| 41 | + * @param equipment 设备信息 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + public int updateEquipment(Equipment equipment); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 删除设备信息 | ||
| 48 | + * | ||
| 49 | + * @param id 设备信息主键 | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + public int deleteEquipmentById(Long id); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 批量删除设备信息 | ||
| 56 | + * | ||
| 57 | + * @param ids 需要删除的数据主键集合 | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + public int deleteEquipmentByIds(Long[] ids); | ||
| 61 | +} |
ruoyi-admin/src/main/java/com/ruoyi/equipment/service/IEquipmentService.java
0 → 100644
| 1 | +package com.ruoyi.equipment.service; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.equipment.domain.Equipment; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 设备信息Service接口 | ||
| 8 | + * | ||
| 9 | + * @author guzijian | ||
| 10 | + * @date 2023-07-04 | ||
| 11 | + */ | ||
| 12 | +public interface IEquipmentService | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询设备信息 | ||
| 16 | + * | ||
| 17 | + * @param id 设备信息主键 | ||
| 18 | + * @return 设备信息 | ||
| 19 | + */ | ||
| 20 | + public Equipment selectEquipmentById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询设备信息列表 | ||
| 24 | + * | ||
| 25 | + * @param equipment 设备信息 | ||
| 26 | + * @return 设备信息集合 | ||
| 27 | + */ | ||
| 28 | + public List<Equipment> selectEquipmentList(Equipment equipment); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增设备信息 | ||
| 32 | + * | ||
| 33 | + * @param equipment 设备信息 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + public int insertEquipment(Equipment equipment); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改设备信息 | ||
| 40 | + * | ||
| 41 | + * @param equipment 设备信息 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + public int updateEquipment(Equipment equipment); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 批量删除设备信息 | ||
| 48 | + * | ||
| 49 | + * @param ids 需要删除的设备信息主键集合 | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + public int deleteEquipmentByIds(Long[] ids); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 删除设备信息信息 | ||
| 56 | + * | ||
| 57 | + * @param id 设备信息主键 | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + public int deleteEquipmentById(Long id); | ||
| 61 | +} |
ruoyi-admin/src/main/java/com/ruoyi/equipment/service/impl/EquipmentServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.equipment.service.impl; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.common.utils.DateUtils; | ||
| 5 | +import com.ruoyi.common.utils.SecurityUtils; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import com.ruoyi.equipment.mapper.EquipmentMapper; | ||
| 9 | +import com.ruoyi.equipment.domain.Equipment; | ||
| 10 | +import com.ruoyi.equipment.service.IEquipmentService; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 设备信息Service业务层处理 | ||
| 14 | + * | ||
| 15 | + * @author guzijian | ||
| 16 | + * @date 2023-07-04 | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +public class EquipmentServiceImpl implements IEquipmentService | ||
| 20 | +{ | ||
| 21 | + @Autowired | ||
| 22 | + private EquipmentMapper equipmentMapper; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 查询设备信息 | ||
| 26 | + * | ||
| 27 | + * @param id 设备信息主键 | ||
| 28 | + * @return 设备信息 | ||
| 29 | + */ | ||
| 30 | + @Override | ||
| 31 | + public Equipment selectEquipmentById(Long id) | ||
| 32 | + { | ||
| 33 | + return equipmentMapper.selectEquipmentById(id); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 查询设备信息列表 | ||
| 38 | + * | ||
| 39 | + * @param equipment 设备信息 | ||
| 40 | + * @return 设备信息 | ||
| 41 | + */ | ||
| 42 | + @Override | ||
| 43 | + public List<Equipment> selectEquipmentList(Equipment equipment) | ||
| 44 | + { | ||
| 45 | + return equipmentMapper.selectEquipmentList(equipment); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 新增设备信息 | ||
| 50 | + * | ||
| 51 | + * @param equipment 设备信息 | ||
| 52 | + * @return 结果 | ||
| 53 | + */ | ||
| 54 | + @Override | ||
| 55 | + public int insertEquipment(Equipment equipment) | ||
| 56 | + { | ||
| 57 | + equipment.setCreateTime(DateUtils.getNowDate()); | ||
| 58 | + equipment.setCreateBy(SecurityUtils.getUsername()); | ||
| 59 | + return equipmentMapper.insertEquipment(equipment); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 修改设备信息 | ||
| 64 | + * | ||
| 65 | + * @param equipment 设备信息 | ||
| 66 | + * @return 结果 | ||
| 67 | + */ | ||
| 68 | + @Override | ||
| 69 | + public int updateEquipment(Equipment equipment) | ||
| 70 | + { | ||
| 71 | + equipment.setUpdateTime(DateUtils.getNowDate()); | ||
| 72 | + equipment.setUpdateBy(SecurityUtils.getUsername()); | ||
| 73 | + return equipmentMapper.updateEquipment(equipment); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 批量删除设备信息 | ||
| 78 | + * | ||
| 79 | + * @param ids 需要删除的设备信息主键 | ||
| 80 | + * @return 结果 | ||
| 81 | + */ | ||
| 82 | + @Override | ||
| 83 | + public int deleteEquipmentByIds(Long[] ids) | ||
| 84 | + { | ||
| 85 | + return equipmentMapper.deleteEquipmentByIds(ids); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 删除设备信息信息 | ||
| 90 | + * | ||
| 91 | + * @param id 设备信息主键 | ||
| 92 | + * @return 结果 | ||
| 93 | + */ | ||
| 94 | + @Override | ||
| 95 | + public int deleteEquipmentById(Long id) | ||
| 96 | + { | ||
| 97 | + return equipmentMapper.deleteEquipmentById(id); | ||
| 98 | + } | ||
| 99 | +} |
ruoyi-admin/src/main/java/com/ruoyi/in/controller/SignInController.java
0 → 100644
| 1 | +package com.ruoyi.in.controller; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import javax.servlet.http.HttpServletResponse; | ||
| 5 | + | ||
| 6 | +import io.swagger.annotations.ApiOperation; | ||
| 7 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.GetMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 13 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 14 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 16 | +import org.springframework.web.bind.annotation.RestController; | ||
| 17 | +import com.ruoyi.common.annotation.Log; | ||
| 18 | +import com.ruoyi.common.core.controller.BaseController; | ||
| 19 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 20 | +import com.ruoyi.common.enums.BusinessType; | ||
| 21 | +import com.ruoyi.in.domain.SignIn; | ||
| 22 | +import com.ruoyi.in.service.ISignInService; | ||
| 23 | +import com.ruoyi.common.utils.poi.ExcelUtil; | ||
| 24 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 25 | + | ||
| 26 | +/** | ||
| 27 | + * 签到Controller | ||
| 28 | + * | ||
| 29 | + * @author guzijian | ||
| 30 | + * @date 2023-07-04 | ||
| 31 | + */ | ||
| 32 | +@RestController | ||
| 33 | +@RequestMapping("/in/in") | ||
| 34 | +public class SignInController extends BaseController | ||
| 35 | +{ | ||
| 36 | + @Autowired | ||
| 37 | + private ISignInService signInService; | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 查询签到列表 | ||
| 41 | + */ | ||
| 42 | + @PreAuthorize("@ss.hasPermi('in:in:list')") | ||
| 43 | + @GetMapping("/list") | ||
| 44 | + @ApiOperation("查询签到列表") | ||
| 45 | + public TableDataInfo list(SignIn signIn) | ||
| 46 | + { | ||
| 47 | + startPage(); | ||
| 48 | + List<SignIn> list = signInService.selectSignInList(signIn); | ||
| 49 | + return getDataTable(list); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 导出签到列表 | ||
| 54 | + */ | ||
| 55 | + @PreAuthorize("@ss.hasPermi('in:in:export')") | ||
| 56 | + @Log(title = "签到", businessType = BusinessType.EXPORT) | ||
| 57 | + @PostMapping("/export") | ||
| 58 | + @ApiOperation("导出签到列表") | ||
| 59 | + public void export(HttpServletResponse response, SignIn signIn) | ||
| 60 | + { | ||
| 61 | + List<SignIn> list = signInService.selectSignInList(signIn); | ||
| 62 | + ExcelUtil<SignIn> util = new ExcelUtil<SignIn>(SignIn.class); | ||
| 63 | + util.exportExcel(response, list, "签到数据"); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 获取签到详细信息 | ||
| 68 | + */ | ||
| 69 | + @PreAuthorize("@ss.hasPermi('in:in:query')") | ||
| 70 | + @GetMapping(value = "/{id}") | ||
| 71 | + @ApiOperation("获取签到详细信息") | ||
| 72 | + public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 73 | + { | ||
| 74 | + return success(signInService.selectSignInById(id)); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 新增签到 | ||
| 79 | + */ | ||
| 80 | + @PreAuthorize("@ss.hasPermi('in:in:add')") | ||
| 81 | + @Log(title = "签到", businessType = BusinessType.INSERT) | ||
| 82 | + @PostMapping | ||
| 83 | + @ApiOperation("新增签到") | ||
| 84 | + public AjaxResult add(@RequestBody SignIn signIn) | ||
| 85 | + { | ||
| 86 | + return toAjax(signInService.insertSignIn(signIn)); | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + /** | ||
| 90 | + * 修改签到 | ||
| 91 | + */ | ||
| 92 | + @PreAuthorize("@ss.hasPermi('in:in:edit')") | ||
| 93 | + @Log(title = "签到", businessType = BusinessType.UPDATE) | ||
| 94 | + @PutMapping | ||
| 95 | + @ApiOperation("修改签到") | ||
| 96 | + public AjaxResult edit(@RequestBody SignIn signIn) | ||
| 97 | + { | ||
| 98 | + return toAjax(signInService.updateSignIn(signIn)); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 删除签到 | ||
| 103 | + */ | ||
| 104 | + @PreAuthorize("@ss.hasPermi('in:in:remove')") | ||
| 105 | + @Log(title = "签到", businessType = BusinessType.DELETE) | ||
| 106 | + @DeleteMapping("/{ids}") | ||
| 107 | + @ApiOperation("删除签到") | ||
| 108 | + public AjaxResult remove(@PathVariable Long[] ids) | ||
| 109 | + { | ||
| 110 | + return toAjax(signInService.deleteSignInByIds(ids)); | ||
| 111 | + } | ||
| 112 | +} |
ruoyi-admin/src/main/java/com/ruoyi/in/domain/SignIn.java
0 → 100644
| 1 | +package com.ruoyi.in.domain; | ||
| 2 | + | ||
| 3 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 4 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 5 | +import com.ruoyi.common.annotation.Excel; | ||
| 6 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 签到对象 sign_in | ||
| 10 | + * | ||
| 11 | + * @author guzijian | ||
| 12 | + * @date 2023-07-04 | ||
| 13 | + */ | ||
| 14 | +public class SignIn extends BaseEntity | ||
| 15 | +{ | ||
| 16 | + private static final long serialVersionUID = 1L; | ||
| 17 | + | ||
| 18 | + /** 主键 */ | ||
| 19 | + private Long id; | ||
| 20 | + | ||
| 21 | + /** 工号 */ | ||
| 22 | + @Excel(name = "工号") | ||
| 23 | + private String jobCode; | ||
| 24 | + | ||
| 25 | + /** 设备ip */ | ||
| 26 | + @Excel(name = "设备ip") | ||
| 27 | + private String ip; | ||
| 28 | + | ||
| 29 | + /** 图片 */ | ||
| 30 | + @Excel(name = "图片") | ||
| 31 | + private String image; | ||
| 32 | + | ||
| 33 | + /** 签到结果 */ | ||
| 34 | + @Excel(name = "签到结果") | ||
| 35 | + private Integer status; | ||
| 36 | + | ||
| 37 | + /** 签到类型 */ | ||
| 38 | + @Excel(name = "签到类型") | ||
| 39 | + private String singnIn; | ||
| 40 | + | ||
| 41 | + /** 酒精测试 */ | ||
| 42 | + @Excel(name = "酒精测试") | ||
| 43 | + private Integer alcoholFlag; | ||
| 44 | + | ||
| 45 | + /** 签到类型 */ | ||
| 46 | + @Excel(name = "签到类型") | ||
| 47 | + private Integer type; | ||
| 48 | + | ||
| 49 | + public void setId(Long id) | ||
| 50 | + { | ||
| 51 | + this.id = id; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public Long getId() | ||
| 55 | + { | ||
| 56 | + return id; | ||
| 57 | + } | ||
| 58 | + public void setJobCode(String jobCode) | ||
| 59 | + { | ||
| 60 | + this.jobCode = jobCode; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public String getJobCode() | ||
| 64 | + { | ||
| 65 | + return jobCode; | ||
| 66 | + } | ||
| 67 | + public void setIp(String ip) | ||
| 68 | + { | ||
| 69 | + this.ip = ip; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public String getIp() | ||
| 73 | + { | ||
| 74 | + return ip; | ||
| 75 | + } | ||
| 76 | + public void setImage(String image) | ||
| 77 | + { | ||
| 78 | + this.image = image; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public String getImage() | ||
| 82 | + { | ||
| 83 | + return image; | ||
| 84 | + } | ||
| 85 | + public void setStatus(Integer status) | ||
| 86 | + { | ||
| 87 | + this.status = status; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public Integer getStatus() | ||
| 91 | + { | ||
| 92 | + return status; | ||
| 93 | + } | ||
| 94 | + public void setSingnIn(String singnIn) | ||
| 95 | + { | ||
| 96 | + this.singnIn = singnIn; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public String getSingnIn() | ||
| 100 | + { | ||
| 101 | + return singnIn; | ||
| 102 | + } | ||
| 103 | + public void setAlcoholFlag(Integer alcoholFlag) | ||
| 104 | + { | ||
| 105 | + this.alcoholFlag = alcoholFlag; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public Integer getAlcoholFlag() | ||
| 109 | + { | ||
| 110 | + return alcoholFlag; | ||
| 111 | + } | ||
| 112 | + public void setType(Integer type) | ||
| 113 | + { | ||
| 114 | + this.type = type; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public Integer getType() | ||
| 118 | + { | ||
| 119 | + return type; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + @Override | ||
| 123 | + public String toString() { | ||
| 124 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 125 | + .append("id", getId()) | ||
| 126 | + .append("createTime", getCreateTime()) | ||
| 127 | + .append("jobCode", getJobCode()) | ||
| 128 | + .append("ip", getIp()) | ||
| 129 | + .append("updateTime", getUpdateTime()) | ||
| 130 | + .append("image", getImage()) | ||
| 131 | + .append("status", getStatus()) | ||
| 132 | + .append("updateBy", getUpdateBy()) | ||
| 133 | + .append("singnIn", getSingnIn()) | ||
| 134 | + .append("alcoholFlag", getAlcoholFlag()) | ||
| 135 | + .append("type", getType()) | ||
| 136 | + .append("remark", getRemark()) | ||
| 137 | + .toString(); | ||
| 138 | + } | ||
| 139 | +} |
ruoyi-admin/src/main/java/com/ruoyi/in/in/SignInMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.ruoyi.in.mapper.SignInMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="SignIn" id="SignInResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="createTime" column="create_time" /> | ||
| 10 | + <result property="jobCode" column="jobCode" /> | ||
| 11 | + <result property="ip" column="ip" /> | ||
| 12 | + <result property="updateTime" column="update_time" /> | ||
| 13 | + <result property="image" column="image" /> | ||
| 14 | + <result property="status" column="status" /> | ||
| 15 | + <result property="updateBy" column="update_by" /> | ||
| 16 | + <result property="singnIn" column="singn_in" /> | ||
| 17 | + <result property="alcoholFlag" column="alcohol_flag" /> | ||
| 18 | + <result property="type" column="type" /> | ||
| 19 | + <result property="remark" column="remark" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + <sql id="selectSignInVo"> | ||
| 23 | + select id, create_time, jobCode, ip, update_time, image, status, update_by, singn_in, alcohol_flag, type, remark from sign_in | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <select id="selectSignInList" parameterType="SignIn" resultMap="SignInResult"> | ||
| 27 | + <include refid="selectSignInVo"/> | ||
| 28 | + <where> | ||
| 29 | + <if test="jobCode != null and jobCode != ''"> and jobCode = #{jobCode}</if> | ||
| 30 | + <if test="ip != null and ip != ''"> and ip = #{ip}</if> | ||
| 31 | + <if test="image != null and image != ''"> and image = #{image}</if> | ||
| 32 | + <if test="status != null "> and status = #{status}</if> | ||
| 33 | + <if test="singnIn != null and singnIn != ''"> and singn_in = #{singnIn}</if> | ||
| 34 | + <if test="alcoholFlag != null "> and alcohol_flag = #{alcoholFlag}</if> | ||
| 35 | + <if test="type != null "> and type = #{type}</if> | ||
| 36 | + </where> | ||
| 37 | + </select> | ||
| 38 | + | ||
| 39 | + <select id="selectSignInById" parameterType="Long" resultMap="SignInResult"> | ||
| 40 | + <include refid="selectSignInVo"/> | ||
| 41 | + where id = #{id} | ||
| 42 | + </select> | ||
| 43 | + | ||
| 44 | + <insert id="insertSignIn" parameterType="SignIn" useGeneratedKeys="true" keyProperty="id"> | ||
| 45 | + insert into sign_in | ||
| 46 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 47 | + <if test="createTime != null">create_time,</if> | ||
| 48 | + <if test="jobCode != null and jobCode != ''">jobCode,</if> | ||
| 49 | + <if test="ip != null">ip,</if> | ||
| 50 | + <if test="updateTime != null">update_time,</if> | ||
| 51 | + <if test="image != null">image,</if> | ||
| 52 | + <if test="status != null">status,</if> | ||
| 53 | + <if test="updateBy != null">update_by,</if> | ||
| 54 | + <if test="singnIn != null">singn_in,</if> | ||
| 55 | + <if test="alcoholFlag != null">alcohol_flag,</if> | ||
| 56 | + <if test="type != null">type,</if> | ||
| 57 | + <if test="remark != null">remark,</if> | ||
| 58 | + </trim> | ||
| 59 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 60 | + <if test="createTime != null">#{createTime},</if> | ||
| 61 | + <if test="jobCode != null and jobCode != ''">#{jobCode},</if> | ||
| 62 | + <if test="ip != null">#{ip},</if> | ||
| 63 | + <if test="updateTime != null">#{updateTime},</if> | ||
| 64 | + <if test="image != null">#{image},</if> | ||
| 65 | + <if test="status != null">#{status},</if> | ||
| 66 | + <if test="updateBy != null">#{updateBy},</if> | ||
| 67 | + <if test="singnIn != null">#{singnIn},</if> | ||
| 68 | + <if test="alcoholFlag != null">#{alcoholFlag},</if> | ||
| 69 | + <if test="type != null">#{type},</if> | ||
| 70 | + <if test="remark != null">#{remark},</if> | ||
| 71 | + </trim> | ||
| 72 | + </insert> | ||
| 73 | + | ||
| 74 | + <update id="updateSignIn" parameterType="SignIn"> | ||
| 75 | + update sign_in | ||
| 76 | + <trim prefix="SET" suffixOverrides=","> | ||
| 77 | + <if test="createTime != null">create_time = #{createTime},</if> | ||
| 78 | + <if test="jobCode != null and jobCode != ''">jobCode = #{jobCode},</if> | ||
| 79 | + <if test="ip != null">ip = #{ip},</if> | ||
| 80 | + <if test="updateTime != null">update_time = #{updateTime},</if> | ||
| 81 | + <if test="image != null">image = #{image},</if> | ||
| 82 | + <if test="status != null">status = #{status},</if> | ||
| 83 | + <if test="updateBy != null">update_by = #{updateBy},</if> | ||
| 84 | + <if test="singnIn != null">singn_in = #{singnIn},</if> | ||
| 85 | + <if test="alcoholFlag != null">alcohol_flag = #{alcoholFlag},</if> | ||
| 86 | + <if test="type != null">type = #{type},</if> | ||
| 87 | + <if test="remark != null">remark = #{remark},</if> | ||
| 88 | + </trim> | ||
| 89 | + where id = #{id} | ||
| 90 | + </update> | ||
| 91 | + | ||
| 92 | + <delete id="deleteSignInById" parameterType="Long"> | ||
| 93 | + delete from sign_in where id = #{id} | ||
| 94 | + </delete> | ||
| 95 | + | ||
| 96 | + <delete id="deleteSignInByIds" parameterType="String"> | ||
| 97 | + delete from sign_in where id in | ||
| 98 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 99 | + #{id} | ||
| 100 | + </foreach> | ||
| 101 | + </delete> | ||
| 102 | +</mapper> | ||
| 0 | \ No newline at end of file | 103 | \ No newline at end of file |
ruoyi-admin/src/main/java/com/ruoyi/in/mapper/SignInMapper.java
0 → 100644
| 1 | +package com.ruoyi.in.mapper; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.in.domain.SignIn; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 签到Mapper接口 | ||
| 8 | + * | ||
| 9 | + * @author guzijian | ||
| 10 | + * @date 2023-07-04 | ||
| 11 | + */ | ||
| 12 | +public interface SignInMapper | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询签到 | ||
| 16 | + * | ||
| 17 | + * @param id 签到主键 | ||
| 18 | + * @return 签到 | ||
| 19 | + */ | ||
| 20 | + public SignIn selectSignInById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询签到列表 | ||
| 24 | + * | ||
| 25 | + * @param signIn 签到 | ||
| 26 | + * @return 签到集合 | ||
| 27 | + */ | ||
| 28 | + public List<SignIn> selectSignInList(SignIn signIn); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增签到 | ||
| 32 | + * | ||
| 33 | + * @param signIn 签到 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + public int insertSignIn(SignIn signIn); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改签到 | ||
| 40 | + * | ||
| 41 | + * @param signIn 签到 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + public int updateSignIn(SignIn signIn); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 删除签到 | ||
| 48 | + * | ||
| 49 | + * @param id 签到主键 | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + public int deleteSignInById(Long id); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 批量删除签到 | ||
| 56 | + * | ||
| 57 | + * @param ids 需要删除的数据主键集合 | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + public int deleteSignInByIds(Long[] ids); | ||
| 61 | +} |
ruoyi-admin/src/main/java/com/ruoyi/in/service/ISignInService.java
0 → 100644
| 1 | +package com.ruoyi.in.service; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.in.domain.SignIn; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 签到Service接口 | ||
| 8 | + * | ||
| 9 | + * @author guzijian | ||
| 10 | + * @date 2023-07-04 | ||
| 11 | + */ | ||
| 12 | +public interface ISignInService | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询签到 | ||
| 16 | + * | ||
| 17 | + * @param id 签到主键 | ||
| 18 | + * @return 签到 | ||
| 19 | + */ | ||
| 20 | + public SignIn selectSignInById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询签到列表 | ||
| 24 | + * | ||
| 25 | + * @param signIn 签到 | ||
| 26 | + * @return 签到集合 | ||
| 27 | + */ | ||
| 28 | + public List<SignIn> selectSignInList(SignIn signIn); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增签到 | ||
| 32 | + * | ||
| 33 | + * @param signIn 签到 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + public int insertSignIn(SignIn signIn); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改签到 | ||
| 40 | + * | ||
| 41 | + * @param signIn 签到 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + public int updateSignIn(SignIn signIn); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 批量删除签到 | ||
| 48 | + * | ||
| 49 | + * @param ids 需要删除的签到主键集合 | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + public int deleteSignInByIds(Long[] ids); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 删除签到信息 | ||
| 56 | + * | ||
| 57 | + * @param id 签到主键 | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + public int deleteSignInById(Long id); | ||
| 61 | +} |
ruoyi-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.in.service.impl; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.ruoyi.common.utils.DateUtils; | ||
| 5 | +import com.ruoyi.common.utils.SecurityUtils; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import com.ruoyi.in.mapper.SignInMapper; | ||
| 9 | +import com.ruoyi.in.domain.SignIn; | ||
| 10 | +import com.ruoyi.in.service.ISignInService; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 签到Service业务层处理 | ||
| 14 | + * | ||
| 15 | + * @author guzijian | ||
| 16 | + * @date 2023-07-04 | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +public class SignInServiceImpl implements ISignInService | ||
| 20 | +{ | ||
| 21 | + @Autowired | ||
| 22 | + private SignInMapper signInMapper; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 查询签到 | ||
| 26 | + * | ||
| 27 | + * @param id 签到主键 | ||
| 28 | + * @return 签到 | ||
| 29 | + */ | ||
| 30 | + @Override | ||
| 31 | + public SignIn selectSignInById(Long id) | ||
| 32 | + { | ||
| 33 | + return signInMapper.selectSignInById(id); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 查询签到列表 | ||
| 38 | + * | ||
| 39 | + * @param signIn 签到 | ||
| 40 | + * @return 签到 | ||
| 41 | + */ | ||
| 42 | + @Override | ||
| 43 | + public List<SignIn> selectSignInList(SignIn signIn) | ||
| 44 | + { | ||
| 45 | + return signInMapper.selectSignInList(signIn); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 新增签到 | ||
| 50 | + * | ||
| 51 | + * @param signIn 签到 | ||
| 52 | + * @return 结果 | ||
| 53 | + */ | ||
| 54 | + @Override | ||
| 55 | + public int insertSignIn(SignIn signIn) | ||
| 56 | + { | ||
| 57 | + signIn.setCreateTime(DateUtils.getNowDate()); | ||
| 58 | + return signInMapper.insertSignIn(signIn); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 修改签到 | ||
| 63 | + * | ||
| 64 | + * @param signIn 签到 | ||
| 65 | + * @return 结果 | ||
| 66 | + */ | ||
| 67 | + @Override | ||
| 68 | + public int updateSignIn(SignIn signIn) | ||
| 69 | + { | ||
| 70 | + signIn.setUpdateTime(DateUtils.getNowDate()); | ||
| 71 | + signIn.setUpdateBy(SecurityUtils.getUsername()); | ||
| 72 | + return signInMapper.updateSignIn(signIn); | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 批量删除签到 | ||
| 77 | + * | ||
| 78 | + * @param ids 需要删除的签到主键 | ||
| 79 | + * @return 结果 | ||
| 80 | + */ | ||
| 81 | + @Override | ||
| 82 | + public int deleteSignInByIds(Long[] ids) | ||
| 83 | + { | ||
| 84 | + return signInMapper.deleteSignInByIds(ids); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 删除签到信息 | ||
| 89 | + * | ||
| 90 | + * @param id 签到主键 | ||
| 91 | + * @return 结果 | ||
| 92 | + */ | ||
| 93 | + @Override | ||
| 94 | + public int deleteSignInById(Long id) | ||
| 95 | + { | ||
| 96 | + return signInMapper.deleteSignInById(id); | ||
| 97 | + } | ||
| 98 | +} |
ruoyi-admin/src/main/resources/application.yml
ruoyi-admin/src/main/resources/mapper/driver/DriverMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8" ?> | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <!DOCTYPE mapper | 2 | <!DOCTYPE mapper |
| 3 | - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | - "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | <mapper namespace="com.ruoyi.driver.mapper.DriverMapper"> | 5 | <mapper namespace="com.ruoyi.driver.mapper.DriverMapper"> |
| 6 | - | 6 | + |
| 7 | <resultMap type="Driver" id="DriverResult"> | 7 | <resultMap type="Driver" id="DriverResult"> |
| 8 | - <result property="id" column="id"/> | ||
| 9 | - <result property="jobCode" column="jobCode"/> | ||
| 10 | - <result property="companyCode" column="companyCode"/> | ||
| 11 | - <result property="brancheCompanyCode" column="brancheCompanyCode"/> | ||
| 12 | - <result property="personnelName" column="personnelName"/> | ||
| 13 | - <result property="papersCode" column="papersCode"/> | ||
| 14 | - <result property="icCardCode" column="icCardCode"/> | ||
| 15 | - <result property="personnelType" column="personnelType"/> | ||
| 16 | - <result property="posts" column="posts"/> | ||
| 17 | - <result property="card" column="card"/> | ||
| 18 | - <result property="telphone" column="telphone"/> | ||
| 19 | - <result property="icRfid" column="icRfid"/> | ||
| 20 | - <result property="idRfid" column="idRfid"/> | ||
| 21 | - <result property="tagRfid" column="tagRfid"/> | ||
| 22 | - <result property="remark" column="remark"/> | ||
| 23 | - <result property="lineName" column="lineName"/> | ||
| 24 | - <result property="lineCode" column="lineCode"/> | 8 | + <result property="id" column="id" /> |
| 9 | + <result property="jobCode" column="job_code" /> | ||
| 10 | + <result property="companyCode" column="company_code" /> | ||
| 11 | + <result property="brancheCompanyCode" column="branche_company_code" /> | ||
| 12 | + <result property="personnelName" column="personnel_name" /> | ||
| 13 | + <result property="papersCode" column="papers_code" /> | ||
| 14 | + <result property="icCardCode" column="ic_card_code" /> | ||
| 15 | + <result property="personnelType" column="personnel_type" /> | ||
| 16 | + <result property="posts" column="posts" /> | ||
| 17 | + <result property="card" column="card" /> | ||
| 18 | + <result property="telphone" column="telphone" /> | ||
| 19 | + <result property="icRfid" column="ic_rfid" /> | ||
| 20 | + <result property="idRfid" column="id_rfid" /> | ||
| 21 | + <result property="tagRfid" column="tag_rfid" /> | ||
| 22 | + <result property="remark" column="remark" /> | ||
| 23 | + <result property="lineName" column="line_name" /> | ||
| 24 | + <result property="lineCode" column="line_code" /> | ||
| 25 | </resultMap> | 25 | </resultMap> |
| 26 | 26 | ||
| 27 | <sql id="selectDriverVo"> | 27 | <sql id="selectDriverVo"> |
| 28 | - select id, | ||
| 29 | - jobCode, | ||
| 30 | - companyCode, | ||
| 31 | - brancheCompanyCode, | ||
| 32 | - personnelName, | ||
| 33 | - papersCode, | ||
| 34 | - icCardCode, | ||
| 35 | - personnelType, | ||
| 36 | - posts, | ||
| 37 | - card, | ||
| 38 | - telphone, | ||
| 39 | - icRfid, | ||
| 40 | - idRfid, | ||
| 41 | - tagRfid, | ||
| 42 | - remark, | ||
| 43 | - lineName, | ||
| 44 | - lineCode | ||
| 45 | - from driver | 28 | + select id, job_code, company_code, branche_company_code, personnel_name, papers_code, ic_card_code, personnel_type, posts, card, telphone, ic_rfid, id_rfid, tag_rfid, remark, line_name, line_code from driver |
| 29 | + </sql> | ||
| 30 | + <sql id="insertDriverVo"> | ||
| 31 | + job_code, company_code, branche_company_code, personnel_name, papers_code, ic_card_code, personnel_type, posts, card, telphone, ic_rfid, id_rfid, tag_rfid, remark, line_name, line_code | ||
| 46 | </sql> | 32 | </sql> |
| 47 | 33 | ||
| 48 | <select id="selectDriverList" parameterType="Driver" resultMap="DriverResult"> | 34 | <select id="selectDriverList" parameterType="Driver" resultMap="DriverResult"> |
| 49 | <include refid="selectDriverVo"/> | 35 | <include refid="selectDriverVo"/> |
| 50 | - <where> | ||
| 51 | - <if test="jobCode != null and jobCode != ''">and jobCode = #{jobCode}</if> | ||
| 52 | - <if test="companyCode != null and companyCode != ''">and companyCode = #{companyCode}</if> | ||
| 53 | - <if test="brancheCompanyCode != null and brancheCompanyCode != ''">and brancheCompanyCode = | ||
| 54 | - #{brancheCompanyCode} | ||
| 55 | - </if> | ||
| 56 | - <if test="personnelName != null and personnelName != ''">and personnelName like concat('%', | ||
| 57 | - #{personnelName}, '%') | ||
| 58 | - </if> | ||
| 59 | - <if test="papersCode != null and papersCode != ''">and papersCode = #{papersCode}</if> | ||
| 60 | - <if test="icCardCode != null and icCardCode != ''">and icCardCode = #{icCardCode}</if> | ||
| 61 | - <if test="personnelType != null and personnelType != ''">and personnelType = #{personnelType}</if> | ||
| 62 | - <if test="posts != null and posts != ''">and posts = #{posts}</if> | ||
| 63 | - <if test="card != null and card != ''">and card = #{card}</if> | ||
| 64 | - <if test="telphone != null and telphone != ''">and telphone = #{telphone}</if> | ||
| 65 | - <if test="icRfid != null and icRfid != ''">and icRfid = #{icRfid}</if> | ||
| 66 | - <if test="idRfid != null and idRfid != ''">and idRfid = #{idRfid}</if> | ||
| 67 | - <if test="tagRfid != null and tagRfid != ''">and tagRfid = #{tagRfid}</if> | ||
| 68 | - <if test="lineName != null and lineName != ''">and lineName like concat('%', #{lineName}, '%')</if> | ||
| 69 | - <if test="lineCode != null and lineCode != ''">and lineCode = #{lineCode}</if> | 36 | + <where> |
| 37 | + <if test="jobCode != null and jobCode != ''"> and job_code = #{jobCode}</if> | ||
| 38 | + <if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if> | ||
| 39 | + <if test="brancheCompanyCode != null and brancheCompanyCode != ''"> and branche_company_code = #{brancheCompanyCode}</if> | ||
| 40 | + <if test="personnelName != null and personnelName != ''"> and personnel_name like concat('%', #{personnelName}, '%')</if> | ||
| 41 | + <if test="papersCode != null and papersCode != ''"> and papers_code = #{papersCode}</if> | ||
| 42 | + <if test="icCardCode != null and icCardCode != ''"> and ic_card_code = #{icCardCode}</if> | ||
| 43 | + <if test="personnelType != null and personnelType != ''"> and personnel_type = #{personnelType}</if> | ||
| 44 | + <if test="posts != null and posts != ''"> and posts = #{posts}</if> | ||
| 45 | + <if test="card != null and card != ''"> and card = #{card}</if> | ||
| 46 | + <if test="telphone != null and telphone != ''"> and telphone = #{telphone}</if> | ||
| 47 | + <if test="icRfid != null and icRfid != ''"> and ic_rfid = #{icRfid}</if> | ||
| 48 | + <if test="idRfid != null and idRfid != ''"> and id_rfid = #{idRfid}</if> | ||
| 49 | + <if test="tagRfid != null and tagRfid != ''"> and tag_rfid = #{tagRfid}</if> | ||
| 50 | + <if test="lineName != null and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if> | ||
| 51 | + <if test="lineCode != null and lineCode != ''"> and line_code = #{lineCode}</if> | ||
| 70 | </where> | 52 | </where> |
| 71 | </select> | 53 | </select> |
| 72 | - | 54 | + |
| 73 | <select id="selectDriverById" parameterType="Long" resultMap="DriverResult"> | 55 | <select id="selectDriverById" parameterType="Long" resultMap="DriverResult"> |
| 74 | <include refid="selectDriverVo"/> | 56 | <include refid="selectDriverVo"/> |
| 75 | where id = #{id} | 57 | where id = #{id} |
| 76 | </select> | 58 | </select> |
| 77 | - | 59 | + |
| 78 | <insert id="insertDriver" parameterType="Driver" useGeneratedKeys="true" keyProperty="id"> | 60 | <insert id="insertDriver" parameterType="Driver" useGeneratedKeys="true" keyProperty="id"> |
| 79 | insert into driver | 61 | insert into driver |
| 80 | <trim prefix="(" suffix=")" suffixOverrides=","> | 62 | <trim prefix="(" suffix=")" suffixOverrides=","> |
| 81 | - <if test="jobCode != null and jobCode != ''">jobCode,</if> | ||
| 82 | - <if test="companyCode != null and companyCode != ''">companyCode,</if> | ||
| 83 | - <if test="brancheCompanyCode != null">brancheCompanyCode,</if> | ||
| 84 | - <if test="personnelName != null">personnelName,</if> | ||
| 85 | - <if test="papersCode != null">papersCode,</if> | ||
| 86 | - <if test="icCardCode != null">icCardCode,</if> | ||
| 87 | - <if test="personnelType != null">personnelType,</if> | 63 | + <if test="jobCode != null and jobCode != ''">job_code,</if> |
| 64 | + <if test="companyCode != null and companyCode != ''">company_code,</if> | ||
| 65 | + <if test="brancheCompanyCode != null">branche_company_code,</if> | ||
| 66 | + <if test="personnelName != null">personnel_name,</if> | ||
| 67 | + <if test="papersCode != null">papers_code,</if> | ||
| 68 | + <if test="icCardCode != null">ic_card_code,</if> | ||
| 69 | + <if test="personnelType != null">personnel_type,</if> | ||
| 88 | <if test="posts != null">posts,</if> | 70 | <if test="posts != null">posts,</if> |
| 89 | <if test="card != null">card,</if> | 71 | <if test="card != null">card,</if> |
| 90 | <if test="telphone != null">telphone,</if> | 72 | <if test="telphone != null">telphone,</if> |
| 91 | - <if test="icRfid != null">icRfid,</if> | ||
| 92 | - <if test="idRfid != null">idRfid,</if> | ||
| 93 | - <if test="tagRfid != null">tagRfid,</if> | 73 | + <if test="icRfid != null">ic_rfid,</if> |
| 74 | + <if test="idRfid != null">id_rfid,</if> | ||
| 75 | + <if test="tagRfid != null">tag_rfid,</if> | ||
| 94 | <if test="remark != null">remark,</if> | 76 | <if test="remark != null">remark,</if> |
| 95 | - <if test="lineName != null">lineName,</if> | ||
| 96 | - <if test="lineCode != null">lineCode,</if> | ||
| 97 | - </trim> | 77 | + <if test="lineName != null">line_name,</if> |
| 78 | + <if test="lineCode != null">line_code,</if> | ||
| 79 | + </trim> | ||
| 98 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 80 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 99 | <if test="jobCode != null and jobCode != ''">#{jobCode},</if> | 81 | <if test="jobCode != null and jobCode != ''">#{jobCode},</if> |
| 100 | <if test="companyCode != null and companyCode != ''">#{companyCode},</if> | 82 | <if test="companyCode != null and companyCode != ''">#{companyCode},</if> |
| @@ -112,26 +94,48 @@ | @@ -112,26 +94,48 @@ | ||
| 112 | <if test="remark != null">#{remark},</if> | 94 | <if test="remark != null">#{remark},</if> |
| 113 | <if test="lineName != null">#{lineName},</if> | 95 | <if test="lineName != null">#{lineName},</if> |
| 114 | <if test="lineCode != null">#{lineCode},</if> | 96 | <if test="lineCode != null">#{lineCode},</if> |
| 115 | - </trim> | 97 | + </trim> |
| 116 | </insert> | 98 | </insert> |
| 99 | + | ||
| 100 | + <update id="updateDriver" parameterType="Driver"> | ||
| 101 | + update driver | ||
| 102 | + <trim prefix="SET" suffixOverrides=","> | ||
| 103 | + <if test="jobCode != null and jobCode != ''">job_code = #{jobCode},</if> | ||
| 104 | + <if test="companyCode != null and companyCode != ''">company_code = #{companyCode},</if> | ||
| 105 | + <if test="brancheCompanyCode != null">branche_company_code = #{brancheCompanyCode},</if> | ||
| 106 | + <if test="personnelName != null">personnel_name = #{personnelName},</if> | ||
| 107 | + <if test="papersCode != null">papers_code = #{papersCode},</if> | ||
| 108 | + <if test="icCardCode != null">ic_card_code = #{icCardCode},</if> | ||
| 109 | + <if test="personnelType != null">personnel_type = #{personnelType},</if> | ||
| 110 | + <if test="posts != null">posts = #{posts},</if> | ||
| 111 | + <if test="card != null">card = #{card},</if> | ||
| 112 | + <if test="telphone != null">telphone = #{telphone},</if> | ||
| 113 | + <if test="icRfid != null">ic_rfid = #{icRfid},</if> | ||
| 114 | + <if test="idRfid != null">id_rfid = #{idRfid},</if> | ||
| 115 | + <if test="tagRfid != null">tag_rfid = #{tagRfid},</if> | ||
| 116 | + <if test="remark != null">remark = #{remark},</if> | ||
| 117 | + <if test="lineName != null">line_name = #{lineName},</if> | ||
| 118 | + <if test="lineCode != null">line_code = #{lineCode},</if> | ||
| 119 | + </trim> | ||
| 120 | + where id = #{id} | ||
| 121 | + </update> | ||
| 122 | + | ||
| 123 | + <delete id="deleteDriverById" parameterType="Long"> | ||
| 124 | + delete from driver where id = #{id} | ||
| 125 | + </delete> | ||
| 126 | + | ||
| 127 | + <delete id="deleteDriverByIds" parameterType="String"> | ||
| 128 | + delete from driver where id in | ||
| 129 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 130 | + #{id} | ||
| 131 | + </foreach> | ||
| 132 | + </delete> | ||
| 133 | + | ||
| 134 | + | ||
| 117 | <insert id="saveDrivers"> | 135 | <insert id="saveDrivers"> |
| 136 | + | ||
| 118 | INSERT INTO driver ( | 137 | INSERT INTO driver ( |
| 119 | - jobCode, | ||
| 120 | - companyCode, | ||
| 121 | - brancheCompanyCode, | ||
| 122 | - personnelName, | ||
| 123 | - papersCode, | ||
| 124 | - icCardCode, | ||
| 125 | - personnelType, | ||
| 126 | - posts, | ||
| 127 | - card, | ||
| 128 | - telphone, | ||
| 129 | - icRfid, | ||
| 130 | - idRfid, | ||
| 131 | - tagRfid, | ||
| 132 | - remark, | ||
| 133 | - lineName, | ||
| 134 | - lineCode | 138 | + <include refid="insertDriverVo"></include> |
| 135 | ) | 139 | ) |
| 136 | VALUES | 140 | VALUES |
| 137 | <foreach collection="drivers" item="item" index="index" separator=","> | 141 | <foreach collection="drivers" item="item" index="index" separator=","> |
| @@ -155,42 +159,7 @@ | @@ -155,42 +159,7 @@ | ||
| 155 | ) | 159 | ) |
| 156 | </foreach> | 160 | </foreach> |
| 157 | on duplicate key update | 161 | on duplicate key update |
| 158 | - personnelName = values(personnelName) | 162 | + personnel_name = values(personnel_name) |
| 159 | </insert> | 163 | </insert> |
| 160 | 164 | ||
| 161 | - <update id="updateDriver" parameterType="Driver"> | ||
| 162 | - update driver | ||
| 163 | - <trim prefix="SET" suffixOverrides=","> | ||
| 164 | - <if test="jobCode != null and jobCode != ''">jobCode = #{jobCode},</if> | ||
| 165 | - <if test="companyCode != null and companyCode != ''">companyCode = #{companyCode},</if> | ||
| 166 | - <if test="brancheCompanyCode != null">brancheCompanyCode = #{brancheCompanyCode},</if> | ||
| 167 | - <if test="personnelName != null">personnelName = #{personnelName},</if> | ||
| 168 | - <if test="papersCode != null">papersCode = #{papersCode},</if> | ||
| 169 | - <if test="icCardCode != null">icCardCode = #{icCardCode},</if> | ||
| 170 | - <if test="personnelType != null">personnelType = #{personnelType},</if> | ||
| 171 | - <if test="posts != null">posts = #{posts},</if> | ||
| 172 | - <if test="card != null">card = #{card},</if> | ||
| 173 | - <if test="telphone != null">telphone = #{telphone},</if> | ||
| 174 | - <if test="icRfid != null">icRfid = #{icRfid},</if> | ||
| 175 | - <if test="idRfid != null">idRfid = #{idRfid},</if> | ||
| 176 | - <if test="tagRfid != null">tagRfid = #{tagRfid},</if> | ||
| 177 | - <if test="remark != null">remark = #{remark},</if> | ||
| 178 | - <if test="lineName != null">lineName = #{lineName},</if> | ||
| 179 | - <if test="lineCode != null">lineCode = #{lineCode},</if> | ||
| 180 | - </trim> | ||
| 181 | - where id = #{id} | ||
| 182 | - </update> | ||
| 183 | - | ||
| 184 | - <delete id="deleteDriverById" parameterType="Long"> | ||
| 185 | - delete | ||
| 186 | - from driver | ||
| 187 | - where id = #{id} | ||
| 188 | - </delete> | ||
| 189 | - | ||
| 190 | - <delete id="deleteDriverByIds" parameterType="String"> | ||
| 191 | - delete from driver where id in | ||
| 192 | - <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 193 | - #{id} | ||
| 194 | - </foreach> | ||
| 195 | - </delete> | ||
| 196 | </mapper> | 165 | </mapper> |
| 197 | \ No newline at end of file | 166 | \ No newline at end of file |
ruoyi-admin/src/main/resources/mapper/eexception/EquipmentExceptionMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.ruoyi.eexception.mapper.EquipmentExceptionMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="EquipmentException" id="EquipmentExceptionResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="title" column="title" /> | ||
| 10 | + <result property="equipmentIp" column="equipment_ip" /> | ||
| 11 | + <result property="createTime" column="create_time" /> | ||
| 12 | + <result property="jobCode" column="job_code" /> | ||
| 13 | + <result property="image" column="image" /> | ||
| 14 | + <result property="status" column="status" /> | ||
| 15 | + <result property="remark" column="remark" /> | ||
| 16 | + </resultMap> | ||
| 17 | + | ||
| 18 | + <sql id="selectEquipmentExceptionVo"> | ||
| 19 | + select id, title, equipment_ip, create_time, job_code, image, status, remark from equipment_exception | ||
| 20 | + </sql> | ||
| 21 | + | ||
| 22 | + <select id="selectEquipmentExceptionList" parameterType="EquipmentException" resultMap="EquipmentExceptionResult"> | ||
| 23 | + <include refid="selectEquipmentExceptionVo"/> | ||
| 24 | + <where> | ||
| 25 | + <if test="title != null and title != ''"> and title = #{title}</if> | ||
| 26 | + <if test="equipmentIp != null and equipmentIp != ''"> and equipment_ip = #{equipmentIp}</if> | ||
| 27 | + <if test="jobCode != null and jobCode != ''"> and job_code = #{jobCode}</if> | ||
| 28 | + <if test="image != null and image != ''"> and image = #{image}</if> | ||
| 29 | + <if test="status != null "> and status = #{status}</if> | ||
| 30 | + </where> | ||
| 31 | + </select> | ||
| 32 | + | ||
| 33 | + <select id="selectEquipmentExceptionById" parameterType="Long" resultMap="EquipmentExceptionResult"> | ||
| 34 | + <include refid="selectEquipmentExceptionVo"/> | ||
| 35 | + where id = #{id} | ||
| 36 | + </select> | ||
| 37 | + | ||
| 38 | + <insert id="insertEquipmentException" parameterType="EquipmentException" useGeneratedKeys="true" keyProperty="id"> | ||
| 39 | + insert into equipment_exception | ||
| 40 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 41 | + <if test="title != null">title,</if> | ||
| 42 | + <if test="equipmentIp != null and equipmentIp != ''">equipment_ip,</if> | ||
| 43 | + <if test="createTime != null">create_time,</if> | ||
| 44 | + <if test="jobCode != null and jobCode != ''">job_code,</if> | ||
| 45 | + <if test="image != null">image,</if> | ||
| 46 | + <if test="status != null">status,</if> | ||
| 47 | + <if test="remark != null and remark != ''">remark,</if> | ||
| 48 | + </trim> | ||
| 49 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 50 | + <if test="title != null">#{title},</if> | ||
| 51 | + <if test="equipmentIp != null and equipmentIp != ''">#{equipmentIp},</if> | ||
| 52 | + <if test="createTime != null">#{createTime},</if> | ||
| 53 | + <if test="jobCode != null and jobCode != ''">#{jobCode},</if> | ||
| 54 | + <if test="image != null">#{image},</if> | ||
| 55 | + <if test="status != null">#{status},</if> | ||
| 56 | + <if test="remark != null and remark != ''">#{remark},</if> | ||
| 57 | + </trim> | ||
| 58 | + </insert> | ||
| 59 | + | ||
| 60 | + <update id="updateEquipmentException" parameterType="EquipmentException"> | ||
| 61 | + update equipment_exception | ||
| 62 | + <trim prefix="SET" suffixOverrides=","> | ||
| 63 | + <if test="title != null">title = #{title},</if> | ||
| 64 | + <if test="equipmentIp != null and equipmentIp != ''">equipment_ip = #{equipmentIp},</if> | ||
| 65 | + <if test="createTime != null">create_time = #{createTime},</if> | ||
| 66 | + <if test="jobCode != null and jobCode != ''">job_code = #{jobCode},</if> | ||
| 67 | + <if test="image != null">image = #{image},</if> | ||
| 68 | + <if test="status != null">status = #{status},</if> | ||
| 69 | + <if test="remark != null and remark != ''">remark = #{remark},</if> | ||
| 70 | + </trim> | ||
| 71 | + where id = #{id} | ||
| 72 | + </update> | ||
| 73 | + | ||
| 74 | + <delete id="deleteEquipmentExceptionById" parameterType="Long"> | ||
| 75 | + delete from equipment_exception where id = #{id} | ||
| 76 | + </delete> | ||
| 77 | + | ||
| 78 | + <delete id="deleteEquipmentExceptionByIds" parameterType="String"> | ||
| 79 | + delete from equipment_exception where id in | ||
| 80 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 81 | + #{id} | ||
| 82 | + </foreach> | ||
| 83 | + </delete> | ||
| 84 | +</mapper> | ||
| 0 | \ No newline at end of file | 85 | \ No newline at end of file |
ruoyi-admin/src/main/resources/mapper/equipment/EquipmentMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.ruoyi.equipment.mapper.EquipmentMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="Equipment" id="EquipmentResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="siteName" column="site_name" /> | ||
| 10 | + <result property="address" column="address" /> | ||
| 11 | + <result property="ip" column="ip" /> | ||
| 12 | + <result property="status" column="status" /> | ||
| 13 | + <result property="promise" column="promise" /> | ||
| 14 | + <result property="image" column="image" /> | ||
| 15 | + <result property="createTime" column="create_time" /> | ||
| 16 | + <result property="updateTime" column="update_time" /> | ||
| 17 | + <result property="createBy" column="create_by" /> | ||
| 18 | + <result property="updateBy" column="update_by" /> | ||
| 19 | + <result property="remark" column="remark" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + <sql id="selectEquipmentVo"> | ||
| 23 | + select id, site_name, address, ip, status, promise, image, create_time, update_time, create_by, update_by, remark from equipment | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult"> | ||
| 27 | + <include refid="selectEquipmentVo"/> | ||
| 28 | + <where> | ||
| 29 | + <if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if> | ||
| 30 | + <if test="address != null and address != ''"> and address = #{address}</if> | ||
| 31 | + <if test="ip != null and ip != ''"> and ip = #{ip}</if> | ||
| 32 | + <if test="status != null "> and status = #{status}</if> | ||
| 33 | + <if test="promise != null and promise != ''"> and promise = #{promise}</if> | ||
| 34 | + <if test="image != null and image != ''"> and image = #{image}</if> | ||
| 35 | + </where> | ||
| 36 | + </select> | ||
| 37 | + | ||
| 38 | + <select id="selectEquipmentById" parameterType="Long" resultMap="EquipmentResult"> | ||
| 39 | + <include refid="selectEquipmentVo"/> | ||
| 40 | + where id = #{id} | ||
| 41 | + </select> | ||
| 42 | + | ||
| 43 | + <insert id="insertEquipment" parameterType="Equipment" useGeneratedKeys="true" keyProperty="id"> | ||
| 44 | + insert into equipment | ||
| 45 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 46 | + <if test="siteName != null and siteName != ''">site_name,</if> | ||
| 47 | + <if test="address != null and address != ''">address,</if> | ||
| 48 | + <if test="ip != null and ip != ''">ip,</if> | ||
| 49 | + <if test="status != null">status,</if> | ||
| 50 | + <if test="promise != null and promise != ''">promise,</if> | ||
| 51 | + <if test="image != null">image,</if> | ||
| 52 | + <if test="createTime != null">create_time,</if> | ||
| 53 | + <if test="updateTime != null">update_time,</if> | ||
| 54 | + <if test="createBy != null">create_by,</if> | ||
| 55 | + <if test="updateBy != null">update_by,</if> | ||
| 56 | + <if test="remark != null">remark,</if> | ||
| 57 | + </trim> | ||
| 58 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 59 | + <if test="siteName != null and siteName != ''">#{siteName},</if> | ||
| 60 | + <if test="address != null and address != ''">#{address},</if> | ||
| 61 | + <if test="ip != null and ip != ''">#{ip},</if> | ||
| 62 | + <if test="status != null">#{status},</if> | ||
| 63 | + <if test="promise != null and promise != ''">#{promise},</if> | ||
| 64 | + <if test="image != null">#{image},</if> | ||
| 65 | + <if test="createTime != null">#{createTime},</if> | ||
| 66 | + <if test="updateTime != null">#{updateTime},</if> | ||
| 67 | + <if test="createBy != null">#{createBy},</if> | ||
| 68 | + <if test="updateBy != null">#{updateBy},</if> | ||
| 69 | + <if test="remark != null">#{remark},</if> | ||
| 70 | + </trim> | ||
| 71 | + </insert> | ||
| 72 | + | ||
| 73 | + <update id="updateEquipment" parameterType="Equipment"> | ||
| 74 | + update equipment | ||
| 75 | + <trim prefix="SET" suffixOverrides=","> | ||
| 76 | + <if test="siteName != null and siteName != ''">site_name = #{siteName},</if> | ||
| 77 | + <if test="address != null and address != ''">address = #{address},</if> | ||
| 78 | + <if test="ip != null and ip != ''">ip = #{ip},</if> | ||
| 79 | + <if test="status != null">status = #{status},</if> | ||
| 80 | + <if test="promise != null and promise != ''">promise = #{promise},</if> | ||
| 81 | + <if test="image != null">image = #{image},</if> | ||
| 82 | + <if test="createTime != null">create_time = #{createTime},</if> | ||
| 83 | + <if test="updateTime != null">update_time = #{updateTime},</if> | ||
| 84 | + <if test="createBy != null">create_by = #{createBy},</if> | ||
| 85 | + <if test="updateBy != null">update_by = #{updateBy},</if> | ||
| 86 | + <if test="remark != null">remark = #{remark},</if> | ||
| 87 | + </trim> | ||
| 88 | + where id = #{id} | ||
| 89 | + </update> | ||
| 90 | + | ||
| 91 | + <delete id="deleteEquipmentById" parameterType="Long"> | ||
| 92 | + delete from equipment where id = #{id} | ||
| 93 | + </delete> | ||
| 94 | + | ||
| 95 | + <delete id="deleteEquipmentByIds" parameterType="String"> | ||
| 96 | + delete from equipment where id in | ||
| 97 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 98 | + #{id} | ||
| 99 | + </foreach> | ||
| 100 | + </delete> | ||
| 101 | +</mapper> | ||
| 0 | \ No newline at end of file | 102 | \ No newline at end of file |
ruoyi-admin/src/main/resources/mapper/in/SignInMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.ruoyi.in.mapper.SignInMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="SignIn" id="SignInResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="createTime" column="create_time" /> | ||
| 10 | + <result property="jobCode" column="jobCode" /> | ||
| 11 | + <result property="image" column="image" /> | ||
| 12 | + <result property="ip" column="ip" /> | ||
| 13 | + <result property="updateTime" column="update_time" /> | ||
| 14 | + <result property="status" column="status" /> | ||
| 15 | + <result property="updateBy" column="update_by" /> | ||
| 16 | + <result property="singnIn" column="singn_in" /> | ||
| 17 | + <result property="alcoholFlag" column="alcohol_flag" /> | ||
| 18 | + <result property="type" column="type" /> | ||
| 19 | + <result property="remark" column="remark" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + <sql id="selectSignInVo"> | ||
| 23 | + select id, create_time, jobCode, image, ip, update_time, status, update_by, singn_in, alcohol_flag, type, remark from sign_in | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <select id="selectSignInList" parameterType="SignIn" resultMap="SignInResult"> | ||
| 27 | + <include refid="selectSignInVo"/> | ||
| 28 | + <where> | ||
| 29 | + <if test="jobCode != null and jobCode != ''"> and jobCode = #{jobCode}</if> | ||
| 30 | + <if test="image != null and image != ''"> and image = #{image}</if> | ||
| 31 | + <if test="ip != null and ip != ''"> and ip = #{ip}</if> | ||
| 32 | + <if test="status != null "> and status = #{status}</if> | ||
| 33 | + <if test="singnIn != null and singnIn != ''"> and singn_in = #{singnIn}</if> | ||
| 34 | + <if test="alcoholFlag != null "> and alcohol_flag = #{alcoholFlag}</if> | ||
| 35 | + <if test="type != null "> and type = #{type}</if> | ||
| 36 | + </where> | ||
| 37 | + </select> | ||
| 38 | + | ||
| 39 | + <select id="selectSignInById" parameterType="Long" resultMap="SignInResult"> | ||
| 40 | + <include refid="selectSignInVo"/> | ||
| 41 | + where id = #{id} | ||
| 42 | + </select> | ||
| 43 | + | ||
| 44 | + <insert id="insertSignIn" parameterType="SignIn" useGeneratedKeys="true" keyProperty="id"> | ||
| 45 | + insert into sign_in | ||
| 46 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 47 | + <if test="createTime != null">create_time,</if> | ||
| 48 | + <if test="jobCode != null and jobCode != ''">jobCode,</if> | ||
| 49 | + <if test="image != null and image != ''">image,</if> | ||
| 50 | + <if test="ip != null and ip != ''">ip,</if> | ||
| 51 | + <if test="updateTime != null">update_time,</if> | ||
| 52 | + <if test="status != null">status,</if> | ||
| 53 | + <if test="updateBy != null">update_by,</if> | ||
| 54 | + <if test="singnIn != null">singn_in,</if> | ||
| 55 | + <if test="alcoholFlag != null">alcohol_flag,</if> | ||
| 56 | + <if test="type != null">type,</if> | ||
| 57 | + <if test="remark != null">remark,</if> | ||
| 58 | + </trim> | ||
| 59 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 60 | + <if test="createTime != null">#{createTime},</if> | ||
| 61 | + <if test="jobCode != null and jobCode != ''">#{jobCode},</if> | ||
| 62 | + <if test="image != null and image != ''">#{image},</if> | ||
| 63 | + <if test="ip != null and ip != ''">#{ip},</if> | ||
| 64 | + <if test="updateTime != null">#{updateTime},</if> | ||
| 65 | + <if test="status != null">#{status},</if> | ||
| 66 | + <if test="updateBy != null">#{updateBy},</if> | ||
| 67 | + <if test="singnIn != null">#{singnIn},</if> | ||
| 68 | + <if test="alcoholFlag != null">#{alcoholFlag},</if> | ||
| 69 | + <if test="type != null">#{type},</if> | ||
| 70 | + <if test="remark != null">#{remark},</if> | ||
| 71 | + </trim> | ||
| 72 | + </insert> | ||
| 73 | + | ||
| 74 | + <update id="updateSignIn" parameterType="SignIn"> | ||
| 75 | + update sign_in | ||
| 76 | + <trim prefix="SET" suffixOverrides=","> | ||
| 77 | + <if test="createTime != null">create_time = #{createTime},</if> | ||
| 78 | + <if test="jobCode != null and jobCode != ''">jobCode = #{jobCode},</if> | ||
| 79 | + <if test="image != null and image != ''">image = #{image},</if> | ||
| 80 | + <if test="ip != null and ip != ''">ip = #{ip},</if> | ||
| 81 | + <if test="updateTime != null">update_time = #{updateTime},</if> | ||
| 82 | + <if test="status != null">status = #{status},</if> | ||
| 83 | + <if test="updateBy != null">update_by = #{updateBy},</if> | ||
| 84 | + <if test="singnIn != null">singn_in = #{singnIn},</if> | ||
| 85 | + <if test="alcoholFlag != null">alcohol_flag = #{alcoholFlag},</if> | ||
| 86 | + <if test="type != null">type = #{type},</if> | ||
| 87 | + <if test="remark != null">remark = #{remark},</if> | ||
| 88 | + </trim> | ||
| 89 | + where id = #{id} | ||
| 90 | + </update> | ||
| 91 | + | ||
| 92 | + <delete id="deleteSignInById" parameterType="Long"> | ||
| 93 | + delete from sign_in where id = #{id} | ||
| 94 | + </delete> | ||
| 95 | + | ||
| 96 | + <delete id="deleteSignInByIds" parameterType="String"> | ||
| 97 | + delete from sign_in where id in | ||
| 98 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 99 | + #{id} | ||
| 100 | + </foreach> | ||
| 101 | + </delete> | ||
| 102 | +</mapper> | ||
| 0 | \ No newline at end of file | 103 | \ No newline at end of file |