Commit 1d5f2e04feca97939bf6d7b0b3025956751d7364

Authored by liujun001
1 parent 6bca7ac4

车辆信息和钥匙信息

Showing 26 changed files with 1117 additions and 30 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/carinfo/CarInfoController.java 0 → 100644
  1 +package com.ruoyi.controller.carinfo;
  2 +
  3 +import com.ruoyi.common.core.controller.BaseController;
  4 +import com.ruoyi.common.core.domain.AjaxResult;
  5 +import com.ruoyi.domain.OrderEntity;
  6 +import io.swagger.annotations.ApiOperation;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.web.bind.annotation.RestController;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.*;
  11 +import org.springframework.beans.BeanUtils;
  12 +
  13 +import org.springframework.security.access.prepost.PreAuthorize;
  14 +
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +
  19 +import com.baomidou.mybatisplus.core.metadata.IPage;
  20 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  21 +
  22 +import com.alibaba.fastjson2.JSON;
  23 +
  24 +import com.ruoyi.common.utils.poi.ExcelUtil;
  25 +
  26 +import javax.servlet.http.HttpServletResponse;
  27 +
  28 +import com.ruoyi.service.carinfo.CarInfoService;
  29 +import com.ruoyi.domain.caiinfo.vo.CarInfoVO;
  30 +import com.ruoyi.domain.caiinfo.dto.CarInfoAddDTO;
  31 +import com.ruoyi.domain.caiinfo.dto.CarInfoUpdateDTO;
  32 +import com.ruoyi.domain.caiinfo.dto.CarInfoQueryDTO;
  33 +import com.ruoyi.domain.caiinfo.CarInfo;
  34 +
  35 +@RestController
  36 +@RequestMapping("car/info")
  37 +public class CarInfoController extends BaseController {
  38 + @Autowired
  39 + private CarInfoService CarInfoService;
  40 +
  41 + @PreAuthorize("@ss.hasPermi('car:info:list:limit:page:limit')")
  42 + @PostMapping(value = "/list/limit/{page}/{pageLimit}")
  43 + public String listLimit(@ModelAttribute CarInfoQueryDTO request, OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) {
  44 + CarInfo entity = convert(request);
  45 + IPage<CarInfo> response = CarInfoService.pageList(new Page<CarInfo>(page, pageLimit), entity,orderEntity);
  46 +
  47 + return JSON.toJSONString(convert(response));
  48 + }
  49 +
  50 +
  51 + @GetMapping(value = "/view/{id}")
  52 + public com.ruoyi.common.core.domain.AjaxResult view(@PathVariable("id") Integer id, org.springframework.ui.Model model) {
  53 + CarInfo source = CarInfoService.getById(id);
  54 +
  55 + return com.ruoyi.common.core.domain.AjaxResult.success(convert(source));
  56 + }
  57 +
  58 +
  59 +
  60 + @PreAuthorize("@ss.hasPermi('car:info:export')")
  61 + @PostMapping("/export")
  62 + public void export(HttpServletResponse response, CarInfo entity) {
  63 + List<CarInfo> list = CarInfoService.list(entity);
  64 + ExcelUtil<CarInfo> util = new ExcelUtil<CarInfo>(CarInfo.class);
  65 + util.exportExcel(response, list, "CarInfo");
  66 + }
  67 +
  68 +
  69 + @PostMapping(value = "list/select")
  70 + @ApiOperation("车辆列表(页面选择)")
  71 + public AjaxResult listSelect(CarInfoQueryDTO dto) {
  72 + CarInfo entity = convert(dto);
  73 + List<CarInfo> selectList = CarInfoService.listOfSelect(entity);
  74 + return AjaxResult.success(convert(selectList));
  75 + }
  76 +
  77 + @GetMapping(value = "list/select/status")
  78 + @ApiOperation("车辆状态选择列表(页面选择)")
  79 + public AjaxResult listSelect() {
  80 + List<Map<String,Object>> results = Arrays.stream(CarInfo.CarStatusEnum.values()).map(c->{
  81 + Map<String,Object> map = new HashMap<>();
  82 + map.put("label",c.getLabel());
  83 + map.put("value",c.getValue());
  84 +
  85 + return map;
  86 + }).collect(Collectors.toList());
  87 + return AjaxResult.success(results);
  88 + }
  89 +
  90 + @PreAuthorize("@ss.hasPermi('car:info:add')")
  91 + @PostMapping(value = "/add")
  92 + public com.ruoyi.common.core.domain.AjaxResult add(@ModelAttribute CarInfoAddDTO request) {
  93 + CarInfo entity = convert(request);
  94 + entity.setCreateBy(getUserId());
  95 + entity.setCreateTime(new Date());
  96 + int count = CarInfoService.insertSelective(entity);
  97 + return count > 0 ? com.ruoyi.common.core.domain.AjaxResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.AjaxResult.error("添加数据失败,请稍后再试");
  98 + }
  99 +
  100 + @PreAuthorize("@ss.hasPermi('car:info:update')")
  101 + @PostMapping(value = "/update")
  102 + public com.ruoyi.common.core.domain.AjaxResult update(@ModelAttribute CarInfoUpdateDTO request) {
  103 + CarInfo entity = convert(request);
  104 + entity.setUpdateBy(getUserId());
  105 + entity.setUpdateTime(new Date());
  106 + boolean flag = CarInfoService.updateByPrimaryKey(entity);
  107 + return flag ? com.ruoyi.common.core.domain.AjaxResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.AjaxResult.error("修改数据失败,请稍后再试");
  108 + }
  109 +
  110 + @PreAuthorize("@ss.hasPermi('car:info:del')")
  111 + @GetMapping(value = "/del/{id}")
  112 + public com.ruoyi.common.core.domain.AjaxResult delById(@PathVariable("id") Integer id) {
  113 + boolean flag = CarInfoService.deleteById(id);
  114 + return flag ? com.ruoyi.common.core.domain.AjaxResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.AjaxResult.error("操作数据失败,请稍后再试");
  115 + }
  116 +
  117 + private CarInfo convert(CarInfoQueryDTO source) {
  118 + return java.util.Optional.ofNullable(source).map(sc -> {
  119 + CarInfo target = new CarInfo();
  120 + BeanUtils.copyProperties(sc, target);
  121 + return target;
  122 + }).orElse(null);
  123 + }
  124 +
  125 + private CarInfo convert(CarInfoUpdateDTO source) {
  126 + return java.util.Optional.ofNullable(source).map(sc -> {
  127 + CarInfo target = new CarInfo();
  128 + BeanUtils.copyProperties(sc, target);
  129 + return target;
  130 + }).orElse(null);
  131 + }
  132 +
  133 +
  134 + private CarInfo convert(CarInfoAddDTO source) {
  135 + return java.util.Optional.ofNullable(source).map(sc -> {
  136 + CarInfo target = new CarInfo();
  137 + BeanUtils.copyProperties(sc, target);
  138 + return target;
  139 + }).orElseGet(null);
  140 + }
  141 +
  142 + private CarInfoVO convert(CarInfo source) {
  143 + return java.util.Optional.ofNullable(source).map(sc -> {
  144 + CarInfoVO target = new CarInfoVO();
  145 + BeanUtils.copyProperties(source, target);
  146 + return target;
  147 + }).orElseGet(null);
  148 + }
  149 +
  150 + private List<CarInfoVO> convert(List<CarInfo> sources) {
  151 + return java.util.Optional.ofNullable(sources).map(scs -> {
  152 + return scs.stream().map(source -> {
  153 + return convert(source);
  154 + }).collect(java.util.stream.Collectors.toList());
  155 + }).orElseGet(null);
  156 + }
  157 +
  158 + private IPage<CarInfoVO> convert(IPage<CarInfo> sources) {
  159 + return java.util.Optional.ofNullable(sources).map(scs -> {
  160 + IPage<CarInfoVO> target = new Page();
  161 + BeanUtils.copyProperties(scs, target);
  162 + List<CarInfoVO> voNames = convert(scs.getRecords());
  163 + target.setRecords(voNames);
  164 +
  165 + return target;
  166 + }).orElseGet(null);
  167 + }
  168 +}
0 169 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/keyinfo/KeyInfoController.java
1 1 package com.ruoyi.controller.keyinfo;
2 2  
  3 +import com.ruoyi.common.core.domain.AjaxResult;
  4 +import com.ruoyi.domain.OrderEntity;
3 5 import com.ruoyi.domain.keyInfo.KeyInfo;
4 6 import com.ruoyi.domain.keyInfo.dto.KeyInfoAddDTO;
5 7 import com.ruoyi.domain.keyInfo.dto.KeyInfoQueryDTO;
6 8 import com.ruoyi.domain.keyInfo.dto.KeyInfoUpdateDTO;
7 9 import com.ruoyi.domain.keyInfo.dto.KeyInfoUpdateStatusDTO;
8 10 import com.ruoyi.domain.keyInfo.vo.KeyInfoVO;
  11 +import com.ruoyi.equipment.domain.Equipment;
  12 +import com.ruoyi.equipment.service.IEquipmentService;
  13 +import com.ruoyi.service.carinfo.CarInfoService;
  14 +import io.swagger.annotations.ApiOperation;
  15 +import jdk.nashorn.internal.runtime.options.Option;
  16 +import org.apache.commons.collections4.CollectionUtils;
9 17 import org.springframework.beans.factory.annotation.Autowired;
10 18 import org.springframework.web.bind.annotation.RestController;
11 19 import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -14,7 +22,8 @@ import org.springframework.beans.BeanUtils;
14 22  
15 23 import org.springframework.security.access.prepost.PreAuthorize;
16 24  
17   -import java.util.List;
  25 +import java.util.*;
  26 +import java.util.stream.Collectors;
