Commit 246d1c1eed4e14f2704e4ebf2ab2eed72409e5b6
1 parent
4f6a1b6a
fix: 添加设备号字段
Showing
22 changed files
with
228 additions
and
99 deletions
ruoyi-admin/src/main/java/com/ruoyi/propertis/SignInEnum.java renamed to ruoyi-admin/src/main/java/com/ruoyi/common/SignInEnum.java
ruoyi-admin/src/main/java/com/ruoyi/eexception/controller/EquipmentExceptionController.java
| @@ -2,9 +2,6 @@ package com.ruoyi.eexception.controller; | @@ -2,9 +2,6 @@ package com.ruoyi.eexception.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 org.springframework.security.access.prepost.PreAuthorize; | 5 | import org.springframework.security.access.prepost.PreAuthorize; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | import org.springframework.web.bind.annotation.GetMapping; | 7 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -28,11 +25,10 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -28,11 +25,10 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 28 | * 设备异常记录Controller | 25 | * 设备异常记录Controller |
| 29 | * | 26 | * |
| 30 | * @author guzijian | 27 | * @author guzijian |
| 31 | - * @date 2023-07-04 | 28 | + * @date 2023-07-05 |
| 32 | */ | 29 | */ |
| 33 | @RestController | 30 | @RestController |
| 34 | @RequestMapping("/eexception/eexception") | 31 | @RequestMapping("/eexception/eexception") |
| 35 | -@Api(tags = "异常设备管理") | ||
| 36 | public class EquipmentExceptionController extends BaseController | 32 | public class EquipmentExceptionController extends BaseController |
| 37 | { | 33 | { |
| 38 | @Autowired | 34 | @Autowired |
| @@ -41,9 +37,8 @@ public class EquipmentExceptionController extends BaseController | @@ -41,9 +37,8 @@ public class EquipmentExceptionController extends BaseController | ||
| 41 | /** | 37 | /** |
| 42 | * 查询设备异常记录列表 | 38 | * 查询设备异常记录列表 |
| 43 | */ | 39 | */ |
| 44 | -// @PreAuthorize("@ss.hasPermi('eexception:eexception:list')") | 40 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:list')") |
| 45 | @GetMapping("/list") | 41 | @GetMapping("/list") |
| 46 | - @ApiOperation("查询设备异常记录列表") | ||
| 47 | public TableDataInfo list(EquipmentException equipmentException) | 42 | public TableDataInfo list(EquipmentException equipmentException) |
| 48 | { | 43 | { |
| 49 | startPage(); | 44 | startPage(); |
| @@ -54,10 +49,9 @@ public class EquipmentExceptionController extends BaseController | @@ -54,10 +49,9 @@ public class EquipmentExceptionController extends BaseController | ||
| 54 | /** | 49 | /** |
| 55 | * 导出设备异常记录列表 | 50 | * 导出设备异常记录列表 |
| 56 | */ | 51 | */ |
| 57 | -// @PreAuthorize("@ss.hasPermi('eexception:eexception:export')") | 52 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:export')") |
| 58 | @Log(title = "设备异常记录", businessType = BusinessType.EXPORT) | 53 | @Log(title = "设备异常记录", businessType = BusinessType.EXPORT) |
| 59 | @PostMapping("/export") | 54 | @PostMapping("/export") |
| 60 | - @ApiOperation("导出设备异常记录列表") | ||
| 61 | public void export(HttpServletResponse response, EquipmentException equipmentException) | 55 | public void export(HttpServletResponse response, EquipmentException equipmentException) |
| 62 | { | 56 | { |
| 63 | List<EquipmentException> list = equipmentExceptionService.selectEquipmentExceptionList(equipmentException); | 57 | List<EquipmentException> list = equipmentExceptionService.selectEquipmentExceptionList(equipmentException); |
| @@ -68,9 +62,8 @@ public class EquipmentExceptionController extends BaseController | @@ -68,9 +62,8 @@ public class EquipmentExceptionController extends BaseController | ||
| 68 | /** | 62 | /** |
| 69 | * 获取设备异常记录详细信息 | 63 | * 获取设备异常记录详细信息 |
| 70 | */ | 64 | */ |
| 71 | -// @PreAuthorize("@ss.hasPermi('eexception:eexception:query')") | 65 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:query')") |
| 72 | @GetMapping(value = "/{id}") | 66 | @GetMapping(value = "/{id}") |
| 73 | - @ApiOperation("获取设备异常记录详细信息") | ||
| 74 | public AjaxResult getInfo(@PathVariable("id") Long id) | 67 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 75 | { | 68 | { |
| 76 | return success(equipmentExceptionService.selectEquipmentExceptionById(id)); | 69 | return success(equipmentExceptionService.selectEquipmentExceptionById(id)); |
| @@ -79,10 +72,9 @@ public class EquipmentExceptionController extends BaseController | @@ -79,10 +72,9 @@ public class EquipmentExceptionController extends BaseController | ||
| 79 | /** | 72 | /** |
| 80 | * 新增设备异常记录 | 73 | * 新增设备异常记录 |
| 81 | */ | 74 | */ |
| 82 | -// @PreAuthorize("@ss.hasPermi('eexception:eexception:add')") | 75 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:add')") |
| 83 | @Log(title = "设备异常记录", businessType = BusinessType.INSERT) | 76 | @Log(title = "设备异常记录", businessType = BusinessType.INSERT) |
| 84 | @PostMapping | 77 | @PostMapping |
| 85 | - @ApiOperation("新增设备异常记录") | ||
| 86 | public AjaxResult add(@RequestBody EquipmentException equipmentException) | 78 | public AjaxResult add(@RequestBody EquipmentException equipmentException) |
| 87 | { | 79 | { |
| 88 | return toAjax(equipmentExceptionService.insertEquipmentException(equipmentException)); | 80 | return toAjax(equipmentExceptionService.insertEquipmentException(equipmentException)); |
| @@ -91,10 +83,9 @@ public class EquipmentExceptionController extends BaseController | @@ -91,10 +83,9 @@ public class EquipmentExceptionController extends BaseController | ||
| 91 | /** | 83 | /** |
| 92 | * 修改设备异常记录 | 84 | * 修改设备异常记录 |
| 93 | */ | 85 | */ |
| 94 | -// @PreAuthorize("@ss.hasPermi('eexception:eexception:edit')") | 86 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:edit')") |
| 95 | @Log(title = "设备异常记录", businessType = BusinessType.UPDATE) | 87 | @Log(title = "设备异常记录", businessType = BusinessType.UPDATE) |
| 96 | @PutMapping | 88 | @PutMapping |
| 97 | - @ApiOperation("修改设备异常记录") | ||
| 98 | public AjaxResult edit(@RequestBody EquipmentException equipmentException) | 89 | public AjaxResult edit(@RequestBody EquipmentException equipmentException) |
| 99 | { | 90 | { |
| 100 | return toAjax(equipmentExceptionService.updateEquipmentException(equipmentException)); | 91 | return toAjax(equipmentExceptionService.updateEquipmentException(equipmentException)); |
| @@ -103,10 +94,9 @@ public class EquipmentExceptionController extends BaseController | @@ -103,10 +94,9 @@ public class EquipmentExceptionController extends BaseController | ||
| 103 | /** | 94 | /** |
| 104 | * 删除设备异常记录 | 95 | * 删除设备异常记录 |
| 105 | */ | 96 | */ |
| 106 | -// @PreAuthorize("@ss.hasPermi('eexception:eexception:remove')") | 97 | + @PreAuthorize("@ss.hasPermi('eexception:eexception:remove')") |
| 107 | @Log(title = "设备异常记录", businessType = BusinessType.DELETE) | 98 | @Log(title = "设备异常记录", businessType = BusinessType.DELETE) |
| 108 | @DeleteMapping("/{ids}") | 99 | @DeleteMapping("/{ids}") |
| 109 | - @ApiOperation("删除设备异常记录") | ||
| 110 | public AjaxResult remove(@PathVariable Long[] ids) | 100 | public AjaxResult remove(@PathVariable Long[] ids) |
| 111 | { | 101 | { |
| 112 | return toAjax(equipmentExceptionService.deleteEquipmentExceptionByIds(ids)); | 102 | return toAjax(equipmentExceptionService.deleteEquipmentExceptionByIds(ids)); |
ruoyi-admin/src/main/java/com/ruoyi/eexception/domain/EquipmentException.java
| @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; | @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; | ||
| 9 | * 设备异常记录对象 equipment_exception | 9 | * 设备异常记录对象 equipment_exception |
| 10 | * | 10 | * |
| 11 | * @author guzijian | 11 | * @author guzijian |
| 12 | - * @date 2023-07-04 | 12 | + * @date 2023-07-05 |
| 13 | */ | 13 | */ |
| 14 | public class EquipmentException extends BaseEntity | 14 | public class EquipmentException extends BaseEntity |
| 15 | { | 15 | { |
| @@ -22,12 +22,12 @@ public class EquipmentException extends BaseEntity | @@ -22,12 +22,12 @@ public class EquipmentException extends BaseEntity | ||
| 22 | @Excel(name = "标题") | 22 | @Excel(name = "标题") |
| 23 | private String title; | 23 | private String title; |
| 24 | 24 | ||
| 25 | - /** 设备ip */ | ||
| 26 | - @Excel(name = "设备ip") | ||
| 27 | - private String equipmentIp; | 25 | + /** 设备id */ |
| 26 | + @Excel(name = "设备id") | ||
| 27 | + private Long deviceId; | ||
| 28 | 28 | ||
| 29 | - /** 人员工号 */ | ||
| 30 | - @Excel(name = "人员工号") | 29 | + /** 上报人 */ |
| 30 | + @Excel(name = "上报人") | ||
| 31 | private String jobCode; | 31 | private String jobCode; |
| 32 | 32 | ||
| 33 | /** 设备图片 */ | 33 | /** 设备图片 */ |
| @@ -56,14 +56,14 @@ public class EquipmentException extends BaseEntity | @@ -56,14 +56,14 @@ public class EquipmentException extends BaseEntity | ||
| 56 | { | 56 | { |
| 57 | return title; | 57 | return title; |
| 58 | } | 58 | } |
| 59 | - public void setEquipmentIp(String equipmentIp) | 59 | + public void setDeviceId(Long deviceId) |
| 60 | { | 60 | { |
| 61 | - this.equipmentIp = equipmentIp; | 61 | + this.deviceId = deviceId; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | - public String getEquipmentIp() | 64 | + public Long getDeviceId() |
| 65 | { | 65 | { |
| 66 | - return equipmentIp; | 66 | + return deviceId; |
| 67 | } | 67 | } |
| 68 | public void setJobCode(String jobCode) | 68 | public void setJobCode(String jobCode) |
| 69 | { | 69 | { |
| @@ -98,11 +98,11 @@ public class EquipmentException extends BaseEntity | @@ -98,11 +98,11 @@ public class EquipmentException extends BaseEntity | ||
| 98 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | 98 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| 99 | .append("id", getId()) | 99 | .append("id", getId()) |
| 100 | .append("title", getTitle()) | 100 | .append("title", getTitle()) |
| 101 | - .append("equipmentIp", getEquipmentIp()) | ||
| 102 | - .append("createTime", getCreateTime()) | 101 | + .append("deviceId", getDeviceId()) |
| 103 | .append("jobCode", getJobCode()) | 102 | .append("jobCode", getJobCode()) |
| 104 | .append("image", getImage()) | 103 | .append("image", getImage()) |
| 105 | .append("status", getStatus()) | 104 | .append("status", getStatus()) |
| 105 | + .append("createTime", getCreateTime()) | ||
| 106 | .append("remark", getRemark()) | 106 | .append("remark", getRemark()) |
| 107 | .toString(); | 107 | .toString(); |
| 108 | } | 108 | } |
ruoyi-admin/src/main/java/com/ruoyi/eexception/mapper/EquipmentExceptionMapper.java
| @@ -7,7 +7,7 @@ import com.ruoyi.eexception.domain.EquipmentException; | @@ -7,7 +7,7 @@ import com.ruoyi.eexception.domain.EquipmentException; | ||
| 7 | * 设备异常记录Mapper接口 | 7 | * 设备异常记录Mapper接口 |
| 8 | * | 8 | * |
| 9 | * @author guzijian | 9 | * @author guzijian |
| 10 | - * @date 2023-07-04 | 10 | + * @date 2023-07-05 |
| 11 | */ | 11 | */ |
| 12 | public interface EquipmentExceptionMapper | 12 | public interface EquipmentExceptionMapper |
| 13 | { | 13 | { |
ruoyi-admin/src/main/java/com/ruoyi/eexception/service/IEquipmentExceptionService.java
| @@ -7,7 +7,7 @@ import com.ruoyi.eexception.domain.EquipmentException; | @@ -7,7 +7,7 @@ import com.ruoyi.eexception.domain.EquipmentException; | ||
| 7 | * 设备异常记录Service接口 | 7 | * 设备异常记录Service接口 |
| 8 | * | 8 | * |
| 9 | * @author guzijian | 9 | * @author guzijian |
| 10 | - * @date 2023-07-04 | 10 | + * @date 2023-07-05 |
| 11 | */ | 11 | */ |
| 12 | public interface IEquipmentExceptionService | 12 | public interface IEquipmentExceptionService |
| 13 | { | 13 | { |
ruoyi-admin/src/main/java/com/ruoyi/eexception/service/impl/EquipmentExceptionServiceImpl.java
| @@ -13,7 +13,7 @@ import com.ruoyi.eexception.service.IEquipmentExceptionService; | @@ -13,7 +13,7 @@ import com.ruoyi.eexception.service.IEquipmentExceptionService; | ||
| 13 | * 设备异常记录Service业务层处理 | 13 | * 设备异常记录Service业务层处理 |
| 14 | * | 14 | * |
| 15 | * @author guzijian | 15 | * @author guzijian |
| 16 | - * @date 2023-07-04 | 16 | + * @date 2023-07-05 |
| 17 | */ | 17 | */ |
| 18 | @Service | 18 | @Service |
| 19 | public class EquipmentExceptionServiceImpl implements IEquipmentExceptionService | 19 | public class EquipmentExceptionServiceImpl implements IEquipmentExceptionService |
ruoyi-admin/src/main/java/com/ruoyi/equipment/controller/EquipmentController.java
| @@ -2,9 +2,6 @@ package com.ruoyi.equipment.controller; | @@ -2,9 +2,6 @@ package com.ruoyi.equipment.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 org.springframework.security.access.prepost.PreAuthorize; | 5 | import org.springframework.security.access.prepost.PreAuthorize; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | import org.springframework.web.bind.annotation.GetMapping; | 7 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -28,11 +25,10 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -28,11 +25,10 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 28 | * 设备信息Controller | 25 | * 设备信息Controller |
| 29 | * | 26 | * |
| 30 | * @author guzijian | 27 | * @author guzijian |
| 31 | - * @date 2023-07-04 | 28 | + * @date 2023-07-05 |
| 32 | */ | 29 | */ |
| 33 | @RestController | 30 | @RestController |
| 34 | @RequestMapping("/equipment/equipment") | 31 | @RequestMapping("/equipment/equipment") |
| 35 | -@Api(tags = "设备信息管理") | ||
| 36 | public class EquipmentController extends BaseController | 32 | public class EquipmentController extends BaseController |
| 37 | { | 33 | { |
| 38 | @Autowired | 34 | @Autowired |
| @@ -41,9 +37,8 @@ public class EquipmentController extends BaseController | @@ -41,9 +37,8 @@ public class EquipmentController extends BaseController | ||
| 41 | /** | 37 | /** |
| 42 | * 查询设备信息列表 | 38 | * 查询设备信息列表 |
| 43 | */ | 39 | */ |
| 44 | -// @PreAuthorize("@ss.hasPermi('equipment:equipment:list')") | 40 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:list')") |
| 45 | @GetMapping("/list") | 41 | @GetMapping("/list") |
| 46 | - @ApiOperation("查询设备信息列表") | ||
| 47 | public TableDataInfo list(Equipment equipment) | 42 | public TableDataInfo list(Equipment equipment) |
| 48 | { | 43 | { |
| 49 | startPage(); | 44 | startPage(); |
| @@ -54,10 +49,9 @@ public class EquipmentController extends BaseController | @@ -54,10 +49,9 @@ public class EquipmentController extends BaseController | ||
| 54 | /** | 49 | /** |
| 55 | * 导出设备信息列表 | 50 | * 导出设备信息列表 |
| 56 | */ | 51 | */ |
| 57 | -// @PreAuthorize("@ss.hasPermi('equipment:equipment:export')") | 52 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:export')") |
| 58 | @Log(title = "设备信息", businessType = BusinessType.EXPORT) | 53 | @Log(title = "设备信息", businessType = BusinessType.EXPORT) |
| 59 | @PostMapping("/export") | 54 | @PostMapping("/export") |
| 60 | - @ApiOperation("导出设备信息列表") | ||
| 61 | public void export(HttpServletResponse response, Equipment equipment) | 55 | public void export(HttpServletResponse response, Equipment equipment) |
| 62 | { | 56 | { |
| 63 | List<Equipment> list = equipmentService.selectEquipmentList(equipment); | 57 | List<Equipment> list = equipmentService.selectEquipmentList(equipment); |
| @@ -68,9 +62,8 @@ public class EquipmentController extends BaseController | @@ -68,9 +62,8 @@ public class EquipmentController extends BaseController | ||
| 68 | /** | 62 | /** |
| 69 | * 获取设备信息详细信息 | 63 | * 获取设备信息详细信息 |
| 70 | */ | 64 | */ |
| 71 | -// @PreAuthorize("@ss.hasPermi('equipment:equipment:query')") | 65 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:query')") |
| 72 | @GetMapping(value = "/{id}") | 66 | @GetMapping(value = "/{id}") |
| 73 | - @ApiOperation("获取设备信息详细信息") | ||
| 74 | public AjaxResult getInfo(@PathVariable("id") Long id) | 67 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 75 | { | 68 | { |
| 76 | return success(equipmentService.selectEquipmentById(id)); | 69 | return success(equipmentService.selectEquipmentById(id)); |
| @@ -79,10 +72,9 @@ public class EquipmentController extends BaseController | @@ -79,10 +72,9 @@ public class EquipmentController extends BaseController | ||
| 79 | /** | 72 | /** |
| 80 | * 新增设备信息 | 73 | * 新增设备信息 |
| 81 | */ | 74 | */ |
| 82 | -// @PreAuthorize("@ss.hasPermi('equipment:equipment:add')") | 75 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:add')") |
| 83 | @Log(title = "设备信息", businessType = BusinessType.INSERT) | 76 | @Log(title = "设备信息", businessType = BusinessType.INSERT) |
| 84 | @PostMapping | 77 | @PostMapping |
| 85 | - @ApiOperation("新增设备信息") | ||
| 86 | public AjaxResult add(@RequestBody Equipment equipment) | 78 | public AjaxResult add(@RequestBody Equipment equipment) |
| 87 | { | 79 | { |
| 88 | return toAjax(equipmentService.insertEquipment(equipment)); | 80 | return toAjax(equipmentService.insertEquipment(equipment)); |
| @@ -91,10 +83,9 @@ public class EquipmentController extends BaseController | @@ -91,10 +83,9 @@ public class EquipmentController extends BaseController | ||
| 91 | /** | 83 | /** |
| 92 | * 修改设备信息 | 84 | * 修改设备信息 |
| 93 | */ | 85 | */ |
| 94 | -// @PreAuthorize("@ss.hasPermi('equipment:equipment:edit')") | 86 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:edit')") |
| 95 | @Log(title = "设备信息", businessType = BusinessType.UPDATE) | 87 | @Log(title = "设备信息", businessType = BusinessType.UPDATE) |
| 96 | @PutMapping | 88 | @PutMapping |
| 97 | - @ApiOperation("修改设备信息") | ||
| 98 | public AjaxResult edit(@RequestBody Equipment equipment) | 89 | public AjaxResult edit(@RequestBody Equipment equipment) |
| 99 | { | 90 | { |
| 100 | return toAjax(equipmentService.updateEquipment(equipment)); | 91 | return toAjax(equipmentService.updateEquipment(equipment)); |
| @@ -103,10 +94,9 @@ public class EquipmentController extends BaseController | @@ -103,10 +94,9 @@ public class EquipmentController extends BaseController | ||
| 103 | /** | 94 | /** |
| 104 | * 删除设备信息 | 95 | * 删除设备信息 |
| 105 | */ | 96 | */ |
| 106 | -// @PreAuthorize("@ss.hasPermi('equipment:equipment:remove')") | 97 | + @PreAuthorize("@ss.hasPermi('equipment:equipment:remove')") |
| 107 | @Log(title = "设备信息", businessType = BusinessType.DELETE) | 98 | @Log(title = "设备信息", businessType = BusinessType.DELETE) |
| 108 | @DeleteMapping("/{ids}") | 99 | @DeleteMapping("/{ids}") |
| 109 | - @ApiOperation("删除设备信息") | ||
| 110 | public AjaxResult remove(@PathVariable Long[] ids) | 100 | public AjaxResult remove(@PathVariable Long[] ids) |
| 111 | { | 101 | { |
| 112 | return toAjax(equipmentService.deleteEquipmentByIds(ids)); | 102 | return toAjax(equipmentService.deleteEquipmentByIds(ids)); |
ruoyi-admin/src/main/java/com/ruoyi/equipment/domain/Equipment.java
| @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; | @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; | ||
| 9 | * 设备信息对象 equipment | 9 | * 设备信息对象 equipment |
| 10 | * | 10 | * |
| 11 | * @author guzijian | 11 | * @author guzijian |
| 12 | - * @date 2023-07-04 | 12 | + * @date 2023-07-05 |
| 13 | */ | 13 | */ |
| 14 | public class Equipment extends BaseEntity | 14 | public class Equipment extends BaseEntity |
| 15 | { | 15 | { |
| @@ -26,8 +26,8 @@ public class Equipment extends BaseEntity | @@ -26,8 +26,8 @@ public class Equipment extends BaseEntity | ||
| 26 | @Excel(name = "安置地址") | 26 | @Excel(name = "安置地址") |
| 27 | private String address; | 27 | private String address; |
| 28 | 28 | ||
| 29 | - /** ip地址 */ | ||
| 30 | - @Excel(name = "ip地址") | 29 | + /** 设备ip */ |
| 30 | + @Excel(name = "设备ip") | ||
| 31 | private String ip; | 31 | private String ip; |
| 32 | 32 | ||
| 33 | /** 设备状态 */ | 33 | /** 设备状态 */ |
| @@ -42,6 +42,10 @@ public class Equipment extends BaseEntity | @@ -42,6 +42,10 @@ public class Equipment extends BaseEntity | ||
| 42 | @Excel(name = "设备图片") | 42 | @Excel(name = "设备图片") |
| 43 | private String image; | 43 | private String image; |
| 44 | 44 | ||
| 45 | + /** 设备号 */ | ||
| 46 | + @Excel(name = "设备号") | ||
| 47 | + private String deviceId; | ||
| 48 | + | ||
| 45 | public void setId(Long id) | 49 | public void setId(Long id) |
| 46 | { | 50 | { |
| 47 | this.id = id; | 51 | this.id = id; |
| @@ -105,6 +109,15 @@ public class Equipment extends BaseEntity | @@ -105,6 +109,15 @@ public class Equipment extends BaseEntity | ||
| 105 | { | 109 | { |
| 106 | return image; | 110 | return image; |
| 107 | } | 111 | } |
| 112 | + public void setDeviceId(String deviceId) | ||
| 113 | + { | ||
| 114 | + this.deviceId = deviceId; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public String getDeviceId() | ||
| 118 | + { | ||
| 119 | + return deviceId; | ||
| 120 | + } | ||
| 108 | 121 | ||
| 109 | @Override | 122 | @Override |
| 110 | public String toString() { | 123 | public String toString() { |
| @@ -116,6 +129,7 @@ public class Equipment extends BaseEntity | @@ -116,6 +129,7 @@ public class Equipment extends BaseEntity | ||
| 116 | .append("status", getStatus()) | 129 | .append("status", getStatus()) |
| 117 | .append("promise", getPromise()) | 130 | .append("promise", getPromise()) |
| 118 | .append("image", getImage()) | 131 | .append("image", getImage()) |
| 132 | + .append("deviceId", getDeviceId()) | ||
| 119 | .append("createTime", getCreateTime()) | 133 | .append("createTime", getCreateTime()) |
| 120 | .append("updateTime", getUpdateTime()) | 134 | .append("updateTime", getUpdateTime()) |
| 121 | .append("createBy", getCreateBy()) | 135 | .append("createBy", getCreateBy()) |
ruoyi-admin/src/main/java/com/ruoyi/equipment/mapper/EquipmentMapper.java
| @@ -7,7 +7,7 @@ import com.ruoyi.equipment.domain.Equipment; | @@ -7,7 +7,7 @@ import com.ruoyi.equipment.domain.Equipment; | ||
| 7 | * 设备信息Mapper接口 | 7 | * 设备信息Mapper接口 |
| 8 | * | 8 | * |
| 9 | * @author guzijian | 9 | * @author guzijian |
| 10 | - * @date 2023-07-04 | 10 | + * @date 2023-07-05 |
| 11 | */ | 11 | */ |
| 12 | public interface EquipmentMapper | 12 | public interface EquipmentMapper |
| 13 | { | 13 | { |
ruoyi-admin/src/main/java/com/ruoyi/equipment/service/IEquipmentService.java
| @@ -7,7 +7,7 @@ import com.ruoyi.equipment.domain.Equipment; | @@ -7,7 +7,7 @@ import com.ruoyi.equipment.domain.Equipment; | ||
| 7 | * 设备信息Service接口 | 7 | * 设备信息Service接口 |
| 8 | * | 8 | * |
| 9 | * @author guzijian | 9 | * @author guzijian |
| 10 | - * @date 2023-07-04 | 10 | + * @date 2023-07-05 |
| 11 | */ | 11 | */ |
| 12 | public interface IEquipmentService | 12 | public interface IEquipmentService |
| 13 | { | 13 | { |
ruoyi-admin/src/main/java/com/ruoyi/equipment/service/impl/EquipmentServiceImpl.java
| @@ -13,7 +13,7 @@ import com.ruoyi.equipment.service.IEquipmentService; | @@ -13,7 +13,7 @@ import com.ruoyi.equipment.service.IEquipmentService; | ||
| 13 | * 设备信息Service业务层处理 | 13 | * 设备信息Service业务层处理 |
| 14 | * | 14 | * |
| 15 | * @author guzijian | 15 | * @author guzijian |
| 16 | - * @date 2023-07-04 | 16 | + * @date 2023-07-05 |
| 17 | */ | 17 | */ |
| 18 | @Service | 18 | @Service |
| 19 | public class EquipmentServiceImpl implements IEquipmentService | 19 | public class EquipmentServiceImpl implements IEquipmentService |
ruoyi-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
| @@ -2,8 +2,7 @@ package com.ruoyi.in.service.impl; | @@ -2,8 +2,7 @@ package com.ruoyi.in.service.impl; | ||
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import com.ruoyi.common.utils.DateUtils; | 4 | import com.ruoyi.common.utils.DateUtils; |
| 5 | -import com.ruoyi.common.utils.SecurityUtils; | ||
| 6 | -import com.ruoyi.propertis.SignInEnum; | 5 | +import com.ruoyi.common.SignInEnum; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
| 9 | import com.ruoyi.in.mapper.SignInMapper; | 8 | import com.ruoyi.in.mapper.SignInMapper; |
ruoyi-admin/src/main/java/com/ruoyi/job/DriverJob.java
| 1 | package com.ruoyi.job; | 1 | package com.ruoyi.job; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.common.utils.DateUtils; | ||
| 3 | import com.ruoyi.driver.domain.Driver; | 4 | import com.ruoyi.driver.domain.Driver; |
| 4 | import com.ruoyi.driver.service.IDriverService; | 5 | import com.ruoyi.driver.service.IDriverService; |
| 5 | import com.ruoyi.utils.ListUtils; | 6 | import com.ruoyi.utils.ListUtils; |
| @@ -35,6 +36,9 @@ public class DriverJob implements InitializingBean { | @@ -35,6 +36,9 @@ public class DriverJob implements InitializingBean { | ||
| 35 | @Value("${api.url.getDriverInfo}") | 36 | @Value("${api.url.getDriverInfo}") |
| 36 | private String getDriverInfoUrl; | 37 | private String getDriverInfoUrl; |
| 37 | 38 | ||
| 39 | + @Value("api.url.getSchedulingInfo") | ||
| 40 | + private String getSchedulingInfoUrl; | ||
| 41 | + | ||
| 38 | @Value("${api.config.password}") | 42 | @Value("${api.config.password}") |
| 39 | private String password; | 43 | private String password; |
| 40 | 44 | ||
| @@ -44,36 +48,29 @@ public class DriverJob implements InitializingBean { | @@ -44,36 +48,29 @@ public class DriverJob implements InitializingBean { | ||
| 44 | private static IDriverService DRIVER_SERVICE; | 48 | private static IDriverService DRIVER_SERVICE; |
| 45 | private static RestTemplate RESTTEMPLATE; | 49 | private static RestTemplate RESTTEMPLATE; |
| 46 | 50 | ||
| 47 | - private static String GET_DRIVER_INFO_URL; | ||
| 48 | 51 | ||
| 52 | + private static String GET_SCHEDULING_INFO_URL; | ||
| 53 | + private static String GET_DRIVER_INFO_URL; | ||
| 49 | private static String PASSWORD; | 54 | private static String PASSWORD; |
| 50 | - | ||
| 51 | private static String NONCE; | 55 | private static String NONCE; |
| 52 | 56 | ||
| 53 | /** | 57 | /** |
| 54 | * 通过该定时任务获取驾驶员信息 并保存到数据库 | 58 | * 通过该定时任务获取驾驶员信息 并保存到数据库 |
| 59 | + * 排班信息映射 20分钟更新一次 | ||
| 55 | */ | 60 | */ |
| 56 | public void getDriverInfo(String params) throws Exception { | 61 | public void getDriverInfo(String params) throws Exception { |
| 57 | try { | 62 | try { |
| 58 | - String format = String.format(GET_DRIVER_INFO_URL, params); | ||
| 59 | - Map<String, String> configMap = new HashMap<>(5); | 63 | + String getDriverInfoUrl = String.format(GET_DRIVER_INFO_URL, params); |
| 60 | long timestamp = System.currentTimeMillis(); | 64 | long timestamp = System.currentTimeMillis(); |
| 61 | - configMap.put("timestamp", String.valueOf(timestamp)); | ||
| 62 | - configMap.put("nonce", NONCE); | ||
| 63 | - configMap.put("password", PASSWORD); | ||
| 64 | - String sign = getSHA1(configMap); | ||
| 65 | - String url = format | ||
| 66 | - + "?timestamp=" + timestamp | ||
| 67 | - + "&nonce=" + NONCE | ||
| 68 | - + "&password=" + PASSWORD | ||
| 69 | - + "&sign=" + sign; | ||
| 70 | - //生成签名 | ||
| 71 | - List<Driver> drivers = RESTTEMPLATE.exchange( | ||
| 72 | - url, | ||
| 73 | - HttpMethod.GET, | ||
| 74 | - null, | ||
| 75 | - new ParameterizedTypeReference<List<Driver>>() { | ||
| 76 | - }).getBody(); | 65 | + |
| 66 | + // 获取驾驶员信息 | ||
| 67 | + List<Driver> drivers = getDrivers(getDriverInfoUrl,String.valueOf(timestamp)); | ||
| 68 | + | ||
| 69 | + // http://114.80.178.12:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | ||
| 70 | +// String getSchedulingInfoUrl = String.format(GET_SCHEDULING_INFO_URL, "99", DateUtils.getDate("yyyyMMdd"), String.valueOf(timestamp), NONCE, PASSWORD, getSHA1(getStringStringMap(String.valueOf(timestamp)))); | ||
| 71 | + // 获取排班信息并存入redis | ||
| 72 | +// saveSchedulingToRedis(getSchedulingInfoUrl,drivers); | ||
| 73 | + // 分片插入 | ||
| 77 | List<List<Driver>> splitList = ListUtils.splitList(drivers, 1000); | 74 | List<List<Driver>> splitList = ListUtils.splitList(drivers, 1000); |
| 78 | System.out.println("开始更新数据-----"); | 75 | System.out.println("开始更新数据-----"); |
| 79 | for (List<Driver> driverList : splitList) { | 76 | for (List<Driver> driverList : splitList) { |
| @@ -86,6 +83,43 @@ public class DriverJob implements InitializingBean { | @@ -86,6 +83,43 @@ public class DriverJob implements InitializingBean { | ||
| 86 | System.out.println("执行结束"); | 83 | System.out.println("执行结束"); |
| 87 | } | 84 | } |
| 88 | 85 | ||
| 86 | + private void saveSchedulingToRedis(String getSchedulingInfoUrl, List<Driver> drivers) { | ||
| 87 | +// ESTTEMPLATE.exchange( | ||
| 88 | +// url, | ||
| 89 | +// HttpMethod.GET, | ||
| 90 | +// null, | ||
| 91 | +// new ParameterizedTypeReference<List<Driver>>() { | ||
| 92 | +// }).getBody(); | ||
| 93 | +// Object forObject = restTemplate.getForObject(getSchedulingInfoUrl, Object.class); | ||
| 94 | + | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + private static List<Driver> getDrivers(String format,String timestamp) throws Exception { | ||
| 98 | + Map<String, String> configMap = getStringStringMap(timestamp); | ||
| 99 | + String sign = getSHA1(configMap); | ||
| 100 | + String url = format | ||
| 101 | + + "?timestamp=" + timestamp | ||
| 102 | + + "&nonce=" + NONCE | ||
| 103 | + + "&password=" + PASSWORD | ||
| 104 | + + "&sign=" + sign; | ||
| 105 | + //生成签名 | ||
| 106 | + List<Driver> drivers = RESTTEMPLATE.exchange( | ||
| 107 | + url, | ||
| 108 | + HttpMethod.GET, | ||
| 109 | + null, | ||
| 110 | + new ParameterizedTypeReference<List<Driver>>() { | ||
| 111 | + }).getBody(); | ||
| 112 | + return drivers; | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + private static Map<String, String> getStringStringMap(String timestamp) { | ||
| 116 | + Map<String, String> configMap = new HashMap<>(5); | ||
| 117 | + configMap.put("timestamp", String.valueOf(timestamp)); | ||
| 118 | + configMap.put("nonce", NONCE); | ||
| 119 | + configMap.put("password", PASSWORD); | ||
| 120 | + return configMap; | ||
| 121 | + } | ||
| 122 | + | ||
| 89 | 123 | ||
| 90 | /** | 124 | /** |
| 91 | * 获取签名 | 125 | * 获取签名 |
| @@ -126,23 +160,25 @@ public class DriverJob implements InitializingBean { | @@ -126,23 +160,25 @@ public class DriverJob implements InitializingBean { | ||
| 126 | 160 | ||
| 127 | } | 161 | } |
| 128 | 162 | ||
| 129 | -// public static void main(String[] args) throws Exception{ | ||
| 130 | -// RestTemplate restTemplate1 = new RestTemplate(); | 163 | + public static void main(String[] args) throws Exception{ |
| 164 | + RestTemplate restTemplate1 = new RestTemplate(); | ||
| 131 | // String url = "http://101.95.136.206:9089/webservice/rest/person/company/%s"; | 165 | // String url = "http://101.95.136.206:9089/webservice/rest/person/company/%s"; |
| 132 | -// String format = String.format(url,"99"); | ||
| 133 | -// Map<String, String> configMap = new HashMap<>(5); | ||
| 134 | -// long timestamp = System.currentTimeMillis(); | ||
| 135 | -// configMap.put("timestamp", String.valueOf(timestamp)); | ||
| 136 | -// configMap.put("nonce", "NONCE"); | ||
| 137 | -// configMap.put("password", "c4dd3d8cb9a82f6d6a625818618b28ca7bebb464"); | 166 | + String url = "http://114.80.178.12:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s"; |
| 167 | + | ||
| 168 | + long timestamp = System.currentTimeMillis(); | ||
| 169 | + Map<String, String> configMap = new HashMap<>(5); | ||
| 170 | + configMap.put("timestamp", String.valueOf(timestamp)); | ||
| 171 | + configMap.put("nonce", "NONCE"); | ||
| 172 | + configMap.put("password", "c4dd3d8cb9a82f6d6a625818618b28ca7bebb464"); | ||
| 173 | + String format = String.format(url,"99",DateUtils.getDate("yyyyMMdd"), timestamp,"NONCE","c4dd3d8cb9a82f6d6a625818618b28ca7bebb464",getSHA1(configMap)); | ||
| 138 | // String sign = getSHA1(configMap); | 174 | // String sign = getSHA1(configMap); |
| 139 | // String httpUrl = format | 175 | // String httpUrl = format |
| 140 | // + "?timestamp=" + timestamp | 176 | // + "?timestamp=" + timestamp |
| 141 | // + "&nonce=" + "NONCE" | 177 | // + "&nonce=" + "NONCE" |
| 142 | // + "&password=" + "c4dd3d8cb9a82f6d6a625818618b28ca7bebb464" | 178 | // + "&password=" + "c4dd3d8cb9a82f6d6a625818618b28ca7bebb464" |
| 143 | // + "&sign=" + sign; | 179 | // + "&sign=" + sign; |
| 144 | -// Object forObject = restTemplate1.getForObject(httpUrl, Object.class); | ||
| 145 | -// } | 180 | + Object forObject = restTemplate1.getForObject(format, Object.class); |
| 181 | + } | ||
| 146 | 182 | ||
| 147 | @Override | 183 | @Override |
| 148 | public void afterPropertiesSet() throws Exception { | 184 | public void afterPropertiesSet() throws Exception { |
| @@ -151,5 +187,6 @@ public class DriverJob implements InitializingBean { | @@ -151,5 +187,6 @@ public class DriverJob implements InitializingBean { | ||
| 151 | PASSWORD = password; | 187 | PASSWORD = password; |
| 152 | RESTTEMPLATE = restTemplate; | 188 | RESTTEMPLATE = restTemplate; |
| 153 | DRIVER_SERVICE = driverService; | 189 | DRIVER_SERVICE = driverService; |
| 190 | + GET_SCHEDULING_INFO_URL = getSchedulingInfoUrl; | ||
| 154 | } | 191 | } |
| 155 | } | 192 | } |
ruoyi-admin/src/main/java/com/ruoyi/pojo/response/CTasks.java
0 → 100644
| 1 | +package com.ruoyi.pojo.response; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * Auto-generated: 2023-07-05 21:23:27 | ||
| 8 | + * | ||
| 9 | + * @author json.cn (i@json.cn) | ||
| 10 | + * @website http://www.json.cn/java2pojo/ | ||
| 11 | + */ | ||
| 12 | +@Data | ||
| 13 | +public class CTasks { | ||
| 14 | + | ||
| 15 | + private int id; | ||
| 16 | + private String type1; | ||
| 17 | + private String type2; | ||
| 18 | + private String startStation; | ||
| 19 | + private String startStationName; | ||
| 20 | + private String endStation; | ||
| 21 | + private String endStationName; | ||
| 22 | + private String mileageType; | ||
| 23 | + private int mileage; | ||
| 24 | + private String startDate; | ||
| 25 | + private String endDate; | ||
| 26 | + private boolean destroy; | ||
| 27 | + private String destroyReason; | ||
| 28 | + private long createDate; | ||
| 29 | + private String remarks; | ||
| 30 | + | ||
| 31 | +} | ||
| 0 | \ No newline at end of file | 32 | \ No newline at end of file |
ruoyi-admin/src/main/java/com/ruoyi/pojo/response/ResponseScheduling.java
0 → 100644
| 1 | +package com.ruoyi.pojo.response; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | + | ||
| 5 | +import java.util.Date; | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Auto-generated: 2023-07-05 21:23:27 | ||
| 10 | + * | ||
| 11 | + * @author json.cn (i@json.cn) | ||
| 12 | + * @website http://www.json.cn/java2pojo/ | ||
| 13 | + */ | ||
| 14 | +@Data | ||
| 15 | +public class ResponseScheduling { | ||
| 16 | + | ||
| 17 | + private long id; | ||
| 18 | + private Date scheduleDate; | ||
| 19 | + private String lineName; | ||
| 20 | + private String lineCode; | ||
| 21 | + private String lpName; | ||
| 22 | + private String nbbm; | ||
| 23 | + private String jsy; | ||
| 24 | + private String spy; | ||
| 25 | + private String upDown; | ||
| 26 | + private String qdzCode; | ||
| 27 | + private String qdzName; | ||
| 28 | + private String zdzCode; | ||
| 29 | + private String zdzName; | ||
| 30 | + private long fcsjT; | ||
| 31 | + private long dfsjT; | ||
| 32 | + private long zdsjT; | ||
| 33 | + private long fcsjActualTime; | ||
| 34 | + private long zdsjActualTime; | ||
| 35 | + private double jhlc; | ||
| 36 | + private double jhlcOrig; | ||
| 37 | + private int bcsj; | ||
| 38 | + private String bcType; | ||
| 39 | + private int status; | ||
| 40 | + private String adjustExps; | ||
| 41 | + private boolean sflj; | ||
| 42 | + private String remarks; | ||
| 43 | + private List<CTasks> cTasks; | ||
| 44 | +} | ||
| 0 | \ No newline at end of file | 45 | \ No newline at end of file |
ruoyi-admin/src/main/resources/application-druid-dev.yml
| @@ -127,8 +127,11 @@ api: | @@ -127,8 +127,11 @@ api: | ||
| 127 | url: | 127 | url: |
| 128 | # all 为获取所有驾驶员信息 | 128 | # all 为获取所有驾驶员信息 |
| 129 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s | 129 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s |
| 130 | + # 获取公司编码下的员工信息 暂时没用 | ||
| 130 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s | 131 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s |
| 132 | + # 获取排班信息 | ||
| 133 | + getSchedulingInfo: http://114.80.178.12:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | ||
| 131 | config: | 134 | config: |
| 132 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 | 135 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 |
| 133 | # 随机字符串 | 136 | # 随机字符串 |
| 134 | - nonce: adfsad | 137 | - nonce: adfsad |
| 138 | + nonce: adfsad | ||
| 135 | \ No newline at end of file | 139 | \ No newline at end of file |
ruoyi-admin/src/main/resources/application-druid-prd.yml
| @@ -87,7 +87,10 @@ api: | @@ -87,7 +87,10 @@ api: | ||
| 87 | url: | 87 | url: |
| 88 | # all 为获取所有驾驶员信息 | 88 | # all 为获取所有驾驶员信息 |
| 89 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s | 89 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s |
| 90 | + # 获取公司编码下的员工信息 暂时没用 | ||
| 90 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s | 91 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s |
| 92 | + # 获取排班信息 | ||
| 93 | + getSchedulingInfo: http://114.80.178.12:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | ||
| 91 | config: | 94 | config: |
| 92 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 | 95 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 |
| 93 | # 随机字符串 | 96 | # 随机字符串 |
ruoyi-admin/src/main/resources/application-druid-uat.yml
| @@ -145,8 +145,11 @@ api: | @@ -145,8 +145,11 @@ api: | ||
| 145 | url: | 145 | url: |
| 146 | # all 为获取所有驾驶员信息 | 146 | # all 为获取所有驾驶员信息 |
| 147 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s | 147 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s |
| 148 | + # 获取公司编码下的员工信息 暂时没用 | ||
| 148 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s | 149 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s |
| 150 | + # 获取排班信息 | ||
| 151 | + getSchedulingInfo: http://114.80.178.12:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | ||
| 149 | config: | 152 | config: |
| 150 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 | 153 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 |
| 151 | # 随机字符串 | 154 | # 随机字符串 |
| 152 | - nonce: adfsad | 155 | - nonce: adfsad |
| 156 | + nonce: adfsad | ||
| 153 | \ No newline at end of file | 157 | \ No newline at end of file |
ruoyi-admin/src/main/resources/application.yml
| @@ -139,7 +139,10 @@ api: | @@ -139,7 +139,10 @@ api: | ||
| 139 | url: | 139 | url: |
| 140 | # all 为获取所有驾驶员信息 | 140 | # all 为获取所有驾驶员信息 |
| 141 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s | 141 | getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s |
| 142 | + # 获取公司编码下的员工信息 暂时没用 | ||
| 142 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s | 143 | getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s |
| 144 | + # 获取排班信息 | ||
| 145 | + getSchedulingInfo: http://114.80.178.12:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | ||
| 143 | config: | 146 | config: |
| 144 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 | 147 | password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 |
| 145 | # 随机字符串 | 148 | # 随机字符串 |
ruoyi-admin/src/main/resources/mapper/eexception/EquipmentExceptionMapper.xml
| @@ -7,23 +7,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -7,23 +7,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 7 | <resultMap type="EquipmentException" id="EquipmentExceptionResult"> | 7 | <resultMap type="EquipmentException" id="EquipmentExceptionResult"> |
| 8 | <result property="id" column="id" /> | 8 | <result property="id" column="id" /> |
| 9 | <result property="title" column="title" /> | 9 | <result property="title" column="title" /> |
| 10 | - <result property="equipmentIp" column="equipment_ip" /> | ||
| 11 | - <result property="createTime" column="create_time" /> | 10 | + <result property="deviceId" column="device_id" /> |
| 12 | <result property="jobCode" column="job_code" /> | 11 | <result property="jobCode" column="job_code" /> |
| 13 | <result property="image" column="image" /> | 12 | <result property="image" column="image" /> |
| 14 | <result property="status" column="status" /> | 13 | <result property="status" column="status" /> |
| 14 | + <result property="createTime" column="create_time" /> | ||
| 15 | <result property="remark" column="remark" /> | 15 | <result property="remark" column="remark" /> |
| 16 | </resultMap> | 16 | </resultMap> |
| 17 | 17 | ||
| 18 | <sql id="selectEquipmentExceptionVo"> | 18 | <sql id="selectEquipmentExceptionVo"> |
| 19 | - select id, title, equipment_ip, create_time, job_code, image, status, remark from equipment_exception | 19 | + select id, title, device_id, job_code, image, status, create_time, remark from equipment_exception |
| 20 | </sql> | 20 | </sql> |
| 21 | 21 | ||
| 22 | <select id="selectEquipmentExceptionList" parameterType="EquipmentException" resultMap="EquipmentExceptionResult"> | 22 | <select id="selectEquipmentExceptionList" parameterType="EquipmentException" resultMap="EquipmentExceptionResult"> |
| 23 | <include refid="selectEquipmentExceptionVo"/> | 23 | <include refid="selectEquipmentExceptionVo"/> |
| 24 | <where> | 24 | <where> |
| 25 | <if test="title != null and title != ''"> and title = #{title}</if> | 25 | <if test="title != null and title != ''"> and title = #{title}</if> |
| 26 | - <if test="equipmentIp != null and equipmentIp != ''"> and equipment_ip = #{equipmentIp}</if> | 26 | + <if test="deviceId != null "> and device_id = #{deviceId}</if> |
| 27 | <if test="jobCode != null and jobCode != ''"> and job_code = #{jobCode}</if> | 27 | <if test="jobCode != null and jobCode != ''"> and job_code = #{jobCode}</if> |
| 28 | <if test="image != null and image != ''"> and image = #{image}</if> | 28 | <if test="image != null and image != ''"> and image = #{image}</if> |
| 29 | <if test="status != null "> and status = #{status}</if> | 29 | <if test="status != null "> and status = #{status}</if> |
| @@ -39,20 +39,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -39,20 +39,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 39 | insert into equipment_exception | 39 | insert into equipment_exception |
| 40 | <trim prefix="(" suffix=")" suffixOverrides=","> | 40 | <trim prefix="(" suffix=")" suffixOverrides=","> |
| 41 | <if test="title != null">title,</if> | 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> | 42 | + <if test="deviceId != null">device_id,</if> |
| 44 | <if test="jobCode != null and jobCode != ''">job_code,</if> | 43 | <if test="jobCode != null and jobCode != ''">job_code,</if> |
| 45 | <if test="image != null">image,</if> | 44 | <if test="image != null">image,</if> |
| 46 | <if test="status != null">status,</if> | 45 | <if test="status != null">status,</if> |
| 46 | + <if test="createTime != null">create_time,</if> | ||
| 47 | <if test="remark != null and remark != ''">remark,</if> | 47 | <if test="remark != null and remark != ''">remark,</if> |
| 48 | </trim> | 48 | </trim> |
| 49 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 49 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 50 | <if test="title != null">#{title},</if> | 50 | <if test="title != null">#{title},</if> |
| 51 | - <if test="equipmentIp != null and equipmentIp != ''">#{equipmentIp},</if> | ||
| 52 | - <if test="createTime != null">#{createTime},</if> | 51 | + <if test="deviceId != null">#{deviceId},</if> |
| 53 | <if test="jobCode != null and jobCode != ''">#{jobCode},</if> | 52 | <if test="jobCode != null and jobCode != ''">#{jobCode},</if> |
| 54 | <if test="image != null">#{image},</if> | 53 | <if test="image != null">#{image},</if> |
| 55 | <if test="status != null">#{status},</if> | 54 | <if test="status != null">#{status},</if> |
| 55 | + <if test="createTime != null">#{createTime},</if> | ||
| 56 | <if test="remark != null and remark != ''">#{remark},</if> | 56 | <if test="remark != null and remark != ''">#{remark},</if> |
| 57 | </trim> | 57 | </trim> |
| 58 | </insert> | 58 | </insert> |
| @@ -61,11 +61,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -61,11 +61,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 61 | update equipment_exception | 61 | update equipment_exception |
| 62 | <trim prefix="SET" suffixOverrides=","> | 62 | <trim prefix="SET" suffixOverrides=","> |
| 63 | <if test="title != null">title = #{title},</if> | 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> | 64 | + <if test="deviceId != null">device_id = #{deviceId},</if> |
| 66 | <if test="jobCode != null and jobCode != ''">job_code = #{jobCode},</if> | 65 | <if test="jobCode != null and jobCode != ''">job_code = #{jobCode},</if> |
| 67 | <if test="image != null">image = #{image},</if> | 66 | <if test="image != null">image = #{image},</if> |
| 68 | <if test="status != null">status = #{status},</if> | 67 | <if test="status != null">status = #{status},</if> |
| 68 | + <if test="createTime != null">create_time = #{createTime},</if> | ||
| 69 | <if test="remark != null and remark != ''">remark = #{remark},</if> | 69 | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| 70 | </trim> | 70 | </trim> |
| 71 | where id = #{id} | 71 | where id = #{id} |
ruoyi-admin/src/main/resources/mapper/equipment/EquipmentMapper.xml
| @@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 12 | <result property="status" column="status" /> | 12 | <result property="status" column="status" /> |
| 13 | <result property="promise" column="promise" /> | 13 | <result property="promise" column="promise" /> |
| 14 | <result property="image" column="image" /> | 14 | <result property="image" column="image" /> |
| 15 | + <result property="deviceId" column="device_id" /> | ||
| 15 | <result property="createTime" column="create_time" /> | 16 | <result property="createTime" column="create_time" /> |
| 16 | <result property="updateTime" column="update_time" /> | 17 | <result property="updateTime" column="update_time" /> |
| 17 | <result property="createBy" column="create_by" /> | 18 | <result property="createBy" column="create_by" /> |
| @@ -20,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -20,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 20 | </resultMap> | 21 | </resultMap> |
| 21 | 22 | ||
| 22 | <sql id="selectEquipmentVo"> | 23 | <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 | + select id, site_name, address, ip, status, promise, image, device_id, create_time, update_time, create_by, update_by, remark from equipment |
| 24 | </sql> | 25 | </sql> |
| 25 | 26 | ||
| 26 | <select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult"> | 27 | <select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult"> |
| @@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 32 | <if test="status != null "> and status = #{status}</if> | 33 | <if test="status != null "> and status = #{status}</if> |
| 33 | <if test="promise != null and promise != ''"> and promise = #{promise}</if> | 34 | <if test="promise != null and promise != ''"> and promise = #{promise}</if> |
| 34 | <if test="image != null and image != ''"> and image = #{image}</if> | 35 | <if test="image != null and image != ''"> and image = #{image}</if> |
| 36 | + <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if> | ||
| 35 | </where> | 37 | </where> |
| 36 | </select> | 38 | </select> |
| 37 | 39 | ||
| @@ -49,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -49,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 49 | <if test="status != null">status,</if> | 51 | <if test="status != null">status,</if> |
| 50 | <if test="promise != null and promise != ''">promise,</if> | 52 | <if test="promise != null and promise != ''">promise,</if> |
| 51 | <if test="image != null">image,</if> | 53 | <if test="image != null">image,</if> |
| 54 | + <if test="deviceId != null">device_id,</if> | ||
| 52 | <if test="createTime != null">create_time,</if> | 55 | <if test="createTime != null">create_time,</if> |
| 53 | <if test="updateTime != null">update_time,</if> | 56 | <if test="updateTime != null">update_time,</if> |
| 54 | <if test="createBy != null">create_by,</if> | 57 | <if test="createBy != null">create_by,</if> |
| @@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 62 | <if test="status != null">#{status},</if> | 65 | <if test="status != null">#{status},</if> |
| 63 | <if test="promise != null and promise != ''">#{promise},</if> | 66 | <if test="promise != null and promise != ''">#{promise},</if> |
| 64 | <if test="image != null">#{image},</if> | 67 | <if test="image != null">#{image},</if> |
| 68 | + <if test="deviceId != null">#{deviceId},</if> | ||
| 65 | <if test="createTime != null">#{createTime},</if> | 69 | <if test="createTime != null">#{createTime},</if> |
| 66 | <if test="updateTime != null">#{updateTime},</if> | 70 | <if test="updateTime != null">#{updateTime},</if> |
| 67 | <if test="createBy != null">#{createBy},</if> | 71 | <if test="createBy != null">#{createBy},</if> |
| @@ -79,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -79,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 79 | <if test="status != null">status = #{status},</if> | 83 | <if test="status != null">status = #{status},</if> |
| 80 | <if test="promise != null and promise != ''">promise = #{promise},</if> | 84 | <if test="promise != null and promise != ''">promise = #{promise},</if> |
| 81 | <if test="image != null">image = #{image},</if> | 85 | <if test="image != null">image = #{image},</if> |
| 86 | + <if test="deviceId != null">device_id = #{deviceId},</if> | ||
| 82 | <if test="createTime != null">create_time = #{createTime},</if> | 87 | <if test="createTime != null">create_time = #{createTime},</if> |
| 83 | <if test="updateTime != null">update_time = #{updateTime},</if> | 88 | <if test="updateTime != null">update_time = #{updateTime},</if> |
| 84 | <if test="createBy != null">create_by = #{createBy},</if> | 89 | <if test="createBy != null">create_by = #{createBy},</if> |
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
| @@ -53,6 +53,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils | @@ -53,6 +53,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils | ||
| 53 | return dateTimeNow(YYYY_MM_DD); | 53 | return dateTimeNow(YYYY_MM_DD); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | + public static String getDate(String format) | ||
| 57 | + { | ||
| 58 | + return dateTimeNow(format); | ||
| 59 | + } | ||
| 60 | + | ||
| 56 | public static final String getTime() | 61 | public static final String getTime() |
| 57 | { | 62 | { |
| 58 | return dateTimeNow(YYYY_MM_DD_HH_MM_SS); | 63 | return dateTimeNow(YYYY_MM_DD_HH_MM_SS); |