feat:初始化门禁
parent
eae5d090a0
commit
3a8bd3361c
|
|
@ -1,7 +1,8 @@
|
|||
spring:
|
||||
config:
|
||||
import:
|
||||
- classpath:nacos.yml
|
||||
# - classpath:nacos.yml
|
||||
- classpath:prodnacos.yml
|
||||
- classpath:sdk.yml
|
||||
- classpath:swagger.yml
|
||||
# - classpath:ds.yml
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
nacos:
|
||||
url: prod-nacos:8848
|
||||
namespace: jjb-dragon
|
||||
application:
|
||||
name: zcloud-gbs-primeport
|
||||
version:
|
||||
gateway: primeport
|
||||
cn-name: 一级口门管理
|
||||
spring:
|
||||
application:
|
||||
name: ${application.name}${application.version}
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: prod
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
namespace: ${nacos.namespace}
|
||||
server-addr: ${nacos.url}
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- config-common.yml
|
||||
- config-port.yml
|
||||
- config-mq.yml
|
||||
- config-log.yml
|
||||
- config-sdk-server.yml
|
||||
- config-actuator.yml
|
||||
- config-job.yml
|
||||
- config-mysql.yml
|
||||
- config-redis.yml
|
||||
- config-cache.yml
|
||||
- config-spring.yml
|
||||
- config-mybatis.yml
|
||||
- config-sdk.yml
|
||||
- config-flyway.yml
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
sdk:
|
||||
server:
|
||||
app-key: 722091ff53dd4abba078c2a00efd4a42
|
||||
app-key: bbab676d39e443cfacc037ee15fdad37
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
|
|
@ -14,7 +14,7 @@ sdk:
|
|||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: lb://${application.name}
|
||||
uri: http://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
|
|
@ -25,7 +25,7 @@ sdk:
|
|||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: lb://jjb-saas-base
|
||||
uri: http://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
openapi:
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/10/17 11:07:53) App/risk"><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',
|
||||
fontFamily: 'PingFangSC-Regular',
|
||||
colorPrimary: '#1677ff',
|
||||
borderRadius: parseInt('2')
|
||||
},
|
||||
appKey: '',
|
||||
basename: 'risk',
|
||||
API_HOST: ''
|
||||
};
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || APP_ENV.API_HOST || window.location.origin;
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: 'production'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();</script><script defer="defer" src="/risk/static/js/295.21df88c875577274cecb.js"></script><script defer="defer" src="/risk/static/js/main.4c0885586ad9a06ab444.js"></script><link href="/risk/static/css/main.40fc518bb0818fe8b8ea.css" rel="stylesheet"></head><body style="overflow: hidden"><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息、构建时间 */console.log("%c@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/10/17 11:07:53) App/risk Version/master Java/<branch-name>", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
body,html{height:100%;width:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{font-weight:500;margin-bottom:.5em;margin-top:0}p{margin-bottom:1em;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-bottom:1em;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-bottom:1em;margin-top:0;overflow:auto}figure{margin:0 0 1em}img{border-style:none;vertical-align:middle}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;padding-bottom:.3em;padding-top:.75em;text-align:left}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5em;line-height:inherit;margin-bottom:.5em;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{background-color:#feffe6;padding:.2em}
|
||||
|
|
@ -1 +0,0 @@
|
|||
module.exports={compact:!1,plugins:[["@babel/plugin-proposal-decorators",{legacy:!0}]],presets:[["@babel/preset-env",{targets:{browsers:["ie >= 10"]}}],["@babel/preset-react",{runtime:"automatic"}]]};
|
||||
|
|
@ -1 +0,0 @@
|
|||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.20.100:30140/demo2"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"risk",contextInject:{appKey:""},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8080",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,135 +0,0 @@
|
|||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* isobject <https://github.com/jonschlinkert/isobject>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
||||
/**
|
||||
* @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 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.
|
||||
*/
|
||||
|
||||
/** @preserve
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*/
|
||||
|
||||
/** @preserve
|
||||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
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 */
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"name": "micro-app",
|
||||
"version": "2.0.0",
|
||||
"description": "建教帮微应用模板",
|
||||
"author": "JJB",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
|
||||
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
|
||||
"push": "jjb-cmd push java production",
|
||||
"clean-cache": "rimraf node_modules/.cache/webpack",
|
||||
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
||||
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
||||
"build:development": "cross-env NODE_ENV=development npm run build",
|
||||
"build:production": "cross-env NODE_ENV=production npm run build",
|
||||
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
||||
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "latest",
|
||||
"@cqsjjb/jjb-common-decorator": "latest",
|
||||
"@cqsjjb/jjb-common-lib": "latest",
|
||||
"@cqsjjb/jjb-dva-runtime": "latest",
|
||||
"@cqsjjb/jjb-react-admin-component": "latest",
|
||||
"ahooks": "^3.9.5",
|
||||
"antd": "latest",
|
||||
"dayjs": "^1.11.7",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||
"@cqsjjb/scripts": "latest",
|
||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"eslint-plugin-react-hooks": "^7.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.23",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,8 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.MkmjServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPageQry;
|
||||
|
|
@ -18,14 +14,9 @@ import lombok.AllArgsConstructor;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:15
|
||||
*/
|
||||
@Api(tags = "门口信息管理表")
|
||||
@RequestMapping("/${application.gateway}/mkmj")
|
||||
@RestController
|
||||
|
|
@ -45,12 +36,6 @@ public class MkmjController {
|
|||
return mkmjService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjCO> getInfoById(@PathVariable("id") Long id) {
|
||||
|
|
@ -64,18 +49,21 @@ public class MkmjController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
// @ApiOperation("删除多个")
|
||||
// @DeleteMapping("/ids")
|
||||
// public Response removeBatch(@RequestParam String ids) {
|
||||
// mkmjService.removeBatch(ids);
|
||||
// return SingleResponse.buildSuccess();
|
||||
// }
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjUpdateCmd mkmjUpdateCmd) {
|
||||
mkmjService.edit(mkmjUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("名称唯一性校验")
|
||||
@GetMapping("/check-name")
|
||||
public SingleResponse<Map<String, Boolean>> checkName(@RequestParam String mkmjName, @RequestParam(required = false) Long id) {
|
||||
Boolean available = mkmjService.checkName(mkmjName, id);
|
||||
Map<String, Boolean> result = new HashMap<>();
|
||||
result.put("available", available);
|
||||
return SingleResponse.of(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
|
|
@ -36,7 +38,6 @@ public class MkmjGateController {
|
|||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjGateCO> add(@Validated @RequestBody MkmjGateAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjGateService.add(cmd);
|
||||
}
|
||||
|
||||
|
|
@ -46,16 +47,10 @@ public class MkmjGateController {
|
|||
return mkmjGateService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjGateCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjGateCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjGateCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new MkmjGateCO());
|
||||
return SingleResponse.of(mkmjGateService.getInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -65,18 +60,22 @@ public class MkmjGateController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjGateService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjGateUpdateCmd mkmjGateUpdateCmd) {
|
||||
mkmjGateService.edit(mkmjGateUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@ApiOperation("名称唯一性校验")
|
||||
@GetMapping("/check-name")
|
||||
public SingleResponse<Map<String, Boolean>> checkName(
|
||||
@RequestParam String gateName,
|
||||
@RequestParam Long passageId,
|
||||
@RequestParam(required = false) Long id) {
|
||||
Boolean available = mkmjGateService.checkName(gateName, passageId, id);
|
||||
Map<String, Boolean> result = new HashMap<>();
|
||||
result.put("available", available);
|
||||
return SingleResponse.of(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.MkmjPassageServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjPassageAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPassagePageQry;
|
||||
|
|
@ -18,14 +14,9 @@ import lombok.AllArgsConstructor;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Api(tags = "口门门禁通道表")
|
||||
@RequestMapping("/${application.gateway}/mkmjPassage")
|
||||
@RestController
|
||||
|
|
@ -45,16 +36,10 @@ public class MkmjPassageController {
|
|||
return mkmjPassageService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjPassageCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjPassageCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjPassageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new MkmjPassageCO());
|
||||
return SingleResponse.of(mkmjPassageService.getInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -64,18 +49,24 @@ public class MkmjPassageController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjPassageService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjPassageUpdateCmd mkmjPassageUpdateCmd) {
|
||||
mkmjPassageService.edit(mkmjPassageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("名称唯一性校验")
|
||||
@GetMapping("/check-name")
|
||||
public SingleResponse<Map<String, Boolean>> checkName(
|
||||
@RequestParam String passageName,
|
||||
@RequestParam Long mkmjId,
|
||||
@RequestParam(required = false) Long id) {
|
||||
Boolean available = mkmjPassageService.checkName(passageName, mkmjId, id);
|
||||
Map<String, Boolean> result = new HashMap<>();
|
||||
result.put("available", available);
|
||||
return SingleResponse.of(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ public class VideoController {
|
|||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<VideoCO> add(@Validated @RequestBody VideoAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return videoService.add(cmd);
|
||||
}
|
||||
|
||||
|
|
@ -46,12 +45,6 @@ public class VideoController {
|
|||
return videoService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VideoCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VideoCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VideoCO> getInfoById(@PathVariable("id") Long id) {
|
||||
|
|
@ -65,13 +58,6 @@ public class VideoController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
videoService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VideoUpdateCmd videoUpdateCmd) {
|
||||
|
|
|
|||
|
|
@ -6,13 +6,6 @@ import lombok.AllArgsConstructor;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjPassageRemoveExe {
|
||||
|
|
@ -20,6 +13,10 @@ public class MkmjPassageRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
Integer gateCount = mkmjPassageGateway.countByPassageId(String.valueOf(id));
|
||||
if (gateCount > 0) {
|
||||
throw new BizException("该通道下有关联闸机,无法删除");
|
||||
}
|
||||
boolean res = mkmjPassageGateway.deletedMkmjPassageById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
|
|
@ -29,6 +26,12 @@ public class MkmjPassageRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
for (Long id : ids) {
|
||||
Integer gateCount = mkmjPassageGateway.countByPassageId(String.valueOf(id));
|
||||
if (gateCount > 0) {
|
||||
throw new BizException("该通道下有关联闸机,无法删除");
|
||||
}
|
||||
}
|
||||
boolean res = mkmjPassageGateway.deletedMkmjPassageByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
|
|
|
|||
|
|
@ -6,13 +6,8 @@ import lombok.AllArgsConstructor;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjRemoveExe {
|
||||
|
|
@ -20,20 +15,16 @@ public class MkmjRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
Map<String, Integer> relatedData = mkmjGateway.countRelatedData(id);
|
||||
int totalCount = relatedData.values().stream().mapToInt(Integer::intValue).sum();
|
||||
if (totalCount > 0) {
|
||||
throw new BizException("该口门下有关联数据,无法删除");
|
||||
}
|
||||
boolean res = mkmjGateway.deletedMkmjById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjGateway.deletedMkmjByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,5 +20,7 @@ public interface MkmjGateCoConvertor {
|
|||
* @return
|
||||
*/
|
||||
List<MkmjGateCO> converDOsToCOs(List<MkmjGateDO> mkmjGateDOs);
|
||||
|
||||
MkmjGateCO converDOToCO(MkmjGateDO byId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,19 +6,10 @@ import org.mapstruct.Mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface MkmjPassageCoConvertor {
|
||||
/**
|
||||
* @param mkmjPassageDOs
|
||||
* @return
|
||||
*/
|
||||
List<MkmjPassageCO> converDOsToCOs(List<MkmjPassageDO> mkmjPassageDOs);
|
||||
MkmjPassageCO converDOToCO(MkmjPassageDO mkmjPassageDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,5 +38,14 @@ public class MkmjGateQueryExe {
|
|||
List<MkmjGateCO> examCenterCOS = mkmjGateCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public MkmjGateCO getInfoById(Long id) {
|
||||
MkmjGateDO byId = mkmjGateRepository.getById(id);
|
||||
return mkmjGateCoConvertor.converDOToCO(byId);
|
||||
}
|
||||
|
||||
public Boolean checkName(String gateName, Long passageId, Long id) {
|
||||
return mkmjGateRepository.checkName(gateName, passageId, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,30 +13,21 @@ import org.springframework.stereotype.Component;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjPassageQueryExe {
|
||||
private final MkmjPassageRepository mkmjPassageRepository;
|
||||
private final MkmjPassageCoConvertor mkmjPassageCoConvertor;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param mkmjPassagePageQry
|
||||
* @return
|
||||
*/
|
||||
public PageResponse<MkmjPassageCO> execute(MkmjPassagePageQry mkmjPassagePageQry) {
|
||||
Map<String, Object> parmas = PageQueryHelper.toHashMap(mkmjPassagePageQry);
|
||||
PageResponse<MkmjPassageDO> pageResponse = mkmjPassageRepository.listPage(parmas);
|
||||
List<MkmjPassageCO> examCenterCOS = mkmjPassageCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
List<MkmjPassageCO> list = mkmjPassageCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(list, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public MkmjPassageCO getInfoById(Long id) {
|
||||
return mkmjPassageCoConvertor.converDOToCO(mkmjPassageRepository.getById(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,5 +55,15 @@ public class MkmjGateServiceImpl implements MkmjGateServiceI {
|
|||
public void removeBatch(Long[] ids) {
|
||||
mkmjGateRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MkmjGateCO getInfoById(Long id) {
|
||||
return mkmjGateQueryExe.getInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String gateName, Long passageId, Long id) {
|
||||
return mkmjGateQueryExe.checkName(gateName,passageId, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.zcloud.primeport.command.MkmjPassageAddExe;
|
|||
import com.zcloud.primeport.command.MkmjPassageRemoveExe;
|
||||
import com.zcloud.primeport.command.MkmjPassageUpdateExe;
|
||||
import com.zcloud.primeport.command.query.MkmjPassageQueryExe;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjPassageGateway;
|
||||
import com.zcloud.primeport.dto.MkmjPassageAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPassagePageQry;
|
||||
import com.zcloud.primeport.dto.MkmjPassageUpdateCmd;
|
||||
|
|
@ -14,12 +15,6 @@ import com.zcloud.primeport.dto.clientobject.MkmjPassageCO;
|
|||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MkmjPassageServiceImpl implements MkmjPassageServiceI {
|
||||
|
|
@ -27,16 +22,15 @@ public class MkmjPassageServiceImpl implements MkmjPassageServiceI {
|
|||
private final MkmjPassageUpdateExe mkmjPassageUpdateExe;
|
||||
private final MkmjPassageRemoveExe mkmjPassageRemoveExe;
|
||||
private final MkmjPassageQueryExe mkmjPassageQueryExe;
|
||||
private final MkmjPassageGateway mkmjPassageGateway;
|
||||
|
||||
@Override
|
||||
public PageResponse<MkmjPassageCO> listPage(MkmjPassagePageQry qry) {
|
||||
|
||||
return mkmjPassageQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(MkmjPassageAddCmd cmd) {
|
||||
|
||||
mkmjPassageAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
|
@ -55,5 +49,15 @@ public class MkmjPassageServiceImpl implements MkmjPassageServiceI {
|
|||
public void removeBatch(Long[] ids) {
|
||||
mkmjPassageRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MkmjPassageCO getInfoById(Long id) {
|
||||
return mkmjPassageQueryExe.getInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String passageName, Long mkmjId, Long id) {
|
||||
return mkmjPassageGateway.checkName(passageName, mkmjId, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.zcloud.primeport.command.MkmjAddExe;
|
|||
import com.zcloud.primeport.command.MkmjRemoveExe;
|
||||
import com.zcloud.primeport.command.MkmjUpdateExe;
|
||||
import com.zcloud.primeport.command.query.MkmjQueryExe;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateway;
|
||||
import com.zcloud.primeport.dto.MkmjAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjUpdateCmd;
|
||||
|
|
@ -14,12 +15,6 @@ import com.zcloud.primeport.dto.clientobject.MkmjCO;
|
|||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MkmjServiceImpl implements MkmjServiceI {
|
||||
|
|
@ -27,16 +22,15 @@ public class MkmjServiceImpl implements MkmjServiceI {
|
|||
private final MkmjUpdateExe mkmjUpdateExe;
|
||||
private final MkmjRemoveExe mkmjRemoveExe;
|
||||
private final MkmjQueryExe mkmjQueryExe;
|
||||
private final MkmjGateway mkmjGateway;
|
||||
|
||||
@Override
|
||||
public PageResponse<MkmjCO> listPage(MkmjPageQry qry) {
|
||||
|
||||
return mkmjQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(MkmjAddCmd cmd) {
|
||||
|
||||
mkmjAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
|
@ -53,12 +47,17 @@ public class MkmjServiceImpl implements MkmjServiceI {
|
|||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
mkmjRemoveExe.execute(ids);
|
||||
// mkmjRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MkmjCO getInfoById(Long id) {
|
||||
return mkmjQueryExe.getInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String mkmjName, Long id) {
|
||||
return mkmjGateway.checkName(mkmjName, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,9 @@ public interface MkmjGateServiceI {
|
|||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
MkmjGateCO getInfoById(Long id);
|
||||
|
||||
Boolean checkName(String gateName, Long passageId, Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,6 @@ import com.zcloud.primeport.dto.MkmjPassagePageQry;
|
|||
import com.zcloud.primeport.dto.MkmjPassageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjPassageCO;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
public interface MkmjPassageServiceI {
|
||||
PageResponse<MkmjPassageCO> listPage(MkmjPassagePageQry qry);
|
||||
|
||||
|
|
@ -23,5 +17,8 @@ public interface MkmjPassageServiceI {
|
|||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
}
|
||||
|
||||
MkmjPassageCO getInfoById(Long id);
|
||||
|
||||
Boolean checkName(String passageName, Long mkmjId, Long id);
|
||||
}
|
||||
|
|
@ -7,12 +7,6 @@ import com.zcloud.primeport.dto.MkmjPageQry;
|
|||
import com.zcloud.primeport.dto.MkmjUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjCO;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
public interface MkmjServiceI {
|
||||
PageResponse<MkmjCO> listPage(MkmjPageQry qry);
|
||||
|
||||
|
|
@ -25,5 +19,7 @@ public interface MkmjServiceI {
|
|||
void removeBatch(Long[] ids);
|
||||
|
||||
MkmjCO getInfoById(Long id);
|
||||
|
||||
Boolean checkName(String mkmjName, Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ import javax.validation.constraints.NotNull;
|
|||
public class MkmjGateAddCmd extends Command {
|
||||
@ApiModelProperty(value = "口门区域id", name = "mkmjId", required = true)
|
||||
@NotEmpty(message = "口门区域id不能为空")
|
||||
private String mkmjId;
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "通道id", name = "passageId", required = true)
|
||||
@NotEmpty(message = "通道id不能为空")
|
||||
private String passageId;
|
||||
private Long passageId;
|
||||
@ApiModelProperty(value = "闸机标识", name = "gateNumber", required = true)
|
||||
@NotEmpty(message = "闸机标识不能为空")
|
||||
private String gateNumber;
|
||||
|
|
|
|||
|
|
@ -1,28 +1,24 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:18
|
||||
*/
|
||||
@Data
|
||||
public class MkmjGatePageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "口门ID")
|
||||
private Long mkmjId;
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String likeMkmjId;
|
||||
@ApiModelProperty(value = "通道ID")
|
||||
private Long passageId;
|
||||
|
||||
@ApiModelProperty(value = "闸机名称模糊查询")
|
||||
private String gateName;
|
||||
|
||||
@ApiModelProperty(value = "闸机类型")
|
||||
private String gateType;
|
||||
|
||||
@ApiModelProperty(value = "闸机状态")
|
||||
private Integer gateStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ public class MkmjGateUpdateCmd extends Command {
|
|||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "口门区域id", name = "mkmjId", required = true)
|
||||
@NotEmpty(message = "口门区域id不能为空")
|
||||
private String mkmjId;
|
||||
@NotNull(message = "口门区域id不能为空")
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "通道id", name = "passageId", required = true)
|
||||
@NotEmpty(message = "通道id不能为空")
|
||||
private String passageId;
|
||||
@NotNull(message = "通道id不能为空")
|
||||
private Long passageId;
|
||||
@ApiModelProperty(value = "闸机标识", name = "gateNumber", required = true)
|
||||
@NotEmpty(message = "闸机标识不能为空")
|
||||
private String gateNumber;
|
||||
|
|
|
|||
|
|
@ -25,14 +25,16 @@ public class MkmjPassageAddCmd extends Command {
|
|||
@NotEmpty(message = "通道名称不能为空")
|
||||
private String passageName;
|
||||
@ApiModelProperty(value = "通道类型 1-人行 2-车行 3-综合", name = "passageType", required = true)
|
||||
@NotNull(message = "通道类型 1-人行 2-车行 3-综合不能为空")
|
||||
private Integer passageType;
|
||||
@NotEmpty(message = "通道类型 1-人行 2-车行 3-综合不能为空")
|
||||
private String passageType;
|
||||
@NotEmpty(message = "通道类型名称")
|
||||
private String passageTypeName;
|
||||
@ApiModelProperty(value = "通道状态 1-停用 2-正常", name = "passageStatus", required = true)
|
||||
@NotNull(message = "通道状态 1-停用 2-正常不能为空")
|
||||
private Integer passageStatus;
|
||||
@ApiModelProperty(value = "口门区域id", name = "mkmjId", required = true)
|
||||
@NotEmpty(message = "口门区域id不能为空")
|
||||
private String mkmjId;
|
||||
@NotNull(message = "口门区域id不能为空")
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||
@NotEmpty(message = "经度不能为空")
|
||||
private String longitude;
|
||||
|
|
|
|||
|
|
@ -1,28 +1,21 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Data
|
||||
public class MkmjPassagePageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "口门ID")
|
||||
private Long eqMkmjId;
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
@ApiModelProperty(value = "通道名称模糊查询")
|
||||
private String likePassageName;
|
||||
|
||||
@ApiModelProperty(value = "通道类型")
|
||||
private String eqPassageType;
|
||||
|
||||
@ApiModelProperty(value = "通道状态")
|
||||
private Integer eqPassageStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,11 @@ public class MkmjCO extends ClientObject {
|
|||
//经度
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
//纬度
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty(value = "摄像头数量")
|
||||
private Integer videoCount;
|
||||
@ApiModelProperty(value = "数量")
|
||||
@ApiModelProperty(value = "通道数量")
|
||||
private Integer passageCount;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,55 +4,40 @@ import com.alibaba.cola.dto.ClientObject;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
@Data
|
||||
public class MkmjGateCO extends ClientObject {
|
||||
//主键
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
//口门区域id
|
||||
@ApiModelProperty(value = "口门区域id")
|
||||
private String mkmjId;
|
||||
//通道id
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "口门名称")
|
||||
private String mkmjName;
|
||||
@ApiModelProperty(value = "通道id")
|
||||
private String passageId;
|
||||
//闸机标识
|
||||
private Long passageId;
|
||||
@ApiModelProperty(value = "通道名称")
|
||||
private String passageName;
|
||||
@ApiModelProperty(value = "闸机标识")
|
||||
private String gateNumber;
|
||||
//闸机名称
|
||||
@ApiModelProperty(value = "闸机名称")
|
||||
private String gateName;
|
||||
//闸机类型
|
||||
@ApiModelProperty(value = "闸机类型")
|
||||
private String gateType;
|
||||
//闸机类型名称
|
||||
@ApiModelProperty(value = "闸机类型名称")
|
||||
private String gateTypeName;
|
||||
//闸机状态 1- 停用 2-正常
|
||||
@ApiModelProperty(value = "闸机状态 1- 停用 2-正常")
|
||||
private Integer gateStatus;
|
||||
//闸机类别
|
||||
@ApiModelProperty(value = "闸机状态名称")
|
||||
private String gateStatusName;
|
||||
@ApiModelProperty(value = "闸机类别")
|
||||
private String gateCategory;
|
||||
//闸机类别名称
|
||||
@ApiModelProperty(value = "闸机类别名称")
|
||||
private String gateCategoryName;
|
||||
//闸机型号
|
||||
@ApiModelProperty(value = "闸机型号")
|
||||
private String gateModel;
|
||||
//闸机位置
|
||||
@ApiModelProperty(value = "闸机位置")
|
||||
private String gatePosition;
|
||||
//经度
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
//纬度
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,38 +4,31 @@ import com.alibaba.cola.dto.ClientObject;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Data
|
||||
public class MkmjPassageCO extends ClientObject {
|
||||
//主键
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
//通道名称
|
||||
@ApiModelProperty(value = "通道名称")
|
||||
private String passageName;
|
||||
//通道类型 1-人行 2-车行 3-综合
|
||||
@ApiModelProperty(value = "通道类型 1-人行 2-车行 3-综合")
|
||||
private Integer passageType;
|
||||
//通道状态 1-停用 2-正常
|
||||
private String passageType;
|
||||
@ApiModelProperty(value = "通道类型名称")
|
||||
private String passageTypeName;
|
||||
@ApiModelProperty(value = "通道状态 1-停用 2-正常")
|
||||
private Integer passageStatus;
|
||||
//口门区域id
|
||||
@ApiModelProperty(value = "通道状态名称")
|
||||
private String passageStatusName;
|
||||
@ApiModelProperty(value = "口门区域id")
|
||||
private String mkmjId;
|
||||
//经度
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "口门名称")
|
||||
private String mkmjName;
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
//纬度
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
//备注
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "闸机数量")
|
||||
private Integer gateCount;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
@Getter
|
||||
public enum MenuEnum {
|
||||
|
||||
MKMJ_JGD("/mkmj/jgd", "mkmj_jgd"),
|
||||
PASSAGE_JGD("/mkmj/jgd", "mkmj_passage_jgd"),
|
||||
GATE_JGD("/mkmj/jgd", "mkmj_gate_jgd"),
|
||||
VIDEO_JGD("/mkmj/jgd", "mkmj_video_jgd")
|
||||
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,29 +2,20 @@ package com.zcloud.primeport.domain.gateway;
|
|||
|
||||
import com.zcloud.primeport.domain.model.MkmjE;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:15
|
||||
*/
|
||||
import java.util.Map;
|
||||
|
||||
public interface MkmjGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
Boolean add(MkmjE mkmjE);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
Boolean update(MkmjE mkmjE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
Boolean deletedMkmjById(Long id);
|
||||
|
||||
Boolean deletedMkmjByIds(Long[] id);
|
||||
|
||||
Boolean checkName(String mkmjName, Long excludeId);
|
||||
|
||||
Map<String, Integer> countRelatedData(Long mkmjId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,29 +2,17 @@ package com.zcloud.primeport.domain.gateway;
|
|||
|
||||
import com.zcloud.primeport.domain.model.MkmjPassageE;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
public interface MkmjPassageGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
Boolean add(MkmjPassageE mkmjPassageE);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
Boolean update(MkmjPassageE mkmjPassageE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
Boolean deletedMkmjPassageById(Long id);
|
||||
|
||||
Boolean deletedMkmjPassageByIds(Long[] id);
|
||||
|
||||
Boolean checkName(String passageName, Long mkmjId, Long excludeId);
|
||||
|
||||
Integer countByPassageId(String passageId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MkmjApprovalUserE extends BaseE {
|
||||
//主键ID
|
||||
private Long id;
|
||||
//审批人企业id
|
||||
private Long corpId;
|
||||
//审批人企业名称
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@ import javax.validation.constraints.NotEmpty;
|
|||
@Builder
|
||||
|
||||
public class MkmjE extends BaseE {
|
||||
//主键
|
||||
private Long id;
|
||||
//口门名称
|
||||
private String mkmjName;
|
||||
//口门级别 1-一级 2-二级
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MkmjGateE extends BaseE {
|
||||
//主键
|
||||
private Long id;
|
||||
//口门区域id
|
||||
private String mkmjId;
|
||||
//通道id
|
||||
|
|
|
|||
|
|
@ -17,16 +17,15 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MkmjPassageE extends BaseE {
|
||||
//主键
|
||||
private Long id;
|
||||
//通道名称
|
||||
private String passageName;
|
||||
//通道类型 1-人行 2-车行 3-综合
|
||||
private Integer passageType;
|
||||
private String passageType;
|
||||
private String passageTypeName;
|
||||
//通道状态 1-停用 2-正常
|
||||
private Integer passageStatus;
|
||||
//口门区域id
|
||||
private String mkmjId;
|
||||
private Long mkmjId;
|
||||
//经度
|
||||
private String longitude;
|
||||
//纬度
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class PersonApplyE extends BaseE {
|
||||
//id
|
||||
private Long id;
|
||||
//1股份2分公司3相关方4临时人员
|
||||
private Integer personBelongType;
|
||||
//授权范围港区与区域
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class PersonMessageE extends BaseE {
|
||||
//id
|
||||
private Object id;
|
||||
//人员申请id
|
||||
private Long personApplyId;
|
||||
//1股份2分公司3相关方4临时人员
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VehicleApplyE extends BaseE {
|
||||
//id
|
||||
private Long id;
|
||||
//车辆状态(1未启用,2启用)
|
||||
private Integer statusFlag;
|
||||
//车牌类型数据字典
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VehicleAuditE extends BaseE {
|
||||
//id
|
||||
private Long id;
|
||||
//车辆申请id
|
||||
private String vehicleApplyId;
|
||||
//审批批次(1.普通车辆.2危险化学品车辆)
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VehicleBlackE extends BaseE {
|
||||
//id
|
||||
private Long id;
|
||||
//车辆信息表(vehicle_apply)的主键id
|
||||
private Long vehicleId;
|
||||
//车辆所属人姓名(临时车)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VehicleMessageE extends BaseE {
|
||||
//id
|
||||
private Long id;
|
||||
|
||||
//车牌类型数据字典
|
||||
private String licenceType;
|
||||
//车牌类型名称 白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VehicleViolationsE extends BaseE {
|
||||
//车辆违规记录id
|
||||
private Long id;
|
||||
|
||||
//车辆信息表(vehicle_apply)的主键id
|
||||
private Long vehicleId;
|
||||
//车辆所属人姓名(临时车)
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VideoE extends BaseE {
|
||||
//主键
|
||||
private Long id;
|
||||
//口门/闸机id 外键id
|
||||
private Long foreignId;
|
||||
//设备类型(1-口门 2-闸机)
|
||||
|
|
|
|||
|
|
@ -3,23 +3,27 @@ package com.zcloud.primeport.gatewayimpl;
|
|||
import com.zcloud.primeport.domain.gateway.MkmjGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjE;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjDO;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjApprovalUserRepository;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjGateRepository;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjPassageRepository;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjRepository;
|
||||
import com.zcloud.primeport.persistence.repository.VideoRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:15
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MkmjGatewayImpl implements MkmjGateway {
|
||||
private final MkmjRepository mkmjRepository;
|
||||
private final MkmjPassageRepository mkmjPassageRepository;
|
||||
private final MkmjGateRepository mkmjGateRepository;
|
||||
private final VideoRepository videoRepository;
|
||||
private final MkmjApprovalUserRepository mkmjApprovalUserRepository;
|
||||
|
||||
@Override
|
||||
public Boolean add(MkmjE mkmjE) {
|
||||
|
|
@ -37,7 +41,6 @@ public class MkmjGatewayImpl implements MkmjGateway {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean deletedMkmjById(Long id) {
|
||||
return mkmjRepository.removeById(id);
|
||||
|
|
@ -47,5 +50,20 @@ public class MkmjGatewayImpl implements MkmjGateway {
|
|||
public Boolean deletedMkmjByIds(Long[] ids) {
|
||||
return mkmjRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String mkmjName, Long excludeId) {
|
||||
return mkmjRepository.checkName(mkmjName, excludeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Integer> countRelatedData(Long mkmjId) {
|
||||
Map<String, Integer> result = new HashMap<>();
|
||||
result.put("passageCount", mkmjPassageRepository.countByMkmjId(mkmjId));
|
||||
result.put("gateCount", mkmjGateRepository.countByMkmjId(mkmjId));
|
||||
result.put("videoCount", videoRepository.countByForeignIdAndDeviceType(mkmjId, 1));
|
||||
result.put("approvalUserCount", mkmjApprovalUserRepository.countByMkmjId(mkmjId));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjPassageGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjPassageE;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjPassageDO;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjGateRepository;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjPassageRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
|
@ -10,16 +12,11 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MkmjPassageGatewayImpl implements MkmjPassageGateway {
|
||||
private final MkmjPassageRepository mkmjPassageRepository;
|
||||
private final MkmjGateRepository mkmjGateRepository;
|
||||
|
||||
@Override
|
||||
public Boolean add(MkmjPassageE mkmjPassageE) {
|
||||
|
|
@ -38,13 +35,29 @@ public class MkmjPassageGatewayImpl implements MkmjPassageGateway {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedMkmjPassageById(String id) {
|
||||
public Boolean deletedMkmjPassageById(Long id) {
|
||||
return mkmjPassageRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedMkmjPassageByIds(String[] ids) {
|
||||
public Boolean deletedMkmjPassageByIds(Long[] ids) {
|
||||
return mkmjPassageRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String passageName, Long mkmjId, Long excludeId) {
|
||||
QueryWrapper<MkmjPassageDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("passage_name", passageName);
|
||||
queryWrapper.eq("mkmj_id", mkmjId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
if (excludeId != null) {
|
||||
queryWrapper.ne("id", excludeId);
|
||||
}
|
||||
return mkmjPassageRepository.count(queryWrapper) == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByPassageId(String passageId) {
|
||||
return mkmjGateRepository.countByPassageId(passageId);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +1,47 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:18
|
||||
*/
|
||||
@Data
|
||||
@TableName("mkmj_gate")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MkmjGateDO extends BaseDO {
|
||||
|
||||
//口门区域id
|
||||
@ApiModelProperty(value = "口门区域id")
|
||||
private String mkmjId;
|
||||
//通道id
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "通道id")
|
||||
private String passageId;
|
||||
//闸机标识
|
||||
private Long passageId;
|
||||
@ApiModelProperty(value = "闸机标识")
|
||||
private String gateNumber;
|
||||
//闸机名称
|
||||
@ApiModelProperty(value = "闸机名称")
|
||||
private String gateName;
|
||||
//闸机类型
|
||||
@ApiModelProperty(value = "闸机类型")
|
||||
private String gateType;
|
||||
//闸机类型名称
|
||||
@ApiModelProperty(value = "闸机类型名称")
|
||||
private String gateTypeName;
|
||||
//闸机状态 1- 停用 2-正常
|
||||
@ApiModelProperty(value = "闸机状态 1- 停用 2-正常")
|
||||
private Integer gateStatus;
|
||||
//闸机类别
|
||||
@ApiModelProperty(value = "闸机类别")
|
||||
private String gateCategory;
|
||||
//闸机类别名称
|
||||
@ApiModelProperty(value = "闸机类别名称")
|
||||
private String gateCategoryName;
|
||||
//闸机型号
|
||||
@ApiModelProperty(value = "闸机型号")
|
||||
private String gateModel;
|
||||
//闸机位置
|
||||
@ApiModelProperty(value = "闸机位置")
|
||||
private String gatePosition;
|
||||
//经度
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
//纬度
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "口门名称")
|
||||
@TableField(exist = false)
|
||||
private String mkmjName;
|
||||
@ApiModelProperty(value = "通道名称")
|
||||
@TableField(exist = false)
|
||||
private String passageName;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +1,35 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Data
|
||||
@TableName("mkmj_passage")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MkmjPassageDO extends BaseDO {
|
||||
|
||||
//通道名称
|
||||
@ApiModelProperty(value = "通道名称")
|
||||
private String passageName;
|
||||
//通道类型 1-人行 2-车行 3-综合
|
||||
@ApiModelProperty(value = "通道类型 1-人行 2-车行 3-综合")
|
||||
private Integer passageType;
|
||||
//通道状态 1-停用 2-正常
|
||||
@ApiModelProperty(value = "通道类型")
|
||||
private String passageType;
|
||||
@ApiModelProperty(value = "通道类型名称")
|
||||
private String passageTypeName;
|
||||
@ApiModelProperty(value = "通道状态 1-停用 2-正常")
|
||||
private Integer passageStatus;
|
||||
//口门区域id
|
||||
@ApiModelProperty(value = "口门区域id")
|
||||
private String mkmjId;
|
||||
//经度
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
//纬度
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty(value = "闸机数量")
|
||||
@TableField(exist = false)
|
||||
private Integer gateCount;
|
||||
@ApiModelProperty(value = "口门名称")
|
||||
@TableField(exist = false)
|
||||
private String mkmjName;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjGateDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
|
|
@ -13,5 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
@Mapper
|
||||
public interface MkmjGateMapper extends BaseMapper<MkmjGateDO> {
|
||||
|
||||
IPage<MkmjGateDO> listPage(Page<Map<String, Object>> page, Map<String, Object> parmas, String menuPerms);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjPassageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface MkmjPassageMapper extends BaseMapper<MkmjPassageDO> {
|
||||
|
||||
IPage<MkmjPassageDO> listPage(Page<Map<String, Object>> page, Map<String, Object> parmas, String menuPerms);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,9 @@ import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|||
import com.zcloud.primeport.persistence.dataobject.MkmjApprovalUserDO;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
public interface MkmjApprovalUserRepository extends BaseRepository<MkmjApprovalUserDO> {
|
||||
PageResponse<MkmjApprovalUserDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
Integer countByMkmjId(Long mkmjId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|||
import com.zcloud.primeport.persistence.dataobject.MkmjGateDO;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:18
|
||||
*/
|
||||
public interface MkmjGateRepository extends BaseRepository<MkmjGateDO> {
|
||||
PageResponse<MkmjGateDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
Integer countByMkmjId(Long mkmjId);
|
||||
|
||||
Integer countByPassageId(String passageId);
|
||||
|
||||
Boolean checkName(String gateName, Long passageId, Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,9 @@ import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|||
import com.zcloud.primeport.persistence.dataobject.MkmjPassageDO;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
public interface MkmjPassageRepository extends BaseRepository<MkmjPassageDO> {
|
||||
PageResponse<MkmjPassageDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
Integer countByMkmjId(Long mkmjId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,9 @@ import com.zcloud.primeport.persistence.dataobject.MkmjDO;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
public interface MkmjRepository extends BaseRepository<MkmjDO> {
|
||||
PageResponse<MkmjDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
Boolean checkName(String mkmjName, Long excludeId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,11 @@ import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|||
import com.zcloud.primeport.persistence.dataobject.VideoDO;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:31
|
||||
*/
|
||||
public interface VideoRepository extends BaseRepository<VideoDO> {
|
||||
PageResponse<VideoDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
Integer countByForeignIdAndDeviceType(Long foreignId, Integer deviceType);
|
||||
|
||||
Integer countByForeignId(Long foreignId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,12 +14,7 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.Map;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MkmjApprovalUserRepositoryImpl extends BaseRepositoryImpl<MkmjApprovalUserMapper, MkmjApprovalUserDO> implements MkmjApprovalUserRepository {
|
||||
|
|
@ -34,5 +29,13 @@ public class MkmjApprovalUserRepositoryImpl extends BaseRepositoryImpl<MkmjAppro
|
|||
IPage<MkmjApprovalUserDO> result = mkmjApprovalUserMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByMkmjId(Long mkmjId) {
|
||||
QueryWrapper<MkmjApprovalUserDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mkmj_id", mkmjId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
return Math.toIntExact(mkmjApprovalUserMapper.selectCount(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,23 +3,22 @@ package com.zcloud.primeport.persistence.repository.impl;
|
|||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.primeport.domain.enums.MenuEnum;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjGateDO;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjPassageDO;
|
||||
import com.zcloud.primeport.persistence.mapper.MkmjGateMapper;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjGateRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:18
|
||||
*/
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MkmjGateRepositoryImpl extends BaseRepositoryImpl<MkmjGateMapper, MkmjGateDO> implements MkmjGateRepository {
|
||||
|
|
@ -27,12 +26,42 @@ public class MkmjGateRepositoryImpl extends BaseRepositoryImpl<MkmjGateMapper, M
|
|||
|
||||
@Override
|
||||
public PageResponse<MkmjGateDO> listPage(Map<String, Object> parmas) {
|
||||
IPage<MkmjGateDO> iPage = new Query<MkmjGateDO>().getPage(parmas);
|
||||
QueryWrapper<MkmjGateDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<MkmjGateDO> result = mkmjGateMapper.selectPage(iPage, queryWrapper);
|
||||
Page<Map<String, Object>> page = new Page<>(Integer.parseInt(parmas.get("pageIndex").toString()),
|
||||
Integer.parseInt(parmas.get("pageSize").toString()));
|
||||
String menuPerms = "";
|
||||
if (!org.springframework.util.ObjectUtils.isEmpty(parmas.get("menuPath"))) {
|
||||
menuPerms = MenuEnum.getMenuKeyByPath(parmas.get("menuPath").toString());
|
||||
}
|
||||
IPage<MkmjGateDO> result = mkmjGateMapper.listPage(page, parmas, menuPerms);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByMkmjId(Long mkmjId) {
|
||||
QueryWrapper<MkmjGateDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mkmj_id", mkmjId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
return Math.toIntExact(mkmjGateMapper.selectCount(queryWrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByPassageId(String passageId) {
|
||||
QueryWrapper<MkmjGateDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("passage_id", passageId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
return Math.toIntExact(mkmjGateMapper.selectCount(queryWrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String gateName, Long passageId, Long id) {
|
||||
QueryWrapper<MkmjGateDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("gate_name", gateName);
|
||||
queryWrapper.eq("passageId", passageId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
if (id != null) {
|
||||
queryWrapper.ne("id", id);
|
||||
}
|
||||
return mkmjGateMapper.selectCount(queryWrapper) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,12 @@ package com.zcloud.primeport.persistence.repository.impl;
|
|||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.zcloud.primeport.domain.enums.MenuEnum;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjPassageDO;
|
||||
import com.zcloud.primeport.persistence.mapper.MkmjPassageMapper;
|
||||
import com.zcloud.primeport.persistence.repository.MkmjPassageRepository;
|
||||
|
|
@ -12,14 +16,7 @@ import lombok.RequiredArgsConstructor;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MkmjPassageRepositoryImpl extends BaseRepositoryImpl<MkmjPassageMapper, MkmjPassageDO> implements MkmjPassageRepository {
|
||||
|
|
@ -27,12 +24,22 @@ public class MkmjPassageRepositoryImpl extends BaseRepositoryImpl<MkmjPassageMap
|
|||
|
||||
@Override
|
||||
public PageResponse<MkmjPassageDO> listPage(Map<String, Object> parmas) {
|
||||
IPage<MkmjPassageDO> iPage = new Query<MkmjPassageDO>().getPage(parmas);
|
||||
Page<Map<String, Object>> page = new Page<>(Integer.parseInt(parmas.get("pageIndex").toString()), Integer.parseInt(parmas.get("pageSize").toString()));
|
||||
String menuPerms = "";
|
||||
if (!org.springframework.util.ObjectUtils.isEmpty(parmas.get("menuPath"))) {
|
||||
menuPerms = MenuEnum.getMenuKeyByPath(parmas.get("menuPath").toString());
|
||||
}
|
||||
IPage<MkmjPassageDO> iPage = mkmjPassageMapper.listPage(page, parmas, menuPerms);
|
||||
return PageHelper.pageToResponse(iPage, iPage.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByMkmjId(Long mkmjId) {
|
||||
QueryWrapper<MkmjPassageDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<MkmjPassageDO> result = mkmjPassageMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
queryWrapper.eq("mkmj_id", mkmjId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
return Math.toIntExact(mkmjPassageMapper.selectCount(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,6 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MkmjRepositoryImpl extends BaseRepositoryImpl<MkmjMapper, MkmjDO> implements MkmjRepository {
|
||||
|
|
@ -36,8 +30,19 @@ public class MkmjRepositoryImpl extends BaseRepositoryImpl<MkmjMapper, MkmjDO> i
|
|||
menuPerms = MenuEnum.getMenuKeyByPath(parmas.get("menuPath").toString());
|
||||
}
|
||||
IPage<MkmjDO> iPage = mkmjMapper.listPage(page, parmas, menuPerms);
|
||||
// IPage<MkmjDO> result = mkmjMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(iPage, iPage.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkName(String mkmjName, Long excludeId) {
|
||||
QueryWrapper<MkmjDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mkmj_name", mkmjName);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
if (excludeId != null) {
|
||||
queryWrapper.ne("id", excludeId);
|
||||
}
|
||||
return mkmjMapper.selectCount(queryWrapper) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,6 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:31
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class VideoRepositoryImpl extends BaseRepositoryImpl<VideoMapper, VideoDO> implements VideoRepository {
|
||||
|
|
@ -35,5 +29,22 @@ public class VideoRepositoryImpl extends BaseRepositoryImpl<VideoMapper, VideoDO
|
|||
IPage<VideoDO> result = videoMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByForeignIdAndDeviceType(Long foreignId, Integer deviceType) {
|
||||
QueryWrapper<VideoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("foreign_id", foreignId);
|
||||
queryWrapper.eq("device_type", deviceType);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
return Math.toIntExact(videoMapper.selectCount(queryWrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByForeignId(Long foreignId) {
|
||||
QueryWrapper<VideoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("foreign_id", foreignId);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
return Math.toIntExact(videoMapper.selectCount(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
LEFT JOIN video v ON m.id = v.foreign_id AND v.device_type = 1 AND v.delete_enum = 'false'
|
||||
LEFT JOIN mkmj_passage p ON m.id = p.mkmj_id AND p.delete_enum = 'false'
|
||||
WHERE
|
||||
1=1 AND m.delete_enum = 'false'
|
||||
m.delete_enum = 'false'
|
||||
<if test="parmas.hgAuthArea != null and parmas.hgAuthArea != ''">
|
||||
AND m.hg_auth_area = #{parmas.hgAuthArea}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -4,5 +4,49 @@
|
|||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.MkmjGateMapper">
|
||||
|
||||
<select id="listPage" resultType="com.zcloud.primeport.persistence.dataobject.MkmjGateDO">
|
||||
SELECT
|
||||
g.id,
|
||||
g.mkmj_id,
|
||||
g.passage_id,
|
||||
g.gate_number,
|
||||
g.gate_name,
|
||||
g.gate_type,
|
||||
g.gate_type_name,
|
||||
g.gate_status,
|
||||
g.gate_category,
|
||||
g.gate_category_name,
|
||||
g.gate_model,
|
||||
g.gate_position,
|
||||
g.longitude,
|
||||
g.latitude,
|
||||
g.remarks,
|
||||
g.create_name,
|
||||
g.create_time,
|
||||
m.mkmj_name AS mkmjName,
|
||||
p.passage_name AS passageName
|
||||
FROM
|
||||
mkmj_gate g
|
||||
LEFT JOIN mkmj m ON g.mkmj_id = m.id AND m.delete_enum = 'false'
|
||||
LEFT JOIN mkmj_passage p ON g.passage_id = p.id AND p.delete_enum = 'false'
|
||||
WHERE
|
||||
g.delete_enum = 'false'
|
||||
<if test="parmas.mkmjId != null and parmas.mkmjId != ''">
|
||||
AND g.mkmj_id = #{parmas.mkmjId}
|
||||
</if>
|
||||
<if test="parmas.passageId != null and parmas.passageId != ''">
|
||||
AND g.passage_id = #{parmas.passageId}
|
||||
</if>
|
||||
<if test="parmas.gateName != null and parmas.gateName != ''">
|
||||
AND g.gate_name LIKE CONCAT('%', #{parmas.gateName}, '%')
|
||||
</if>
|
||||
<if test="parmas.gateType != null and parmas.gateType != ''">
|
||||
AND g.gate_type = #{parmas.gateType}
|
||||
</if>
|
||||
<if test="parmas.gateStatus != null">
|
||||
AND g.gate_status = #{parmas.gateStatus}
|
||||
</if>
|
||||
ORDER BY g.id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,38 @@
|
|||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.MkmjPassageMapper">
|
||||
|
||||
<select id="listPage" resultType="com.zcloud.primeport.persistence.dataobject.MkmjPassageDO">
|
||||
SELECT
|
||||
p.id,
|
||||
p.passage_name,
|
||||
p.passage_type,
|
||||
p.passage_status,
|
||||
p.mkmj_id,
|
||||
p.longitude,
|
||||
p.latitude,
|
||||
p.remarks,
|
||||
m.mkmj_name AS mkmjName,
|
||||
COUNT(DISTINCT g.id) AS gate_count
|
||||
FROM
|
||||
mkmj_passage p
|
||||
LEFT JOIN mkmj m ON p.mkmj_id = m.id AND m.delete_enum = 'false'
|
||||
LEFT JOIN mkmj_gate g ON p.id = g.passage_id AND g.delete_enum = 'false'
|
||||
WHERE
|
||||
p.delete_enum = 'false'
|
||||
<if test="parmas.eqMkmjId != null">
|
||||
AND p.mkmj_id = #{parmas.eqMkmjId}
|
||||
</if>
|
||||
<if test="parmas.likePassageName != null and parmas.likePassageName != ''">
|
||||
AND p.passage_name LIKE CONCAT('%', #{parmas.likePassageName}, '%')
|
||||
</if>
|
||||
<if test="parmas.eqPassageType != null and parmas.eqPassageType != ''">
|
||||
AND p.passage_type = #{parmas.eqPassageType}
|
||||
</if>
|
||||
<if test="parmas.eqPassageStatus != null">
|
||||
AND p.passage_status = #{parmas.eqPassageStatus}
|
||||
</if>
|
||||
GROUP BY p.id
|
||||
ORDER BY p.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue