mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 09:29:59 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -7,10 +7,12 @@ import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
|
||||
import com.jsowell.pile.dto.QueryConnectorListDTO;
|
||||
import com.jsowell.pile.dto.QueryStationDTO;
|
||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.service.YKCPushCommandService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -29,7 +31,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@RequestMapping("/uniapp/pile")
|
||||
public class PileController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private YKCPushCommandService ykcPushCommandService;
|
||||
|
||||
@Autowired
|
||||
private IPileStationInfoService pileStationInfoService;
|
||||
@@ -106,4 +109,23 @@ public class PileController extends BaseController {
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程遥控地锁指令
|
||||
* @param command
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/remoteGroundLock")
|
||||
public RestApiResponse<?> remoteGroundLock(@RequestBody RemoteControlGroundLockCommand command) {
|
||||
logger.info("遥控地锁指令 params:{}", JSONObject.toJSONString(command));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
ykcPushCommandService.pushRemoteControlGroundLock(command);
|
||||
} catch (Exception e) {
|
||||
logger.error("遥控地锁指令 error, ", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("遥控地锁指令 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +88,8 @@ public class GroundLockDataUploadHandler extends AbstractHandler{
|
||||
String redisKey = CacheConstants.GROUND_LOCK_DATA + pileSn + connectorCode;
|
||||
redisCache.setCacheObject(redisKey, data, CacheConstants.cache_expire_time_10m);
|
||||
|
||||
log.info("[===地锁数据上送===] result: 桩编码:{}, 枪号:{}, 车位锁状态:{}, 车位状态:{}, 地锁电量状态:{}, 报警状态:{}",
|
||||
pileSn, connectorCode, parkingLockStatus, parkingStatus, groundLockElectric, alarmStatus);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ import bus from "@/bus/bus";
|
||||
import {getToken} from "@/utils/auth";
|
||||
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: "829b6b73f84682c2eb982eaa47a745b8",
|
||||
securityJsCode: "b6b6e07309486e524f9986e1f36a5e28",
|
||||
};
|
||||
export default {
|
||||
props:['stationLat','stationLng'],
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
initMap() {
|
||||
// console.log(lat, lng);
|
||||
AMapLoader.load({
|
||||
key: "61436c9c789d301a5b73853d176710cf", // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
key: "ba9123dd736bce40f30b52f7c0beebc1", // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
version: "1.4.15", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: ["AMap.AutoComplete", "AMap.PlaceSearch", "AMap.Geocoder"], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
||||
})
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
select(e) {
|
||||
this.placeSearch.search(e.poi.name); //关键字查询查询
|
||||
|
||||
@@ -450,6 +450,7 @@ export default {
|
||||
},
|
||||
// 渲染表格数据
|
||||
async queryStationInfo() {
|
||||
this.fileList=[];
|
||||
const res = await getStationInfo(this.stationId);
|
||||
console.log(res);
|
||||
this.station = res.data;
|
||||
@@ -498,8 +499,10 @@ export default {
|
||||
this.station.stationLng = String(data.pos[0]);
|
||||
this.station.stationLat = String(data.pos[1]);
|
||||
// console.log("修改后this.station", this.station);
|
||||
console.log(data.address,'data.address')
|
||||
this.station.address = data.address.includes('区') ? data.address.replace(/区/, ' ').split(' ')[1] : data.address
|
||||
console.log(data.address, "data.address");
|
||||
this.station.address = data.address.includes("区")
|
||||
? data.address.replace(/区/, " ").split(" ")[1]
|
||||
: data.address;
|
||||
// 优化之后
|
||||
// let newAddress2 = this.detailedAddress
|
||||
// .replace(/(?<=[省市区])/g, "$&,")
|
||||
|
||||
Reference in New Issue
Block a user