feat:对接一级口门相关方、临时车辆
parent
6eabea95a5
commit
b1a0c69d9a
11
pom.xml
11
pom.xml
|
|
@ -25,11 +25,14 @@
|
|||
<artifactId>zcloud_gbscommon</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- PostgreSQL驱动 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.6.0</version>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.25</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0 Env/production (2026/4/14 09:28:42) App/primeport"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0 Env/production (2026/4/15 16:42:26) App/primeport"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': 'micro-temp',
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();</script><script defer="defer" src="/primeport/static/js/75.7bab4be25660eb2345d0.js"></script><script defer="defer" src="/primeport/static/js/745.6424c1e7b93a41a016b6.js"></script><script defer="defer" src="/primeport/static/js/main.ab5bf21aa2eef1348d91.js"></script><link href="/primeport/static/css/main.ef1f3389c7ea99a7bdd0.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto;"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息、构建时间 */console.log("%c@cqsjjb/scripts@2.0.0 Env/production (2026/4/14 09:28:42) App/primeport Version/master Java/<branch-name>", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
})();</script><script defer="defer" src="/primeport/static/js/75.7bab4be25660eb2345d0.js"></script><script defer="defer" src="/primeport/static/js/745.8d0d26608a179feacd7b.js"></script><script defer="defer" src="/primeport/static/js/main.f302d2acf4623fb167f6.js"></script><link href="/primeport/static/css/main.ef1f3389c7ea99a7bdd0.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto;"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息、构建时间 */console.log("%c@cqsjjb/scripts@2.0.0 Env/production (2026/4/15 16:42:26) App/primeport Version/master Java/<branch-name>", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
|
|
@ -1 +1 @@
|
|||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"https://gbs-gateway.qhdsafety.com"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"primeport",contextInject:{appKey:"",fileUrl:"https://jpfz.qhdsafety.com/gbsFileTest/"},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8082",host:"127.0.0.1",open:!0},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"https://gbs-gateway.qhdsafety.com"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"primeport",contextInject:{appKey:"",fileUrl:""},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8082",host:"127.0.0.1",open:!0},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,95 +0,0 @@
|
|||
/*!
|
||||
* Signature Pad v2.3.2
|
||||
* https://github.com/szimek/signature_pad
|
||||
*
|
||||
* Copyright 2017 Szymon Nowak
|
||||
* Released under the MIT license
|
||||
*
|
||||
* The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
|
||||
* http://corner.squareup.com/2012/07/smoother-signatures.html
|
||||
*
|
||||
* Implementation of interpolation using cubic Bézier curves is taken from:
|
||||
* http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript
|
||||
*
|
||||
* Algorithm for approximated length of a Bézier curve is taken from:
|
||||
* http://www.lemoda.net/maths/bezier-length/index.html
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-signature-canvas": "^1.1.0-alpha.2",
|
||||
"zy-react-library": "^1.2.31"
|
||||
"zy-react-library": "^1.2.35"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class VehicleApplyController {
|
|||
@ApiOperation("检查部门车辆修改")
|
||||
@PutMapping("/inspectCarEdit")
|
||||
public Response inspectCarEdit(@Validated @RequestBody VehicleApplyInspectUpdateCmd cmd) {
|
||||
cmd.setRemarks(cmd.getCheckDepartmentName());
|
||||
vehicleApplyService.inspectCarEdit(cmd);
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.zcloud.api.VehicleDockLogServiceI;
|
||||
import com.zcloud.dto.VehicleDockLogAddCmd;
|
||||
import com.zcloud.dto.VehicleDockLogPageQry;
|
||||
import com.zcloud.dto.VehicleDockLogUpdateCmd;
|
||||
import com.zcloud.primeport.api.VehicleDockLogServiceI;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleDockLogCO;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public class ClosedAreaCarApplyAddExe {
|
|||
ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE();
|
||||
BeanUtils.copyProperties(cmd, closedAreaCarApplyE);
|
||||
closedAreaCarApplyE.setAuditFlag(AuditEnum.WAITING.getCode());
|
||||
closedAreaCarApplyE.setExpiredExpiration("2");
|
||||
if (!cmd.getCarBelongType().equals(CloseCarBelongTypeEnum.TEMPORARY_VEHICLES.getCode())) {
|
||||
SingleResponse<ZcloudUserCo> infoByUserId = zcloudUserFacade.getInfoByUserId(AuthContext.getUserId());
|
||||
ZcloudUserCo userData = infoByUserId.getData();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import java.util.Date;
|
|||
public class VehicleApplyAddExe {
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -46,8 +45,8 @@ public class VehicleApplyAddExe {
|
|||
examTypeE.setStatusFlag(2);
|
||||
examTypeE.setBlockedFlag(2);
|
||||
examTypeE.setMkmjPermission(2);
|
||||
examTypeE.setExpiredExpiration("2");
|
||||
examTypeE.setAuditFlag(AuditEnum.WAITING.getCode());
|
||||
// examTypeE.setApplyTime(DateUtil.date2Str(new Date()));
|
||||
// 股份、分公司个人车辆
|
||||
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.JGD_PRI_VEHICLES.getCode())
|
||||
|| cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.FGS_PRI_VEHICLES.getCode())) {
|
||||
|
|
@ -64,14 +63,14 @@ public class VehicleApplyAddExe {
|
|||
}
|
||||
}
|
||||
}
|
||||
// 相关方车辆
|
||||
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.XGF_VEHICLES.getCode())){
|
||||
// 相关方车辆
|
||||
SSOUser user = AuthContext.getCurrentUser();
|
||||
examTypeE.setVehicleCorpId(user.getTenantId());
|
||||
examTypeE.setVehicleCorpName(user.getTenantName());
|
||||
}
|
||||
// 临时
|
||||
if (cmd.getVehicleBelongType().equals(VehicleBelongTypeEnum.TEMP_VEHICLES.getCode())){
|
||||
// 临时
|
||||
examTypeE.setEmployeeVehicleUserName(cmd.getDrivingUserName());
|
||||
examTypeE.setLsUserIdcard(Base64.encodeToString(cmd.getLsUserIdcard()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import java.util.Date;
|
|||
public class VehicleAuditUpdateExe {
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final VehicleDockLogAddExe vehicleDockLogAddExe;
|
||||
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -60,6 +61,11 @@ public class VehicleAuditUpdateExe {
|
|||
TodoListCompleteEvent todoListCompleteEvent = new TodoListCompleteEvent();
|
||||
todoListCompleteEvent.setForeignSubsidiaryKey(vehicleAuditE.getId());
|
||||
todoListEventPusherUtil.sendMessageCompleteEvent(todoListCompleteEvent);
|
||||
if (vehicleApplyE.getMkmjPermission().equals(1)) {
|
||||
// 审批通过 进行数据对接。
|
||||
VehicleApplyE byId = vehicleApplyGateway.getById(cmd.getVehicleApplyId());
|
||||
vehicleDockLogAddExe.executeDockByApplyId(byId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.VehicleDockLogGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleApplyE;
|
||||
import com.zcloud.primeport.domain.model.VehicleDockLogE;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogAddCmd;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
|
|
@ -36,5 +37,12 @@ public class VehicleDockLogAddExe {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void executeDockByApplyId(VehicleApplyE byId) {
|
||||
if ("5".equals(byId.getVehicleBelongType())) {
|
||||
// 相关方单位车辆,单独计算下今天是否需要申请 入场与拉黑 有效期过期 expiredExpiration
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,108 +0,0 @@
|
|||
package com.zcloud.primeport.mjDevice;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.primeport.mjDevice.dto.OneLevelCarRemoveDto;
|
||||
import com.zcloud.primeport.mjDevice.dto.OneLevelCarSaveDto;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 一级车辆门禁对接 前缀
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class OneLevelCarUtil {
|
||||
|
||||
public static RestTemplate restTemplateOneLevelCarDock;
|
||||
private static Integer dockFlag;
|
||||
private static String prefix;
|
||||
|
||||
@Resource
|
||||
public void setrestTemplateOneLevelCarDock(RestTemplate restTemplateOneLevelCarDock) {
|
||||
OneLevelCarUtil.restTemplateOneLevelCarDock = restTemplateOneLevelCarDock;
|
||||
}
|
||||
|
||||
@Value("${kmmj.dockflag}")
|
||||
public void setDockFlag(Integer dockFlag) {
|
||||
OneLevelCarUtil.dockFlag = dockFlag;
|
||||
}
|
||||
|
||||
@Value("${oneLevelCar.prefix}")
|
||||
public void setDockFlag(String prefix) {
|
||||
OneLevelCarUtil.prefix = prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* 内部车辆保存
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void internalVehicleSave(OneLevelCarSaveDto oneLevelCarSaveDto) {
|
||||
if (dockFlag.equals(1)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(oneLevelCarSaveDto));
|
||||
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(jsonObject, new HttpHeaders());
|
||||
ResponseEntity<JSONObject> exchange = restTemplateOneLevelCarDock.exchange(
|
||||
prefix+"/HD_QHD_IGATE_1.0/webresources/login/CTruck/qaSaveInternal",
|
||||
HttpMethod.POST, httpEntity, JSONObject.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 内部车辆删除
|
||||
*
|
||||
*/
|
||||
public static void internalVehicleRemove(OneLevelCarRemoveDto carRemoveDto) {
|
||||
if (dockFlag.equals(1)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(carRemoveDto));
|
||||
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(jsonObject, new HttpHeaders());
|
||||
ResponseEntity<JSONObject> exchange = restTemplateOneLevelCarDock.exchange(
|
||||
prefix+"/HD_QHD_IGATE_1.0/webresources/login/CTruck/qaDeleteInternal",
|
||||
HttpMethod.POST, httpEntity, JSONObject.class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时车辆删除
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void tmpVehicleRemove() {
|
||||
// restTemplateOneLevelCarDock.exchange();
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时车辆新增
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void tmpVehicleSave() {
|
||||
// restTemplateOneLevelCarDock.exchange();
|
||||
}
|
||||
|
||||
/**
|
||||
* 黑名单车辆新增
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void blackVehicleSave() {
|
||||
// restTemplateOneLevelCarDock.exchange();
|
||||
}
|
||||
|
||||
/**
|
||||
* 黑名单车辆删除
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void blackVehicleRemove() {
|
||||
// restTemplateOneLevelCarDock.exchange();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
package com.zcloud.primeport.mjDevice;
|
||||
|
||||
import org.apache.http.config.Registry;
|
||||
import org.apache.http.config.RegistryBuilder;
|
||||
import org.apache.http.conn.socket.ConnectionSocketFactory;
|
||||
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
|
||||
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
|
||||
import org.apache.http.ssl.SSLContextBuilder;
|
||||
import org.apache.http.ssl.TrustStrategy;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
||||
import org.springframework.web.client.ResponseErrorHandler;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.io.IOException;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.time.Duration;
|
||||
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
//启动时需要实例化该类的一个实例
|
||||
@Autowired
|
||||
private RestTemplateBuilder builder;
|
||||
//使用RestTemplateBuilder来实例化RestTemplate对象,Spring已经默认注入了RestTemplateBuilder实例
|
||||
@Bean
|
||||
public RestTemplate restTemplateDock(){
|
||||
builder.setConnectTimeout(Duration.ofSeconds(5));
|
||||
builder.setReadTimeout(Duration.ofSeconds(5));
|
||||
return builder.build();
|
||||
}
|
||||
@Bean
|
||||
public RestTemplate restTemplateOneLevelCarDock(){
|
||||
|
||||
builder.setConnectTimeout(Duration.ofSeconds(5));
|
||||
builder.setReadTimeout(Duration.ofSeconds(5));
|
||||
return builder.build();
|
||||
}
|
||||
@Bean
|
||||
public RestTemplate restTemplateHbsy(HttpComponentsClientHttpRequestFactory httpsFactory) {
|
||||
RestTemplate restTemplate = new RestTemplate(httpsFactory);
|
||||
restTemplate.setErrorHandler(new ResponseErrorHandler() {
|
||||
@Override
|
||||
public boolean hasError(ClientHttpResponse response) throws IOException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleError(ClientHttpResponse response) throws IOException {
|
||||
|
||||
}
|
||||
});
|
||||
return restTemplate;
|
||||
}
|
||||
|
||||
@Bean("httpsFactory")
|
||||
public HttpComponentsClientHttpRequestFactory httpComponentsClientHttpRequestFactory() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
|
||||
CloseableHttpClient httpClient = client();
|
||||
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient);
|
||||
factory.setConnectTimeout(20000);
|
||||
return factory;
|
||||
}
|
||||
|
||||
private CloseableHttpClient client() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
|
||||
HttpClientBuilder builder = HttpClientBuilder.create();
|
||||
// 无条件信任ssl证书
|
||||
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
|
||||
@Override
|
||||
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
|
||||
return true;
|
||||
}
|
||||
}).build();
|
||||
builder.setSSLContext(sslContext);
|
||||
NoopHostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE;
|
||||
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, hostnameVerifier);
|
||||
Registry<ConnectionSocketFactory> registry = RegistryBuilder.<ConnectionSocketFactory>create().register("http", PlainConnectionSocketFactory.getSocketFactory()).register("https", sslConnectionSocketFactory).build();
|
||||
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);
|
||||
connectionManager.setMaxTotal(200);
|
||||
connectionManager.setDefaultMaxPerRoute(100);
|
||||
builder.setConnectionManager(connectionManager);
|
||||
return builder.build();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -110,6 +110,7 @@ public class VehicleApplyServiceImpl implements VehicleApplyServiceI {
|
|||
vehicleApplyDO.setAuditFlag(AuditEnum.NO_APPROVAL_REQUIRED.getCode());
|
||||
vehicleApplyDO.setStatusFlag(2);
|
||||
vehicleApplyDO.setMkmjPermission(1);
|
||||
vehicleApplyDO.setExpiredExpiration("2");
|
||||
vehicleApplyDO.setRemarks(cmd.getRemarks());
|
||||
vehicleApplyDO.setVehicleBelongType(cmd.getVehicleBelongType());
|
||||
// vehicleApplyDO.setApplyTime(DateUtil.date2Str(new Date()));
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
package com.zcloud.primeport.service;
|
||||
|
||||
import com.zcloud.api.VehicleDockLogServiceI;
|
||||
import com.zcloud.command.VehicleDockLogAddExe;
|
||||
import com.zcloud.command.VehicleDockLogRemoveExe;
|
||||
import com.zcloud.command.VehicleDockLogUpdateExe;
|
||||
import com.zcloud.command.query.VehicleDockLogQueryExe;
|
||||
import com.zcloud.dto.VehicleDockLogAddCmd;
|
||||
import com.zcloud.dto.VehicleDockLogPageQry;
|
||||
import com.zcloud.dto.VehicleDockLogUpdateCmd;
|
||||
import com.zcloud.primeport.api.VehicleDockLogServiceI;
|
||||
import com.zcloud.primeport.command.VehicleDockLogAddExe;
|
||||
import com.zcloud.primeport.command.VehicleDockLogRemoveExe;
|
||||
import com.zcloud.primeport.command.VehicleDockLogUpdateExe;
|
||||
import com.zcloud.primeport.command.query.VehicleDockLogQueryExe;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleDockLogUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleDockLogCO;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@ public class VehicleApplyAddCmd extends Command {
|
|||
private String lsUserPhone;
|
||||
@ApiModelProperty(value = "临时申请驾驶人身份证", name = "lsUserIdcard")
|
||||
private String lsUserIdcard;
|
||||
@ApiModelProperty(value = "临时申请驾驶人姓名", name = "lsUserIdcard")
|
||||
@ApiModelProperty(value = "临时申请驾驶人姓名", name = "drivingUserId")
|
||||
private Long drivingUserId;
|
||||
@ApiModelProperty(value = "临时申请驾驶人姓名", name = "drivingUserName")
|
||||
private String drivingUserName;
|
||||
@ApiModelProperty(value = "来访事由", name = "remarks")
|
||||
private String remarks;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ public class VehicleApplyInspectUpdateCmd {
|
|||
private Long id;
|
||||
@ApiModelProperty(value = "名称", name = "remarks")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "名称", name = "checkDepartmentName")
|
||||
private String checkDepartmentName;
|
||||
@ApiModelProperty(value = "车牌类型数据字典", name = "licenceType")
|
||||
private String licenceType;
|
||||
@ApiModelProperty(value = "车牌类型名称0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌", name = "licenceTypeName")
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ public class VehicleApplyCO extends ClientObject {
|
|||
//访问结束时间
|
||||
@ApiModelProperty(value = "访问结束时间")
|
||||
private String visitEndTime;
|
||||
@ApiModelProperty(value = "有效期是否过期。1过期2没过期")
|
||||
private String expiredExpiration;
|
||||
//车辆所属企业ID
|
||||
@ApiModelProperty(value = "车辆所属企业ID")
|
||||
private Long vehicleCorpId;
|
||||
|
|
|
|||
|
|
@ -68,41 +68,6 @@ public class VehicleDockLogCO extends ClientObject {
|
|||
//对接失败原因
|
||||
@ApiModelProperty(value = "对接失败原因")
|
||||
private String reasonsRefusal;
|
||||
//删除标识
|
||||
@ApiModelProperty(value = "删除标识")
|
||||
private String deleteEnum;
|
||||
//创建时间
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
//更新时间
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
//创建人ID
|
||||
@ApiModelProperty(value = "创建人ID")
|
||||
private Long createId;
|
||||
//更新人ID
|
||||
@ApiModelProperty(value = "更新人ID")
|
||||
private Long updateId;
|
||||
//环境标识
|
||||
@ApiModelProperty(value = "环境标识")
|
||||
private String env;
|
||||
//创建人姓名
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String createName;
|
||||
//更新人姓名
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updateName;
|
||||
//租户ID
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private Long tenantId;
|
||||
//组织ID
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long orgId;
|
||||
//版本号
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
//备注
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public class ClosedAreaCarApplyE extends BaseE {
|
|||
private String visitStartTime;
|
||||
//访问结束时间
|
||||
private String visitEndTime;
|
||||
private String expiredExpiration;
|
||||
//区域管辖单位名id
|
||||
private Long jurisdictionalCorpId;
|
||||
//区域管辖单位名称
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public class VehicleApplyE extends BaseE {
|
|||
private String visitStartTime;
|
||||
//访问结束时间
|
||||
private String visitEndTime;
|
||||
private String expiredExpiration;
|
||||
//车辆所属企业ID
|
||||
private Long vehicleCorpId;
|
||||
//车辆所属企业名称
|
||||
|
|
@ -61,6 +62,7 @@ public class VehicleApplyE extends BaseE {
|
|||
private String emissionStandardsName;
|
||||
//行驶证照片
|
||||
private String drivingLicenseId;
|
||||
private Long drivingUserId;
|
||||
private String drivingUserName;
|
||||
//车辆照片
|
||||
private String attachmentId;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public class ClosedAreaCarApplyDO extends BaseDO {
|
|||
//访问结束时间
|
||||
@ApiModelProperty(value = "访问结束时间")
|
||||
private String visitEndTime;
|
||||
private String expiredExpiration;
|
||||
//区域管辖单位名id
|
||||
@ApiModelProperty(value = "区域管辖单位名id")
|
||||
private Long jurisdictionalCorpId;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ public class VehicleApplyDO extends BaseDO {
|
|||
//访问结束时间
|
||||
@ApiModelProperty(value = "访问结束时间")
|
||||
private String visitEndTime;
|
||||
@ApiModelProperty(value = "有效期是否过期。1过期2没过期")
|
||||
private String expiredExpiration;
|
||||
//车辆所属企业ID
|
||||
@ApiModelProperty(value = "车辆所属企业ID")
|
||||
private Long vehicleCorpId;
|
||||
|
|
@ -106,6 +108,7 @@ public class VehicleApplyDO extends BaseDO {
|
|||
private String mkmjName;
|
||||
private String lsUserPhone;
|
||||
private String lsUserIdcard;
|
||||
private Long drivingUserId;
|
||||
private String drivingUserName;
|
||||
@ApiModelProperty(value = "审核企业")
|
||||
@TableField(exist = false)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.jjb.saas.framework.datascope.annotation.DataScopes;
|
|||
import com.zcloud.primeport.persistence.dataobject.AppCountDTO;
|
||||
import com.zcloud.primeport.persistence.dataobject.FgsVehicleCountDto;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleApplyDO;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -35,5 +36,7 @@ public interface VehicleApplyMapper extends BaseMapper<VehicleApplyDO> {
|
|||
VehicleApplyDO getInfoById(Long id);
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<VehicleApplyDO> getAppCount(@Param("params") Map<String, Object> parmas);
|
||||
|
||||
List<OneLevelCarSaveDto> listTodayHasPort(String licenceNo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|||
import com.zcloud.primeport.persistence.dataobject.AppCountDTO;
|
||||
import com.zcloud.primeport.persistence.dataobject.FgsVehicleCountDto;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleApplyDO;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -26,5 +27,7 @@ public interface VehicleApplyRepository extends BaseRepository<VehicleApplyDO> {
|
|||
VehicleApplyDO getInfoById(Long id);
|
||||
|
||||
List<AppCountDTO> getAppCount(Map<String, Object> parmas);
|
||||
|
||||
List<OneLevelCarSaveDto> listTodayHasPort(String licenceNo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,11 @@ import com.zcloud.primeport.persistence.dataobject.VehicleApplyDO;
|
|||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||
import com.zcloud.primeport.persistence.mapper.VehicleApplyMapper;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleApplyRepository;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
|
|
@ -104,5 +102,10 @@ public class VehicleApplyRepositoryImpl extends BaseRepositoryImpl<VehicleApplyM
|
|||
});
|
||||
return appCountDTOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OneLevelCarSaveDto> listTodayHasPort(String licenceNo) {
|
||||
return vehicleApplyMapper.listTodayHasPort(licenceNo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
package com.zcloud.primeport.plan;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.jjb.saas.framework.job.Job;
|
||||
import com.jjb.saas.framework.job.annotation.JobRegister;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.primeport.persistence.dataobject.ClosedAreaCarApplyDO;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleApplyDO;
|
||||
import com.zcloud.primeport.persistence.repository.ClosedAreaCarApplyRepository;
|
||||
import com.zcloud.primeport.persistence.repository.ClosedAreaRepository;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleApplyRepository;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.CarEnum;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarRemoveDto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
public class VehicleExpiredExpirationXxlJob implements Job {
|
||||
|
||||
@Resource
|
||||
private VehicleApplyRepository vehicleApplyRepository;
|
||||
@Resource
|
||||
private ClosedAreaCarApplyRepository closedAreaCarApplyRepository;
|
||||
@Resource
|
||||
private ClosedAreaRepository closedAreaRepository;
|
||||
|
||||
// 每天晚上12,10分执行,把过期的车刷新状态,过期车移除门禁系统。不处理临时车、相关方车。
|
||||
@Override
|
||||
@JobRegister(cron = "0 10 0 * * ?", jobDesc = "口门定时任务,进行车辆有效期过期判定", triggerStatus = 1)
|
||||
@XxlJob("com.zcloud.plan.VehicleExpiredExpirationXxlJob")
|
||||
public ReturnT<String> execute(String param) {
|
||||
QueryWrapper<VehicleApplyDO> objectQueryWrapper = new QueryWrapper<>();
|
||||
objectQueryWrapper.eq("expired_expiration", 2);
|
||||
objectQueryWrapper.in("audit_flag", 2, 4);
|
||||
objectQueryWrapper.lt("visit_end_time", DateUtil.date2Str(new Date(), "yyyy-MM-dd"));
|
||||
List<VehicleApplyDO> list = vehicleApplyRepository.list(objectQueryWrapper);
|
||||
// ArrayList<OneLevelCarRemoveDto> oneLevelCarRemoveDtos = new ArrayList<>();
|
||||
// 临时车
|
||||
// ArrayList<OneLevelCarRemoveDto> tmpOneLevelCarRemoveDtos = new ArrayList<>();
|
||||
if (!list.isEmpty()) {
|
||||
List<Long> idList = list.stream()
|
||||
.map(VehicleApplyDO::getId)
|
||||
.collect(Collectors.toList());
|
||||
UpdateWrapper<VehicleApplyDO> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set("expired_expiration", 1);
|
||||
updateWrapper.set("mkmj_permission", 2);
|
||||
updateWrapper.in("id", idList);
|
||||
vehicleApplyRepository.update(updateWrapper);
|
||||
// list.forEach(item -> {
|
||||
// OneLevelCarRemoveDto oneLevelCarRemoveDto = new OneLevelCarRemoveDto();
|
||||
// oneLevelCarRemoveDto.setTruckNo(item.getLicenceNo());
|
||||
// oneLevelCarRemoveDto.setTruckCardColor(CarEnum.getMenuKeyByPath(item.getLicenceTypeName()));
|
||||
// oneLevelCarRemoveDtos.add(oneLevelCarRemoveDto);
|
||||
// });
|
||||
}
|
||||
// QueryWrapper<ClosedAreaCarApplyDO> closetCarQueryWrapper = new QueryWrapper<>();
|
||||
// closetCarQueryWrapper.eq("expired_expiration", 2);
|
||||
// closetCarQueryWrapper.eq("audit_flag", 2);
|
||||
// closetCarQueryWrapper.lt("visit_end_time", DateUtil.date2Str(new Date(), "yyyy-MM-dd"));
|
||||
// List<ClosedAreaCarApplyDO> closedAreaCarList = closedAreaCarApplyRepository.list(closetCarQueryWrapper);
|
||||
// if (!closedAreaCarList.isEmpty()) {
|
||||
// List<Long> idList = closedAreaCarList.stream()
|
||||
// .map(ClosedAreaCarApplyDO::getId)
|
||||
// .collect(Collectors.toList());
|
||||
// UpdateWrapper<ClosedAreaCarApplyDO> updateWrapper = new UpdateWrapper<>();
|
||||
// updateWrapper.set("expired_expiration", 1);
|
||||
// updateWrapper.in("id", idList);
|
||||
// closedAreaCarApplyRepository.update(updateWrapper);
|
||||
// closedAreaCarList.forEach(item -> {
|
||||
// // 一级口门车辆删除
|
||||
// OneLevelCarRemoveDto oneLevelCarRemoveDto = new OneLevelCarRemoveDto();
|
||||
// oneLevelCarRemoveDto.setTruckNo(item.getLicenceNo());
|
||||
// oneLevelCarRemoveDto.setTruckCardColor(CarEnum.getMenuKeyByPath(item.getLicenceTypeName()));
|
||||
// oneLevelCarRemoveDtos.add(oneLevelCarRemoveDto);
|
||||
// // 二级口门车辆删除
|
||||
// });
|
||||
// }
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.zcloud.primeport.plan;
|
||||
|
||||
import com.jjb.saas.framework.job.Job;
|
||||
import com.jjb.saas.framework.job.annotation.JobRegister;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleApplyRepository;
|
||||
import com.zcloud.primeport.plan.mjDevice.CarDockUtil;
|
||||
import com.zcloud.primeport.plan.mjDevice.OneLevelCarUtil;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class VehicleXgfVehicleXxlJob implements Job {
|
||||
|
||||
@Resource
|
||||
private CarDockUtil carDockUtil;
|
||||
|
||||
@Override
|
||||
@JobRegister(cron = "0 15 0 * * ?", jobDesc = "口门定时任务,相关方、临时车辆每日进行判断能进入哪个港区。", triggerStatus = 1)
|
||||
@XxlJob("com.zcloud.plan.VehicleXgfVehicleXxlJob")
|
||||
public ReturnT<String> execute(String param) {
|
||||
carDockUtil.execute(param);
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.primeport.plan.mjDevice;
|
||||
|
||||
import com.zcloud.primeport.persistence.repository.VehicleApplyRepository;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.CarEnum;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class CarDockUtil {
|
||||
@Resource
|
||||
private VehicleApplyRepository vehicleApplyRepository;
|
||||
@Resource
|
||||
private OneLevelCarUtil oneLevelCarUtil;
|
||||
// 同步封闭区域车、一级口门临时、相关方车
|
||||
public void execute(String licenceNo) {
|
||||
// 一级口门车辆
|
||||
List<OneLevelCarSaveDto> dataList = vehicleApplyRepository.listTodayHasPort(licenceNo);
|
||||
dataList.forEach(item -> {
|
||||
item.setTruckCardColor(CarEnum.getMenuKeyByPath(item.getTruckCardColor()));
|
||||
item.setTruckTypCod(CarEnum.getMenuKeyByPath(item.getTruckTypCod()));
|
||||
// 1-东港区 2-西港区
|
||||
item.setPortId("0");
|
||||
if ("QHD_GQ_DGQ".equals(item.getAuthAreasCode())) {
|
||||
item.setPortId("1");
|
||||
}
|
||||
if ("QHD_GQ_XGQ".equals(item.getAuthAreasCode())) {
|
||||
item.setPortId("2");
|
||||
}
|
||||
oneLevelCarUtil.tmpVehicleSave(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.zcloud.primeport.mjDevice;
|
||||
package com.zcloud.primeport.plan.mjDevice;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONObject;
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.zcloud.primeport.plan.mjDevice;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarRemoveDto;
|
||||
import com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 一级车辆门禁对接 前缀
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class OneLevelCarUtil {
|
||||
@Value("${kmmj.dockflag}")
|
||||
private Integer dockFlag;
|
||||
@Value("${oneLevelCar.prefix}")
|
||||
private String prefix;
|
||||
|
||||
/**
|
||||
* 内部车辆保存
|
||||
*
|
||||
*
|
||||
*/
|
||||
public void internalVehicleSave(OneLevelCarSaveDto oneLevelCarSaveDto) {
|
||||
if (dockFlag.equals(1)) {
|
||||
String body = HttpRequest.post(prefix + "HD_QHD_IGATE_1.0/webresources/login/CTruck/qaSaveInternal").body(new JSONObject(oneLevelCarSaveDto).toString()).execute().body();
|
||||
JSONObject resJson = new JSONObject(body);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 内部车辆删除
|
||||
*
|
||||
*/
|
||||
public void internalVehicleRemove(OneLevelCarRemoveDto carRemoveDto) {
|
||||
if (dockFlag.equals(1)) {
|
||||
String body = HttpRequest.post(prefix + "HD_QHD_IGATE_1.0/HD_QHD_IGATE_1.0/webresources/login/CTruck/qaDeleteInternal").body(new JSONObject(carRemoveDto).toString()).execute().body();
|
||||
JSONObject resJson = new JSONObject(body);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时车辆删除
|
||||
*
|
||||
*
|
||||
*/
|
||||
public void tmpVehicleRemove(OneLevelCarRemoveDto carRemoveDto) {
|
||||
if (dockFlag.equals(1)) {
|
||||
String body = HttpRequest.post(prefix + "HD_QHD_IGATE_1.0/webresources/login/CTruck/qaDeleTemp").body(new JSONObject(carRemoveDto).toString()).execute().body();
|
||||
JSONObject resJson = new JSONObject(body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时车辆新增
|
||||
*
|
||||
*
|
||||
*/
|
||||
public void tmpVehicleSave(OneLevelCarSaveDto oneLevelCarSaveDto) {
|
||||
if (dockFlag.equals(1)) {
|
||||
oneLevelCarSaveDto.setIsNeedCheck("0");
|
||||
String body = HttpRequest.post(prefix + "HD_QHD_IGATE_1.0/webresources/login/CTruck/qaSaveTemp").body(new JSONObject(oneLevelCarSaveDto).toString()).execute().body();
|
||||
JSONObject resJson = new JSONObject(body);
|
||||
if ("1".equals(resJson.get("code",String.class))) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 黑名单车辆新增
|
||||
*
|
||||
*
|
||||
*/
|
||||
public void blackVehicleSave() {
|
||||
// restTemplateOneLevelCarDock.exchange();
|
||||
}
|
||||
|
||||
/**
|
||||
* 黑名单车辆删除
|
||||
*
|
||||
*
|
||||
*/
|
||||
public void blackVehicleRemove() {
|
||||
// restTemplateOneLevelCarDock.exchange();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.zcloud.primeport.mjDevice;
|
||||
package com.zcloud.primeport.plan.mjDevice;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import java.security.KeyFactory;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.zcloud.primeport.mjDevice;
|
||||
package com.zcloud.primeport.plan.mjDevice;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
|
@ -1,37 +1,35 @@
|
|||
package com.zcloud.primeport.mjDevice.dto;
|
||||
package com.zcloud.primeport.plan.mjDevice.dto;
|
||||
|
||||
import com.zcloud.primeport.domain.enums.MenuEnum;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
public enum CarEnum {
|
||||
WHITE("2", "white"),
|
||||
BLUE("0", "blue"),
|
||||
YELLOW("1", "yellow"),
|
||||
GREEN("4", "green"),
|
||||
BLACK("3", "black"),
|
||||
OTHER_CARD("5", "other_card"),
|
||||
WHITE("white", "2"),
|
||||
BLUE("blue", "0"),
|
||||
YELLOW("yellow", "1"),
|
||||
GREEN("green", "4"),
|
||||
BLACK("black", "3"),
|
||||
OTHER_CARD("other_card", "5"),
|
||||
WXP("WXP", "WXP"),
|
||||
QH("QH", "QH"),
|
||||
XK("XK", "XK"),
|
||||
ZK("ZK", "ZK"),
|
||||
DK("DK", "DK"),
|
||||
BG("BG", "BG"),
|
||||
TZ("TZ", "TZ"),
|
||||
ZX("ZX", "ZX"),
|
||||
JSXH("JSXH", "JSXH"),
|
||||
MV("MV", "MV"),
|
||||
IW("IW", "IW"),
|
||||
CR("CR", "CR"),
|
||||
CC("CC", "CC"),
|
||||
Z7("Z7", "Z7"),
|
||||
WXP_BLUE("WXP_BLUE", "WXP_BLUE"),
|
||||
QHD_GQ_DGQ_XGQ("0", "QHD_GQ_DGQ-QHD_GQ_XGQ"),
|
||||
QHD_GQ_DGQ("1", "QHD_GQ_DGQ"),
|
||||
QHD_GQ_XGQ("2", "QHD_GQ_XGQ"),
|
||||
QH("qxhc", "QH"),
|
||||
XK("xxhc", "XK"),
|
||||
ZK("zxhc", "ZK"),
|
||||
DK("dxhc", "DK"),
|
||||
BG("zxbgqy", "BG"),
|
||||
TZ("tzzyc", "TZ"),
|
||||
ZX("zxzxhc", "ZX"),
|
||||
JSXH("jsgxhhc", "JSXH"),
|
||||
MV("qzyxjc", "MV"),
|
||||
IW("qzysjc", "IW"),
|
||||
CR("mbc", "CR"),
|
||||
CC("pk", "CC"),
|
||||
WXP_BLUE("wxplp", "WXP_BLUE"),
|
||||
Z7("sngc", "Z7");
|
||||
// WXP 危险品(黄牌)
|
||||
// QH 轻型货车
|
||||
// XK 小型客车
|
||||
|
|
@ -48,8 +46,6 @@ public enum CarEnum {
|
|||
// Z7 水泥罐车
|
||||
// WXP_BLUE 危险品(蓝牌)
|
||||
|
||||
ZGDW_LSCLGLJL_RECORD("/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicleRecords/list", "zgdw-lsclgljl-record");
|
||||
|
||||
private final String path;
|
||||
private final String menuKey;
|
||||
|
||||
|
|
@ -69,18 +65,18 @@ public enum CarEnum {
|
|||
return menuKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过path获取枚举
|
||||
*/
|
||||
public static CarEnum getByPath(String path) {
|
||||
return PATH_MAP.get(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过path获取menuKey
|
||||
*/
|
||||
public static String getMenuKeyByPath(String path) {
|
||||
CarEnum entry = PATH_MAP.get(path);
|
||||
if (path.contains(",")) {
|
||||
return "MV";
|
||||
}
|
||||
return entry != null ? entry.getMenuKey() : null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(getMenuKeyByPath("blue"));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.zcloud.primeport.mjDevice.dto;
|
||||
package com.zcloud.primeport.plan.mjDevice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.zcloud.primeport.mjDevice.dto;
|
||||
package com.zcloud.primeport.plan.mjDevice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -41,6 +41,7 @@ public class OneLevelCarSaveDto {
|
|||
private String portId;
|
||||
// 运全路 传入代码 0 不可以,1 可以
|
||||
private String yqlCheckFlag;
|
||||
private String isNeedCheck;
|
||||
// 有效期 格式为yyyy-MM-dd 例子2025-05-01
|
||||
private String validDte;
|
||||
// 司机名称 司机名称字符串
|
||||
|
|
@ -62,4 +63,7 @@ public class OneLevelCarSaveDto {
|
|||
private String recNam;
|
||||
// 创建时间 格式yyyy-MM-dd HH:mm 例子2025-04-01 12:25
|
||||
private String recTim;
|
||||
private String authAreasCode;
|
||||
private String authAreas;
|
||||
|
||||
}
|
||||
|
|
@ -35,6 +35,7 @@
|
|||
f.project_id,
|
||||
f.project_name,
|
||||
f.blocked_flag,
|
||||
f.expired_expiration,
|
||||
a.audit_user_id,
|
||||
a.audit_user_name,
|
||||
a.audit_dept_id,
|
||||
|
|
@ -160,5 +161,31 @@
|
|||
tmp.belong_type,
|
||||
tmp.audit_user_id
|
||||
</select>
|
||||
<select id="listTodayHasPort" resultType="com.zcloud.primeport.plan.mjDevice.dto.OneLevelCarSaveDto">
|
||||
SELECT
|
||||
licence_no truck_no,
|
||||
licence_type truck_card_color,
|
||||
DATE_FORMAT( now(), '%Y-%m-%d' ) valid_dte,
|
||||
now() rec_tim,
|
||||
0 yql_check_flag,
|
||||
"双控平台" rec_nam,
|
||||
GROUP_CONCAT( DISTINCT vehicle_type ) truck_typ_cod,
|
||||
GROUP_CONCAT( DISTINCT driving_user_name ) driver_nam,
|
||||
GROUP_CONCAT( DISTINCT ls_user_phone ) link_tel,
|
||||
GROUP_CONCAT( DISTINCT JSON_UNQUOTE( JSON_EXTRACT( gate_level_auth_area, '$."area"[0]."bianma"' )) SEPARATOR ';' ) AS auth_areas_code,
|
||||
GROUP_CONCAT( DISTINCT JSON_UNQUOTE( JSON_EXTRACT( gate_level_auth_area, '$."area"[0]."value"' )) SEPARATOR ';' ) AS auth_areas
|
||||
FROM
|
||||
vehicle_apply
|
||||
WHERE
|
||||
delete_enum = 'FALSE'
|
||||
AND audit_flag = 2 AND visit_start_time <= now() AND visit_end_time >= now()
|
||||
AND vehicle_belong_type IN ( 5, 6 )
|
||||
<if test="licenceNo != null and licenceNo != ''">
|
||||
AND licence_no = #{licenceNo}
|
||||
</if>
|
||||
GROUP BY
|
||||
licence_no,
|
||||
licence_type
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue