Commit a8b19eef9092f395dd0cba990cacf8e80681fdbd
1 parent
0b3b7f57
蓝斯对接和前端页面
Showing
17 changed files
with
339 additions
and
183 deletions
Bsth-admin/src/main/java/com/ruoyi/config/FaceEngineConfig.java
| ... | ... | @@ -32,14 +32,14 @@ public class FaceEngineConfig { |
| 32 | 32 | int errorCode = faceEngine.activeOnline(bsthSystemConfig.getFaceAppId(), bsthSystemConfig.getFaceSdkKey()); |
| 33 | 33 | |
| 34 | 34 | if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) { |
| 35 | - throw new InterruptException("引擎激活失败"); | |
| 35 | + throw new InterruptException("引擎激活失败,错误编码:"+errorCode); | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | ActiveFileInfo activeFileInfo = new ActiveFileInfo(); |
| 40 | 40 | errorCode = faceEngine.getActiveFileInfo(activeFileInfo); |
| 41 | 41 | if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) { |
| 42 | - throw new InterruptException("获取激活文件信息失败"); | |
| 42 | + throw new InterruptException("获取激活文件信息失败,错误编码:"+errorCode); | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | //引擎配置 |
| ... | ... | @@ -64,7 +64,7 @@ public class FaceEngineConfig { |
| 64 | 64 | errorCode = faceEngine.init(engineConfiguration); |
| 65 | 65 | |
| 66 | 66 | if (errorCode != ErrorInfo.MOK.getValue()) { |
| 67 | - throw new InterruptException("初始化引擎失败"); | |
| 67 | + throw new InterruptException("初始化引擎失败,错误编码:"+errorCode); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | return faceEngine; | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssDriverController.java
| ... | ... | @@ -274,7 +274,7 @@ public class DssDriverController extends BaseController { |
| 274 | 274 | |
| 275 | 275 | int healThCheck = 0; |
| 276 | 276 | SysDictData dictData = querySystData(newDriver.getPosts(), "healthCheck"); |
| 277 | - if (Objects.nonNull(dictData) && StringUtils.isNotEmpty(dictData.getDictValue())) { | |
| 277 | + if (Objects.nonNull(dictData) && Objects.nonNull(dictData.getDictValue())) { | |
| 278 | 278 | healThCheck = Convert.toInt(dictData.getDictValue()); |
| 279 | 279 | } |
| 280 | 280 | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssEquipmentController.java
| ... | ... | @@ -188,25 +188,25 @@ public class DssEquipmentController extends BaseController { |
| 188 | 188 | EquimentAddressParamVo equimentAddressParamVo = new EquimentAddressParamVo(); |
| 189 | 189 | |
| 190 | 190 | for (SysDictData sysDictData : sysDictDatas) { |
| 191 | - if (Objects.equals(sysDictData.getDictType(), "drinking") && StringUtils.isNotEmpty(sysDictData.getDictValue())) { | |
| 191 | + if (Objects.equals(sysDictData.getDictType(), "drinking") && Objects.nonNull(sysDictData.getDictValue())) { | |
| 192 | 192 | configVo.setDrinking(Convert.toBigDecimal(sysDictData.getDictValue())); |
| 193 | - } else if (Objects.equals(sysDictData.getDictType(), "drunkenness") && StringUtils.isNotEmpty(sysDictData.getDictValue())) { | |
| 193 | + } else if (Objects.equals(sysDictData.getDictType(), "drunkenness") && Objects.nonNull(sysDictData.getDictValue())) { | |
| 194 | 194 | configVo.setDrunkenness(Convert.toBigDecimal(sysDictData.getDictValue())); |
| 195 | - } else if (Objects.equals(sysDictData.getDictType(), "videoParam") && StringUtils.isNotEmpty(sysDictData.getDictValue())) { | |
| 195 | + } else if (Objects.equals(sysDictData.getDictType(), "videoParam") && Objects.nonNull(sysDictData.getDictValue())) { | |
| 196 | 196 | if (StringUtils.equals(sysDictData.getDiscKey(), "upflag")) { |
| 197 | 197 | equimentVideoParamVo.setUpflag(Convert.toInt(sysDictData.getDictValue())); |
| 198 | 198 | } else if (StringUtils.equals(sysDictData.getDiscKey(), "timespan")) { |
| 199 | 199 | equimentVideoParamVo.setTimespan(Convert.toInt(sysDictData.getDictValue())); |
| 200 | 200 | } else if (StringUtils.equals(sysDictData.getDiscKey(), "url")) { |
| 201 | - equimentVideoParamVo.setUrl(sysDictData.getDictValue()); | |
| 201 | + equimentVideoParamVo.setUrl(Objects.nonNull(sysDictData.getDictValue())?sysDictData.getDictValue().toString():null); | |
| 202 | 202 | } else if (StringUtils.equals(sysDictData.getDiscKey(), "saveday")) { |
| 203 | 203 | equimentVideoParamVo.setSaveday(Convert.toInt(sysDictData.getDictValue())); |
| 204 | 204 | } else if (StringUtils.equals(sysDictData.getDiscKey(), "videoTimeSlot")) { |
| 205 | - equimentVideoParamVo.setVideoTimeSlot(sysDictData.getDictValue()); | |
| 205 | + equimentVideoParamVo.setVideoTimeSlot(Objects.nonNull(sysDictData.getDictValue())?sysDictData.getDictValue().toString():null); | |
| 206 | 206 | } |
| 207 | - } else if (Objects.equals(sysDictData.getDictType(), "addressParam") && StringUtils.isNotEmpty(sysDictData.getDictValue())) { | |
| 207 | + } else if (Objects.equals(sysDictData.getDictType(), "addressParam") && Objects.nonNull(sysDictData.getDictValue())) { | |
| 208 | 208 | if (StringUtils.equals(sysDictData.getDiscKey(), "upgradeAddress")) { |
| 209 | - equimentAddressParamVo.setUpgradeAddress(sysDictData.getDictValue()); | |
| 209 | + equimentAddressParamVo.setUpgradeAddress(Objects.nonNull(sysDictData.getDictValue())?sysDictData.getDictValue().toString():null); | |
| 210 | 210 | } else if (StringUtils.equals(sysDictData.getDiscKey(), "integer")) { |
| 211 | 211 | equimentAddressParamVo.setInteger(Convert.toInt(sysDictData.getDictValue())); |
| 212 | 212 | } | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
| ... | ... | @@ -423,7 +423,6 @@ public class KeyBoxController extends BaseController { |
| 423 | 423 | |
| 424 | 424 | private WorkPlateV2Vo convertWorkPlateV2Vo(LinggangScheduling scheduling, LinggangKeyWorkLocation workLocation, KeyInfo keyInfo, CarInfo carInfo) { |
| 425 | 425 | WorkPlateV2Vo vo = new WorkPlateV2Vo(); |
| 426 | - vo.setYardId(Convert.toStr(keyInfo.getYardId())); | |
| 427 | 426 | // vo.setYardName(keyInfo.getY) |
| 428 | 427 | vo.setDevice(workLocation.getDevice()); |
| 429 | 428 | vo.setCabinetNo(workLocation.getCabinetNo()); | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/controller/key/info/KeyInfoController.java
| ... | ... | @@ -12,11 +12,9 @@ import com.ruoyi.domain.key.info.dto.KeyInfoQueryDTO; |
| 12 | 12 | import com.ruoyi.domain.key.info.dto.KeyInfoUpdateDTO; |
| 13 | 13 | import com.ruoyi.domain.key.info.dto.KeyInfoUpdateStatusDTO; |
| 14 | 14 | import com.ruoyi.domain.key.info.vo.KeyInfoVO; |
| 15 | -import com.ruoyi.equipment.domain.Equipment; | |
| 16 | 15 | import com.ruoyi.equipment.service.IEquipmentService; |
| 17 | 16 | import io.swagger.annotations.Api; |
| 18 | 17 | import io.swagger.annotations.ApiOperation; |
| 19 | -import org.apache.commons.collections4.CollectionUtils; | |
| 20 | 18 | import org.springframework.beans.BeanUtils; |
| 21 | 19 | import org.springframework.beans.factory.annotation.Autowired; |
| 22 | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| ... | ... | @@ -24,10 +22,6 @@ import org.springframework.web.bind.annotation.*; |
| 24 | 22 | |
| 25 | 23 | import javax.servlet.http.HttpServletResponse; |
| 26 | 24 | import java.util.List; |
| 27 | -import java.util.Objects; | |
| 28 | -import java.util.Optional; | |
| 29 | -import java.util.Set; | |
| 30 | -import java.util.stream.Collectors; | |
| 31 | 25 | |
| 32 | 26 | |
| 33 | 27 | @RestController |
| ... | ... | @@ -46,20 +40,6 @@ public class KeyInfoController { |
| 46 | 40 | request.clearStrEmpty(); |
| 47 | 41 | KeyInfo entity = convert(request); |
| 48 | 42 | IPage<KeyInfo> response = KeyInfoService.pageList(new Page<KeyInfo>(page, pageLimit), entity,orderEntity); |
| 49 | - if (CollectionUtils.isNotEmpty(response.getRecords())) { | |
| 50 | - Set<Integer> deviceIds = response.getRecords().stream().map(KeyInfo::getDeviceId).collect(Collectors.toSet()); | |
| 51 | - List<Equipment> equipmentList = equipmentService.listNameAndIDByIds(deviceIds); | |
| 52 | - if (CollectionUtils.isNotEmpty(equipmentList)) { | |
| 53 | - List<KeyInfo> keyInfos = response.getRecords().stream().map(obj -> { | |
| 54 | - Optional<Equipment> option = equipmentList.stream().filter(equ -> Objects.equals(equ.getId().intValue(), obj.getDeviceId().intValue())).findFirst(); | |
| 55 | - if (option.isPresent()) { | |
| 56 | - obj.setDeviceLabel(option.get().getSiteName()); | |
| 57 | - } | |
| 58 | - return obj; | |
| 59 | - }).collect(Collectors.toList()); | |
| 60 | - response.setRecords(keyInfos); | |
| 61 | - } | |
| 62 | - } | |
| 63 | 43 | |
| 64 | 44 | return JSON.toJSONString(convert(response)); |
| 65 | 45 | } | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/enums/DelFlagEnum.java
0 → 100644
| 1 | +package com.ruoyi.domain.enums; | |
| 2 | + | |
| 3 | +import lombok.Getter; | |
| 4 | + | |
| 5 | +@Getter | |
| 6 | +public enum DelFlagEnum { | |
| 7 | + YES(true,"已删除"), | |
| 8 | + NO(false,"未删除"), | |
| 9 | + ; | |
| 10 | + private Boolean value; | |
| 11 | + private String label; | |
| 12 | + | |
| 13 | + DelFlagEnum(boolean value, String label) { | |
| 14 | + this.value = value; | |
| 15 | + this.label = label; | |
| 16 | + } | |
| 17 | + | |
| 18 | + | |
| 19 | +} | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/key/info/KeyInfo.java
| ... | ... | @@ -16,69 +16,49 @@ public class KeyInfo { |
| 16 | 16 | /***ID*/ |
| 17 | 17 | @TableId(value = "id", type = IdType.AUTO) |
| 18 | 18 | @Excel(name = "ID") |
| 19 | - private Integer id; | |
| 19 | + private java.lang.Integer id; | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | /***名称(如:XX车的钥匙)*/ |
| 23 | - @Excel(name = "名称") | |
| 24 | - private String name; | |
| 23 | + @Excel(name = "名称(如:XX车的钥匙)") | |
| 24 | + private java.lang.String name; | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | /***状态*/ |
| 28 | 28 | @Excel(name = "状态") |
| 29 | - private Integer status; | |
| 29 | + private java.lang.Integer status; | |
| 30 | 30 | |
| 31 | 31 | |
| 32 | 32 | /***是否删除*/ |
| 33 | 33 | @Excel(name = "是否删除") |
| 34 | - private Boolean delFlag; | |
| 34 | + private java.lang.Boolean delFlag; | |
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | /***创建人员*/ |
| 38 | 38 | @Excel(name = "创建人员") |
| 39 | - @TableField(fill= FieldFill.INSERT) | |
| 40 | - private String createBy; | |
| 39 | + private java.lang.Integer createBy; | |
| 41 | 40 | |
| 42 | 41 | |
| 43 | 42 | /***创建时间*/ |
| 44 | 43 | @Excel(name = "创建时间") |
| 45 | - @TableField(fill= FieldFill.INSERT) | |
| 46 | 44 | private java.util.Date createTime; |
| 47 | 45 | |
| 48 | 46 | |
| 49 | 47 | /***修改人员*/ |
| 50 | 48 | @Excel(name = "修改人员") |
| 51 | - @TableField(fill= FieldFill.UPDATE) | |
| 52 | - private String updateby; | |
| 49 | + private java.lang.Integer updateby; | |
| 53 | 50 | |
| 54 | 51 | |
| 55 | 52 | /***修改时间*/ |
| 56 | 53 | @Excel(name = "修改时间") |
| 57 | - @TableField(fill= FieldFill.UPDATE) | |
| 58 | 54 | private java.util.Date updateTime; |
| 59 | 55 | |
| 60 | 56 | |
| 61 | - /***钥匙所在场站ID*/ | |
| 62 | - @Excel(name = "钥匙所在场站ID") | |
| 63 | - private Integer yardId; | |
| 64 | - | |
| 65 | - | |
| 66 | - /***钥匙锁在的设备ID*/ | |
| 67 | - private Integer deviceId; | |
| 68 | - | |
| 69 | - @Excel(name = "钥匙锁在的设备ID") | |
| 70 | - @TableField(exist = false) | |
| 71 | - private String deviceLabel; | |
| 72 | - | |
| 73 | - | |
| 74 | - /***钥匙所在的位置*/ | |
| 75 | - @Excel(name = "钥匙所在的位置") | |
| 76 | - private Integer cabinetno; | |
| 77 | - | |
| 78 | 57 | /***车牌号*/ |
| 79 | 58 | @Excel(name = "车牌号") |
| 80 | 59 | private java.lang.String plateNum; |
| 81 | 60 | |
| 61 | + | |
| 82 | 62 | /***钥匙编码*/ |
| 83 | 63 | @Excel(name = "钥匙编码") |
| 84 | 64 | private java.lang.String keyCode; | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/key/info/dto/KeyInfoQueryDTO.java
| ... | ... | @@ -56,6 +56,7 @@ public class KeyInfoQueryDTO implements java.io.Serializable { |
| 56 | 56 | @ApiModelProperty(value="钥匙编码") |
| 57 | 57 | private java.lang.String keyCode; |
| 58 | 58 | |
| 59 | + | |
| 59 | 60 | public void clearStrEmpty() { |
| 60 | 61 | if (org.apache.commons.lang3.StringUtils.isEmpty(this.name)) { |
| 61 | 62 | this.name = null; | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/key/info/vo/KeyInfoVO.java
| 1 | 1 | package com.ruoyi.domain.key.info.vo; |
| 2 | 2 | |
| 3 | +import com.ruoyi.domain.enums.DelFlagEnum; | |
| 3 | 4 | import io.swagger.annotations.ApiModel; |
| 4 | 5 | import io.swagger.annotations.ApiModelProperty; |
| 5 | 6 | |
| ... | ... | @@ -7,6 +8,8 @@ import lombok.Data; |
| 7 | 8 | import lombok.EqualsAndHashCode; |
| 8 | 9 | import lombok.experimental.Accessors; |
| 9 | 10 | |
| 11 | +import java.util.Objects; | |
| 12 | + | |
| 10 | 13 | @Data |
| 11 | 14 | @ApiModel(value = "钥匙信息的VO") |
| 12 | 15 | @Accessors(chain = true) |
| ... | ... | @@ -58,6 +61,13 @@ public class KeyInfoVO implements java.io.Serializable { |
| 58 | 61 | @ApiModelProperty(value = "钥匙编码") |
| 59 | 62 | private java.lang.String keyCode; |
| 60 | 63 | |
| 64 | + public String getDelFlagStr() { | |
| 65 | + if (Objects.isNull(delFlag)) { | |
| 66 | + return null; | |
| 67 | + } | |
| 68 | + return delFlag ? DelFlagEnum.YES.getLabel() : DelFlagEnum.NO.getLabel(); | |
| 69 | + } | |
| 70 | + | |
| 61 | 71 | |
| 62 | 72 | @Override |
| 63 | 73 | public String toString() { | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/service/impl/dss/KeyBoxVoServiceImpl.java
| ... | ... | @@ -89,7 +89,7 @@ public class KeyBoxVoServiceImpl implements KeyBoxVoService { |
| 89 | 89 | return ResponseResult.error(MessageFormat.format("工号[{0}]在[{1}]找不到车辆信息", request.getStaffCode(), request.getTime())); |
| 90 | 90 | } |
| 91 | 91 | KeyBoxVo keyBoxVo = new KeyBoxVo(); |
| 92 | - keyBoxVo.setCabinetNo(Convert.toStr(keyInfo.getCabinetno())); | |
| 92 | + //keyBoxVo.setCabinetNo(Convert.toStr(keyInfo.getCabinetno())); | |
| 93 | 93 | // keyBoxVo.setDevice(""); |
| 94 | 94 | keyBoxVo.setDeviceName(equipment.getSiteName()); |
| 95 | 95 | // keyBoxVo.setYardId(Convert.toStr(keyInfo.getYardId())); | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/service/impl/key/info/KeyInfoServiceImpl.java
| ... | ... | @@ -138,15 +138,6 @@ public class KeyInfoServiceImpl extends ServiceImpl<com.ruoyi.mapper.key.info.Ke |
| 138 | 138 | if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) { |
| 139 | 139 | wrapper.orderByAsc(KeyInfo::getUpdateTime); |
| 140 | 140 | } |
| 141 | - if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "yardId")) { | |
| 142 | - wrapper.orderByAsc(KeyInfo::getYardId); | |
| 143 | - } | |
| 144 | - if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "deviceId")) { | |
| 145 | - wrapper.orderByAsc(KeyInfo::getDeviceId); | |
| 146 | - } | |
| 147 | - if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "cabinetno")) { | |
| 148 | - wrapper.orderByAsc(KeyInfo::getCabinetno); | |
| 149 | - } | |
| 150 | 141 | if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "plateNum")) { |
| 151 | 142 | wrapper.orderByAsc(KeyInfo::getPlateNum); |
| 152 | 143 | } |
| ... | ... | @@ -175,15 +166,7 @@ public class KeyInfoServiceImpl extends ServiceImpl<com.ruoyi.mapper.key.info.Ke |
| 175 | 166 | if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) { |
| 176 | 167 | wrapper.orderByDesc(KeyInfo::getUpdateTime); |
| 177 | 168 | } |
| 178 | - if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "yardId")) { | |
| 179 | - wrapper.orderByDesc(KeyInfo::getYardId); | |
| 180 | - } | |
| 181 | - if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "deviceId")) { | |
| 182 | - wrapper.orderByDesc(KeyInfo::getDeviceId); | |
| 183 | - } | |
| 184 | - if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "cabinetno")) { | |
| 185 | - wrapper.orderByDesc(KeyInfo::getCabinetno); | |
| 186 | - } | |
| 169 | + | |
| 187 | 170 | if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "plateNum")) { |
| 188 | 171 | wrapper.orderByDesc(KeyInfo::getPlateNum); |
| 189 | 172 | } | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
| 1 | 1 | package com.ruoyi.web.controller.system; |
| 2 | 2 | |
| 3 | -import java.util.ArrayList; | |
| 4 | -import java.util.List; | |
| 5 | -import javax.servlet.http.HttpServletResponse; | |
| 6 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 8 | -import org.springframework.validation.annotation.Validated; | |
| 9 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 11 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 12 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 13 | -import org.springframework.web.bind.annotation.PutMapping; | |
| 14 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 15 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 16 | -import org.springframework.web.bind.annotation.RestController; | |
| 17 | 3 | import com.ruoyi.common.annotation.Log; |
| 18 | 4 | import com.ruoyi.common.core.controller.BaseController; |
| 19 | 5 | import com.ruoyi.common.core.domain.AjaxResult; |
| 6 | +import com.ruoyi.common.core.domain.ResponseResult; | |
| 20 | 7 | import com.ruoyi.common.core.domain.entity.SysDictData; |
| 21 | 8 | import com.ruoyi.common.core.page.TableDataInfo; |
| 22 | 9 | import com.ruoyi.common.enums.BusinessType; |
| 23 | 10 | import com.ruoyi.common.utils.StringUtils; |
| 24 | 11 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 12 | +import com.ruoyi.domain.enums.DelFlagEnum; | |
| 25 | 13 | import com.ruoyi.system.service.ISysDictDataService; |
| 26 | 14 | import com.ruoyi.system.service.ISysDictTypeService; |
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 16 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 17 | +import org.springframework.validation.annotation.Validated; | |
| 18 | +import org.springframework.web.bind.annotation.*; | |
| 19 | + | |
| 20 | +import javax.servlet.http.HttpServletResponse; | |
| 21 | +import java.util.ArrayList; | |
| 22 | +import java.util.Arrays; | |
| 23 | +import java.util.List; | |
| 24 | +import java.util.stream.Collectors; | |
| 27 | 25 | |
| 28 | 26 | /** |
| 29 | 27 | * 数据字典信息 |
| 30 | - * | |
| 28 | + * | |
| 31 | 29 | * @author ruoyi |
| 32 | 30 | */ |
| 33 | 31 | @RestController |
| 34 | 32 | @RequestMapping("/system/dict/data") |
| 35 | -public class SysDictDataController extends BaseController | |
| 36 | -{ | |
| 33 | +public class SysDictDataController extends BaseController { | |
| 37 | 34 | @Autowired |
| 38 | 35 | private ISysDictDataService dictDataService; |
| 39 | 36 | |
| ... | ... | @@ -42,8 +39,7 @@ public class SysDictDataController extends BaseController |
| 42 | 39 | |
| 43 | 40 | @PreAuthorize("@ss.hasPermi('system:dict:list')") |
| 44 | 41 | @GetMapping("/list") |
| 45 | - public TableDataInfo list(SysDictData dictData) | |
| 46 | - { | |
| 42 | + public TableDataInfo list(SysDictData dictData) { | |
| 47 | 43 | startPage(); |
| 48 | 44 | List<SysDictData> list = dictDataService.selectDictDataList(dictData); |
| 49 | 45 | return getDataTable(list); |
| ... | ... | @@ -52,8 +48,7 @@ public class SysDictDataController extends BaseController |
| 52 | 48 | @Log(title = "字典数据", businessType = BusinessType.EXPORT) |
| 53 | 49 | @PreAuthorize("@ss.hasPermi('system:dict:export')") |
| 54 | 50 | @PostMapping("/export") |
| 55 | - public void export(HttpServletResponse response, SysDictData dictData) | |
| 56 | - { | |
| 51 | + public void export(HttpServletResponse response, SysDictData dictData) { | |
| 57 | 52 | List<SysDictData> list = dictDataService.selectDictDataList(dictData); |
| 58 | 53 | ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class); |
| 59 | 54 | util.exportExcel(response, list, "字典数据"); |
| ... | ... | @@ -64,8 +59,7 @@ public class SysDictDataController extends BaseController |
| 64 | 59 | */ |
| 65 | 60 | @PreAuthorize("@ss.hasPermi('system:dict:query')") |
| 66 | 61 | @GetMapping(value = "/{dictCode}") |
| 67 | - public AjaxResult getInfo(@PathVariable Long dictCode) | |
| 68 | - { | |
| 62 | + public AjaxResult getInfo(@PathVariable Long dictCode) { | |
| 69 | 63 | return success(dictDataService.selectDictDataById(dictCode)); |
| 70 | 64 | } |
| 71 | 65 | |
| ... | ... | @@ -73,11 +67,9 @@ public class SysDictDataController extends BaseController |
| 73 | 67 | * 根据字典类型查询字典数据信息 |
| 74 | 68 | */ |
| 75 | 69 | @GetMapping(value = "/type/{dictType}") |
| 76 | - public AjaxResult dictType(@PathVariable String dictType) | |
| 77 | - { | |
| 70 | + public AjaxResult dictType(@PathVariable String dictType) { | |
| 78 | 71 | List<SysDictData> data = dictTypeService.selectDictDataByType(dictType); |
| 79 | - if (StringUtils.isNull(data)) | |
| 80 | - { | |
| 72 | + if (StringUtils.isNull(data)) { | |
| 81 | 73 | data = new ArrayList<SysDictData>(); |
| 82 | 74 | } |
| 83 | 75 | return success(data); |
| ... | ... | @@ -89,8 +81,7 @@ public class SysDictDataController extends BaseController |
| 89 | 81 | @PreAuthorize("@ss.hasPermi('system:dict:add')") |
| 90 | 82 | @Log(title = "字典数据", businessType = BusinessType.INSERT) |
| 91 | 83 | @PostMapping |
| 92 | - public AjaxResult add(@Validated @RequestBody SysDictData dict) | |
| 93 | - { | |
| 84 | + public AjaxResult add(@Validated @RequestBody SysDictData dict) { | |
| 94 | 85 | dict.setCreateBy(getUsername()); |
| 95 | 86 | return toAjax(dictDataService.insertDictData(dict)); |
| 96 | 87 | } |
| ... | ... | @@ -101,8 +92,7 @@ public class SysDictDataController extends BaseController |
| 101 | 92 | @PreAuthorize("@ss.hasPermi('system:dict:edit')") |
| 102 | 93 | @Log(title = "字典数据", businessType = BusinessType.UPDATE) |
| 103 | 94 | @PutMapping |
| 104 | - public AjaxResult edit(@Validated @RequestBody SysDictData dict) | |
| 105 | - { | |
| 95 | + public AjaxResult edit(@Validated @RequestBody SysDictData dict) { | |
| 106 | 96 | dict.setUpdateBy(getUsername()); |
| 107 | 97 | return toAjax(dictDataService.updateDictData(dict)); |
| 108 | 98 | } |
| ... | ... | @@ -113,9 +103,21 @@ public class SysDictDataController extends BaseController |
| 113 | 103 | @PreAuthorize("@ss.hasPermi('system:dict:remove')") |
| 114 | 104 | @Log(title = "字典类型", businessType = BusinessType.DELETE) |
| 115 | 105 | @DeleteMapping("/{dictCodes}") |
| 116 | - public AjaxResult remove(@PathVariable Long[] dictCodes) | |
| 117 | - { | |
| 106 | + public AjaxResult remove(@PathVariable Long[] dictCodes) { | |
| 118 | 107 | dictDataService.deleteDictDataByIds(dictCodes); |
| 119 | 108 | return success(); |
| 120 | 109 | } |
| 110 | + | |
| 111 | + @GetMapping(value = "/type/del/flag") | |
| 112 | + public ResponseResult<List<SysDictData>> deleteFlags() { | |
| 113 | + List<SysDictData> dictDatas = Arrays.stream(DelFlagEnum.values()).map(d -> { | |
| 114 | + SysDictData sysDictData =new SysDictData(); | |
| 115 | + sysDictData.setDictValue(d.getValue()); | |
| 116 | + sysDictData.setDictLabel(d.getLabel()); | |
| 117 | + | |
| 118 | + return sysDictData; | |
| 119 | + }).collect(Collectors.toList()); | |
| 120 | + | |
| 121 | + return ResponseResult.success(dictDatas); | |
| 122 | + } | |
| 121 | 123 | } | ... | ... |
Bsth-admin/src/main/resources/application-druid-devTest.yml
0 → 100644
| 1 | + | |
| 2 | +# 数据源配置 | |
| 3 | +spring: | |
| 4 | + # 邮箱配置 | |
| 5 | + mail: | |
| 6 | + # 只发送不接收 | |
| 7 | + host: smtp.163.com | |
| 8 | + # 自己的邮箱 | |
| 9 | + username: m18980249160@163.com | |
| 10 | + # 提供的密码 不是自己的登录密码 | |
| 11 | + password: RZHJXWXPCALIAOCG | |
| 12 | + # 占用端口号 | |
| 13 | + port: 465 | |
| 14 | + nickname: 酒精测试异常通知 | |
| 15 | + form: m18980249160@163.com | |
| 16 | + protocol: smtp | |
| 17 | + properties: | |
| 18 | + mail: | |
| 19 | + smtp: | |
| 20 | + ssl: | |
| 21 | + enable: true | |
| 22 | + socketFactory: | |
| 23 | + class: javax.net.ssl.SSLSocketFactory | |
| 24 | + datasource: | |
| 25 | + type: com.alibaba.druid.pool.DruidDataSource | |
| 26 | + driverClassName: com.mysql.cj.jdbc.Driver | |
| 27 | + druid: | |
| 28 | + # 主库数据源 | |
| 29 | + master: | |
| 30 | + # 测试地址 | |
| 31 | + # url: jdbc:mysql://localhost:3306/all-in-one?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useAffectedRows=true&allowMultiQueries=true | |
| 32 | + #url: jdbc:mysql://192.168.168.124:3306/lingang_all_in_one?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true | |
| 33 | + url: jdbc:mysql://192.168.168.124:3306/lingang_all_in_one?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true | |
| 34 | + # url: jdbc:mysql://127.0.0.1:3306/lingang_all_in_one?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true | |
| 35 | + username: root | |
| 36 | + password: guzijian | |
| 37 | + # password: 1 | |
| 38 | + # 从库数据源 | |
| 39 | + slave: | |
| 40 | + # 从数据源开关/默认关闭 | |
| 41 | + enabled: false | |
| 42 | + url: | |
| 43 | + username: | |
| 44 | + password: | |
| 45 | + # 初始连接数 | |
| 46 | + initialSize: 5 | |
| 47 | + # 最小连接池数量 | |
| 48 | + minIdle: 10 | |
| 49 | + # 最大连接池数量 | |
| 50 | + maxActive: 20 | |
| 51 | + # 配置获取连接等待超时的时间 | |
| 52 | + maxWait: 60000 | |
| 53 | + # 配置连接超时时间 | |
| 54 | + connectTimeout: 30000 | |
| 55 | + # 配置网络超时时间 | |
| 56 | + socketTimeout: 60000 | |
| 57 | + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |
| 58 | + timeBetweenEvictionRunsMillis: 60000 | |
| 59 | + # 配置一个连接在池中最小生存的时间,单位是毫秒 | |
| 60 | + minEvictableIdleTimeMillis: 300000 | |
| 61 | + # 配置一个连接在池中最大生存的时间,单位是毫秒 | |
| 62 | + maxEvictableIdleTimeMillis: 900000 | |
| 63 | + # 配置检测连接是否有效 | |
| 64 | + validationQuery: SELECT 1 FROM DUAL | |
| 65 | + testWhileIdle: true | |
| 66 | + testOnBorrow: false | |
| 67 | + testOnReturn: false | |
| 68 | + webStatFilter: | |
| 69 | + enabled: true | |
| 70 | + statViewServlet: | |
| 71 | + enabled: true | |
| 72 | + # 设置白名单,不填则允许所有访问 | |
| 73 | + allow: | |
| 74 | + url-pattern: /druid/* | |
| 75 | + # 控制台管理用户名和密码 | |
| 76 | + login-username: ruoyi | |
| 77 | + login-password: 123456 | |
| 78 | + filter: | |
| 79 | + stat: | |
| 80 | + enabled: true | |
| 81 | + # 慢SQL记录 | |
| 82 | + log-slow-sql: true | |
| 83 | + slow-sql-millis: 1000 | |
| 84 | + merge-sql: true | |
| 85 | + wall: | |
| 86 | + config: | |
| 87 | + multi-statement-allow: true | |
| 88 | + # 文件上传 | |
| 89 | + servlet: | |
| 90 | + multipart: | |
| 91 | + # 单个文件大小 | |
| 92 | + max-file-size: 100MB | |
| 93 | + # 设置总上传的文件大小 | |
| 94 | + max-request-size: 100MB | |
| 95 | + # 服务模块 | |
| 96 | + devtools: | |
| 97 | + restart: | |
| 98 | + # 热部署开关 | |
| 99 | + enabled: true | |
| 100 | + # redis 配置 | |
| 101 | + redis: | |
| 102 | + # 地址 | |
| 103 | +# host: 121.41.83.61 | |
| 104 | + host: localhost | |
| 105 | + database: 2 | |
| 106 | +# password: "guzijian" | |
| 107 | + port: 6379 | |
| 108 | + # 连接超时时间 | |
| 109 | + timeout: 10s | |
| 110 | + lettuce: | |
| 111 | + pool: | |
| 112 | + # 连接池中的最小空闲连接 | |
| 113 | + min-idle: 0 | |
| 114 | + # 连接池中的最大空闲连接 | |
| 115 | + max-idle: 8 | |
| 116 | + # 连接池的最大数据库连接数 | |
| 117 | + max-active: 8 | |
| 118 | + # #连接池最大阻塞等待时间(使用负值表示没有限制) | |
| 119 | + max-wait: -1ms | |
| 120 | + # token配置 | |
| 121 | + token: | |
| 122 | + # 令牌自定义标识 | |
| 123 | + header: Authorization | |
| 124 | + # 令牌密钥 | |
| 125 | + secret: abcdefghijklmnopqrstuvwxyz | |
| 126 | + # 令牌有效期(默认30分钟) | |
| 127 | + expireTime: 30 | |
| 128 | + | |
| 129 | +# 项目相关配置 | |
| 130 | +ruoyi: | |
| 131 | + # 名称 | |
| 132 | + name: RuoYi | |
| 133 | + # 版本 | |
| 134 | + version: 3.8.5 | |
| 135 | + # 版权年份 | |
| 136 | + copyrightYear: 2023 | |
| 137 | + # 实例演示开关 | |
| 138 | + demoEnabled: true | |
| 139 | + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) | |
| 140 | + profile: D:/ruoyi/uploadPath | |
| 141 | + # 获取ip地址开关 | |
| 142 | + addressEnabled: false | |
| 143 | + # 验证码类型 math 数字计算 char 字符验证 | |
| 144 | + captchaType: math | |
| 145 | +mybatis-plus: | |
| 146 | + # 搜索指定包别名 | |
| 147 | + typeAliasesPackage: com.ruoyi.**.domain | |
| 148 | + # 配置mapper的扫描,找到所有的mapper.xml映射文件 | |
| 149 | + mapperLocations: classpath*:mapper/**/*Mapper.xml | |
| 150 | + # 加载全局的配置文件 | |
| 151 | + configLocation: classpath:mybatis/mybatis-config.xml | |
| 152 | +# Swagger配置 | |
| 153 | +swagger: | |
| 154 | + # 是否开启swagger | |
| 155 | + enabled: true | |
| 156 | + # 请求前缀 | |
| 157 | + # pathMapping: /dev-api | |
| 158 | + pathMapping: / | |
| 159 | +api: | |
| 160 | + template: 车队与线路匹配模板 | |
| 161 | + url: | |
| 162 | + # all 为获取所有驾驶员信息 | |
| 163 | + getDriverInfo: http://101.95.136.206:9089/webservice/rest/person/%s | |
| 164 | + # 获取公司编码下的员工信息 暂时没用 | |
| 165 | + getCompanyInfo: http://101.95.136.206:9089/webservice/rest/person/company/%d?timestamp=%&nonce=%s&password=%s&sign=%s | |
| 166 | + # 获取排班信息 | |
| 167 | + getSchedulingInfo: http://101.95.136.206:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | |
| 168 | + getSchedulingInfoNew: http://101.95.136.206:9089/webservice/rest/schedule_real/sch_jk_db/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s | |
| 169 | + config: | |
| 170 | + password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 | |
| 171 | + # 随机字符串 | |
| 172 | + nonce: adfsad | |
| 173 | + apk: | |
| 174 | + path: /apk/dev | |
| 175 | + # 用户头像存放位置 | |
| 176 | + headImage: /head/image | |
| 177 | + | |
| 178 | + personnel: | |
| 179 | + token: | |
| 180 | + tokenUrl: https://api.dingtalk.com/v1.0/oauth2/accessToken | |
| 181 | + appKey: dingsclwvxui5zilg1xk | |
| 182 | + appSecret: ckV20k3jMKJpUkfXXSGhLk077rQQjsSaAusiSVY-nm4glwweCmb_SMJ62Cpf4YQ5 | |
| 183 | + people: | |
| 184 | + url: https://api.dingtalk.com/v1.0/yida/forms/instances/search | |
| 185 | +log: | |
| 186 | + path: logs | |
| 187 | +server: | |
| 188 | + port: 8100 | |
| 189 | +netty: | |
| 190 | + # 是否开启netty服务 | |
| 191 | + enabled: true | |
| 192 | + socket: | |
| 193 | + # 相对路径 classpath | |
| 194 | + catalogue: | |
| 195 | + image: device/image | |
| 196 | + speech: device/speech | |
| 197 | + port: 8989 | |
| 198 | + | |
| 199 | + | |
| 200 | +bsth: | |
| 201 | + upload: | |
| 202 | + image: | |
| 203 | + basePath: /head/image/upload | |
| 204 | + video: | |
| 205 | + basePath: /head/video/upload | |
| 206 | + face: | |
| 207 | + app: | |
| 208 | + id: 8jPk3SNnaoGsd9SidMefgZXg1zbst64jB44vVyx9Cijq | |
| 209 | + sdk: | |
| 210 | + # key: C21s5J1n1rHwXPkvVjubKshtfYuvuSe2GHus41Q1NPcT | |
| 211 | + key: C21s5J1n1rHwXPkvVjubKshtofV5sHXvyUQqSWYxHp2b | |
| 212 | + lib: | |
| 213 | + # path: /data/test/bath-alcoho-sign/LINUX64 | |
| 214 | + path: D:/work/code/jienengjiancha/bsth-alcohol-sign/Bsth-admin/src/main/resources/libs/WIN64 | ... | ... |
Bsth-admin/src/main/resources/logback.xml
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | 2 | <configuration> |
| 3 | 3 | <!-- 日志存放路径 --> |
| 4 | -<!-- <property name="log.path" value="E:/ruoyi/logs" />--> | |
| 5 | -<!-- <property name="log.path" value="D:/ruoyi/logs" />--> | |
| 6 | - <springProperty name="log.path" source="log.path" defaultValue="E:/ruoyi/logs" /> | |
| 4 | + <springProperty name="log.path" source="log.path" defaultValue="d:/logs" /> | |
| 7 | 5 | /> |
| 8 | 6 | <!-- <property name="log.path" value="/home/ruoyi/logs" />--> |
| 9 | 7 | <!-- 日志输出格式 --> | ... | ... |
Bsth-admin/src/main/resources/mapper/key/info/KeyInfoMapper.xml
| ... | ... | @@ -2,52 +2,32 @@ |
| 2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | 3 | <mapper namespace="com.ruoyi.mapper.key.info.KeyInfoMapper"> |
| 4 | 4 | <resultMap id="BaseResultMap" type="com.ruoyi.domain.key.info.KeyInfo"> |
| 5 | - <id column="id" jdbcType="INTEGER" property="id"/> | |
| 6 | - <result column="name" jdbcType="VARCHAR" property="name"/> | |
| 7 | - <result column="status" jdbcType="INTEGER" property="status"/> | |
| 8 | - <result column="del_flag" jdbcType="BIT" property="delFlag"/> | |
| 9 | - <result column="create_By" jdbcType="INTEGER" property="createBy"/> | |
| 10 | - <result column="create_Time" jdbcType="TIMESTAMP" property="createTime"/> | |
| 11 | - <result column="updateBy" jdbcType="INTEGER" property="updateby"/> | |
| 12 | - <result column="update_Time" jdbcType="TIMESTAMP" property="updateTime"/> | |
| 13 | - <result column="yard_Id" jdbcType="INTEGER" property="yardId"/> | |
| 14 | - <result column="device_id" jdbcType="INTEGER" property="deviceId"/> | |
| 15 | - <result column="cabinetNo" jdbcType="INTEGER" property="cabinetno"/> | |
| 16 | - <result column="plate_Num" jdbcType="VARCHAR" property="plateNum"/> | |
| 17 | - <result column="key_code" jdbcType="VARCHAR" property="keyCode"/> | |
| 5 | + <id column ="id" jdbcType="INTEGER" property="id" /> | |
| 6 | + <result column="name" jdbcType="VARCHAR" property="name" /> | |
| 7 | + <result column="status" jdbcType="INTEGER" property="status" /> | |
| 8 | + <result column="del_flag" jdbcType="BIT" property="delFlag" /> | |
| 9 | + <result column="create_By" jdbcType="INTEGER" property="createBy" /> | |
| 10 | + <result column="create_Time" jdbcType="TIMESTAMP" property="createTime" /> | |
| 11 | + <result column="updateBy" jdbcType="INTEGER" property="updateby" /> | |
| 12 | + <result column="update_Time" jdbcType="TIMESTAMP" property="updateTime" /> | |
| 13 | + <result column="plate_Num" jdbcType="VARCHAR" property="plateNum" /> | |
| 14 | + <result column="key_code" jdbcType="VARCHAR" property="keyCode" /> | |
| 18 | 15 | </resultMap> |
| 19 | 16 | |
| 20 | - <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true" | |
| 21 | - parameterType="com.ruoyi.domain.key.info.KeyInfo"> | |
| 22 | - INSERT INTO key_info <include refid="insertSelectiveColumn"></include> | |
| 23 | - <include refid="insertSelectiveValue"></include> | |
| 17 | + <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true" parameterType="com.ruoyi.domain.key.info.KeyInfo"> | |
| 18 | + INSERT INTO key_info <include refid= "insertSelectiveColumn"></include> <include refid= "insertSelectiveValue"></include> | |
| 24 | 19 | </insert> |
| 25 | 20 | |
| 26 | 21 | <sql id="columns"> |
| 27 | - id | |
| 28 | - , name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo , plate_Num , key_code | |
| 22 | + id , name , status , del_flag , create_By , create_Time , updateBy , update_Time , plate_Num , key_code | |
| 29 | 23 | </sql> |
| 30 | 24 | |
| 31 | 25 | <sql id="insert_columns"> |
| 32 | - id | |
| 33 | - , name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo , plate_Num , key_code | |
| 26 | + id , name , status , del_flag , create_By , create_Time , updateBy , update_Time , plate_Num , key_code | |
| 34 | 27 | </sql> |
| 35 | 28 | |
| 36 | 29 | <sql id="insert_values"> |
| 37 | - #{id} | |
| 38 | - , | |
| 39 | - #{name}, | |
| 40 | - #{status}, | |
| 41 | - #{delFlag}, | |
| 42 | - #{createBy}, | |
| 43 | - #{createTime}, | |
| 44 | - #{updateby}, | |
| 45 | - #{updateTime}, | |
| 46 | - #{yardId}, | |
| 47 | - #{deviceId}, | |
| 48 | - #{cabinetno}, | |
| 49 | - #{plateNum}, | |
| 50 | - #{keyCode} | |
| 30 | + #{id}, #{name}, #{status}, #{delFlag}, #{createBy}, #{createTime}, #{updateby}, #{updateTime}, #{plateNum}, #{keyCode} | |
| 51 | 31 | </sql> |
| 52 | 32 | |
| 53 | 33 | <sql id="insertSelectiveColumn"> |
| ... | ... | @@ -60,9 +40,6 @@ |
| 60 | 40 | <if test="null!=createTime">create_Time,</if> |
| 61 | 41 | <if test="null!=updateby">updateBy,</if> |
| 62 | 42 | <if test="null!=updateTime">update_Time,</if> |
| 63 | - <if test="null!=yardId">yard_Id,</if> | |
| 64 | - <if test="null!=deviceId">device_id,</if> | |
| 65 | - <if test="null!=cabinetno">cabinetNo,</if> | |
| 66 | 43 | <if test="null!=plateNum">plate_Num,</if> |
| 67 | 44 | <if test="null!=keyCode">key_code,</if> |
| 68 | 45 | </trim> |
| ... | ... | @@ -78,9 +55,6 @@ |
| 78 | 55 | <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if> |
| 79 | 56 | <if test="null!=updateby">#{updateby,jdbcType=INTEGER},</if> |
| 80 | 57 | <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if> |
| 81 | - <if test="null!=yardId">#{yardId,jdbcType=INTEGER},</if> | |
| 82 | - <if test="null!=deviceId">#{deviceId,jdbcType=INTEGER},</if> | |
| 83 | - <if test="null!=cabinetno">#{cabinetno,jdbcType=INTEGER},</if> | |
| 84 | 58 | <if test="null!=plateNum">#{plateNum,jdbcType=VARCHAR},</if> |
| 85 | 59 | <if test="null!=keyCode">#{keyCode,jdbcType=VARCHAR},</if> |
| 86 | 60 | </trim> |
| ... | ... | @@ -88,19 +62,16 @@ |
| 88 | 62 | |
| 89 | 63 | <sql id="updateByPrimaryKeySelectiveSql"> |
| 90 | 64 | <set> |
| 91 | - <if test="null!=id">id = #{id,jdbcType=INTEGER},</if> | |
| 92 | - <if test="null!=name">name = #{name,jdbcType=VARCHAR},</if> | |
| 93 | - <if test="null!=status">status = #{status,jdbcType=INTEGER},</if> | |
| 94 | - <if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if> | |
| 95 | - <if test="null!=createBy">create_By = #{createBy,jdbcType=INTEGER},</if> | |
| 96 | - <if test="null!=createTime">create_Time = #{createTime,jdbcType=TIMESTAMP},</if> | |
| 97 | - <if test="null!=updateby">updateBy = #{updateby,jdbcType=INTEGER},</if> | |
| 98 | - <if test="null!=updateTime">update_Time = #{updateTime,jdbcType=TIMESTAMP},</if> | |
| 99 | - <if test="null!=yardId">yard_Id = #{yardId,jdbcType=INTEGER},</if> | |
| 100 | - <if test="null!=deviceId">device_id = #{deviceId,jdbcType=INTEGER},</if> | |
| 101 | - <if test="null!=cabinetno">cabinetNo = #{cabinetno,jdbcType=INTEGER},</if> | |
| 102 | - <if test="null!=plateNum">plate_Num = #{plateNum,jdbcType=VARCHAR},</if> | |
| 103 | - <if test="null!=keyCode">key_code = #{keyCode,jdbcType=VARCHAR},</if> | |
| 65 | + <if test="null!=id"> id = #{id,jdbcType=INTEGER},</if> | |
| 66 | + <if test="null!=name"> name = #{name,jdbcType=VARCHAR},</if> | |
| 67 | + <if test="null!=status"> status = #{status,jdbcType=INTEGER},</if> | |
| 68 | + <if test="null!=delFlag"> del_flag = #{delFlag,jdbcType=BIT},</if> | |
| 69 | + <if test="null!=createBy"> create_By = #{createBy,jdbcType=INTEGER},</if> | |
| 70 | + <if test="null!=createTime"> create_Time = #{createTime,jdbcType=TIMESTAMP},</if> | |
| 71 | + <if test="null!=updateby"> updateBy = #{updateby,jdbcType=INTEGER},</if> | |
| 72 | + <if test="null!=updateTime"> update_Time = #{updateTime,jdbcType=TIMESTAMP},</if> | |
| 73 | + <if test="null!=plateNum"> plate_Num = #{plateNum,jdbcType=VARCHAR},</if> | |
| 74 | + <if test="null!=keyCode"> key_code = #{keyCode,jdbcType=VARCHAR},</if> | |
| 104 | 75 | </set> |
| 105 | 76 | </sql> |
| 106 | 77 | |
| ... | ... | @@ -113,9 +84,6 @@ |
| 113 | 84 | <if test="null!=createTime">AND create_Time = #{createTime,jdbcType=TIMESTAMP},</if> |
| 114 | 85 | <if test="null!=updateby">AND updateBy = #{updateby,jdbcType=INTEGER},</if> |
| 115 | 86 | <if test="null!=updateTime">AND update_Time = #{updateTime,jdbcType=TIMESTAMP},</if> |
| 116 | - <if test="null!=yardId">AND yard_Id = #{yardId,jdbcType=INTEGER},</if> | |
| 117 | - <if test="null!=deviceId">AND device_id = #{deviceId,jdbcType=INTEGER},</if> | |
| 118 | - <if test="null!=cabinetno">AND cabinetNo = #{cabinetno,jdbcType=INTEGER},</if> | |
| 119 | 87 | <if test="null!=plateNum">AND plate_Num = #{plateNum,jdbcType=VARCHAR},</if> |
| 120 | 88 | <if test="null!=keyCode">AND key_code = #{keyCode,jdbcType=VARCHAR},</if> |
| 121 | 89 | </sql> | ... | ... |
Bsth-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
| 1 | 1 | package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | |
| 3 | -import javax.validation.constraints.NotBlank; | |
| 4 | -import javax.validation.constraints.Size; | |
| 5 | - | |
| 6 | -import org.apache.commons.lang3.builder.ToStringBuilder; | |
| 7 | -import org.apache.commons.lang3.builder.ToStringStyle; | |
| 8 | 3 | import com.ruoyi.common.annotation.Excel; |
| 9 | 4 | import com.ruoyi.common.annotation.Excel.ColumnType; |
| 10 | 5 | import com.ruoyi.common.constant.UserConstants; |
| 11 | 6 | import com.ruoyi.common.core.domain.BaseEntity; |
| 7 | +import org.apache.commons.lang3.builder.ToStringBuilder; | |
| 8 | +import org.apache.commons.lang3.builder.ToStringStyle; | |
| 9 | + | |
| 10 | +import javax.validation.constraints.NotBlank; | |
| 11 | +import javax.validation.constraints.Size; | |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * 字典数据表 sys_dict_data |
| ... | ... | @@ -40,7 +40,7 @@ public class SysDictData extends BaseEntity { |
| 40 | 40 | * 字典键值 |
| 41 | 41 | */ |
| 42 | 42 | @Excel(name = "字典键值") |
| 43 | - private String dictValue; | |
| 43 | + private Object dictValue; | |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * 字典类型 |
| ... | ... | @@ -101,11 +101,11 @@ public class SysDictData extends BaseEntity { |
| 101 | 101 | |
| 102 | 102 | @NotBlank(message = "字典键值不能为空") |
| 103 | 103 | @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") |
| 104 | - public String getDictValue() { | |
| 104 | + public Object getDictValue() { | |
| 105 | 105 | return dictValue; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - public void setDictValue(String dictValue) { | |
| 108 | + public void setDictValue(Object dictValue) { | |
| 109 | 109 | this.dictValue = dictValue; |
| 110 | 110 | } |
| 111 | 111 | ... | ... |
Bsth-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
| 1 | 1 | package com.ruoyi.common.utils; |
| 2 | 2 | |
| 3 | -import java.util.Collection; | |
| 4 | -import java.util.List; | |
| 5 | 3 | import com.alibaba.fastjson2.JSONArray; |
| 6 | 4 | import com.ruoyi.common.constant.CacheConstants; |
| 7 | 5 | import com.ruoyi.common.core.domain.entity.SysDictData; |
| 8 | 6 | import com.ruoyi.common.core.redis.RedisCache; |
| 9 | 7 | import com.ruoyi.common.utils.spring.SpringUtils; |
| 10 | 8 | |
| 9 | +import java.util.Collection; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Objects; | |
| 12 | + | |
| 11 | 13 | /** |
| 12 | 14 | * 字典工具类 |
| 13 | 15 | * |
| ... | ... | @@ -147,7 +149,7 @@ public class DictUtils |
| 147 | 149 | { |
| 148 | 150 | if (dictLabel.equals(dict.getDictLabel())) |
| 149 | 151 | { |
| 150 | - return dict.getDictValue(); | |
| 152 | + return Objects.isNull(dict.getDictValue())?null:dict.getDictValue().toString(); | |
| 151 | 153 | } |
| 152 | 154 | } |
| 153 | 155 | } | ... | ... |