18 27  
19 28  
20 29 import com.baomidou.mybatisplus.core.metadata.IPage;
... ... @@ -32,16 +41,41 @@ import javax.servlet.http.HttpServletResponse;
32 41 public class KeyInfoController {
33 42 @Autowired
34 43 private com.ruoyi.service.keyinfo.KeyInfoService KeyInfoService;
  44 + @Autowired
  45 + private IEquipmentService equipmentService;
35 46  
36 47 @PreAuthorize("@ss.hasPermi('key:info:list:limit:page:limit')")
37 48 @PostMapping(value = "/list/limit/{page}/{pageLimit}")
38   - public String listLimit(@ModelAttribute KeyInfoQueryDTO request, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) {
  49 + public String listLimit(@ModelAttribute KeyInfoQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) {
  50 + request.clearStrEmpty();
39 51 KeyInfo entity = convert(request);
40   - IPage<KeyInfo> response = KeyInfoService.pageList(new Page<KeyInfo>(page, pageLimit), entity);
  52 + IPage<KeyInfo> response = KeyInfoService.pageList(new Page<KeyInfo>(page, pageLimit), entity,orderEntity);
  53 + if (CollectionUtils.isNotEmpty(response.getRecords())) {
  54 + Set<Integer> deviceIds = response.getRecords().stream().map(KeyInfo::getDeviceId).collect(Collectors.toSet());
  55 + List<Equipment> equipmentList = equipmentService.listNameAndIDByIds(deviceIds);
  56 + if (CollectionUtils.isNotEmpty(equipmentList)) {
  57 + List<KeyInfo> keyInfos = response.getRecords().stream().map(obj -> {
  58 + Optional<Equipment> option = equipmentList.stream().filter(equ -> Objects.equals(equ.getId().intValue(), obj.getDeviceId().intValue())).findFirst();
  59 + if (option.isPresent()) {
  60 + obj.setDeviceLabel(option.get().getSiteName());
  61 + }
  62 + return obj;
  63 + }).collect(Collectors.toList());
  64 + response.setRecords(keyInfos);
  65 + }
  66 + }
41 67  
42 68 return JSON.toJSONString(convert(response));
43 69 }
44 70  
  71 + @PostMapping(value = "list/select")
  72 + @ApiOperation("设备列表(页面选择)")
  73 + public AjaxResult listSelect(@RequestBody KeyInfoQueryDTO dto) {
  74 + dto.clearStrEmpty();
  75 + KeyInfo entity = convert(dto);
  76 + List<KeyInfo> selectList = KeyInfoService.listOfSelect(entity);
  77 + return AjaxResult.success(selectList);
  78 + }
45 79  
46 80 @GetMapping(value = "/view/{id}")
47 81 public com.ruoyi.common.core.domain.AjaxResult view(@PathVariable("id") Integer id, org.springframework.ui.Model model) {
... ... @@ -50,9 +84,11 @@ public class KeyInfoController {
50 84 return com.ruoyi.common.core.domain.AjaxResult.success(source);
51 85 }
52 86  
53   - @PreAuthorize("@ss.hasPermi('key:info:add')")
  87 + @PreAuthorize("@ss.hasPermi('key:info:export')")
54 88 @PostMapping("/export")
55   - public void export(HttpServletResponse response, KeyInfo entity) {
  89 + public void export(HttpServletResponse response, KeyInfoQueryDTO dto) {
  90 + dto.clearStrEmpty();
  91 + KeyInfo entity = convert(dto);
56 92 List<KeyInfo> list = KeyInfoService.list(entity);
57 93 ExcelUtil<KeyInfo> util = new ExcelUtil<KeyInfo>(KeyInfo.class);
58 94 util.exportExcel(response, list, "KeyInfo");
... ... @@ -61,6 +97,7 @@ public class KeyInfoController {
61 97 @PreAuthorize("@ss.hasPermi('key:info:add')")
62 98 @PostMapping(value = "/add")
63 99 public com.ruoyi.common.core.domain.AjaxResult add(@ModelAttribute KeyInfoAddDTO request) {
  100 + request.clearStrEmpty();
64 101 KeyInfo entity = convert(request);
65 102 int count = KeyInfoService.insertSelective(entity);
66 103 return count > 0 ? com.ruoyi.common.core.domain.AjaxResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.AjaxResult.error("添加数据失败,请稍后再试");
... ... @@ -69,6 +106,7 @@ public class KeyInfoController {
69 106 @PreAuthorize("@ss.hasPermi('key:info:update')")
70 107 @PostMapping(value = "/update")
71 108 public com.ruoyi.common.core.domain.AjaxResult update(@ModelAttribute KeyInfoUpdateDTO request) {
  109 + request.clearStrEmpty();
72 110 KeyInfo entity = convert(request);
73 111 boolean flag = KeyInfoService.updateByPrimaryKey(entity);
74 112 return flag ? com.ruoyi.common.core.domain.AjaxResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.AjaxResult.error("修改数据失败,请稍后再试");
... ... @@ -77,6 +115,7 @@ public class KeyInfoController {
77 115 @PreAuthorize("@ss.hasPermi('key:info:update:status')")
78 116 @PostMapping(value = "/update/status")
79 117 public com.ruoyi.common.core.domain.AjaxResult updateState(@ModelAttribute KeyInfoUpdateStatusDTO request) {
  118 + request.clearStrEmpty();
80 119 KeyInfo entity = convert(request);
81 120 boolean flag = KeyInfoService.updateByPrimaryKey(entity);
82 121 return flag ? com.ruoyi.common.core.domain.AjaxResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.AjaxResult.error("修改数据失败,请稍后再试");
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/OrderEntity.java 0 → 100644
  1 +package com.ruoyi.domain;
  2 +
  3 +import lombok.Data;
  4 +
  5 +/**
  6 + * @author liujun
  7 + * @date 2024年06月24日 15:43
  8 + */
  9 +@Data
  10 +public class OrderEntity implements java.io.Serializable{
  11 +
  12 + private static final long serialVersionUID = 1651721918915555571L;
  13 +
  14 + private String order;
  15 + private String prop;
  16 +}
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/caiinfo/CarInfo.java 0 → 100644
  1 +package com.ruoyi.domain.caiinfo;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.*;
  4 +import lombok.Data;
  5 +import org.apache.commons.lang3.StringUtils;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.experimental.Accessors;
  8 +import lombok.extern.slf4j.Slf4j;
  9 +import com.ruoyi.common.annotation.Excel;
  10 +
  11 +import java.util.Arrays;
  12 +import java.util.Objects;
  13 +import java.util.Optional;
  14 +
  15 +@Data
  16 +@Slf4j
  17 +@Accessors(chain = true)
  18 +@EqualsAndHashCode(callSuper = false)
  19 +@TableName("car_info")
  20 +public class CarInfo {
  21 + /***ID*/
  22 + @TableId(value = "id", type = IdType.AUTO)
  23 + @Excel(name = "ID")
  24 + private Integer id;
  25 +
  26 +
  27 + /***车牌号*/
  28 + @Excel(name = "车牌号")
  29 + private String plateNum;
  30 +
  31 +
  32 + /***车位号*/
  33 + @Excel(name = "车位号")
  34 + private String parkingNo;
  35 +
  36 +
  37 + /***车辆状态:1为正常车,0为维修车,2为故障车*/
  38 + @Excel(name = "车辆状态:1为正常车,0为维修车,2为故障车")
  39 + private Integer status;
  40 +
  41 +
  42 + /***创建人员*/
  43 + @Excel(name = "创建人员")
  44 + @TableField(fill = FieldFill.INSERT)
  45 + private Long createBy;
  46 +
  47 +
  48 + /***创建时间*/
  49 + @Excel(name = "创建时间")
  50 + @TableField(fill = FieldFill.INSERT)
  51 + private java.util.Date createTime;
  52 +
  53 +
  54 + /***修改人员*/
  55 + @Excel(name = "修改人员")
  56 + @TableField(fill = FieldFill.UPDATE)
  57 + private Long updateBy;
  58 +
  59 +
  60 + /***修改时间*/
  61 + @Excel(name = "修改时间")
  62 + @TableField(fill = FieldFill.UPDATE)
  63 + private java.util.Date updateTime;
  64 +
  65 +
  66 + @Override
  67 + public String toString() {
  68 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  69 + }
  70 +
  71 +
  72 + public static enum CarStatusEnum {
  73 + NORMAL(1,"正常"),
  74 + MAINTENANCE(0,"维修车"),
  75 + FAULT(2,"故障")
  76 +
  77 + ;
  78 + private Integer value;
  79 + private String label;
  80 +
  81 + CarStatusEnum(Integer value, String lagel) {
  82 + this.value = value;
  83 + this.label= lagel;
  84 + }
  85 +
  86 + public Integer getValue() {
  87 + return value;
  88 + }
  89 +
  90 + public String getLabel() {
  91 + return label;
  92 + }
  93 +
  94 + public static CarStatusEnum getObj(Integer val) {
  95 + if (Objects.isNull(val)) {
  96 + return null;
  97 + }
  98 + Optional<CarStatusEnum> optional = Arrays.stream(CarStatusEnum.values()).filter(c -> Objects.equals(val, c.getValue())).findFirst();
  99 + return optional.isPresent() ? optional.get() :null ;
  100 + }
  101 +
  102 + public static String getObjLabel(Integer val) {
  103 + CarStatusEnum statusEnum = getObj(val);
  104 + return Objects.isNull(statusEnum) ? null : statusEnum.getLabel();
  105 + }
  106 + }
  107 +}
0 108 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/caiinfo/dto/CarInfoAddDTO.java 0 → 100644
  1 +package com.ruoyi.domain.caiinfo.dto;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.experimental.Accessors;
  8 +
  9 +@Data
  10 +@ApiModel
  11 +@Accessors(chain = true)
  12 +@EqualsAndHashCode(callSuper = false)
  13 +public class CarInfoAddDTO implements java.io.Serializable {
  14 + private static final long serialVersionUID = 299304572L;
  15 +
  16 + /***ID*/
  17 + @ApiModelProperty(value = "ID", example = "1")
  18 + private Integer id;
  19 + /***车牌号*/
  20 + @ApiModelProperty(value = "车牌号")
  21 + private String plateNum;
  22 + /***车位号*/
  23 + @ApiModelProperty(value = "车位号")
  24 + private String parkingNo;
  25 + /***车辆状态:1为正常车,0为维修车,2为故障车*/
  26 + @ApiModelProperty(value = "车辆状态:1为正常车,0为维修车,2为故障车", example = "1")
  27 + private Integer status;
  28 + /***创建人员*/
  29 + @ApiModelProperty(value = "创建人员")
  30 + private String createBy;
  31 + /***创建时间*/
  32 + @ApiModelProperty(value = "创建时间")
  33 + private java.util.Date createTime;
  34 + /***修改人员*/
  35 + @ApiModelProperty(value = "修改人员")
  36 + private String updateBy;
  37 + /***修改时间*/
  38 + @ApiModelProperty(value = "修改时间")
  39 + private java.util.Date updateTime;
  40 + /***操作人员*/
  41 + @ApiModelProperty(value = "操作人员")
  42 + private String operator;
  43 +
  44 + @Override
  45 + public String toString() {
  46 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  47 + }
  48 +}
0 49 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/caiinfo/dto/CarInfoQueryDTO.java 0 → 100644
  1 +package com.ruoyi.domain.caiinfo.dto;
  2 +
  3 +import com.ruoyi.domain.OrderEntity;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Data;
  7 +import lombok.EqualsAndHashCode;
  8 +import lombok.experimental.Accessors;
  9 +
  10 +@Data
  11 +@ApiModel
  12 +@Accessors(chain = true)
  13 +@EqualsAndHashCode(callSuper = false)
  14 +public class CarInfoQueryDTO implements java.io.Serializable {
  15 + private static final long serialVersionUID = 329829081L;
  16 +
  17 + /***ID*/
  18 + @ApiModelProperty(value = "ID", example = "1")
  19 + private Integer id;
  20 + /***车牌号*/
  21 + @ApiModelProperty(value = "车牌号")
  22 + private String plateNum;
  23 + /***车位号*/
  24 + @ApiModelProperty(value = "车位号")
  25 + private String parkingNo;
  26 + /***车辆状态:1为正常车,0为维修车,2为故障车*/
  27 + @ApiModelProperty(value = "车辆状态:1为正常车,0为维修车,2为故障车", example = "1")
  28 + private Integer status;
  29 + /***创建人员*/
  30 + @ApiModelProperty(value = "创建人员")
  31 + private String createBy;
  32 + /***创建时间*/
  33 + @ApiModelProperty(value = "创建时间")
  34 + private java.util.Date createTime;
  35 + /***修改人员*/
  36 + @ApiModelProperty(value = "修改人员")
  37 + private String updateBy;
  38 + /***修改时间*/
  39 + @ApiModelProperty(value = "修改时间")
  40 + private java.util.Date updateTime;
  41 +
  42 +
  43 + @Override
  44 + public String toString() {
  45 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  46 + }
  47 +}
0 48 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/caiinfo/dto/CarInfoUpdateDTO.java 0 → 100644
  1 +package com.ruoyi.domain.caiinfo.dto;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.experimental.Accessors;
  8 +
  9 +@Data
  10 +@ApiModel
  11 +@Accessors(chain = true)
  12 +@EqualsAndHashCode(callSuper = false)
  13 +public class CarInfoUpdateDTO implements java.io.Serializable {
  14 + private static final long serialVersionUID = 124971443L;
  15 +
  16 + /***ID*/
  17 + @ApiModelProperty(value = "ID", example = "1")
  18 + private Integer id;
  19 + /***车牌号*/
  20 + @ApiModelProperty(value = "车牌号")
  21 + private String plateNum;
  22 + /***车位号*/
  23 + @ApiModelProperty(value = "车位号")
  24 + private String parkingNo;
  25 + /***车辆状态:1为正常车,0为维修车,2为故障车*/
  26 + @ApiModelProperty(value = "车辆状态:1为正常车,0为维修车,2为故障车", example = "1")
  27 + private Integer status;
  28 + /***创建人员*/
  29 + @ApiModelProperty(value = "创建人员")
  30 + private String createBy;
  31 + /***创建时间*/
  32 + @ApiModelProperty(value = "创建时间")
  33 + private java.util.Date createTime;
  34 + /***修改人员*/
  35 + @ApiModelProperty(value = "修改人员")
  36 + private String updateBy;
  37 + /***修改时间*/
  38 + @ApiModelProperty(value = "修改时间")
  39 + private java.util.Date updateTime;
  40 + /***操作人员*/
  41 + @ApiModelProperty(value = "操作人员")
  42 + private String operator;
  43 +
  44 + @Override
  45 + public String toString() {
  46 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  47 + }
  48 +}
0 49 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/caiinfo/vo/CarInfoVO.java 0 → 100644
  1 +package com.ruoyi.domain.caiinfo.vo;
  2 +
  3 +import com.ruoyi.domain.caiinfo.CarInfo;
  4 +import com.ruoyi.utils.DateUtil;
  5 +import io.swagger.annotations.ApiModel;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +
  8 +import lombok.Data;
  9 +import lombok.EqualsAndHashCode;
  10 +import lombok.experimental.Accessors;
  11 +
  12 +import java.util.Objects;
  13 +
  14 +@Data
  15 +@ApiModel
  16 +@EqualsAndHashCode(callSuper = false)
  17 +public class CarInfoVO implements java.io.Serializable {
  18 + private static final long serialVersionUID = 522735525L;
  19 +
  20 + /***ID*/
  21 + @ApiModelProperty(value = "ID", example = "1")
  22 + private Integer id;
  23 + /***车牌号*/
  24 + @ApiModelProperty(value = "车牌号")
  25 + private String plateNum;
  26 + /***车位号*/
  27 + @ApiModelProperty(value = "车位号")
  28 + private String parkingNo;
  29 + /***车辆状态:1为正常车,0为维修车,2为故障车*/
  30 + @ApiModelProperty(value = "车辆状态:1为正常车,0为维修车,2为故障车", example = "1")
  31 + private Integer status;
  32 + /***创建人员*/
  33 + @ApiModelProperty(value = "创建人员")
  34 + private String createBy;
  35 + /***创建时间*/
  36 + @ApiModelProperty(value = "创建时间")
  37 + private java.util.Date createTime;
  38 + /***修改人员*/
  39 + @ApiModelProperty(value = "修改人员")
  40 + private String updateBy;
  41 + /***修改时间*/
  42 + @ApiModelProperty(value = "修改时间")
  43 + private java.util.Date updateTime;
  44 +
  45 + public String getStatusLabel() {
  46 + return CarInfo.CarStatusEnum.getObjLabel(this.getStatus());
  47 + }
  48 +
  49 + public String getCreateTimeStr() {
  50 + return Objects.isNull(this.getCreateTime()) ? null : DateUtil.YYYY_MM_DD_LINK_HH_MM_SS.format(this.getCreateTime());
  51 + }
  52 +
  53 + public String getUpdateTiimeStr() {
  54 + return Objects.isNull(this.getUpdateTime()) ? null : DateUtil.YYYY_MM_DD_LINK_HH_MM_SS.format(this.getUpdateTime());
  55 + }
  56 +
  57 +
  58 + @Override
  59 + public String toString() {
  60 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  61 + }
  62 +}
0 63 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/KeyInfo.java
1 1 package com.ruoyi.domain.keyInfo;
2 2  
  3 +import com.baomidou.mybatisplus.annotation.*;
3 4 import lombok.Data;
4   -import com.baomidou.mybatisplus.annotation.IdType;
5   -import com.baomidou.mybatisplus.annotation.TableField;
6   -import com.baomidou.mybatisplus.annotation.TableId;
7   -import com.baomidou.mybatisplus.annotation.TableName;
8 5 import org.apache.commons.lang3.StringUtils;
9 6 import lombok.EqualsAndHashCode;
10 7 import lombok.experimental.Accessors;
... ... @@ -40,21 +37,25 @@ public class KeyInfo {
40 37  
41 38 /***创建人员*/
42 39 @Excel(name = "创建人员")
  40 + @TableField(fill= FieldFill.INSERT)
43 41 private String createBy;
44 42  
45 43  
46 44 /***创建时间*/
47 45 @Excel(name = "创建时间")
  46 + @TableField(fill= FieldFill.INSERT)
48 47 private java.util.Date createTime;
49 48  
50 49  
51 50 /***修改人员*/
52 51 @Excel(name = "修改人员")
  52 + @TableField(fill= FieldFill.UPDATE)
53 53 private String updateby;
54 54  
55 55  
56 56 /***修改时间*/
57 57 @Excel(name = "修改时间")
  58 + @TableField(fill= FieldFill.UPDATE)
58 59 private java.util.Date updateTime;
59 60  
60 61  
... ... @@ -64,14 +65,22 @@ public class KeyInfo {
64 65  
65 66  
66 67 /***钥匙锁在的设备ID*/
67   - @Excel(name = "钥匙锁在的设备ID")
  68 +
68 69 private Integer deviceId;
69 70  
  71 + @Excel(name = "钥匙锁在的设备ID")
  72 + @TableField(exist = false)
  73 + private String deviceLabel;
  74 +
70 75  
71 76 /***钥匙所在的位置*/
72 77 @Excel(name = "钥匙所在的位置")
73 78 private Integer cabinetno;
74 79  
  80 + /***车牌号*/
  81 + @Excel(name = "车牌号")
  82 + private java.lang.String plateNum;
  83 +
75 84  
76 85 @Override
77 86 public String toString() {
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/dto/KeyInfoAddDTO.java
... ... @@ -50,6 +50,22 @@ public class KeyInfoAddDTO implements java.io.Serializable {
50 50 @ApiModelProperty(value = "操作人员")
51 51 private String operator;
52 52  
  53 + /***车牌号*/
  54 + @ApiModelProperty(value = "车牌号")
  55 + private java.lang.String plateNum;
  56 +
  57 + public void clearStrEmpty() {
  58 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.name)) {
  59 + this.name = null;
  60 + }
  61 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.plateNum)) {
  62 + this.plateNum = null;
  63 + }
  64 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) {
  65 + this.operator = null;
  66 + }
  67 + }
  68 +
53 69 @Override
54 70 public String toString() {
55 71 return com.alibaba.fastjson2.JSON.toJSONString(this);
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/dto/KeyInfoQueryDTO.java
1 1 package com.ruoyi.domain.keyInfo.dto;
2 2  
  3 +import com.ruoyi.domain.OrderEntity;
3 4 import io.swagger.annotations.ApiModel;
4 5 import io.swagger.annotations.ApiModelProperty;
5 6 import lombok.Data;
... ... @@ -10,7 +11,7 @@ import lombok.experimental.Accessors;
10 11 @ApiModel
11 12 @Accessors(chain = true)
12 13 @EqualsAndHashCode(callSuper = false)
13   -public class KeyInfoQueryDTO implements java.io.Serializable {
  14 +public class KeyInfoQueryDTO implements java.io.Serializable {
14 15 private static final long serialVersionUID = 397900919L;
15 16  
16 17 /***ID*/
... ... @@ -47,6 +48,19 @@ public class KeyInfoQueryDTO implements java.io.Serializable {
47 48 @ApiModelProperty(value = "钥匙所在的位置", example = "1")
48 49 private Integer cabinetno;
49 50  
  51 + /***车牌号*/
  52 + @ApiModelProperty(value = "车牌号")
  53 + private java.lang.String plateNum;
  54 +
  55 + public void clearStrEmpty() {
  56 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.name)) {
  57 + this.name = null;
  58 + }
  59 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.plateNum)) {
  60 + this.plateNum = null;
  61 + }
  62 + }
  63 +
50 64 @Override
51 65 public String toString() {
52 66 return com.alibaba.fastjson2.JSON.toJSONString(this);
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/dto/KeyInfoUpdateDTO.java
... ... @@ -50,6 +50,22 @@ public class KeyInfoUpdateDTO implements java.io.Serializable {
50 50 @ApiModelProperty(value = "操作人员")
51 51 private String operator;
52 52  
  53 + /***车牌号*/
  54 + @ApiModelProperty(value="车牌号")
  55 + private java.lang.String plateNum;
  56 +
  57 + public void clearStrEmpty(){
  58 + if(org.apache.commons.lang3.StringUtils.isEmpty(this.name)){
  59 + this.name = null;
  60 + }
  61 + if(org.apache.commons.lang3.StringUtils.isEmpty(this.plateNum)){
  62 + this.plateNum = null;
  63 + }
  64 + if(org.apache.commons.lang3.StringUtils.isEmpty(this.operator)){
  65 + this.operator = null;
  66 + }
  67 + }
  68 +
53 69 @Override
54 70 public String toString() {
55 71 return com.alibaba.fastjson2.JSON.toJSONString(this);
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/dto/KeyInfoUpdateStatusDTO.java
... ... @@ -50,6 +50,22 @@ public class KeyInfoUpdateStatusDTO implements java.io.Serializable {
50 50 @ApiModelProperty(value = "操作人员")
51 51 private String operator;
52 52  
  53 + /***车牌号*/
  54 + @ApiModelProperty(value = "车牌号")
  55 + private java.lang.String plateNum;
  56 +
  57 + public void clearStrEmpty() {
  58 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.name)) {
  59 + this.name = null;
  60 + }
  61 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.plateNum)) {
  62 + this.plateNum = null;
  63 + }
  64 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) {
  65 + this.operator = null;
  66 + }
  67 + }
  68 +
53 69 @Override
54 70 public String toString() {
55 71 return com.alibaba.fastjson2.JSON.toJSONString(this);
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/vo/KeyInfoVO.java
... ... @@ -44,10 +44,16 @@ public class KeyInfoVO implements java.io.Serializable {
44 44 /***钥匙锁在的设备ID*/
45 45 @ApiModelProperty(value = "钥匙锁在的设备ID", example = "1")
46 46 private Integer deviceId;
  47 +
  48 + private String deviceLabel;
47 49 /***钥匙所在的位置*/
48 50 @ApiModelProperty(value = "钥匙所在的位置", example = "1")
49 51 private Integer cabinetno;
50 52  
  53 + /***车牌号*/
  54 + @ApiModelProperty(value = "车牌号")
  55 + private java.lang.String plateNum;
  56 +
51 57  
52 58 @Override
53 59 public String toString() {
... ...
Bsth-admin/src/main/java/com/ruoyi/equipment/mapper/EquipmentMapper.java
... ... @@ -74,6 +74,8 @@ public interface EquipmentMapper extends BaseMapper&lt;Equipment&gt;
74 74  
75 75 Equipment queryEquipmentByDeviceId(@Param("deviceId") String deviceId);
76 76  
  77 + List<Equipment> queryIdsiteNameBypromise(@Param("promise")String promise);
  78 +
77 79 void updateEquipments(@Param("list")List<Equipment> list);
78 80  
79 81 void updateEquipmentByDeviceId(Equipment equipment);
... ... @@ -84,5 +86,7 @@ public interface EquipmentMapper extends BaseMapper&lt;Equipment&gt;
84 86  
85 87 void updateEquipmentLog(@Param("recoveryList") List<EquipmentLog> recoveryList);
86 88  
  89 +
  90 +
87 91 List<EquipmentLog> queryLog(EquipmentLog log);
88 92 }
... ...
Bsth-admin/src/main/java/com/ruoyi/equipment/service/IEquipmentService.java
1 1 package com.ruoyi.equipment.service;
2 2  
  3 +import java.util.Collection;
3 4 import java.util.List;
4 5  
5 6 import com.baomidou.mybatisplus.extension.service.IService;
... ... @@ -32,6 +33,15 @@ public interface IEquipmentService extends IService&lt;Equipment&gt;
32 33 */
33 34 List<Equipment> listOfSelect(Equipment equipment);
34 35  
  36 + /***
  37 + *根据设备ID查询设备名称和ID
  38 + * @author liujun
  39 + * @date 2024/6/21 20:51
  40 + * @param ids
  41 + * @return java.util.List<com.ruoyi.equipment.domain.Equipment>
  42 + */
  43 + List<Equipment> listNameAndIDByIds(Collection<Integer> ids);
  44 +
35 45 /**
36 46 * 查询设备信息列表
37 47 *
... ...
Bsth-admin/src/main/java/com/ruoyi/equipment/service/impl/EquipmentServiceImpl.java
1 1 package com.ruoyi.equipment.service.impl;
2 2  
  3 +import java.util.Collection;
  4 +import java.util.Collections;
3 5 import java.util.List;
4 6 import java.util.Objects;
5 7 import java.util.stream.Collectors;
... ... @@ -19,6 +21,7 @@ import org.springframework.stereotype.Service;
19 21 import com.ruoyi.equipment.mapper.EquipmentMapper;
20 22 import com.ruoyi.equipment.domain.Equipment;
21 23 import com.ruoyi.equipment.service.IEquipmentService;
  24 +import org.springframework.util.CollectionUtils;
22 25 import org.springframework.web.bind.annotation.ModelAttribute;
23 26  
24 27 import javax.annotation.Resource;
... ... @@ -49,12 +52,19 @@ public class EquipmentServiceImpl extends ServiceImpl&lt;EquipmentMapper, Equipment
49 52 }
50 53  
51 54 @Override
52   - public List<Equipment> listOfSelect(@ModelAttribute Equipment equipment) {
  55 + public List<Equipment> listOfSelect(Equipment equipment) {
  56 +
  57 + return equipmentMapper.queryIdsiteNameBypromise(equipment.getPromise());
  58 + }
  59 +
  60 + @Override
  61 + public List<Equipment> listNameAndIDByIds(Collection<Integer> ids) {
  62 + if (CollectionUtils.isEmpty(ids)) {
  63 + return Collections.emptyList();
  64 + }
53 65 LambdaQueryWrapper<Equipment> wrapper = new LambdaQueryWrapper<>();
  66 + wrapper.in(Equipment::getId, ids);
54 67 wrapper.select(Equipment::getId, Equipment::getSiteName);
55   - if(StringUtils.isNotEmpty(equipment.getPromise())){
56   - wrapper.eq(Equipment::getPromise,equipment.getPromise());
57   - }
58 68 return list(wrapper);
59 69 }
60 70  
... ...
Bsth-admin/src/main/java/com/ruoyi/mapper/carinfo/CarInfoMapper.java 0 → 100644
  1 +package com.ruoyi.mapper.carinfo;
  2 +
  3 +import com.ruoyi.domain.caiinfo.CarInfo;
  4 +import org.apache.ibatis.annotations.Mapper;
  5 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  6 +
  7 +
  8 +@Mapper
  9 +public interface CarInfoMapper extends BaseMapper<CarInfo> {
  10 + /**插入有值的列 */
  11 + int insertSelective(CarInfo name);
  12 +}
0 13 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/carinfo/CarInfoService.java 0 → 100644
  1 +package com.ruoyi.service.carinfo;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.baomidou.mybatisplus.core.metadata.IPage;
  5 +import com.ruoyi.domain.OrderEntity;
  6 +import com.ruoyi.domain.caiinfo.CarInfo;
  7 +
  8 +import java.util.Collection;
  9 +import java.util.List;
  10 +
  11 +
  12 +public interface CarInfoService extends IService<CarInfo> {
  13 + /**
  14 + * 分页查询
  15 + */
  16 + IPage<CarInfo> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<CarInfo> page, CarInfo entity, OrderEntity orderEntity);
  17 +
  18 + /**
  19 + * 带条件查询
  20 + */
  21 + List<CarInfo> list(CarInfo entity);
  22 +
  23 + /***
  24 + *用于页面选择
  25 + */
  26 + List<CarInfo> listOfSelect(CarInfo entity);
  27 +
  28 + List<CarInfo> listOfIds(Collection<Integer> ids);
  29 +
  30 + /**
  31 + * 条件查询只返回一条数据的方法
  32 + */
  33 + CarInfo getOne(CarInfo entity);
  34 +
  35 + Integer countId(CarInfo entity);
  36 +
  37 + /**
  38 + * 插入有值的列
  39 + */
  40 + int insertSelective(CarInfo entity);
  41 +
  42 + /***插入数据*/
  43 + boolean insert(CarInfo entity);
  44 +
  45 + /**
  46 + * 根据主键修改数据
  47 + */
  48 + boolean updateByPrimaryKey(CarInfo entity);
  49 +
  50 + boolean deleteById(Integer id);
  51 +}
0 52 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/carinfo/CarInfoServiceImpl.java 0 → 100644
  1 +package com.ruoyi.service.impl.carinfo;
  2 +
  3 +import com.ruoyi.domain.OrderEntity;
  4 +import com.ruoyi.domain.caiinfo.CarInfo;
  5 +import com.ruoyi.equipment.domain.Equipment;
  6 +import com.ruoyi.service.carinfo.CarInfoService;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  10 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  11 +import com.baomidou.mybatisplus.core.metadata.IPage;
  12 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  13 +
  14 +import com.github.pagehelper.PageHelper;
  15 +
  16 +import javax.servlet.http.HttpServletResponse;
  17 +
  18 +import java.util.Collection;
  19 +import java.util.Collections;
  20 +import java.util.List;
  21 +
  22 +import com.ruoyi.domain.caiinfo.CarInfo;
  23 +import com.ruoyi.mapper.carinfo.CarInfoMapper;
  24 +import com.ruoyi.service.carinfo.CarInfoService;
  25 +import org.springframework.util.CollectionUtils;
  26 +
  27 +@Service
  28 +public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> implements CarInfoService {
  29 + @Autowired
  30 + private CarInfoMapper CarInfoMapper;
  31 +
  32 + /**
  33 + * 分页查询
  34 + */
  35 + @Override
  36 + public IPage<CarInfo> pageList(Page<CarInfo> page, CarInfo entity, OrderEntity orderEntity) {
  37 + LambdaQueryWrapper<CarInfo> countWrapper = new LambdaQueryWrapper<>(entity);
  38 + countWrapper.select(CarInfo::getId);
  39 + int count = count(countWrapper);
  40 +
  41 + List<CarInfo> lists = Collections.emptyList();
  42 + if (count > 0) {
  43 + PageHelper.startPage((int) page.getCurrent(), (int) page.getSize(), false);
  44 + LambdaQueryWrapper<CarInfo> selectWrapper = new LambdaQueryWrapper<>(entity);
  45 + orderColumn(selectWrapper, orderEntity);
  46 + lists = list(selectWrapper);
  47 + }
  48 +
  49 + IPage<CarInfo> returnPage = new Page<CarInfo>();
  50 + returnPage.setRecords(lists);
  51 + returnPage.setPages(count % page.getSize() == 0 ? count / page.getSize() : count / page.getSize() + 1);
  52 + returnPage.setCurrent(page.getCurrent());
  53 + returnPage.setSize(page.getSize());
  54 + returnPage.setTotal(count);
  55 +
  56 + return returnPage;
  57 + }
  58 +
  59 + @Override
  60 + public List<CarInfo> list(CarInfo entity) {
  61 + return list(new LambdaQueryWrapper<>(entity));
  62 + }
  63 +
  64 + @Override
  65 + public List<CarInfo> listOfSelect(CarInfo entity) {
  66 + LambdaQueryWrapper<CarInfo> wrapper = new LambdaQueryWrapper<>(entity);
  67 + wrapper.select(CarInfo::getId, CarInfo::getPlateNum);
  68 + return list(wrapper);
  69 + }
  70 +
  71 + @Override
  72 + public List<CarInfo> listOfIds(Collection<Integer> ids) {
  73 + if (CollectionUtils.isEmpty(ids)) {
  74 + return Collections.emptyList();
  75 + }
  76 + LambdaQueryWrapper<CarInfo> wrapper = new LambdaQueryWrapper<>();
  77 + wrapper.select(CarInfo::getId, CarInfo::getPlateNum);
  78 + wrapper.in(CarInfo::getId, ids);
  79 + return list(wrapper);
  80 + }
  81 +
  82 + @Override
  83 + public CarInfo getOne(CarInfo entity) {
  84 + return getOne(new LambdaQueryWrapper<>(entity));
  85 + }
  86 +
  87 + @Override
  88 + public Integer countId(CarInfo entity) {
  89 + LambdaQueryWrapper<CarInfo> wrapper = new LambdaQueryWrapper<>(entity);
  90 + wrapper.select(CarInfo::getId);
  91 + return count(wrapper);
  92 + }
  93 +
  94 +
  95 + /**
  96 + * 插入有值的列
  97 + */
  98 + @Override
  99 + public int insertSelective(CarInfo entity) {
  100 + return CarInfoMapper.insertSelective(entity);
  101 + }
  102 +
  103 + /**
  104 + * 插入数据
  105 + */
  106 + @Override
  107 + public boolean insert(CarInfo entity) {
  108 + return save(entity);
  109 + }
  110 +
  111 + /**
  112 + * 根据主键修改数据
  113 + */
  114 + @Override
  115 + public boolean updateByPrimaryKey(CarInfo entity) {
  116 + return updateById(entity);
  117 + }
  118 +
  119 + /***根据主键删除数据*/
  120 + @Override
  121 + public boolean deleteById(Integer id) {
  122 + return removeById(id);
  123 + }
  124 +
  125 + public static void orderColumn(LambdaQueryWrapper<CarInfo> wrapper, com.ruoyi.domain.OrderEntity orderEntity) {
  126 + if (org.apache.commons.lang3.StringUtils.equals("ascending", orderEntity.getOrder())) {
  127 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) {
  128 + wrapper.orderByAsc(CarInfo::getId);
  129 + }
  130 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "plateNum")) {
  131 + wrapper.orderByAsc(CarInfo::getPlateNum);
  132 + }
  133 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "parkingNo")) {
  134 + wrapper.orderByAsc(CarInfo::getParkingNo);
  135 + }
  136 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "status")) {
  137 + wrapper.orderByAsc(CarInfo::getStatus);
  138 + }
  139 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createBy")) {
  140 + wrapper.orderByAsc(CarInfo::getCreateBy);
  141 + }
  142 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) {
  143 + wrapper.orderByAsc(CarInfo::getCreateTime);
  144 + }
  145 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateBy")) {
  146 + wrapper.orderByAsc(CarInfo::getUpdateBy);
  147 + }
  148 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) {
  149 + wrapper.orderByAsc(CarInfo::getUpdateTime);
  150 + }
  151 + } else if (org.apache.commons.lang3.StringUtils.equals("descending", orderEntity.getOrder())) {
  152 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) {
  153 + wrapper.orderByDesc(CarInfo::getId);
  154 + }
  155 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "plateNum")) {
  156 + wrapper.orderByDesc(CarInfo::getPlateNum);
  157 + }
  158 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "parkingNo")) {
  159 + wrapper.orderByDesc(CarInfo::getParkingNo);
  160 + }
  161 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "status")) {
  162 + wrapper.orderByDesc(CarInfo::getStatus);
  163 + }
  164 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createBy")) {
  165 + wrapper.orderByDesc(CarInfo::getCreateBy);
  166 + }
  167 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) {
  168 + wrapper.orderByDesc(CarInfo::getCreateTime);
  169 + }
  170 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateBy")) {
  171 + wrapper.orderByDesc(CarInfo::getUpdateBy);
  172 + }
  173 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) {
  174 + wrapper.orderByDesc(CarInfo::getUpdateTime);
  175 + }
  176 + }
  177 + }
  178 +}
