mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 15:00:14 +08:00
update 江苏省平台建设场所
This commit is contained in:
67
jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/JiangSuConstructionEnum.java
vendored
Normal file
67
jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/JiangSuConstructionEnum.java
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
package com.jsowell.common.enums.thirdparty;
|
||||||
|
|
||||||
|
import com.jsowell.common.util.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据库--江苏省平台建设场所枚举对应
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/12/16 8:32:51
|
||||||
|
*/
|
||||||
|
public enum JiangSuConstructionEnum {
|
||||||
|
PUBLIC_SERVICE_PLACE(16, 101), // 公共服务场所
|
||||||
|
PUBLIC_PARKING(17, 102), // 公共停车场
|
||||||
|
CITY_TRAFFIC_POINT(18, 103), // 城市交通节点
|
||||||
|
GAS_STATION(14, 104), // 加油站
|
||||||
|
CHARGING_AREA_WITH_PARKING_CONDITIONS(19, 105), // 具备停车条件的充电区域
|
||||||
|
HIGHWAY_SERVICE_AREA(11, 106), // 高速服务区
|
||||||
|
GOVERNMENT_AGENCY(20, 201), // 政府机关
|
||||||
|
PUBLIC_INSTITUTION(2, 202), // 公共机构
|
||||||
|
ENTERPRISES_AND_INSTITUTIONS(3, 203), // 企业事业单位
|
||||||
|
BUS(13, 204), // 公交
|
||||||
|
ENVIRONMENTAL_SANITATION(21, 205), // 环卫
|
||||||
|
LOGISTICS(22, 206), // 物流
|
||||||
|
TAXI(15, 207), // 出租车
|
||||||
|
PORT_TERMINAL(23, 208),// 港口码头
|
||||||
|
RESIDENTIAL_AREA(1, 301), // 居民区
|
||||||
|
|
||||||
|
;
|
||||||
|
private Integer dataBaseCode;
|
||||||
|
private Integer JiangSuCode;
|
||||||
|
|
||||||
|
JiangSuConstructionEnum(Integer dataBaseCode, Integer jiangSuCode) {
|
||||||
|
this.dataBaseCode = dataBaseCode;
|
||||||
|
JiangSuCode = jiangSuCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDataBaseCode() {
|
||||||
|
return dataBaseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataBaseCode(Integer dataBaseCode) {
|
||||||
|
this.dataBaseCode = dataBaseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getJiangSuCode() {
|
||||||
|
return JiangSuCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJiangSuCode(Integer jiangSuCode) {
|
||||||
|
JiangSuCode = jiangSuCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 dataBaseCode 获取 jiangSuCode
|
||||||
|
*
|
||||||
|
* @param dataBaseCode 编码
|
||||||
|
* @return operatorId
|
||||||
|
*/
|
||||||
|
public static int getJSCodeByDataBaseCode(int dataBaseCode) {
|
||||||
|
for (JiangSuConstructionEnum item : JiangSuConstructionEnum.values()) {
|
||||||
|
if (item.getDataBaseCode() == dataBaseCode) {
|
||||||
|
return item.getJiangSuCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import com.jsowell.common.constant.CacheConstants;
|
|||||||
import com.jsowell.common.constant.Constants;
|
import com.jsowell.common.constant.Constants;
|
||||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||||
import com.jsowell.common.core.redis.RedisCache;
|
import com.jsowell.common.core.redis.RedisCache;
|
||||||
|
import com.jsowell.common.enums.thirdparty.JiangSuConstructionEnum;
|
||||||
import com.jsowell.common.enums.ykc.PileStatusEnum;
|
import com.jsowell.common.enums.ykc.PileStatusEnum;
|
||||||
import com.jsowell.common.util.DateUtils;
|
import com.jsowell.common.util.DateUtils;
|
||||||
import com.jsowell.common.util.PageUtils;
|
import com.jsowell.common.util.PageUtils;
|
||||||
@@ -212,7 +213,9 @@ public class NRServiceImpl implements NRService {
|
|||||||
stationType = "2";
|
stationType = "2";
|
||||||
}
|
}
|
||||||
nrStationInfo.setStationType(Integer.parseInt(stationType));
|
nrStationInfo.setStationType(Integer.parseInt(stationType));
|
||||||
nrStationInfo.setConstruction(255);
|
// 获取建设场所
|
||||||
|
int jsConstructionCode = JiangSuConstructionEnum.getJSCodeByDataBaseCode(Integer.parseInt(stationInfoVO.getConstruction()));
|
||||||
|
nrStationInfo.setConstruction(jsConstructionCode);
|
||||||
|
|
||||||
List<NREquipmentInfo> nrEquipmentInfos = getEquipmentInfo(String.valueOf(dto.getStationId()));
|
List<NREquipmentInfo> nrEquipmentInfos = getEquipmentInfo(String.valueOf(dto.getStationId()));
|
||||||
nrStationInfo.setEquipmentInfos(nrEquipmentInfos);
|
nrStationInfo.setEquipmentInfos(nrEquipmentInfos);
|
||||||
|
|||||||
Reference in New Issue
Block a user