diff --git a/evcs-modules/evcs-common/src/main/java/com/xhpc/evcs/dto/QeryPlaceholderRequest.java b/evcs-modules/evcs-common/src/main/java/com/xhpc/evcs/dto/QeryPlaceholderRequest.java new file mode 100644 index 00000000..a629f363 --- /dev/null +++ b/evcs-modules/evcs-common/src/main/java/com/xhpc/evcs/dto/QeryPlaceholderRequest.java @@ -0,0 +1,15 @@ +package com.xhpc.evcs.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 占位费规则查询 + * + * @author yuyang + * @Date 2025-06-20 15:18 + */ +public class QeryPlaceholderRequest { + + @JsonProperty("StationIDs") + String[] stationIds; +} diff --git a/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryPlaceholderRules.java b/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryPlaceholderRules.java new file mode 100644 index 00000000..41d8cf4a --- /dev/null +++ b/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryPlaceholderRules.java @@ -0,0 +1,52 @@ +package com.xhpc.evcs.api; + +import com.xhpc.evcs.domain.AuthSecretToken; +import com.xhpc.evcs.domain.XhpcInternetUser; +import com.xhpc.evcs.dto.*; +import com.xhpc.evcs.encryption.EvcsConst; +import com.xhpc.evcs.utils.JSONUtil; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; + +import java.io.IOException; +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.Calendar; +import java.util.UUID; + +import static com.xhpc.common.data.redis.StaticBeanUtil.REDIS; + +/** + * 占位费查询 + * + * @author yuyang + * @Date 2025-06-20 15:15 + */ +public class QueryPlaceholderRules { + + /** + * 用于平台之间认证Token的申请 + * @return + * @throws IOException + */ + @PostMapping("/v1/query_placeholder_rules") + public CommonResponse qeryPlaceholderRules(@RequestBody CommonRequest commonRequest) throws IOException { + + CommonResponse resp = new CommonResponse(); + + QeryPlaceholderRequest request = JSONUtil.readParams(commonRequest.getData(), QeryPlaceholderRequest.class); + resp.setRet(EvcsConst.RET_FAIL); + if (request == null) { + resp.setMsg("Request or token params validation failed"); + }else{ + //获取占位规则信息 + + + + + } + + return resp; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index a875a04d..368ce78e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -97,7 +97,7 @@ @@ -513,17 +520,17 @@ when ho.charging_mode="App" then "App" when ho.charging_mode="刷卡" then "刷卡" else "vin码" - end chargingModeName + end chargingModeName from xhpc_placeholder_order ho - left join xhpc_charging_station as ct on ct.charging_station_id = ho.charging_station_id - left join xhpc_operator as op on op.operator_id = ct.operator_id - left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id - left join xhpc_terminal as ter on ter.terminal_id = ho.terminal_id - left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id - left join xhpc_internet_user as inu on inu.internet_user_id = ho.user_id and ho.internet_serial_number is not null and ho.source=1 - left join xhpc_app_user as apu on apu.app_user_id = ho.user_id and ho.internet_serial_number is null and ho.source=0 - left join xhpc_community_personnel as cop on cop.community_personnel_id = ho.user_id and ho.internet_serial_number is null and ho.source=2 - left join xhpc_customers_personnel as cup on cup.customers_personnel_id = ho.user_id and ho.internet_serial_number is null and ho.source=3 + left join xhpc_charging_station as ct on ct.charging_station_id = ho.charging_station_id + left join xhpc_operator as op on op.operator_id = ct.operator_id + left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id + left join xhpc_terminal as ter on ter.terminal_id = ho.terminal_id + left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id + left join xhpc_internet_user as inu on inu.internet_user_id = ho.user_id and ho.internet_serial_number is not null and ho.source=1 + left join xhpc_app_user as apu on apu.app_user_id = ho.user_id and ho.internet_serial_number is null and ho.source=0 + left join xhpc_community_personnel as cop on cop.community_personnel_id = ho.user_id and ho.internet_serial_number is null and ho.source=2 + left join xhpc_customers_personnel as cup on cup.customers_personnel_id = ho.user_id and ho.internet_serial_number is null and ho.source=3 where ho.placeholder_order_id=#{placeholderOrderId} @@ -629,4 +636,14 @@ + + diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/BmsReqChargerOutputDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/BmsReqChargerOutputDataLogic.java index 2165ce58..55ad73ae 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/BmsReqChargerOutputDataLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/BmsReqChargerOutputDataLogic.java @@ -241,7 +241,7 @@ public class BmsReqChargerOutputDataLogic implements ServiceLogic { // System.out.println("===================subtract========================="+subtract); - String bmsData = "800C"; // 从BMS获取的实际数据 + String bmsData = "4A09"; // 从BMS获取的实际数据 double current = BMSCurrentParser.parseBmsCurrent(bmsData,400); System.out.println("BMS电流需求: " + current + " A"); diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java index b5163970..017252c6 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java @@ -134,18 +134,6 @@ public class RealtimeDataLogic implements ServiceLogic { cacheGun.put("orderkey","order:"+orderNo); final String orderstarttime = DateUtil.format(Calendar.getInstance().getTime(), NORM_DATETIME_FORMAT); cacheGun.put("pileStartTime", orderstarttime); - -// String key = "placeholderOrder:"+terminalId+":*"; -// Collection orderKeys = REDIS.keys(key); -// for (String okey : orderKeys) { -// Map cacheGunYu = REDIS.getCacheMap(okey); -// if(cacheGunYu !=null && "0".equals(cacheGunYu.get("status").toString()) && !okey.equals("placeholderOrder:"+terminalId+":"+orderNo)){ -// cacheGunYu.put("status",1); -// cacheGunYu.put("endTime",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); -// REDIS.setCacheMap(okey, cacheGunYu); -// } -// } - } } List realtimeDataList = (List) cacheOrder.get("realtimeDataList"); @@ -310,20 +298,10 @@ public class RealtimeDataLogic implements ServiceLogic { public void run() { REDIS.setCacheObject("cdjgpc:realTime:"+orderNo,orderNo); //插枪状态发生变化进行判断是否收停车费 -// String vehicleGunStatus = pvgstable[Integer.parseInt(realtimeData.getVehicleGunStatus())]; -// if("否".equals(vehicleGunStatus)){ -// String gunkey = "placeholderOrder:"+terminalId+":*"; -// Collection orderKeys = REDIS.keys(gunkey); -// for (String okey : orderKeys) { -// Map cacheGun = REDIS.getCacheMap(okey); -// if(cacheGun !=null && "0".equals(cacheGun.get("status").toString())){ -// cacheGun.put("status",1); -// cacheGun.put("endTime",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); -// REDIS.setCacheMap(okey, cacheGun); -// } -// } -// } - + String vehicleGunStatus = pvgstable[Integer.parseInt(realtimeData.getVehicleGunStatus())]; + if("否".equals(vehicleGunStatus)){ + pileOrderService.getXhpcPlaceholderOrderTime(terminalId); + } } }); return new ServiceResult(false); diff --git a/xhpc-modules/xhpc-wxma/090ac4cbd7f185446277f378c4e36ce.jpg b/xhpc-modules/xhpc-wxma/090ac4cbd7f185446277f378c4e36ce.jpg deleted file mode 100644 index 3327bdd0..00000000 Binary files a/xhpc-modules/xhpc-wxma/090ac4cbd7f185446277f378c4e36ce.jpg and /dev/null differ diff --git a/xhpc-modules/xhpc-wxma/pom.xml b/xhpc-modules/xhpc-wxma/pom.xml index 992a2b05..ecaf7308 100644 --- a/xhpc-modules/xhpc-wxma/pom.xml +++ b/xhpc-modules/xhpc-wxma/pom.xml @@ -11,7 +11,7 @@ xhpc-wxma - 小程序服务 + 小程序服务 8 @@ -122,4 +122,4 @@ - \ No newline at end of file +