0 179 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/keyinfo/KeyInfoServiceImpl.java
1 1 package com.ruoyi.service.impl.keyinfo;
2 2  
  3 +import com.ruoyi.domain.OrderEntity;
3 4 import com.ruoyi.domain.keyInfo.KeyInfo;
4 5 import com.ruoyi.service.keyinfo.KeyInfoService;
  6 +import org.apache.commons.lang3.StringUtils;
5 7 import org.springframework.beans.factory.annotation.Autowired;
6 8 import org.springframework.stereotype.Service;
7 9 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
... ... @@ -27,7 +29,7 @@ public class KeyInfoServiceImpl extends ServiceImpl&lt;com.ruoyi.mapper.keyinfo.Key
27 29 * 分页查询
28 30 */
29 31 @Override
30   - public IPage<KeyInfo> pageList(Page<KeyInfo> page, KeyInfo entity) {
  32 + public IPage<KeyInfo> pageList(Page<KeyInfo> page, KeyInfo entity, OrderEntity orderEntity) {
31 33 LambdaQueryWrapper<KeyInfo> countWrapper = new LambdaQueryWrapper<>(entity);
32 34 countWrapper.select(KeyInfo::getId);
33 35 int count = count(countWrapper);
... ... @@ -36,6 +38,7 @@ public class KeyInfoServiceImpl extends ServiceImpl&lt;com.ruoyi.mapper.keyinfo.Key
36 38 if (count > 0) {
37 39 PageHelper.startPage((int) page.getCurrent(), (int) page.getSize(), false);
38 40 LambdaQueryWrapper<KeyInfo> selectWrapper = new LambdaQueryWrapper<>(entity);
  41 + orderColumn(selectWrapper, orderEntity);
39 42 lists = list(selectWrapper);
40 43 }
41 44  
... ... @@ -56,6 +59,13 @@ public class KeyInfoServiceImpl extends ServiceImpl&lt;com.ruoyi.mapper.keyinfo.Key
56 59 }
57 60  
58 61 @Override
  62 + public List<KeyInfo> listOfSelect(KeyInfo entity) {
  63 + LambdaQueryWrapper<KeyInfo> wrapper = new LambdaQueryWrapper<>(entity);
  64 + wrapper.select(KeyInfo::getId, KeyInfo::getName);
  65 + return list(wrapper);
  66 + }
  67 +
  68 + @Override
59 69 public KeyInfo getOne(KeyInfo entity) {
60 70 return getOne(new LambdaQueryWrapper<>(entity));
61 71 }
... ... @@ -92,4 +102,83 @@ public class KeyInfoServiceImpl extends ServiceImpl&lt;com.ruoyi.mapper.keyinfo.Key
92 102 return updateById(entity);
93 103 }
94 104  
  105 +
  106 + public static void orderColumn(LambdaQueryWrapper<KeyInfo> wrapper, com.ruoyi.domain.OrderEntity orderEntity) {
  107 + if (StringUtils.equals("ascending", orderEntity.getOrder())) {
  108 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) {
  109 + wrapper.orderByAsc(KeyInfo::getId);
  110 + }
  111 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "name")) {
  112 + wrapper.orderByAsc(KeyInfo::getName);
  113 + }
  114 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "status")) {
  115 + wrapper.orderByAsc(KeyInfo::getStatus);
  116 + }
  117 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "delFlag")) {
  118 + wrapper.orderByAsc(KeyInfo::getDelFlag);
  119 + }
  120 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createBy")) {
  121 + wrapper.orderByAsc(KeyInfo::getCreateBy);
  122 + }
  123 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) {
  124 + wrapper.orderByAsc(KeyInfo::getCreateTime);
  125 + }
  126 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateby")) {
  127 + wrapper.orderByAsc(KeyInfo::getUpdateby);
  128 + }
  129 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) {
  130 + wrapper.orderByAsc(KeyInfo::getUpdateTime);
  131 + }
  132 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "yardId")) {
  133 + wrapper.orderByAsc(KeyInfo::getYardId);
  134 + }
  135 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "deviceId")) {
  136 + wrapper.orderByAsc(KeyInfo::getDeviceId);
  137 + }
  138 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "cabinetno")) {
  139 + wrapper.orderByAsc(KeyInfo::getCabinetno);
  140 + }
  141 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "plateNum")) {
  142 + wrapper.orderByAsc(KeyInfo::getPlateNum);
  143 + }
  144 + } else if (StringUtils.equals("descending", orderEntity.getOrder())) {
  145 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) {
  146 + wrapper.orderByDesc(KeyInfo::getId);
  147 + }
  148 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "name")) {
  149 + wrapper.orderByDesc(KeyInfo::getName);
  150 + }
  151 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "status")) {
  152 + wrapper.orderByDesc(KeyInfo::getStatus);
  153 + }
  154 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "delFlag")) {
  155 + wrapper.orderByDesc(KeyInfo::getDelFlag);
  156 + }
  157 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createBy")) {
  158 + wrapper.orderByDesc(KeyInfo::getCreateBy);
  159 + }
  160 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) {
  161 + wrapper.orderByDesc(KeyInfo::getCreateTime);
  162 + }
  163 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateby")) {
  164 + wrapper.orderByDesc(KeyInfo::getUpdateby);
  165 + }
  166 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) {
  167 + wrapper.orderByDesc(KeyInfo::getUpdateTime);
  168 + }
  169 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "yardId")) {
  170 + wrapper.orderByDesc(KeyInfo::getYardId);
  171 + }
  172 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "deviceId")) {
  173 + wrapper.orderByDesc(KeyInfo::getDeviceId);
  174 + }
  175 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "cabinetno")) {
  176 + wrapper.orderByDesc(KeyInfo::getCabinetno);
  177 + }
  178 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "plateNum")) {
  179 + wrapper.orderByDesc(KeyInfo::getPlateNum);
  180 + }
  181 + }
  182 +
  183 + }
