Commit f869756ece6d2e4c55ac0b94a1a6e38c36ff1d9e
1 parent
a8b19eef
设备和场地
Showing
16 changed files
with
176 additions
and
116 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssDriverController.java
| @@ -545,7 +545,7 @@ public class DssDriverController extends BaseController { | @@ -545,7 +545,7 @@ public class DssDriverController extends BaseController { | ||
| 545 | if (CollectionUtils.isNotEmpty(equipmentList)) { | 545 | if (CollectionUtils.isNotEmpty(equipmentList)) { |
| 546 | Optional<Equipment> optional = equipmentList.stream().filter(e -> Objects.equals(e.getDeviceId(), s.getDeviceId())).findFirst(); | 546 | Optional<Equipment> optional = equipmentList.stream().filter(e -> Objects.equals(e.getDeviceId(), s.getDeviceId())).findFirst(); |
| 547 | if (optional.isPresent()) { | 547 | if (optional.isPresent()) { |
| 548 | - vo.setDeviceName(optional.get().getSiteName()); | 548 | + vo.setDeviceName(optional.get().getName()); |
| 549 | } | 549 | } |
| 550 | } | 550 | } |
| 551 | vo.setCheckResult(Convert.toStr(s.getStatus())); | 551 | vo.setCheckResult(Convert.toStr(s.getStatus())); |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssEquipmentController.java
| @@ -95,7 +95,7 @@ public class DssEquipmentController extends BaseController { | @@ -95,7 +95,7 @@ public class DssEquipmentController extends BaseController { | ||
| 95 | AsyncManager.me().execute(AsyncFactory.recordLogininfor(dto.getDevice(), Constants.LOGIN_SUCCESS, MessageUtils.message("equipment.login.success"))); | 95 | AsyncManager.me().execute(AsyncFactory.recordLogininfor(dto.getDevice(), Constants.LOGIN_SUCCESS, MessageUtils.message("equipment.login.success"))); |
| 96 | //LoginUser loginUser = (LoginUser) authentication.getPrincipal(); | 96 | //LoginUser loginUser = (LoginUser) authentication.getPrincipal(); |
| 97 | LoginUser loginUser = new LoginUser(); | 97 | LoginUser loginUser = new LoginUser(); |
| 98 | - loginUser.setUserId(equipment.getId()); | 98 | + loginUser.setUserId(Convert.toLong(equipment.getId())); |
| 99 | loginUser.setDeptId(Convert.toLong(equipment.getDeviceId())); | 99 | loginUser.setDeptId(Convert.toLong(equipment.getDeviceId())); |
| 100 | loginUser.setUser(new SysUser()); | 100 | loginUser.setUser(new SysUser()); |
| 101 | 101 |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
| @@ -438,7 +438,7 @@ public class KeyBoxController extends BaseController { | @@ -438,7 +438,7 @@ public class KeyBoxController extends BaseController { | ||
| 438 | vo.setDevice(equipment.getDeviceId()); | 438 | vo.setDevice(equipment.getDeviceId()); |
| 439 | vo.setDeviceType(equipment.getPromise()); | 439 | vo.setDeviceType(equipment.getPromise()); |
| 440 | vo.setTime(workLocations.get(0).getScheduleDate()); | 440 | vo.setTime(workLocations.get(0).getScheduleDate()); |
| 441 | - vo.setYardName(equipment.getSiteName()); | 441 | + vo.setYardName(equipment.getName()); |
| 442 | // vo.setKeyboxName() | 442 | // vo.setKeyboxName() |
| 443 | 443 | ||
| 444 | List<BasicSyncKeyboxVo> keybox = new ArrayList<>(); | 444 | List<BasicSyncKeyboxVo> keybox = new ArrayList<>(); |
Bsth-admin/src/main/java/com/ruoyi/controller/venue/info/LinggangVenueInfoController.java
| @@ -36,6 +36,7 @@ public class LinggangVenueInfoController extends BaseController { | @@ -36,6 +36,7 @@ public class LinggangVenueInfoController extends BaseController { | ||
| 36 | @PreAuthorize("@ss.hasPermi('linggang:venue:info:list:limit:page:limit')") | 36 | @PreAuthorize("@ss.hasPermi('linggang:venue:info:list:limit:page:limit')") |
| 37 | @PostMapping(value = "/list/limit/{page}/{pageLimit}") | 37 | @PostMapping(value = "/list/limit/{page}/{pageLimit}") |
| 38 | public IPage<LinggangVenueInfoVO> listLimit(@ModelAttribute LinggangVenueInfoQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) { | 38 | public IPage<LinggangVenueInfoVO> listLimit(@ModelAttribute LinggangVenueInfoQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) { |
| 39 | + request.clearStrEmpty(); | ||
| 39 | LinggangVenueInfo entity = convert(request); | 40 | LinggangVenueInfo entity = convert(request); |
| 40 | IPage<LinggangVenueInfo> response = linggangVenueInfoService.pageList(new Page<LinggangVenueInfo>(page, pageLimit), entity, orderEntity); | 41 | IPage<LinggangVenueInfo> response = linggangVenueInfoService.pageList(new Page<LinggangVenueInfo>(page, pageLimit), entity, orderEntity); |
| 41 | 42 | ||
| @@ -52,7 +53,7 @@ public class LinggangVenueInfoController extends BaseController { | @@ -52,7 +53,7 @@ public class LinggangVenueInfoController extends BaseController { | ||
| 52 | 53 | ||
| 53 | @PostMapping(value = "/list/select") | 54 | @PostMapping(value = "/list/select") |
| 54 | @ApiOperation("(页面选择)") | 55 | @ApiOperation("(页面选择)") |
| 55 | - public com.ruoyi.common.core.domain.ResponseResult<List<LinggangVenueInfoVO>> listSelect(@RequestBody LinggangVenueInfoQueryDTO request) { | 56 | + public com.ruoyi.common.core.domain.ResponseResult<List<LinggangVenueInfoVO>> listSelect(LinggangVenueInfoQueryDTO request) { |
| 56 | LinggangVenueInfo entity = convert(request); | 57 | LinggangVenueInfo entity = convert(request); |
| 57 | List<LinggangVenueInfo> selectList = linggangVenueInfoService.listOfSelect(entity); | 58 | List<LinggangVenueInfo> selectList = linggangVenueInfoService.listOfSelect(entity); |
| 58 | return com.ruoyi.common.core.domain.ResponseResult.success(convert(selectList)); | 59 | return com.ruoyi.common.core.domain.ResponseResult.success(convert(selectList)); |
Bsth-admin/src/main/java/com/ruoyi/domain/venue/info/dto/LinggangVenueInfoQueryDTO.java
| @@ -43,6 +43,19 @@ public class LinggangVenueInfoQueryDTO implements java.io.Serializable { | @@ -43,6 +43,19 @@ public class LinggangVenueInfoQueryDTO implements java.io.Serializable { | ||
| 43 | private String name; | 43 | private String name; |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | + public void clearStrEmpty() { | ||
| 47 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.parkCode)) { | ||
| 48 | + this.parkCode = null; | ||
| 49 | + } | ||
| 50 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.parkAddr)) { | ||
| 51 | + this.parkAddr = null; | ||
| 52 | + } | ||
| 53 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.name)) { | ||
| 54 | + this.name = null; | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + | ||
| 46 | @Override | 59 | @Override |
| 47 | public String toString() { | 60 | public String toString() { |
| 48 | return com.alibaba.fastjson2.JSON.toJSONString(this); | 61 | return com.alibaba.fastjson2.JSON.toJSONString(this); |
Bsth-admin/src/main/java/com/ruoyi/domain/venue/info/vo/LinggangVenueInfoVO.java
| @@ -47,6 +47,10 @@ public class LinggangVenueInfoVO implements java.io.Serializable { | @@ -47,6 +47,10 @@ public class LinggangVenueInfoVO implements java.io.Serializable { | ||
| 47 | @ApiModelProperty(value = "场站名称") | 47 | @ApiModelProperty(value = "场站名称") |
| 48 | private String name; | 48 | private String name; |
| 49 | 49 | ||
| 50 | + public String getDeleteFlagStr(){ | ||
| 51 | + return com.ruoyi.utils.IUnicodeUtils.getDelFlagStr(delFlag); | ||
| 52 | + } | ||
| 53 | + | ||
| 50 | 54 | ||
| 51 | @Override | 55 | @Override |
| 52 | public String toString() { | 56 | public String toString() { |
Bsth-admin/src/main/java/com/ruoyi/equipment/controller/EquipmentController.java
| 1 | package com.ruoyi.equipment.controller; | 1 | package com.ruoyi.equipment.controller; |
| 2 | 2 | ||
| 3 | -import java.util.List; | ||
| 4 | -import javax.servlet.http.HttpServletResponse; | ||
| 5 | - | ||
| 6 | -import com.ruoyi.equipment.domain.EquipmentLog; | ||
| 7 | -import io.swagger.annotations.Api; | ||
| 8 | -import io.swagger.annotations.ApiOperation; | ||
| 9 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | -import org.springframework.web.bind.annotation.*; | ||
| 12 | import com.ruoyi.common.annotation.Log; | 3 | import com.ruoyi.common.annotation.Log; |
| 13 | import com.ruoyi.common.core.controller.BaseController; | 4 | import com.ruoyi.common.core.controller.BaseController; |
| 14 | import com.ruoyi.common.core.domain.AjaxResult; | 5 | import com.ruoyi.common.core.domain.AjaxResult; |
| 6 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 15 | import com.ruoyi.common.enums.BusinessType; | 7 | import com.ruoyi.common.enums.BusinessType; |
| 8 | +import com.ruoyi.common.utils.poi.ExcelUtil; | ||
| 9 | +import com.ruoyi.domain.venue.info.LinggangVenueInfo; | ||
| 16 | import com.ruoyi.equipment.domain.Equipment; | 10 | import com.ruoyi.equipment.domain.Equipment; |
| 11 | +import com.ruoyi.equipment.domain.EquipmentLog; | ||
| 17 | import com.ruoyi.equipment.service.IEquipmentService; | 12 | import com.ruoyi.equipment.service.IEquipmentService; |
| 18 | -import com.ruoyi.common.utils.poi.ExcelUtil; | ||
| 19 | -import com.ruoyi.common.core.page.TableDataInfo; | 13 | +import com.ruoyi.service.venue.info.LinggangVenueInfoService; |
| 14 | +import io.swagger.annotations.Api; | ||
| 15 | +import io.swagger.annotations.ApiOperation; | ||
| 16 | +import org.apache.commons.collections4.CollectionUtils; | ||
| 17 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 18 | +import org.springframework.web.bind.annotation.*; | ||
| 19 | + | ||
| 20 | +import javax.servlet.http.HttpServletResponse; | ||
| 21 | +import java.util.Collection; | ||
| 22 | +import java.util.List; | ||
| 23 | +import java.util.Objects; | ||
| 24 | +import java.util.Optional; | ||
| 25 | +import java.util.stream.Collectors; | ||
| 20 | 26 | ||
| 21 | /** | 27 | /** |
| 22 | * 设备信息Controller | 28 | * 设备信息Controller |
| @@ -30,6 +36,8 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -30,6 +36,8 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 30 | public class EquipmentController extends BaseController { | 36 | public class EquipmentController extends BaseController { |
| 31 | @Autowired | 37 | @Autowired |
| 32 | private IEquipmentService equipmentService; | 38 | private IEquipmentService equipmentService; |
| 39 | + @Autowired | ||
| 40 | + private LinggangVenueInfoService venueInfoService; | ||
| 33 | 41 | ||
| 34 | /** | 42 | /** |
| 35 | * 查询设备信息列表 | 43 | * 查询设备信息列表 |
| @@ -40,6 +48,21 @@ public class EquipmentController extends BaseController { | @@ -40,6 +48,21 @@ public class EquipmentController extends BaseController { | ||
| 40 | public TableDataInfo list(Equipment equipment) { | 48 | public TableDataInfo list(Equipment equipment) { |
| 41 | startPage(); | 49 | startPage(); |
| 42 | List<Equipment> list = equipmentService.selectEquipmentList(equipment); | 50 | List<Equipment> list = equipmentService.selectEquipmentList(equipment); |
| 51 | + if (CollectionUtils.isNotEmpty(list)) { | ||
| 52 | + Collection<Integer> yarIds = list.stream().map(Equipment::getYardId).collect(Collectors.toSet()); | ||
| 53 | + List<LinggangVenueInfo> venueInfos = venueInfoService.listOfIds(yarIds); | ||
| 54 | + if (CollectionUtils.isNotEmpty(venueInfos)) { | ||
| 55 | + list = list.stream().map(eq -> { | ||
| 56 | + Optional<LinggangVenueInfo> optional = venueInfos.stream().filter(v -> Objects.equals(v.getId(), eq.getYardId())).findFirst(); | ||
| 57 | + if (optional.isPresent()) { | ||
| 58 | + eq.setYardName(optional.get().getName()); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + return eq; | ||
| 62 | + }).collect(Collectors.toList()); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + } | ||
| 43 | return getDataTable(list); | 66 | return getDataTable(list); |
| 44 | } | 67 | } |
| 45 | 68 |
Bsth-admin/src/main/java/com/ruoyi/equipment/domain/Equipment.java
| 1 | package com.ruoyi.equipment.domain; | 1 | package com.ruoyi.equipment.domain; |
| 2 | 2 | ||
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 3 | import com.ruoyi.common.annotation.Excel; | 6 | import com.ruoyi.common.annotation.Excel; |
| 4 | import com.ruoyi.common.core.domain.BaseEntity; | 7 | import com.ruoyi.common.core.domain.BaseEntity; |
| 5 | import io.swagger.annotations.ApiModel; | 8 | import io.swagger.annotations.ApiModel; |
| 6 | -import io.swagger.annotations.ApiModelProperty; | ||
| 7 | import lombok.Data; | 9 | import lombok.Data; |
| 8 | 10 | ||
| 9 | -import java.util.Date; | ||
| 10 | - | ||
| 11 | /** | 11 | /** |
| 12 | * 设备信息对象 equipment | 12 | * 设备信息对象 equipment |
| 13 | * | 13 | * |
| @@ -19,71 +19,82 @@ import java.util.Date; | @@ -19,71 +19,82 @@ import java.util.Date; | ||
| 19 | public class Equipment extends BaseEntity { | 19 | public class Equipment extends BaseEntity { |
| 20 | private static final long serialVersionUID = 1L; | 20 | private static final long serialVersionUID = 1L; |
| 21 | 21 | ||
| 22 | - /** | ||
| 23 | - * 主键 | ||
| 24 | - */ | ||
| 25 | - private Long id; | ||
| 26 | - | ||
| 27 | - /** | ||
| 28 | - * 场地名称 | ||
| 29 | - */ | ||
| 30 | - @Excel(name = "场地名称") | ||
| 31 | - @ApiModelProperty("场地名称") | ||
| 32 | - private String siteName; | ||
| 33 | - | ||
| 34 | - /** | ||
| 35 | - * 安置地址 | ||
| 36 | - */ | 22 | + /***主键*/ |
| 23 | + @Excel(name = "主键") | ||
| 24 | + private java.lang.Integer id; | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + /***安置地址*/ | ||
| 37 | @Excel(name = "安置地址") | 28 | @Excel(name = "安置地址") |
| 38 | - @ApiModelProperty("安置地址") | ||
| 39 | - private String address; | ||
| 40 | - | ||
| 41 | - /** | ||
| 42 | - * 设备ip | ||
| 43 | - */ | ||
| 44 | - @Excel(name = "设备ip") | ||
| 45 | - @ApiModelProperty("设备ip") | ||
| 46 | - private String ip; | ||
| 47 | - | ||
| 48 | - /** | ||
| 49 | - * 设备状态 | ||
| 50 | - */ | ||
| 51 | - @Excel(name = "设备状态") | ||
| 52 | - @ApiModelProperty("设备状态") | ||
| 53 | - private Integer status; | ||
| 54 | - | ||
| 55 | - /** | ||
| 56 | - * 设备权限 | ||
| 57 | - */ | ||
| 58 | - @Excel(name = "设备权限") | ||
| 59 | - @ApiModelProperty("设备权限") | ||
| 60 | - private String promise; | ||
| 61 | - | ||
| 62 | - /** | ||
| 63 | - * 设备图片 | ||
| 64 | - */ | 29 | + private java.lang.String address; |
| 30 | + | ||
| 31 | + | ||
| 32 | + /***设备ip地址*/ | ||
| 33 | + @Excel(name = "设备ip地址") | ||
| 34 | + private java.lang.String ip; | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + /***设备状态 是否异常*/ | ||
| 38 | + @Excel(name = "设备状态 是否异常") | ||
| 39 | + private java.lang.Integer status; | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + /***权限 1 人脸 2 刷卡 3 其他 4 酒精 5为钥匙柜*/ | ||
| 43 | + @Excel(name = "权限 1 人脸 2 刷卡 3 其他 4 酒精 5为钥匙柜") | ||
| 44 | + private java.lang.String promise; | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + /***设备图片*/ | ||
| 65 | @Excel(name = "设备图片") | 48 | @Excel(name = "设备图片") |
| 66 | - @ApiModelProperty("设备图片") | ||
| 67 | - private String image; | ||
| 68 | - /** | ||
| 69 | - * 设备号 | ||
| 70 | - */ | 49 | + private java.lang.String image; |
| 50 | + | ||
| 51 | + | ||
| 52 | + /***设备号*/ | ||
| 53 | + @TableId(value = "device_id", type = IdType.AUTO) | ||
| 71 | @Excel(name = "设备号") | 54 | @Excel(name = "设备号") |
| 72 | - @ApiModelProperty("设备号") | ||
| 73 | - private String deviceId; | ||
| 74 | - /** | ||
| 75 | - * 设备在线状态 | ||
| 76 | - */ | ||
| 77 | - @ApiModelProperty("设备在线状态") | ||
| 78 | - private String onlineClient; | ||
| 79 | - @ApiModelProperty("上次心跳响应时间") | ||
| 80 | - private Date lastHeartRes; | 55 | + private java.lang.String deviceId; |
| 56 | + | ||
| 57 | + | ||
| 58 | + /***创建时间*/ | ||
| 59 | + @Excel(name = "创建时间") | ||
| 60 | + private java.util.Date createTime; | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + /***修改时间*/ | ||
| 64 | + @Excel(name = "修改时间") | ||
| 65 | + private java.util.Date updateTime; | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + /***创建人 */ | ||
| 69 | + @Excel(name = "创建人 ") | ||
| 70 | + private java.lang.String createBy; | ||
| 71 | + | ||
| 72 | + | ||
| 73 | + /***修改人*/ | ||
| 74 | + @Excel(name = "修改人") | ||
| 75 | + private java.lang.String updateBy; | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + /***备注*/ | ||
| 79 | + @Excel(name = "备注") | ||
| 80 | + private java.lang.String remark; | ||
| 81 | + | ||
| 82 | + | ||
| 83 | + /***上次检测时间*/ | ||
| 84 | + @Excel(name = "上次检测时间") | ||
| 85 | + private java.util.Date lastHeartRes; | ||
| 86 | + | ||
| 87 | + | ||
| 88 | + /***是否在线*/ | ||
| 89 | + @Excel(name = "是否在线") | ||
| 90 | + private java.lang.String onlineClient; | ||
| 81 | 91 | ||
| 82 | 92 | ||
| 83 | /***格子数*/ | 93 | /***格子数*/ |
| 84 | @Excel(name = "格子数") | 94 | @Excel(name = "格子数") |
| 85 | private java.lang.Integer latticeNumber; | 95 | private java.lang.Integer latticeNumber; |
| 86 | 96 | ||
| 97 | + | ||
| 87 | /***钥匙柜名称*/ | 98 | /***钥匙柜名称*/ |
| 88 | @Excel(name = "钥匙柜名称") | 99 | @Excel(name = "钥匙柜名称") |
| 89 | private java.lang.String name; | 100 | private java.lang.String name; |
| @@ -93,6 +104,13 @@ public class Equipment extends BaseEntity { | @@ -93,6 +104,13 @@ public class Equipment extends BaseEntity { | ||
| 93 | @Excel(name = "场站ID") | 104 | @Excel(name = "场站ID") |
| 94 | private java.lang.Integer yardId; | 105 | private java.lang.Integer yardId; |
| 95 | 106 | ||
| 107 | + @TableField(exist = false) | ||
| 108 | + private String yardName; | ||
| 109 | + | ||
| 96 | 110 | ||
| 97 | 111 | ||
| 112 | + @Override | ||
| 113 | + public String toString() { | ||
| 114 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 115 | + } | ||
| 98 | } | 116 | } |
Bsth-admin/src/main/java/com/ruoyi/equipment/service/impl/EquipmentServiceImpl.java
| @@ -83,7 +83,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment | @@ -83,7 +83,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment | ||
| 83 | } | 83 | } |
| 84 | LambdaQueryWrapper<Equipment> wrapper = new LambdaQueryWrapper<>(); | 84 | LambdaQueryWrapper<Equipment> wrapper = new LambdaQueryWrapper<>(); |
| 85 | wrapper.in(Equipment::getId, ids); | 85 | wrapper.in(Equipment::getId, ids); |
| 86 | - wrapper.select(Equipment::getId, Equipment::getSiteName); | 86 | + wrapper.select(Equipment::getId, Equipment::getName); |
| 87 | return list(wrapper); | 87 | return list(wrapper); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| @@ -180,7 +180,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment | @@ -180,7 +180,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment | ||
| 180 | @Override | 180 | @Override |
| 181 | public List<String> getEquipmentSiteName() { | 181 | public List<String> getEquipmentSiteName() { |
| 182 | List<Equipment> list = equipmentMapper.selectEquipmentList(null); | 182 | List<Equipment> list = equipmentMapper.selectEquipmentList(null); |
| 183 | - List<String> equipment = list.stream().map(Equipment::getSiteName).distinct().collect(Collectors.toList()); | 183 | + List<String> equipment = list.stream().map(Equipment::getName).distinct().collect(Collectors.toList()); |
| 184 | return equipment; | 184 | return equipment; |
| 185 | } | 185 | } |
| 186 | 186 |
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
| @@ -463,9 +463,9 @@ public class SignInServiceImpl extends ServiceImpl<SignInMapper, SignIn> impleme | @@ -463,9 +463,9 @@ public class SignInServiceImpl extends ServiceImpl<SignInMapper, SignIn> impleme | ||
| 463 | if (Objects.isNull(equipment)) { | 463 | if (Objects.isNull(equipment)) { |
| 464 | equipment = new Equipment(); | 464 | equipment = new Equipment(); |
| 465 | } | 465 | } |
| 466 | - vo.setAddress(equipment.getAddress()); | 466 | +// vo.setAddress(equipment.getAddress()); |
| 467 | vo.setDeviceId(signIn.getDeviceId()); | 467 | vo.setDeviceId(signIn.getDeviceId()); |
| 468 | - vo.setSiteName(equipment.getSiteName()); | 468 | + vo.setSiteName(equipment.getName()); |
| 469 | vo.setName(driver.getPersonnelName()); | 469 | vo.setName(driver.getPersonnelName()); |
| 470 | vo.setPosts(driver.getPosts()); | 470 | vo.setPosts(driver.getPosts()); |
| 471 | return vo; | 471 | return vo; |
Bsth-admin/src/main/java/com/ruoyi/service/impl/dss/KeyBoxVoServiceImpl.java
| @@ -91,7 +91,7 @@ public class KeyBoxVoServiceImpl implements KeyBoxVoService { | @@ -91,7 +91,7 @@ public class KeyBoxVoServiceImpl implements KeyBoxVoService { | ||
| 91 | KeyBoxVo keyBoxVo = new KeyBoxVo(); | 91 | KeyBoxVo keyBoxVo = new KeyBoxVo(); |
| 92 | //keyBoxVo.setCabinetNo(Convert.toStr(keyInfo.getCabinetno())); | 92 | //keyBoxVo.setCabinetNo(Convert.toStr(keyInfo.getCabinetno())); |
| 93 | // keyBoxVo.setDevice(""); | 93 | // keyBoxVo.setDevice(""); |
| 94 | - keyBoxVo.setDeviceName(equipment.getSiteName()); | 94 | + keyBoxVo.setDeviceName(equipment.getName()); |
| 95 | // keyBoxVo.setYardId(Convert.toStr(keyInfo.getYardId())); | 95 | // keyBoxVo.setYardId(Convert.toStr(keyInfo.getYardId())); |
| 96 | // keyBoxVo.setYardName(Convert.toStr(keyInfo.getS())); | 96 | // keyBoxVo.setYardName(Convert.toStr(keyInfo.getS())); |
| 97 | keyBoxVo.setPlateNum(lingangScheduling.getNbbm()); | 97 | keyBoxVo.setPlateNum(lingangScheduling.getNbbm()); |
Bsth-admin/src/main/java/com/ruoyi/utils/IUnicodeUtils.java
| 1 | package com.ruoyi.utils; | 1 | package com.ruoyi.utils; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.domain.enums.DelFlagEnum; | ||
| 3 | import org.apache.commons.lang3.StringUtils; | 4 | import org.apache.commons.lang3.StringUtils; |
| 4 | 5 | ||
| 6 | +import java.util.Objects; | ||
| 7 | + | ||
| 5 | /** | 8 | /** |
| 6 | * @author 20412 | 9 | * @author 20412 |
| 7 | */ | 10 | */ |
| @@ -21,4 +24,8 @@ public class IUnicodeUtils { | @@ -21,4 +24,8 @@ public class IUnicodeUtils { | ||
| 21 | } | 24 | } |
| 22 | return outStr.toString(); | 25 | return outStr.toString(); |
| 23 | } | 26 | } |
| 27 | + | ||
| 28 | + public static String getDelFlagStr(Boolean delFlag) { | ||
| 29 | + return Objects.isNull(delFlag) ? null : delFlag ? DelFlagEnum.YES.getLabel() : DelFlagEnum.NO.getLabel(); | ||
| 30 | + } | ||
| 24 | } | 31 | } |
Bsth-admin/src/main/resources/mapper/driver_scheduling/DriverSchedulingMapper.xml
| @@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
| 68 | </update> | 68 | </update> |
| 69 | 69 | ||
| 70 | <select id="queryToDay" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> | 70 | <select id="queryToDay" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> |
| 71 | - select scheduling.*,driver.fleet_name fleetName,equipment.site_name siteName from | 71 | + select scheduling.*,driver.fleet_name fleetName,equipment.name siteName from |
| 72 | scheduling left join driver on scheduling.job_code = driver.job_code | 72 | scheduling left join driver on scheduling.job_code = driver.job_code |
| 73 | left join sign_in on scheduling.sign_in_id = sign_in.id | 73 | left join sign_in on scheduling.sign_in_id = sign_in.id |
| 74 | left join equipment on equipment.device_id = sign_in.device_id | 74 | left join equipment on equipment.device_id = sign_in.device_id |
| @@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
| 90 | 90 | ||
| 91 | </select> | 91 | </select> |
| 92 | <select id="queryByMonth" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> | 92 | <select id="queryByMonth" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> |
| 93 | - select scheduling.*, driver.fleet_name fleetName,equipment.site_name siteName | 93 | + select scheduling.*, driver.fleet_name fleetName,equipment.name siteName |
| 94 | from scheduling | 94 | from scheduling |
| 95 | left join driver on driver.job_code = scheduling.job_code | 95 | left join driver on driver.job_code = scheduling.job_code |
| 96 | left join sign_in on scheduling.sign_in_id = sign_in.id | 96 | left join sign_in on scheduling.sign_in_id = sign_in.id |
Bsth-admin/src/main/resources/mapper/eexception/EquipmentExceptionMapper.xml
| @@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
| 15 | <result property="remark" column="remark"/> | 15 | <result property="remark" column="remark"/> |
| 16 | <result property="exType" column="ex_type"/> | 16 | <result property="exType" column="ex_type"/> |
| 17 | <result property="personnelName" column="personnel_name"/> | 17 | <result property="personnelName" column="personnel_name"/> |
| 18 | - <result property="siteName" column="site_name"/> | 18 | + <result property="name" column="name"/> |
| 19 | <result property="fleetName" column="fleet_name"/> | 19 | <result property="fleetName" column="fleet_name"/> |
| 20 | <result property="nbbm" column="nbbm"/> | 20 | <result property="nbbm" column="nbbm"/> |
| 21 | <result property="lineName" column="line_name"/> | 21 | <result property="lineName" column="line_name"/> |
| @@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
| 53 | 53 | ||
| 54 | <select id="selectEquipmentExceptionList" parameterType="com.ruoyi.pojo.response.EquipmentExceptionResponseVo" | 54 | <select id="selectEquipmentExceptionList" parameterType="com.ruoyi.pojo.response.EquipmentExceptionResponseVo" |
| 55 | resultMap="EquipmentExceptionResponseResult"> | 55 | resultMap="EquipmentExceptionResponseResult"> |
| 56 | - select equipment_exception.id, title, equipment.site_name , | 56 | + select equipment_exception.id, title, equipment.name , |
| 57 | equipment_exception.device_id,driver.personnel_name, | 57 | equipment_exception.device_id,driver.personnel_name, |
| 58 | driver.job_code, equipment_exception.image, | 58 | driver.job_code, equipment_exception.image, |
| 59 | equipment_exception.status, equipment_exception.create_time, | 59 | equipment_exception.status, equipment_exception.create_time, |
| @@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
| 92 | resultType="com.ruoyi.pojo.response.EquipmentExceptionResponseVo" | 92 | resultType="com.ruoyi.pojo.response.EquipmentExceptionResponseVo" |
| 93 | resultMap="EquipmentExceptionResponseResult"> | 93 | resultMap="EquipmentExceptionResponseResult"> |
| 94 | select equipment_exception.id, title, | 94 | select equipment_exception.id, title, |
| 95 | - equipment.site_name , | 95 | + equipment.name , |
| 96 | equipment_exception.device_id, | 96 | equipment_exception.device_id, |
| 97 | driver.personnel_name, | 97 | driver.personnel_name, |
| 98 | driver.job_code, | 98 | driver.job_code, |
Bsth-admin/src/main/resources/mapper/equipment/EquipmentMapper.xml
| @@ -4,35 +4,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -4,35 +4,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 5 | <mapper namespace="com.ruoyi.equipment.mapper.EquipmentMapper"> | 5 | <mapper namespace="com.ruoyi.equipment.mapper.EquipmentMapper"> |
| 6 | 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="deviceId" column="device_id" /> | ||
| 16 | - <result property="createTime" column="create_time" /> | ||
| 17 | - <result property="updateTime" column="update_time" /> | ||
| 18 | - <result property="createBy" column="create_by" /> | ||
| 19 | - <result property="updateBy" column="update_by" /> | ||
| 20 | - <result property="remark" column="remark" /> | ||
| 21 | - <result property="lastHeartRes" column="last_heart_res" /> | ||
| 22 | - <result property="onlineClient" column="online_client" /> | 7 | + <resultMap type="com.ruoyi.equipment.domain.Equipment" id="EquipmentResult"> |
| 8 | + <id column ="device_id" jdbcType="VARCHAR" property="deviceId" /> | ||
| 9 | + <result column="id" jdbcType="INTEGER" property="id" /> | ||
| 10 | + <result column="address" jdbcType="VARCHAR" property="address" /> | ||
| 11 | + <result column="ip" jdbcType="VARCHAR" property="ip" /> | ||
| 12 | + <result column="status" jdbcType="TINYINT" property="status" /> | ||
| 13 | + <result column="promise" jdbcType="VARCHAR" property="promise" /> | ||
| 14 | + <result column="image" jdbcType="VARCHAR" property="image" /> | ||
| 15 | + <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | ||
| 16 | + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | ||
| 17 | + <result column="create_by" jdbcType="VARCHAR" property="createBy" /> | ||
| 18 | + <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> | ||
| 19 | + <result column="remark" jdbcType="VARCHAR" property="remark" /> | ||
| 20 | + <result column="last_heart_res" jdbcType="TIMESTAMP" property="lastHeartRes" /> | ||
| 21 | + <result column="online_client" jdbcType="VARCHAR" property="onlineClient" /> | ||
| 23 | <result column="lattice_number" jdbcType="INTEGER" property="latticeNumber" /> | 22 | <result column="lattice_number" jdbcType="INTEGER" property="latticeNumber" /> |
| 24 | - <result column="name" property="name" /> | ||
| 25 | - <result column="yard_Id" property="yardId" /> | 23 | + <result column="name" jdbcType="VARCHAR" property="name" /> |
| 24 | + <result column="yard_Id" jdbcType="INTEGER" property="yardId" /> | ||
| 26 | </resultMap> | 25 | </resultMap> |
| 27 | 26 | ||
| 28 | <sql id="selectEquipmentVo"> | 27 | <sql id="selectEquipmentVo"> |
| 29 | - select id, site_name, address, ip, status, promise, image, device_id, create_time, update_time, create_by, update_by, remark,last_heart_res,online_client,lattice_number from equipment | 28 | + select id, name, address, ip, status, promise, image, device_id, create_time, update_time, create_by, update_by, remark,last_heart_res,online_client,lattice_number,yard_Id from equipment |
| 30 | </sql> | 29 | </sql> |
| 31 | 30 | ||
| 32 | - <select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult"> | 31 | + <select id="selectEquipmentList" parameterType="com.ruoyi.equipment.domain.Equipment" resultMap="EquipmentResult"> |
| 33 | <include refid="selectEquipmentVo"/> | 32 | <include refid="selectEquipmentVo"/> |
| 34 | - <where> | ||
| 35 | - <if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if> | 33 | + <where> |
| 36 | <if test="address != null and address != ''"> and address = #{address}</if> | 34 | <if test="address != null and address != ''"> and address = #{address}</if> |
| 37 | <if test="ip != null and ip != ''"> and ip = #{ip}</if> | 35 | <if test="ip != null and ip != ''"> and ip = #{ip}</if> |
| 38 | <if test="status != null "> and status = #{status}</if> | 36 | <if test="status != null "> and status = #{status}</if> |
| @@ -40,8 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -40,8 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 40 | <if test="image != null and image != ''"> and image = #{image}</if> | 38 | <if test="image != null and image != ''"> and image = #{image}</if> |
| 41 | <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if> | 39 | <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if> |
| 42 | <if test="onlineClient != null and onlineClient != ''"> and online_client = #{onlineClient}</if> | 40 | <if test="onlineClient != null and onlineClient != ''"> and online_client = #{onlineClient}</if> |
| 43 | - <if test="null!=name">#{name}</if> | ||
| 44 | - <if test="null!=yardId">#{yardId}</if> | 41 | + <if test="null!=name">and name =#{name}</if> |
| 42 | + <if test="null!=yardId">and yard_Id =#{yardId}</if> | ||
| 45 | </where> | 43 | </where> |
| 46 | order by id desc | 44 | order by id desc |
| 47 | </select> | 45 | </select> |
| @@ -82,12 +80,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -82,12 +80,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 82 | </select> | 80 | </select> |
| 83 | 81 | ||
| 84 | <select id="queryIdsiteNameBypromise" resultType="com.ruoyi.equipment.domain.Equipment"> | 82 | <select id="queryIdsiteNameBypromise" resultType="com.ruoyi.equipment.domain.Equipment"> |
| 85 | - SELECT id,site_name,promise FROM equipment WHERE FIND_IN_SET(#{promise},promise) >0 | 83 | + SELECT id,name,promise FROM equipment WHERE FIND_IN_SET(#{promise},promise) >0 |
| 86 | </select> | 84 | </select> |
| 87 | <insert id="insertEquipment" parameterType="Equipment" useGeneratedKeys="true" keyProperty="id"> | 85 | <insert id="insertEquipment" parameterType="Equipment" useGeneratedKeys="true" keyProperty="id"> |
| 88 | insert into equipment | 86 | insert into equipment |
| 89 | <trim prefix="(" suffix=")" suffixOverrides=","> | 87 | <trim prefix="(" suffix=")" suffixOverrides=","> |
| 90 | - <if test="siteName != null and siteName != ''">site_name,</if> | ||
| 91 | <if test="address != null and address != ''">address,</if> | 88 | <if test="address != null and address != ''">address,</if> |
| 92 | <if test="ip != null and ip != ''">ip,</if> | 89 | <if test="ip != null and ip != ''">ip,</if> |
| 93 | <if test="status != null">status,</if> | 90 | <if test="status != null">status,</if> |
| @@ -106,7 +103,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -106,7 +103,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 106 | <if test="null!=yardId">yard_Id,</if> | 103 | <if test="null!=yardId">yard_Id,</if> |
| 107 | </trim> | 104 | </trim> |
| 108 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 105 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 109 | - <if test="siteName != null and siteName != ''">#{siteName},</if> | ||
| 110 | <if test="address != null and address != ''">#{address},</if> | 106 | <if test="address != null and address != ''">#{address},</if> |
| 111 | <if test="ip != null and ip != ''">#{ip},</if> | 107 | <if test="ip != null and ip != ''">#{ip},</if> |
| 112 | <if test="status != null">#{status},</if> | 108 | <if test="status != null">#{status},</if> |
| @@ -143,7 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -143,7 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 143 | <update id="updateEquipment" parameterType="Equipment"> | 139 | <update id="updateEquipment" parameterType="Equipment"> |
| 144 | update equipment | 140 | update equipment |
| 145 | <trim prefix="SET" suffixOverrides=","> | 141 | <trim prefix="SET" suffixOverrides=","> |
| 146 | - <if test="siteName != null and siteName != ''">site_name = #{siteName},</if> | ||
| 147 | <if test="address != null and address != ''">address = #{address},</if> | 142 | <if test="address != null and address != ''">address = #{address},</if> |
| 148 | <if test="ip != null and ip != ''">ip = #{ip},</if> | 143 | <if test="ip != null and ip != ''">ip = #{ip},</if> |
| 149 | <if test="status != null">status = #{status},</if> | 144 | <if test="status != null">status = #{status},</if> |
| @@ -177,7 +172,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -177,7 +172,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 177 | <update id="updateEquipmentByDeviceId"> | 172 | <update id="updateEquipmentByDeviceId"> |
| 178 | update equipment | 173 | update equipment |
| 179 | <trim prefix="SET" suffixOverrides=","> | 174 | <trim prefix="SET" suffixOverrides=","> |
| 180 | - <if test="siteName != null and siteName != ''">site_name = #{siteName},</if> | ||
| 181 | <if test="address != null and address != ''">address = #{address},</if> | 175 | <if test="address != null and address != ''">address = #{address},</if> |
| 182 | <if test="ip != null and ip != ''">ip = #{ip},</if> | 176 | <if test="ip != null and ip != ''">ip = #{ip},</if> |
| 183 | <if test="status != null">status = #{status},</if> | 177 | <if test="status != null">status = #{status},</if> |
Bsth-admin/src/main/resources/mapper/in/SignInMapper.xml
| @@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
| 60 | </sql> | 60 | </sql> |
| 61 | 61 | ||
| 62 | <select id="selectSignInList" parameterType="com.ruoyi.pojo.response.SignInResponseVo" resultMap="SignInResultVO"> | 62 | <select id="selectSignInList" parameterType="com.ruoyi.pojo.response.SignInResponseVo" resultMap="SignInResultVO"> |
| 63 | - select sign_in.*,driver.posts,driver.personnel_name,equipment.site_name | 63 | + select sign_in.*,driver.posts,driver.personnel_name,equipment.name |
| 64 | from sign_in,driver,equipment | 64 | from sign_in,driver,equipment |
| 65 | WHERE | 65 | WHERE |
| 66 | driver.job_code = sign_in.jobCode and equipment.device_id = sign_in.device_id | 66 | driver.job_code = sign_in.jobCode and equipment.device_id = sign_in.device_id |
| @@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
| 72 | <if test="alcoholFlag != null ">and alcohol_flag = #{alcoholFlag}</if> | 72 | <if test="alcoholFlag != null ">and alcohol_flag = #{alcoholFlag}</if> |
| 73 | <if test="type != null ">and type = #{type}</if> | 73 | <if test="type != null ">and type = #{type}</if> |
| 74 | <if test="alcoholIntake != null ">and alcohol_intake = #{alcoholIntake}</if> | 74 | <if test="alcoholIntake != null ">and alcohol_intake = #{alcoholIntake}</if> |
| 75 | - <if test="siteName != null ">and site_name = #{siteName}</if> | 75 | + <if test="siteName != null ">and name = #{name}</if> |
| 76 | <if test="date != null ">and sign_in.create_time LIKE concat(#{date},'%')</if> | 76 | <if test="date != null ">and sign_in.create_time LIKE concat(#{date},'%')</if> |
| 77 | <if test="null!=schedulingId"> scheduling_id = #{schedulingId}</if> | 77 | <if test="null!=schedulingId"> scheduling_id = #{schedulingId}</if> |
| 78 | order by create_time desc | 78 | order by create_time desc |
| @@ -141,7 +141,7 @@ | @@ -141,7 +141,7 @@ | ||
| 141 | on s1.jobCode = s2.job_code and s1.create_time = s2.min_create_time | 141 | on s1.jobCode = s2.job_code and s1.create_time = s2.min_create_time |
| 142 | </select> | 142 | </select> |
| 143 | <select id="selectSignInByIds" parameterType="com.ruoyi.pojo.response.SignInResponseVo" resultMap="SignInResultVO"> | 143 | <select id="selectSignInByIds" parameterType="com.ruoyi.pojo.response.SignInResponseVo" resultMap="SignInResultVO"> |
| 144 | - select sign_in.id,equipment.site_name | 144 | + select sign_in.id,equipment.name |
| 145 | from sign_in,equipment | 145 | from sign_in,equipment |
| 146 | where equipment.device_id = sign_in.device_id | 146 | where equipment.device_id = sign_in.device_id |
| 147 | <if test="list != null and list.size >0"> | 147 | <if test="list != null and list.size >0"> |