95 184 }
96 185 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/keyinfo/KeyInfoService.java
... ... @@ -2,6 +2,7 @@ package com.ruoyi.service.keyinfo;
2 2  
3 3 import com.baomidou.mybatisplus.extension.service.IService;
4 4 import com.baomidou.mybatisplus.core.metadata.IPage;
  5 +import com.ruoyi.domain.OrderEntity;
5 6 import com.ruoyi.domain.keyInfo.KeyInfo;
6 7  
7 8 import java.util.List;
... ... @@ -11,13 +12,18 @@ public interface KeyInfoService extends IService&lt;KeyInfo&gt; {
11 12 /**
12 13 * 分页查询
13 14 */
14   - IPage<KeyInfo> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<KeyInfo> page, KeyInfo entity);
  15 + IPage<KeyInfo> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<KeyInfo> page, KeyInfo entity, OrderEntity orderEntity);
15 16  
16 17 /**
17 18 * 带条件查询
18 19 */
19 20 List<KeyInfo> list(KeyInfo entity);
20 21  
  22 + /***
  23 + *用于页面选择
  24 + */
  25 + List<KeyInfo> listOfSelect(KeyInfo entity);
  26 +
21 27 /**
22 28 * 条件查询只返回一条数据的方法
23 29 */
... ...
Bsth-admin/src/main/java/com/ruoyi/utils/DateUtil.java 0 → 100644
  1 +package com.ruoyi.utils;
  2 +
  3 +import org.apache.commons.lang3.time.FastDateFormat;
  4 +
  5 +/**
  6 + * @author liujun
  7 + * @date 2024年06月24日 11:27
  8 + */
  9 +public class DateUtil {
  10 +
  11 + public static FastDateFormat YYYY_MM_DD_LINK_HH_MM_SS=FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
  12 +}
... ...
Bsth-admin/src/main/resources/mapper/carinfo/CarInfoMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.ruoyi.mapper.carinfo.CarInfoMapper">
  4 + <resultMap id="BaseResultMap" type="com.ruoyi.domain.caiinfo.CarInfo">
  5 + <id column="id" jdbcType="INTEGER" property="id"/>
  6 + <result column="plate_Num" jdbcType="VARCHAR" property="plateNum"/>
  7 + <result column="parking_No" jdbcType="VARCHAR" property="parkingNo"/>
  8 + <result column="status" jdbcType="INTEGER" property="status"/>
  9 + <result column="create_By" jdbcType="INTEGER" property="createBy"/>
  10 + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  11 + <result column="update_by" jdbcType="INTEGER" property="updateBy"/>
  12 + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  13 + </resultMap>
  14 +
  15 + <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
  16 + parameterType="com.ruoyi.domain.caiinfo.CarInfo">
  17 + INSERT INTO car_info
  18 + <include refid="insertSelectiveColumn"></include>
  19 + <include refid="insertSelectiveValue"></include>
  20 + </insert>
  21 +
  22 + <sql id="columns">
  23 + id
  24 + , plate_Num , parking_No , status , create_By , create_time , update_by , update_time
  25 + </sql>
  26 +
  27 + <sql id="insert_columns">
  28 + id
  29 + , plate_Num , parking_No , status , create_By , create_time , update_by , update_time
  30 + </sql>
  31 +
  32 + <sql id="insert_values">
  33 + #{id}
  34 + ,
  35 + #{plateNum},
  36 + #{parkingNo},
  37 + #{status},
  38 + #{createBy},
  39 + #{createTime},
  40 + #{updateBy},
  41 + #{updateTime}
  42 + </sql>
  43 +
  44 + <sql id="insertSelectiveColumn">
  45 + <trim prefix="(" suffix=")" suffixOverrides=",">
  46 + <if test="null!=id">id,</if>
  47 + <if test="null!=plateNum">plate_Num,</if>
  48 + <if test="null!=parkingNo">parking_No,</if>
  49 + <if test="null!=status">status,</if>
  50 + <if test="null!=createBy">create_By,</if>
  51 + <if test="null!=createTime">create_time,</if>
  52 + <if test="null!=updateBy">update_by,</if>
  53 + <if test="null!=updateTime">update_time,</if>
  54 + </trim>
  55 + </sql>
  56 +
  57 + <sql id="insertSelectiveValue">
  58 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  59 + <if test="null!=id">#{id,jdbcType=INTEGER},</if>
  60 + <if test="null!=plateNum">#{plateNum,jdbcType=VARCHAR},</if>
  61 + <if test="null!=parkingNo">#{parkingNo,jdbcType=VARCHAR},</if>
  62 + <if test="null!=status">#{status,jdbcType=INTEGER},</if>
  63 + <if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if>
  64 + <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
  65 + <if test="null!=updateBy">#{updateBy,jdbcType=VARCHAR},</if>
  66 + <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
  67 + </trim>
  68 + </sql>
  69 +
  70 + <sql id="updateByPrimaryKeySelectiveSql">
  71 + <set>
  72 + <if test="null!=id">id = #{id,jdbcType=INTEGER},</if>
  73 + <if test="null!=plateNum">plate_Num = #{plateNum,jdbcType=VARCHAR},</if>
  74 + <if test="null!=parkingNo">parking_No = #{parkingNo,jdbcType=VARCHAR},</if>
  75 + <if test="null!=status">status = #{status,jdbcType=INTEGER},</if>
  76 + <if test="null!=createBy">create_By = #{createBy,jdbcType=VARCHAR},</if>
  77 + <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
  78 + <if test="null!=updateBy">update_by = #{updateBy,jdbcType=VARCHAR},</if>
  79 + <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
  80 + </set>
  81 + </sql>
  82 +
  83 + <sql id="where">
  84 + <if test="null!=id">AND id = #{id,jdbcType=INTEGER},</if>
  85 + <if test="null!=plateNum">AND plate_Num = #{plateNum,jdbcType=VARCHAR},</if>
  86 + <if test="null!=parkingNo">AND parking_No = #{parkingNo,jdbcType=VARCHAR},</if>
  87 + <if test="null!=status">AND status = #{status,jdbcType=INTEGER},</if>
  88 + <if test="null!=createBy">AND create_By = #{createBy,jdbcType=VARCHAR},</if>
  89 + <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if>
  90 + <if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=VARCHAR},</if>
  91 + <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
  92 + </sql>
  93 +</mapper>
0 94 \ No newline at end of file
... ...
Bsth-admin/src/main/resources/mapper/equipment/EquipmentMapper.xml
... ... @@ -76,6 +76,10 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
76 76 where device_id = #{deviceId}
77 77 order by off_line_time desc
78 78 </select>
  79 +
  80 + <select id="queryIdsiteNameBypromise" resultType="com.ruoyi.equipment.domain.Equipment">
  81 + SELECT id,site_name,promise FROM equipment WHERE FIND_IN_SET(#{promise},promise) >0
  82 + </select>
79 83 <insert id="insertEquipment" parameterType="Equipment" useGeneratedKeys="true" keyProperty="id">
80 84 insert into equipment
81 85 <trim prefix="(" suffix=")" suffixOverrides=",">
... ...
Bsth-admin/src/main/resources/mapper/keyInfo/KeyInfoMapper.xml
... ... @@ -6,29 +6,30 @@
6 6 <result column="name" jdbcType="VARCHAR" property="name"/>
7 7 <result column="status" jdbcType="INTEGER" property="status"/>
8 8 <result column="del_flag" jdbcType="BIT" property="delFlag"/>
9   - <result column="create_By" jdbcType="VARCHAR" property="createBy"/>
  9 + <result column="create_By" jdbcType="INTEGER" property="createBy"/>
10 10 <result column="create_Time" jdbcType="TIMESTAMP" property="createTime"/>
11   - <result column="updateBy" jdbcType="VARCHAR" property="updateby"/>
  11 + <result column="updateBy" jdbcType="INTEGER" property="updateby"/>
12 12 <result column="update_Time" jdbcType="TIMESTAMP" property="updateTime"/>
13 13 <result column="yard_Id" jdbcType="INTEGER" property="yardId"/>
14 14 <result column="device_id" jdbcType="INTEGER" property="deviceId"/>
15 15 <result column="cabinetNo" jdbcType="INTEGER" property="cabinetno"/>
  16 + <result column="plate_Num" jdbcType="VARCHAR" property="plateNum"/>
16 17 </resultMap>
17 18  
18 19 <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
19 20 parameterType="com.ruoyi.domain.keyInfo.KeyInfo">
20   - INSERT INTO key_info
21   - <include refid="insertSelectiveColumn"></include>
  21 + INSERT INTO key_info <include refid="insertSelectiveColumn"></include>
22 22 <include refid="insertSelectiveValue"></include>
23 23 </insert>
24 24  
25 25 <sql id="columns">
26 26 id
27   - , name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo
  27 + , name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo , plate_Num
28 28 </sql>
29 29  
30 30 <sql id="insert_columns">
31   - id , name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo
  31 + id
  32 + , name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo , plate_Num
32 33 </sql>
33 34  
34 35 <sql id="insert_values">
... ... @@ -43,7 +44,8 @@
43 44 #{updateTime},
44 45 #{yardId},
45 46 #{deviceId},
46   - #{cabinetno}
  47 + #{cabinetno},
  48 + #{plateNum}
47 49 </sql>
48 50  
49 51 <sql id="insertSelectiveColumn">
... ... @@ -59,6 +61,7 @@
59 61 <if test="null!=yardId">yard_Id,</if>
60 62 <if test="null!=deviceId">device_id,</if>
61 63 <if test="null!=cabinetno">cabinetNo,</if>
  64 + <if test="null!=plateNum">plate_Num,</if>
62 65 </trim>
63 66 </sql>
64 67  
... ... @@ -68,13 +71,14 @@
68 71 <if test="null!=name">#{name,jdbcType=VARCHAR},</if>
69 72 <if test="null!=status">#{status,jdbcType=INTEGER},</if>
70 73 <if test="null!=delFlag">#{delFlag,jdbcType=BIT},</if>
71   - <if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if>
  74 + <if test="null!=createBy">#{createBy,jdbcType=INTEGER},</if>
72 75 <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
73   - <if test="null!=updateby">#{updateby,jdbcType=VARCHAR},</if>
  76 + <if test="null!=updateby">#{updateby,jdbcType=INTEGER},</if>
74 77 <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
75 78 <if test="null!=yardId">#{yardId,jdbcType=INTEGER},</if>
76 79 <if test="null!=deviceId">#{deviceId,jdbcType=INTEGER},</if>
77 80 <if test="null!=cabinetno">#{cabinetno,jdbcType=INTEGER},</if>
  81 + <if test="null!=plateNum">#{plateNum,jdbcType=VARCHAR},</if>
78 82 </trim>
79 83 </sql>
80 84  
... ... @@ -84,13 +88,14 @@
84 88 <if test="null!=name">name = #{name,jdbcType=VARCHAR},</if>
85 89 <if test="null!=status">status = #{status,jdbcType=INTEGER},</if>
86 90 <if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if>
87   - <if test="null!=createBy">create_By = #{createBy,jdbcType=VARCHAR},</if>
  91 + <if test="null!=createBy">create_By = #{createBy,jdbcType=INTEGER},</if>
88 92 <if test="null!=createTime">create_Time = #{createTime,jdbcType=TIMESTAMP},</if>
89   - <if test="null!=updateby">updateBy = #{updateby,jdbcType=VARCHAR},</if>
  93 + <if test="null!=updateby">updateBy = #{updateby,jdbcType=INTEGER},</if>
90 94 <if test="null!=updateTime">update_Time = #{updateTime,jdbcType=TIMESTAMP},</if>
91 95 <if test="null!=yardId">yard_Id = #{yardId,jdbcType=INTEGER},</if>
92 96 <if test="null!=deviceId">device_id = #{deviceId,jdbcType=INTEGER},</if>
93 97 <if test="null!=cabinetno">cabinetNo = #{cabinetno,jdbcType=INTEGER},</if>
  98 + <if test="null!=plateNum">plate_Num = #{plateNum,jdbcType=VARCHAR},</if>
94 99 </set>
95 100 </sql>
96 101  
... ... @@ -99,12 +104,13 @@
99 104 <if test="null!=name">AND name = #{name,jdbcType=VARCHAR},</if>
100 105 <if test="null!=status">AND status = #{status,jdbcType=INTEGER},</if>
101 106 <if test="null!=delFlag">AND del_flag = #{delFlag,jdbcType=BIT},</if>
102   - <if test="null!=createBy">AND create_By = #{createBy,jdbcType=VARCHAR},</if>
  107 + <if test="null!=createBy">AND create_By = #{createBy,jdbcType=INTEGER},</if>
103 108 <if test="null!=createTime">AND create_Time = #{createTime,jdbcType=TIMESTAMP},</if>
104   - <if test="null!=updateby">AND updateBy = #{updateby,jdbcType=VARCHAR},</if>
  109 + <if test="null!=updateby">AND updateBy = #{updateby,jdbcType=INTEGER},</if>
105 110 <if test="null!=updateTime">AND update_Time = #{updateTime,jdbcType=TIMESTAMP},</if>
106 111 <if test="null!=yardId">AND yard_Id = #{yardId,jdbcType=INTEGER},</if>
107 112 <if test="null!=deviceId">AND device_id = #{deviceId,jdbcType=INTEGER},</if>
108 113 <if test="null!=cabinetno">AND cabinetNo = #{cabinetno,jdbcType=INTEGER},</if>
  114 + <if test="null!=plateNum">AND plate_Num = #{plateNum,jdbcType=VARCHAR},</if>
109 115 </sql>
110 116 </mapper>
111 117 \ No newline at end of file
... ...