From 2423ac966273e5b7530b140cc6ed28d36e42d4d3 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 22 Apr 2024 10:17:05 +0800
Subject: [PATCH] sso 初次提交
---
src/main/java/org/springblade/common/utils/NodeTreeUtil.java | 42 ---
src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java | 108 ---------
src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java | 47 ----
src/main/java/org/springblade/modules/article/controller/ArticleController.java | 3
pom.xml | 2
src/main/java/org/springblade/modules/article/service/impl/ArticleServiceImpl.java | 75 ------
/dev/null | 105 ---------
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java | 156 -------------
src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java | 34 ---
src/main/java/org/springblade/common/node/TreeStringNode.java | 7
src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java | 53 ----
src/main/java/org/springblade/modules/system/mapper/UserMapper.java | 1
src/main/java/org/springblade/modules/system/service/IUserService.java | 1
13 files changed, 5 insertions(+), 629 deletions(-)
diff --git a/pom.xml b/pom.xml
index 682985a..cbc1b8e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
<version>3.0.1.RELEASE</version>
<properties>
- <bladex.project.id>jczz</bladex.project.id>
+ <bladex.project.id>jczz-sso</bladex.project.id>
<bladex.project.version>3.0.1.RELEASE</bladex.project.version>
<java.version>1.8</java.version>
diff --git a/src/main/java/com/xxl/job/core/biz/AdminBiz.java b/src/main/java/com/xxl/job/core/biz/AdminBiz.java
deleted file mode 100644
index 227a7c4..0000000
--- a/src/main/java/com/xxl/job/core/biz/AdminBiz.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.xxl.job.core.biz;
-
-import com.xxl.job.core.biz.model.HandleCallbackParam;
-import com.xxl.job.core.biz.model.RegistryParam;
-import com.xxl.job.core.biz.model.ReturnT;
-
-import java.util.List;
-
-/**
- * @author liyh
- */
-public interface AdminBiz {
-
- // ---------------------- callback ----------------------
-
- /**
- * callback
- *
- * @param callbackParamList
- * @return
- */
- public ReturnT<String> callback(List<HandleCallbackParam> callbackParamList);
-
- // ---------------------- registry ----------------------
-
- /**
- * registry
- *
- * @param registryParam
- * @return
- */
- public ReturnT<String> registry(RegistryParam registryParam);
-
- /**
- * registry remove
- *
- * @param registryParam
- * @return
- */
- public ReturnT<String> registryRemove(RegistryParam registryParam);
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/ExecutorBiz.java b/src/main/java/com/xxl/job/core/biz/ExecutorBiz.java
deleted file mode 100644
index 2d9a9f6..0000000
--- a/src/main/java/com/xxl/job/core/biz/ExecutorBiz.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.xxl.job.core.biz;
-
-import com.xxl.job.core.biz.model.*;
-
-/**
- * @author liyh
- */
-public interface ExecutorBiz {
-
- /**
- * beat
- *
- * @return
- */
- public ReturnT<String> beat();
-
- /**
- * idle beat
- *
- * @param idleBeatParam
- * @return
- */
- public ReturnT<String> idleBeat(IdleBeatParam idleBeatParam);
-
- /**
- * run
- *
- * @param triggerParam
- * @return
- */
- public ReturnT<String> run(TriggerParam triggerParam);
-
- /**
- * kill
- *
- * @param killParam
- * @return
- */
- public ReturnT<String> kill(KillParam killParam);
-
- /**
- * log
- *
- * @param logParam
- * @return
- */
- public ReturnT<LogResult> log(LogParam logParam);
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/client/AdminBizClient.java b/src/main/java/com/xxl/job/core/biz/client/AdminBizClient.java
deleted file mode 100644
index fbcac3a..0000000
--- a/src/main/java/com/xxl/job/core/biz/client/AdminBizClient.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.xxl.job.core.biz.client;
-
-import com.xxl.job.core.biz.AdminBiz;
-import com.xxl.job.core.biz.model.HandleCallbackParam;
-import com.xxl.job.core.biz.model.RegistryParam;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.util.XxlJobRemotingUtil;
-
-import java.util.List;
-
-/**
- * admin api test
- *
- * @author liyh
- */
-public class AdminBizClient implements AdminBiz {
-
- public AdminBizClient() {
- }
-
- public AdminBizClient(String addressUrl, String accessToken) {
- this.addressUrl = addressUrl;
- this.accessToken = accessToken;
-
- // valid
- if (!this.addressUrl.endsWith("/")) {
- this.addressUrl = this.addressUrl + "/";
- }
- }
-
- private String addressUrl;
- private String accessToken;
- private int timeout = 3;
-
-
- @Override
- public ReturnT<String> callback(List<HandleCallbackParam> callbackParamList) {
- return XxlJobRemotingUtil.postBody(addressUrl + "api/callback", accessToken, timeout, callbackParamList, String.class);
- }
-
- @Override
- public ReturnT<String> registry(RegistryParam registryParam) {
- return XxlJobRemotingUtil.postBody(addressUrl + "api/registry", accessToken, timeout, registryParam, String.class);
- }
-
- @Override
- public ReturnT<String> registryRemove(RegistryParam registryParam) {
- return XxlJobRemotingUtil.postBody(addressUrl + "api/registryRemove", accessToken, timeout, registryParam, String.class);
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/client/ExecutorBizClient.java b/src/main/java/com/xxl/job/core/biz/client/ExecutorBizClient.java
deleted file mode 100644
index 30a24ec..0000000
--- a/src/main/java/com/xxl/job/core/biz/client/ExecutorBizClient.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.xxl.job.core.biz.client;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.*;
-import com.xxl.job.core.util.XxlJobRemotingUtil;
-
-/**
- * admin api test
- *
- * @author liyh
- */
-public class ExecutorBizClient implements ExecutorBiz {
-
- public ExecutorBizClient() {
- }
-
- public ExecutorBizClient(String addressUrl, String accessToken) {
- this.addressUrl = addressUrl;
- this.accessToken = accessToken;
-
- // valid
- if (!this.addressUrl.endsWith("/")) {
- this.addressUrl = this.addressUrl + "/";
- }
- }
-
- private String addressUrl;
- private String accessToken;
- private int timeout = 3;
-
-
- @Override
- public ReturnT<String> beat() {
- return XxlJobRemotingUtil.postBody(addressUrl + "beat", accessToken, timeout, "", String.class);
- }
-
- @Override
- public ReturnT<String> idleBeat(IdleBeatParam idleBeatParam) {
- return XxlJobRemotingUtil.postBody(addressUrl + "idleBeat", accessToken, timeout, idleBeatParam, String.class);
- }
-
- @Override
- public ReturnT<String> run(TriggerParam triggerParam) {
- return XxlJobRemotingUtil.postBody(addressUrl + "run", accessToken, timeout, triggerParam, String.class);
- }
-
- @Override
- public ReturnT<String> kill(KillParam killParam) {
- return XxlJobRemotingUtil.postBody(addressUrl + "kill", accessToken, timeout, killParam, String.class);
- }
-
- @Override
- public ReturnT<LogResult> log(LogParam logParam) {
- return XxlJobRemotingUtil.postBody(addressUrl + "log", accessToken, timeout, logParam, LogResult.class);
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java b/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
deleted file mode 100644
index 6f5c22a..0000000
--- a/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package com.xxl.job.core.biz.impl;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.*;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.executor.XxlJobExecutor;
-import com.xxl.job.core.glue.GlueFactory;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.impl.GlueJobHandler;
-import com.xxl.job.core.handler.impl.ScriptJobHandler;
-import com.xxl.job.core.log.XxlJobFileAppender;
-import com.xxl.job.core.thread.JobThread;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Date;
-
-/**
- * @author liyh
- */
-public class ExecutorBizImpl implements ExecutorBiz {
- private static Logger logger = LoggerFactory.getLogger(ExecutorBizImpl.class);
-
- @Override
- public ReturnT<String> beat() {
- return ReturnT.SUCCESS;
- }
-
- @Override
- public ReturnT<String> idleBeat(IdleBeatParam idleBeatParam) {
-
- // isRunningOrHasQueue
- boolean isRunningOrHasQueue = false;
- JobThread jobThread = XxlJobExecutor.loadJobThread(idleBeatParam.getJobId());
- if (jobThread != null && jobThread.isRunningOrHasQueue()) {
- isRunningOrHasQueue = true;
- }
-
- if (isRunningOrHasQueue) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "job thread is running or has trigger queue.");
- }
- return ReturnT.SUCCESS;
- }
-
- @Override
- public ReturnT<String> run(TriggerParam triggerParam) {
- // load old:jobHandler + jobThread
- JobThread jobThread = XxlJobExecutor.loadJobThread(triggerParam.getJobId());
- IJobHandler jobHandler = jobThread != null ? jobThread.getHandler() : null;
- String removeOldReason = null;
-
- // valid:jobHandler + jobThread
- GlueTypeEnum glueTypeEnum = GlueTypeEnum.match(triggerParam.getGlueType());
- if (GlueTypeEnum.BEAN == glueTypeEnum) {
-
- // new jobhandler
- IJobHandler newJobHandler = XxlJobExecutor.loadJobHandler(triggerParam.getExecutorHandler());
-
- // valid old jobThread
- if (jobThread != null && jobHandler != newJobHandler) {
- // change handler, need kill old thread
- removeOldReason = "change jobhandler or glue type, and terminate the old job thread.";
-
- jobThread = null;
- jobHandler = null;
- }
-
- // valid handler
- if (jobHandler == null) {
- jobHandler = newJobHandler;
- if (jobHandler == null) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "job handler [" + triggerParam.getExecutorHandler() + "] not found.");
- }
- }
-
- } else if (GlueTypeEnum.GLUE_GROOVY == glueTypeEnum) {
-
- // valid old jobThread
- if (jobThread != null &&
- !(jobThread.getHandler() instanceof GlueJobHandler
- && ((GlueJobHandler) jobThread.getHandler()).getGlueUpdatetime() == triggerParam.getGlueUpdatetime())) {
- // change handler or gluesource updated, need kill old thread
- removeOldReason = "change job source or glue type, and terminate the old job thread.";
-
- jobThread = null;
- jobHandler = null;
- }
-
- // valid handler
- if (jobHandler == null) {
- try {
- IJobHandler originJobHandler = GlueFactory.getInstance().loadNewInstance(triggerParam.getGlueSource());
- jobHandler = new GlueJobHandler(originJobHandler, triggerParam.getGlueUpdatetime());
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- return new ReturnT<String>(ReturnT.FAIL_CODE, e.getMessage());
- }
- }
- } else if (glueTypeEnum != null && glueTypeEnum.isScript()) {
-
- // valid old jobThread
- if (jobThread != null &&
- !(jobThread.getHandler() instanceof ScriptJobHandler
- && ((ScriptJobHandler) jobThread.getHandler()).getGlueUpdatetime() == triggerParam.getGlueUpdatetime())) {
- // change script or gluesource updated, need kill old thread
- removeOldReason = "change job source or glue type, and terminate the old job thread.";
-
- jobThread = null;
- jobHandler = null;
- }
-
- // valid handler
- if (jobHandler == null) {
- jobHandler = new ScriptJobHandler(triggerParam.getJobId(), triggerParam.getGlueUpdatetime(), triggerParam.getGlueSource(), GlueTypeEnum.match(triggerParam.getGlueType()));
- }
- } else {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "glueType[" + triggerParam.getGlueType() + "] is not valid.");
- }
-
- // executor block strategy
- if (jobThread != null) {
- ExecutorBlockStrategyEnum blockStrategy = ExecutorBlockStrategyEnum.match(triggerParam.getExecutorBlockStrategy(), null);
- if (ExecutorBlockStrategyEnum.DISCARD_LATER == blockStrategy) {
- // discard when running
- if (jobThread.isRunningOrHasQueue()) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "block strategy effect:" + ExecutorBlockStrategyEnum.DISCARD_LATER.getTitle());
- }
- } else if (ExecutorBlockStrategyEnum.COVER_EARLY == blockStrategy) {
- // kill running jobThread
- if (jobThread.isRunningOrHasQueue()) {
- removeOldReason = "block strategy effect:" + ExecutorBlockStrategyEnum.COVER_EARLY.getTitle();
-
- jobThread = null;
- }
- } else {
- // just queue trigger
- }
- }
-
- // replace thread (new or exists invalid)
- if (jobThread == null) {
- jobThread = XxlJobExecutor.registJobThread(triggerParam.getJobId(), jobHandler, removeOldReason);
- }
-
- // push data to queue
- ReturnT<String> pushResult = jobThread.pushTriggerQueue(triggerParam);
- return pushResult;
- }
-
- @Override
- public ReturnT<String> kill(KillParam killParam) {
- // kill handlerThread, and create new one
- JobThread jobThread = XxlJobExecutor.loadJobThread(killParam.getJobId());
- if (jobThread != null) {
- XxlJobExecutor.removeJobThread(killParam.getJobId(), "scheduling center kill job.");
- return ReturnT.SUCCESS;
- }
-
- return new ReturnT<String>(ReturnT.SUCCESS_CODE, "job thread already killed.");
- }
-
- @Override
- public ReturnT<LogResult> log(LogParam logParam) {
- // log filename: logPath/yyyy-MM-dd/9999.log
- String logFileName = XxlJobFileAppender.makeLogFileName(new Date(logParam.getLogDateTim()), logParam.getLogId());
-
- LogResult logResult = XxlJobFileAppender.readLog(logFileName, logParam.getFromLineNum());
- return new ReturnT<LogResult>(logResult);
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/HandleCallbackParam.java b/src/main/java/com/xxl/job/core/biz/model/HandleCallbackParam.java
deleted file mode 100644
index 3fff3d2..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/HandleCallbackParam.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class HandleCallbackParam implements Serializable {
- private static final long serialVersionUID = 42L;
-
- private long logId;
- private long logDateTim;
-
- private int handleCode;
- private String handleMsg;
-
- public HandleCallbackParam() {
- }
-
- public HandleCallbackParam(long logId, long logDateTim, int handleCode, String handleMsg) {
- this.logId = logId;
- this.logDateTim = logDateTim;
- this.handleCode = handleCode;
- this.handleMsg = handleMsg;
- }
-
- public long getLogId() {
- return logId;
- }
-
- public void setLogId(long logId) {
- this.logId = logId;
- }
-
- public long getLogDateTim() {
- return logDateTim;
- }
-
- public void setLogDateTim(long logDateTim) {
- this.logDateTim = logDateTim;
- }
-
- public int getHandleCode() {
- return handleCode;
- }
-
- public void setHandleCode(int handleCode) {
- this.handleCode = handleCode;
- }
-
- public String getHandleMsg() {
- return handleMsg;
- }
-
- public void setHandleMsg(String handleMsg) {
- this.handleMsg = handleMsg;
- }
-
- @Override
- public String toString() {
- return "HandleCallbackParam{" +
- "logId=" + logId +
- ", logDateTim=" + logDateTim +
- ", handleCode=" + handleCode +
- ", handleMsg='" + handleMsg + '\'' +
- '}';
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/IdleBeatParam.java b/src/main/java/com/xxl/job/core/biz/model/IdleBeatParam.java
deleted file mode 100644
index 19af462..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/IdleBeatParam.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class IdleBeatParam implements Serializable {
- private static final long serialVersionUID = 42L;
-
- public IdleBeatParam() {
- }
-
- public IdleBeatParam(int jobId) {
- this.jobId = jobId;
- }
-
- private int jobId;
-
-
- public int getJobId() {
- return jobId;
- }
-
- public void setJobId(int jobId) {
- this.jobId = jobId;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/KillParam.java b/src/main/java/com/xxl/job/core/biz/model/KillParam.java
deleted file mode 100644
index b455920..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/KillParam.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class KillParam implements Serializable {
- private static final long serialVersionUID = 42L;
-
- public KillParam() {
- }
-
- public KillParam(int jobId) {
- this.jobId = jobId;
- }
-
- private int jobId;
-
-
- public int getJobId() {
- return jobId;
- }
-
- public void setJobId(int jobId) {
- this.jobId = jobId;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/LogParam.java b/src/main/java/com/xxl/job/core/biz/model/LogParam.java
deleted file mode 100644
index 6bff569..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/LogParam.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class LogParam implements Serializable {
- private static final long serialVersionUID = 42L;
-
- public LogParam() {
- }
-
- public LogParam(long logDateTim, long logId, int fromLineNum) {
- this.logDateTim = logDateTim;
- this.logId = logId;
- this.fromLineNum = fromLineNum;
- }
-
- private long logDateTim;
- private long logId;
- private int fromLineNum;
-
- public long getLogDateTim() {
- return logDateTim;
- }
-
- public void setLogDateTim(long logDateTim) {
- this.logDateTim = logDateTim;
- }
-
- public long getLogId() {
- return logId;
- }
-
- public void setLogId(long logId) {
- this.logId = logId;
- }
-
- public int getFromLineNum() {
- return fromLineNum;
- }
-
- public void setFromLineNum(int fromLineNum) {
- this.fromLineNum = fromLineNum;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/LogResult.java b/src/main/java/com/xxl/job/core/biz/model/LogResult.java
deleted file mode 100644
index 2bb658e..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/LogResult.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class LogResult implements Serializable {
- private static final long serialVersionUID = 42L;
-
- public LogResult() {
- }
-
- public LogResult(int fromLineNum, int toLineNum, String logContent, boolean isEnd) {
- this.fromLineNum = fromLineNum;
- this.toLineNum = toLineNum;
- this.logContent = logContent;
- this.isEnd = isEnd;
- }
-
- private int fromLineNum;
- private int toLineNum;
- private String logContent;
- private boolean isEnd;
-
- public int getFromLineNum() {
- return fromLineNum;
- }
-
- public void setFromLineNum(int fromLineNum) {
- this.fromLineNum = fromLineNum;
- }
-
- public int getToLineNum() {
- return toLineNum;
- }
-
- public void setToLineNum(int toLineNum) {
- this.toLineNum = toLineNum;
- }
-
- public String getLogContent() {
- return logContent;
- }
-
- public void setLogContent(String logContent) {
- this.logContent = logContent;
- }
-
- public boolean isEnd() {
- return isEnd;
- }
-
- public void setEnd(boolean end) {
- isEnd = end;
- }
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/RegistryParam.java b/src/main/java/com/xxl/job/core/biz/model/RegistryParam.java
deleted file mode 100644
index 9c86e4f..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/RegistryParam.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class RegistryParam implements Serializable {
- private static final long serialVersionUID = 42L;
-
- private String registryGroup;
- private String registryKey;
- private String registryValue;
-
- public RegistryParam() {
- }
-
- public RegistryParam(String registryGroup, String registryKey, String registryValue) {
- this.registryGroup = registryGroup;
- this.registryKey = registryKey;
- this.registryValue = registryValue;
- }
-
- public String getRegistryGroup() {
- return registryGroup;
- }
-
- public void setRegistryGroup(String registryGroup) {
- this.registryGroup = registryGroup;
- }
-
- public String getRegistryKey() {
- return registryKey;
- }
-
- public void setRegistryKey(String registryKey) {
- this.registryKey = registryKey;
- }
-
- public String getRegistryValue() {
- return registryValue;
- }
-
- public void setRegistryValue(String registryValue) {
- this.registryValue = registryValue;
- }
-
- @Override
- public String toString() {
- return "RegistryParam{" +
- "registryGroup='" + registryGroup + '\'' +
- ", registryKey='" + registryKey + '\'' +
- ", registryValue='" + registryValue + '\'' +
- '}';
- }
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/ReturnT.java b/src/main/java/com/xxl/job/core/biz/model/ReturnT.java
deleted file mode 100644
index 97ea9a0..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/ReturnT.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * common return
- *
- * @author liyh
- */
-public class ReturnT<T> implements Serializable {
- public static final long serialVersionUID = 42L;
-
- public static final int SUCCESS_CODE = 200;
- public static final int FAIL_CODE = 500;
-
- public static final ReturnT<String> SUCCESS = new ReturnT<String>(null);
- public static final ReturnT<String> FAIL = new ReturnT<String>(FAIL_CODE, null);
-
- private int code;
- private String msg;
- private T content;
-
- public ReturnT() {
- }
-
- public ReturnT(int code, String msg) {
- this.code = code;
- this.msg = msg;
- }
-
- public ReturnT(T content) {
- this.code = SUCCESS_CODE;
- this.content = content;
- }
-
- public int getCode() {
- return code;
- }
-
- public void setCode(int code) {
- this.code = code;
- }
-
- public String getMsg() {
- return msg;
- }
-
- public void setMsg(String msg) {
- this.msg = msg;
- }
-
- public T getContent() {
- return content;
- }
-
- public void setContent(T content) {
- this.content = content;
- }
-
- @Override
- public String toString() {
- return "ReturnT [code=" + code + ", msg=" + msg + ", content=" + content + "]";
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/biz/model/TriggerParam.java b/src/main/java/com/xxl/job/core/biz/model/TriggerParam.java
deleted file mode 100644
index 67c5028..0000000
--- a/src/main/java/com/xxl/job/core/biz/model/TriggerParam.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package com.xxl.job.core.biz.model;
-
-import java.io.Serializable;
-
-/**
- * @author liyh
- */
-public class TriggerParam implements Serializable {
- private static final long serialVersionUID = 42L;
-
- private int jobId;
-
- private String executorHandler;
- private String executorParams;
- private String executorBlockStrategy;
- private int executorTimeout;
-
- private long logId;
- private long logDateTime;
-
- private String glueType;
- private String glueSource;
- private long glueUpdatetime;
-
- private int broadcastIndex;
- private int broadcastTotal;
-
-
- public int getJobId() {
- return jobId;
- }
-
- public void setJobId(int jobId) {
- this.jobId = jobId;
- }
-
- public String getExecutorHandler() {
- return executorHandler;
- }
-
- public void setExecutorHandler(String executorHandler) {
- this.executorHandler = executorHandler;
- }
-
- public String getExecutorParams() {
- return executorParams;
- }
-
- public void setExecutorParams(String executorParams) {
- this.executorParams = executorParams;
- }
-
- public String getExecutorBlockStrategy() {
- return executorBlockStrategy;
- }
-
- public void setExecutorBlockStrategy(String executorBlockStrategy) {
- this.executorBlockStrategy = executorBlockStrategy;
- }
-
- public int getExecutorTimeout() {
- return executorTimeout;
- }
-
- public void setExecutorTimeout(int executorTimeout) {
- this.executorTimeout = executorTimeout;
- }
-
- public long getLogId() {
- return logId;
- }
-
- public void setLogId(long logId) {
- this.logId = logId;
- }
-
- public long getLogDateTime() {
- return logDateTime;
- }
-
- public void setLogDateTime(long logDateTime) {
- this.logDateTime = logDateTime;
- }
-
- public String getGlueType() {
- return glueType;
- }
-
- public void setGlueType(String glueType) {
- this.glueType = glueType;
- }
-
- public String getGlueSource() {
- return glueSource;
- }
-
- public void setGlueSource(String glueSource) {
- this.glueSource = glueSource;
- }
-
- public long getGlueUpdatetime() {
- return glueUpdatetime;
- }
-
- public void setGlueUpdatetime(long glueUpdatetime) {
- this.glueUpdatetime = glueUpdatetime;
- }
-
- public int getBroadcastIndex() {
- return broadcastIndex;
- }
-
- public void setBroadcastIndex(int broadcastIndex) {
- this.broadcastIndex = broadcastIndex;
- }
-
- public int getBroadcastTotal() {
- return broadcastTotal;
- }
-
- public void setBroadcastTotal(int broadcastTotal) {
- this.broadcastTotal = broadcastTotal;
- }
-
-
- @Override
- public String toString() {
- return "TriggerParam{" +
- "jobId=" + jobId +
- ", executorHandler='" + executorHandler + '\'' +
- ", executorParams='" + executorParams + '\'' +
- ", executorBlockStrategy='" + executorBlockStrategy + '\'' +
- ", executorTimeout=" + executorTimeout +
- ", logId=" + logId +
- ", logDateTime=" + logDateTime +
- ", glueType='" + glueType + '\'' +
- ", glueSource='" + glueSource + '\'' +
- ", glueUpdatetime=" + glueUpdatetime +
- ", broadcastIndex=" + broadcastIndex +
- ", broadcastTotal=" + broadcastTotal +
- '}';
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/context/XxlJobContext.java b/src/main/java/com/xxl/job/core/context/XxlJobContext.java
deleted file mode 100644
index 41a06af..0000000
--- a/src/main/java/com/xxl/job/core/context/XxlJobContext.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.xxl.job.core.context;
-
-/**
- * xxl-job context
- *
- * @author liyh
- */
-public class XxlJobContext {
-
- public static final int HANDLE_CODE_SUCCESS = 200;
- public static final int HANDLE_CODE_FAIL = 500;
- public static final int HANDLE_CODE_TIMEOUT = 502;
-
- // ---------------------- base info ----------------------
-
- /**
- * job id
- */
- private final long jobId;
-
- /**
- * job param
- */
- private final String jobParam;
-
- // ---------------------- for log ----------------------
-
- /**
- * job log filename
- */
- private final String jobLogFileName;
-
- // ---------------------- for shard ----------------------
-
- /**
- * shard index
- */
- private final int shardIndex;
-
- /**
- * shard total
- */
- private final int shardTotal;
-
- // ---------------------- for handle ----------------------
-
- /**
- * handleCode:The result status of job execution
- * <p>
- * 200 : success
- * 500 : fail
- * 502 : timeout
- */
- private int handleCode;
-
- /**
- * handleMsg:The simple log msg of job execution
- */
- private String handleMsg;
-
- public XxlJobContext(long jobId, String jobParam, String jobLogFileName, int shardIndex, int shardTotal) {
- this.jobId = jobId;
- this.jobParam = jobParam;
- this.jobLogFileName = jobLogFileName;
- this.shardIndex = shardIndex;
- this.shardTotal = shardTotal;
-
- this.handleCode = HANDLE_CODE_SUCCESS; // default success
- }
-
- public long getJobId() {
- return jobId;
- }
-
- public String getJobParam() {
- return jobParam;
- }
-
- public String getJobLogFileName() {
- return jobLogFileName;
- }
-
- public int getShardIndex() {
- return shardIndex;
- }
-
- public int getShardTotal() {
- return shardTotal;
- }
-
- public void setHandleCode(int handleCode) {
- this.handleCode = handleCode;
- }
-
- public int getHandleCode() {
- return handleCode;
- }
-
- public void setHandleMsg(String handleMsg) {
- this.handleMsg = handleMsg;
- }
-
- public String getHandleMsg() {
- return handleMsg;
- }
-
- // ---------------------- tool ----------------------
-
- private static InheritableThreadLocal<XxlJobContext> contextHolder = new InheritableThreadLocal<XxlJobContext>(); // support for child thread of job handler)
-
- public static void setXxlJobContext(XxlJobContext xxlJobContext) {
- contextHolder.set(xxlJobContext);
- }
-
- public static XxlJobContext getXxlJobContext() {
- return contextHolder.get();
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/context/XxlJobHelper.java b/src/main/java/com/xxl/job/core/context/XxlJobHelper.java
deleted file mode 100644
index 7025ae4..0000000
--- a/src/main/java/com/xxl/job/core/context/XxlJobHelper.java
+++ /dev/null
@@ -1,252 +0,0 @@
-package com.xxl.job.core.context;
-
-import com.xxl.job.core.log.XxlJobFileAppender;
-import com.xxl.job.core.util.DateUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.helpers.FormattingTuple;
-import org.slf4j.helpers.MessageFormatter;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Date;
-
-/**
- * helper for xxl-job
- *
- * @author liyh
- */
-public class XxlJobHelper {
-
- // ---------------------- base info ----------------------
-
- /**
- * current JobId
- *
- * @return
- */
- public static long getJobId() {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return -1;
- }
-
- return xxlJobContext.getJobId();
- }
-
- /**
- * current JobParam
- *
- * @return
- */
- public static String getJobParam() {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return null;
- }
-
- return xxlJobContext.getJobParam();
- }
-
- // ---------------------- for log ----------------------
-
- /**
- * current JobLogFileName
- *
- * @return
- */
- public static String getJobLogFileName() {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return null;
- }
-
- return xxlJobContext.getJobLogFileName();
- }
-
- // ---------------------- for shard ----------------------
-
- /**
- * current ShardIndex
- *
- * @return
- */
- public static int getShardIndex() {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return -1;
- }
-
- return xxlJobContext.getShardIndex();
- }
-
- /**
- * current ShardTotal
- *
- * @return
- */
- public static int getShardTotal() {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return -1;
- }
-
- return xxlJobContext.getShardTotal();
- }
-
- // ---------------------- tool for log ----------------------
-
- private static Logger logger = LoggerFactory.getLogger("xxl-job logger");
-
- /**
- * append log with pattern
- *
- * @param appendLogPattern like "aaa {} bbb {} ccc"
- * @param appendLogArguments like "111, true"
- */
- public static boolean log(String appendLogPattern, Object... appendLogArguments) {
-
- FormattingTuple ft = MessageFormatter.arrayFormat(appendLogPattern, appendLogArguments);
- String appendLog = ft.getMessage();
-
- /*appendLog = appendLogPattern;
- if (appendLogArguments!=null && appendLogArguments.length>0) {
- appendLog = MessageFormat.format(appendLogPattern, appendLogArguments);
- }*/
-
- StackTraceElement callInfo = new Throwable().getStackTrace()[1];
- return logDetail(callInfo, appendLog);
- }
-
- /**
- * append exception stack
- *
- * @param e
- */
- public static boolean log(Throwable e) {
-
- StringWriter stringWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(stringWriter));
- String appendLog = stringWriter.toString();
-
- StackTraceElement callInfo = new Throwable().getStackTrace()[1];
- return logDetail(callInfo, appendLog);
- }
-
- /**
- * append log
- *
- * @param callInfo
- * @param appendLog
- */
- private static boolean logDetail(StackTraceElement callInfo, String appendLog) {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return false;
- }
-
- /*// "yyyy-MM-dd HH:mm:ss [ClassName]-[MethodName]-[LineNumber]-[ThreadName] log";
- StackTraceElement[] stackTraceElements = new Throwable().getStackTrace();
- StackTraceElement callInfo = stackTraceElements[1];*/
-
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(DateUtil.formatDateTime(new Date())).append(" ")
- .append("[" + callInfo.getClassName() + "#" + callInfo.getMethodName() + "]").append("-")
- .append("[" + callInfo.getLineNumber() + "]").append("-")
- .append("[" + Thread.currentThread().getName() + "]").append(" ")
- .append(appendLog != null ? appendLog : "");
- String formatAppendLog = stringBuffer.toString();
-
- // appendlog
- String logFileName = xxlJobContext.getJobLogFileName();
-
- if (logFileName != null && logFileName.trim().length() > 0) {
- XxlJobFileAppender.appendLog(logFileName, formatAppendLog);
- return true;
- } else {
- logger.info(">>>>>>>>>>> {}", formatAppendLog);
- return false;
- }
- }
-
- // ---------------------- tool for handleResult ----------------------
-
- /**
- * handle success
- *
- * @return
- */
- public static boolean handleSuccess() {
- return handleResult(XxlJobContext.HANDLE_CODE_SUCCESS, null);
- }
-
- /**
- * handle success with log msg
- *
- * @param handleMsg
- * @return
- */
- public static boolean handleSuccess(String handleMsg) {
- return handleResult(XxlJobContext.HANDLE_CODE_SUCCESS, handleMsg);
- }
-
- /**
- * handle fail
- *
- * @return
- */
- public static boolean handleFail() {
- return handleResult(XxlJobContext.HANDLE_CODE_FAIL, null);
- }
-
- /**
- * handle fail with log msg
- *
- * @param handleMsg
- * @return
- */
- public static boolean handleFail(String handleMsg) {
- return handleResult(XxlJobContext.HANDLE_CODE_FAIL, handleMsg);
- }
-
- /**
- * handle timeout
- *
- * @return
- */
- public static boolean handleTimeout() {
- return handleResult(XxlJobContext.HANDLE_CODE_TIMEOUT, null);
- }
-
- /**
- * handle timeout with log msg
- *
- * @param handleMsg
- * @return
- */
- public static boolean handleTimeout(String handleMsg) {
- return handleResult(XxlJobContext.HANDLE_CODE_TIMEOUT, handleMsg);
- }
-
- /**
- * @param handleCode 200 : success
- * 500 : fail
- * 502 : timeout
- * @param handleMsg
- * @return
- */
- public static boolean handleResult(int handleCode, String handleMsg) {
- XxlJobContext xxlJobContext = XxlJobContext.getXxlJobContext();
- if (xxlJobContext == null) {
- return false;
- }
-
- xxlJobContext.setHandleCode(handleCode);
- if (handleMsg != null) {
- xxlJobContext.setHandleMsg(handleMsg);
- }
- return true;
- }
-
-
-}
diff --git a/src/main/java/com/xxl/job/core/enums/ExecutorBlockStrategyEnum.java b/src/main/java/com/xxl/job/core/enums/ExecutorBlockStrategyEnum.java
deleted file mode 100644
index 8978d34..0000000
--- a/src/main/java/com/xxl/job/core/enums/ExecutorBlockStrategyEnum.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.xxl.job.core.enums;
-
-/**
- * @author liyh
- */
-public enum ExecutorBlockStrategyEnum {
-
- SERIAL_EXECUTION("Serial execution"),
- /*CONCURRENT_EXECUTION("并行"),*/
- DISCARD_LATER("Discard Later"),
- COVER_EARLY("Cover Early");
-
- private String title;
-
- private ExecutorBlockStrategyEnum(String title) {
- this.title = title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public String getTitle() {
- return title;
- }
-
- public static ExecutorBlockStrategyEnum match(String name, ExecutorBlockStrategyEnum defaultItem) {
- if (name != null) {
- for (ExecutorBlockStrategyEnum item : ExecutorBlockStrategyEnum.values()) {
- if (item.name().equals(name)) {
- return item;
- }
- }
- }
- return defaultItem;
- }
-}
diff --git a/src/main/java/com/xxl/job/core/enums/RegistryConfig.java b/src/main/java/com/xxl/job/core/enums/RegistryConfig.java
deleted file mode 100644
index 62533a1..0000000
--- a/src/main/java/com/xxl/job/core/enums/RegistryConfig.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.xxl.job.core.enums;
-
-/**
- * @author liyh
- */
-public class RegistryConfig {
-
- public static final int BEAT_TIMEOUT = 30;
- public static final int DEAD_TIMEOUT = BEAT_TIMEOUT * 3;
-
- public enum RegistType {EXECUTOR, ADMIN}
-
-}
diff --git a/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
deleted file mode 100644
index e6695bc..0000000
--- a/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package com.xxl.job.core.executor;
-
-import com.xxl.job.core.biz.AdminBiz;
-import com.xxl.job.core.biz.client.AdminBizClient;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.handler.impl.MethodJobHandler;
-import com.xxl.job.core.log.XxlJobFileAppender;
-import com.xxl.job.core.server.EmbedServer;
-import com.xxl.job.core.thread.JobLogFileCleanThread;
-import com.xxl.job.core.thread.JobThread;
-import com.xxl.job.core.thread.TriggerCallbackThread;
-import com.xxl.job.core.util.IpUtil;
-import com.xxl.job.core.util.NetUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author liyh
- */
-public class XxlJobExecutor {
- private static final Logger logger = LoggerFactory.getLogger(XxlJobExecutor.class);
-
- // ---------------------- param ----------------------
- private String adminAddresses;
- private String accessToken;
- private String appname;
- private String address;
- private String ip;
- private int port;
- private String logPath;
- private int logRetentionDays;
-
- public void setAdminAddresses(String adminAddresses) {
- this.adminAddresses = adminAddresses;
- }
-
- public void setAccessToken(String accessToken) {
- this.accessToken = accessToken;
- }
-
- public void setAppname(String appname) {
- this.appname = appname;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public void setIp(String ip) {
- this.ip = ip;
- }
-
- public void setPort(int port) {
- this.port = port;
- }
-
- public void setLogPath(String logPath) {
- this.logPath = logPath;
- }
-
- public void setLogRetentionDays(int logRetentionDays) {
- this.logRetentionDays = logRetentionDays;
- }
-
- // ---------------------- start + stop ----------------------
- public void start() throws Exception {
-
- // init logpath
- XxlJobFileAppender.initLogPath(logPath);
-
- // init invoker, admin-client
- initAdminBizList(adminAddresses, accessToken);
-
- // init JobLogFileCleanThread
- JobLogFileCleanThread.getInstance().start(logRetentionDays);
-
- // init TriggerCallbackThread
- TriggerCallbackThread.getInstance().start();
-
- // init executor-server
- initEmbedServer(address, ip, port, appname, accessToken);
- }
-
- public void destroy() {
- // destroy executor-server
- stopEmbedServer();
-
- // destroy jobThreadRepository
- if (jobThreadRepository.size() > 0) {
- for (Map.Entry<Integer, JobThread> item : jobThreadRepository.entrySet()) {
- JobThread oldJobThread = removeJobThread(item.getKey(), "web container destroy and kill the job.");
- // wait for job thread push result to callback queue
- if (oldJobThread != null) {
- try {
- oldJobThread.join();
- } catch (InterruptedException e) {
- logger.error(">>>>>>>>>>> xxl-job, JobThread destroy(join) error, jobId:{}", item.getKey(), e);
- }
- }
- }
- jobThreadRepository.clear();
- }
- jobHandlerRepository.clear();
-
- // destroy JobLogFileCleanThread
- JobLogFileCleanThread.getInstance().toStop();
-
- // destroy TriggerCallbackThread
- TriggerCallbackThread.getInstance().toStop();
-
- }
-
- // ---------------------- admin-client (rpc invoker) ----------------------
- private static List<AdminBiz> adminBizList;
-
- private void initAdminBizList(String adminAddresses, String accessToken) throws Exception {
- if (adminAddresses != null && adminAddresses.trim().length() > 0) {
- for (String address : adminAddresses.trim().split(",")) {
- if (address != null && address.trim().length() > 0) {
-
- AdminBiz adminBiz = new AdminBizClient(address.trim(), accessToken);
-
- if (adminBizList == null) {
- adminBizList = new ArrayList<AdminBiz>();
- }
- adminBizList.add(adminBiz);
- }
- }
- }
- }
-
- public static List<AdminBiz> getAdminBizList() {
- return adminBizList;
- }
-
- // ---------------------- executor-server (rpc provider) ----------------------
- private EmbedServer embedServer = null;
-
- private void initEmbedServer(String address, String ip, int port, String appname, String accessToken) throws Exception {
-
- // fill ip port
- port = port > 0 ? port : NetUtil.findAvailablePort(9999);
- ip = (ip != null && ip.trim().length() > 0) ? ip : IpUtil.getIp();
-
- // generate address
- if (address == null || address.trim().length() == 0) {
- String ip_port_address = IpUtil.getIpPort(ip, port); // registry-address:default use address to registry , otherwise use ip:port if address is null
- address = "http://{ip_port}/".replace("{ip_port}", ip_port_address);
- }
-
- // accessToken
- if (accessToken == null || accessToken.trim().length() == 0) {
- logger.warn(">>>>>>>>>>> xxl-job accessToken is empty. To ensure system security, please set the accessToken.");
- }
-
- // start
- embedServer = new EmbedServer();
- embedServer.start(address, port, appname, accessToken);
- }
-
- private void stopEmbedServer() {
- // stop provider factory
- if (embedServer != null) {
- try {
- embedServer.stop();
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
-
- // ---------------------- job handler repository ----------------------
- private static ConcurrentMap<String, IJobHandler> jobHandlerRepository = new ConcurrentHashMap<String, IJobHandler>();
-
- public static IJobHandler loadJobHandler(String name) {
- return jobHandlerRepository.get(name);
- }
-
- public static IJobHandler registJobHandler(String name, IJobHandler jobHandler) {
- logger.info(">>>>>>>>>>> xxl-job register jobhandler success, name:{}, jobHandler:{}", name, jobHandler);
- return jobHandlerRepository.put(name, jobHandler);
- }
-
- protected void registJobHandler(XxlJob xxlJob, Object bean, Method executeMethod) {
- if (xxlJob == null) {
- return;
- }
-
- String name = xxlJob.value();
- //make and simplify the variables since they'll be called several times later
- Class<?> clazz = bean.getClass();
- String methodName = executeMethod.getName();
- if (name.trim().length() == 0) {
- throw new RuntimeException("xxl-job method-jobhandler name invalid, for[" + clazz + "#" + methodName + "] .");
- }
- if (loadJobHandler(name) != null) {
- throw new RuntimeException("xxl-job jobhandler[" + name + "] naming conflicts.");
- }
-
- // execute method
- /*if (!(method.getParameterTypes().length == 1 && method.getParameterTypes()[0].isAssignableFrom(String.class))) {
- throw new RuntimeException("xxl-job method-jobhandler param-classtype invalid, for[" + bean.getClass() + "#" + method.getName() + "] , " +
- "The correct method format like \" public ReturnT<String> execute(String param) \" .");
- }
- if (!method.getReturnType().isAssignableFrom(ReturnT.class)) {
- throw new RuntimeException("xxl-job method-jobhandler return-classtype invalid, for[" + bean.getClass() + "#" + method.getName() + "] , " +
- "The correct method format like \" public ReturnT<String> execute(String param) \" .");
- }*/
-
- executeMethod.setAccessible(true);
-
- // init and destroy
- Method initMethod = null;
- Method destroyMethod = null;
-
- if (xxlJob.init().trim().length() > 0) {
- try {
- initMethod = clazz.getDeclaredMethod(xxlJob.init());
- initMethod.setAccessible(true);
- } catch (NoSuchMethodException e) {
- throw new RuntimeException("xxl-job method-jobhandler initMethod invalid, for[" + clazz + "#" + methodName + "] .");
- }
- }
- if (xxlJob.destroy().trim().length() > 0) {
- try {
- destroyMethod = clazz.getDeclaredMethod(xxlJob.destroy());
- destroyMethod.setAccessible(true);
- } catch (NoSuchMethodException e) {
- throw new RuntimeException("xxl-job method-jobhandler destroyMethod invalid, for[" + clazz + "#" + methodName + "] .");
- }
- }
-
- // registry jobhandler
- registJobHandler(name, new MethodJobHandler(bean, executeMethod, initMethod, destroyMethod));
-
- }
-
- // ---------------------- job thread repository ----------------------
- private static ConcurrentMap<Integer, JobThread> jobThreadRepository = new ConcurrentHashMap<Integer, JobThread>();
-
- public static JobThread registJobThread(int jobId, IJobHandler handler, String removeOldReason) {
- JobThread newJobThread = new JobThread(jobId, handler);
- newJobThread.start();
- logger.info(">>>>>>>>>>> xxl-job regist JobThread success, jobId:{}, handler:{}", new Object[]{jobId, handler});
-
- JobThread oldJobThread = jobThreadRepository.put(jobId, newJobThread); // putIfAbsent | oh my god, map's put method return the old value!!!
- if (oldJobThread != null) {
- oldJobThread.toStop(removeOldReason);
- oldJobThread.interrupt();
- }
-
- return newJobThread;
- }
-
- public static JobThread removeJobThread(int jobId, String removeOldReason) {
- JobThread oldJobThread = jobThreadRepository.remove(jobId);
- if (oldJobThread != null) {
- oldJobThread.toStop(removeOldReason);
- oldJobThread.interrupt();
-
- return oldJobThread;
- }
- return null;
- }
-
- public static JobThread loadJobThread(int jobId) {
- JobThread jobThread = jobThreadRepository.get(jobId);
- return jobThread;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/executor/impl/XxlJobSimpleExecutor.java b/src/main/java/com/xxl/job/core/executor/impl/XxlJobSimpleExecutor.java
deleted file mode 100644
index 428e0a4..0000000
--- a/src/main/java/com/xxl/job/core/executor/impl/XxlJobSimpleExecutor.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.xxl.job.core.executor.impl;
-
-import com.xxl.job.core.executor.XxlJobExecutor;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * xxl-job executor (for frameless)
- *
- * @author liyh
- */
-public class XxlJobSimpleExecutor extends XxlJobExecutor {
- private static final Logger logger = LoggerFactory.getLogger(XxlJobSimpleExecutor.class);
-
-
- private List<Object> xxlJobBeanList = new ArrayList<>();
-
- public List<Object> getXxlJobBeanList() {
- return xxlJobBeanList;
- }
-
- public void setXxlJobBeanList(List<Object> xxlJobBeanList) {
- this.xxlJobBeanList = xxlJobBeanList;
- }
-
-
- @Override
- public void start() {
-
- // init JobHandler Repository (for method)
- initJobHandlerMethodRepository(xxlJobBeanList);
-
- // super start
- try {
- super.start();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public void destroy() {
- super.destroy();
- }
-
-
- private void initJobHandlerMethodRepository(List<Object> xxlJobBeanList) {
- if (xxlJobBeanList == null || xxlJobBeanList.size() == 0) {
- return;
- }
-
- // init job handler from method
- for (Object bean : xxlJobBeanList) {
- // method
- Method[] methods = bean.getClass().getDeclaredMethods();
- if (methods.length == 0) {
- continue;
- }
- for (Method executeMethod : methods) {
- XxlJob xxlJob = executeMethod.getAnnotation(XxlJob.class);
- // registry
- registJobHandler(xxlJob, bean, executeMethod);
- }
-
- }
-
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java b/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
deleted file mode 100644
index 292a177..0000000
--- a/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package com.xxl.job.core.executor.impl;
-
-import com.xxl.job.core.executor.XxlJobExecutor;
-import com.xxl.job.core.glue.GlueFactory;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.SmartInitializingSingleton;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.core.MethodIntrospector;
-import org.springframework.core.annotation.AnnotatedElementUtils;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * xxl-job executor (for spring)
- *
- * @author liyh
- */
-public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationContextAware, SmartInitializingSingleton, DisposableBean {
- private static final Logger logger = LoggerFactory.getLogger(XxlJobSpringExecutor.class);
-
- // start
- @Override
- public void afterSingletonsInstantiated() {
-
- // init JobHandler Repository
- /*initJobHandlerRepository(applicationContext);*/
-
- // init JobHandler Repository (for method)
- initJobHandlerMethodRepository(applicationContext);
-
- // refresh GlueFactory
- GlueFactory.refreshInstance(1);
-
- // super start
- try {
- super.start();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- // destroy
- @Override
- public void destroy() {
- super.destroy();
- }
-
-
- /*private void initJobHandlerRepository(ApplicationContext applicationContext) {
- if (applicationContext == null) {
- return;
- }
-
- // init job handler action
- Map<String, Object> serviceBeanMap = applicationContext.getBeansWithAnnotation(JobHandler.class);
-
- if (serviceBeanMap != null && serviceBeanMap.size() > 0) {
- for (Object serviceBean : serviceBeanMap.values()) {
- if (serviceBean instanceof IJobHandler) {
- String name = serviceBean.getClass().getAnnotation(JobHandler.class).value();
- IJobHandler handler = (IJobHandler) serviceBean;
- if (loadJobHandler(name) != null) {
- throw new RuntimeException("xxl-job jobhandler[" + name + "] naming conflicts.");
- }
- registJobHandler(name, handler);
- }
- }
- }
- }*/
-
- private void initJobHandlerMethodRepository(ApplicationContext applicationContext) {
- if (applicationContext == null) {
- return;
- }
- // init job handler from method
- String[] beanDefinitionNames = applicationContext.getBeanNamesForType(Object.class, false, true);
- for (String beanDefinitionName : beanDefinitionNames) {
- Object bean = applicationContext.getBean(beanDefinitionName);
-
- Map<Method, XxlJob> annotatedMethods = null; // referred to :org.springframework.context.event.EventListenerMethodProcessor.processBean
- try {
- annotatedMethods = MethodIntrospector.selectMethods(bean.getClass(),
- new MethodIntrospector.MetadataLookup<XxlJob>() {
- @Override
- public XxlJob inspect(Method method) {
- return AnnotatedElementUtils.findMergedAnnotation(method, XxlJob.class);
- }
- });
- } catch (Throwable ex) {
- logger.error("xxl-job method-jobhandler resolve error for bean[" + beanDefinitionName + "].", ex);
- }
- if (annotatedMethods == null || annotatedMethods.isEmpty()) {
- continue;
- }
-
- for (Map.Entry<Method, XxlJob> methodXxlJobEntry : annotatedMethods.entrySet()) {
- Method executeMethod = methodXxlJobEntry.getKey();
- XxlJob xxlJob = methodXxlJobEntry.getValue();
- // regist
- registJobHandler(xxlJob, bean, executeMethod);
- }
- }
- }
-
- // ---------------------- applicationContext ----------------------
- private static ApplicationContext applicationContext;
-
- @Override
- public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
- XxlJobSpringExecutor.applicationContext = applicationContext;
- }
-
- public static ApplicationContext getApplicationContext() {
- return applicationContext;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/glue/GlueFactory.java b/src/main/java/com/xxl/job/core/glue/GlueFactory.java
deleted file mode 100644
index 9e024b3..0000000
--- a/src/main/java/com/xxl/job/core/glue/GlueFactory.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package com.xxl.job.core.glue;
-
-import com.xxl.job.core.glue.impl.SpringGlueFactory;
-import com.xxl.job.core.handler.IJobHandler;
-import groovy.lang.GroovyClassLoader;
-
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * glue factory, product class/object by name
- *
- * @author liyh
- */
-public class GlueFactory {
-
- private static GlueFactory glueFactory = new GlueFactory();
-
- public static GlueFactory getInstance() {
- return glueFactory;
- }
-
- public static void refreshInstance(int type) {
- if (type == 0) {
- glueFactory = new GlueFactory();
- } else if (type == 1) {
- glueFactory = new SpringGlueFactory();
- }
- }
-
- /**
- * groovy class loader
- */
- private GroovyClassLoader groovyClassLoader = new GroovyClassLoader();
- private ConcurrentMap<String, Class<?>> CLASS_CACHE = new ConcurrentHashMap<>();
-
- /**
- * load new instance, prototype
- *
- * @param codeSource
- * @return
- * @throws Exception
- */
- public IJobHandler loadNewInstance(String codeSource) throws Exception {
- if (codeSource != null && codeSource.trim().length() > 0) {
- Class<?> clazz = getCodeSourceClass(codeSource);
- if (clazz != null) {
- Object instance = clazz.newInstance();
- if (instance != null) {
- if (instance instanceof IJobHandler) {
- this.injectService(instance);
- return (IJobHandler) instance;
- } else {
- throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, "
- + "cannot convert from instance[" + instance.getClass() + "] to IJobHandler");
- }
- }
- }
- }
- throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null");
- }
-
- private Class<?> getCodeSourceClass(String codeSource) {
- try {
- // md5
- byte[] md5 = MessageDigest.getInstance("MD5").digest(codeSource.getBytes());
- String md5Str = new BigInteger(1, md5).toString(16);
-
- Class<?> clazz = CLASS_CACHE.get(md5Str);
- if (clazz == null) {
- clazz = groovyClassLoader.parseClass(codeSource);
- CLASS_CACHE.putIfAbsent(md5Str, clazz);
- }
- return clazz;
- } catch (Exception e) {
- return groovyClassLoader.parseClass(codeSource);
- }
- }
-
- /**
- * inject service of bean field
- *
- * @param instance
- */
- public void injectService(Object instance) {
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java b/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java
deleted file mode 100644
index be96dc0..0000000
--- a/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.xxl.job.core.glue;
-
-/**
- * @author liyh
- */
-public enum GlueTypeEnum {
-
- BEAN("BEAN", false, null, null),
- GLUE_GROOVY("GLUE(Java)", false, null, null),
- GLUE_SHELL("GLUE(Shell)", true, "bash", ".sh"),
- GLUE_PYTHON("GLUE(Python)", true, "python", ".py"),
- GLUE_PHP("GLUE(PHP)", true, "php", ".php"),
- GLUE_NODEJS("GLUE(Nodejs)", true, "node", ".js"),
- GLUE_POWERSHELL("GLUE(PowerShell)", true, "powershell", ".ps1");
-
- private String desc;
- private boolean isScript;
- private String cmd;
- private String suffix;
-
- private GlueTypeEnum(String desc, boolean isScript, String cmd, String suffix) {
- this.desc = desc;
- this.isScript = isScript;
- this.cmd = cmd;
- this.suffix = suffix;
- }
-
- public String getDesc() {
- return desc;
- }
-
- public boolean isScript() {
- return isScript;
- }
-
- public String getCmd() {
- return cmd;
- }
-
- public String getSuffix() {
- return suffix;
- }
-
- public static GlueTypeEnum match(String name) {
- for (GlueTypeEnum item : GlueTypeEnum.values()) {
- if (item.name().equals(name)) {
- return item;
- }
- }
- return null;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/glue/impl/SpringGlueFactory.java b/src/main/java/com/xxl/job/core/glue/impl/SpringGlueFactory.java
deleted file mode 100644
index 9d7a5d2..0000000
--- a/src/main/java/com/xxl/job/core/glue/impl/SpringGlueFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.xxl.job.core.glue.impl;
-
-import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
-import com.xxl.job.core.glue.GlueFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.core.annotation.AnnotationUtils;
-
-import javax.annotation.Resource;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-
-/**
- * @author liyh
- */
-public class SpringGlueFactory extends GlueFactory {
- private static Logger logger = LoggerFactory.getLogger(SpringGlueFactory.class);
-
- /**
- * inject action of spring
- *
- * @param instance
- */
- @Override
- public void injectService(Object instance) {
- if (instance == null) {
- return;
- }
-
- if (XxlJobSpringExecutor.getApplicationContext() == null) {
- return;
- }
-
- Field[] fields = instance.getClass().getDeclaredFields();
- for (Field field : fields) {
- if (Modifier.isStatic(field.getModifiers())) {
- continue;
- }
-
- Object fieldBean = null;
- // with bean-id, bean could be found by both @Resource and @Autowired, or bean could only be found by @Autowired
-
- if (AnnotationUtils.getAnnotation(field, Resource.class) != null) {
- try {
- Resource resource = AnnotationUtils.getAnnotation(field, Resource.class);
- if (resource.name() != null && resource.name().length() > 0) {
- fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(resource.name());
- } else {
- fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(field.getName());
- }
- } catch (Exception e) {
- }
- if (fieldBean == null) {
- fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(field.getType());
- }
- } else if (AnnotationUtils.getAnnotation(field, Autowired.class) != null) {
- Qualifier qualifier = AnnotationUtils.getAnnotation(field, Qualifier.class);
- if (qualifier != null && qualifier.value() != null && qualifier.value().length() > 0) {
- fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(qualifier.value());
- } else {
- fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(field.getType());
- }
- }
-
- if (fieldBean != null) {
- field.setAccessible(true);
- try {
- field.set(instance, fieldBean);
- } catch (IllegalArgumentException e) {
- logger.error(e.getMessage(), e);
- } catch (IllegalAccessException e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/handler/IJobHandler.java b/src/main/java/com/xxl/job/core/handler/IJobHandler.java
deleted file mode 100644
index db520d9..0000000
--- a/src/main/java/com/xxl/job/core/handler/IJobHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.xxl.job.core.handler;
-
-/**
- * job handler
- *
- * @author liyh
- */
-public abstract class IJobHandler {
-
- /**
- * execute handler, invoked when executor receives a scheduling request
- *
- * @throws Exception
- */
- public abstract void execute() throws Exception;
-
- /**
- * init handler, invoked when JobThread init
- */
- public void init() throws Exception {
-
- }
-
- /**
- * destroy handler, invoked when JobThread destroy
- */
- public void destroy() throws Exception {
-
- }
-
-
-}
diff --git a/src/main/java/com/xxl/job/core/handler/annotation/JobHandler.java b/src/main/java/com/xxl/job/core/handler/annotation/JobHandler.java
deleted file mode 100644
index 2b560c0..0000000
--- a/src/main/java/com/xxl/job/core/handler/annotation/JobHandler.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.xxl.job.core.handler.annotation;//package com.xxl.job.core.handler.annotation;//package com.xxl.job.core.handler.annotation;
-//
-//import java.lang.annotation.ElementType;
-//import java.lang.annotation.Inherited;
-//import java.lang.annotation.Retention;
-//import java.lang.annotation.RetentionPolicy;
-//import java.lang.annotation.Target;
-//
-///**
-// * annotation for job handler
-// * <p>
-// * will be replaced by {@link com.xxl.job.core.handler.annotation.XxlJob}
-// *
-// * @author liyh
-// */
-//@Target({ElementType.TYPE})
-//@Retention(RetentionPolicy.RUNTIME)
-//@Inherited
-//@Deprecated
-//public @interface JobHandler {
-//
-// String value();
-//
-//}
diff --git a/src/main/java/com/xxl/job/core/handler/annotation/XxlJob.java b/src/main/java/com/xxl/job/core/handler/annotation/XxlJob.java
deleted file mode 100644
index 256f338..0000000
--- a/src/main/java/com/xxl/job/core/handler/annotation/XxlJob.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.xxl.job.core.handler.annotation;
-
-import java.lang.annotation.*;
-
-/**
- * annotation for method jobhandler
- *
- * @author liyh
- */
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@Inherited
-public @interface XxlJob {
-
- /**
- * jobhandler name
- */
- String value();
-
- /**
- * init handler, invoked when JobThread init
- */
- String init() default "";
-
- /**
- * destroy handler, invoked when JobThread destroy
- */
- String destroy() default "";
-
-}
diff --git a/src/main/java/com/xxl/job/core/handler/impl/GlueJobHandler.java b/src/main/java/com/xxl/job/core/handler/impl/GlueJobHandler.java
deleted file mode 100644
index 20f99ea..0000000
--- a/src/main/java/com/xxl/job/core/handler/impl/GlueJobHandler.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.xxl.job.core.handler.impl;
-
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.handler.IJobHandler;
-
-/**
- * glue job handler
- *
- * @author liyh
- */
-public class GlueJobHandler extends IJobHandler {
-
- private long glueUpdatetime;
- private IJobHandler jobHandler;
-
- public GlueJobHandler(IJobHandler jobHandler, long glueUpdatetime) {
- this.jobHandler = jobHandler;
- this.glueUpdatetime = glueUpdatetime;
- }
-
- public long getGlueUpdatetime() {
- return glueUpdatetime;
- }
-
- @Override
- public void execute() throws Exception {
- XxlJobHelper.log("----------- glue.version:" + glueUpdatetime + " -----------");
- jobHandler.execute();
- }
-
- @Override
- public void init() throws Exception {
- this.jobHandler.init();
- }
-
- @Override
- public void destroy() throws Exception {
- this.jobHandler.destroy();
- }
-}
diff --git a/src/main/java/com/xxl/job/core/handler/impl/MethodJobHandler.java b/src/main/java/com/xxl/job/core/handler/impl/MethodJobHandler.java
deleted file mode 100644
index 6d3e971..0000000
--- a/src/main/java/com/xxl/job/core/handler/impl/MethodJobHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.xxl.job.core.handler.impl;
-
-import com.xxl.job.core.handler.IJobHandler;
-
-import java.lang.reflect.Method;
-
-/**
- * @author liyh
- */
-public class MethodJobHandler extends IJobHandler {
-
- private final Object target;
- private final Method method;
- private Method initMethod;
- private Method destroyMethod;
-
- public MethodJobHandler(Object target, Method method, Method initMethod, Method destroyMethod) {
- this.target = target;
- this.method = method;
-
- this.initMethod = initMethod;
- this.destroyMethod = destroyMethod;
- }
-
- @Override
- public void execute() throws Exception {
- Class<?>[] paramTypes = method.getParameterTypes();
- if (paramTypes.length > 0) {
- method.invoke(target, new Object[paramTypes.length]); // method-param can not be primitive-types
- } else {
- method.invoke(target);
- }
- }
-
- @Override
- public void init() throws Exception {
- if (initMethod != null) {
- initMethod.invoke(target);
- }
- }
-
- @Override
- public void destroy() throws Exception {
- if (destroyMethod != null) {
- destroyMethod.invoke(target);
- }
- }
-
- @Override
- public String toString() {
- return super.toString() + "[" + target.getClass() + "#" + method.getName() + "]";
- }
-}
diff --git a/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java b/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
deleted file mode 100644
index 6fc478d..0000000
--- a/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.xxl.job.core.handler.impl;
-
-import com.xxl.job.core.context.XxlJobContext;
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.log.XxlJobFileAppender;
-import com.xxl.job.core.util.ScriptUtil;
-
-import java.io.File;
-
-/**
- * @author liyh
- */
-public class ScriptJobHandler extends IJobHandler {
-
- private int jobId;
- private long glueUpdatetime;
- private String gluesource;
- private GlueTypeEnum glueType;
-
- public ScriptJobHandler(int jobId, long glueUpdatetime, String gluesource, GlueTypeEnum glueType) {
- this.jobId = jobId;
- this.glueUpdatetime = glueUpdatetime;
- this.gluesource = gluesource;
- this.glueType = glueType;
-
- // clean old script file
- File glueSrcPath = new File(XxlJobFileAppender.getGlueSrcPath());
- if (glueSrcPath.exists()) {
- File[] glueSrcFileList = glueSrcPath.listFiles();
- if (glueSrcFileList != null && glueSrcFileList.length > 0) {
- for (File glueSrcFileItem : glueSrcFileList) {
- if (glueSrcFileItem.getName().startsWith(String.valueOf(jobId) + "_")) {
- glueSrcFileItem.delete();
- }
- }
- }
- }
-
- }
-
- public long getGlueUpdatetime() {
- return glueUpdatetime;
- }
-
- @Override
- public void execute() throws Exception {
-
- if (!glueType.isScript()) {
- XxlJobHelper.handleFail("glueType[" + glueType + "] invalid.");
- return;
- }
-
- // cmd
- String cmd = glueType.getCmd();
-
- // make script file
- String scriptFileName = XxlJobFileAppender.getGlueSrcPath()
- .concat(File.separator)
- .concat(String.valueOf(jobId))
- .concat("_")
- .concat(String.valueOf(glueUpdatetime))
- .concat(glueType.getSuffix());
- File scriptFile = new File(scriptFileName);
- if (!scriptFile.exists()) {
- ScriptUtil.markScriptFile(scriptFileName, gluesource);
- }
-
- // log file
- String logFileName = XxlJobContext.getXxlJobContext().getJobLogFileName();
-
- // script params:0=param、1=分片序号、2=分片总数
- String[] scriptParams = new String[3];
- scriptParams[0] = XxlJobHelper.getJobParam();
- scriptParams[1] = String.valueOf(XxlJobContext.getXxlJobContext().getShardIndex());
- scriptParams[2] = String.valueOf(XxlJobContext.getXxlJobContext().getShardTotal());
-
- // invoke
- XxlJobHelper.log("----------- script file:" + scriptFileName + " -----------");
- int exitValue = ScriptUtil.execToFile(cmd, scriptFileName, logFileName, scriptParams);
-
- if (exitValue == 0) {
- XxlJobHelper.handleSuccess();
- return;
- } else {
- XxlJobHelper.handleFail("script exit value(" + exitValue + ") is failed");
- return;
- }
-
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
deleted file mode 100644
index 130085c..0000000
--- a/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package com.xxl.job.core.log;
-
-import com.xxl.job.core.biz.model.LogResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.*;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * store trigger log in each log-file
- *
- * @author liyh
- */
-public class XxlJobFileAppender {
- private static Logger logger = LoggerFactory.getLogger(XxlJobFileAppender.class);
-
- private static String logBasePath = "logs/xxl-job/jobhandler";
- private static String glueSrcPath = logBasePath.concat("/gluesource");
-
- public static void initLogPath(String logPath) {
- // init
- if (logPath != null && logPath.trim().length() > 0) {
- logBasePath = logPath;
- }
- // mk base dir
- File logPathDir = new File(logBasePath);
- if (!logPathDir.exists()) {
- logPathDir.mkdirs();
- }
- logBasePath = logPathDir.getPath();
-
- // mk glue dir
- File glueBaseDir = new File(logPathDir, "gluesource");
- if (!glueBaseDir.exists()) {
- glueBaseDir.mkdirs();
- }
- glueSrcPath = glueBaseDir.getPath();
- }
-
- public static String getLogPath() {
- return logBasePath;
- }
-
- public static String getGlueSrcPath() {
- return glueSrcPath;
- }
-
- /**
- * log filename, like "logPath/yyyy-MM-dd/9999.log"
- *
- * @param triggerDate
- * @param logId
- * @return
- */
- public static String makeLogFileName(Date triggerDate, long logId) {
-
- // filePath/yyyy-MM-dd
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // avoid concurrent problem, can not be static
- File logFilePath = new File(getLogPath(), sdf.format(triggerDate));
- if (!logFilePath.exists()) {
- logFilePath.mkdir();
- }
-
- // filePath/yyyy-MM-dd/9999.log
- String logFileName = logFilePath.getPath()
- .concat(File.separator)
- .concat(String.valueOf(logId))
- .concat(".log");
- return logFileName;
- }
-
- /**
- * append log
- *
- * @param logFileName
- * @param appendLog
- */
- public static void appendLog(String logFileName, String appendLog) {
-
- // log file
- if (logFileName == null || logFileName.trim().length() == 0) {
- return;
- }
- File logFile = new File(logFileName);
-
- if (!logFile.exists()) {
- try {
- logFile.createNewFile();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- return;
- }
- }
-
- // log
- if (appendLog == null) {
- appendLog = "";
- }
- appendLog += "\r\n";
-
- // append file content
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(logFile, true);
- fos.write(appendLog.getBytes("utf-8"));
- fos.flush();
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- } finally {
- if (fos != null) {
- try {
- fos.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
-
- }
-
- /**
- * support read log-file
- *
- * @param logFileName
- * @return log content
- */
- public static LogResult readLog(String logFileName, int fromLineNum) {
-
- // valid log file
- if (logFileName == null || logFileName.trim().length() == 0) {
- return new LogResult(fromLineNum, 0, "readLog fail, logFile not found", true);
- }
- File logFile = new File(logFileName);
-
- if (!logFile.exists()) {
- return new LogResult(fromLineNum, 0, "readLog fail, logFile not exists", true);
- }
-
- // read file
- StringBuffer logContentBuffer = new StringBuffer();
- int toLineNum = 0;
- LineNumberReader reader = null;
- try {
- //reader = new LineNumberReader(new FileReader(logFile));
- reader = new LineNumberReader(new InputStreamReader(new FileInputStream(logFile), "utf-8"));
- String line = null;
-
- while ((line = reader.readLine()) != null) {
- toLineNum = reader.getLineNumber(); // [from, to], start as 1
- if (toLineNum >= fromLineNum) {
- logContentBuffer.append(line).append("\n");
- }
- }
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
-
- // result
- LogResult logResult = new LogResult(fromLineNum, toLineNum, logContentBuffer.toString(), false);
- return logResult;
-
- /*
- // it will return the number of characters actually skipped
- reader.skip(Long.MAX_VALUE);
- int maxLineNum = reader.getLineNumber();
- maxLineNum++; // 最大行号
- */
- }
-
- /**
- * read log data
- *
- * @param logFile
- * @return log line content
- */
- public static String readLines(File logFile) {
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new InputStreamReader(new FileInputStream(logFile), "utf-8"));
- if (reader != null) {
- StringBuilder sb = new StringBuilder();
- String line = null;
- while ((line = reader.readLine()) != null) {
- sb.append(line).append("\n");
- }
- return sb.toString();
- }
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
- return null;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/server/EmbedServer.java b/src/main/java/com/xxl/job/core/server/EmbedServer.java
deleted file mode 100644
index 3505fb2..0000000
--- a/src/main/java/com/xxl/job/core/server/EmbedServer.java
+++ /dev/null
@@ -1,263 +0,0 @@
-package com.xxl.job.core.server;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.impl.ExecutorBizImpl;
-import com.xxl.job.core.biz.model.*;
-import com.xxl.job.core.thread.ExecutorRegistryThread;
-import com.xxl.job.core.util.GsonTool;
-import com.xxl.job.core.util.ThrowableUtil;
-import com.xxl.job.core.util.XxlJobRemotingUtil;
-import io.netty.bootstrap.ServerBootstrap;
-import io.netty.buffer.Unpooled;
-import io.netty.channel.*;
-import io.netty.channel.nio.NioEventLoopGroup;
-import io.netty.channel.socket.SocketChannel;
-import io.netty.channel.socket.nio.NioServerSocketChannel;
-import io.netty.handler.codec.http.*;
-import io.netty.handler.timeout.IdleStateEvent;
-import io.netty.handler.timeout.IdleStateHandler;
-import io.netty.util.CharsetUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.concurrent.*;
-
-/**
- * @author liyh
- */
-public class EmbedServer {
- private static final Logger logger = LoggerFactory.getLogger(EmbedServer.class);
-
- private ExecutorBiz executorBiz;
- private Thread thread;
-
- public void start(final String address, final int port, final String appname, final String accessToken) {
- executorBiz = new ExecutorBizImpl();
- thread = new Thread(new Runnable() {
-
- @Override
- public void run() {
-
- // param
- EventLoopGroup bossGroup = new NioEventLoopGroup();
- EventLoopGroup workerGroup = new NioEventLoopGroup();
- ThreadPoolExecutor bizThreadPool = new ThreadPoolExecutor(
- 0,
- 200,
- 60L,
- TimeUnit.SECONDS,
- new LinkedBlockingQueue<Runnable>(2000),
- new ThreadFactory() {
- @Override
- public Thread newThread(Runnable r) {
- return new Thread(r, "xxl-job, EmbedServer bizThreadPool-" + r.hashCode());
- }
- },
- new RejectedExecutionHandler() {
- @Override
- public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
- throw new RuntimeException("xxl-job, EmbedServer bizThreadPool is EXHAUSTED!");
- }
- });
-
-
- try {
- // start server
- ServerBootstrap bootstrap = new ServerBootstrap();
- bootstrap.group(bossGroup, workerGroup)
- .channel(NioServerSocketChannel.class)
- .childHandler(new ChannelInitializer<SocketChannel>() {
- @Override
- public void initChannel(SocketChannel channel) throws Exception {
- channel.pipeline()
- .addLast(new IdleStateHandler(0, 0, 30 * 3, TimeUnit.SECONDS)) // beat 3N, close if idle
- .addLast(new HttpServerCodec())
- .addLast(new HttpObjectAggregator(5 * 1024 * 1024)) // merge request & reponse to FULL
- .addLast(new EmbedHttpServerHandler(executorBiz, accessToken, bizThreadPool));
- }
- })
- .childOption(ChannelOption.SO_KEEPALIVE, true);
-
- // bind
- ChannelFuture future = bootstrap.bind(port).sync();
-
- logger.info(">>>>>>>>>>> xxl-job remoting server start success, nettype = {}, port = {}", EmbedServer.class, port);
-
- // start registry
- startRegistry(appname, address);
-
- // wait util stop
- future.channel().closeFuture().sync();
-
- } catch (InterruptedException e) {
- if (e instanceof InterruptedException) {
- logger.info(">>>>>>>>>>> xxl-job remoting server stop.");
- } else {
- logger.error(">>>>>>>>>>> xxl-job remoting server error.", e);
- }
- } finally {
- // stop
- try {
- workerGroup.shutdownGracefully();
- bossGroup.shutdownGracefully();
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- }
- }
-
- }
-
- });
- thread.setDaemon(true); // daemon, service jvm, user thread leave >>> daemon leave >>> jvm leave
- thread.start();
- }
-
- public void stop() throws Exception {
- // destroy server thread
- if (thread != null && thread.isAlive()) {
- thread.interrupt();
- }
-
- // stop registry
- stopRegistry();
- logger.info(">>>>>>>>>>> xxl-job remoting server destroy success.");
- }
-
-
- // ---------------------- registry ----------------------
-
- /**
- * netty_http
- *
- * @author liyh
- */
- public static class EmbedHttpServerHandler extends SimpleChannelInboundHandler<FullHttpRequest> {
- private static final Logger logger = LoggerFactory.getLogger(EmbedHttpServerHandler.class);
-
- private ExecutorBiz executorBiz;
- private String accessToken;
- private ThreadPoolExecutor bizThreadPool;
-
- public EmbedHttpServerHandler(ExecutorBiz executorBiz, String accessToken, ThreadPoolExecutor bizThreadPool) {
- this.executorBiz = executorBiz;
- this.accessToken = accessToken;
- this.bizThreadPool = bizThreadPool;
- }
-
- @Override
- protected void channelRead0(final ChannelHandlerContext ctx, FullHttpRequest msg) throws Exception {
-
- // request parse
- //final byte[] requestBytes = ByteBufUtil.getBytes(msg.content()); // byteBuf.toString(io.netty.util.CharsetUtil.UTF_8);
- String requestData = msg.content().toString(CharsetUtil.UTF_8);
- String uri = msg.uri();
- HttpMethod httpMethod = msg.method();
- boolean keepAlive = HttpUtil.isKeepAlive(msg);
- String accessTokenReq = msg.headers().get(XxlJobRemotingUtil.XXL_JOB_ACCESS_TOKEN);
-
- // invoke
- bizThreadPool.execute(new Runnable() {
- @Override
- public void run() {
- // do invoke
- Object responseObj = process(httpMethod, uri, requestData, accessTokenReq);
-
- // to json
- String responseJson = GsonTool.toJson(responseObj);
-
- // write response
- writeResponse(ctx, keepAlive, responseJson);
- }
- });
- }
-
- private Object process(HttpMethod httpMethod, String uri, String requestData, String accessTokenReq) {
-
- // valid
- if (HttpMethod.POST != httpMethod) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "invalid request, HttpMethod not support.");
- }
- if (uri == null || uri.trim().length() == 0) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "invalid request, uri-mapping empty.");
- }
- if (accessToken != null
- && accessToken.trim().length() > 0
- && !accessToken.equals(accessTokenReq)) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "The access token is wrong.");
- }
-
- // services mapping
- try {
- if ("/beat".equals(uri)) {
- return executorBiz.beat();
- } else if ("/idleBeat".equals(uri)) {
- IdleBeatParam idleBeatParam = GsonTool.fromJson(requestData, IdleBeatParam.class);
- return executorBiz.idleBeat(idleBeatParam);
- } else if ("/run".equals(uri)) {
- TriggerParam triggerParam = GsonTool.fromJson(requestData, TriggerParam.class);
- return executorBiz.run(triggerParam);
- } else if ("/kill".equals(uri)) {
- KillParam killParam = GsonTool.fromJson(requestData, KillParam.class);
- return executorBiz.kill(killParam);
- } else if ("/log".equals(uri)) {
- LogParam logParam = GsonTool.fromJson(requestData, LogParam.class);
- return executorBiz.log(logParam);
- } else {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "invalid request, uri-mapping(" + uri + ") not found.");
- }
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- return new ReturnT<String>(ReturnT.FAIL_CODE, "request error:" + ThrowableUtil.toString(e));
- }
- }
-
- /**
- * write response
- */
- private void writeResponse(ChannelHandlerContext ctx, boolean keepAlive, String responseJson) {
- // write response
- FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.copiedBuffer(responseJson, CharsetUtil.UTF_8)); // Unpooled.wrappedBuffer(responseJson)
- response.headers().set(HttpHeaderNames.CONTENT_TYPE, "text/html;charset=UTF-8"); // HttpHeaderValues.TEXT_PLAIN.toString()
- response.headers().set(HttpHeaderNames.CONTENT_LENGTH, response.content().readableBytes());
- if (keepAlive) {
- response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE);
- }
- ctx.writeAndFlush(response);
- }
-
- @Override
- public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
- ctx.flush();
- }
-
- @Override
- public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
- logger.error(">>>>>>>>>>> xxl-job provider netty_http server caught exception", cause);
- ctx.close();
- }
-
- @Override
- public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
- if (evt instanceof IdleStateEvent) {
- ctx.channel().close(); // beat 3N, close if idle
- logger.debug(">>>>>>>>>>> xxl-job provider netty_http server close an idle channel.");
- } else {
- super.userEventTriggered(ctx, evt);
- }
- }
- }
-
- // ---------------------- registry ----------------------
-
- public void startRegistry(final String appname, final String address) {
- // start registry
- ExecutorRegistryThread.getInstance().start(appname, address);
- }
-
- public void stopRegistry() {
- // stop registry
- ExecutorRegistryThread.getInstance().toStop();
- }
-
-
-}
diff --git a/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java b/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java
deleted file mode 100644
index 0942911..0000000
--- a/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.xxl.job.core.thread;
-
-import com.xxl.job.core.biz.AdminBiz;
-import com.xxl.job.core.biz.model.RegistryParam;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.enums.RegistryConfig;
-import com.xxl.job.core.executor.XxlJobExecutor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * @author liyh
- */
-public class ExecutorRegistryThread {
- private static Logger logger = LoggerFactory.getLogger(ExecutorRegistryThread.class);
-
- private static ExecutorRegistryThread instance = new ExecutorRegistryThread();
-
- public static ExecutorRegistryThread getInstance() {
- return instance;
- }
-
- private Thread registryThread;
- private volatile boolean toStop = false;
-
- public void start(final String appname, final String address) {
-
- // valid
- if (appname == null || appname.trim().length() == 0) {
- logger.warn(">>>>>>>>>>> xxl-job, executor registry config fail, appname is null.");
- return;
- }
- if (XxlJobExecutor.getAdminBizList() == null) {
- logger.warn(">>>>>>>>>>> xxl-job, executor registry config fail, adminAddresses is null.");
- return;
- }
-
- registryThread = new Thread(new Runnable() {
- @Override
- public void run() {
-
- // registry
- while (!toStop) {
- try {
- RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), appname, address);
- for (AdminBiz adminBiz : XxlJobExecutor.getAdminBizList()) {
- try {
- ReturnT<String> registryResult = adminBiz.registry(registryParam);
- if (registryResult != null && ReturnT.SUCCESS_CODE == registryResult.getCode()) {
- registryResult = ReturnT.SUCCESS;
- logger.debug(">>>>>>>>>>> xxl-job registry success, registryParam:{}, registryResult:{}", new Object[]{registryParam, registryResult});
- break;
- } else {
- logger.info(">>>>>>>>>>> xxl-job registry fail, registryParam:{}, registryResult:{}", new Object[]{registryParam, registryResult});
- }
- } catch (Exception e) {
- logger.info(">>>>>>>>>>> xxl-job registry error, registryParam:{}", registryParam, e);
- }
-
- }
- } catch (Exception e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
-
- }
-
- try {
- if (!toStop) {
- TimeUnit.SECONDS.sleep(RegistryConfig.BEAT_TIMEOUT);
- }
- } catch (InterruptedException e) {
- if (!toStop) {
- logger.warn(">>>>>>>>>>> xxl-job, executor registry thread interrupted, error msg:{}", e.getMessage());
- }
- }
- }
-
- // registry remove
- try {
- RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), appname, address);
- for (AdminBiz adminBiz : XxlJobExecutor.getAdminBizList()) {
- try {
- ReturnT<String> registryResult = adminBiz.registryRemove(registryParam);
- if (registryResult != null && ReturnT.SUCCESS_CODE == registryResult.getCode()) {
- registryResult = ReturnT.SUCCESS;
- logger.info(">>>>>>>>>>> xxl-job registry-remove success, registryParam:{}, registryResult:{}", new Object[]{registryParam, registryResult});
- break;
- } else {
- logger.info(">>>>>>>>>>> xxl-job registry-remove fail, registryParam:{}, registryResult:{}", new Object[]{registryParam, registryResult});
- }
- } catch (Exception e) {
- if (!toStop) {
- logger.info(">>>>>>>>>>> xxl-job registry-remove error, registryParam:{}", registryParam, e);
- }
-
- }
-
- }
- } catch (Exception e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
- }
- logger.info(">>>>>>>>>>> xxl-job, executor registry thread destroy.");
-
- }
- });
- registryThread.setDaemon(true);
- registryThread.setName("xxl-job, executor ExecutorRegistryThread");
- registryThread.start();
- }
-
- public void toStop() {
- toStop = true;
-
- // interrupt and wait
- if (registryThread != null) {
- registryThread.interrupt();
- try {
- registryThread.join();
- } catch (InterruptedException e) {
- logger.error(e.getMessage(), e);
- }
- }
-
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java b/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java
deleted file mode 100644
index c5e537e..0000000
--- a/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package com.xxl.job.core.thread;
-
-import com.xxl.job.core.log.XxlJobFileAppender;
-import com.xxl.job.core.util.FileUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.concurrent.TimeUnit;
-
-/**
- * job file clean thread
- *
- * @author liyh
- */
-public class JobLogFileCleanThread {
- private static Logger logger = LoggerFactory.getLogger(JobLogFileCleanThread.class);
-
- private static JobLogFileCleanThread instance = new JobLogFileCleanThread();
-
- public static JobLogFileCleanThread getInstance() {
- return instance;
- }
-
- private Thread localThread;
- private volatile boolean toStop = false;
-
- public void start(final long logRetentionDays) {
-
- // limit min value
- if (logRetentionDays < 3) {
- return;
- }
-
- localThread = new Thread(new Runnable() {
- @Override
- public void run() {
- while (!toStop) {
- try {
- // clean log dir, over logRetentionDays
- File[] childDirs = new File(XxlJobFileAppender.getLogPath()).listFiles();
- if (childDirs != null && childDirs.length > 0) {
-
- // today
- Calendar todayCal = Calendar.getInstance();
- todayCal.set(Calendar.HOUR_OF_DAY, 0);
- todayCal.set(Calendar.MINUTE, 0);
- todayCal.set(Calendar.SECOND, 0);
- todayCal.set(Calendar.MILLISECOND, 0);
-
- Date todayDate = todayCal.getTime();
-
- for (File childFile : childDirs) {
-
- // valid
- if (!childFile.isDirectory()) {
- continue;
- }
- if (childFile.getName().indexOf("-") == -1) {
- continue;
- }
-
- // file create date
- Date logFileCreateDate = null;
- try {
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
- logFileCreateDate = simpleDateFormat.parse(childFile.getName());
- } catch (ParseException e) {
- logger.error(e.getMessage(), e);
- }
- if (logFileCreateDate == null) {
- continue;
- }
-
- if ((todayDate.getTime() - logFileCreateDate.getTime()) >= logRetentionDays * (24 * 60 * 60 * 1000)) {
- FileUtil.deleteRecursively(childFile);
- }
-
- }
- }
-
- } catch (Exception e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
-
- }
-
- try {
- TimeUnit.DAYS.sleep(1);
- } catch (InterruptedException e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
- }
- }
- logger.info(">>>>>>>>>>> xxl-job, executor JobLogFileCleanThread thread destroy.");
-
- }
- });
- localThread.setDaemon(true);
- localThread.setName("xxl-job, executor JobLogFileCleanThread");
- localThread.start();
- }
-
- public void toStop() {
- toStop = true;
-
- if (localThread == null) {
- return;
- }
-
- // interrupt and wait
- localThread.interrupt();
- try {
- localThread.join();
- } catch (InterruptedException e) {
- logger.error(e.getMessage(), e);
- }
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/thread/JobThread.java b/src/main/java/com/xxl/job/core/thread/JobThread.java
deleted file mode 100644
index 6070e35..0000000
--- a/src/main/java/com/xxl/job/core/thread/JobThread.java
+++ /dev/null
@@ -1,255 +0,0 @@
-package com.xxl.job.core.thread;
-
-import com.xxl.job.core.biz.model.HandleCallbackParam;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.context.XxlJobContext;
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.executor.XxlJobExecutor;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.log.XxlJobFileAppender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.*;
-
-
-/**
- * handler thread
- *
- * @author liyh
- */
-public class JobThread extends Thread {
- private static Logger logger = LoggerFactory.getLogger(JobThread.class);
-
- private int jobId;
- private IJobHandler handler;
- private LinkedBlockingQueue<TriggerParam> triggerQueue;
- private Set<Long> triggerLogIdSet; // avoid repeat trigger for the same TRIGGER_LOG_ID
-
- private volatile boolean toStop = false;
- private String stopReason;
-
- private boolean running = false; // if running job
- private int idleTimes = 0; // idel times
-
-
- public JobThread(int jobId, IJobHandler handler) {
- this.jobId = jobId;
- this.handler = handler;
- this.triggerQueue = new LinkedBlockingQueue<TriggerParam>();
- this.triggerLogIdSet = Collections.synchronizedSet(new HashSet<Long>());
-
- // assign job thread name
- this.setName("xxl-job, JobThread-" + jobId + "-" + System.currentTimeMillis());
- }
-
- public IJobHandler getHandler() {
- return handler;
- }
-
- /**
- * new trigger to queue
- *
- * @param triggerParam
- * @return
- */
- public ReturnT<String> pushTriggerQueue(TriggerParam triggerParam) {
- // avoid repeat
- if (triggerLogIdSet.contains(triggerParam.getLogId())) {
- logger.info(">>>>>>>>>>> repeate trigger job, logId:{}", triggerParam.getLogId());
- return new ReturnT<String>(ReturnT.FAIL_CODE, "repeate trigger job, logId:" + triggerParam.getLogId());
- }
-
- triggerLogIdSet.add(triggerParam.getLogId());
- triggerQueue.add(triggerParam);
- return ReturnT.SUCCESS;
- }
-
- /**
- * kill job thread
- *
- * @param stopReason
- */
- public void toStop(String stopReason) {
- /**
- * Thread.interrupt只支持终止线程的阻塞状态(wait、join、sleep),
- * 在阻塞出抛出InterruptedException异常,但是并不会终止运行的线程本身;
- * 所以需要注意,此处彻底销毁本线程,需要通过共享变量方式;
- */
- this.toStop = true;
- this.stopReason = stopReason;
- }
-
- /**
- * is running job
- *
- * @return
- */
- public boolean isRunningOrHasQueue() {
- return running || triggerQueue.size() > 0;
- }
-
- @Override
- public void run() {
-
- // init
- try {
- handler.init();
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
-
- // execute
- while (!toStop) {
- running = false;
- idleTimes++;
-
- TriggerParam triggerParam = null;
- try {
- // to check toStop signal, we need cycle, so wo cannot use queue.take(), instand of poll(timeout)
- triggerParam = triggerQueue.poll(3L, TimeUnit.SECONDS);
- if (triggerParam != null) {
- running = true;
- idleTimes = 0;
- triggerLogIdSet.remove(triggerParam.getLogId());
-
- // log filename, like "logPath/yyyy-MM-dd/9999.log"
- String logFileName = XxlJobFileAppender.makeLogFileName(new Date(triggerParam.getLogDateTime()), triggerParam.getLogId());
- XxlJobContext xxlJobContext = new XxlJobContext(
- triggerParam.getJobId(),
- triggerParam.getExecutorParams(),
- logFileName,
- triggerParam.getBroadcastIndex(),
- triggerParam.getBroadcastTotal());
-
- // init job context
- XxlJobContext.setXxlJobContext(xxlJobContext);
-
- // execute
- XxlJobHelper.log("<br>----------- xxl-job job execute start -----------<br>----------- Param:" + xxlJobContext.getJobParam());
-
- if (triggerParam.getExecutorTimeout() > 0) {
- // limit timeout
- Thread futureThread = null;
- try {
- FutureTask<Boolean> futureTask = new FutureTask<Boolean>(new Callable<Boolean>() {
- @Override
- public Boolean call() throws Exception {
-
- // init job context
- XxlJobContext.setXxlJobContext(xxlJobContext);
-
- handler.execute();
- return true;
- }
- });
- futureThread = new Thread(futureTask);
- futureThread.start();
-
- Boolean tempResult = futureTask.get(triggerParam.getExecutorTimeout(), TimeUnit.SECONDS);
- } catch (TimeoutException e) {
-
- XxlJobHelper.log("<br>----------- xxl-job job execute timeout");
- XxlJobHelper.log(e);
-
- // handle result
- XxlJobHelper.handleTimeout("job execute timeout ");
- } finally {
- futureThread.interrupt();
- }
- } else {
- // just execute
- handler.execute();
- }
-
- // valid execute handle data
- if (XxlJobContext.getXxlJobContext().getHandleCode() <= 0) {
- XxlJobHelper.handleFail("job handle result lost.");
- } else {
- String tempHandleMsg = XxlJobContext.getXxlJobContext().getHandleMsg();
- tempHandleMsg = (tempHandleMsg != null && tempHandleMsg.length() > 50000)
- ? tempHandleMsg.substring(0, 50000).concat("...")
- : tempHandleMsg;
- XxlJobContext.getXxlJobContext().setHandleMsg(tempHandleMsg);
- }
- XxlJobHelper.log("<br>----------- xxl-job job execute end(finish) -----------<br>----------- Result: handleCode="
- + XxlJobContext.getXxlJobContext().getHandleCode()
- + ", handleMsg = "
- + XxlJobContext.getXxlJobContext().getHandleMsg()
- );
-
- } else {
- if (idleTimes > 30) {
- if (triggerQueue.size() == 0) { // avoid concurrent trigger causes jobId-lost
- XxlJobExecutor.removeJobThread(jobId, "excutor idel times over limit.");
- }
- }
- }
- } catch (Throwable e) {
- if (toStop) {
- XxlJobHelper.log("<br>----------- JobThread toStop, stopReason:" + stopReason);
- }
-
- // handle result
- StringWriter stringWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(stringWriter));
- String errorMsg = stringWriter.toString();
-
- XxlJobHelper.handleFail(errorMsg);
-
- XxlJobHelper.log("<br>----------- JobThread Exception:" + errorMsg + "<br>----------- xxl-job job execute end(error) -----------");
- } finally {
- if (triggerParam != null) {
- // callback handler info
- if (!toStop) {
- // commonm
- TriggerCallbackThread.pushCallBack(new HandleCallbackParam(
- triggerParam.getLogId(),
- triggerParam.getLogDateTime(),
- XxlJobContext.getXxlJobContext().getHandleCode(),
- XxlJobContext.getXxlJobContext().getHandleMsg())
- );
- } else {
- // is killed
- TriggerCallbackThread.pushCallBack(new HandleCallbackParam(
- triggerParam.getLogId(),
- triggerParam.getLogDateTime(),
- XxlJobContext.HANDLE_CODE_FAIL,
- stopReason + " [job running, killed]")
- );
- }
- }
- }
- }
-
- // callback trigger request in queue
- while (triggerQueue != null && triggerQueue.size() > 0) {
- TriggerParam triggerParam = triggerQueue.poll();
- if (triggerParam != null) {
- // is killed
- TriggerCallbackThread.pushCallBack(new HandleCallbackParam(
- triggerParam.getLogId(),
- triggerParam.getLogDateTime(),
- XxlJobContext.HANDLE_CODE_FAIL,
- stopReason + " [job not executed, in the job queue, killed.]")
- );
- }
- }
-
- // destroy
- try {
- handler.destroy();
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
-
- logger.info(">>>>>>>>>>> xxl-job JobThread stoped, hashCode:{}", Thread.currentThread());
- }
-}
diff --git a/src/main/java/com/xxl/job/core/thread/TriggerCallbackThread.java b/src/main/java/com/xxl/job/core/thread/TriggerCallbackThread.java
deleted file mode 100644
index e46d51b..0000000
--- a/src/main/java/com/xxl/job/core/thread/TriggerCallbackThread.java
+++ /dev/null
@@ -1,265 +0,0 @@
-package com.xxl.job.core.thread;
-
-import com.xxl.job.core.biz.AdminBiz;
-import com.xxl.job.core.biz.model.HandleCallbackParam;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.context.XxlJobContext;
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.enums.RegistryConfig;
-import com.xxl.job.core.executor.XxlJobExecutor;
-import com.xxl.job.core.log.XxlJobFileAppender;
-import com.xxl.job.core.util.FileUtil;
-import com.xxl.job.core.util.JdkSerializeTool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-/**
- * @author liyh
- */
-public class TriggerCallbackThread {
- private static Logger logger = LoggerFactory.getLogger(TriggerCallbackThread.class);
-
- private static TriggerCallbackThread instance = new TriggerCallbackThread();
-
- public static TriggerCallbackThread getInstance() {
- return instance;
- }
-
- /**
- * job results callback queue
- */
- private LinkedBlockingQueue<HandleCallbackParam> callBackQueue = new LinkedBlockingQueue<HandleCallbackParam>();
-
- public static void pushCallBack(HandleCallbackParam callback) {
- getInstance().callBackQueue.add(callback);
- logger.debug(">>>>>>>>>>> xxl-job, push callback request, logId:{}", callback.getLogId());
- }
-
- /**
- * callback thread
- */
- private Thread triggerCallbackThread;
- private Thread triggerRetryCallbackThread;
- private volatile boolean toStop = false;
-
- public void start() {
-
- // valid
- if (XxlJobExecutor.getAdminBizList() == null) {
- logger.warn(">>>>>>>>>>> xxl-job, executor callback config fail, adminAddresses is null.");
- return;
- }
-
- // callback
- triggerCallbackThread = new Thread(new Runnable() {
-
- @Override
- public void run() {
-
- // normal callback
- while (!toStop) {
- try {
- HandleCallbackParam callback = getInstance().callBackQueue.take();
- if (callback != null) {
-
- // callback list param
- List<HandleCallbackParam> callbackParamList = new ArrayList<HandleCallbackParam>();
- int drainToNum = getInstance().callBackQueue.drainTo(callbackParamList);
- callbackParamList.add(callback);
-
- // callback, will retry if error
- if (callbackParamList != null && callbackParamList.size() > 0) {
- doCallback(callbackParamList);
- }
- }
- } catch (Exception e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
- }
- }
-
- // last callback
- try {
- List<HandleCallbackParam> callbackParamList = new ArrayList<HandleCallbackParam>();
- int drainToNum = getInstance().callBackQueue.drainTo(callbackParamList);
- if (callbackParamList != null && callbackParamList.size() > 0) {
- doCallback(callbackParamList);
- }
- } catch (Exception e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
- }
- logger.info(">>>>>>>>>>> xxl-job, executor callback thread destroy.");
-
- }
- });
- triggerCallbackThread.setDaemon(true);
- triggerCallbackThread.setName("xxl-job, executor TriggerCallbackThread");
- triggerCallbackThread.start();
-
-
- // retry
- triggerRetryCallbackThread = new Thread(new Runnable() {
- @Override
- public void run() {
- while (!toStop) {
- try {
- retryFailCallbackFile();
- } catch (Exception e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
-
- }
- try {
- TimeUnit.SECONDS.sleep(RegistryConfig.BEAT_TIMEOUT);
- } catch (InterruptedException e) {
- if (!toStop) {
- logger.error(e.getMessage(), e);
- }
- }
- }
- logger.info(">>>>>>>>>>> xxl-job, executor retry callback thread destroy.");
- }
- });
- triggerRetryCallbackThread.setDaemon(true);
- triggerRetryCallbackThread.start();
-
- }
-
- public void toStop() {
- toStop = true;
- // stop callback, interrupt and wait
- if (triggerCallbackThread != null) { // support empty admin address
- triggerCallbackThread.interrupt();
- try {
- triggerCallbackThread.join();
- } catch (InterruptedException e) {
- logger.error(e.getMessage(), e);
- }
- }
-
- // stop retry, interrupt and wait
- if (triggerRetryCallbackThread != null) {
- triggerRetryCallbackThread.interrupt();
- try {
- triggerRetryCallbackThread.join();
- } catch (InterruptedException e) {
- logger.error(e.getMessage(), e);
- }
- }
-
- }
-
- /**
- * do callback, will retry if error
- *
- * @param callbackParamList
- */
- private void doCallback(List<HandleCallbackParam> callbackParamList) {
- boolean callbackRet = false;
- // callback, will retry if error
- for (AdminBiz adminBiz : XxlJobExecutor.getAdminBizList()) {
- try {
- ReturnT<String> callbackResult = adminBiz.callback(callbackParamList);
- if (callbackResult != null && ReturnT.SUCCESS_CODE == callbackResult.getCode()) {
- callbackLog(callbackParamList, "<br>----------- xxl-job job callback finish.");
- callbackRet = true;
- break;
- } else {
- callbackLog(callbackParamList, "<br>----------- xxl-job job callback fail, callbackResult:" + callbackResult);
- }
- } catch (Exception e) {
- callbackLog(callbackParamList, "<br>----------- xxl-job job callback error, errorMsg:" + e.getMessage());
- }
- }
- if (!callbackRet) {
- appendFailCallbackFile(callbackParamList);
- }
- }
-
- /**
- * callback log
- */
- private void callbackLog(List<HandleCallbackParam> callbackParamList, String logContent) {
- for (HandleCallbackParam callbackParam : callbackParamList) {
- String logFileName = XxlJobFileAppender.makeLogFileName(new Date(callbackParam.getLogDateTim()), callbackParam.getLogId());
- XxlJobContext.setXxlJobContext(new XxlJobContext(
- -1,
- null,
- logFileName,
- -1,
- -1));
- XxlJobHelper.log(logContent);
- }
- }
-
-
- // ---------------------- fail-callback file ----------------------
-
- private static String failCallbackFilePath = XxlJobFileAppender.getLogPath().concat(File.separator).concat("callbacklog").concat(File.separator);
- private static String failCallbackFileName = failCallbackFilePath.concat("xxl-job-callback-{x}").concat(".log");
-
- private void appendFailCallbackFile(List<HandleCallbackParam> callbackParamList) {
- // valid
- if (callbackParamList == null || callbackParamList.size() == 0) {
- return;
- }
-
- // append file
- byte[] callbackParamList_bytes = JdkSerializeTool.serialize(callbackParamList);
-
- File callbackLogFile = new File(failCallbackFileName.replace("{x}", String.valueOf(System.currentTimeMillis())));
- if (callbackLogFile.exists()) {
- for (int i = 0; i < 100; i++) {
- callbackLogFile = new File(failCallbackFileName.replace("{x}", String.valueOf(System.currentTimeMillis()).concat("-").concat(String.valueOf(i))));
- if (!callbackLogFile.exists()) {
- break;
- }
- }
- }
- FileUtil.writeFileContent(callbackLogFile, callbackParamList_bytes);
- }
-
- private void retryFailCallbackFile() {
-
- // valid
- File callbackLogPath = new File(failCallbackFilePath);
- if (!callbackLogPath.exists()) {
- return;
- }
- if (callbackLogPath.isFile()) {
- callbackLogPath.delete();
- }
- if (!(callbackLogPath.isDirectory() && callbackLogPath.list() != null && callbackLogPath.list().length > 0)) {
- return;
- }
-
- // load and clear file, retry
- for (File callbaclLogFile : callbackLogPath.listFiles()) {
- byte[] callbackParamList_bytes = FileUtil.readFileContent(callbaclLogFile);
-
- // avoid empty file
- if (callbackParamList_bytes == null || callbackParamList_bytes.length < 1) {
- callbaclLogFile.delete();
- continue;
- }
-
- List<HandleCallbackParam> callbackParamList = (List<HandleCallbackParam>) JdkSerializeTool.deserialize(callbackParamList_bytes, List.class);
-
- callbaclLogFile.delete();
- doCallback(callbackParamList);
- }
-
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/DateUtil.java b/src/main/java/com/xxl/job/core/util/DateUtil.java
deleted file mode 100644
index 4c922fe..0000000
--- a/src/main/java/com/xxl/job/core/util/DateUtil.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package com.xxl.job.core.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * date util
- *
- * @author liyh
- */
-public class DateUtil {
-
- // ---------------------- format parse ----------------------
- private static Logger logger = LoggerFactory.getLogger(DateUtil.class);
-
- private static final String DATE_FORMAT = "yyyy-MM-dd";
- private static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
- private static final ThreadLocal<Map<String, DateFormat>> dateFormatThreadLocal = new ThreadLocal<Map<String, DateFormat>>();
-
- private static DateFormat getDateFormat(String pattern) {
- if (pattern == null || pattern.trim().length() == 0) {
- throw new IllegalArgumentException("pattern cannot be empty.");
- }
-
- Map<String, DateFormat> dateFormatMap = dateFormatThreadLocal.get();
- if (dateFormatMap != null && dateFormatMap.containsKey(pattern)) {
- return dateFormatMap.get(pattern);
- }
-
- synchronized (dateFormatThreadLocal) {
- if (dateFormatMap == null) {
- dateFormatMap = new HashMap<String, DateFormat>();
- }
- dateFormatMap.put(pattern, new SimpleDateFormat(pattern));
- dateFormatThreadLocal.set(dateFormatMap);
- }
-
- return dateFormatMap.get(pattern);
- }
-
- /**
- * format datetime. like "yyyy-MM-dd"
- *
- * @param date
- * @return
- * @throws ParseException
- */
- public static String formatDate(Date date) {
- return format(date, DATE_FORMAT);
- }
-
- /**
- * format date. like "yyyy-MM-dd HH:mm:ss"
- *
- * @param date
- * @return
- * @throws ParseException
- */
- public static String formatDateTime(Date date) {
- return format(date, DATETIME_FORMAT);
- }
-
- /**
- * format date
- *
- * @param date
- * @param patten
- * @return
- * @throws ParseException
- */
- public static String format(Date date, String patten) {
- return getDateFormat(patten).format(date);
- }
-
- /**
- * parse date string, like "yyyy-MM-dd HH:mm:s"
- *
- * @param dateString
- * @return
- * @throws ParseException
- */
- public static Date parseDate(String dateString) {
- return parse(dateString, DATE_FORMAT);
- }
-
- /**
- * parse datetime string, like "yyyy-MM-dd HH:mm:ss"
- *
- * @param dateString
- * @return
- * @throws ParseException
- */
- public static Date parseDateTime(String dateString) {
- return parse(dateString, DATETIME_FORMAT);
- }
-
- /**
- * parse date
- *
- * @param dateString
- * @param pattern
- * @return
- * @throws ParseException
- */
- public static Date parse(String dateString, String pattern) {
- try {
- Date date = getDateFormat(pattern).parse(dateString);
- return date;
- } catch (Exception e) {
- logger.warn("parse date error, dateString = {}, pattern={}; errorMsg = {}", dateString, pattern, e.getMessage());
- return null;
- }
- }
-
-
- // ---------------------- add date ----------------------
-
- public static Date addYears(final Date date, final int amount) {
- return add(date, Calendar.YEAR, amount);
- }
-
- public static Date addMonths(final Date date, final int amount) {
- return add(date, Calendar.MONTH, amount);
- }
-
- public static Date addDays(final Date date, final int amount) {
- return add(date, Calendar.DAY_OF_MONTH, amount);
- }
-
- public static Date addHours(final Date date, final int amount) {
- return add(date, Calendar.HOUR_OF_DAY, amount);
- }
-
- public static Date addMinutes(final Date date, final int amount) {
- return add(date, Calendar.MINUTE, amount);
- }
-
- private static Date add(final Date date, final int calendarField, final int amount) {
- if (date == null) {
- return null;
- }
- final Calendar c = Calendar.getInstance();
- c.setTime(date);
- c.add(calendarField, amount);
- return c.getTime();
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/FileUtil.java b/src/main/java/com/xxl/job/core/util/FileUtil.java
deleted file mode 100644
index 2a38bd7..0000000
--- a/src/main/java/com/xxl/job/core/util/FileUtil.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.xxl.job.core.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-/**
- * file tool
- *
- * @author liyh
- */
-public class FileUtil {
- private static Logger logger = LoggerFactory.getLogger(FileUtil.class);
-
- /**
- * delete recursively
- *
- * @param root
- * @return
- */
- public static boolean deleteRecursively(File root) {
- if (root != null && root.exists()) {
- if (root.isDirectory()) {
- File[] children = root.listFiles();
- if (children != null) {
- for (File child : children) {
- deleteRecursively(child);
- }
- }
- }
- return root.delete();
- }
- return false;
- }
-
- public static void deleteFile(String fileName) {
- // file
- File file = new File(fileName);
- if (file.exists()) {
- file.delete();
- }
- }
-
- public static void writeFileContent(File file, byte[] data) {
-
- // file
- if (!file.exists()) {
- file.getParentFile().mkdirs();
- }
-
- // append file content
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(file);
- fos.write(data);
- fos.flush();
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- } finally {
- if (fos != null) {
- try {
- fos.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
-
- }
-
- public static byte[] readFileContent(File file) {
- Long filelength = file.length();
- byte[] filecontent = new byte[filelength.intValue()];
-
- FileInputStream in = null;
- try {
- in = new FileInputStream(file);
- in.read(filecontent);
- in.close();
-
- return filecontent;
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- return null;
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- }
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/GsonTool.java b/src/main/java/com/xxl/job/core/util/GsonTool.java
deleted file mode 100644
index 3508408..0000000
--- a/src/main/java/com/xxl/job/core/util/GsonTool.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.xxl.job.core.util;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.reflect.TypeToken;
-
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.List;
-
-/**
- * @author liyh
- */
-public class GsonTool {
-
- private static Gson gson = null;
-
- static {
- gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
- }
-
- /**
- * Object 转成 json
- *
- * @param src
- * @return String
- */
- public static String toJson(Object src) {
- return gson.toJson(src);
- }
-
- /**
- * json 转成 特定的cls的Object
- *
- * @param json
- * @param classOfT
- * @return
- */
- public static <T> T fromJson(String json, Class<T> classOfT) {
- return gson.fromJson(json, classOfT);
- }
-
- /**
- * json 转成 特定的 rawClass<classOfT> 的Object
- *
- * @param json
- * @param classOfT
- * @param argClassOfT
- * @return
- */
- public static <T> T fromJson(String json, Class<T> classOfT, Class argClassOfT) {
- Type type = new ParameterizedType4ReturnT(classOfT, new Class[]{argClassOfT});
- return gson.fromJson(json, type);
- }
-
- public static class ParameterizedType4ReturnT implements ParameterizedType {
- private final Class raw;
- private final Type[] args;
-
- public ParameterizedType4ReturnT(Class raw, Type[] args) {
- this.raw = raw;
- this.args = args != null ? args : new Type[0];
- }
-
- @Override
- public Type[] getActualTypeArguments() {
- return args;
- }
-
- @Override
- public Type getRawType() {
- return raw;
- }
-
- @Override
- public Type getOwnerType() {
- return null;
- }
- }
-
- /**
- * json 转成 特定的cls的list
- *
- * @param json
- * @param classOfT
- * @return
- */
- public static <T> List<T> fromJsonList(String json, Class<T> classOfT) {
- return gson.fromJson(
- json,
- new TypeToken<List<T>>() {
- }.getType()
- );
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/IpUtil.java b/src/main/java/com/xxl/job/core/util/IpUtil.java
deleted file mode 100644
index 40955d3..0000000
--- a/src/main/java/com/xxl/job/core/util/IpUtil.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package com.xxl.job.core.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.UnknownHostException;
-import java.util.Enumeration;
-import java.util.regex.Pattern;
-
-/**
- * ip tool
- *
- * @author liyh
- */
-public class IpUtil {
- private static final Logger logger = LoggerFactory.getLogger(IpUtil.class);
-
- private static final String ANYHOST_VALUE = "0.0.0.0";
- private static final String LOCALHOST_VALUE = "127.0.0.1";
- private static final Pattern IP_PATTERN = Pattern.compile("\\d{1,3}(\\.\\d{1,3}){3,5}$");
-
-
- private static volatile InetAddress LOCAL_ADDRESS = null;
-
- // ---------------------- valid ----------------------
-
- private static InetAddress toValidAddress(InetAddress address) {
- if (address instanceof Inet6Address) {
- Inet6Address v6Address = (Inet6Address) address;
- if (isPreferIPV6Address()) {
- return normalizeV6Address(v6Address);
- }
- }
- if (isValidV4Address(address)) {
- return address;
- }
- return null;
- }
-
- private static boolean isPreferIPV6Address() {
- return Boolean.getBoolean("java.net.preferIPv6Addresses");
- }
-
- /**
- * valid Inet4Address
- *
- * @param address
- * @return
- */
- private static boolean isValidV4Address(InetAddress address) {
- if (address == null || address.isLoopbackAddress()) {
- return false;
- }
- String name = address.getHostAddress();
- boolean result = (name != null
- && IP_PATTERN.matcher(name).matches()
- && !ANYHOST_VALUE.equals(name)
- && !LOCALHOST_VALUE.equals(name));
- return result;
- }
-
- private static InetAddress normalizeV6Address(Inet6Address address) {
- String addr = address.getHostAddress();
- int i = addr.lastIndexOf('%');
- if (i > 0) {
- try {
- return InetAddress.getByName(addr.substring(0, i) + '%' + address.getScopeId());
- } catch (UnknownHostException e) {
- // ignore
- logger.debug("Unknown IPV6 address: ", e);
- }
- }
- return address;
- }
-
- // ---------------------- find ip ----------------------
-
- private static InetAddress getLocalAddress0() {
- InetAddress localAddress = null;
- try {
- localAddress = InetAddress.getLocalHost();
- InetAddress addressItem = toValidAddress(localAddress);
- if (addressItem != null) {
- return addressItem;
- }
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
-
- try {
- Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
- if (null == interfaces) {
- return localAddress;
- }
- while (interfaces.hasMoreElements()) {
- try {
- NetworkInterface network = interfaces.nextElement();
- if (network.isLoopback() || network.isVirtual() || !network.isUp()) {
- continue;
- }
- Enumeration<InetAddress> addresses = network.getInetAddresses();
- while (addresses.hasMoreElements()) {
- try {
- InetAddress addressItem = toValidAddress(addresses.nextElement());
- if (addressItem != null) {
- try {
- if (addressItem.isReachable(100)) {
- return addressItem;
- }
- } catch (IOException e) {
- // ignore
- }
- }
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
- }
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
- }
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
- return localAddress;
- }
-
- // ---------------------- tool ----------------------
-
- /**
- * Find first valid IP from local network card
- *
- * @return first valid local IP
- */
- public static InetAddress getLocalAddress() {
- if (LOCAL_ADDRESS != null) {
- return LOCAL_ADDRESS;
- }
- InetAddress localAddress = getLocalAddress0();
- LOCAL_ADDRESS = localAddress;
- return localAddress;
- }
-
- /**
- * get ip address
- *
- * @return String
- */
- public static String getIp() {
- return getLocalAddress().getHostAddress();
- }
-
- /**
- * get ip:port
- *
- * @param port
- * @return String
- */
- public static String getIpPort(int port) {
- String ip = getIp();
- return getIpPort(ip, port);
- }
-
- public static String getIpPort(String ip, int port) {
- if (ip == null) {
- return null;
- }
- return ip.concat(":").concat(String.valueOf(port));
- }
-
- public static Object[] parseIpPort(String address) {
- String[] array = address.split(":");
-
- String host = array[0];
- int port = Integer.parseInt(array[1]);
-
- return new Object[]{host, port};
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/JdkSerializeTool.java b/src/main/java/com/xxl/job/core/util/JdkSerializeTool.java
deleted file mode 100644
index 55647af..0000000
--- a/src/main/java/com/xxl/job/core/util/JdkSerializeTool.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.xxl.job.core.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.*;
-
-/**
- * @author liyh
- */
-public class JdkSerializeTool {
- private static Logger logger = LoggerFactory.getLogger(JdkSerializeTool.class);
-
- // ------------------------ serialize and unserialize ------------------------
-
- /**
- * 将对象-->byte[] (由于jedis中不支持直接存储object所以转换成byte[]存入)
- *
- * @param object
- * @return
- */
- public static byte[] serialize(Object object) {
- ObjectOutputStream oos = null;
- ByteArrayOutputStream baos = null;
- try {
- // 序列化
- baos = new ByteArrayOutputStream();
- oos = new ObjectOutputStream(baos);
- oos.writeObject(object);
- byte[] bytes = baos.toByteArray();
- return bytes;
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- } finally {
- try {
- oos.close();
- baos.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- return null;
- }
-
- /**
- * 将byte[] -->Object
- *
- * @param bytes
- * @return
- */
- public static <T> Object deserialize(byte[] bytes, Class<T> clazz) {
- ByteArrayInputStream bais = null;
- try {
- // 反序列化
- bais = new ByteArrayInputStream(bytes);
- ObjectInputStream ois = new ObjectInputStream(bais);
- return ois.readObject();
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- } finally {
- try {
- bais.close();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- }
- return null;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/NetUtil.java b/src/main/java/com/xxl/job/core/util/NetUtil.java
deleted file mode 100644
index c77e266..0000000
--- a/src/main/java/com/xxl/job/core/util/NetUtil.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.xxl.job.core.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-
-/**
- * net util
- *
- * @author liyh
- */
-public class NetUtil {
- private static Logger logger = LoggerFactory.getLogger(NetUtil.class);
-
- /**
- * find avaliable port
- *
- * @param defaultPort
- * @return
- */
- public static int findAvailablePort(int defaultPort) {
- int portTmp = defaultPort;
- while (portTmp < 65535) {
- if (!isPortUsed(portTmp)) {
- return portTmp;
- } else {
- portTmp++;
- }
- }
- portTmp = defaultPort--;
- while (portTmp > 0) {
- if (!isPortUsed(portTmp)) {
- return portTmp;
- } else {
- portTmp--;
- }
- }
- throw new RuntimeException("no available port.");
- }
-
- /**
- * check port used
- *
- * @param port
- * @return
- */
- public static boolean isPortUsed(int port) {
- boolean used = false;
- ServerSocket serverSocket = null;
- try {
- serverSocket = new ServerSocket(port);
- used = false;
- } catch (IOException e) {
- logger.info(">>>>>>>>>>> xxl-job, port[{}] is in use.", port);
- used = true;
- } finally {
- if (serverSocket != null) {
- try {
- serverSocket.close();
- } catch (IOException e) {
- logger.info("");
- }
- }
- }
- return used;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/ScriptUtil.java b/src/main/java/com/xxl/job/core/util/ScriptUtil.java
deleted file mode 100644
index 9392b71..0000000
--- a/src/main/java/com/xxl/job/core/util/ScriptUtil.java
+++ /dev/null
@@ -1,167 +0,0 @@
-package com.xxl.job.core.util;
-
-import com.xxl.job.core.context.XxlJobHelper;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 1、内嵌编译器如"PythonInterpreter"无法引用扩展包,因此推荐使用java调用控制台进程方式"Runtime.getRuntime().exec()"来运行脚本(shell或python);
- * 2、因为通过java调用控制台进程方式实现,需要保证目标机器PATH路径正确配置对应编译器;
- * 3、暂时脚本执行日志只能在脚本执行结束后一次性获取,无法保证实时性;因此为确保日志实时性,可改为将脚本打印的日志存储在指定的日志文件上;
- * 4、python 异常输出优先级高于标准输出,体现在Log文件中,因此推荐通过logging方式打日志保持和异常信息一致;否则用prinf日志顺序会错乱
- *
- * @author liyh
- */
-public class ScriptUtil {
-
- /**
- * make script file
- *
- * @param scriptFileName
- * @param content
- * @throws IOException
- */
- public static void markScriptFile(String scriptFileName, String content) throws IOException {
- // make file, filePath/gluesource/666-123456789.py
- FileOutputStream fileOutputStream = null;
- try {
- fileOutputStream = new FileOutputStream(scriptFileName);
- fileOutputStream.write(content.getBytes("UTF-8"));
- fileOutputStream.close();
- } catch (Exception e) {
- throw e;
- } finally {
- if (fileOutputStream != null) {
- fileOutputStream.close();
- }
- }
- }
-
- /**
- * 脚本执行,日志文件实时输出
- *
- * @param command
- * @param scriptFile
- * @param logFile
- * @param params
- * @return
- * @throws IOException
- */
- public static int execToFile(String command, String scriptFile, String logFile, String... params) throws IOException {
-
- FileOutputStream fileOutputStream = null;
- Thread inputThread = null;
- Thread errThread = null;
- try {
- // file
- fileOutputStream = new FileOutputStream(logFile, true);
-
- // command
- List<String> cmdarray = new ArrayList<>();
- cmdarray.add(command);
- cmdarray.add(scriptFile);
- if (params != null && params.length > 0) {
- for (String param : params) {
- cmdarray.add(param);
- }
- }
- String[] cmdarrayFinal = cmdarray.toArray(new String[cmdarray.size()]);
-
- // process-exec
- final Process process = Runtime.getRuntime().exec(cmdarrayFinal);
-
- // log-thread
- final FileOutputStream finalFileOutputStream = fileOutputStream;
- inputThread = new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- copy(process.getInputStream(), finalFileOutputStream, new byte[1024]);
- } catch (IOException e) {
- XxlJobHelper.log(e);
- }
- }
- });
- errThread = new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- copy(process.getErrorStream(), finalFileOutputStream, new byte[1024]);
- } catch (IOException e) {
- XxlJobHelper.log(e);
- }
- }
- });
- inputThread.start();
- errThread.start();
-
- // process-wait
- int exitValue = process.waitFor(); // exit code: 0=success, 1=error
-
- // log-thread join
- inputThread.join();
- errThread.join();
-
- return exitValue;
- } catch (Exception e) {
- XxlJobHelper.log(e);
- return -1;
- } finally {
- if (fileOutputStream != null) {
- try {
- fileOutputStream.close();
- } catch (IOException e) {
- XxlJobHelper.log(e);
- }
-
- }
- if (inputThread != null && inputThread.isAlive()) {
- inputThread.interrupt();
- }
- if (errThread != null && errThread.isAlive()) {
- errThread.interrupt();
- }
- }
- }
-
- /**
- * 数据流Copy(Input自动关闭,Output不处理)
- *
- * @param inputStream
- * @param outputStream
- * @param buffer
- * @return
- * @throws IOException
- */
- private static long copy(InputStream inputStream, OutputStream outputStream, byte[] buffer) throws IOException {
- try {
- long total = 0;
- for (; ; ) {
- int res = inputStream.read(buffer);
- if (res == -1) {
- break;
- }
- if (res > 0) {
- total += res;
- if (outputStream != null) {
- outputStream.write(buffer, 0, res);
- }
- }
- }
- outputStream.flush();
- //out = null;
- inputStream.close();
- inputStream = null;
- return total;
- } finally {
- if (inputStream != null) {
- inputStream.close();
- }
- }
- }
-}
diff --git a/src/main/java/com/xxl/job/core/util/ThrowableUtil.java b/src/main/java/com/xxl/job/core/util/ThrowableUtil.java
deleted file mode 100644
index 011d646..0000000
--- a/src/main/java/com/xxl/job/core/util/ThrowableUtil.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.xxl.job.core.util;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * @author liyh
- */
-public class ThrowableUtil {
-
- /**
- * parse error to string
- *
- * @param e
- * @return
- */
- public static String toString(Throwable e) {
- StringWriter stringWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(stringWriter));
- String errorMsg = stringWriter.toString();
- return errorMsg;
- }
-
-}
diff --git a/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java b/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java
deleted file mode 100644
index 0d6974f..0000000
--- a/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.xxl.job.core.util;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.net.ssl.*;
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-/**
- * @author liyh
- */
-public class XxlJobRemotingUtil {
- private static Logger logger = LoggerFactory.getLogger(XxlJobRemotingUtil.class);
- public static final String XXL_JOB_ACCESS_TOKEN = "XXL-JOB-ACCESS-TOKEN";
-
- // trust-https start
- private static void trustAllHosts(HttpsURLConnection connection) {
- try {
- SSLContext sc = SSLContext.getInstance("TLS");
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
- SSLSocketFactory newFactory = sc.getSocketFactory();
-
- connection.setSSLSocketFactory(newFactory);
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- }
- connection.setHostnameVerifier(new HostnameVerifier() {
- @Override
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- });
- }
-
- private static final TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return new X509Certificate[]{};
- }
-
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
- }
- }};
-
- /**
- * post
- *
- * @param url
- * @param accessToken
- * @param timeout
- * @param requestObj
- * @param returnTargClassOfT
- * @return
- */
- public static ReturnT postBody(String url, String accessToken, int timeout, Object requestObj, Class returnTargClassOfT) {
- HttpURLConnection connection = null;
- BufferedReader bufferedReader = null;
- try {
- // connection
- URL realUrl = new URL(url);
- connection = (HttpURLConnection) realUrl.openConnection();
-
- // trust-https
- boolean useHttps = url.startsWith("https");
- if (useHttps) {
- HttpsURLConnection https = (HttpsURLConnection) connection;
- trustAllHosts(https);
- }
-
- // connection setting
- connection.setRequestMethod("POST");
- connection.setDoOutput(true);
- connection.setDoInput(true);
- connection.setUseCaches(false);
- connection.setReadTimeout(timeout * 1000);
- connection.setConnectTimeout(3 * 1000);
- connection.setRequestProperty("connection", "Keep-Alive");
- connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
- connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");
-
- if (accessToken != null && accessToken.trim().length() > 0) {
- connection.setRequestProperty(XXL_JOB_ACCESS_TOKEN, accessToken);
- }
-
- // do connection
- connection.connect();
-
- // write requestBody
- if (requestObj != null) {
- String requestBody = GsonTool.toJson(requestObj);
-
- DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
- dataOutputStream.write(requestBody.getBytes("UTF-8"));
- dataOutputStream.flush();
- dataOutputStream.close();
- }
-
- /*byte[] requestBodyBytes = requestBody.getBytes("UTF-8");
- connection.setRequestProperty("Content-Length", String.valueOf(requestBodyBytes.length));
- OutputStream outwritestream = connection.getOutputStream();
- outwritestream.write(requestBodyBytes);
- outwritestream.flush();
- outwritestream.close();*/
-
- // valid StatusCode
- int statusCode = connection.getResponseCode();
- if (statusCode != 200) {
- return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting fail, StatusCode(" + statusCode + ") invalid. for url : " + url);
- }
-
- // result
- bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
- StringBuilder result = new StringBuilder();
- String line;
- while ((line = bufferedReader.readLine()) != null) {
- result.append(line);
- }
- String resultJson = result.toString();
-
- // parse returnT
- try {
- ReturnT returnT = GsonTool.fromJson(resultJson, ReturnT.class, returnTargClassOfT);
- return returnT;
- } catch (Exception e) {
- logger.error("xxl-job remoting (url=" + url + ") response content invalid(" + resultJson + ").", e);
- return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting (url=" + url + ") response content invalid(" + resultJson + ").");
- }
-
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting error(" + e.getMessage() + "), for url : " + url);
- } finally {
- try {
- if (bufferedReader != null) {
- bufferedReader.close();
- }
- if (connection != null) {
- connection.disconnect();
- }
- } catch (Exception e2) {
- logger.error(e2.getMessage(), e2);
- }
- }
- }
-
-}
diff --git a/src/main/java/org/springblade/binlog/client/MysqlClient.java b/src/main/java/org/springblade/binlog/client/MysqlClient.java
deleted file mode 100644
index 8d8f720..0000000
--- a/src/main/java/org/springblade/binlog/client/MysqlClient.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.springblade.binlog.client;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.binlog.constant.BinLogConstants;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-/**
- * mysql 客户端连接
- */
-@Slf4j
-@Component
-public class MysqlClient {
-
- //声明对象
- private static MysqlClient mysqlClient;
-
-
- @Resource
- private BinLogConstants binLogConstants;
-
- /**
- * 初始化
- */
- @PostConstruct
- public void init(){
- mysqlClient = this;
- mysqlClient.binLogConstants = this.binLogConstants;
- }
-
- /**
- * sql 连接
- * @param sql
- */
- public static void sqlConnect(String sql,Integer type){
- String driver = "com.mysql.cj.jdbc.Driver";
- String url = mysqlClient.binLogConstants.getFromUrl();
- String user = mysqlClient.binLogConstants.getFromUsername();
- String password = mysqlClient.binLogConstants.getFromPassword();
- Connection conn = null;
- PreparedStatement ps = null;
- try {
- Class.forName ( driver );
- conn = (Connection) DriverManager.getConnection ( url, user, password );
- if (!conn.isClosed ()) {
- log.info( "数据库连接成功!" );
- ps = conn.prepareStatement ( sql );
- //判断是否为修改,删除
- if (type==1){
- //修改删除
- ps.executeUpdate();
- log.info( "数据已发送成功!" );
- }else {
- //新增
- ps.execute();
- log.info( "数据已发送成功!" );
- }
- }
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- } catch (SQLException e) {
- e.printStackTrace ();
- }finally {
- try {
- ps.close();
- conn.close();
- } catch (SQLException throwables) {
- throwables.printStackTrace();
- }
- }
- }
-
- /**
- * 连接mysql数据库 新增
- * @param sql
- */
- public static void insert(String sql) {
- sqlConnect(sql,2);
- }
-
- /**
- * 连接mysql数据库 修改
- * @param sql
- */
- public static void update(String sql) {
- sqlConnect(sql,1);
- }
-
- /**
- * 连接mysql数据库 删除
- * @param sql
- */
- public static void delete(String sql) {
- sqlConnect(sql,1);
- }
-}
diff --git a/src/main/java/org/springblade/binlog/config/DataSourceConfig.java b/src/main/java/org/springblade/binlog/config/DataSourceConfig.java
deleted file mode 100644
index a1b9191..0000000
--- a/src/main/java/org/springblade/binlog/config/DataSourceConfig.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.springblade.binlog.config;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-
-/**
- * 数据库配置
- *
- * @author zrj
- * @since 2024/02/19
- **/
-@Data
-@AllArgsConstructor
-public class DataSourceConfig {
-
- private String host;
- private int port;
- private String username;
- private String password;
- }
diff --git a/src/main/java/org/springblade/binlog/constant/BinLogConstants.java b/src/main/java/org/springblade/binlog/constant/BinLogConstants.java
deleted file mode 100644
index 797afc5..0000000
--- a/src/main/java/org/springblade/binlog/constant/BinLogConstants.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.springblade.binlog.constant;
-
-import lombok.Data;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-/**
- * 监听配置信息
- *
- * @author zrj
- * @since 2024/02/19
- **/
-@Data
-@Component
-public class BinLogConstants {
- @Value("${binlog.datasource.host}")
- private String host;
-
- @Value("${binlog.datasource.port}")
- private int port;
-
- @Value("${binlog.datasource.username}")
- private String username;
-
- @Value("${binlog.datasource.password}")
- private String password;
-
- @Value("${binlog.db}")
- private String db;
-
- @Value("${binlog.table}")
- private String table;
-
- @Value("${binlog.from.datasource.url}")
- private String fromUrl;
-
- @Value("${binlog.from.datasource.username}")
- private String fromUsername;
-
- @Value("${binlog.from.datasource.password}")
- private String fromPassword;
-
- public static final int consumerThreads = 5;
-
- public static final long queueSleep = 1000;
-
-}
-
-
diff --git a/src/main/java/org/springblade/binlog/listener/BinLogListener.java b/src/main/java/org/springblade/binlog/listener/BinLogListener.java
deleted file mode 100644
index b7329fb..0000000
--- a/src/main/java/org/springblade/binlog/listener/BinLogListener.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.springblade.binlog.listener;
-
-import org.springblade.binlog.vo.BinLogItem;
-
-/**
- * BinLogListener监听器
- *
- * @author zrj
- * @since 2024/02/19
- **/
-@FunctionalInterface
-public interface BinLogListener {
-
- void onEvent(BinLogItem item);
-}
-
-
diff --git a/src/main/java/org/springblade/binlog/listener/BinlogListenerMixed.java b/src/main/java/org/springblade/binlog/listener/BinlogListenerMixed.java
deleted file mode 100644
index 4ecba8f..0000000
--- a/src/main/java/org/springblade/binlog/listener/BinlogListenerMixed.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package org.springblade.binlog.listener;
-
-import com.github.shyiko.mysql.binlog.BinaryLogClient;
-import com.github.shyiko.mysql.binlog.event.Event;
-import com.github.shyiko.mysql.binlog.event.EventData;
-import com.github.shyiko.mysql.binlog.event.QueryEventData;
-import com.github.shyiko.mysql.binlog.event.TableMapEventData;
-import com.github.shyiko.mysql.binlog.event.WriteRowsEventData;
-import com.github.shyiko.mysql.binlog.event.deserialization.EventDeserializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.List;
-public class BinlogListenerMixed {
-
- private static final Logger logger = LoggerFactory.getLogger(BinlogListenerMixed.class);
-
- private static final String MYSQL_HOST = "127.0.0.1";
- private static final int MYSQL_PORT = 3308;
- private static final String MYSQL_USERNAME = "root";
- private static final String MYSQL_PASSWORD = "root";
-
- public static void main(String[] args) {
- try {
- BinaryLogClient client = new BinaryLogClient(MYSQL_HOST, MYSQL_PORT, MYSQL_USERNAME, MYSQL_PASSWORD);
-// client.setBinlogFilename(null);
-// client.setBinlogPosition(-1); // 或者设置为其他适当的初始位置
-// client.setServerId(1);
-// client.setBinlogFilename("mysql-bin.000005");
-// client.setBinlogPosition(154);
- EventDeserializer eventDeserializer = new EventDeserializer();
- eventDeserializer.setCompatibilityMode(
- EventDeserializer.CompatibilityMode.DATE_AND_TIME_AS_LONG
- // EventDeserializer.CompatibilityMode.CHAR_AND_BINARY_AS_BYTE_ARRAY 该设置会将varchar 转为 byte[]
- );
- logger.info("使用主机={}, 端口={}, 用户名={}, 密码={} 连接到 MySQL", MYSQL_HOST, MYSQL_PORT, MYSQL_USERNAME, MYSQL_PASSWORD);
- client.setEventDeserializer(eventDeserializer);
- client.registerEventListener(BinlogListenerMixed::handleEvent);
- client.registerLifecycleListener(new BinaryLogClient.LifecycleListener() {
- @Override
- public void onConnect(BinaryLogClient client) {
- logger.info("Connected to MySQL server");
- }
-
- @Override
- public void onCommunicationFailure(BinaryLogClient client, Exception ex) {
- logger.error("Communication failure with MySQL server", ex);
- }
-
- @Override
- public void onEventDeserializationFailure(BinaryLogClient client, Exception ex) {
- logger.error("Event deserialization failure", ex);
- }
-
- @Override
- public void onDisconnect(BinaryLogClient client) {
- logger.warn("Disconnected from MySQL server");
- // 在这里添加重新连接或其他处理逻辑
- }
- });
-
- client.connect();
- } catch (IOException e) {
- logger.error("@@ 连接到 MySQL 时发生错误", e);
- logger.error("@@ Error connecting to MySQL", e);
- }
- }
-
- private static void handleEvent(Event event) {
- logger.info("@@ 打印 event: {}", event);
- logger.info("@@ Received event type: {}", event.getHeader().getEventType());
-
- switch (event.getHeader().getEventType()) {
- case WRITE_ROWS:
- case EXT_WRITE_ROWS:
- handleWriteRowsEvent((WriteRowsEventData) event.getData());
- break;
- case QUERY:
- handleQueryEvent((QueryEventData) event.getData());
- break;
- case TABLE_MAP:
- handleTableMapEvent((TableMapEventData) event.getData());
- break;
- // 其他事件处理...
- }
- }
-
- private static void handleWriteRowsEvent(WriteRowsEventData eventData) {
- List<Serializable[]> rows = eventData.getRows();
-
- // 获取表名
- String tableName = getTableName(eventData);
-
- // 处理每一行数据
- for (Serializable[] row : rows) {
- // 根据需要调整以下代码以获取具体的列值
- String column1Value = row[0].toString();
- String column2Value = row[1].toString();
- String url = row[2].toString();
- logger.info(url);
-
- // 将数据备份到另一个数据库
- backupToAnotherDatabase(tableName, column1Value, column2Value);
- }
- }
-
- private static void handleQueryEvent(QueryEventData eventData) {
- String sql = eventData.getSql();
- logger.info("@@ handleQueryEvent函数执行Query event SQL: {}", sql);
-
- // 解析SQL语句,根据需要处理
- // 例如,检查是否包含写入操作,然后执行相应的逻辑
- }
-
- private static void handleTableMapEvent(TableMapEventData eventData) {
- // 获取表映射信息,根据需要处理
- logger.info("@@ handleTableMapEvent函数执行TableMap event: {}", eventData);
- }
-
- private static String getTableName(EventData eventData) {
- // 获取表名的逻辑,可以使用TableMapEventData等信息
- // 根据实际情况实现
- return "example_table";
- }
-
- private static void backupToAnotherDatabase(String tableName, String column1Value, String column2Value) {
- // 将数据备份到另一个数据库的逻辑
- logger.info("Backup to another database: Table={}, Column1={}, Column2={}", tableName, column1Value, column2Value);
- }
-}
diff --git a/src/main/java/org/springblade/binlog/listener/MysqlBinLogListener.java b/src/main/java/org/springblade/binlog/listener/MysqlBinLogListener.java
deleted file mode 100644
index 3f11eab..0000000
--- a/src/main/java/org/springblade/binlog/listener/MysqlBinLogListener.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package org.springblade.binlog.listener;
-
-import com.github.shyiko.mysql.binlog.BinaryLogClient;
-import com.github.shyiko.mysql.binlog.event.*;
-import com.github.shyiko.mysql.binlog.event.deserialization.EventDeserializer;
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Multimap;
-import lombok.extern.slf4j.Slf4j;
-import org.kohsuke.args4j.Option;
-import org.springblade.binlog.config.DataSourceConfig;
-import org.springblade.binlog.constant.BinLogConstants;
-import org.springblade.binlog.vo.BinLogItem;
-import org.springblade.binlog.vo.DataProperty;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Map;
-import java.util.concurrent.*;
-import static com.github.shyiko.mysql.binlog.event.EventType.*;
-import static org.springblade.binlog.util.BinLogUtils.getColMap;
-import static org.springblade.binlog.util.BinLogUtils.getdbTable;
-
-/**
- * 数据库监听器
- *
- * @author zrj
- * @since 2021/7/26
- **/
-@Slf4j
-public class MysqlBinLogListener implements BinaryLogClient.EventListener {
-
- @Option(name = "-binlog-consume_threads", usage = "the thread num of consumer")
- private int consumerThreads = BinLogConstants.consumerThreads;
-
- private BinaryLogClient parseClient;
-
- private BlockingQueue<BinLogItem> queue;
- private final ExecutorService consumer;
-
- // 存放每张数据表对应的listener
- private Multimap<String, BinLogListener> listeners;
-
- private DataSourceConfig conf;
- private Map<String, Map<String, DataProperty>> dbTableCols;
- private String dbTable;
-
- /**
- * 监听器初始化
- *
- * @param conf
- */
- public MysqlBinLogListener(DataSourceConfig conf) {
- BinaryLogClient client = new BinaryLogClient(conf.getHost(), conf.getPort(), conf.getUsername(), conf.getPassword());
- // 序列化 EventDeserializer.CompatibilityMode.CHAR_AND_BINARY_AS_BYTE_ARRAY 该设置会将varchar 转为 byte[]
- EventDeserializer eventDeserializer = new EventDeserializer();
- eventDeserializer.setCompatibilityMode(EventDeserializer.CompatibilityMode.DATE_AND_TIME_AS_LONG
- );
- client.setEventDeserializer(eventDeserializer);
- this.parseClient = client;
- this.queue = new ArrayBlockingQueue<>(1024);
- this.conf = conf;
- this.listeners = ArrayListMultimap.create();
- this.dbTableCols = new ConcurrentHashMap<>();
- this.consumer = Executors.newFixedThreadPool(consumerThreads);
- }
-
- /**
- * 监听处理
- *
- * @param event
- */
- @Override
- public void onEvent(Event event) {
- EventType eventType = event.getHeader().getEventType();
-
- if (eventType == EventType.TABLE_MAP) {
- TableMapEventData tableData = event.getData();
- String db = tableData.getDatabase();
- String table = tableData.getTable();
- dbTable = getdbTable(db, table);
- }
-
- // 只处理添加删除更新三种操作
- if (isWrite(eventType) || isUpdate(eventType) || isDelete(eventType)) {
- if (isWrite(eventType)) {
- WriteRowsEventData data = event.getData();
- for (Serializable[] row : data.getRows()) {
- if (dbTableCols.containsKey(dbTable)) {
- BinLogItem item = BinLogItem.itemFromInsertOrDeleted(row, dbTableCols.get(dbTable), eventType);
- item.setDbTable(dbTable);
- queue.add(item);
- }
- }
- }
- if (isUpdate(eventType)) {
- UpdateRowsEventData data = event.getData();
- for (Map.Entry<Serializable[], Serializable[]> row : data.getRows()) {
- if (dbTableCols.containsKey(dbTable)) {
- BinLogItem item = BinLogItem.itemFromUpdate(row, dbTableCols.get(dbTable), eventType);
- item.setDbTable(dbTable);
- queue.add(item);
- }
- }
-
- }
- if (isDelete(eventType)) {
- DeleteRowsEventData data = event.getData();
- for (Serializable[] row : data.getRows()) {
- if (dbTableCols.containsKey(dbTable)) {
- BinLogItem item = BinLogItem.itemFromInsertOrDeleted(row, dbTableCols.get(dbTable), eventType);
- item.setDbTable(dbTable);
- queue.add(item);
- }
- }
- }
- }
- }
-
- /**
- * 注册监听
- *
- * @param db 数据库
- * @param table 操作表
- * @param listener 监听器
- * @throws Exception
- */
- public void regListener(String db, String table, BinLogListener listener) throws Exception {
- String dbTable = getdbTable(db, table);
- // 获取字段集合
- Map<String, DataProperty> cols = getColMap(conf, db, table);
- // 保存字段信息
- dbTableCols.put(dbTable, cols);
- // 保存当前注册的listener
- listeners.put(dbTable, listener);
- }
-
- /**
- * 开启多线程消费
- *
- * @throws IOException
- */
- public void parse() throws IOException {
- parseClient.registerEventListener(this);
-
- for (int i = 0; i < consumerThreads; i++) {
- consumer.submit(() -> {
- while (true) {
- if (queue.size() > 0) {
- try {
- BinLogItem item = queue.take();
- String dbtable = item.getDbTable();
- listeners.get(dbtable).forEach(binLogListener -> binLogListener.onEvent(item));
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- Thread.sleep(BinLogConstants.queueSleep);
- }
- });
- }
- parseClient.connect();
- }
-
-}
-
diff --git a/src/main/java/org/springblade/binlog/listener/TourBinLogListener.java b/src/main/java/org/springblade/binlog/listener/TourBinLogListener.java
deleted file mode 100644
index 28139c3..0000000
--- a/src/main/java/org/springblade/binlog/listener/TourBinLogListener.java
+++ /dev/null
@@ -1,198 +0,0 @@
-package org.springblade.binlog.listener;
-
-import cn.hutool.core.collection.CollectionUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.binlog.client.MysqlClient;
-import org.springblade.binlog.config.DataSourceConfig;
-import org.springblade.binlog.constant.BinLogConstants;
-import org.springblade.binlog.util.BinLogUtils;
-import org.springblade.binlog.vo.BinLogItem;
-import org.springblade.binlog.vo.DataProperty;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-import javax.annotation.Resource;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 乐游监听器
- * SpringBoot启动成功后的执行业务线程操作
- * CommandLineRunner去实现此操作
- * 在有多个可被执行的业务时,通过使用 @Order 注解,设置各个线程的启动顺序(value值由小到大表示启动顺序)。
- * 多个实现CommandLineRunner接口的类必须要设置启动顺序,不让程序启动会报错!
- *
- * @author zrj
- * @since 2021/7/27
- **/
-@Slf4j
-@Component
-@Order(value = 1)
-@Configuration(proxyBeanMethods = false)
-@ConditionalOnProperty(value = "binlog.enabled")
-public class TourBinLogListener implements CommandLineRunner {
-
- @Resource
- private BinLogConstants binLogConstants;
-
- @Override
- public void run(String... args) throws Exception {
- log.info("初始化配置信息:" + binLogConstants.toString());
-
- // 初始化配置信息
- DataSourceConfig conf = new DataSourceConfig(binLogConstants.getHost(),
- binLogConstants.getPort(),
- binLogConstants.getUsername(),
- binLogConstants.getPassword());
-
- // 初始化监听器
- MysqlBinLogListener mysqlBinLogListener = new MysqlBinLogListener(conf);
-
- // 获取table集合
- List<String> tableList = BinLogUtils.getListByStr(binLogConstants.getTable());
- if (CollectionUtil.isEmpty(tableList)) {
- return;
- }
- // 注册监听
- tableList.forEach(table -> {
- log.info("注册监听信息,注册DB:" + binLogConstants.getDb() + ",注册表:" + table);
- try {
- mysqlBinLogListener.regListener(binLogConstants.getDb(), table, item -> {
- if (item.getEventType().name().equals("EXT_WRITE_ROWS")){
- // 新增处理逻辑
- saveHandle(item);
- }
- if (item.getEventType().name().equals("EXT_UPDATE_ROWS")){
- // 更新处理逻辑
- updateHandle(item);
- }
- if (item.getEventType().name().equals("EXT_DELETE_ROWS")){
- // 删除处理逻辑
- deletedHandle(item);
- }
- });
- } catch (Exception e) {
- log.error("BinLog监听异常:" + e);
- }
- });
- // 多线程消费
- mysqlBinLogListener.parse();
- }
-
- /**
- * 新增处理逻辑
- * @param item
- */
- private void saveHandle(BinLogItem item) {
- String tableName = item.getDbTable().split("-")[1];
- Map<String, Serializable> data = item.getAfter();
- Map<String, DataProperty> dataProperty = item.getDataProperty();
- // 创建更新对象
- List<String> keyList = new ArrayList<>();
- List<String> valueList = new ArrayList<>();
- // 遍历匹配数据
- dataProperty.forEach((key,value)->{
-// log.info("数据类型 " + value.dataType);
- if(null!=data.get(key)) {
- keyList.add(key);
- if (value.dataType.equals("varchar") ||
- value.getDataType().equals("char")) {
- valueList.add("'" + data.get(key).toString() + "'");
- }else if(value.dataType.equals("text") ||
- value.dataType.equals("mediumtext")) {
- byte[] bytes = (byte[])data.get(key);
- valueList.add("'" + new String(bytes) + "'");
- }else if(value.dataType.equals("date") ||
- value.getDataType().equals("datetime")) {
- Long time = Long.parseLong(data.get(key).toString());
- valueList.add("'" + BinLogUtils.getDateFormatStr(new Date(time)) + "'");
- }else {
- valueList.add(data.get(key).toString());
- }
- }
- });
- // 拼接sql
- StringBuilder sqlBuilder = new StringBuilder();
- sqlBuilder.append("insert into ")
- .append(tableName)
- .append("(")
- .append(String.join(",",keyList))
- .append(") ")
- .append(" values (")
- .append(String.join(",",valueList))
- .append(");");
- log.info("sql: " + sqlBuilder.toString());
- // 同步到其他数据库
- MysqlClient.insert(sqlBuilder.toString());
- }
-
- /**
- * 修改处理逻辑
- * @param item
- */
- private void updateHandle(BinLogItem item) {
- String tableName = item.getDbTable().split("-")[1];
- Map<String, Serializable> data = item.getAfter();
- Map<String, DataProperty> dataProperty = item.getDataProperty();
- // 创建更新对象
- List<String> updateList = new ArrayList<>();
- // 遍历匹配数据
- dataProperty.forEach((key,value)->{
-// log.info("数据类型 " + value.dataType);
- if(null!=data.get(key) && !key.equals("id")) {
- if (value.dataType.equals("varchar") ||
- value.getDataType().equals("char")) {
- updateList.add(key + " = '" + data.get(key).toString() + "'");
- }else if(value.dataType.equals("text") ||
- value.dataType.equals("mediumtext")) {
- byte[] bytes = (byte[])data.get(key);
- updateList.add(key + " = '" + new String(bytes) + "'");
- }else if(value.dataType.equals("date") ||
- value.getDataType().equals("datetime")) {
- Long time = Long.parseLong(data.get(key).toString());
- updateList.add(key + " = '" + BinLogUtils.getDateFormatStr(new Date(time)) + "'");
- }else {
- updateList.add(key + " = " + data.get(key).toString());
- }
- }
- });
- // 拼接sql
- StringBuilder sqlBuilder = new StringBuilder();
- sqlBuilder.append("update ")
- .append(tableName)
- .append(" set ")
- .append(String.join(",",updateList))
- .append(" where id = ")
- .append(data.get("id"))
- .append(";");
- log.info("sql: " + sqlBuilder.toString());
- // 同步到其他数据库
- MysqlClient.update(sqlBuilder.toString());
- }
-
- /**
- * 删除处理逻辑
- * @param item 数据
- */
- private void deletedHandle(BinLogItem item) {
- String tableName = item.getDbTable().split("-")[1];
- Map<String, Serializable> data = item.getBefore();
- // 拼接sql
- StringBuilder sqlBuilder = new StringBuilder();
- sqlBuilder.append("delete from ")
- .append(tableName)
- .append(" where id = ")
- .append(data.get("id"))
- .append(";");
- log.info("sql: " + sqlBuilder.toString());
- // 同步到其他数据库
- MysqlClient.delete(sqlBuilder.toString());
- }
-}
-
-
diff --git a/src/main/java/org/springblade/binlog/util/BinLogUtils.java b/src/main/java/org/springblade/binlog/util/BinLogUtils.java
deleted file mode 100644
index 3620b12..0000000
--- a/src/main/java/org/springblade/binlog/util/BinLogUtils.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.springblade.binlog.util;
-
-
-import com.github.shyiko.mysql.binlog.event.EventType;
-import com.google.common.collect.Lists;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.binlog.config.DataSourceConfig;
-import org.springblade.binlog.vo.BinLogItem;
-import org.springblade.binlog.vo.DataProperty;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springframework.stereotype.Component;
-import java.io.Serializable;
-import java.sql.*;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static com.github.shyiko.mysql.binlog.event.EventType.isDelete;
-import static com.github.shyiko.mysql.binlog.event.EventType.isUpdate;
-import static com.github.shyiko.mysql.binlog.event.EventType.isWrite;
-
-/**
- * 监听工具
- *
- * @author zrj
- * @since 2021/7/27
- **/
-@Slf4j
-@Component
-public class BinLogUtils {
-
- private static BinLogUtils binLogUtils;
-
- /**
- * 拼接dbTable
- */
- public static String getdbTable(String db, String table) {
- return db + "-" + table;
- }
-
- /**
- * 获取columns集合
- */
- public static Map<String, DataProperty> getColMap(DataSourceConfig conf, String db, String table) throws ClassNotFoundException {
- try {
- Class.forName("com.mysql.cj.jdbc.Driver");
- // 保存当前注册的表的colum信息
- Connection connection = DriverManager.getConnection(
- "jdbc:mysql://" + conf.getHost() + ":" + conf.getPort() + "?serverTimezone=GMT%2B8",
- conf.getUsername(),
- conf.getPassword());
- // 执行sql
- String preSql = "SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, ORDINAL_POSITION FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? and TABLE_NAME = ?";
- PreparedStatement ps = connection.prepareStatement(preSql);
- ps.setString(1, db);
- ps.setString(2, table);
- ResultSet rs = ps.executeQuery();
- Map<String, DataProperty> map = new HashMap<>(rs.getRow());
- while (rs.next()) {
- String schema = rs.getString("TABLE_SCHEMA");
- String tableName = rs.getString("TABLE_NAME");
- String column = rs.getString("COLUMN_NAME");
- int idx = rs.getInt("ORDINAL_POSITION");
- String dataType = rs.getString("DATA_TYPE");
- if (column != null && idx >= 1) {
- // sql的位置从1开始
- map.put(column, new DataProperty(schema, tableName, idx - 1, column, dataType));
- }
- }
- ps.close();
- rs.close();
- return map;
- } catch (SQLException e) {
- log.error("load db conf error, db_table={}:{} ", db, table, e);
- }
- return null;
- }
-
- /**
- * 根据DBTable获取table
- *
- * @param dbTable
- * @return java.lang.String
- */
- public static String getTable(String dbTable) {
- if (StringUtils.isEmpty(dbTable)) {
- return "";
- }
- String[] split = dbTable.split("-");
- if (split.length == 2) {
- return split[1];
- }
- return "";
- }
-
- /**
- * 将逗号拼接字符串转List
- *
- * @param str
- * @return
- */
- public static List<String> getListByStr(String str) {
- if (StringUtils.isEmpty(str)) {
- return Lists.newArrayList();
- }
-
- return Arrays.asList(str.split(","));
- }
-
- /**
- * 根据操作类型获取对应集合
- *
- * @param binLogItem
- * @return
- */
- public static Map<String, Serializable> getOptMap(BinLogItem binLogItem) {
- // 获取操作类型
- EventType eventType = binLogItem.getEventType();
- if (isWrite(eventType) || isUpdate(eventType)) {
- return binLogItem.getAfter();
- }
- if (isDelete(eventType)) {
- return binLogItem.getBefore();
- }
- return null;
- }
-
- /**
- * 获取操作类型
- *
- * @param binLogItem
- * @return
- */
- public static Integer getOptType(BinLogItem binLogItem) {
- // 获取操作类型
- EventType eventType = binLogItem.getEventType();
- if (isWrite(eventType)) {
- return 1;
- }
- if (isUpdate(eventType)) {
- return 2;
- }
- if (isDelete(eventType)) {
- return 3;
- }
- return null;
- }
-
- /**
- * 格式化date
- *
- * @param date
- * @return java.util.Date
- */
- public static Date getDateFormat(Date date) {
- if (date == null) {
- return null;
- }
- String dateFormat = "yyyy-MM-dd HH:mm:ss";
- String strDate = DateUtil.format(date, dateFormat);
- if (StringUtils.isEmpty(strDate)) {
- return null;
- }
-
- Date formatDate = DateUtil.parse(strDate, dateFormat);
- return formatDate;
- }
-
- /**
- * 格式化date
- *
- * @param date
- * @return java.util.Date
- */
- public static String getDateFormatStr(Date date) {
- if (date == null) {
- return null;
- }
- String dateFormat = "yyyy-MM-dd HH:mm:ss";
- return DateUtil.format(date, dateFormat);
- }
-}
-
-
diff --git a/src/main/java/org/springblade/binlog/vo/BinLogItem.java b/src/main/java/org/springblade/binlog/vo/BinLogItem.java
deleted file mode 100644
index 6dde6b2..0000000
--- a/src/main/java/org/springblade/binlog/vo/BinLogItem.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.springblade.binlog.vo;
-
-
-import com.github.shyiko.mysql.binlog.event.EventType;
-import com.google.common.collect.Maps;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Map;
-
-import static com.github.shyiko.mysql.binlog.event.EventType.isDelete;
-import static com.github.shyiko.mysql.binlog.event.EventType.isWrite;
-
-/**
- * binlog对象
- *
- * @author zrj
- * @since 2024/02/19
- **/
-@Data
-public class BinLogItem implements Serializable {
- private static final long serialVersionUID = 5503152746318421290L;
-
- private String dbTable;
- private EventType eventType;
- private Long timestamp = null;
- private Long serverId = null;
- // 存储字段-之前的值之后的值
- private Map<String, Serializable> before = null;
- private Map<String, Serializable> after = null;
- // 存储字段--类型
- private Map<String, DataProperty> dataProperty = null;
-
- /**
- * 新增或者删除操作数据格式化
- */
- public static BinLogItem itemFromInsertOrDeleted(Serializable[] row, Map<String, DataProperty> dataPropertyMap, EventType eventType) {
- if (null == row || null == dataPropertyMap) {
- return null;
- }
- if (row.length != dataPropertyMap.size()) {
- return null;
- }
- // 初始化Item
- BinLogItem item = new BinLogItem();
- item.eventType = eventType;
- item.dataProperty = dataPropertyMap;
- item.before = Maps.newHashMap();
- item.after = Maps.newHashMap();
-
- Map<String, Serializable> beOrAf = Maps.newHashMap();
-
- dataPropertyMap.entrySet().forEach(entry -> {
- String key = entry.getKey();
- DataProperty dataProperty = entry.getValue();
- beOrAf.put(key, row[dataProperty.inx]);
- });
-
- // 写操作放after,删操作放before
- if (isWrite(eventType)) {
- item.after = beOrAf;
- }
- if (isDelete(eventType)) {
- item.before = beOrAf;
- }
-
- return item;
- }
-
- /**
- * 更新操作数据格式化
- */
- public static BinLogItem itemFromUpdate(Map.Entry<Serializable[], Serializable[]> mapEntry, Map<String, DataProperty> dataPropertyMap, EventType eventType) {
- if (null == mapEntry || null == dataPropertyMap) {
- return null;
- }
- // 初始化Item
- BinLogItem item = new BinLogItem();
- item.eventType = eventType;
- item.dataProperty = dataPropertyMap;
- item.before = Maps.newHashMap();
- item.after = Maps.newHashMap();
-
- Map<String, Serializable> be = Maps.newHashMap();
- Map<String, Serializable> af = Maps.newHashMap();
-
- dataPropertyMap.entrySet().forEach(entry -> {
- String key = entry.getKey();
- DataProperty dataProperty = entry.getValue();
- be.put(key, mapEntry.getKey()[dataProperty.inx]);
-
- af.put(key, mapEntry.getValue()[dataProperty.inx]);
- });
-
- item.before = be;
- item.after = af;
- return item;
- }
-
-}
-
-
diff --git a/src/main/java/org/springblade/binlog/vo/DataProperty.java b/src/main/java/org/springblade/binlog/vo/DataProperty.java
deleted file mode 100644
index ff4e083..0000000
--- a/src/main/java/org/springblade/binlog/vo/DataProperty.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.springblade.binlog.vo;
-import lombok.Data;
-
-/**
- * 字段属性对象
- *
- * @author zrj
- * @since 2024/02/19
- **/
-@Data
-public class DataProperty {
- public int inx;
- /**
- * 列名
- */
- public String colName;
- /**
- * 类型
- */
- public String dataType;
- /**
- * 数据库
- */
- public String schema;
- /**
- * 表
- */
- public String table;
-
- public DataProperty(String schema, String table, int idx, String colName, String dataType) {
- this.schema = schema;
- this.table = table;
- this.colName = colName;
- this.dataType = dataType;
- this.inx = idx;
- }
-}
-
-
diff --git a/src/main/java/org/springblade/common/config/MyBatisPlusConfig.java b/src/main/java/org/springblade/common/config/MyBatisPlusConfig.java
deleted file mode 100644
index 56906b2..0000000
--- a/src/main/java/org/springblade/common/config/MyBatisPlusConfig.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.springblade.common.config;
-
-import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
-import org.springblade.common.interceptor.DataSyncInterceptor;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class MyBatisPlusConfig {
-
- @Bean
- public DataSyncInterceptor dataSyncInterceptor() {
- return new DataSyncInterceptor();
- }
-}
diff --git a/src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java b/src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java
deleted file mode 100644
index 41393d9..0000000
--- a/src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package org.springblade.common.interceptor;
-
-import org.apache.ibatis.binding.MapperMethod;
-import org.apache.ibatis.executor.Executor;
-import org.apache.ibatis.mapping.BoundSql;
-import org.apache.ibatis.mapping.MappedStatement;
-import org.apache.ibatis.plugin.*;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.constant.EsTableConstant;
-import org.springblade.common.utils.SQLParseUtils;
-import org.springblade.es.service.ElasticsearchDocumentService;
-import org.springblade.es.vo.EsParam;
-import org.springblade.modules.article.entity.Article;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.vo.HouseVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-@Component
-@Intercepts({
- @Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class})
-})
-public class DataSyncInterceptor implements Interceptor {
-
- @Lazy
- @Autowired
- private ElasticsearchDocumentService elasticsearchDocumentService;
-
- @Value("${elasticsearch.indexName}")
- private String indexName;
-
- /**
- * 拦截器在sql执行成功后同步到es,
- * 如果同步失败抛出异常,保证数据一致性
- *
- * @param invocation
- * @return
- * @throws Throwable
- */
- @Override
- public Object intercept(Invocation invocation) throws Throwable {
- // 获取StatementHandler,进行自定义处理
-// StatementHandler statementHandler = PluginUtils.realTarget(invocation.getTarget());
-
- Object res = invocation.proceed();
- System.out.println("res = " + res);
-
- Object[] args = invocation.getArgs();
- MappedStatement ms = (MappedStatement) args[0];
- if (args.length >= 2) {
- //参数
- Object parameter = invocation.getArgs()[1];
- BoundSql boundSql = ms.getBoundSql(parameter);
- //sql
- String sql = boundSql.getSql();
- sql = sql.replaceAll("\n", "");
- //获取表名
- String tableName = SQLParseUtils.getTableName(sql);
- String sqlType = SQLParseUtils.parseSQLType(sql);
- if (!Strings.isBlank(tableName)) {
- if (tableName.equals("jczz_article") ||
- tableName.equals("jczz_house") ||
- tableName.equals("jczz_household") ||
- tableName.equals("jczz_place"))
- syncDataAfterUpdate(tableName, sqlType, invocation.getArgs()[1]);
- }
- }
- return res;
- }
-
-
- /**
- * 数据同步
- *
- * @param tableName
- * @param sqlType
- * @param parameter
- */
- private void syncDataAfterUpdate(String tableName, String sqlType, Object parameter) {
- EsParam esParam = new EsParam();
- esParam.setIndexName(indexName);
- esParam.setTableName(tableName);
- // 判断操作类型
- if (sqlType.equals("INSERT")) {
- //insert 可用直接拦截到实体类
- if (tableName.equals("jczz_article")) {
- Article entity = (Article) parameter;
- elasticsearchDocumentService.addArticle(esParam, entity);
- }
- if (tableName.equals("jczz_place")) {
- PlaceEntity entity = (PlaceEntity) parameter;
- elasticsearchDocumentService.addPlace(esParam, entity);
- }
- if (tableName.equals("jczz_house")) {
- HouseEntity entity = (HouseEntity) parameter;
- elasticsearchDocumentService.addHouse(esParam, entity);
- }
- if (tableName.equals("jczz_household")) {
- HouseholdEntity entity = (HouseholdEntity) parameter;
- elasticsearchDocumentService.addHousehold(esParam, entity);
- }
- }
- if (sqlType.equals("UPDATE")) {
- //update 方法需要特殊处理
- if (tableName.equals("jczz_article")) {
- Article entity = (Article) ((MapperMethod.ParamMap) parameter).get("param1");
- if (entity != null && entity.getId() != null) {
- esParam.setTableId(entity.getId().toString());
- elasticsearchDocumentService.update(esParam, entity, EsTableConstant.articleList);
- }
- }
- if (tableName.equals("jczz_place")) {
- PlaceEntity entity = new PlaceEntity();
- PlaceEntity placeEntity = new PlaceEntity();
- if (parameter instanceof MapperMethod.ParamMap) {
- placeEntity = (PlaceEntity) ((MapperMethod.ParamMap) parameter).get("param1");
- if (placeEntity != null && null != placeEntity.getId()) {
- setPlaceInfo(entity, placeEntity);
- esParam.setTableId(entity.getId().toString());
- elasticsearchDocumentService.update(esParam, entity, EsTableConstant.placeList);
- }
- } else {
- placeEntity = (PlaceEntity) parameter;
- // 删除
- esParam.setTableId(placeEntity.getId().toString());
- elasticsearchDocumentService.removeByQuery(esParam);
- }
- }
- if (tableName.equals("jczz_house")) {
- HouseEntity houseEntity = new HouseEntity();
- HouseEntity entity = new HouseEntity();
- if (parameter instanceof MapperMethod.ParamMap) {
- entity = (HouseEntity) ((MapperMethod.ParamMap) parameter).get("param1");
- if (entity != null && entity.getId() != null) {
- setHouseInfo(houseEntity, entity);
- esParam.setTableId(entity.getId().toString());
- elasticsearchDocumentService.update(esParam, entity, EsTableConstant.houseList);
- }
- } else {
- entity = (HouseEntity) parameter;
- // 删除
- esParam.setTableId(entity.getId().toString());
- elasticsearchDocumentService.removeByQuery(esParam);
- }
- }
- if (tableName.equals("jczz_household")) {
- HouseholdEntity householdEntity = new HouseholdEntity();
- HouseholdEntity entity = new HouseholdEntity();
- if (parameter instanceof MapperMethod.ParamMap) {
- entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("param1");
- if (entity != null && entity.getId() != null) {
- setHouseholdInfo(householdEntity, entity);
- esParam.setTableId(entity.getId().toString());
- elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList);
- }
- } else {
- entity = (HouseholdEntity) parameter;
- // 删除
- esParam.setTableId(entity.getId().toString());
- elasticsearchDocumentService.removeByQuery(esParam);
- }
- }
- }
- // 删除处理
- if (sqlType.equals("DELETE")) {
- List<Long> list = (List<Long>) ((MapperMethod.ParamMap) parameter).get("param1");
- esParam.setTableId(list.get(0).toString());
- elasticsearchDocumentService.removeByQuery(esParam);
- }
- }
-
- /**
- * 场所值复制
- *
- * @param entity
- * @param placeEntity
- */
- private void setPlaceInfo(PlaceEntity entity, PlaceEntity placeEntity) {
- entity.setId(placeEntity.getId());
- entity.setPlaceName(placeEntity.getPlaceName());
- entity.setPrincipal(placeEntity.getPrincipal());
- entity.setPrincipalPhone(placeEntity.getPrincipalPhone());
- entity.setPrincipalIdCard(placeEntity.getPrincipalIdCard());
- entity.setLocation(placeEntity.getLocation());
- }
-
- /**
- * 房屋值复制
- *
- * @param entity
- * @param houseEntity
- */
- private void setHouseInfo(HouseEntity entity, HouseEntity houseEntity) {
- entity.setId(houseEntity.getId());
- entity.setHouseName(houseEntity.getHouseName());
- }
-
- /**
- * 住户值复制
- *
- * @param entity
- * @param householdEntity
- */
- private void setHouseholdInfo(HouseholdEntity entity, HouseholdEntity householdEntity) {
- entity.setId(householdEntity.getId());
- entity.setName(householdEntity.getName());
- entity.setPhoneNumber(householdEntity.getPhoneNumber());
- entity.setIdCard(householdEntity.getIdCard());
- entity.setCurrentAddress(householdEntity.getCurrentAddress());
- }
-
-
- @Override
- public Object plugin(Object target) {
- return Plugin.wrap(target, this);
- }
-
- @Override
- public void setProperties(Properties properties) {
- }
-}
diff --git a/src/main/java/org/springblade/common/node/TreeStringNode.java b/src/main/java/org/springblade/common/node/TreeStringNode.java
index 294908f..28c2292 100644
--- a/src/main/java/org/springblade/common/node/TreeStringNode.java
+++ b/src/main/java/org/springblade/common/node/TreeStringNode.java
@@ -4,8 +4,6 @@
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
-import org.springblade.modules.category.dto.CategoryDTO;
-
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -94,11 +92,6 @@
* 子孙节点
*/
private List<TreeStringNode> children = new ArrayList<>();
-
- /**
- * 标签节点
- */
- private List<CategoryDTO> categoryList;
/**
* 是否有子孙节点
diff --git a/src/main/java/org/springblade/common/param/CommonParamSet.java b/src/main/java/org/springblade/common/param/CommonParamSet.java
deleted file mode 100644
index 8822b4e..0000000
--- a/src/main/java/org/springblade/common/param/CommonParamSet.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.springblade.common.param;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.apache.poi.hssf.record.DVALRecord;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.service.IRegionService;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import static org.springblade.core.secure.utils.AuthUtil.getUserRole;
-
-public class CommonParamSet<T> {
- /**
- * 区域编号集合
- */
- private List<String> regionChildCodesList = new ArrayList<>();
- /**
- * 是否为超级管理员
- */
- private Integer isAdministrator;
- /**
- * 网格编号集合
- */
- private List<String> gridCodeList = new ArrayList<>();
-
- /**
- *
- */
- private String str = null;
-
- public List<String> getRegionChildCodesList() {
- return regionChildCodesList;
- }
-
- public Integer getIsAdministrator() {
- return isAdministrator;
- }
-
- public List<String> getGridCodeList() {
- return gridCodeList;
- }
-
- public String getStr() {
- return str;
- }
-
- public <U> CommonParamSet invoke(Class<U> clazz, T t) {
- //获取传入对象信息
- U u = clazz.cast(t);
- try {
- Field roleNameField = u.getClass().getDeclaredField("roleName");
- Field communityCodeField = u.getClass().getDeclaredField("communityCode");
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- // 获取请求头中的社区编号
- String communityCode = SpringUtils.getRequestParam("communityCode");
- if (!Strings.isBlank(communityCode)) {
- // 校验社区编号是否合规
- if (null != SpringUtils.getBean(IRegionService.class).getById(communityCode)) {
- // 设置社区编号
- communityCodeField.setAccessible(true);
- communityCodeField.set(t, communityCode);
- }
- }
- // 超级管理员、系统管理员、公安管理员不过滤数据
-// isAdministrator = AuthUtils.isAdmin(roleName) || AuthUtils.isAdmin() ||
-// AuthUtils.isAdministrator() || AuthUtils.isGaAdmin() ? 1 : 2;
- if (StringUtils.isNotBlank(roleName)) {
- isAdministrator = AuthUtils.isAdmin(roleName) ? 1 : 2;
- } else {
- isAdministrator = AuthUtils.isAdmin() ||
- AuthUtils.isAdministrator() || AuthUtils.isGaAdmin() ? 1 : 2;
- }
-
- if (isAdministrator == 2) {
- if (!Strings.isBlank(communityCode)) {
- // 请求头带了后直接使用过滤
- regionChildCodesList.add(communityCode);
- }else {
- // 获取当前用户的所属行政区划编号()
- regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId(), communityCode);
- // 民警角色
- if (!Strings.isBlank(roleName) && roleName.equals("mj")) {
- regionChildCodesList = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(),communityCode,roleName);
- }
- }
- // 获取网格编号集合
- gridCodeList = new ArrayList<>();
- if (!Strings.isBlank(roleName)) {
- // 设置角色别名
- roleNameField.setAccessible(true);
- roleNameField.set(t, roleName);
- // 网格员角色
- if (roleName.equals("wgy")) {
- gridCodeList = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(),communityCode,roleName);
- }
- }
- // 特定账号设置
- if (AuthUtil.getUserAccount().equals("18879306957")) {
- // 设置社区编号
- communityCodeField.setAccessible(true);
- communityCodeField.set(t, "361102003027");
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return this;
- }
-
- /**
- * 设置对应的属性值
- * @param clazz
- * @param t
- * @param list 字段属性集合
- * @param pre 字段拼接
- * @return
- */
- public <U> CommonParamSet setFieldValue(Class<U> clazz, T t,List<String> list,String pre) {
- //获取传入对象信息
- U u = clazz.cast(t);
- try {
- StringBuilder builder = new StringBuilder(pre);
- for (String fieldName : list) {
- if (!fieldName.equals("tableName")) {
- if (fieldName.equals("tableId")) {
- fieldName = "id";
- }
- Field field = u.getClass().getDeclaredField(fieldName);
- field.setAccessible(true);
- builder.append(field.get(t).toString()).append(",");
- }
- }
- String toString = builder.toString();
- str = toString.substring(0,toString.length()-1);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return this;
- }
-
- /**
- * 设置对应的属性值
- * @param clazz
- * @param t
- * @param list 字段属性集合
- * @param map
- * @return
- */
- public <U> CommonParamSet setFieldValueByMap(Class<U> clazz, T t, List<String> list, Map<String,Object> map) {
- //获取传入对象信息
- U u = clazz.cast(t);
- try {
- for (String fieldName : list) {
- if (!fieldName.equals("tableName")){
- if (fieldName.equals("tableId")){
- fieldName = "id";
- }
- Field field = u.getClass().getDeclaredField(fieldName);
- field.setAccessible(true);
- String value = field.get(t).toString();
- if (fieldName.equals("id")){
- fieldName = "tableId";
- }
- map.put(fieldName,value);
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return this;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/common/param/GridSet.java b/src/main/java/org/springblade/common/param/GridSet.java
deleted file mode 100644
index 4f8748f..0000000
--- a/src/main/java/org/springblade/common/param/GridSet.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.springblade.common.param;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.service.IRegionService;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.List;
-
-public class GridSet<T> {
-
-
- /**
- * 获取警格网格的信息
- * @param clazz 类对象
- * @param t 对象数据
- * @param lngKey 经度属性key
- * @param latKey 纬度属性key
- * @param gridCodeKey 网格属性key
- * @param jwGirdCodeKey 警格属性key
- * @param <U>
- * @return
- */
- public <U> GridSet invoke(Class<U> clazz, T t,String lngKey,String latKey,String gridCodeKey,String jwGirdCodeKey) {
- //获取传入对象信息
- U u = clazz.cast(t);
- try {
- Field lngField = u.getClass().getDeclaredField(lngKey);
- Field latField = u.getClass().getDeclaredField(latKey);
- // 获取点信息
- lngField.setAccessible(true);
- latField.setAccessible(true);
- String lng = lngField.get(t).toString();
- String lat = latField.get(t).toString();
- if (!Strings.isBlank(lng)) {
- // 拼接点
- String point = "'POINT(" + lng +" " + lat + ")'";
- // 判断是否分析网格
- if (!Strings.isBlank(gridCodeKey)) {
- // 根据位置设置网格,警格编号
- IGridService gridService = SpringUtils.getBean(IGridService.class);
- Field gridCodeField = u.getClass().getDeclaredField(gridCodeKey);
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size() > 0) {
- GridEntity gridEntity = gridEntityList.get(0);
- gridCodeField.setAccessible(true);
- gridCodeField.set(t, gridEntity.getGridCode());
- }
- }
- // 判断是否分析警格
- if (!Strings.isBlank(jwGirdCodeKey)) {
- IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
- Field jwGridCodeField = u.getClass().getDeclaredField(jwGirdCodeKey);
- //点坐标解析警格
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
- if (policeAffairsGridEntityList.size() > 0) {
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
- jwGridCodeField.setAccessible(true);
- jwGridCodeField.set(t, policeAffairsGridEntity.getJwGridCode());
- }
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return this;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/common/utils/NodeTreeUtil.java b/src/main/java/org/springblade/common/utils/NodeTreeUtil.java
index 3a58bbc..1869e63 100644
--- a/src/main/java/org/springblade/common/utils/NodeTreeUtil.java
+++ b/src/main/java/org/springblade/common/utils/NodeTreeUtil.java
@@ -4,12 +4,8 @@
import org.springblade.common.node.TreeLongNode;
import org.springblade.common.node.TreeStringNode;
import org.springblade.core.tool.node.TreeNode;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree;
-import org.springblade.modules.house.vo.HouseTree;
import org.springblade.modules.system.node.DeptUserTreeNode;
-
import java.util.*;
-import java.util.stream.Collectors;
/**
* node tree 工具类
@@ -77,44 +73,6 @@
}
});
}
- }
- return tree;
- }
-
- /**
- * 树转换
- * @param treeMap
- * @return
- */
- public static List<DoorplateAddressVOTree> getAddressNodeTree(Map<String, DoorplateAddressVOTree> treeMap){
- List<DoorplateAddressVOTree> tree = new ArrayList<>();
- if (treeMap.size() > 1) {
- treeMap.forEach((code, treeNode) -> {
- if (treeMap.containsKey(treeNode.getParentCode())) {
- treeMap.get(treeNode.getParentCode()).getChildren().add(treeNode);
- } else {
- tree.add(treeNode);
- }
- });
- }
- return tree;
- }
-
- /**
- * 树转换
- * @param treeMap
- * @return
- */
- public static List<HouseTree> getHouseTree(Map<String, HouseTree> treeMap){
- List<HouseTree> tree = new ArrayList<>();
- if (treeMap.size() > 1) {
- treeMap.forEach((code, treeNode) -> {
- if (treeMap.containsKey(treeNode.getParentCode())) {
- treeMap.get(treeNode.getParentCode()).getChildren().add(treeNode);
- } else {
- tree.add(treeNode);
- }
- });
}
return tree;
}
diff --git a/src/main/java/org/springblade/es/config/ElasticsearchConfig.java b/src/main/java/org/springblade/es/config/ElasticsearchConfig.java
deleted file mode 100644
index 4498f6c..0000000
--- a/src/main/java/org/springblade/es/config/ElasticsearchConfig.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.es.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.apache.http.HttpHost;
-import org.elasticsearch.client.RestClient;
-import org.elasticsearch.client.RestClientBuilder;
-import org.elasticsearch.client.RestHighLevelClient;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@ConditionalOnProperty(value = "elasticsearch.enabled")
-public class ElasticsearchConfig {
-
- @Value("${elasticsearch.host}")
- private String elasticsearchHost;
-
- @Bean
- public RestHighLevelClient elasticsearchClient() {
- RestClientBuilder builder = RestClient.builder(new HttpHost(elasticsearchHost, 9200, "http"));
- return new RestHighLevelClient(builder);
- }
-}
diff --git a/src/main/java/org/springblade/es/config/ElasticsearchInitializer.java b/src/main/java/org/springblade/es/config/ElasticsearchInitializer.java
deleted file mode 100644
index 7428633..0000000
--- a/src/main/java/org/springblade/es/config/ElasticsearchInitializer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.es.config;
-
-import org.springblade.es.service.ElasticsearchIndexInitializer;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.stereotype.Component;
-// 暂时关闭
-//@Component
-public class ElasticsearchInitializer implements CommandLineRunner {
-
- private final ElasticsearchIndexInitializer indexInitializer;
-
- @Autowired
- public ElasticsearchInitializer(ElasticsearchIndexInitializer indexInitializer) {
- this.indexInitializer = indexInitializer;
- }
-
- @Override
- public void run(String... args) {
- String indexName = "your_index_name";
- String mappingJson = "{\"properties\":{\"your_field\":{\"type\":\"text\"}}}";
- indexInitializer.initializeIndex(indexName, mappingJson);
- }
-}
diff --git a/src/main/java/org/springblade/es/controller/EsController.java b/src/main/java/org/springblade/es/controller/EsController.java
deleted file mode 100644
index 7aa4a08..0000000
--- a/src/main/java/org/springblade/es/controller/EsController.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.springblade.es.controller;
-
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import lombok.AllArgsConstructor;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.es.service.ElasticsearchDocumentService;
-import org.springblade.es.vo.EsParam;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * es 全文检索
- */
-@RestController
-@RequestMapping("/es/es")
-@AllArgsConstructor
-@Api(value = "es 全文检索", tags = "es 全文检索")
-public class EsController {
-
- private final ElasticsearchDocumentService elasticsearchDocumentService;
-
- /**
- * 查询
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 1)
- public R page(EsParam esParam, Query query) {
- return R.data(elasticsearchDocumentService.selectDocumentPage(Condition.getPage(query), esParam));
- }
-
- /**
- * 初始化
- */
- @GetMapping("/init")
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
- @ApiOperationSupport(order = 2)
- public R init(EsParam esParam) {
- return R.status(elasticsearchDocumentService.init(esParam));
- }
-
-// /**
-// * 新增数据
-// */
-// @GetMapping("/add")
-// @ApiOperationSupport(order = 3)
-// public R add(EsParam esParam) {
-// return R.status(elasticsearchDocumentService.add(esParam,null));
-// }
-//
-// /**
-// * 修改数据
-// */
-// @GetMapping("/update")
-// @ApiOperationSupport(order = 4)
-// public R update(EsParam esParam) {
-// elasticsearchDocumentService.update(esParam,null,null);
-// return R.status(true);
-// }
-
- /**
- * 根据索引删除
- */
- @PostMapping("/removeBatchByIndexNames")
- @ApiOperationSupport(order = 5)
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
- public R removeBatchByIndexNames(@RequestParam String indexNames) {
- return R.status(elasticsearchDocumentService.removeBatchByIndexNames(Func.toStrList(indexNames)));
- }
-
- /**
- * 根据条件删除
- */
- @PostMapping("/removeByQuery")
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
- @ApiOperationSupport(order = 6)
- public R removeByQuery(EsParam esParam) {
- return R.status(elasticsearchDocumentService.removeByQuery(esParam));
- }
-}
diff --git a/src/main/java/org/springblade/es/service/ElasticsearchDocumentService.java b/src/main/java/org/springblade/es/service/ElasticsearchDocumentService.java
deleted file mode 100644
index 3298b5a..0000000
--- a/src/main/java/org/springblade/es/service/ElasticsearchDocumentService.java
+++ /dev/null
@@ -1,748 +0,0 @@
-package org.springblade.es.service;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.logging.log4j.util.Strings;
-import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
-import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
-import org.elasticsearch.action.bulk.BulkRequest;
-import org.elasticsearch.action.bulk.BulkResponse;
-import org.elasticsearch.action.index.IndexRequest;
-import org.elasticsearch.action.index.IndexResponse;
-import org.elasticsearch.action.search.SearchRequest;
-import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.action.support.master.AcknowledgedResponse;
-import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.client.RestHighLevelClient;
-import org.elasticsearch.client.indices.GetIndexRequest;
-import org.elasticsearch.index.query.BoolQueryBuilder;
-import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.index.reindex.*;
-import org.elasticsearch.script.ScriptType;
-import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.search.SearchHits;
-import org.elasticsearch.search.builder.SearchSourceBuilder;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.constant.EsTableConstant;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.es.vo.EsParam;
-import org.springblade.modules.article.entity.Article;
-import org.springblade.modules.article.service.ArticleService;
-import org.springblade.modules.grid.service.IGridRangeService;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IHouseService;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.vo.HouseVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Service;
-import org.elasticsearch.script.Script;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class ElasticsearchDocumentService<T> {
-
- @Autowired
- private RestHighLevelClient client;
-
- @Autowired
- private ArticleService articleService;
-
- @Autowired
- private IPlaceService placeService;
-
- @Autowired
- private IHouseService houseService;
-
- @Autowired
- private IHouseholdService householdService;
-
- @Autowired
- private IGridRangeService gridRangeService;
-
- @Value("${elasticsearch.sync}")
- private boolean elasticsearchSync;
-
- @Value("${elasticsearch.indexName}")
- private String indexName;
-
- /**
- * 检查索引是否已存在
- *
- * @param indexName
- * @return
- */
- public boolean isIndexExists(String indexName) {
- // 检查索引是否已存在
- GetIndexRequest request = new GetIndexRequest(indexName);
- try {
- return client.indices().exists(request, RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return false;
- }
-
- /**
- * 初始化数据
- *
- * @param esParam
- * @return
- */
- public boolean init(EsParam esParam) {
- if (!Strings.isBlank(esParam.getTableName())) {
- if (esParam.getTableName().equals("jczz_place")) {
- // 场所
- initPlace(esParam);
- }
- if (esParam.getTableName().equals("jczz_article")) {
- // 通知文章
- initArticle(esParam);
- }
- if (esParam.getTableName().equals("jczz_house")) {
- // 房屋
- initHouse(esParam);
- }
- if (esParam.getTableName().equals("jczz_household")) {
- // 住户
- initHousehold(esParam);
- }
- }
- // 返回
- return true;
- }
-
- /**
- * 初始化数据
- *
- * @param esParam
- * @return
- */
- public boolean initPlace(EsParam esParam) {
- // 查询
- int total = placeService.getAllListTotal();
- int size = 1000;
- int num = total / size;
- for (int i = 1; i <= num + 1; i++) {
- List<PlaceVO> placeVOList = placeService.getAllList((i - 1) * size, size);
- // 遍历
- if (placeVOList.size() > 0) {
- // 创建批量请求对象
- BulkRequest bulkRequest = new BulkRequest();
- for (PlaceVO place : placeVOList) {
- // 入es库
- // 初始化Elasticsearch客户端
- IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
- // 不设置id
- // indexRequest.id("1");
- indexRequest.source(
- "tableId", place.getId().toString(),
- "tableName", "jczz_place",
- "title", place.getPlaceName(),
- "name", place.getPrincipal(),
- "phone", place.getPrincipalPhone(),
- "idCard", place.getPrincipalIdCard(),
- "content", place.getLocation(),
- "communityCode", place.getCommunityCode()
- );
- // 加入集合
- bulkRequest.add(indexRequest);
- }
- BulkResponse bulkResponse = null;
- try {
- // 执行批量插入
- bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
- }
- }
- // 返回
- return true;
- }
-
- /**
- * 初始化公告数据
- *
- * @param esParam
- * @return
- */
- public boolean initArticle(EsParam esParam) {
- // 查询
- int total = articleService.getAllListTotal();
- int size = 10;
- int num = total / size;
- for (int i = 1; i <= num + 1; i++) {
- // 查询
- List<Article> articleList = articleService.getAllList((i - 1) * size, size);
- // 遍历
- if (articleList.size() > 0) {
- BulkRequest bulkRequest = new BulkRequest();
- for (Article article : articleList) {
- // 初始化Elasticsearch客户端
- IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
- String communityNameListString
- = SysCache.getAllCommunityNameListString(article.getArticleRange(),article.getId().toString());
- Map<String, Object> map = new HashMap<>(1);
- map.put("communityCode",communityNameListString);
- String toString = new JSONObject(map).toString();
- // 不设置id
- // indexRequest.id("1");
- indexRequest.source("tableId", article.getId().toString(),
- "tableName", "jczz_article",
- "title", article.getTitle(),
- "communityCode", toString,
- "type", null != article.getType() ? article.getType().toString() : "",
- "content", article.getContent(),
- "articleType", article.getArticleType());
- // 加入集合
- bulkRequest.add(indexRequest);
- }
- BulkResponse bulkResponse = null;
- try {
- // 执行批量插入
- bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
- }
- }
- // 返回
- return true;
- }
-
- /**
- * 初始化住户数据
- *
- * @param esParam
- * @return
- */
- public boolean initHousehold(EsParam esParam) {
- // 查询
- int total = householdService.getAllListTotal();
- int size = 1000;
- int num = total / size;
- for (int i = 1; i <= num + 1; i++) {
- // 查询
- List<HouseholdVO> householdVOList = householdService.getAllList((i - 1) * size, size);
- // 遍历
- if (householdVOList.size() > 0) {
- BulkRequest bulkRequest = new BulkRequest();
- for (HouseholdVO household : householdVOList) {
- // 初始化Elasticsearch客户端
- IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
- // 不设置id
- // indexRequest.id("1");
- indexRequest.source(
- "tableId", household.getId().toString(),
- "tableName", "jczz_household",
- "title", household.getName(),
- "name", household.getName(),
- "phone", household.getPhoneNumber(),
- "idCard", household.getIdCard(),
- "content", household.getAddress(),
- "communityCode", household.getCommunityCode()
- );
- // 加入集合
- bulkRequest.add(indexRequest);
- }
- BulkResponse bulkResponse = null;
- try {
- // 执行批量插入
- bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
- }
- }
- // 返回
- return true;
- }
-
- /**
- * 初始化房屋数据
- *
- * @param esParam
- * @return
- */
- public boolean initHouse(EsParam esParam) {
- // 查询
- int total = houseService.getAllListTotal();
- int size = 1000;
- int num = total / size;
- for (int i = 1; i <= num + 1; i++) {
- // 查询
- List<HouseVO> houseVOList = houseService.getAllList((i - 1) * size, size);
- // 遍历
- if (houseVOList.size() > 0) {
- BulkRequest bulkRequest = new BulkRequest();
- for (HouseVO house : houseVOList) {
- // 初始化Elasticsearch客户端
- IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
- // 不设置id
- // indexRequest.id("1");
- indexRequest.source(
- "tableId", house.getId().toString(),
- "tableName", "jczz_house",
- "title", house.getHouseName(),
- "name", null,
- "phone", null,
- "idCard", null,
- "content", null,
- "communityCode", house.getCommunityCode()
- );
- // 加入集合
- bulkRequest.add(indexRequest);
- }
- BulkResponse bulkResponse = null;
- try {
- // 执行批量插入
- bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
- }
- }
- // 返回
- return true;
- }
-
- /**
- * 新增公告同步
- *
- * @param esParam
- * @param article
- */
- @Async
- public void addArticle(EsParam esParam, Article article) {
- if (elasticsearchSync) {
- // 查询当前文章范围对应的社区名称字符串集合
- String communityNameListString = SysCache.getAllCommunityNameListString(article.getArticleRange(),article.getId().toString());
- Map<String, Object> map = new HashMap<>(1);
- map.put("communityCode",communityNameListString);
- String toString = new JSONObject(map).toString();
- try {
- indexDocument(esParam.getIndexName(),
- "tableId", article.getId().toString(),
- "tableName", "jczz_article",
- "title", article.getTitle(),
- "communityCode", toString,
- "type", null != article.getType() ? article.getType().toString() : "",
- "content", article.getContent(),
- "articleType", article.getArticleType()
- );
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 新增场所同步
- *
- * @param esParam
- * @param place
- */
- @Async
- public void addPlace(EsParam esParam, PlaceEntity place) {
- if (elasticsearchSync) {
- try {
- indexDocument(esParam.getIndexName(),
- "tableId", place.getId().toString(),
- "tableName", "jczz_place",
- "title", place.getPlaceName(),
- "name", place.getPrincipal(),
- "phone", place.getPrincipalPhone(),
- "idCard", place.getPrincipalIdCard(),
- "content", place.getLocation(),
- "communityCode", placeService.getCommunityCode(place.getId())
- );
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 新增房屋同步
- *
- * @param esParam
- * @param house
- */
- @Async
- public void addHouse(EsParam esParam, HouseEntity house) {
- if (elasticsearchSync) {
- try {
- indexDocument(esParam.getIndexName(),
- "tableId", house.getId().toString(),
- "tableName", "jczz_house",
- "title", house.getHouseName(),
- "name", null,
- "phone", null,
- "idCard", null,
- "content", null,
- "communityCode", houseService.getCommunityCode(house.getId())
- );
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 新增住户同步
- *
- * @param esParam
- * @param household
- */
- @Async
- public void addHousehold(EsParam esParam, HouseholdEntity household) {
- if (elasticsearchSync) {
- try {
- indexDocument(esParam.getIndexName(),
- "tableId", household.getId().toString(),
- "tableName", "jczz_household",
- "title", household.getName(),
- "name", household.getName(),
- "phone", household.getPhoneNumber(),
- "idCard", household.getIdCard(),
- "content", household.getCurrentAddress(),
- "communityCode", householdService.getCommunityCode(household.getId())
- );
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 插入数据到es
- *
- * @param index
- * @param values
- * @throws IOException
- */
- public void indexDocument(String index, String... values) throws IOException {
- // 初始化Elasticsearch客户端
- IndexRequest indexRequest = new IndexRequest(index);
-
- // 不设置id
-// indexRequest.id("1");
- indexRequest.source(values);
-
- IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT);
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest(index), RequestOptions.DEFAULT);
- System.out.println("Indexed document with id: " + indexResponse.getId());
-
- }
-
- /**
- * 查询数据
- *
- * @param page
- * @param esParam
- * @return
- */
- public Object selectDocumentPage(IPage<Object> page, EsParam esParam) {
- if (Strings.isBlank(esParam.getIndexName())){
- esParam.setIndexName(indexName);
- }
- // 判断索引是否存在
- if (isIndexExists(esParam.getIndexName())) {
- // 全文搜索
- SearchRequest searchRequest = new SearchRequest(esParam.getIndexName());
- SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
- // searchSourceBuilder.query(QueryBuilders.multiMatchQuery(esParam.getSearchKey(),
- // "content",
- // "name",
- // "title",
- // "location",
- // "phone",
- // "idCard",
- // "communityCode")
- // .type(MultiMatchQueryBuilder.Type.BEST_FIELDS)
- // );
- BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
-// boolQueryBuilder.should(QueryBuilders.matchQuery("content", esParam.getSearchKey()));
-// boolQueryBuilder.should(QueryBuilders.matchQuery("name", esParam.getSearchKey()));
- boolQueryBuilder.should(QueryBuilders.matchPhraseQuery("title", esParam.getSearchKey()));
-// boolQueryBuilder.should(QueryBuilders.matchQuery("location", esParam.getSearchKey()));
-// boolQueryBuilder.should(QueryBuilders.matchQuery("phone", esParam.getSearchKey()));
-// boolQueryBuilder.should(QueryBuilders.matchQuery("idCard", esParam.getSearchKey()));
- if (!Strings.isBlank(esParam.getTableName())) {
- boolQueryBuilder.must(QueryBuilders.matchQuery("tableName", esParam.getTableName()));
- }
- String roleName = SpringUtils.getRequestParam("roleName");
- String communityCode = SpringUtils.getRequestParam("communityCode");
- if (!Strings.isBlank(communityCode)) {
- if (!Strings.isBlank(roleName) && roleName.equals("inhabitant") && !Strings.isBlank(esParam.getHouseCode())){
- // 居民根据房屋对应的小区过滤
- boolQueryBuilder.must(QueryBuilders.matchPhraseQuery("communityCode",gridRangeService.getDistrictIdByHouseCode(esParam.getHouseCode())));
- }else {
- // 设置查询社区名称,编号有多个,数字类型目前无法匹配到
- boolQueryBuilder.must(QueryBuilders.matchPhraseQuery("communityCode", communityCode));
- }
- }
- if (!Strings.isBlank(roleName)){
- if (roleName.equals("wgy") || roleName.equals("mj")){
- // 不查公告
- boolQueryBuilder.mustNot(QueryBuilders.matchQuery("tableName", "jczz_article"));
- }
- if (roleName.equals("inhabitant")){
- // 只查公告
- boolQueryBuilder.must(QueryBuilders.matchQuery("tableName", "jczz_article"));
- }
- if (roleName.equals("wzcj")){
- // 只查场所
- boolQueryBuilder.must(QueryBuilders.matchQuery("tableName", "jczz_place"));
- }
- }
-
- boolQueryBuilder.minimumShouldMatch(1);
- searchSourceBuilder.query(boolQueryBuilder);
-
- int current = (int) page.getCurrent();
- int size = (int) page.getSize();
- //设置分页
- searchSourceBuilder.size(size);
- searchSourceBuilder.from((current - 1) * size);
-
- //将搜索资源对象设置到搜索客户端中
- searchRequest.source(searchSourceBuilder);
- //查询
- SearchResponse searchResponse = null;
- try {
- searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- //解析搜索返回值
- SearchHits searchHits = searchResponse.getHits();
- //查询的总数
- long count = searchHits.getTotalHits().value;
- List<Object> list = new ArrayList<>();
- for (SearchHit hit : searchHits) {
-// System.out.println("hit.getId() = " + hit.getId());
- Map<String, Object> result = hit.getSourceAsMap();
- if (null != result){
- if (result.get("tableName").toString().equals("jczz_article")){
- result.put("typeName","通知公告");
- }
- if (result.get("tableName").toString().equals("jczz_place")){
- result.put("typeName","经营场所");
- }
- if (result.get("tableName").toString().equals("jczz_house")){
- result.put("typeName","房屋");
- }
- if (result.get("tableName").toString().equals("jczz_household")){
- result.put("typeName","住户");
- }
- }
- // 文档源数据
-// String source = hit.getSourceAsString();
- list.add(result);
- }
- page.setRecords(list);
- page.setTotal(count);
- }
- return page;
- }
-
- /**
- * 根据索引删除
- */
- public boolean removeBatchByIndexNames(List<String> indexNames) {
- for (String indexName : indexNames) {
- // 索引存在才删除
- if (isIndexExists(indexName)) {
- DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest(indexName);
- try {
- // 执行删除索引操作
- AcknowledgedResponse deleteResponse = client.indices().delete(deleteIndexRequest, RequestOptions.DEFAULT);
-
- // 输出操作结果
- boolean acknowledged = deleteResponse.isAcknowledged();
- System.out.println("索引删除成功: " + acknowledged);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- return true;
- }
-
- /**
- * 新增数据--有问题,待调整
- */
- @Async
- public boolean add(EsParam esParam, T item) {
- String str = "tableName," + esParam.getTableName() + ",";
- CommonParamSet commonParamSet =
- new CommonParamSet().setFieldValue(item.getClass(), item, EsTableConstant.articleList, str);
- try {
- indexDocument(esParam.getIndexName(), str);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return true;
- }
-
-
- /**
- * 修改数据
- */
- @Async
- public void update(EsParam esParam, T item,List<String> columnList) {
- // 判断索引是否存在
- if (elasticsearchSync && isIndexExists(esParam.getIndexName())) {
- // 创建更新请求
- UpdateByQueryRequest updateRequest = new UpdateByQueryRequest(esParam.getIndexName());
-
- // 设置查询条件,例如:更新所有字段text包含"old text"的文档
- updateRequest.setQuery(
- QueryBuilders.boolQuery()
- .must(QueryBuilders.matchQuery("tableId", esParam.getTableId()))
- .must(QueryBuilders.matchQuery("tableName", esParam.getTableName()))
- );
-
- Map<String, Object> data = new HashMap<String, Object>();
- data.put("tableName", esParam.getTableName());
- if (esParam.getTableName().equals("jczz_article")) {
- setArticleMap((Article) item, data);
- }
- if (esParam.getTableName().equals("jczz_place")) {
- setPlaceMap((PlaceEntity) item, data);
- }
- if (esParam.getTableName().equals("jczz_house")) {
- setHouseMap((HouseEntity) item, data);
- }
- if (esParam.getTableName().equals("jczz_household")) {
- setHousehouldMap((HouseholdEntity) item, data);
- }
- Map<String, Object> param = new HashMap<String, Object>();
- param.put("data", data);
-
- // script will read data param value and assign to document source
- String source = "ctx._source=params.data";
- Script script = new Script(ScriptType.INLINE, "painless", source, param);
- updateRequest.setScript(script);
- // 执行更新操作
- try {
- client.updateByQuery(updateRequest, RequestOptions.DEFAULT);
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 设置公告map
- * @param item
- * @param data
- */
- private void setArticleMap(Article item, Map<String, Object> data) {
- // 查询当前文章范围对应的社区名称字符串集合
- String communityNameListString = SysCache.getAllCommunityNameListString(item.getArticleRange(),item.getId().toString());
- Map<String, Object> map = new HashMap<>(1);
- map.put("communityCode",communityNameListString);
- String toString = new JSONObject(map).toString();
- data.put("tableId",item.getId());
- data.put("title",item.getTitle());
- data.put("type",item.getType());
- data.put("content",item.getContent());
- data.put("articleType",item.getArticleType());
- data.put("communityCode",toString);
- }
- /**
- * 设置场所map
- * @param item
- * @param data
- */
- private void setPlaceMap(PlaceEntity item, Map<String, Object> data) {
- data.put("communityCode",placeService.getCommunityCode(item.getId()));
- data.put("tableId",item.getId());
- data.put("title",item.getPlaceName());
- data.put("name",item.getPrincipal());
- data.put("phone",item.getPrincipalPhone());
- data.put("idCard",item.getPrincipalIdCard());
- data.put("content",item.getLocation());
- }
- /**
- * 设置房屋map
- * @param item
- * @param data
- */
- private void setHouseMap(HouseEntity item, Map<String, Object> data) {
- data.put("communityCode",houseService.getCommunityCode(item.getId()));
- data.put("tableId",item.getId());
- data.put("title",item.getHouseName());
- }
- /**
- * 设置住户map
- * @param item
- * @param data
- */
- private void setHousehouldMap(HouseholdEntity item, Map<String, Object> data) {
- data.put("communityCode",householdService.getCommunityCode(item.getId()));
- data.put("tableId",item.getId());
- data.put("title",item.getName());
- data.put("name",item.getName());
- data.put("phone",item.getPhoneNumber());
- data.put("idCard",item.getIdCard());
- data.put("content",item.getCurrentAddress());
- }
-
- /**
- * 删除数据--根据条件
- */
- public boolean removeByQuery(EsParam esParam) {
- if (elasticsearchSync && isIndexExists(esParam.getIndexName())) {
- DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(esParam.getIndexName());
- // 根据多个条件 生成 boolQueryBuilder
- BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
- if (!Strings.isBlank(esParam.getTableId())){
- boolQueryBuilder
- .must(QueryBuilders.matchQuery("tableId", esParam.getTableId()));
- }
- if (!Strings.isBlank(esParam.getTableName())) {
- boolQueryBuilder
- .must(QueryBuilders.matchQuery("tableName", esParam.getTableName()));
- }
- deleteByQueryRequest.setQuery(boolQueryBuilder);
- try {
- BulkByScrollResponse bulkResponse =
- client.deleteByQuery(deleteByQueryRequest, RequestOptions.DEFAULT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return true;
- }
-}
diff --git a/src/main/java/org/springblade/es/service/ElasticsearchIndexInitializer.java b/src/main/java/org/springblade/es/service/ElasticsearchIndexInitializer.java
deleted file mode 100644
index dc3b490..0000000
--- a/src/main/java/org/springblade/es/service/ElasticsearchIndexInitializer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.springblade.es.service;
-
-import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.client.RestHighLevelClient;
-import org.elasticsearch.client.indices.CreateIndexRequest;
-import org.elasticsearch.client.indices.GetIndexRequest;
-import org.elasticsearch.xcontent.XContentType;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class ElasticsearchIndexInitializer {
-
- @Autowired
- private RestHighLevelClient client;
-
- public void initializeIndex(String indexName, String mappingJson) {
- try {
- // 检查索引是否已存在
- GetIndexRequest request = new GetIndexRequest(indexName);
- boolean indexExists = client.indices().exists(request, RequestOptions.DEFAULT);
-
- // 如果索引不存在,则创建索引并设置映射
- if (!indexExists) {
- CreateIndexRequest createIndexRequest = new CreateIndexRequest(indexName);
- createIndexRequest.mapping(mappingJson, XContentType.JSON);
- client.indices().create(createIndexRequest, RequestOptions.DEFAULT);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/src/main/java/org/springblade/es/service/ElasticsearchIndexService.java b/src/main/java/org/springblade/es/service/ElasticsearchIndexService.java
deleted file mode 100644
index 1ab0b3f..0000000
--- a/src/main/java/org/springblade/es/service/ElasticsearchIndexService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.springblade.es.service;
-
-import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
-import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
-import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.client.RestHighLevelClient;
-import org.elasticsearch.xcontent.XContentBuilder;
-import org.elasticsearch.xcontent.json.JsonXContent;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-
-@Service
-public class ElasticsearchIndexService {
-
- @Autowired
- private RestHighLevelClient client;
-
- public void createIndex() throws IOException {
- CreateIndexRequest request = new CreateIndexRequest("your_index");
-
- XContentBuilder builder = JsonXContent.contentBuilder()
- .startObject()
- .startObject("properties")
- .startObject("field1").field("type", "text").endObject()
- .startObject("field2").field("type", "text").endObject()
- // ... 定义其他字段
- .endObject()
- .endObject();
-
- request.mapping("_doc", builder);
- CreateIndexResponse createIndexResponse = client.indices().create(request, RequestOptions.DEFAULT);
- boolean acknowledged = createIndexResponse.isAcknowledged();
- System.out.println(acknowledged);
- }
-}
diff --git a/src/main/java/org/springblade/es/service/ElasticsearchSearchService.java b/src/main/java/org/springblade/es/service/ElasticsearchSearchService.java
deleted file mode 100644
index 63a0ec2..0000000
--- a/src/main/java/org/springblade/es/service/ElasticsearchSearchService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.springblade.es.service;
-
-import org.elasticsearch.action.search.SearchRequest;
-import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.client.RestHighLevelClient;
-import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.search.builder.SearchSourceBuilder;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-
-@Service
-public class ElasticsearchSearchService {
-
- @Autowired
- private RestHighLevelClient client;
-
- public SearchResponse search(String index, String query) throws IOException {
- SearchRequest searchRequest = new SearchRequest(index);
- SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
- searchSourceBuilder.query(QueryBuilders.matchQuery("field1", query)); // 搜索field1字段
- searchSourceBuilder.query(QueryBuilders.matchQuery("field2", query)); // 搜索field2字段
- searchRequest.source(searchSourceBuilder);
-
- return client.search(searchRequest, RequestOptions.DEFAULT);
- }
-}
diff --git a/src/main/java/org/springblade/es/test/ElasticSearchExample.java b/src/main/java/org/springblade/es/test/ElasticSearchExample.java
deleted file mode 100644
index 7919835..0000000
--- a/src/main/java/org/springblade/es/test/ElasticSearchExample.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.springblade.es.test;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpHost;
-import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
-import org.elasticsearch.client.RestHighLevelClient;
-import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.client.RestClient;
-import org.elasticsearch.client.RestClientBuilder;
-import org.elasticsearch.action.index.IndexRequest;
-import org.elasticsearch.action.index.IndexResponse;
-import org.elasticsearch.action.search.SearchRequest;
-import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.search.builder.SearchSourceBuilder;
-import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.search.SearchHits;
-
-import java.io.IOException;
-import java.util.Map;
-
-public class ElasticSearchExample {
-
- public static void main(String[] args) throws IOException {
- // 初始化Elasticsearch客户端
- RestClientBuilder builder = RestClient.builder(new HttpHost("localhost", 9200, "http"));
- RestHighLevelClient client = new RestHighLevelClient(builder);
-
- // 索引用户数据
- IndexRequest userIndexRequest = new IndexRequest("users_articles");
- userIndexRequest.source("name", "John Doe", "type", "user");
- IndexResponse userIndexResponse = client.index(userIndexRequest, RequestOptions.DEFAULT);
-
- // 索引文章数据
- IndexRequest articleIndexRequest = new IndexRequest("users_articles");
- articleIndexRequest.source("title", "Elasticsearch Introduction", "type", "article");
- IndexResponse articleIndexResponse = client.index(articleIndexRequest, RequestOptions.DEFAULT);
-
- // 刷新索引,确保文档可搜索
- client.indices().refresh(new RefreshRequest("users_articles"), RequestOptions.DEFAULT);
-
- // 全文搜索
- SearchRequest searchRequest = new SearchRequest("users_articles");
- SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
- searchSourceBuilder.query(QueryBuilders.multiMatchQuery("Elasticsearch", "name", "title"));
-
- //设置分页
- searchSourceBuilder.size(10);
- searchSourceBuilder.from(0);
-
- //将搜索资源对象设置到搜索客户端中
- searchRequest.source(searchSourceBuilder);
- //查询
- SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
- //解析搜索返回值
- SearchHits searchHits = searchResponse.getHits();
- //查询的总数
- long count = searchHits.getTotalHits().value;
-
- for (SearchHit hit : searchHits) {
- Map<String, Object> result = hit.getSourceAsMap();
- // 根据类型处理结果
- String type = (String) result.get("type");
- if ("user".equals(type)) {
- // 处理用户名
- String name = (String) result.get("name");
- System.out.println("User: " + name);
- } else if ("article".equals(type)) {
- // 处理文章标题
- String title = (String) result.get("title");
- System.out.println("Article: " + title);
- }
- }
-
- // 关闭客户端
- client.close();
- }
-
- /**
- * 设置高亮
- * @param keywords
- * @param info
- * @return
- */
- public static String setHighLight(String keywords, String info) {
- if (StringUtils.isBlank(keywords)|| StringUtils.isBlank(info)) {
- return info;
- }
- String[] keywordArray = keywords.split(" ");
- String newInfo = info;
- for (String keyword : keywordArray) {
- newInfo = newInfo.replace(keyword, "<em style=\"color:red\">" + keyword + "</em>");
- }
- return newInfo;
- }
-}
diff --git a/src/main/java/org/springblade/es/vo/EsParam.java b/src/main/java/org/springblade/es/vo/EsParam.java
deleted file mode 100644
index daa4f81..0000000
--- a/src/main/java/org/springblade/es/vo/EsParam.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.springblade.es.vo;
-
-import lombok.Data;
-
-@Data
-public class EsParam {
-
- /**
- * 索引名称
- */
- private String indexName;
-
- /**
- * 表名称
- */
- private String tableName;
-
- /**
- * searchKey
- */
- private String searchKey;
-
- /**
- * 表id
- */
- private String tableId;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 地址编码
- */
- private String houseCode;
-}
diff --git a/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java b/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java
index fbd407d..7b5a2ab 100644
--- a/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java
+++ b/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java
@@ -1,27 +1,8 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
package org.springblade.flow.business.service.impl;
-import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
@@ -29,7 +10,6 @@
import org.flowable.task.api.TaskQuery;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
-import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
@@ -42,16 +22,10 @@
import org.springblade.flow.engine.constant.FlowEngineConstant;
import org.springblade.flow.engine.entity.FlowProcess;
import org.springblade.flow.engine.utils.FlowCache;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.service.IPropertyCapitalApplyService;
import org.springframework.stereotype.Service;
-
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.stream.Collectors;
/**
* 流程业务实现类
@@ -256,20 +230,6 @@
// flow.setLinkPhone(capitalApplyEntity.getLinkPhone());
// }
- IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class);
- PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, historicTaskInstance.getProcessInstanceId()));
- if (capitalApplyEntity != null) {
- flow.setName(capitalApplyEntity.getName());
- flow.setDistrictId(capitalApplyEntity.getDistrictId());
- IDistrictService bean1 = SpringUtils.getBean(IDistrictService.class);
- DistrictEntity one = bean1.getOne(Wrappers.<DistrictEntity>lambdaQuery().eq(DistrictEntity::getId, capitalApplyEntity.getDistrictId()));
- if (one != null) {
- flow.setDistrictName(one.getName());
- }
- flow.setLinkman(capitalApplyEntity.getLinkman());
- flow.setLinkPhone(capitalApplyEntity.getLinkPhone());
- }
-
flow.setStatus(FlowEngineConstant.STATUS_FINISH);
// flowList.add(flow);
Boolean districtNameFlag = true;
@@ -364,19 +324,6 @@
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
flow.setBusinessTable(businessKey[0]);
flow.setBusinessId(businessKey[1]);
- }
- IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class);
- PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, task.getProcessInstanceId()));
- if (capitalApplyEntity != null) {
- flow.setName(capitalApplyEntity.getName());
- flow.setDistrictId(capitalApplyEntity.getDistrictId());
- IDistrictService bean1 = SpringUtils.getBean(IDistrictService.class);
- DistrictEntity one = bean1.getOne(Wrappers.<DistrictEntity>lambdaQuery().eq(DistrictEntity::getId, capitalApplyEntity.getDistrictId()));
- if (one != null) {
- flow.setDistrictName(one.getName());
- }
- flow.setLinkman(capitalApplyEntity.getLinkman());
- flow.setLinkPhone(capitalApplyEntity.getLinkPhone());
}
FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId());
diff --git a/src/main/java/org/springblade/flow/listener/MyExecutionListener.java b/src/main/java/org/springblade/flow/listener/MyExecutionListener.java
deleted file mode 100644
index 595a03b..0000000
--- a/src/main/java/org/springblade/flow/listener/MyExecutionListener.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.springblade.flow.listener;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.flowable.engine.delegate.DelegateExecution;
-import org.flowable.engine.delegate.ExecutionListener;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.service.IPropertyCapitalApplyService;
-
-public class MyExecutionListener implements ExecutionListener {
-
- @Override
- public void notify(DelegateExecution delegateExecution) {
- System.out.println("***************************DelegateExecution");
- IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class);
- PropertyCapitalApplyEntity applyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, delegateExecution.getProcessInstanceId()));
- if (applyEntity == null) {
- return;
- }
- if (delegateExecution.getCurrentActivityId().equals("ownersCommittee1")) {
- applyEntity.setApplyStatus(1);
- } else if (delegateExecution.getCurrentActivityId().equals("ownersCommitteePass")) {
- applyEntity.setApplyStatus(2);
- } else if (delegateExecution.getCurrentActivityId().equals("streePass")) {
- applyEntity.setApplyStatus(3);
- } else if (delegateExecution.getCurrentActivityId().equals("apply")) {
- applyEntity.setApplyStatus(4);
- } else if (delegateExecution.getCurrentActivityId().equals("constructionPass")) {
- applyEntity.setApplyStatus(7);
- } else if (delegateExecution.getCurrentActivityId().equals("applyNotPass")) {
- applyEntity.setApplyStatus(6);
- } else if (delegateExecution.getCurrentActivityId().equals("ownersCommitteeFlag0")) {
- applyEntity.setApplyStatus(2);
- } else if (delegateExecution.getCurrentActivityId().equals("srConstructionPass")) {
- applyEntity.setApplyStatus(5);
- }
- bean.updateById(applyEntity);
- }
-}
diff --git a/src/main/java/org/springblade/flow/listener/MyTaskListener.java b/src/main/java/org/springblade/flow/listener/MyTaskListener.java
deleted file mode 100644
index 4aef0cb..0000000
--- a/src/main/java/org/springblade/flow/listener/MyTaskListener.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.springblade.flow.listener;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.flowable.engine.delegate.TaskListener;
-import org.flowable.task.service.delegate.DelegateTask;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.service.IPropertyCapitalApplyService;
-
-public class MyTaskListener implements TaskListener {
- /**
- * 监听器触发的回调方法
- *
- * @param delegateTask
- */
- @Override
- public void notify(DelegateTask delegateTask) {
- System.out.println("---->自定义的监听器执行了");
- if (EVENTNAME_CREATE.equals(delegateTask.getEventName())) {
- // 表示是Task的创建事件被触发了
- // 指定当前Task节点的处理人
- System.out.println("***************************delegateTask");
- IPropertyCapitalApplyService propertyCapitalApplyService = SpringUtils.getBean(IPropertyCapitalApplyService.class);
- PropertyCapitalApplyEntity applyEntity = propertyCapitalApplyService.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery()
- .eq(PropertyCapitalApplyEntity::getProcessInstanceId, delegateTask.getProcessInstanceId()));
- applyEntity.setTaskId(delegateTask.getId());
- propertyCapitalApplyService.updateById(applyEntity);
- // IUserService user = SpringUtils.getBean(IUserService.class);
- // IDistrictService district = SpringUtils.getBean(IDistrictService.class);
- // IRegionService region = SpringUtils.getBean(IRegionService.class);
- // IDeptService dept = SpringUtils.getBean(IDeptService.class);
- // DistrictEntity one1 = district.getOne(Wrappers.<DistrictEntity>lambdaQuery()
- // .eq(DistrictEntity::getId, applyEntity.getDistrictId()));
- // if (delegateTask.getName().equals("街道")) {
- // Region one2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 9)));
- // Dept one3 = dept.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, one2.getName()));
- // User one4 = user.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, one3.getId()).last("limit 1"));
- // delegateTask.setAssignee(TaskUtil.getTaskUser(one4.getId().toString()));
- // } else if (delegateTask.getName().equals("住建局")) {
- // // 查询住建局负责人
- // Region region2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 6)));
- // Dept dept3 = dept.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, region2.getName() + "住建局").last("limit 1"));
- // User user4 = user.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, dept3.getId()).last("limit 1"));
- // delegateTask.setAssignee(TaskUtil.getTaskUser(user4.getId().toString()));
- // }
- System.out.println("---->自定义的监听器执行了EVENTNAME_CREATE");
- }
- if (EVENTNAME_COMPLETE.equals(delegateTask.getEventName())) {
- // 表示是Task的完成事件被触发了
- // 指定当前Task节点的处理人
- // delegateTask.setAssignee("boge666");
- System.out.println("---->自定义的监听器执行了EVENTNAME_COMPLETE");
- }
- if (EVENTNAME_DELETE.equals(delegateTask.getEventName())) {
- // 表示是Task的删除事件被触发了
- // 指定当前Task节点的处理人
- // delegateTask.setAssignee("boge666");}
- System.out.println("---->自定义的监听器执行了EVENTNAME_DELETE");
- }
- if (EVENTNAME_ASSIGNMENT.equals(delegateTask.getEventName())) {
- // 表示是Task的分配事件被触发了
- System.out.println("---->自定义的监听器执行了EVENTNAME_ASSIGNMENT");
- }
-
- }
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/controller/AnswerRecordController.java b/src/main/java/org/springblade/modules/answerRecord/controller/AnswerRecordController.java
deleted file mode 100644
index 5f6af89..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/controller/AnswerRecordController.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-import org.springblade.modules.answerRecord.service.IAnswerRecordService;
-import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
-import org.springblade.modules.answerRecord.wrapper.AnswerRecordWrapper;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 答题记录表 控制器
- *
- * @author BladeX
- * @since 2024-01-17
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-answerRecord/answerRecord")
-@Api(value = "答题记录表", tags = "答题记录表接口")
-public class AnswerRecordController extends BladeController {
-
- private final IAnswerRecordService answerRecordService;
-
- /**
- * 答题记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入answerRecord")
- public R<AnswerRecordVO> detail(AnswerRecordEntity answerRecord) {
- AnswerRecordEntity detail = answerRecordService.getOne(Condition.getQueryWrapper(answerRecord));
- return R.data(AnswerRecordWrapper.build().entityVO(detail));
- }
-
- /**
- * 答题记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入answerRecord")
- public R<IPage<AnswerRecordVO>> list(AnswerRecordEntity answerRecord, Query query) {
- IPage<AnswerRecordEntity> pages = answerRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(answerRecord));
- return R.data(AnswerRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 答题记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入answerRecord")
- public R<IPage<AnswerRecordVO>> page(AnswerRecordVO answerRecord, Query query) {
- IPage<AnswerRecordVO> pages = answerRecordService.selectAnswerRecordPage(Condition.getPage(query), answerRecord);
- return R.data(pages);
- }
-
- /**
- * 答题记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入answerRecord")
- public R save(@Valid @RequestBody AnswerRecordEntity answerRecord) {
- return R.status(answerRecordService.save(answerRecord));
- }
-
- /**
- * 答题记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入answerRecord")
- public R update(@Valid @RequestBody AnswerRecordEntity answerRecord) {
- return R.status(answerRecordService.updateById(answerRecord));
- }
-
- /**
- * 答题记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入answerRecord")
- public R submit(@Valid @RequestBody List<SubjectChoicesVO> subjectChoicesList) {
- return R.status(answerRecordService.saveAnswer(subjectChoicesList));
- }
-
- /**
- * 答题记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(answerRecordService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/dto/AnswerRecordDTO.java b/src/main/java/org/springblade/modules/answerRecord/dto/AnswerRecordDTO.java
deleted file mode 100644
index 6fecd30..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/dto/AnswerRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-
-/**
- * 答题记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-17
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class AnswerRecordDTO extends AnswerRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/entity/AnswerRecordEntity.java b/src/main/java/org/springblade/modules/answerRecord/entity/AnswerRecordEntity.java
deleted file mode 100644
index 81c1c09..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/entity/AnswerRecordEntity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 答题记录表 实体类
- *
- * @author BladeX
- * @since 2024-01-17
- */
-@Data
-@TableName("jczz_answer_record")
-@ApiModel(value = "AnswerRecord对象", description = "答题记录表")
-public class AnswerRecordEntity {
- private static final long serialVersionUID = 1L;
-
-
- /**
- * 主键id
- */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 题目id
- */
- @ApiModelProperty(value = "题目id", example = "")
- @TableField("subject_choices_id")
- private Long subjectChoicesId;
-
- /**
- * 题目类型 0:单选题 1:多选题 2:判断题 3:填空题(排序填空)
- */
- @ApiModelProperty(value = "题目类型 0:单选题 1:多选题 2:判断题 3:填空题(排序填空)", example = "")
- @TableField("subject_choices_type")
- private Integer subjectChoicesType;
-
- /**
- * 选项id
- */
- @ApiModelProperty(value = "选项id", example = "")
- @TableField("subject_option_id")
- private Long subjectOptionId;
-
- /**
- * 提交的选项id
- */
- @ApiModelProperty(value = "提交的选项id", example = "")
- @TableField("answer_option")
- private Long answerOption;
-
- /**
- * 本题得分
- */
- @ApiModelProperty(value = "本题得分", example = "")
- @TableField("answer_score")
- private Integer answerScore;
-
- /**
- * 物业Id
- */
- @ApiModelProperty(value = "物业Id", example = "")
- @TableField("property_id")
- private Long propertyId;
-
- /**
- * 成绩id
- */
- @ApiModelProperty(value = "成绩id", example = "")
- @TableField("score_id")
- private Long scoreId;
-
- /**
- * 答案
- */
- @ApiModelProperty(value = "答案", example = "")
- @TableField("answer")
- private Integer answer;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- @TableField("delete_flage")
- private Integer deleteFlage;
-
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.java b/src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.java
deleted file mode 100644
index f5f79d3..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.answerRecord.dto.AnswerRecordDTO;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
-
-import java.util.List;
-
-/**
- * 答题记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-17
- */
-public interface AnswerRecordMapper extends BaseMapper<AnswerRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param answerRecord
- * @return
- */
- List<AnswerRecordVO> selectAnswerRecordPage(IPage page, AnswerRecordVO answerRecord);
-
- /**
- * 查询答题记录表
- *
- * @param id 答题记录表ID
- * @return 答题记录表
- */
- AnswerRecordDTO selectAnswerRecordById(Long id);
-
- /**
- * 查询答题记录表列表
- *
- * @param answerRecordDTO 答题记录表
- * @return 答题记录表集合
- */
- List<AnswerRecordDTO> selectAnswerRecordList(AnswerRecordDTO answerRecordDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.xml b/src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.xml
deleted file mode 100644
index c3ef71d..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.answerRecord.mapper.AnswerRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="answerRecordResultMap" type="org.springblade.modules.answerRecord.entity.AnswerRecordEntity">
- </resultMap>
-
-
- <select id="selectAnswerRecordPage" resultMap="answerRecordResultMap">
- select * from jczz_answer_record where is_deleted = 0
- </select>
-
- <resultMap type="org.springblade.modules.answerRecord.dto.AnswerRecordDTO" id="AnswerRecordDTOResult">
- <result property="id" column="id"/>
- <result property="subjectChoicesId" column="subject_choices_id"/>
- <result property="subjectChoicesType" column="subject_choices_type"/>
- <result property="subjectOptionId" column="subject_option_id"/>
- <result property="answerOption" column="answer_option"/>
- <result property="answerScore" column="answer_score"/>
- <result property="propertyId" column="property_id"/>
- <result property="scoreId" column="score_id"/>
- <result property="answer" column="answer"/>
- <result property="createTime" column="create_time"/>
- </resultMap>
-
- <sql id="selectAnswerRecord">
- select
- id,
- subject_choices_id,
- subject_choices_type,
- subject_option_id,
- answer_option,
- answer_score,
- property_id,
- score_id,
- answer,
- create_time
- from
- jczz_answer_record
- </sql>
-
- <select id="selectAnswerRecordById" parameterType="long" resultMap="AnswerRecordDTOResult">
- <include refid="selectAnswerRecord"/>
- where
- id = #{id}
- </select>
-
- <select id="selectAnswerRecordList" parameterType="org.springblade.modules.answerRecord.dto.AnswerRecordDTO"
- resultMap="AnswerRecordDTOResult">
- <include refid="selectAnswerRecord"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="subjectChoicesId != null ">and subject_choices_id = #{subjectChoicesId}</if>
- <if test="subjectChoicesType != null ">and subject_choices_type = #{subjectChoicesType}</if>
- <if test="subjectOptionId != null ">and subject_option_id = #{subjectOptionId}</if>
- <if test="answerOption != null and answerOption != ''">and answer_option = #{answerOption}</if>
- <if test="answerScore != null ">and answer_score = #{answerScore}</if>
- <if test="propertyId != null ">and property_id = #{propertyId}</if>
- <if test="scoreId != null ">and score_id = #{scoreId}</if>
- <if test="answer != null ">and answer = #{answer}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- </where>
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/answerRecord/service/IAnswerRecordService.java b/src/main/java/org/springblade/modules/answerRecord/service/IAnswerRecordService.java
deleted file mode 100644
index ed0e423..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/service/IAnswerRecordService.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.answerRecord.dto.AnswerRecordDTO;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-
-import java.util.List;
-
-/**
- * 答题记录表 服务类
- *
- * @author BladeX
- * @since 2024-01-17
- */
-public interface IAnswerRecordService extends IService<AnswerRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param answerRecord
- * @return
- */
- IPage<AnswerRecordVO> selectAnswerRecordPage(IPage<AnswerRecordVO> page, AnswerRecordVO answerRecord);
-
- /**
- * 查询答题记录表
- *
- * @param id 答题记录表ID
- * @return 答题记录表
- */
- AnswerRecordDTO selectAnswerRecordById(Long id);
-
- /**
- * 查询答题记录表列表
- *
- * @param answerRecordDTO 答题记录表
- * @return 答题记录表集合
- */
- List<AnswerRecordDTO> selectAnswerRecordList(AnswerRecordDTO answerRecordDTO);
-
- Boolean saveAnswer(List<SubjectChoicesVO> subjectChoicesVO);
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/service/impl/AnswerRecordServiceImpl.java b/src/main/java/org/springblade/modules/answerRecord/service/impl/AnswerRecordServiceImpl.java
deleted file mode 100644
index be1db66..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/service/impl/AnswerRecordServiceImpl.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Constants;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.answerRecord.dto.AnswerRecordDTO;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-import org.springblade.modules.answerRecord.mapper.AnswerRecordMapper;
-import org.springblade.modules.answerRecord.service.IAnswerRecordService;
-import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 答题记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-17
- */
-@Service
-public class AnswerRecordServiceImpl extends ServiceImpl<AnswerRecordMapper, AnswerRecordEntity> implements IAnswerRecordService {
-
- @Override
- public IPage<AnswerRecordVO> selectAnswerRecordPage(IPage<AnswerRecordVO> page, AnswerRecordVO answerRecord) {
- return page.setRecords(baseMapper.selectAnswerRecordPage(page, answerRecord));
- }
-
- /**
- * 查询答题记录表
- *
- * @param id 答题记录表ID
- * @return 答题记录表
- */
- @Override
- public AnswerRecordDTO selectAnswerRecordById(Long id) {
- return this.baseMapper.selectAnswerRecordById(id);
- }
-
- /**
- * 查询答题记录表列表
- *
- * @param answerRecordDTO 答题记录表
- * @return 答题记录表集合
- */
- @Override
- public List<AnswerRecordDTO> selectAnswerRecordList(AnswerRecordDTO answerRecordDTO) {
- return this.baseMapper.selectAnswerRecordList(answerRecordDTO);
- }
-
- @Override
- public Boolean saveAnswer(List<SubjectChoicesVO> subjectChoicesVO) {
- BigDecimal bigDecimal = BigDecimal.valueOf(0);
- List<AnswerRecordEntity> answerRecordEntityList = new ArrayList<>();
- // 遍历题目和选项
- for (SubjectChoicesVO choicesVO : subjectChoicesVO) {
- List<SubjectOptionVO> subjectOptionList = choicesVO.getSubjectOptionList();
- if (choicesVO.getChoicesType().intValue() == 3) {
- bigDecimal = bigDecimal.add(choicesVO.getScore());
- }
- for (SubjectOptionVO subjectOptionVO : subjectOptionList) {
- // 删除掉之前保存的记录
- remove(Wrappers.<AnswerRecordEntity>lambdaQuery()
- .eq(AnswerRecordEntity::getPropertyId, choicesVO.getPropertyId())
- .eq(AnswerRecordEntity::getSubjectChoicesId, choicesVO.getId()));
- // 判断选项的id
- if (subjectOptionVO.getId().equals(choicesVO.getChooseId())) {
- if (CommonConstant.NUMBER_ZERO.equals(choicesVO.getChoicesType().intValue())) {
- AnswerRecordDTO answerRecordDTO = new AnswerRecordDTO();
- answerRecordDTO.setPropertyId(choicesVO.getPropertyId());
- answerRecordDTO.setAnswerOption(subjectOptionVO.getId());
- answerRecordDTO.setSubjectChoicesId(choicesVO.getId());
- answerRecordDTO.setSubjectChoicesType(1);
- answerRecordDTO.setSubjectOptionId(subjectOptionVO.getId());
- answerRecordEntityList.add(answerRecordDTO);
- bigDecimal = bigDecimal.add(subjectOptionVO.getScore());
- break;
- }
- }
- if (CommonConstant.NUMBER_THREE.equals(choicesVO.getChoicesType().intValue())) {
- AnswerRecordDTO answerRecordDTO = new AnswerRecordDTO();
- answerRecordDTO.setPropertyId(choicesVO.getPropertyId());
- answerRecordDTO.setAnswerOption(subjectOptionVO.getId());
- answerRecordDTO.setSubjectChoicesId(choicesVO.getId());
- answerRecordDTO.setAnswer(subjectOptionVO.getNumbers());
- answerRecordDTO.setSubjectOptionId(subjectOptionVO.getId());
- answerRecordDTO.setSubjectChoicesType(3);
- answerRecordEntityList.add(answerRecordDTO);
- BigDecimal multiply = BigDecimal.valueOf(subjectOptionVO.getNumbers()).multiply(subjectOptionVO.getScore());
- bigDecimal = bigDecimal.subtract(multiply);
- }
- }
- }
- // 保存得分
- IPropertyCompanyService bean = SpringUtils.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getId, subjectChoicesVO.get(0).getPropertyId()));
- if (subjectChoicesVO.get(0).getSubclassName().equals("基础信息")) {
- one.setBaseInfoScore(bigDecimal);
- } else if (subjectChoicesVO.get(0).getSubclassName().equals("经营信息")) {
- one.setOperateinfoScore(bigDecimal);
- } else if (subjectChoicesVO.get(0).getSubclassName().equals("纳税信息")) {
- one.setTaxInfoScore(bigDecimal);
- } else if (subjectChoicesVO.get(0).getSubclassName().equals("党建信息")) {
- one.setPartyBuildingInfoScore(bigDecimal);
- bean.update(Wrappers.<PropertyCompanyEntity>lambdaUpdate().set(PropertyCompanyEntity::getPartyBuildingInfoScore, bigDecimal)
- .eq(PropertyCompanyEntity::getId, subjectChoicesVO.get(0).getPropertyId()));
- } else if (subjectChoicesVO.get(0).getSubclassName().equals("街道社区")) {
- one.setStreetScore(bigDecimal);
- }else if (subjectChoicesVO.get(0).getSubclassName().equals("企业良好行为")) {
- one.setGoodCorporateScore(bigDecimal);
- } else if (subjectChoicesVO.get(0).getSubclassName().equals("项目良好行为")) {
- one.setGoodProjectScore(bigDecimal);
- } else if (subjectChoicesVO.get(0).getSubclassName().equals("违法违规行为惩戒")) {
- one.setLllegalAndIrregularScore(bigDecimal);
- }
- // 计算总分
- BigDecimal add = one.getBaseInfoScore()
- .add(one.getOperateinfoScore())
- .add(one.getOperateinfoScore())
- .add(one.getPartyBuildingInfoScore())
- .add(one.getGoodCorporateScore())
- .add(one.getGoodProjectScore())
- .add(one.getLllegalAndIrregularScore())
- .add(one.getEvaluateScore())
- .add(one.getStreetScore());
- one.setAllScore(getAllScore(add));
- bean.updateById(one);
- return saveBatch(answerRecordEntityList);
- }
-
- /**
- * 判断结果,如果大于100 则设置100 小于/等于0 设置为0
- *
- * @param allScore
- * @return
- */
- private BigDecimal getAllScore(BigDecimal allScore) {
- if (allScore.compareTo(BigDecimal.valueOf(0)) > 100) {
- return BigDecimal.valueOf(100);
- }
- if (allScore.compareTo(BigDecimal.valueOf(0)) > 0) {
- return allScore;
- }
- return BigDecimal.valueOf(0);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/vo/AnswerRecordVO.java b/src/main/java/org/springblade/modules/answerRecord/vo/AnswerRecordVO.java
deleted file mode 100644
index 44521da..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/vo/AnswerRecordVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-
-/**
- * 答题记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-17
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class AnswerRecordVO extends AnswerRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/answerRecord/wrapper/AnswerRecordWrapper.java b/src/main/java/org/springblade/modules/answerRecord/wrapper/AnswerRecordWrapper.java
deleted file mode 100644
index 4677659..0000000
--- a/src/main/java/org/springblade/modules/answerRecord/wrapper/AnswerRecordWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.answerRecord.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
-
-import java.util.Objects;
-
-/**
- * 答题记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-17
- */
-public class AnswerRecordWrapper extends BaseEntityWrapper<AnswerRecordEntity, AnswerRecordVO> {
-
- public static AnswerRecordWrapper build() {
- return new AnswerRecordWrapper();
- }
-
- @Override
- public AnswerRecordVO entityVO(AnswerRecordEntity answerRecord) {
- AnswerRecordVO answerRecordVO = Objects.requireNonNull(BeanUtil.copy(answerRecord, AnswerRecordVO.class));
-
- //User createUser = UserCache.getUser(answerRecord.getCreateUser());
- //User updateUser = UserCache.getUser(answerRecord.getUpdateUser());
- //answerRecordVO.setCreateUserName(createUser.getName());
- //answerRecordVO.setUpdateUserName(updateUser.getName());
-
- return answerRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/article/controller/ArticleController.java b/src/main/java/org/springblade/modules/article/controller/ArticleController.java
index 2bcf9d8..77fec67 100644
--- a/src/main/java/org/springblade/modules/article/controller/ArticleController.java
+++ b/src/main/java/org/springblade/modules/article/controller/ArticleController.java
@@ -12,8 +12,6 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
-import org.springblade.es.service.ElasticsearchDocumentService;
-import org.springblade.es.vo.EsParam;
import org.springblade.modules.article.entity.Article;
import org.springblade.modules.article.service.ArticleService;
import org.springblade.modules.article.vo.ArticleVO;
@@ -36,7 +34,6 @@
public class ArticleController {
private final ArticleService articleService;
- private final ElasticsearchDocumentService elasticsearchDocumentService;
/**
* 查询资讯分页信息
diff --git a/src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java b/src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java
index c6b088f..6ae69af 100644
--- a/src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java
+++ b/src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java
@@ -1,35 +1,13 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
package org.springblade.modules.article.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.cache.SysCache;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.article.entity.ArticleCommentEntity;
import org.springblade.modules.article.mapper.ArticleCommentMapper;
import org.springblade.modules.article.service.IArticleCommentService;
import org.springblade.modules.article.vo.ArticleCommentVO;
-import org.springblade.modules.words.WorksService;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
/**
* 通知评论表 服务实现类
@@ -39,9 +17,6 @@
*/
@Service
public class ArticleCommentServiceImpl extends ServiceImpl<ArticleCommentMapper, ArticleCommentEntity> implements IArticleCommentService {
-
- @Autowired
- private WorksService worksService;
@Override
public IPage<ArticleCommentVO> selectArticleCommentPage(IPage<ArticleCommentVO> page, ArticleCommentVO noticeComment) {
@@ -59,26 +34,6 @@
@Override
public String saveComment(ArticleCommentEntity articleComment) {
- boolean flag = false;
- // 先进行敏感词过滤
- Map<String, Object> map = worksService.interceptWords(articleComment.getContent());
- // 获取敏感词校验结果
- String iswords = map.get("iswords").toString();
- if (iswords.equals("false")){
- // 审核通过
- articleComment.setCheckStatus(2);
- flag = save(articleComment);
- // 返回
- return "操作成功";
- }else {
- // 审核不通过
- articleComment.setCheckStatus(3);
- // 设置审核不通过的说明
- articleComment.setCheckRemark(map.get("words").toString());
- // 保存
- save(articleComment);
- // 返回
- return "当前评论内容中带有敏感词,当前评论无法生效!";
- }
+ return "操作成功";
}
}
diff --git a/src/main/java/org/springblade/modules/article/service/impl/ArticleServiceImpl.java b/src/main/java/org/springblade/modules/article/service/impl/ArticleServiceImpl.java
index 8f6aef1..9583a5c 100644
--- a/src/main/java/org/springblade/modules/article/service/impl/ArticleServiceImpl.java
+++ b/src/main/java/org/springblade/modules/article/service/impl/ArticleServiceImpl.java
@@ -16,15 +16,6 @@
import org.springblade.modules.article.service.ArticleService;
import org.springblade.modules.article.service.IArticleIntegralService;
import org.springblade.modules.article.vo.ArticleVO;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -51,47 +42,6 @@
@Override
public IPage<Article> selectArticlePage(IPage<Article> page, ArticleVO article) {
String userRole = AuthUtil.getUserRole();
- // 物业身份,只查询该物业公司下的公告
- // if (userRole.contains("wygly") || userRole.contains("wyxmjl")) {
- // // 物业公司 有哪些小区
- // IPropertyCompanyDistrictService bean = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // List<PropertyCompanyDistrictEntity> list = bean.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- // .eq(PropertyCompanyDistrictEntity::getUserId, AuthUtil.getUserId()));
- // List<String> collect = list.stream().map(PropertyCompanyDistrictEntity::getDistrictId).collect(Collectors.toList());
- // article.setDistrictIdList(collect);
- // }
- if (RoleUtil.isProperty(userRole)) {
- // 查询小区id
- IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
- List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity companyEntity = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery()
- .eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()).last("limit 1"));
- if (companyEntity != null) {
- IPropertyCompanyDistrictService bean2 = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // 通过物业公司,查询小区
- List<PropertyCompanyDistrictEntity> propertyCompanyDistrictEntityList = bean2.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, companyEntity.getId()));
- if (propertyCompanyDistrictEntityList.size() > 0) {
- List<String> collect = propertyCompanyDistrictEntityList.stream().map(i -> i.getDistrictId()).collect(Collectors.toList());
- districtIds.addAll(collect);
- }
- }
- article.setDistrictIdList(districtIds);
- if (districtIds.size() == 0) {
- return page.setRecords(new ArrayList<>());
- }
- article.setPropertyFlag(1);
- }
- if (userRole.contains("jdgly") || userRole.contains("sqgly")) {
- IDistrictService districtService = SpringUtils.getBean(IDistrictService.class);
- List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId(), null);
- List<DistrictEntity> list = districtService.list(Wrappers.<DistrictEntity>lambdaQuery().in(DistrictEntity::getCommunityCode, regionChildCodesList));
- if (list.size() > 0) {
- article.setDistrictIdList(list.stream().map(item -> item.getId()).collect(Collectors.toList()));
- }
- }
return page.setRecords(baseMapper.selectArticlePage(page, article));
}
@@ -104,31 +54,6 @@
*/
@Override
public IPage<ArticleVO> selectArticlePageByApp(IPage<ArticleVO> page, ArticleVO article) {
- // 判断是否管理员
- if (AuthUtils.isAdministratorOrAdmin(SpringUtils.getRequestParam("roleName"))) {
- IDistrictService districtService = SpringUtils.getBean(IDistrictService.class);
- String communityCode = SpringUtils.getRequestParam("communityCode");
- List<DistrictEntity> list = districtService.list(Wrappers.<DistrictEntity>lambdaQuery()
- .like(DistrictEntity::getCommunityCode, communityCode));
- if (list.size() > 0) {
- article.setDistrictIdList(list.stream().map(item -> item.getId()).collect(Collectors.toList()));
- }
- } else {
- // 查询用户小区的id
- String districId = baseMapper.getDistrictId(article.getHouseCode());
- List<String> objects = new ArrayList<>();
- objects.add(districId);
- article.setDistrictIdList(objects);
- }
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, article.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (householdEntity != null) {
- article.setHouseholdId(householdEntity.getId());
- }
List<ArticleVO> articleVOS = baseMapper.selectArticlePageByApp(page, article);
return page.setRecords(articleVOS);
}
diff --git a/src/main/java/org/springblade/modules/backblast/controller/BackblastPubPersonController.java b/src/main/java/org/springblade/modules/backblast/controller/BackblastPubPersonController.java
deleted file mode 100644
index d662ec2..0000000
--- a/src/main/java/org/springblade/modules/backblast/controller/BackblastPubPersonController.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.service.IBackblastPubPersonService;
-import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
-import org.springblade.modules.backblast.wrapper.BackblastPubPersonWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 反炸宣传对象表 控制器
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-backblastPubPerson/backblastPubPerson")
-@Api(value = "反炸宣传对象表", tags = "反炸宣传对象表接口")
-public class BackblastPubPersonController {
-
- private final IBackblastPubPersonService backblastPubPersonService;
- private final BladeLogger bladeLogger;
-
- /**
- * 反炸宣传对象表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入backblastPubPerson")
- public R detail(BackblastPubPersonEntity backblastPubPerson) {
- BackblastPubPersonEntity detail = backblastPubPersonService.getOne(Condition.getQueryWrapper(backblastPubPerson));
- return R.data(detail);
- }
- /**
- * 反炸宣传对象表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入backblastPubPerson")
- public R<IPage<BackblastPubPersonVO>> list(BackblastPubPersonEntity backblastPubPerson, Query query) {
- IPage<BackblastPubPersonEntity> pages = backblastPubPersonService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastPubPerson));
- return R.data(BackblastPubPersonWrapper.build().pageVO(pages));
- }
-
- /**
- * 反炸宣传对象表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("反炸宣传对象表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入backblastPubPerson")
- public R<IPage<BackblastPubPersonVO>> page(BackblastPubPersonVO backblastPubPerson, Query query) {
- bladeLogger.info("反炸宣传对象表 自定义分页", JsonUtil.toJson(backblastPubPerson));
- IPage<BackblastPubPersonVO> pages = backblastPubPersonService.selectBackblastPubPersonPage(Condition.getPage(query), backblastPubPerson);
- return R.data(pages);
- }
-
- /**
- * 反炸宣传对象表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入backblastPubPerson")
- public R save(@Valid @RequestBody BackblastPubPersonEntity backblastPubPerson) {
- return R.status(backblastPubPersonService.save(backblastPubPerson));
- }
-
- /**
- * 反炸宣传对象表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入backblastPubPerson")
- public R update(@Valid @RequestBody BackblastPubPersonEntity backblastPubPerson) {
- return R.status(backblastPubPersonService.updateById(backblastPubPerson));
- }
-
- /**
- * 反炸宣传对象表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入backblastPubPerson")
- public R submit(@Valid @RequestBody BackblastPubPersonEntity backblastPubPerson) {
- return R.status(backblastPubPersonService.saveOrUpdate(backblastPubPerson));
- }
-
- /**
- * 反炸宣传对象表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("反炸宣传对象表 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("反炸宣传对象表 删除", JsonUtil.toJson(ids));
- return R.status(backblastPubPersonService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 反炸宣传对象表 自定义详情
- * @param backblastPubPerson
- * @return
- */
- @GetMapping("/getDetail")
- @ApiOperationSupport(order = 9)
- @ApiLog("反炸宣传对象表 自定义详情")
- @ApiOperation(value = "详情", notes = "传入backblastPubPerson")
- public R getDetail(BackblastPubPersonVO backblastPubPerson) {
- bladeLogger.info("反炸宣传对象表 自定义详情", JsonUtil.toJson(backblastPubPerson));
- BackblastPubPersonVO detail = backblastPubPersonService.getDetail(backblastPubPerson);
- return R.data(detail);
- }
-}
diff --git a/src/main/java/org/springblade/modules/backblast/controller/BackblastPubRecordController.java b/src/main/java/org/springblade/modules/backblast/controller/BackblastPubRecordController.java
deleted file mode 100644
index 168af96..0000000
--- a/src/main/java/org/springblade/modules/backblast/controller/BackblastPubRecordController.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
-import org.springblade.modules.backblast.wrapper.BackblastPubRecordWrapper;
-import org.springblade.modules.backblast.service.IBackblastPubRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 反炸宣传记录表 控制器
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-backblastPubRecord/backblastPubRecord")
-@Api(value = "反炸宣传记录表", tags = "反炸宣传记录表接口")
-public class BackblastPubRecordController{
-
- private final IBackblastPubRecordService backblastPubRecordService;
- private final BladeLogger bladeLogger;
-
- /**
- * 反炸宣传记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入backblastPubRecord")
- public R detail(BackblastPubRecordEntity backblastPubRecord) {
- BackblastPubRecordEntity detail = backblastPubRecordService.getOne(Condition.getQueryWrapper(backblastPubRecord));
- return R.data(detail);
- }
- /**
- * 反炸宣传记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入backblastPubRecord")
- public R<IPage<BackblastPubRecordVO>> list(BackblastPubRecordEntity backblastPubRecord, Query query) {
- IPage<BackblastPubRecordEntity> pages = backblastPubRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastPubRecord));
- return R.data(BackblastPubRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 反炸宣传记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("反炸宣传记录表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入backblastPubRecord")
- public R<IPage<BackblastPubRecordVO>> page(BackblastPubRecordVO backblastPubRecord, Query query) {
- bladeLogger.info("反炸宣传记录表 自定义分页", JsonUtil.toJson(backblastPubRecord));
- IPage<BackblastPubRecordVO> pages = backblastPubRecordService.selectBackblastPubRecordPage(Condition.getPage(query), backblastPubRecord);
- return R.data(pages);
- }
-
- /**
- * 反炸宣传记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入backblastPubRecord")
- public R save(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) {
- return R.status(backblastPubRecordService.save(backblastPubRecord));
- }
-
- /**
- * 反炸宣传记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入backblastPubRecord")
- public R update(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) {
- return R.status(backblastPubRecordService.updateById(backblastPubRecord));
- }
-
- /**
- * 反炸宣传记录表 自定义新增/修改
- */
- @PostMapping("/addOrUpdate")
- @ApiOperationSupport(order = 8)
- @ApiLog("反炸宣传记录表 自定义新增/修改")
- @ApiOperation(value = "自定义新增/修改", notes = "传入backblastPubRecord")
- public R addOrUpdate(@Valid @RequestBody BackblastPubRecordVO backblastPubRecord) {
- bladeLogger.info("反炸宣传记录表 自定义新增/修改", JsonUtil.toJson(backblastPubRecord));
- return R.status(backblastPubRecordService.addOrUpdateBackblastPubRecordEntity(backblastPubRecord));
- }
-
- /**
- * 反炸宣传记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入backblastPubRecord")
- public R submit(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) {
- return R.status(backblastPubRecordService.saveOrUpdate(backblastPubRecord));
- }
-
- /**
- * 反炸宣传记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("反炸宣传记录表 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("反炸宣传记录表 删除", JsonUtil.toJson(ids));
- return R.status(backblastPubRecordService.removeBackblastPubByIds(Func.toLongList(ids)));
- }
-
- /**
- * 反炸宣传记录表 自定义详情
- * @param backblastPubRecord
- * @return
- */
- @GetMapping("/getDetail")
- @ApiOperationSupport(order = 9)
- @ApiLog("反炸宣传记录表 自定义详情")
- @ApiOperation(value = "详情", notes = "传入backblastPubRecord")
- public R getDetail(BackblastPubRecordVO backblastPubRecord) {
- bladeLogger.info("反炸宣传记录表 自定义详情", JsonUtil.toJson(backblastPubRecord));
- BackblastPubRecordVO detail = backblastPubRecordService.getDetail(backblastPubRecord);
- return R.data(detail);
- }
-}
diff --git a/src/main/java/org/springblade/modules/backblast/controller/BackblastWarnHanRecController.java b/src/main/java/org/springblade/modules/backblast/controller/BackblastWarnHanRecController.java
deleted file mode 100644
index effd7c1..0000000
--- a/src/main/java/org/springblade/modules/backblast/controller/BackblastWarnHanRecController.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
-import org.springblade.modules.backblast.wrapper.BackblastWarnHanRecWrapper;
-import org.springblade.modules.backblast.service.IBackblastWarnHanRecService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 反炸预警处置记录表 控制器
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-backblastWarnHanRec/backblastWarnHanRec")
-@Api(value = "反炸预警处置记录表", tags = "反炸预警处置记录表接口")
-public class BackblastWarnHanRecController{
-
- private final IBackblastWarnHanRecService backblastWarnHanRecService;
- private final BladeLogger bladeLogger;
-
- /**
- * 反炸预警处置记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入backblastWarnHanRec")
- public R detail(BackblastWarnHanRecEntity backblastWarnHanRec) {
- BackblastWarnHanRecEntity detail = backblastWarnHanRecService.getOne(Condition.getQueryWrapper(backblastWarnHanRec));
- return R.data(detail);
- }
- /**
- * 反炸预警处置记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入backblastWarnHanRec")
- public R<IPage<BackblastWarnHanRecVO>> list(BackblastWarnHanRecEntity backblastWarnHanRec, Query query) {
- IPage<BackblastWarnHanRecEntity> pages = backblastWarnHanRecService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastWarnHanRec));
- return R.data(BackblastWarnHanRecWrapper.build().pageVO(pages));
- }
-
- /**
- * 反炸预警处置记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("反炸预警处置记录表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入backblastWarnHanRec")
- public R<IPage<BackblastWarnHanRecVO>> page(BackblastWarnHanRecVO backblastWarnHanRec, Query query) {
- bladeLogger.info("反炸预警处置记录表 自定义分页", JsonUtil.toJson(backblastWarnHanRec));
- IPage<BackblastWarnHanRecVO> pages = backblastWarnHanRecService.selectBackblastWarnHanRecPage(Condition.getPage(query), backblastWarnHanRec);
- return R.data(pages);
- }
-
- /**
- * 反炸预警处置记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入backblastWarnHanRec")
- public R save(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
- return R.status(backblastWarnHanRecService.save(backblastWarnHanRec));
- }
-
- /**
- * 反炸预警处置记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入backblastWarnHanRec")
- public R update(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
- return R.status(backblastWarnHanRecService.updateById(backblastWarnHanRec));
- }
-
- /**
- * 反炸预警处置记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入backblastWarnHanRec")
- public R submit(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
- return R.status(backblastWarnHanRecService.saveOrUpdate(backblastWarnHanRec));
- }
-
- /**
- * 反炸预警处置记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("反炸预警处置记录表 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("反炸预警处置记录表 删除", JsonUtil.toJson(ids));
- return R.status(backblastWarnHanRecService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 反炸预警处置记录表 自定义新增或修改
- */
- @PostMapping("/saveOrUpdate")
- @ApiOperationSupport(order = 8)
- @ApiLog("反炸预警处置记录表 自定义新增或修改")
- @ApiOperation(value = "自定义新增或修改", notes = "传入backblastWarnHanRec")
- public R saveOrUpdate(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
- bladeLogger.info("反炸预警处置记录表 自定义新增或修改", JsonUtil.toJson(backblastWarnHanRec));
- return R.status(backblastWarnHanRecService.saveOrUpdateBackblastWarnHanRecEntity(backblastWarnHanRec));
- }
-
-
- /**
- * 反炸预警处置记录表 自定义详情
- */
- @GetMapping("/getDetail")
- @ApiOperationSupport(order = 9)
- @ApiLog("反炸预警处置记录表 自定义详情")
- @ApiOperation(value = "详情", notes = "传入backblastWarnHanRec")
- public R getDetail(BackblastWarnHanRecVO backblastWarnHanRec) {
- bladeLogger.info("反炸预警处置记录表 自定义详情", JsonUtil.toJson(backblastWarnHanRec));
- BackblastWarnHanRecVO detail = backblastWarnHanRecService.getDetail(backblastWarnHanRec);
- return R.data(detail);
- }
-}
diff --git a/src/main/java/org/springblade/modules/backblast/dto/BackblastPubRecordDTO.java b/src/main/java/org/springblade/modules/backblast/dto/BackblastPubRecordDTO.java
deleted file mode 100644
index 44dd62e..0000000
--- a/src/main/java/org/springblade/modules/backblast/dto/BackblastPubRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.dto;
-
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 反炸宣传记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class BackblastPubRecordDTO extends BackblastPubRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/dto/BackblastWarnHanRecDTO.java b/src/main/java/org/springblade/modules/backblast/dto/BackblastWarnHanRecDTO.java
deleted file mode 100644
index b1367af..0000000
--- a/src/main/java/org/springblade/modules/backblast/dto/BackblastWarnHanRecDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.dto;
-
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 反炸预警处置记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class BackblastWarnHanRecDTO extends BackblastWarnHanRecEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/entity/BackblastPubPersonEntity.java b/src/main/java/org/springblade/modules/backblast/entity/BackblastPubPersonEntity.java
deleted file mode 100644
index 445e452..0000000
--- a/src/main/java/org/springblade/modules/backblast/entity/BackblastPubPersonEntity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.springblade.modules.backblast.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 反诈宣传宣防对象表 实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@TableName("jczz_backblast_pub_person")
-@ApiModel(value = "BackblastPubPerson对象", description = "反诈宣传宣防对象表")
-public class BackblastPubPersonEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 反诈宣传ID
- */
- @ApiModelProperty(value = "反诈宣传ID")
- private Long backblastPubRecordId;
- /**
- * 姓名
- */
- @ApiModelProperty(value = "姓名")
- private String name;
- /**
- * 电话
- */
- @ApiModelProperty(value = "电话")
- private String telephone;
- /**
- * 身份证
- */
- @ApiModelProperty(value = "身份证")
- private String idCard;
- /**
- * 居住地址
- */
- @ApiModelProperty(value = "居住地址")
- private String address;
- /**
- * 职业
- */
- @ApiModelProperty(value = "职业")
- private String occupation;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-}
diff --git a/src/main/java/org/springblade/modules/backblast/entity/BackblastPubRecordEntity.java b/src/main/java/org/springblade/modules/backblast/entity/BackblastPubRecordEntity.java
deleted file mode 100644
index c93a31e..0000000
--- a/src/main/java/org/springblade/modules/backblast/entity/BackblastPubRecordEntity.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package org.springblade.modules.backblast.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 反炸宣传记录表 实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@TableName("jczz_backblast_pub_record")
-@ApiModel(value = "BackblastPubRecord对象", description = "反炸宣传记录表")
-public class BackblastPubRecordEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 房屋编码
- */
- @ApiModelProperty(value = "房屋编码")
- private String houseCode;
- /**
- * 记录民警姓名
- */
- @ApiModelProperty(value = "宣传记录民警姓名")
- private String policeman;
- /**
- * 记录民警电话
- */
- @ApiModelProperty(value = "宣传记录民警电话")
- private String policemanPhone;
- /**
- * 宣传内容
- */
- @ApiModelProperty(value = "宣传内容")
- private String pubContent;
- /**
- * 宣传现场照片
- */
- @ApiModelProperty(value = "宣传现场照片")
- private String pubUrls;
- /**
- * 网格编号
- */
- @ApiModelProperty(value = "网格编号")
- private String gridCode;
- /**
- * 警务网格编号
- */
- @ApiModelProperty(value = "警务网格编号")
- private String jwGridCode;
- /**
- * 经度
- */
- @ApiModelProperty(value = "经度")
- private String lng;
- /**
- * 纬度
- */
- @ApiModelProperty(value = "纬度")
- private String lat;
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField(value = "create_user",fill = FieldFill.INSERT)
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField(value = "update_user",fill = FieldFill.UPDATE)
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-
- /** 是否下载国家反诈app 1:是 2:否 */
- @ApiModelProperty(value = "是否下载国家反诈app 1:是 2:否", example = "")
- private Integer isFzApp;
-
- /** 是否打开预警功能 1:是 2:否 */
- @ApiModelProperty(value = "是否打开预警功能 1:是 2:否", example = "")
- private Integer isOpenAlarm;
-}
diff --git a/src/main/java/org/springblade/modules/backblast/entity/BackblastWarnHanRecEntity.java b/src/main/java/org/springblade/modules/backblast/entity/BackblastWarnHanRecEntity.java
deleted file mode 100644
index 10fc999..0000000
--- a/src/main/java/org/springblade/modules/backblast/entity/BackblastWarnHanRecEntity.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.springblade.modules.backblast.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 反炸预警处置记录表 实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@TableName("jczz_backblast_warn_han_rec")
-@ApiModel(value = "BackblastWarnHanRec对象", description = "反炸预警处置记录表")
-public class BackblastWarnHanRecEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
- /**
- * 房屋编码
- */
- @ApiModelProperty(value = "房屋编码")
- private String houseCode;
- /**
- * 记录民警姓名
- */
- @ApiModelProperty(value = "记录民警姓名")
- private String policeman;
- /**
- * 记录民警电话
- */
- @ApiModelProperty(value = "记录民警电话")
- private String policemanPhone;
- /**
- * 记录内容
- */
- @ApiModelProperty(value = "记录内容")
- private String recContent;
- /**
- * 现场照片
- */
- @ApiModelProperty(value = "现场照片")
- private String sceUrls;
- /**
- * 网格编号
- */
- @ApiModelProperty(value = "网格编号")
- private String gridCode;
- /**
- * 警务网格编号
- */
- @ApiModelProperty(value = "警务网格编号")
- private String jwGridCode;
- /**
- * 经度
- */
- @ApiModelProperty(value = "经度")
- private String lng;
- /**
- * 纬度
- */
- @ApiModelProperty(value = "纬度")
- private String lat;
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField(value = "create_user",fill = FieldFill.INSERT)
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField(value = "update_user",fill = FieldFill.UPDATE)
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-}
diff --git a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.java b/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.java
deleted file mode 100644
index 419804f..0000000
--- a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.springblade.modules.backblast.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
-
-import java.util.List;
-
-/**
- * 反炸宣传对象表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-03
- */
-public interface BackblastPubPersonMapper extends BaseMapper<BackblastPubPersonEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param backblastPubPerson
- * @return
- */
- List<BackblastPubPersonVO> selectBackblastPubPersonPage(IPage page,
- @Param("backblastPubPerson") BackblastPubPersonVO backblastPubPerson,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 反炸宣传对象表 自定义详情
- * @param backblastPubPerson
- * @return
- */
- BackblastPubPersonVO getDetail(@Param("backblastPubPerson") BackblastPubPersonVO backblastPubPerson);
-}
diff --git a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.xml b/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.xml
deleted file mode 100644
index cc4c4db..0000000
--- a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.backblast.mapper.BackblastPubPersonMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="backblastPubPersonResultMap" type="org.springblade.modules.backblast.vo.BackblastPubPersonVO">
- </resultMap>
-
- <!--自定义分页列表查询-->
- <select id="selectBackblastPubPersonPage" resultMap="backblastPubPersonResultMap">
- select
- jbpp.*
- from jczz_backblast_pub_person jbpp
- where jbpp.is_deleted = 0
- <if test="backblastPubPerson.address != null and backblastPubPerson.address != ''">
- and jbpp.address like concat('%',#{backblastPubPerson.address},'%')
- </if>
- <if test="backblastPubPerson.name != null and backblastPubPerson.name != ''">
- and jbpp.name like concat('%',#{backblastPubPerson.name},'%')
- </if>
- <if test="backblastPubPerson.telephone != null and backblastPubPerson.telephone != ''">
- and jbpp.telephone like concat('%',#{backblastPubPerson.telephone},'%')
- </if>
- <if test="backblastPubPerson.idCard != null and backblastPubPerson.idCard != ''">
- and jbpp.id_card like concat('%',#{backblastPubPerson.idCard},'%')
- </if>
- <if test="backblastPubPerson.startTime != null and backblastPubPerson.startTime != ''">
- and date_format(jbpp.create_time,'%Y-%m-%d') >= #{backblastPubPerson.startTime}
- </if>
- <if test="backblastPubPerson.endTime != null and backblastPubPerson.endTime != ''">
- and date_format(jbpp.create_time,'%Y-%m-%d') <= #{backblastPubPerson.endTime}
- </if>
- <if test="backblastPubPerson.searchKey!=null and backblastPubPerson.searchKey!=''">
- and CONCAT(
- ifnull(jbpp.id_card,''),
- ifnull(jbpp.address,''),
- ifnull(jbpp.name,''),
- ifnull(jbpp.telephone,'')
- ) like CONCAT ('%', #{backblastPubPerson.searchKey},'%')
- </if>
- order by jbpp.id desc,jbpp.create_time desc
- </select>
-
- <!--反炸宣传对象表 自定义详情-->
- <select id="getDetail" resultType="org.springblade.modules.backblast.vo.BackblastPubPersonVO">
- select
- jbpp.*
- from jczz_backblast_pub_person jbpp
- where jbpp.is_deleted = 0
- <if test="backblastPubPerson.id != null">
- and jbpp.id = #{backblastPubPerson.id}
- </if>
- order by jbpp.id desc,jbpp.create_time desc
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.java b/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.java
deleted file mode 100644
index 46a01ba..0000000
--- a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 反炸宣传记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public interface BackblastPubRecordMapper extends BaseMapper<BackblastPubRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param backblastPubRecord
- * @return
- */
- List<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage page,
- @Param("backblastPubRecord") BackblastPubRecordVO backblastPubRecord,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 反炸宣传记录表 自定义详情
- * @param backblastPubRecord
- * @return
- */
- BackblastPubRecordVO getDetail(@Param("backblastPubRecord") BackblastPubRecordVO backblastPubRecord);
-}
diff --git a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.xml b/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.xml
deleted file mode 100644
index 15f4465..0000000
--- a/src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.backblast.mapper.BackblastPubRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="backblastPubRecordResultMap" type="org.springblade.modules.backblast.vo.BackblastPubRecordVO">
- </resultMap>
-
- <!--自定义分页列表查询-->
- <select id="selectBackblastPubRecordPage" resultMap="backblastPubRecordResultMap">
- select
- jbpr.*,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName
- from jczz_backblast_pub_record jbpr
- LEFT JOIN jczz_grid jg on jg.grid_code = jbpr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jbpr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jbpr.is_deleted = 0
- <if test="backblastPubRecord.townName != null and backblastPubRecord.townName != ''">
- and br.town_name like concat('%',#{backblastPubRecord.townName},'%')
- </if>
- <if test="backblastPubRecord.communityName != null and backblastPubRecord.communityName != ''">
- and jbr.name like concat('%',#{backblastPubRecord.communityName},'%')
- </if>
- <if test="backblastPubRecord.pcsName != null and backblastPubRecord.pcsName != ''">
- and jpag.pcs_name like concat('%',#{backblastPubRecord.pcsName},'%')
- </if>
- <if test="backblastPubRecord.houseCode != null and backblastPubRecord.houseCode != ''">
- and jbpr.house_code = #{backblastPubRecord.houseCode}
- </if>
- <if test="backblastPubRecord.address != null and backblastPubRecord.address != ''">
- and jbpr.address like concat('%',#{backblastPubRecord.address},'%')
- </if>
- <if test="backblastPubRecord.pubContent != null and backblastPubRecord.pubContent != ''">
- and jbpr.pub_content like concat('%',#{backblastPubRecord.pubContent},'%')
- </if>
- <if test="backblastPubRecord.policeman != null and backblastPubRecord.policeman != ''">
- and jbpr.policeman like concat('%',#{backblastPubRecord.policeman},'%')
- </if>
- <if test="backblastPubRecord.createUser != null">
- and jbpr.create_user = #{backblastPubRecord.createUser}
- </if>
- <if test="backblastPubRecord.policemanPhone != null and backblastPubRecord.policemanPhone != ''">
- and jbpr.policeman_phone like concat('%',#{backblastPubRecord.policemanPhone},'%')
- </if>
- <if test="backblastPubRecord.startTime != null and backblastPubRecord.startTime != ''">
- and date_format(jbpr.create_time,'%Y-%m-%d') >= #{backblastPubRecord.startTime}
- </if>
- <if test="backblastPubRecord.endTime != null and backblastPubRecord.endTime != ''">
- and date_format(jbpr.create_time,'%Y-%m-%d') <= #{backblastPubRecord.endTime}
- </if>
- <if test="backblastPubRecord.searchKey!=null and backblastPubRecord.searchKey!=''">
- and CONCAT(
- ifnull(jbpr.policeman_phone,''),
- ifnull(jbpr.address,''),
- ifnull(jbpr.pub_content,''),
- ifnull(jbpr.policeman,'')
- ) like CONCAT ('%', #{backblastPubRecord.searchKey},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="backblastPubRecord.roleName != null and backblastPubRecord.roleName != ''">
- <if test="backblastPubRecord.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="backblastPubRecord.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jbpr.id desc,jbpr.create_time desc
- </select>
-
- <!--详情map-->
- <resultMap id="detailMap" type="org.springblade.modules.backblast.vo.BackblastPubRecordVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="backblastPubPersonEntityList" javaType="java.util.List"
- ofType="org.springblade.modules.backblast.entity.BackblastPubPersonEntity"
- autoMapping="true">
- <id property="id" column="cid"/>
- <result property="address" column="caddress"/>
- </collection>
- </resultMap>
-
- <!--反炸宣传记录表 自定义详情-->
- <select id="getDetail" resultMap="detailMap">
- select
- jbpr.*,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName,
- jbpp.id as cid,
- jbpp.name,
- jbpp.telephone,
- jbpp.id_card,
- jbpp.address as caddress,
- jbpp.occupation
- from jczz_backblast_pub_record jbpr
- LEFT JOIN jczz_grid jg on jg.grid_code = jbpr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jbpr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- LEFT JOIN jczz_backblast_pub_person jbpp on jbpp.backblast_pub_record_id = jbpr.id and jbpp.is_deleted = 0
- where jbpr.is_deleted = 0
- <if test="backblastPubRecord.id != null">
- and jbpr.id = #{backblastPubRecord.id}
- </if>
- <if test="backblastPubRecord.townName != null and backblastPubRecord.townName != ''">
- and br.town_name like concat('%',#{backblastPubRecord.townName},'%')
- </if>
- <if test="backblastPubRecord.communityName != null and backblastPubRecord.communityName != ''">
- and jbr.name like concat('%',#{backblastPubRecord.communityName},'%')
- </if>
- <if test="backblastPubRecord.pcsName != null and backblastPubRecord.pcsName != ''">
- and jpag.pcs_name like concat('%',#{backblastPubRecord.pcsName},'%')
- </if>
- <if test="backblastPubRecord.houseCode != null and backblastPubRecord.houseCode != ''">
- and jbpr.house_code = #{backblastPubRecord.houseCode}
- </if>
- <if test="backblastPubRecord.address != null and backblastPubRecord.address != ''">
- and jbpr.address like concat('%',#{backblastPubRecord.address},'%')
- </if>
- <if test="backblastPubRecord.pubContent != null and backblastPubRecord.pubContent != ''">
- and jbpr.pub_content like concat('%',#{backblastPubRecord.pubContent},'%')
- </if>
- <if test="backblastPubRecord.policeman != null and backblastPubRecord.policeman != ''">
- and jbpr.policeman like concat('%',#{backblastPubRecord.policeman},'%')
- </if>
- <if test="backblastPubRecord.policemanPhone != null and backblastPubRecord.policemanPhone != ''">
- and jbpr.policeman_phone like concat('%',#{backblastPubRecord.policemanPhone},'%')
- </if>
- order by jbpr.id desc,jbpr.create_time desc
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.java b/src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.java
deleted file mode 100644
index 3cfcc7f..0000000
--- a/src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 反炸预警处置记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public interface BackblastWarnHanRecMapper extends BaseMapper<BackblastWarnHanRecEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param backblastWarnHanRec
- * @return
- */
- List<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage page,
- @Param("backblastWarnHanRec") BackblastWarnHanRecVO backblastWarnHanRec,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 反炸预警处置记录表 自定义详情
- * @param backblastWarnHanRec
- * @return
- */
- BackblastWarnHanRecVO getDetail(@Param("backblastWarnHanRec") BackblastWarnHanRecVO backblastWarnHanRec);
-}
diff --git a/src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.xml b/src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.xml
deleted file mode 100644
index 862ebf5..0000000
--- a/src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.backblast.mapper.BackblastWarnHanRecMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="backblastWarnHanRecResultMap" type="org.springblade.modules.backblast.vo.BackblastWarnHanRecVO">
- </resultMap>
-
- <!--自定义分页列表查询-->
- <select id="selectBackblastWarnHanRecPage" resultMap="backblastWarnHanRecResultMap">
- select
- jbwhr.*,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName
- from jczz_backblast_warn_han_rec jbwhr
- LEFT JOIN jczz_grid jg on jg.grid_code = jbwhr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jbwhr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jbwhr.is_deleted = 0
- <if test="backblastWarnHanRec.townName != null and backblastWarnHanRec.townName != ''">
- and br.town_name like concat('%',#{backblastWarnHanRec.townName},'%')
- </if>
- <if test="backblastWarnHanRec.communityName != null and backblastWarnHanRec.communityName != ''">
- and jbr.name like concat('%',#{backblastWarnHanRec.communityName},'%')
- </if>
- <if test="backblastWarnHanRec.pcsName != null and backblastWarnHanRec.pcsName != ''">
- and jpag.pcs_name like concat('%',#{backblastWarnHanRec.pcsName},'%')
- </if>
- <if test="backblastWarnHanRec.houseCode != null and backblastWarnHanRec.houseCode != ''">
- and jbwhr.house_code = #{backblastWarnHanRec.houseCode}
- </if>
- <if test="backblastWarnHanRec.address != null and backblastWarnHanRec.address != ''">
- and jbwhr.address like concat('%',#{backblastWarnHanRec.address},'%')
- </if>
- <if test="backblastWarnHanRec.recContent != null and backblastWarnHanRec.recContent != ''">
- and jbwhr.rec_content like concat('%',#{backblastWarnHanRec.recContent},'%')
- </if>
- <if test="backblastWarnHanRec.policeman != null and backblastWarnHanRec.policeman != ''">
- and jbwhr.policeman like concat('%',#{backblastWarnHanRec.policeman},'%')
- </if>
- <if test="backblastWarnHanRec.policemanPhone != null and backblastWarnHanRec.policemanPhone != ''">
- and jbwhr.policeman_phone like concat('%',#{backblastWarnHanRec.policemanPhone},'%')
- </if>
- <if test="backblastWarnHanRec.startTime != null and backblastWarnHanRec.startTime != ''">
- and date_format(jbwhr.create_time,'%Y-%m-%d') >= #{backblastWarnHanRec.startTime}
- </if>
- <if test="backblastWarnHanRec.endTime != null and backblastWarnHanRec.endTime != ''">
- and date_format(jbwhr.create_time,'%Y-%m-%d') <= #{backblastWarnHanRec.endTime}
- </if>
- <if test="backblastWarnHanRec.createUser != null">
- and jbwhr.create_user = #{backblastWarnHanRec.createUser}
- </if>
- <if test="backblastWarnHanRec.searchKey!=null and backblastWarnHanRec.searchKey!=''">
- and CONCAT(
- ifnull(jbwhr.policeman_phone,''),
- ifnull(jbwhr.address,''),
- ifnull(jbwhr.rec_content,''),
- ifnull(jbwhr.policeman,'')
- ) like CONCAT ('%', #{backblastWarnHanRec.searchKey},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="backblastWarnHanRec.roleName != null and backblastWarnHanRec.roleName != ''">
- <if test="backblastWarnHanRec.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="backblastWarnHanRec.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jbwhr.id desc,jbwhr.create_time desc
- </select>
-
- <!--自定义分页列表查询-->
- <select id="getDetail" resultType="org.springblade.modules.backblast.vo.BackblastWarnHanRecVO">
- select
- jbwhr.*,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName
- from jczz_backblast_warn_han_rec jbwhr
- LEFT JOIN jczz_grid jg on jg.grid_code = jbwhr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jbwhr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jbwhr.is_deleted = 0
- <if test="backblastWarnHanRec.townName != null and backblastWarnHanRec.townName != ''">
- and br.town_name like concat('%',#{backblastWarnHanRec.townName},'%')
- </if>
- <if test="backblastWarnHanRec.communityName != null and backblastWarnHanRec.communityName != ''">
- and jbr.name like concat('%',#{backblastWarnHanRec.communityName},'%')
- </if>
- <if test="backblastWarnHanRec.pcsName != null and backblastWarnHanRec.pcsName != ''">
- and jpag.pcs_name like concat('%',#{backblastWarnHanRec.pcsName},'%')
- </if>
- <if test="backblastWarnHanRec.houseCode != null and backblastWarnHanRec.houseCode != ''">
- and jbwhr.house_code = #{backblastWarnHanRec.houseCode}
- </if>
- <if test="backblastWarnHanRec.id != null">
- and jbwhr.id = #{backblastWarnHanRec.id}
- </if>
- <if test="backblastWarnHanRec.address != null and backblastWarnHanRec.address != ''">
- and jbwhr.address like concat('%',#{backblastWarnHanRec.address},'%')
- </if>
- <if test="backblastWarnHanRec.recContent != null and backblastWarnHanRec.recContent != ''">
- and jbwhr.rec_content like concat('%',#{backblastWarnHanRec.recContent},'%')
- </if>
- <if test="backblastWarnHanRec.policeman != null and backblastWarnHanRec.policeman != ''">
- and jbwhr.policeman like concat('%',#{backblastWarnHanRec.policeman},'%')
- </if>
- <if test="backblastWarnHanRec.policemanPhone != null and backblastWarnHanRec.policemanPhone != ''">
- and jbwhr.policeman_phone like concat('%',#{backblastWarnHanRec.policemanPhone},'%')
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/backblast/service/IBackblastPubPersonService.java b/src/main/java/org/springblade/modules/backblast/service/IBackblastPubPersonService.java
deleted file mode 100644
index eee31c9..0000000
--- a/src/main/java/org/springblade/modules/backblast/service/IBackblastPubPersonService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
-
-/**
- * 反炸宣传对象表 服务类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public interface IBackblastPubPersonService extends IService<BackblastPubPersonEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param BackblastPubPerson
- * @return
- */
- IPage<BackblastPubPersonVO> selectBackblastPubPersonPage(IPage<BackblastPubPersonVO> page, BackblastPubPersonVO BackblastPubPerson);
-
- /**
- * 反炸宣传对象表 自定义详情
- * @param BackblastPubPerson
- * @return
- */
- BackblastPubPersonVO getDetail(BackblastPubPersonVO BackblastPubPerson);
-}
diff --git a/src/main/java/org/springblade/modules/backblast/service/IBackblastPubRecordService.java b/src/main/java/org/springblade/modules/backblast/service/IBackblastPubRecordService.java
deleted file mode 100644
index 5ccbdf6..0000000
--- a/src/main/java/org/springblade/modules/backblast/service/IBackblastPubRecordService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 反炸宣传记录表 服务类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public interface IBackblastPubRecordService extends IService<BackblastPubRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param backblastPubRecord
- * @return
- */
- IPage<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage<BackblastPubRecordVO> page, BackblastPubRecordVO backblastPubRecord);
-
-
- /**
- * 反炸宣传记录表 自定义新增/修改
- * @param backblastPubRecord
- * @return
- */
- boolean addOrUpdateBackblastPubRecordEntity(BackblastPubRecordVO backblastPubRecord);
-
- /**
- * 反炸宣传记录表 自定义详情
- * @param backblastPubRecord
- * @return
- */
- BackblastPubRecordVO getDetail(BackblastPubRecordVO backblastPubRecord);
-
- /**
- * 反炸宣传记录表 删除
- */
- boolean removeBackblastPubByIds(List<Long> toLongList);
-}
diff --git a/src/main/java/org/springblade/modules/backblast/service/IBackblastWarnHanRecService.java b/src/main/java/org/springblade/modules/backblast/service/IBackblastWarnHanRecService.java
deleted file mode 100644
index 0b2cbcb..0000000
--- a/src/main/java/org/springblade/modules/backblast/service/IBackblastWarnHanRecService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 反炸预警处置记录表 服务类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public interface IBackblastWarnHanRecService extends IService<BackblastWarnHanRecEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param backblastWarnHanRec
- * @return
- */
- IPage<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage<BackblastWarnHanRecVO> page, BackblastWarnHanRecVO backblastWarnHanRec);
-
-
- /**
- * 反炸预警处置记录表 自定义新增或修改
- * @param backblastWarnHanRec
- * @return
- */
- boolean saveOrUpdateBackblastWarnHanRecEntity(BackblastWarnHanRecEntity backblastWarnHanRec);
-
- /**
- * 反炸预警处置记录表 自定义详情
- * @param backblastWarnHanRec
- * @return
- */
- BackblastWarnHanRecVO getDetail(BackblastWarnHanRecVO backblastWarnHanRec);
-}
diff --git a/src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubPersonServiceImpl.java b/src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubPersonServiceImpl.java
deleted file mode 100644
index a536e00..0000000
--- a/src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubPersonServiceImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.springblade.modules.backblast.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.param.GridSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.mapper.BackblastPubPersonMapper;
-import org.springblade.modules.backblast.service.IBackblastPubPersonService;
-import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 反炸宣传对象表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Service
-public class BackblastPubPersonServiceImpl extends ServiceImpl<BackblastPubPersonMapper, BackblastPubPersonEntity> implements IBackblastPubPersonService {
-
- /**
- * 自定义分页列表查询
- * @param page
- * @param backblastPubPerson
- * @return
- */
- @Override
- public IPage<BackblastPubPersonVO> selectBackblastPubPersonPage(IPage<BackblastPubPersonVO> page, BackblastPubPersonVO backblastPubPerson) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubPersonVO.class, backblastPubPerson);
- return page.setRecords(baseMapper.selectBackblastPubPersonPage(page,
- backblastPubPerson,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList()));
- }
-
- /**
- * 反炸宣传对象表 自定义详情
- * @param backblastPubPerson
- * @return
- */
- @Override
- public BackblastPubPersonVO getDetail(BackblastPubPersonVO backblastPubPerson) {
- return baseMapper.getDetail(backblastPubPerson);
- }
-}
diff --git a/src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubRecordServiceImpl.java b/src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubRecordServiceImpl.java
deleted file mode 100644
index 83214f3..0000000
--- a/src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubRecordServiceImpl.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package org.springblade.modules.backblast.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.param.GridSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.backblast.service.IBackblastPubPersonService;
-import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
-import org.springblade.modules.backblast.mapper.BackblastPubRecordMapper;
-import org.springblade.modules.backblast.service.IBackblastPubRecordService;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.service.IPlacePractitionerService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 反炸宣传记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Service
-public class BackblastPubRecordServiceImpl extends ServiceImpl<BackblastPubRecordMapper, BackblastPubRecordEntity> implements IBackblastPubRecordService {
-
- /**
- * 自定义分页列表查询
- * @param page
- * @param backblastPubRecord
- * @return
- */
- @Override
- public IPage<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage<BackblastPubRecordVO> page, BackblastPubRecordVO backblastPubRecord) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubRecordVO.class, backblastPubRecord);
- if (!Strings.isBlank(backblastPubRecord.getRoleName())){
- backblastPubRecord.setCreateUser(AuthUtil.getUserId());
- }
- return page.setRecords(baseMapper.selectBackblastPubRecordPage(page,
- backblastPubRecord,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList()));
- }
-
- /**
- * 反炸宣传记录表 自定义新增/修改
- * @param backblastPubRecord
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean addOrUpdateBackblastPubRecordEntity(BackblastPubRecordVO backblastPubRecord) {
- backblastPubRecord.setCreateUser(AuthUtil.getUserId());
- boolean flag = false;
- // 点落面计算警格,网格,警格
- setGridInfo(backblastPubRecord);
- // 设置民警姓名电话(非民警暂时也记录)
- User user = SpringUtils.getBean(IUserService.class).getById(AuthUtil.getUserId());
- if (null!=user){
- backblastPubRecord.setPoliceman(user.getRealName());
- backblastPubRecord.setPolicemanPhone(user.getPhone());
- }
- if (null!=backblastPubRecord.getId()){
- // 更新
- flag = updateById(backblastPubRecord);
- }else {
- // 新增
- flag = save(backblastPubRecord);
- }
- // 宣防对象操作
- updateBackblastPubPerson(backblastPubRecord);
- // 返回
- return flag;
- }
-
- /**
- * 宣防对象操作
- * @param backblastPubRecord
- * @return
- */
- public void updateBackblastPubPerson(BackblastPubRecordVO backblastPubRecord) {
- IBackblastPubPersonService backblastPubPersonService = SpringUtil.getBean(IBackblastPubPersonService.class);
- if (backblastPubRecord.getBackblastPubPersonEntityList().size()>0){
- // 查询对应已存在的反诈宣传对象
- QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("backblast_pub_record_id", backblastPubRecord.getId()).eq("is_deleted",0);
- List<BackblastPubPersonEntity> oldList = backblastPubPersonService.list(wrapper);
- // 取出反诈宣传对象信息
- List<BackblastPubPersonEntity> backblastPubPersonEntityList = backblastPubRecord.getBackblastPubPersonEntityList();
- for (BackblastPubPersonEntity pubPersonEntity : backblastPubPersonEntityList) {
- pubPersonEntity.setBackblastPubRecordId(backblastPubRecord.getId());
- }
- // 申明新增,修改,删除集合
- List<BackblastPubPersonEntity> newList = new ArrayList<>();
- List<BackblastPubPersonEntity> addList = new ArrayList<>();
- List<BackblastPubPersonEntity> updateList = new ArrayList<>();
- List<BackblastPubPersonEntity> removeList = new ArrayList<>();
- // 遍历设置数据
- for (BackblastPubPersonEntity pubPersonEntity : backblastPubPersonEntityList) {
- if (null == pubPersonEntity.getId()) {
- // 新增
- addList.add(pubPersonEntity);
- } else {
- newList.add(pubPersonEntity);
- }
- }
- // 遍历去差集,判断是新增还是删除还是更新
- // 取旧数据和新提交数据差集--删除
- removeList = oldList.stream().filter(vo -> !newList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
- // 取旧数据和新提交数据交集--更新
- updateList = newList.stream().filter(vo -> oldList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
-
- // 批量新增
- if (addList.size() > 0) {
- backblastPubPersonService.saveBatch(addList);
- }
- // 批量修改
- if (updateList.size() > 0) {
- backblastPubPersonService.updateBatchById(updateList);
- }
- // 批量删除
- if (removeList.size() > 0) {
- backblastPubPersonService.removeBatchByIds(removeList);
- }
- }else {
- // 删除所有
- QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("backblast_pub_record_id", backblastPubRecord.getId());
- boolean remove = backblastPubPersonService.remove(wrapper);
- }
- }
-
- /**
- * 设置警格网格信息
- * @param backblastPubRecord
- */
- public void setGridInfo(BackblastPubRecordVO backblastPubRecord) {
- // 根据位置设置网格,警格编号
- IGridService gridService = SpringUtils.getBean(IGridService.class);
- IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
- String point = "'POINT(" + backblastPubRecord.getLng() + " " + backblastPubRecord.getLat() + ")'";
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size()>0){
- GridEntity gridEntity = gridEntityList.get(0);
- backblastPubRecord.setGridCode(gridEntity.getGridCode());
- }
- //点坐标解析警格
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
- if (policeAffairsGridEntityList.size()>0){
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
- backblastPubRecord.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
- }
- }
-
- /**
- * 反炸宣传记录表 自定义详情
- * @param backblastPubRecord
- * @return
- */
- @Override
- public BackblastPubRecordVO getDetail(BackblastPubRecordVO backblastPubRecord) {
- return baseMapper.getDetail(backblastPubRecord);
- }
-
- /**
- * 反炸宣传记录表 删除
- */
- @Override
- public boolean removeBackblastPubByIds(List<Long> toLongList) {
- // 先删除对应的宣传记录
- boolean flag = removeByIds(toLongList);
- // 再删除对应的宣传对象信息
- if (flag){
- IBackblastPubPersonService backblastPubPersonService = SpringUtil.getBean(IBackblastPubPersonService.class);
- for (Long id : toLongList) {
- // 删除所有
- QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("backblast_pub_record_id", id);
- backblastPubPersonService.remove(wrapper);
- }
- }
- return flag;
- }
-}
diff --git a/src/main/java/org/springblade/modules/backblast/service/impl/BackblastWarnHanRecServiceImpl.java b/src/main/java/org/springblade/modules/backblast/service/impl/BackblastWarnHanRecServiceImpl.java
deleted file mode 100644
index e67f039..0000000
--- a/src/main/java/org/springblade/modules/backblast/service/impl/BackblastWarnHanRecServiceImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.springblade.modules.backblast.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.param.GridSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
-import org.springblade.modules.backblast.mapper.BackblastWarnHanRecMapper;
-import org.springblade.modules.backblast.service.IBackblastWarnHanRecService;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 反炸预警处置记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Service
-public class BackblastWarnHanRecServiceImpl extends ServiceImpl<BackblastWarnHanRecMapper, BackblastWarnHanRecEntity> implements IBackblastWarnHanRecService {
-
- /**
- * 自定义分页查询
- * @param page
- * @param backblastWarnHanRec
- * @return
- */
- @Override
- public IPage<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage<BackblastWarnHanRecVO> page, BackblastWarnHanRecVO backblastWarnHanRec) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastWarnHanRecVO.class, backblastWarnHanRec);
- if (!Strings.isBlank(backblastWarnHanRec.getRoleName())){
- backblastWarnHanRec.setCreateUser(AuthUtil.getUserId());
- }
- return page.setRecords(baseMapper.selectBackblastWarnHanRecPage(page,
- backblastWarnHanRec,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList()));
- }
-
- /**
- * 自定义新增/修改
- * @param backblastWarnHanRec
- * @return
- */
- @Override
- public boolean saveOrUpdateBackblastWarnHanRecEntity(BackblastWarnHanRecEntity backblastWarnHanRec) {
- // 点落面计算警格,网格,警格
- GridSet invoke = new GridSet().invoke(BackblastWarnHanRecEntity.class, backblastWarnHanRec,
- "lng", "lat", "gridCode", "jwGridCode");
- // 设置民警姓名电话(非民警暂时也记录)
- User user = SpringUtils.getBean(IUserService.class).getById(AuthUtil.getUserId());
- if (null!=user){
- backblastWarnHanRec.setPoliceman(user.getRealName());
- backblastWarnHanRec.setPolicemanPhone(user.getPhone());
- }
- if (null!=backblastWarnHanRec.getId()){
- // 更新
- return updateById(backblastWarnHanRec);
- }
- // 新增
- return save(backblastWarnHanRec);
- }
-
- /**
- * 反炸预警处置记录表 自定义详情
- * @param backblastWarnHanRec
- * @return
- */
- @Override
- public BackblastWarnHanRecVO getDetail(BackblastWarnHanRecVO backblastWarnHanRec) {
- return baseMapper.getDetail(backblastWarnHanRec);
- }
-}
diff --git a/src/main/java/org/springblade/modules/backblast/vo/BackblastPubPersonVO.java b/src/main/java/org/springblade/modules/backblast/vo/BackblastPubPersonVO.java
deleted file mode 100644
index f1157bc..0000000
--- a/src/main/java/org/springblade/modules/backblast/vo/BackblastPubPersonVO.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-
-/**
- * 反诈宣传宣防对象表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class BackblastPubPersonVO extends BackblastPubPersonEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
-
- @ApiModelProperty(value = "角色别名", example = "")
- private String roleName;
-
- /**
- * 搜索关键字
- */
- @ApiModelProperty(value = "搜索关键字", example = "")
- private String searchKey;
-
- /**
- * 开始时间
- */
- @ApiModelProperty(value = "开始时间", example = "")
- private String startTime;
-
- /**
- * 结束时间
- */
- @ApiModelProperty(value = "结束时间", example = "")
- private String endTime;
-
- /**
- * 乡镇名称
- */
- @ApiModelProperty(value = "乡镇名称", example = "")
- private String townName;
-
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称", example = "")
- private String pcsName;
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/vo/BackblastPubRecordVO.java b/src/main/java/org/springblade/modules/backblast/vo/BackblastPubRecordVO.java
deleted file mode 100644
index 35306d9..0000000
--- a/src/main/java/org/springblade/modules/backblast/vo/BackblastPubRecordVO.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 反炸宣传记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class BackblastPubRecordVO extends BackblastPubRecordEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
-
- @ApiModelProperty(value = "角色别名", example = "")
- private String roleName;
-
- /**
- * 搜索关键字
- */
- @ApiModelProperty(value = "搜索关键字", example = "")
- private String searchKey;
-
- /**
- * 开始时间
- */
- @ApiModelProperty(value = "开始时间", example = "")
- private String startTime;
-
- /**
- * 结束时间
- */
- @ApiModelProperty(value = "结束时间", example = "")
- private String endTime;
-
- /**
- * 乡镇名称
- */
- @ApiModelProperty(value = "乡镇名称", example = "")
- private String townName;
-
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称", example = "")
- private String pcsName;
-
- /**
- * 反诈宣防对象
- */
- @ApiModelProperty(value = "反诈宣防对象", example = "")
- private List<BackblastPubPersonEntity> backblastPubPersonEntityList = new ArrayList<>();
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/vo/BackblastWarnHanRecVO.java b/src/main/java/org/springblade/modules/backblast/vo/BackblastWarnHanRecVO.java
deleted file mode 100644
index 8346254..0000000
--- a/src/main/java/org/springblade/modules/backblast/vo/BackblastWarnHanRecVO.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 反炸预警处置记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class BackblastWarnHanRecVO extends BackblastWarnHanRecEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
-
- @ApiModelProperty(value = "角色别名", example = "")
- private String roleName;
-
- /**
- * 搜索关键字
- */
- @ApiModelProperty(value = "搜索关键字", example = "")
- private String searchKey;
-
- /**
- * 开始时间
- */
- @ApiModelProperty(value = "开始时间", example = "")
- private String startTime;
-
- /**
- * 结束时间
- */
- @ApiModelProperty(value = "结束时间", example = "")
- private String endTime;
-
- /**
- * 乡镇名称
- */
- @ApiModelProperty(value = "乡镇名称", example = "")
- private String townName;
-
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称", example = "")
- private String pcsName;
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubPersonWrapper.java b/src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubPersonWrapper.java
deleted file mode 100644
index e805f32..0000000
--- a/src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubPersonWrapper.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.springblade.modules.backblast.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
-import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
-import java.util.Objects;
-
-/**
- * 反炸宣传记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public class BackblastPubPersonWrapper extends BaseEntityWrapper<BackblastPubPersonEntity, BackblastPubPersonVO> {
-
- public static BackblastPubPersonWrapper build() {
- return new BackblastPubPersonWrapper();
- }
-
- @Override
- public BackblastPubPersonVO entityVO(BackblastPubPersonEntity backblastPubRecord) {
- BackblastPubPersonVO backblastPubRecordVO = Objects.requireNonNull(BeanUtil.copy(backblastPubRecord, BackblastPubPersonVO.class));
-
- //User createUser = UserCache.getUser(backblastPubRecord.getCreateUser());
- //User updateUser = UserCache.getUser(backblastPubRecord.getUpdateUser());
- //backblastPubRecordVO.setCreateUserName(createUser.getName());
- //backblastPubRecordVO.setUpdateUserName(updateUser.getName());
-
- return backblastPubRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubRecordWrapper.java b/src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubRecordWrapper.java
deleted file mode 100644
index ab8e442..0000000
--- a/src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubRecordWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
-import java.util.Objects;
-
-/**
- * 反炸宣传记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public class BackblastPubRecordWrapper extends BaseEntityWrapper<BackblastPubRecordEntity, BackblastPubRecordVO> {
-
- public static BackblastPubRecordWrapper build() {
- return new BackblastPubRecordWrapper();
- }
-
- @Override
- public BackblastPubRecordVO entityVO(BackblastPubRecordEntity backblastPubRecord) {
- BackblastPubRecordVO backblastPubRecordVO = Objects.requireNonNull(BeanUtil.copy(backblastPubRecord, BackblastPubRecordVO.class));
-
- //User createUser = UserCache.getUser(backblastPubRecord.getCreateUser());
- //User updateUser = UserCache.getUser(backblastPubRecord.getUpdateUser());
- //backblastPubRecordVO.setCreateUserName(createUser.getName());
- //backblastPubRecordVO.setUpdateUserName(updateUser.getName());
-
- return backblastPubRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/backblast/wrapper/BackblastWarnHanRecWrapper.java b/src/main/java/org/springblade/modules/backblast/wrapper/BackblastWarnHanRecWrapper.java
deleted file mode 100644
index 4db9875..0000000
--- a/src/main/java/org/springblade/modules/backblast/wrapper/BackblastWarnHanRecWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.backblast.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
-import java.util.Objects;
-
-/**
- * 反炸预警处置记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-15
- */
-public class BackblastWarnHanRecWrapper extends BaseEntityWrapper<BackblastWarnHanRecEntity, BackblastWarnHanRecVO> {
-
- public static BackblastWarnHanRecWrapper build() {
- return new BackblastWarnHanRecWrapper();
- }
-
- @Override
- public BackblastWarnHanRecVO entityVO(BackblastWarnHanRecEntity backblastWarnHanRec) {
- BackblastWarnHanRecVO backblastWarnHanRecVO = Objects.requireNonNull(BeanUtil.copy(backblastWarnHanRec, BackblastWarnHanRecVO.class));
-
- //User createUser = UserCache.getUser(backblastWarnHanRec.getCreateUser());
- //User updateUser = UserCache.getUser(backblastWarnHanRec.getUpdateUser());
- //backblastWarnHanRecVO.setCreateUserName(createUser.getName());
- //backblastWarnHanRecVO.setUpdateUserName(updateUser.getName());
-
- return backblastWarnHanRecVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/controller/CategoryController.java b/src/main/java/org/springblade/modules/category/controller/CategoryController.java
deleted file mode 100644
index 1755f72..0000000
--- a/src/main/java/org/springblade/modules/category/controller/CategoryController.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.category.excel.CategoryExcel;
-import org.springblade.modules.category.excel.CategoryImporter;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.vo.CategoryVO;
-import org.springblade.modules.category.wrapper.CategoryWrapper;
-import org.springblade.modules.category.service.ICategoryService;
-import org.springframework.web.multipart.MultipartFile;
-import java.util.List;
-
-/**
- * 天地图poi 分类表 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-category/category")
-@Api(value = "天地图poi 分类表", tags = "天地图poi 分类表接口")
-public class CategoryController{
-
- private final ICategoryService categoryService;
-
- /**
- * 天地图poi 分类表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入category")
- public R<CategoryVO> detail(CategoryEntity category) {
- CategoryEntity detail = categoryService.getOne(Condition.getQueryWrapper(category));
- return R.data(CategoryWrapper.build().entityVO(detail));
- }
- /**
- * 天地图poi 分类表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入category")
- public R<IPage<CategoryVO>> list(CategoryEntity category, Query query) {
- IPage<CategoryEntity> pages = categoryService.page(Condition.getPage(query), Condition.getQueryWrapper(category));
- return R.data(CategoryWrapper.build().pageVO(pages));
- }
-
- /**
- * 天地图poi 分类表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入category")
- public R<IPage<CategoryVO>> page(CategoryVO category, Query query) {
- IPage<CategoryVO> pages = categoryService.selectCategoryPage(Condition.getPage(query), category);
- return R.data(pages);
- }
-
- /**
- * 天地图poi 分类表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入category")
- public R save(@Valid @RequestBody CategoryEntity category) {
- return R.status(categoryService.save(category));
- }
-
- /**
- * 天地图poi 分类表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入category")
- public R update(@Valid @RequestBody CategoryEntity category) {
- return R.status(categoryService.updateById(category));
- }
-
- /**
- * 天地图poi 分类表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入category")
- public R submit(@Valid @RequestBody CategoryEntity category) {
- return R.status(categoryService.saveOrUpdate(category));
- }
-
- /**
- * 天地图poi 分类表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(categoryService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 标签管理 分页
- */
- @GetMapping("/tree")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "树形接口", notes = "传入label")
- public R<List<TreeIntegerNode>> tree(CategoryVO category) {
- List<TreeIntegerNode> pages = categoryService.tree(category);
- return R.data( pages);
- }
-
- /**
- * 天地图poi 分类获取
- */
- @GetMapping("/getCategory")
- public R getCategory(CategoryVO category) {
- return R.data(categoryService.getCategory(category));
- }
-
- /**
- * 天地图poi 导入
- */
- @PostMapping("/import-category")
- public R importCategory(MultipartFile file, Integer isCovered) {
- CategoryImporter categoryImporter = new CategoryImporter(categoryService, isCovered == 1);
- ExcelUtil.save(file, categoryImporter, CategoryExcel.class);
- return R.success("操作成功");
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/controller/CategoryLabelController.java b/src/main/java/org/springblade/modules/category/controller/CategoryLabelController.java
deleted file mode 100644
index 974c0b3..0000000
--- a/src/main/java/org/springblade/modules/category/controller/CategoryLabelController.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import org.springblade.modules.category.vo.CategoryLabelVO;
-import org.springblade.modules.category.wrapper.CategoryLabelWrapper;
-import org.springblade.modules.category.service.ICategoryLabelService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 场所标签临时表 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-categoryLabel/categoryLabel")
-@Api(value = "场所标签临时表", tags = "场所标签临时表接口")
-public class CategoryLabelController{
-
- private final ICategoryLabelService categoryLabelService;
-
- /**
- * 场所标签临时表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入categoryLabel")
- public R<CategoryLabelVO> detail(CategoryLabelEntity categoryLabel) {
- CategoryLabelEntity detail = categoryLabelService.getOne(Condition.getQueryWrapper(categoryLabel));
- return R.data(CategoryLabelWrapper.build().entityVO(detail));
- }
- /**
- * 场所标签临时表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入categoryLabel")
- public R<IPage<CategoryLabelVO>> list(CategoryLabelEntity categoryLabel, Query query) {
- IPage<CategoryLabelEntity> pages = categoryLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(categoryLabel));
- return R.data(CategoryLabelWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所标签临时表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入categoryLabel")
- public R<IPage<CategoryLabelVO>> page(CategoryLabelVO categoryLabel, Query query) {
- IPage<CategoryLabelVO> pages = categoryLabelService.selectCategoryLabelPage(Condition.getPage(query), categoryLabel);
- return R.data(pages);
- }
-
- /**
- * 场所标签临时表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入categoryLabel")
- public R save(@Valid @RequestBody CategoryLabelEntity categoryLabel) {
- return R.status(categoryLabelService.save(categoryLabel));
- }
-
- /**
- * 场所标签临时表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入categoryLabel")
- public R update(@Valid @RequestBody CategoryLabelEntity categoryLabel) {
- return R.status(categoryLabelService.updateById(categoryLabel));
- }
-
- /**
- * 场所标签临时表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入categoryLabel")
- public R submit(@Valid @RequestBody CategoryLabelEntity categoryLabel) {
- return R.status(categoryLabelService.saveOrUpdate(categoryLabel));
- }
-
- /**
- * 场所标签临时表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(categoryLabelService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 场所标签临时表 分页
- */
- @GetMapping("/getAllList")
- public R getAllList(CategoryLabelVO categoryLabel) {
- return R.data(categoryLabelService.list());
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/dto/CategoryDTO.java b/src/main/java/org/springblade/modules/category/dto/CategoryDTO.java
deleted file mode 100644
index 043ecb3..0000000
--- a/src/main/java/org/springblade/modules/category/dto/CategoryDTO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.category.entity.CategoryEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 天地图poi 分类表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CategoryDTO extends CategoryEntity {
- private static final long serialVersionUID = 1L;
- @ApiModelProperty("场所id")
- private String placeId;
-}
diff --git a/src/main/java/org/springblade/modules/category/dto/CategoryLabelDTO.java b/src/main/java/org/springblade/modules/category/dto/CategoryLabelDTO.java
deleted file mode 100644
index 504b1cc..0000000
--- a/src/main/java/org/springblade/modules/category/dto/CategoryLabelDTO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.dto;
-
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所标签临时表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CategoryLabelDTO extends CategoryLabelEntity {
- private static final long serialVersionUID = 1L;
-
- private String placeId;
-
-}
diff --git a/src/main/java/org/springblade/modules/category/entity/CategoryEntity.java b/src/main/java/org/springblade/modules/category/entity/CategoryEntity.java
deleted file mode 100644
index 88056eb..0000000
--- a/src/main/java/org/springblade/modules/category/entity/CategoryEntity.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-
-/**
- * 天地图poi 分类表 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_category")
-@ApiModel(value = "Category对象", description = "天地图poi 分类表")
-public class CategoryEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 分类代码
- */
- @ApiModelProperty(value = "分类代码")
- private String categoryNo;
- /**
- * 分类名称
- */
- @ApiModelProperty(value = "分类名称")
- private String categoryName;
- /**
- * 父级编码
- */
- @ApiModelProperty(value = "父级编码")
- private String parentNo;
- /**
- * 重要度
- */
- @ApiModelProperty(value = "重要度")
- private String importance;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
- /**
- * 层级
- */
- @ApiModelProperty(value = "层级")
- private Integer level;
- /**
- * 提示词分类描述
- */
- @ApiModelProperty(value = "提示词分类描述")
- private String description;
-
- /**
- * 排序
- */
- @ApiModelProperty(value = "排序")
- private Integer sort;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/category/entity/CategoryLabelEntity.java b/src/main/java/org/springblade/modules/category/entity/CategoryLabelEntity.java
deleted file mode 100644
index 705a501..0000000
--- a/src/main/java/org/springblade/modules/category/entity/CategoryLabelEntity.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-
-/**
- * 场所标签临时表 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_category_label")
-@ApiModel(value = "CategoryLabel对象", description = "场所标签临时表")
-public class CategoryLabelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 分类代码
- */
- @ApiModelProperty(value = "分类代码")
- private String categoryNo;
- /**
- * 分类名称
- */
- @ApiModelProperty(value = "分类名称")
- private String categoryName;
- /**
- * 标签
- */
- @ApiModelProperty(value = "标签")
- private String label;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
-}
diff --git a/src/main/java/org/springblade/modules/category/excel/CategoryExcel.java b/src/main/java/org/springblade/modules/category/excel/CategoryExcel.java
deleted file mode 100644
index 3ae127f..0000000
--- a/src/main/java/org/springblade/modules/category/excel/CategoryExcel.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.springblade.modules.category.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import java.io.Serializable;
-
-/**
- * CategoryExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class CategoryExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 标签名称 */
- @ExcelProperty( "小类")
- private String categoryName;
-
- /** 标签编号 */
- @ExcelProperty( "类别代码")
- private String categoryNo;
-
- /** 层级 */
- @ExcelProperty( "层级")
- private Integer level;
-
- /** 提示词分类描述 */
- @ExcelProperty( "提示词分类描述")
- private String description;
-
- /** 备注 */
- @ExcelProperty( "备注")
- private String remark;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/category/excel/CategoryImporter.java b/src/main/java/org/springblade/modules/category/excel/CategoryImporter.java
deleted file mode 100644
index 5ab894f..0000000
--- a/src/main/java/org/springblade/modules/category/excel/CategoryImporter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.category.service.ICategoryService;
-import java.util.List;
-
-/**
- * 场所标签poi数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class CategoryImporter implements ExcelImporter<CategoryExcel> {
-
- private final ICategoryService categoryService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<CategoryExcel> data) {
- categoryService.importCategory(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/category/mapper/CategoryLabelMapper.java b/src/main/java/org/springblade/modules/category/mapper/CategoryLabelMapper.java
deleted file mode 100644
index ecaacc0..0000000
--- a/src/main/java/org/springblade/modules/category/mapper/CategoryLabelMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.mapper;
-
-import org.springblade.modules.category.dto.CategoryLabelDTO;
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import org.springblade.modules.category.vo.CategoryLabelVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 场所标签临时表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface CategoryLabelMapper extends BaseMapper<CategoryLabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param categoryLabel
- * @return
- */
- List<CategoryLabelVO> selectCategoryLabelPage(IPage page, CategoryLabelVO categoryLabel);
-
- /**
- * 查询场所标签临时表
- *
- * @param id 场所标签临时表ID
- * @return 场所标签临时表
- */
- public CategoryLabelDTO selectCategoryLabelById(Integer id);
-
- /**
- * 查询场所标签临时表列表
- *
- * @param categoryLabelDTO 场所标签临时表
- * @return 场所标签临时表集合
- */
- public List<CategoryLabelDTO> selectCategoryLabelList(CategoryLabelDTO categoryLabelDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/mapper/CategoryLabelMapper.xml b/src/main/java/org/springblade/modules/category/mapper/CategoryLabelMapper.xml
deleted file mode 100644
index 46db1f2..0000000
--- a/src/main/java/org/springblade/modules/category/mapper/CategoryLabelMapper.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.category.mapper.CategoryLabelMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="categoryLabelResultMap" type="org.springblade.modules.category.entity.CategoryLabelEntity">
- <result column="id" property="id"/>
- <result column="category_no" property="categoryNo"/>
- <result column="category_name" property="categoryName"/>
- <result column="label" property="label"/>
- <result column="remark" property="remark"/>
- </resultMap>
-
- <resultMap type="org.springblade.modules.category.dto.CategoryLabelDTO" id="CategoryLabelDTOResult">
- <result property="id" column="id" />
- <result property="categoryNo" column="category_no" />
- <result property="categoryName" column="category_name" />
- <result property="label" column="label" />
- <result property="remark" column="remark" />
- </resultMap>
-
- <sql id="selectCategoryLabel">
- select
- id,
- category_no,
- category_name,
- label,
- remark
- from
- jczz_category_label
- </sql>
-
-
- <select id="selectCategoryLabelById" parameterType="int" resultMap="CategoryLabelDTOResult">
- <include refid="selectCategoryLabel"/>
- where
- id = #{id}
- </select>
-
-
- <select id="selectCategoryLabelPage" resultMap="categoryLabelResultMap">
- select * from jczz_category_label where is_deleted = 0
- </select>
-
- <select id="selectCategoryLabelList" parameterType="org.springblade.modules.category.dto.CategoryLabelDTO" resultMap="CategoryLabelDTOResult">
- select
- jcl.id,
- jcl.category_no,
- jcl.category_name,
- jcl.label,
- jcl.remark
- from
- jczz_place_poi_label jppl LEFT JOIN jczz_category_label jcl on jcl.category_no=jppl.poi_code
- <where>
- <if test="id != null "> and jcl.id = #{id}</if>
- <if test="placeId != null and placeId != '' "> and jppl.place_id = #{placeId}</if>
- <if test="categoryNo != null and categoryNo != ''"> and jcl.category_no = #{categoryNo}</if>
- <if test="categoryName != null and categoryName != ''"> and cjcl.ategory_name = #{categoryName}</if>
- <if test="label != null and label != ''"> and jcl.label = #{label}</if>
- <if test="remark != null and remark != ''"> and jcl.remark = #{remark}</if>
- and jcl.category_no is not null
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.java b/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.java
deleted file mode 100644
index a83e4bc..0000000
--- a/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.mapper;
-
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.modules.category.dto.CategoryDTO;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.vo.CategoryVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 天地图poi 分类表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface CategoryMapper extends BaseMapper<CategoryEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param category
- * @return
- */
- List<CategoryVO> selectCategoryPage(IPage page, CategoryVO category);
-
-
- /**
- * 天地图poi 分类获取
- */
- List<CategoryVO> getCategory(@Param("category") CategoryVO category);
-
- /**
- * 查询场所标签
- * @param categoryDTO
- * @return
- */
- List<CategoryDTO> selectCategoryList(@Param("category") CategoryDTO categoryDTO);
-
- @MapKey("id")
- Map<Integer, TreeIntegerNode> getTreeList(CategoryVO category);
-}
diff --git a/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml b/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
deleted file mode 100644
index 0167d02..0000000
--- a/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.category.mapper.CategoryMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="categoryResultMap" type="org.springblade.modules.category.entity.CategoryEntity">
- <result column="id" property="id"/>
- <result column="category_no" property="categoryNo"/>
- <result column="category_name" property="categoryName"/>
- <result column="parent_no" property="parentNo"/>
- <result column="importance" property="importance"/>
- <result column="remark" property="remark"/>
- <result column="level" property="level"/>
- <result column="description" property="description"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectCategoryPage" resultMap="categoryResultMap">
- select * from jczz_category where is_deleted = 0
- </select>
-
- <!--天地图poi 分类获取-->
- <select id="getCategory" resultType="org.springblade.modules.category.vo.CategoryVO">
- select * from jczz_category
- where is_deleted = 0
- <if test="category.level!=null">
- and level = #{category.level}
- </if>
- <if test="category.parentNo!=null and category.parentNo!=''">
- and parent_no = #{category.parentNo}
- </if>
- order by -sort desc
- </select>
-
- <select id="selectCategoryList" resultType="org.springblade.modules.category.dto.CategoryDTO">
- select
- jc.id,
- jc.category_no,
- jc.category_name,
- jc.parent_no,
- jc.remark
- from
- jczz_place_poi_label jppl LEFT JOIN jczz_category jc on jc.category_no=jppl.poi_code
- <where>
- <if test="category.id != null ">and jc.id = #{category.id}</if>
- <if test="category.placeId != null and category.placeId != '' ">and jppl.place_id = #{category.placeId}</if>
- <if test="category.categoryNo != null and category.categoryNo != ''">and jc.category_no =
- #{category.categoryNo}
- </if>
- <if test="category.categoryName != null and category.categoryName != ''">and jc.ategory_name =
- #{category.categoryName}
- </if>
- <if test="category.remark != null and category.remark != ''">and jc.remark = #{category.remark}</if>
- and jppl.type = 3
- and jc.category_no is not null
- </where>
- </select>
-
-
- <select id="getTreeList" resultType="org.springblade.common.node.TreeIntegerNode">
- SELECT
- jc.category_no AS id,
- jc.id AS ids,
- jc.category_no,
- jc.parent_no AS parentId,
- jc.category_name AS name,
- jc.`level`,
- (
- SELECT
- count( 1 )
- FROM
- jczz_place jp
- LEFT JOIN jczz_place_poi_label jppl ON jp.id = jppl.place_id
- WHERE
- jc.category_no = jppl.poi_code
- AND jppl.type = 3
- ) count
- FROM
- jczz_category jc
- WHERE
- is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/category/service/ICategoryLabelService.java b/src/main/java/org/springblade/modules/category/service/ICategoryLabelService.java
deleted file mode 100644
index a61224d..0000000
--- a/src/main/java/org/springblade/modules/category/service/ICategoryLabelService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.category.dto.CategoryLabelDTO;
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import org.springblade.modules.category.vo.CategoryLabelVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 场所标签临时表 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface ICategoryLabelService extends IService<CategoryLabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param categoryLabel
- * @return
- */
- IPage<CategoryLabelVO> selectCategoryLabelPage(IPage<CategoryLabelVO> page, CategoryLabelVO categoryLabel);
-
- /**
- * 查询场所标签临时表列表
- *
- * @param categoryLabelDTO 场所标签临时表
- * @return 场所标签临时表集合
- */
- public List<CategoryLabelDTO> selectCategoryLabelList(CategoryLabelDTO categoryLabelDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/service/ICategoryService.java b/src/main/java/org/springblade/modules/category/service/ICategoryService.java
deleted file mode 100644
index 33b53a5..0000000
--- a/src/main/java/org/springblade/modules/category/service/ICategoryService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.modules.category.dto.CategoryDTO;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.excel.CategoryExcel;
-import org.springblade.modules.category.vo.CategoryVO;
-
-import java.util.List;
-
-/**
- * 天地图poi 分类表 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface ICategoryService extends IService<CategoryEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param category
- * @return
- */
- IPage<CategoryVO> selectCategoryPage(IPage<CategoryVO> page, CategoryVO category);
-
-
- /**
- * 天地图poi 分类获取
- */
- Object getCategory(CategoryVO category);
-
- /**
- * 查询场所的标签
- * @param categoryDTO
- * @return
- */
- List<CategoryDTO> selectCategoryLabelList(CategoryDTO categoryDTO);
-
- List<TreeIntegerNode> tree(CategoryVO category);
-
- /**
- * 标签导入
- * @param data
- * @param isCovered
- */
- void importCategory(List<CategoryExcel> data, Boolean isCovered);
-}
diff --git a/src/main/java/org/springblade/modules/category/service/impl/CategoryLabelServiceImpl.java b/src/main/java/org/springblade/modules/category/service/impl/CategoryLabelServiceImpl.java
deleted file mode 100644
index a4d37c9..0000000
--- a/src/main/java/org/springblade/modules/category/service/impl/CategoryLabelServiceImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.category.dto.CategoryLabelDTO;
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import org.springblade.modules.category.mapper.CategoryLabelMapper;
-import org.springblade.modules.category.service.ICategoryLabelService;
-import org.springblade.modules.category.vo.CategoryLabelVO;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 场所标签临时表 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class CategoryLabelServiceImpl extends ServiceImpl<CategoryLabelMapper, CategoryLabelEntity> implements ICategoryLabelService {
-
- @Override
- public IPage<CategoryLabelVO> selectCategoryLabelPage(IPage<CategoryLabelVO> page, CategoryLabelVO categoryLabel) {
- return page.setRecords(baseMapper.selectCategoryLabelPage(page, categoryLabel));
- }
-
- /**
- * 查询场所标签临时表列表
- *
- * @param categoryLabelDTO 场所标签临时表
- * @return 场所标签临时表集合
- */
- @Override
- public List<CategoryLabelDTO> selectCategoryLabelList(CategoryLabelDTO categoryLabelDTO) {
- return this.baseMapper.selectCategoryLabelList(categoryLabelDTO);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/service/impl/CategoryServiceImpl.java b/src/main/java/org/springblade/modules/category/service/impl/CategoryServiceImpl.java
deleted file mode 100644
index 704d5aa..0000000
--- a/src/main/java/org/springblade/modules/category/service/impl/CategoryServiceImpl.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.modules.category.dto.CategoryDTO;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.excel.CategoryExcel;
-import org.springblade.modules.category.vo.CategoryVO;
-import org.springblade.modules.category.mapper.CategoryMapper;
-import org.springblade.modules.category.service.ICategoryService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 天地图poi 分类表 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryEntity> implements ICategoryService {
-
- @Override
- public IPage<CategoryVO> selectCategoryPage(IPage<CategoryVO> page, CategoryVO category) {
- return page.setRecords(baseMapper.selectCategoryPage(page, category));
- }
-
- /**
- * 天地图poi 分类获取
- */
- @Override
- public Object getCategory(CategoryVO category) {
- return baseMapper.getCategory(category);
- }
- /**
- * 查询场所标签
- * @param categoryDTO
- * @return
- */
- @Override
- public List<CategoryDTO> selectCategoryLabelList(CategoryDTO categoryDTO) {
- return this.baseMapper.selectCategoryList(categoryDTO);
- }
-
- @Override
- public List<TreeIntegerNode> tree(CategoryVO category) {
- Map<Integer, TreeIntegerNode> labelTreeList = baseMapper.getTreeList(category);
- List<TreeIntegerNode> nodeTree = NodeTreeUtil.getNodeTree(labelTreeList);
- nodeTree.forEach(node -> recursion(node));
- return nodeTree;
- }
-
- private void recursion(TreeIntegerNode node) {
- if (node.getChildren() != null && node.getChildren().size() > 0) {
- node.getChildren().forEach(node2 -> recursion(node2));
- } else {
- node.setChildren(null);
- }
- }
-
- /**
- * 标签导入
- * @param data
- * @param isCovered
- */
- @Override
- public void importCategory(List<CategoryExcel> data, Boolean isCovered) {
- for (CategoryExcel categoryExcel : data) {
- // 查询是否已存在
- QueryWrapper<CategoryEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("category_no",categoryExcel.getCategoryNo()).eq("is_deleted",0);
- CategoryEntity one = getOne(wrapper);
- if (null==one){
- // 新增
- CategoryEntity categoryEntity = new CategoryEntity();
- categoryEntity.setCategoryNo(categoryExcel.getCategoryNo());
- categoryEntity.setCategoryName(categoryExcel.getCategoryName());
- categoryEntity.setLevel(categoryExcel.getLevel());
- categoryEntity.setIsDeleted(0);
- categoryEntity.setParentNo(categoryExcel.getCategoryNo().substring(0,4));
- categoryEntity.setDescription(categoryExcel.getDescription());
- categoryEntity.setRemark(categoryExcel.getRemark());
- // 新增
- save(categoryEntity);
- }
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/category/vo/CategoryLabelVO.java b/src/main/java/org/springblade/modules/category/vo/CategoryLabelVO.java
deleted file mode 100644
index bff5f71..0000000
--- a/src/main/java/org/springblade/modules/category/vo/CategoryLabelVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.vo;
-
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所标签临时表 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CategoryLabelVO extends CategoryLabelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/category/vo/CategoryVO.java b/src/main/java/org/springblade/modules/category/vo/CategoryVO.java
deleted file mode 100644
index 8989f9d..0000000
--- a/src/main/java/org/springblade/modules/category/vo/CategoryVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.vo;
-
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 天地图poi 分类表 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CategoryVO extends CategoryEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/category/wrapper/CategoryLabelWrapper.java b/src/main/java/org/springblade/modules/category/wrapper/CategoryLabelWrapper.java
deleted file mode 100644
index 9831fba..0000000
--- a/src/main/java/org/springblade/modules/category/wrapper/CategoryLabelWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.category.entity.CategoryLabelEntity;
-import org.springblade.modules.category.vo.CategoryLabelVO;
-import java.util.Objects;
-
-/**
- * 场所标签临时表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class CategoryLabelWrapper extends BaseEntityWrapper<CategoryLabelEntity, CategoryLabelVO> {
-
- public static CategoryLabelWrapper build() {
- return new CategoryLabelWrapper();
- }
-
- @Override
- public CategoryLabelVO entityVO(CategoryLabelEntity categoryLabel) {
- CategoryLabelVO categoryLabelVO = Objects.requireNonNull(BeanUtil.copy(categoryLabel, CategoryLabelVO.class));
-
- //User createUser = UserCache.getUser(categoryLabel.getCreateUser());
- //User updateUser = UserCache.getUser(categoryLabel.getUpdateUser());
- //categoryLabelVO.setCreateUserName(createUser.getName());
- //categoryLabelVO.setUpdateUserName(updateUser.getName());
-
- return categoryLabelVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/category/wrapper/CategoryWrapper.java b/src/main/java/org/springblade/modules/category/wrapper/CategoryWrapper.java
deleted file mode 100644
index 837f927..0000000
--- a/src/main/java/org/springblade/modules/category/wrapper/CategoryWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.category.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.vo.CategoryVO;
-import java.util.Objects;
-
-/**
- * 天地图poi 分类表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class CategoryWrapper extends BaseEntityWrapper<CategoryEntity, CategoryVO> {
-
- public static CategoryWrapper build() {
- return new CategoryWrapper();
- }
-
- @Override
- public CategoryVO entityVO(CategoryEntity category) {
- CategoryVO categoryVO = Objects.requireNonNull(BeanUtil.copy(category, CategoryVO.class));
-
- //User createUser = UserCache.getUser(category.getCreateUser());
- //User updateUser = UserCache.getUser(category.getUpdateUser());
- //categoryVO.setCreateUserName(createUser.getName());
- //categoryVO.setUpdateUserName(updateUser.getName());
-
- return categoryVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/controller/CheckInRecordsController.java b/src/main/java/org/springblade/modules/checkInRecords/controller/CheckInRecordsController.java
deleted file mode 100644
index 5b3dea5..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/controller/CheckInRecordsController.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-import org.springblade.modules.checkInRecords.vo.CheckInRecordsVO;
-import org.springblade.modules.checkInRecords.wrapper.CheckInRecordsWrapper;
-import org.springblade.modules.checkInRecords.service.ICheckInRecordsService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 打卡记录表 控制器
- *
- * @author BladeX
- * @since 2023-12-04
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-checkInRecords/checkInRecords")
-@Api(value = "打卡记录表", tags = "打卡记录表接口")
-public class CheckInRecordsController extends BladeController {
-
- private final ICheckInRecordsService checkInRecordsService;
-
- /**
- * 打卡记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入checkInRecords")
- public R<CheckInRecordsVO> detail(CheckInRecordsEntity checkInRecords) {
- CheckInRecordsEntity detail = checkInRecordsService.getOne(Condition.getQueryWrapper(checkInRecords));
- return R.data(CheckInRecordsWrapper.build().entityVO(detail));
- }
- /**
- * 打卡记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入checkInRecords")
- public R<IPage<CheckInRecordsVO>> list(CheckInRecordsEntity checkInRecords, Query query) {
- IPage<CheckInRecordsEntity> pages = checkInRecordsService.page(Condition.getPage(query), Condition.getQueryWrapper(checkInRecords));
- return R.data(CheckInRecordsWrapper.build().pageVO(pages));
- }
-
- /**
- * 打卡记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入checkInRecords")
- public R<IPage<CheckInRecordsVO>> page(CheckInRecordsVO checkInRecords, Query query) {
- IPage<CheckInRecordsVO> pages = checkInRecordsService.selectCheckInRecordsPage(Condition.getPage(query), checkInRecords);
- return R.data(pages);
- }
-
- /**
- * 打卡记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入checkInRecords")
- public R save(@Valid @RequestBody CheckInRecordsEntity checkInRecords) {
- checkInRecords.setCreateUserId(AuthUtil.getUserId());
- return R.status(checkInRecordsService.save(checkInRecords));
- }
-
- /**
- * 打卡记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入checkInRecords")
- public R update(@Valid @RequestBody CheckInRecordsEntity checkInRecords) {
- return R.status(checkInRecordsService.updateById(checkInRecords));
- }
-
- /**
- * 打卡记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入checkInRecords")
- public R submit(@Valid @RequestBody CheckInRecordsEntity checkInRecords) {
- checkInRecords.setCreateUserId(AuthUtil.getUserId());
- return R.status(checkInRecordsService.saveOrUpdate(checkInRecords));
- }
-
- /**
- * 打卡记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(checkInRecordsService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/dto/CheckInRecordsDTO.java b/src/main/java/org/springblade/modules/checkInRecords/dto/CheckInRecordsDTO.java
deleted file mode 100644
index 912f368..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/dto/CheckInRecordsDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.dto;
-
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 打卡记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CheckInRecordsDTO extends CheckInRecordsEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/entity/CheckInRecordsEntity.java b/src/main/java/org/springblade/modules/checkInRecords/entity/CheckInRecordsEntity.java
deleted file mode 100644
index 3403c2e..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/entity/CheckInRecordsEntity.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import liquibase.pro.packaged.I;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 打卡记录表 实体类
- *
- * @author BladeX
- * @since 2023-12-04
- */
-@Data
-@TableName("jczz_check_in_records")
-@ApiModel(value = "CheckInRecords对象", description = "打卡记录表")
-public class CheckInRecordsEntity {
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user_id")
- private Long createUserId;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 工作主题 */
- @ApiModelProperty(value = "工作主题", example = "")
- @TableField("work_theme")
- private String workTheme;
-
- /** 工作内容 */
- @ApiModelProperty(value = "工作内容", example = "")
- @TableField("work_content")
- private String workContent;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("img")
- private String img;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("lng")
- private String lng;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("lat")
- private String lat;
-
- /** 地址 */
- @ApiModelProperty(value = "地址", example = "")
- @TableField("address")
- private String address;
-
-
- /** 0 :否 1:是 */
- @ApiModelProperty(value = "0 :否 1:是", example = "")
- @TableField("deleted_flag")
- @TableLogic
- private Integer deletedFlag;
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.java b/src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.java
deleted file mode 100644
index d4a7900..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.checkInRecords.dto.CheckInRecordsDTO;
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-import org.springblade.modules.checkInRecords.vo.CheckInRecordsVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 打卡记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-04
- */
-public interface CheckInRecordsMapper extends BaseMapper<CheckInRecordsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param checkInRecords
- * @return
- */
- List<CheckInRecordsVO> selectCheckInRecordsPage(IPage page,
- @Param("checkInRecords") CheckInRecordsVO checkInRecords,
- @Param("deptIdList") List<Long> deptIdList);
-
-
-// List<CheckInRecordsVO> selectCheckInRecordsPage(IPage<CheckInRecordsVO> page,
-// @Param("checkInRecords")CheckInRecordsVO checkInRecords,
-// @Param("isAdministrator") Integer isAdministrator,
-// @Param("gridCodeList")List gridCodeList,
-// @Param("regionChildCodesList")List regionChildCodesList);
-
-
- /**
- * 查询打卡记录表
- *
- * @param id 打卡记录表ID
- * @return 打卡记录表
- */
- public CheckInRecordsDTO selectCheckInRecordsById(Integer id);
-
- /**
- * 查询打卡记录表列表
- *
- * @param checkInRecordsDTO 打卡记录表
- * @return 打卡记录表集合
- */
- public List<CheckInRecordsDTO> selectCheckInRecordsList(CheckInRecordsDTO checkInRecordsDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.xml b/src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.xml
deleted file mode 100644
index 642c787..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.checkInRecords.mapper.CheckInRecordsMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="checkInRecordsResultMap" type="org.springblade.modules.checkInRecords.vo.CheckInRecordsVO">
- </resultMap>
-
-
- <select id="selectCheckInRecordsPage" resultMap="checkInRecordsResultMap">
- SELECT
- jcir.id,
- jcir.create_user_id,
- jcir.create_time,
- jcir.work_theme,
- jcir.work_content,
- jcir.img,
- jcir.lng,
- jcir.lat,
- jcir.address,
- jcir.deleted_flag,
- bu.`name`,
- bd.region_code
- FROM
- jczz_check_in_records jcir
- LEFT JOIN blade_user bu ON bu.id = jcir.create_user_id
- LEFT JOIN blade_dept bd on bd.id = bu.dept_id
- <where>
- <if test="checkInRecords.id != null ">and jcir.id = #{checkInRecords.id}</if>
- <if test="checkInRecords.createUserId != null ">and jcir.create_user_id = #{checkInRecords.createUserId}
- </if>
- <if test="checkInRecords.createTime != null ">and jcir.create_time = #{checkInRecords.createTime}</if>
- <if test="checkInRecords.workTheme != null and checkInRecords.workTheme != ''">and jcir.work_theme =
- #{checkInRecords.workTheme}
- </if>
- <if test="checkInRecords.workContent != null and checkInRecords.workContent != ''">and jcir.work_content =
- #{checkInRecords.workContent}
- </if>
- <if test="checkInRecords.img != null and checkInRecords.img != ''">and jcir.img = #{checkInRecords.img}
- </if>
- <if test="checkInRecords.lng != null and checkInRecords.lng != ''">and jcir.lng = #{checkInRecords.lng}
- </if>
- <if test="checkInRecords.lat != null and checkInRecords.lat != ''">and jcir.lat = #{checkInRecords.lat}
- </if>
- <if test="checkInRecords.address != null and checkInRecords.address != ''">and jcir.address =
- #{checkInRecords.address}
- </if>
- <if test="checkInRecords.deletedFlag != null ">and jcir.deleted_flag = #{checkInRecords.deletedFlag}</if>
- <if test="checkInRecords.name != null and checkInRecords.name !='' ">and bu.name like
- concat('%',#{checkInRecords.name},'%')
- </if>
- <if test="checkInRecords.startTime!=null and checkInRecords.startTime!=''">
- AND date_format(jcir.create_time,'%Y-%m-%d')>= #{checkInRecords.startTime}
- </if>
- <if test="checkInRecords.endTime!=null and checkInRecords.endTime!=''">
- AND date_format(jcir.create_time,'%Y-%m-%d')<= #{checkInRecords.endTime}
- </if>
-
- <if test="deptIdList !=null and deptIdList.size() > 0">
- and
- <foreach collection="deptIdList" index="index" item="item" open="(" separator="or" close=")">
- bu.dept_id like concat('%',#{item},'%')
- </foreach>
- </if>
- </where>
- order by jcir.create_time desc
- </select>
-
- <resultMap type="org.springblade.modules.checkInRecords.dto.CheckInRecordsDTO" id="CheckInRecordsDTOResult">
- <result property="id" column="id"/>
- <result property="createUserId" column="create_user_id"/>
- <result property="createTime" column="create_time"/>
- <result property="workTheme" column="work_theme"/>
- <result property="workContent" column="work_content"/>
- <result property="img" column="img"/>
- <result property="lng" column="lng"/>
- <result property="lat" column="lat"/>
- <result property="address" column="address"/>
- <result property="deletedFlag" column="deleted_flag"/>
- </resultMap>
-
- <sql id="selectCheckInRecords">
- select id,
- create_user_id,
- create_time,
- work_theme,
- work_content,
- img,
- lng,
- lat,
- address,
- deleted_flag
- from jczz_check_in_records
- </sql>
-
- <select id="selectCheckInRecordsById" parameterType="int" resultMap="CheckInRecordsDTOResult">
- <include refid="selectCheckInRecords"/>
- where
- id = #{id}
- </select>
-
- <select id="selectCheckInRecordsList" parameterType="org.springblade.modules.checkInRecords.dto.CheckInRecordsDTO"
- resultMap="CheckInRecordsDTOResult">
- <include refid="selectCheckInRecords"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="createUserId != null ">and create_user_id = #{createUserId}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="workTheme != null and workTheme != ''">and work_theme = #{workTheme}</if>
- <if test="workContent != null and workContent != ''">and work_content = #{workContent}</if>
- <if test="img != null and img != ''">and img = #{img}</if>
- <if test="lng != null and lng != ''">and lng = #{lng}</if>
- <if test="lat != null and lat != ''">and lat = #{lat}</if>
- <if test="address != null and address != ''">and address = #{address}</if>
- <if test="deletedFlag != null ">and deleted_flag = #{deletedFlag}</if>
- </where>
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/checkInRecords/service/ICheckInRecordsService.java b/src/main/java/org/springblade/modules/checkInRecords/service/ICheckInRecordsService.java
deleted file mode 100644
index 6d8bf84..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/service/ICheckInRecordsService.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.checkInRecords.dto.CheckInRecordsDTO;
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-import org.springblade.modules.checkInRecords.vo.CheckInRecordsVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 打卡记录表 服务类
- *
- * @author BladeX
- * @since 2023-12-04
- */
-public interface ICheckInRecordsService extends IService<CheckInRecordsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param checkInRecords
- * @return
- */
- IPage<CheckInRecordsVO> selectCheckInRecordsPage(IPage<CheckInRecordsVO> page, CheckInRecordsVO checkInRecords);
-
- /**
- * 查询打卡记录表
- *
- * @param id 打卡记录表ID
- * @return 打卡记录表
- */
- public CheckInRecordsDTO selectCheckInRecordsById(Integer id);
-
- /**
- * 查询打卡记录表列表
- *
- * @param checkInRecordsDTO 打卡记录表
- * @return 打卡记录表集合
- */
- public List<CheckInRecordsDTO> selectCheckInRecordsList(CheckInRecordsDTO checkInRecordsDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/service/impl/CheckInRecordsServiceImpl.java b/src/main/java/org/springblade/modules/checkInRecords/service/impl/CheckInRecordsServiceImpl.java
deleted file mode 100644
index 597e1fb..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/service/impl/CheckInRecordsServiceImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.checkInRecords.dto.CheckInRecordsDTO;
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-import org.springblade.modules.checkInRecords.vo.CheckInRecordsVO;
-import org.springblade.modules.checkInRecords.mapper.CheckInRecordsMapper;
-import org.springblade.modules.checkInRecords.service.ICheckInRecordsService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 打卡记录表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-04
- */
-@Service
-public class CheckInRecordsServiceImpl extends ServiceImpl<CheckInRecordsMapper, CheckInRecordsEntity> implements ICheckInRecordsService {
-
- @Override
- public IPage<CheckInRecordsVO> selectCheckInRecordsPage(IPage<CheckInRecordsVO> page, CheckInRecordsVO checkInRecords) {
- // todo 数据过滤
- String deptId = checkInRecords.getDeptId();
- if (Strings.isBlank(deptId) && !AuthUtil.isAdministrator() && !AuthUtil.isAdmin()) {
- deptId = AuthUtil.getDeptId();
- }
- List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
- // 公共参数设置
-// CommonParamSet commonParamSet = new CommonParamSet().invoke(CheckInRecordsVO.class,checkInRecords);
-
- IPage<CheckInRecordsVO> checkInRecordsVOIPage = page.setRecords(baseMapper.selectCheckInRecordsPage(page, checkInRecords, deptIdList));
- return checkInRecordsVOIPage;
- }
-
-
- /**
- * 查询打卡记录表
- *
- * @param id 打卡记录表ID
- * @return 打卡记录表
- */
- @Override
- public CheckInRecordsDTO selectCheckInRecordsById(Integer id) {
- return this.baseMapper.selectCheckInRecordsById(id);
- }
-
- /**
- * 查询打卡记录表列表
- *
- * @param checkInRecordsDTO 打卡记录表
- * @return 打卡记录表集合
- */
- @Override
- public List<CheckInRecordsDTO> selectCheckInRecordsList(CheckInRecordsDTO checkInRecordsDTO) {
- return this.baseMapper.selectCheckInRecordsList(checkInRecordsDTO);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/vo/CheckInRecordsVO.java b/src/main/java/org/springblade/modules/checkInRecords/vo/CheckInRecordsVO.java
deleted file mode 100644
index 4ec46fc..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/vo/CheckInRecordsVO.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-
-/**
- * 打卡记录表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CheckInRecordsVO extends CheckInRecordsEntity {
- private static final long serialVersionUID = 1L;
-
- private String name;
-
- /**
- * 开始时间
- */
- private String startTime;
-
- /**
- * 结束时间
- */
- private String endTime;
-
- private String deptId;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/checkInRecords/wrapper/CheckInRecordsWrapper.java b/src/main/java/org/springblade/modules/checkInRecords/wrapper/CheckInRecordsWrapper.java
deleted file mode 100644
index 5be9ff8..0000000
--- a/src/main/java/org/springblade/modules/checkInRecords/wrapper/CheckInRecordsWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.checkInRecords.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity;
-import org.springblade.modules.checkInRecords.vo.CheckInRecordsVO;
-import java.util.Objects;
-
-/**
- * 打卡记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-04
- */
-public class CheckInRecordsWrapper extends BaseEntityWrapper<CheckInRecordsEntity, CheckInRecordsVO> {
-
- public static CheckInRecordsWrapper build() {
- return new CheckInRecordsWrapper();
- }
-
- @Override
- public CheckInRecordsVO entityVO(CheckInRecordsEntity checkInRecords) {
- CheckInRecordsVO checkInRecordsVO = Objects.requireNonNull(BeanUtil.copy(checkInRecords, CheckInRecordsVO.class));
-
- //User createUser = UserCache.getUser(checkInRecords.getCreateUser());
- //User updateUser = UserCache.getUser(checkInRecords.getUpdateUser());
- //checkInRecordsVO.setCreateUserName(createUser.getName());
- //checkInRecordsVO.setUpdateUserName(updateUser.getName());
-
- return checkInRecordsVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/controller/CircleCommentController.java b/src/main/java/org/springblade/modules/circle/controller/CircleCommentController.java
deleted file mode 100644
index 9bd77f7..0000000
--- a/src/main/java/org/springblade/modules/circle/controller/CircleCommentController.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import org.springblade.modules.circle.service.ICircleCommentService;
-import org.springblade.modules.circle.vo.CircleCommentVO;
-import org.springblade.modules.circle.wrapper.CircleCommentWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 圈子评论表 控制器
- *
- * @author BladeX
- * @since 2023-12-01
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-circleComment/circleComment")
-@Api(value = "圈子评论表", tags = "圈子评论表接口")
-public class CircleCommentController extends BladeController {
-
- private final ICircleCommentService circleService;
-
- /**
- * 圈子评论表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入circle")
- public R<CircleCommentVO> detail(CircleCommentEntity circle) {
- CircleCommentEntity detail = circleService.getOne(Condition.getQueryWrapper(circle));
- return R.data(CircleCommentWrapper.build().entityVO(detail));
- }
-
- /**
- * 圈子评论表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入circle")
- public R<IPage<CircleCommentVO>> list(CircleCommentEntity circle, Query query) {
- IPage<CircleCommentEntity> pages = circleService.page(Condition.getPage(query), Condition.getQueryWrapper(circle));
- return R.data(CircleCommentWrapper.build().pageVO(pages));
- }
-
- /**
- * 圈子评论表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入circle")
- public R<IPage<CircleCommentVO>> page(CircleCommentVO circle, Query query) {
- IPage<CircleCommentVO> pages = circleService.selectCircleCommentPage(Condition.getPage(query), circle);
- return R.data(pages);
- }
-
- /**
- * 圈子评论表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入circle")
- public R save(@Valid @RequestBody CircleCommentEntity circle) {
- if (circle.getParentId() == null) {
- circle.setDepth(1);
- }
- circle.setUserId(AuthUtil.getUserId());
- String msg = circleService.saveComment(circle);
- if (!Strings.isBlank(msg)&& msg.equals("操作成功")){
- return R.data(200,"",msg);
- }
- return R.data(201,"",msg);
- }
-
- /**
- * 圈子评论表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入circle")
- public R update(@Valid @RequestBody CircleCommentEntity circle) {
- return R.status(circleService.updateById(circle));
- }
-
- /**
- * 圈子评论表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入circle")
- public R submit(@Valid @RequestBody CircleCommentEntity circle) {
- circle.setUserId(AuthUtil.getUserId());
- return R.status(circleService.saveOrUpdate(circle));
- }
-
- /**
- * 圈子评论表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(circleService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/controller/CircleController.java b/src/main/java/org/springblade/modules/circle/controller/CircleController.java
deleted file mode 100644
index eb2f85a..0000000
--- a/src/main/java/org/springblade/modules/circle/controller/CircleController.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.modules.circle.service.ICircleService;
-import org.springblade.modules.circle.vo.CircleVO;
-import org.springblade.modules.circle.wrapper.CircleWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 圈子表 控制器
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-circle/circle")
-@Api(value = "圈子表", tags = "圈子表接口")
-public class CircleController extends BladeController {
-
- private final ICircleService circleService;
-
- /**
- * 圈子表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入circle")
- public R<CircleVO> detail(CircleEntity circle) {
- CircleEntity detail = circleService.getOne(Condition.getQueryWrapper(circle));
- return R.data(CircleWrapper.build().entityVO(detail));
- }
-
- /**
- * 圈子表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入circle")
- public R<IPage<CircleVO>> list(CircleEntity circle, Query query) {
- IPage<CircleEntity> pages = circleService.page(Condition.getPage(query), Condition.getQueryWrapper(circle));
- return R.data(CircleWrapper.build().pageVO(pages));
- }
-
- /**
- * 圈子表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入circle")
- public R<IPage<CircleVO>> page(CircleVO circle, Query query) {
- circle.setUserIds(AuthUtil.getUserId());
- IPage<CircleVO> pages = circleService.selectCirclePage(Condition.getPage(query), circle);
- return R.data(pages);
- }
-
- /**
- * 圈子表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入circle")
- public R save(@Valid @RequestBody CircleEntity circle) {
- String msg = circleService.saveCircle(circle);
- if (!Strings.isBlank(msg)&& msg.equals("操作成功")){
- return R.data(200,"",msg);
- }
- return R.data(201, "", msg);
- }
-
- /**
- * 圈子表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入circle")
- public R update(@Valid @RequestBody CircleEntity circle) {
- return R.status(circleService.updateById(circle));
- }
-
- /**
- * 圈子表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入circle")
- public R submit(@Valid @RequestBody CircleEntity circle) {
- return R.status(circleService.saveOrUpdate(circle));
- }
-
- /**
- * 圈子表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(circleService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/controller/CircleLikeController.java b/src/main/java/org/springblade/modules/circle/controller/CircleLikeController.java
deleted file mode 100644
index 5e0299b..0000000
--- a/src/main/java/org/springblade/modules/circle/controller/CircleLikeController.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.modules.circle.service.ICircleLikeService;
-import org.springblade.modules.circle.vo.CircleLikeVO;
-import org.springblade.modules.circle.wrapper.CircleLikeWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 圈子点赞表 控制器
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-circleLike/circleLike")
-@Api(value = "圈子点赞表", tags = "圈子点赞表接口")
-public class CircleLikeController extends BladeController {
-
- private final ICircleLikeService circleService;
-
- /**
- * 圈子点赞表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入circle")
- public R<CircleLikeVO> detail(CircleLikeEntity circle) {
- CircleLikeEntity detail = circleService.getOne(Condition.getQueryWrapper(circle));
- return R.data(CircleLikeWrapper.build().entityVO(detail));
- }
-
- /**
- * 圈子点赞表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入circle")
- public R<IPage<CircleLikeVO>> list(CircleLikeEntity circle, Query query) {
- IPage<CircleLikeEntity> pages = circleService.page(Condition.getPage(query), Condition.getQueryWrapper(circle));
- return R.data(CircleLikeWrapper.build().pageVO(pages));
- }
-
- /**
- * 圈子点赞表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入circle")
- public R<IPage<CircleLikeVO>> page(CircleLikeVO circle, Query query) {
- IPage<CircleLikeVO> pages = circleService.selectCircleLikePage(Condition.getPage(query), circle);
- return R.data(pages);
- }
-
- /**
- * 圈子点赞表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入circle")
- public R save(@Valid @RequestBody CircleLikeEntity circle) {
- circle.setUserId(AuthUtil.getUserId());
- return R.status(circleService.save(circle));
-
- }
-
- /**
- * 圈子点赞表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入circle")
- public R update(@Valid @RequestBody CircleLikeEntity circle) {
- return R.status(circleService.updateById(circle));
- }
-
- /**
- * 圈子点赞表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入circle")
- public R submit(@Valid @RequestBody CircleLikeEntity circle) {
- circle.setUserId(AuthUtil.getUserId());
- CircleLikeEntity one = circleService.getOne(Wrappers.<CircleLikeEntity>lambdaQuery()
- .eq(CircleLikeEntity::getCircleId, circle.getCircleId())
- .eq(CircleLikeEntity::getUserId, circle.getUserId()));
- if (one != null) {
- circle.setId(one.getId());
- }
- return R.status(circleService.saveOrUpdate(circle));
- }
-
- /**
- * 圈子点赞表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(circleService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/dto/CircleCommentDTO.java b/src/main/java/org/springblade/modules/circle/dto/CircleCommentDTO.java
deleted file mode 100644
index 9927722..0000000
--- a/src/main/java/org/springblade/modules/circle/dto/CircleCommentDTO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.dto;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Date;
-
-/**
- * 圈子评论表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-01
- */
-@Data
-public class CircleCommentDTO extends CircleCommentEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/dto/CircleDTO.java b/src/main/java/org/springblade/modules/circle/dto/CircleDTO.java
deleted file mode 100644
index 806a41c..0000000
--- a/src/main/java/org/springblade/modules/circle/dto/CircleDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.dto;
-
-import org.springblade.modules.circle.entity.CircleEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 圈子表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CircleDTO extends CircleEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/dto/CircleLikeDTO.java b/src/main/java/org/springblade/modules/circle/dto/CircleLikeDTO.java
deleted file mode 100644
index f9abd11..0000000
--- a/src/main/java/org/springblade/modules/circle/dto/CircleLikeDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.dto;
-
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 圈子点赞表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CircleLikeDTO extends CircleLikeEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/entity/CircleCommentEntity.java b/src/main/java/org/springblade/modules/circle/entity/CircleCommentEntity.java
deleted file mode 100644
index 2b9c0d2..0000000
--- a/src/main/java/org/springblade/modules/circle/entity/CircleCommentEntity.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 圈子评论表 实体类
- *
- * @author BladeX
- * @since 2023-12-01
- */
-@Data
-@TableName("jczz_circle_comment")
-@ApiModel(value = "CircleComment对象", description = "圈子评论表")
-public class CircleCommentEntity {
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 圈子id */
- @ApiModelProperty(value = "圈子id", example = "")
- @TableField("circle_id")
- private Long circleId;
-
- /** 评论内容 */
- @ApiModelProperty(value = "评论内容", example = "")
- @TableField("content")
- private String content;
-
- /** 评论人id */
- @ApiModelProperty(value = "评论人id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 父级id(人) */
- @ApiModelProperty(value = "父级id(人)", example = "")
- @TableField("parent_id")
- private Long parentId;
-
- /** 回复时间 */
- @ApiModelProperty(value = "回复时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("reply_time")
- private Date replyTime;
-
- /** 是否置顶(0:否,1:是) */
- @ApiModelProperty(value = "是否置顶(0:否,1:是)", example = "")
- @TableField("topping")
- private Integer topping;
-
- /** 是否审核(0:否,1:是) */
- @ApiModelProperty(value = "是否审核(0:否,1:是)", example = "")
- @TableField("isexamine")
- private Integer isexamine;
-
- /** 审核人 */
- @ApiModelProperty(value = "审核人", example = "")
- @TableField("check_user")
- private Long checkUser;
-
- /** 审核时间 */
- @ApiModelProperty(value = "审核时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("check_time")
- private Date checkTime;
-
- /** 审核状态 */
- @ApiModelProperty(value = "审核状态", example = "")
- @TableField("check_status")
- private Integer checkStatus;
-
- /** 审核备注 */
- @ApiModelProperty(value = "审核备注", example = "")
- @TableField("check_remark")
- private String checkRemark;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 评论深度 */
- @ApiModelProperty(value = "评论深度", example = "")
- @TableField("depth")
- private Integer depth;
-}
diff --git a/src/main/java/org/springblade/modules/circle/entity/CircleEntity.java b/src/main/java/org/springblade/modules/circle/entity/CircleEntity.java
deleted file mode 100644
index b6f4994..0000000
--- a/src/main/java/org/springblade/modules/circle/entity/CircleEntity.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-/**
- * 圈子表 实体类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Data
-@TableName("jczz_circle")
-@ApiModel(value = "Circle对象", description = "圈子表")
-public class CircleEntity {
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 用户id */
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 动态内容 */
- @ApiModelProperty(value = "动态内容", example = "")
- @TableField("circle_text")
- private String circleText;
-
- /** 动态图片 */
- @ApiModelProperty(value = "动态图片", example = "")
- @TableField("circle_images")
- private String circleImages;
-
- /** 动态视频 */
- @ApiModelProperty(value = "动态视频", example = "")
- @TableField("circle_video")
- private String circleVideo;
-
- /** 0 否 1是 */
- @ApiModelProperty(value = "0 否 1是", example = "")
- @TableField("deleted_falg")
- @TableLogic
- private Integer deletedFalg;
-
- /** 0 :邻里 1网格 */
- @ApiModelProperty(value = "0 :邻里 1网格", example = "")
- @TableField("circle_type")
- private Integer circleType;
-
- /** 事件id */
- @ApiModelProperty(value = "事件id", example = "")
- @TableField("event_id")
- private Long eventId;
-
- /** 事件类型:1:报事报修 2:E呼即办*/
- @ApiModelProperty(value = "事件类型:1:报事报修 2:E呼即办", example = "")
- @TableField("even_type")
- private Integer evenType;
-
- /** 社区编号 */
- @ApiModelProperty(value = "社区编号", example = "")
- @TableField("community_code")
- private String communityCode;
-
- /** 房屋编码 */
- @ApiModelProperty(value = "房屋编码", example = "")
- @TableField("house_code")
- private String houseCode;
-}
diff --git a/src/main/java/org/springblade/modules/circle/entity/CircleLikeEntity.java b/src/main/java/org/springblade/modules/circle/entity/CircleLikeEntity.java
deleted file mode 100644
index 28ca77f..0000000
--- a/src/main/java/org/springblade/modules/circle/entity/CircleLikeEntity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 圈子点赞表 实体类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Data
-@TableName("jczz_circle_like")
-@ApiModel(value = "CircleLike对象", description = "圈子点赞表")
-public class CircleLikeEntity {
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 圈子id */
- @ApiModelProperty(value = "圈子id", example = "")
- @TableField("circle_id")
- private Long circleId;
-
- /** 点赞用户id */
- @ApiModelProperty(value = "点赞用户id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 点赞时间 */
- @ApiModelProperty(value = "点赞时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 0:否 1:是 */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("delete_flag")
-// @TableLogic
- private Integer deleteFlag;
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/mapper/CircleCommentMapper.java b/src/main/java/org/springblade/modules/circle/mapper/CircleCommentMapper.java
deleted file mode 100644
index 9cdd3d3..0000000
--- a/src/main/java/org/springblade/modules/circle/mapper/CircleCommentMapper.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.circle.dto.CircleCommentDTO;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import org.springblade.modules.circle.vo.CircleCommentVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 圈子评论表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-01
- */
-public interface CircleCommentMapper extends BaseMapper<CircleCommentEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param circle
- * @return
- */
- List<CircleCommentVO> selectCircleCommentPage(IPage page, @Param("circle") CircleCommentVO circle);
-
- /**
- * 查询圈子评论表
- *
- * @param id 圈子评论表ID
- * @return 圈子评论表
- */
- public CircleCommentDTO selectCircleCommentById(Integer id);
-
- public CircleCommentDTO selectCircleCommentByParentId(Integer id);
-
- /**
- * 查询圈子评论表列表
- *
- * @param circleCommentDTO 圈子评论表
- * @return 圈子评论表集合
- */
- public List<CircleCommentDTO> selectCircleCommentList(CircleCommentDTO circleCommentDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/mapper/CircleCommentMapper.xml b/src/main/java/org/springblade/modules/circle/mapper/CircleCommentMapper.xml
deleted file mode 100644
index 2366bdf..0000000
--- a/src/main/java/org/springblade/modules/circle/mapper/CircleCommentMapper.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.circle.mapper.CircleCommentMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="circleResultMap" type="org.springblade.modules.circle.vo.CircleCommentVO">
- <result property="id" column="id" />
- <result property="circleId" column="circle_id" />
- <result property="content" column="content" />
- <result property="userId" column="user_id" />
- <result property="parentId" column="parent_id" />
- <result property="replyTime" column="reply_time" />
- <result property="topping" column="topping" />
- <result property="isexamine" column="isexamine" />
- <result property="checkUser" column="check_user" />
- <result property="checkTime" column="check_time" />
- <result property="checkStatus" column="check_status" />
- <result property="checkRemark" column="check_remark" />
- <result property="createTime" column="create_time" />
- <result property="isDeleted" column="is_deleted" />
- <result property="depth" column="depth" />
-
- <collection property="children" column="id" javaType="java.util.List"
- ofType="org.springblade.modules.circle.vo.CircleCommentVO"
- autoMapping="true"
- select="selectCircleCommentByParentId">
-
- </collection>
-
- </resultMap>
-
-
- <resultMap type="org.springblade.modules.circle.dto.CircleCommentDTO" id="CircleCommentDTOResult">
- <result property="id" column="id" />
- <result property="circleId" column="circle_id" />
- <result property="content" column="content" />
- <result property="userId" column="user_id" />
- <result property="parentId" column="parent_id" />
- <result property="replyTime" column="reply_time" />
- <result property="topping" column="topping" />
- <result property="isexamine" column="isexamine" />
- <result property="checkUser" column="check_user" />
- <result property="checkTime" column="check_time" />
- <result property="checkStatus" column="check_status" />
- <result property="checkRemark" column="check_remark" />
- <result property="createTime" column="create_time" />
- <result property="isDeleted" column="is_deleted" />
- <result property="depth" column="depth" />
- </resultMap>
-
- <sql id="selectCircleComment">
- select
- id,
- circle_id,
- content,
- user_id,
- parent_id,
- reply_time,
- topping,
- isexamine,
- check_user,
- check_time,
- check_status,
- check_remark,
- create_time,
- is_deleted,
- depth
- from
- jczz_circle_comment
- </sql>
-
- <select id="selectCircleCommentById" parameterType="int" resultMap="CircleCommentDTOResult">
- <include refid="selectCircleComment"/>
- where
- id = #{id}
- </select>
-
- <select id="selectCircleCommentByParentId" parameterType="int" resultMap="CircleCommentDTOResult">
- <include refid="selectCircleComment"/>
- where
- parent_id = #{id}
- </select>
-
- <select id="selectCircleCommentList" parameterType="org.springblade.modules.circle.dto.CircleCommentDTO" resultMap="CircleCommentDTOResult">
- <include refid="selectCircleComment"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="circleId != null "> and circle_id = #{circleId}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="parentId != null "> and parent_id = #{parentId}</if>
- <if test="replyTime != null "> and reply_time = #{replyTime}</if>
- <if test="topping != null "> and topping = #{topping}</if>
- <if test="isexamine != null "> and isexamine = #{isexamine}</if>
- <if test="checkUser != null "> and check_user = #{checkUser}</if>
- <if test="checkTime != null "> and check_time = #{checkTime}</if>
- <if test="checkStatus != null "> and check_status = #{checkStatus}</if>
- <if test="checkRemark != null and checkRemark != ''"> and check_remark = #{checkRemark}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
- <if test="depth != null "> and depth = #{depth}</if>
- </where>
- </select>
-
-
- <select id="selectCircleCommentPage" resultMap="circleResultMap">
- select
- jcc.id,
- jcc.circle_id,
- jcc.content,
- jcc.user_id,
- jcc.parent_id,
- jcc.reply_time,
- jcc.topping,
- jcc.isexamine,
- jcc.check_user,
- jcc.check_time,
- jcc.check_status,
- jcc.check_remark,
- jcc.create_time,
- jcc.is_deleted,
- bu.name,
- bu.avatar,
- jcc.depth
- from
- jczz_circle_comment jcc left join blade_user bu on jcc.user_id = bu.id
- <where>
- <if test="circle.id != null "> and jcc.id = #{circle.id}</if>
- <if test="circle.circleId != null "> and jcc.circle_id = #{circle.circleId}</if>
- <if test="circle.content != null and circle.content != ''"> and content = #{circle.content}</if>
- <if test="circle.userId != null "> and jcc.user_id = #{circle.userId}</if>
- <if test="circle.parentId != null "> and jcc.parent_id = #{circle.parentId}</if>
- <if test="circle.replyTime != null "> and jcc.reply_time = #{circle.replyTime}</if>
- <if test="circle.topping != null "> and jcc.topping = #{circle.topping}</if>
- <if test="circle.isexamine != null "> and jcc.isexamine = #{circle.isexamine}</if>
- <if test="circle.checkUser != null "> and jcc.check_user = #{circle.checkUser}</if>
- <if test="circle.checkTime != null "> and jcc.check_time = #{circle.checkTime}</if>
- <if test="circle.checkStatus != null "> and jcc.check_status = #{circle.checkStatus}</if>
- <if test="circle.checkRemark != null and circle.checkRemark != ''"> and jcc.check_remark = #{circle.checkRemark}</if>
- <if test="circle.createTime != null "> and jcc.create_time = #{circle.createTime}</if>
- <if test="circle.isDeleted != null "> and jcc.is_deleted = #{circle.isDeleted}</if>
- <if test="circle.depth != null "> and jcc.depth = #{circle.depth}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/circle/mapper/CircleLikeMapper.java b/src/main/java/org/springblade/modules/circle/mapper/CircleLikeMapper.java
deleted file mode 100644
index a7975ae..0000000
--- a/src/main/java/org/springblade/modules/circle/mapper/CircleLikeMapper.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.circle.dto.CircleLikeDTO;
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.modules.circle.vo.CircleLikeVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 圈子点赞表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-30
- */
-public interface CircleLikeMapper extends BaseMapper<CircleLikeEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param circle
- * @return
- */
- List<CircleLikeVO> selectCircleLikePage(IPage page, @Param("circle") CircleLikeVO circle);
-
-
- /**
- * 查询圈子点赞表
- *
- * @param id 圈子点赞表ID
- * @return 圈子点赞表
- */
- public CircleLikeDTO selectCircleLikeById(Long id);
-
- /**
- * 查询圈子点赞表列表
- *
- * @param circleLikeDTO 圈子点赞表
- * @return 圈子点赞表集合
- */
- public List<CircleLikeDTO> selectCircleLikeList(CircleLikeDTO circleLikeDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/mapper/CircleLikeMapper.xml b/src/main/java/org/springblade/modules/circle/mapper/CircleLikeMapper.xml
deleted file mode 100644
index 2696057..0000000
--- a/src/main/java/org/springblade/modules/circle/mapper/CircleLikeMapper.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.circle.mapper.CircleLikeMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="circleResultMap" type="org.springblade.modules.circle.vo.CircleLikeVO">
- <result property="id" column="id" />
- <result property="circleId" column="circle_id" />
- <result property="userId" column="user_id" />
- <result property="createTime" column="create_time" />
- <result property="deleteFlag" column="delete_flag" />
- </resultMap>
-
- <resultMap type="org.springblade.modules.circle.vo.CircleLikeVO" id="CircleLikeDTOResult">
- <result property="id" column="id" />
- <result property="circleId" column="circle_id" />
- <result property="userId" column="user_id" />
- <result property="createTime" column="create_time" />
- <result property="deleteFlag" column="delete_flag" />
- </resultMap>
-
- <sql id="selectCircleLike">
- select
- id,
- circle_id,
- user_id,
- create_time,
- delete_flag
- from
- jczz_circle_like
- </sql>
-
- <select id="selectCircleLikeById" parameterType="long" resultMap="CircleLikeDTOResult">
- <include refid="selectCircleLike"/>
- where
- id = #{id}
- </select>
-
- <select id="selectCircleLikeList" parameterType="org.springblade.modules.circle.dto.CircleLikeDTO" resultMap="CircleLikeDTOResult">
- <include refid="selectCircleLike"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="circleId != null "> and circle_id = #{circleId}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
- </where>
- </select>
-
-
- <select id="selectCircleLikePage" resultMap="circleResultMap">
- select * from jczz_circle_like
- <where>
- <if test="circle.id != null "> and id = #{circle.id}</if>
- <if test="circle.circleId != null "> and circle_id = #{circle.circleId}</if>
- <if test="circle.userId != null "> and user_id = #{circle.userId}</if>
- <if test="circle.createTime != null "> and create_time = #{circle.createTime}</if>
- <if test="circle.deleteFlag != null "> and delete_flag = #{circle.deleteFlag}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/circle/mapper/CircleMapper.java b/src/main/java/org/springblade/modules/circle/mapper/CircleMapper.java
deleted file mode 100644
index 9efb051..0000000
--- a/src/main/java/org/springblade/modules/circle/mapper/CircleMapper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.circle.dto.CircleDTO;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.modules.circle.vo.CircleVO;
-
-import java.util.List;
-
-/**
- * 圈子表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-30
- */
-public interface CircleMapper extends BaseMapper<CircleEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param circle
- * @return
- */
- List<CircleVO> selectCirclePage(IPage page, @Param("circle") CircleVO circle);
-
- /**
- * 查询圈子表
- *
- * @param id 圈子表ID
- * @return 圈子表
- */
- public CircleVO selectCircleById(Integer id);
-
-
- /**
- * 查询圈子表列表
- *
- * @param circleDTO 圈子表
- * @return 圈子表集合
- */
- public List<CircleVO> selectCircleList(CircleDTO circleDTO);
-
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/mapper/CircleMapper.xml b/src/main/java/org/springblade/modules/circle/mapper/CircleMapper.xml
deleted file mode 100644
index 3380e65..0000000
--- a/src/main/java/org/springblade/modules/circle/mapper/CircleMapper.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.circle.mapper.CircleMapper">
-
- <resultMap type="org.springblade.modules.circle.vo.CircleVO" id="CircleVOResult">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="createTime" column="create_time" />
- <result property="circleText" column="circle_text" />
- <result property="circleImages" column="circle_images" />
- <result property="circleVideo" column="circle_video" />
- <result property="deletedFalg" column="deleted_falg" />
- <result property="circleType" column="circle_type" />
- <result property="eventId" column="event_id" />
- <result property="evenType" column="even_type" />
- <result property="communityCode" column="community_code" />
- <result property="houseCode" column="house_code" />
- </resultMap>
-
- <sql id="selectCircle">
- select
- id,
- user_id,
- create_time,
- circle_text,
- circle_images,
- circle_video,
- deleted_falg,
- circle_type,
- event_id,
- even_type,
- community_code,
- house_code
- from
- jczz_circle
- </sql>
-
- <select id="selectCircleById" parameterType="int" resultMap="CircleVOResult">
- <include refid="selectCircle"/>
- where
- id = #{id}
- </select>
-
- <select id="selectCircleList" parameterType="org.springblade.modules.circle.dto.CircleDTO" resultMap="CircleVOResult">
- <include refid="selectCircle"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="circleText != null and circleText != ''"> and circle_text = #{circleText}</if>
- <if test="circleImages != null and circleImages != ''"> and circle_images = #{circleImages}</if>
- <if test="circleVideo != null and circleVideo != ''"> and circle_video = #{circleVideo}</if>
- <if test="deletedFalg != null "> and deleted_falg = #{deletedFalg}</if>
- <if test="circleType != null "> and circle_type = #{circleType}</if>
- </where>
- </select>
-
-
- <select id="selectCirclePage" resultMap="CircleVOResult">
- select jc.*,
- bu.name,
- bu.avatar,
- (select count(1) from jczz_circle_like jcl where jcl.circle_id = jc.id and jcl.user_id = #{circle.userIds} and
- jcl.delete_flag = 0 ) likeFlag
- from jczz_circle jc left join blade_user bu on jc.user_id = bu.id
- <where>
- <if test="circle.id != null ">and jc.id = #{circle.id}</if>
- <if test="circle.userId != null ">and jc.user_id = #{circle.userId}</if>
- <if test="circle.createTime != null ">and jc.create_time = #{circle.createTime}</if>
- <if test="circle.circleText != null and circle.circleText != ''">and jc.circle_text like concat
- ('%',#{circle.circleText},'%')
- </if>
- <if test="circle.circleImages != null and circle.circleImages != ''">and jc.circle_images =
- #{circle.circleImages}
- </if>
- <if test="circle.circleVideo != null and circle.circleVideo != ''">and jc.circle_video =
- #{circle.circleVideo}
- </if>
- <if test="circle.deletedFalg != null ">and jc.deleted_falg = #{circle.deletedFalg}</if>
- <if test="circle.circleType != null ">and jc.circle_type = #{circle.circleType}</if>
- <if test="circle.eventId != null "> and event_id = #{circle.eventId}</if>
- <if test="circle.evenType != null "> and even_type = #{circle.evenType}</if>
- <if test="circle.communityCode != null and circle.communityCode != ''"> and community_code = #{circle.communityCode}</if>
- <if test="circle.houseCode != null and circle.houseCode != ''"> and house_code = #{circle.houseCode}</if>
- </where>
- order by jc.create_time desc
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/circle/service/ICircleCommentService.java b/src/main/java/org/springblade/modules/circle/service/ICircleCommentService.java
deleted file mode 100644
index 58bd9ff..0000000
--- a/src/main/java/org/springblade/modules/circle/service/ICircleCommentService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import org.springblade.modules.circle.vo.CircleCommentVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 圈子评论表 服务类
- *
- * @author BladeX
- * @since 2023-12-01
- */
-public interface ICircleCommentService extends IService<CircleCommentEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param circle
- * @return
- */
- IPage<CircleCommentVO> selectCircleCommentPage(IPage<CircleCommentVO> page, CircleCommentVO circle);
-
-
- String saveComment(CircleCommentEntity circle);
-}
diff --git a/src/main/java/org/springblade/modules/circle/service/ICircleLikeService.java b/src/main/java/org/springblade/modules/circle/service/ICircleLikeService.java
deleted file mode 100644
index de9d42c..0000000
--- a/src/main/java/org/springblade/modules/circle/service/ICircleLikeService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.circle.dto.CircleLikeDTO;
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.modules.circle.vo.CircleLikeVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 圈子点赞表 服务类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-public interface ICircleLikeService extends IService<CircleLikeEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param circle
- * @return
- */
- IPage<CircleLikeVO> selectCircleLikePage(IPage<CircleLikeVO> page, CircleLikeVO circle);
-
- /**
- * 查询圈子点赞表
- *
- * @param id 圈子点赞表ID
- * @return 圈子点赞表
- */
- public CircleLikeDTO selectCircleLikeById(Long id);
-
- /**
- * 查询圈子点赞表列表
- *
- * @param circleLikeDTO 圈子点赞表
- * @return 圈子点赞表集合
- */
- public List<CircleLikeDTO> selectCircleLikeList(CircleLikeDTO circleLikeDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/service/ICircleService.java b/src/main/java/org/springblade/modules/circle/service/ICircleService.java
deleted file mode 100644
index b290714..0000000
--- a/src/main/java/org/springblade/modules/circle/service/ICircleService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.circle.dto.CircleDTO;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.modules.circle.vo.CircleVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 圈子表 服务类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-public interface ICircleService extends IService<CircleEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param circle
- * @return
- */
- IPage<CircleVO> selectCirclePage(IPage<CircleVO> page, CircleVO circle);
-
- /**
- * 查询圈子表
- *
- * @param id 圈子表ID
- * @return 圈子表
- */
- public CircleVO selectCircleById(Integer id);
-
- /**
- * 查询圈子表列表
- *
- * @param circleDTO 圈子表
- * @return 圈子表集合
- */
- public List<CircleVO> selectCircleList(CircleDTO circleDTO);
-
-
- String saveCircle(CircleEntity circle);
-}
diff --git a/src/main/java/org/springblade/modules/circle/service/impl/CircleCommentServiceImpl.java b/src/main/java/org/springblade/modules/circle/service/impl/CircleCommentServiceImpl.java
deleted file mode 100644
index 7b71ede..0000000
--- a/src/main/java/org/springblade/modules/circle/service/impl/CircleCommentServiceImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import org.springblade.modules.circle.vo.CircleCommentVO;
-import org.springblade.modules.circle.mapper.CircleCommentMapper;
-import org.springblade.modules.circle.service.ICircleCommentService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.words.WorksService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.Map;
-
-/**
- * 圈子评论表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-01
- */
-@Service
-public class CircleCommentServiceImpl extends ServiceImpl<CircleCommentMapper, CircleCommentEntity> implements ICircleCommentService {
-
- @Autowired
- private WorksService worksService;
-
- @Override
- public IPage<CircleCommentVO> selectCircleCommentPage(IPage<CircleCommentVO> page, CircleCommentVO circle) {
- circle.setCheckStatus(2);
- return page.setRecords(baseMapper.selectCircleCommentPage(page, circle));
- }
-
- @Override
- public String saveComment(CircleCommentEntity circle) {
- boolean flag = false;
- // 先进行敏感词过滤
- Map<String, Object> map = worksService.interceptWords(circle.getContent());
- // 获取敏感词校验结果
- String iswords = map.get("iswords").toString();
- if (iswords.equals("false")) {
- // 审核通过
- circle.setCheckStatus(2);
- flag = save(circle);
- // 返回
- return "操作成功";
- } else {
- // 审核不通过
- circle.setCheckStatus(3);
- // 设置审核不通过的说明
- circle.setCheckRemark(map.get("words").toString());
- // 保存
- save(circle);
- // 返回
- return "当前评论内容中带有敏感词,当前评论无法生效!";
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/circle/service/impl/CircleLikeServiceImpl.java b/src/main/java/org/springblade/modules/circle/service/impl/CircleLikeServiceImpl.java
deleted file mode 100644
index 58e6d74..0000000
--- a/src/main/java/org/springblade/modules/circle/service/impl/CircleLikeServiceImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.circle.dto.CircleLikeDTO;
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.modules.circle.vo.CircleLikeVO;
-import org.springblade.modules.circle.mapper.CircleLikeMapper;
-import org.springblade.modules.circle.service.ICircleLikeService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 圈子点赞表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Service
-public class CircleLikeServiceImpl extends ServiceImpl<CircleLikeMapper, CircleLikeEntity> implements ICircleLikeService {
-
- @Override
- public IPage<CircleLikeVO> selectCircleLikePage(IPage<CircleLikeVO> page, CircleLikeVO circle) {
- return page.setRecords(baseMapper.selectCircleLikePage(page, circle));
- }
-
-
-
- /**
- * 查询圈子点赞表
- *
- * @param id 圈子点赞表ID
- * @return 圈子点赞表
- */
- @Override
- public CircleLikeDTO selectCircleLikeById(Long id)
- {
- return this.baseMapper.selectCircleLikeById(id);
- }
-
- /**
- * 查询圈子点赞表列表
- *
- * @param circleLikeDTO 圈子点赞表
- * @return 圈子点赞表集合
- */
- @Override
- public List<CircleLikeDTO> selectCircleLikeList(CircleLikeDTO circleLikeDTO)
- {
- return this.baseMapper.selectCircleLikeList(circleLikeDTO);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/service/impl/CircleServiceImpl.java b/src/main/java/org/springblade/modules/circle/service/impl/CircleServiceImpl.java
deleted file mode 100644
index 6777d80..0000000
--- a/src/main/java/org/springblade/modules/circle/service/impl/CircleServiceImpl.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.core.biz.impl.ExecutorBizImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.circle.dto.CircleDTO;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.modules.circle.mapper.CircleMapper;
-import org.springblade.modules.circle.service.ICircleCommentService;
-import org.springblade.modules.circle.service.ICircleLikeService;
-import org.springblade.modules.circle.service.ICircleService;
-import org.springblade.modules.circle.vo.CircleVO;
-import org.springblade.modules.words.WorksService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 圈子表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Service
-public class CircleServiceImpl extends ServiceImpl<CircleMapper, CircleEntity> implements ICircleService {
-
- private static Logger logger = LoggerFactory.getLogger(ExecutorBizImpl.class);
- @Autowired
- private ICircleLikeService iCircleLikeService;
-
- @Autowired
- private WorksService worksService;
-
- @Autowired
- private ICircleCommentService iCircleCommentService;
-
- @Override
- public IPage<CircleVO> selectCirclePage(IPage<CircleVO> page, CircleVO circle) {
- CommonParamSet commonParamSet = new CommonParamSet().invoke(CircleVO.class, circle);
- List<CircleVO> circleVOS = baseMapper.selectCirclePage(page, circle);
- for (CircleVO circleVO : circleVOS) {
- // 获取circleVO中circleId的点赞数
- long count = iCircleLikeService.count(Wrappers.<CircleLikeEntity>lambdaQuery()
- .eq(CircleLikeEntity::getCircleId, circleVO.getId()));
- circleVO.setLikeCount(count);
-
- // 查询circle_comment表中circle_id等于circleVO.getId()的记录数
- long count2 = iCircleCommentService.count(Wrappers.<CircleCommentEntity>lambdaQuery()
- .eq(CircleCommentEntity::getCircleId, circleVO.getId())
- .groupBy(CircleCommentEntity::getCircleId));
- circleVO.setCommentCount(count2);
- }
- return page.setRecords(circleVOS);
- }
-
- /**
- * 查询圈子表
- *
- * @param id 圈子表ID
- * @return 圈子表
- */
- @Override
- public CircleVO selectCircleById(Integer id) {
- return this.baseMapper.selectCircleById(id);
- }
-
- /**
- * 查询圈子表列表
- *
- * @param circleDTO 圈子表
- * @return 圈子表集合
- */
- @Override
- public List<CircleVO> selectCircleList(CircleDTO circleDTO) {
- return this.baseMapper.selectCircleList(circleDTO);
- }
-
- @Override
- public String saveCircle(CircleEntity circle) {
- circle.setUserId(AuthUtil.getUserId());
- String communityCode = SpringUtils.getRequestParam("communityCode");
- if (StringUtils.isNotBlank(communityCode)) {
- circle.setCommunityCode(communityCode);
- }
- // 校验事件是否分享过
-// if (circle.getCircleType() != null && circle.getEventId() != null) {
-// long count = count(Wrappers.<CircleEntity>lambdaQuery().
-// eq(CircleEntity::getCircleType, circle.getCircleType()).
-// eq(CircleEntity::getEventId, circle.getEventId()));
-// if (count > 0) {
-// return "当前发布的内容已经分享过,请勿重复发布!";
-// }
-// }
- String iswords = "false";
-// if (circle.getCircleType() == null && circle.getEventId() == null) {
- // 先进行敏感词过滤
- Map<String, Object> map = worksService.interceptWords(circle.getCircleText());
- // 获取敏感词校验结果
- iswords = map.get("iswords").toString();
-// }
- if (iswords.equals("false")) {
- // 审核通过
- boolean flag = save(circle);
- logger.info("保存圈子表成功");
- // 返回
- return "操作成功";
- } else {
- // 审核不通过
- // 返回
- return "当前发布的内容中带有敏感词信息,当前发布无法生效!";
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/circle/vo/CircleCommentVO.java b/src/main/java/org/springblade/modules/circle/vo/CircleCommentVO.java
deleted file mode 100644
index 440f24d..0000000
--- a/src/main/java/org/springblade/modules/circle/vo/CircleCommentVO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-
-import java.util.List;
-
-/**
- * 圈子评论表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CircleCommentVO extends CircleCommentEntity {
- private static final long serialVersionUID = 1L;
-
- private List<CircleCommentVO> children;
-
- private String name;
-
- private String avatar;
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/vo/CircleLikeVO.java b/src/main/java/org/springblade/modules/circle/vo/CircleLikeVO.java
deleted file mode 100644
index aac8bce..0000000
--- a/src/main/java/org/springblade/modules/circle/vo/CircleLikeVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.vo;
-
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 圈子点赞表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CircleLikeVO extends CircleLikeEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/vo/CircleVO.java b/src/main/java/org/springblade/modules/circle/vo/CircleVO.java
deleted file mode 100644
index 71bfc84..0000000
--- a/src/main/java/org/springblade/modules/circle/vo/CircleVO.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 圈子表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-30
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CircleVO extends CircleEntity {
- private static final long serialVersionUID = 1L;
-
- private String name;
-
- private String avatar;
-
- private Integer likeFlag;
-
- private Long userIds;
-
- private Long commentCount;
-
- private Long likeCount;
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/wrapper/CircleCommentWrapper.java b/src/main/java/org/springblade/modules/circle/wrapper/CircleCommentWrapper.java
deleted file mode 100644
index 4bffcd9..0000000
--- a/src/main/java/org/springblade/modules/circle/wrapper/CircleCommentWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.circle.entity.CircleCommentEntity;
-import org.springblade.modules.circle.vo.CircleCommentVO;
-import java.util.Objects;
-
-/**
- * 圈子评论表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-01
- */
-public class CircleCommentWrapper extends BaseEntityWrapper<CircleCommentEntity, CircleCommentVO> {
-
- public static CircleCommentWrapper build() {
- return new CircleCommentWrapper();
- }
-
- @Override
- public CircleCommentVO entityVO(CircleCommentEntity circle) {
- CircleCommentVO circleVO = Objects.requireNonNull(BeanUtil.copy(circle, CircleCommentVO.class));
-
- //User createUser = UserCache.getUser(circle.getCreateUser());
- //User updateUser = UserCache.getUser(circle.getUpdateUser());
- //circleVO.setCreateUserName(createUser.getName());
- //circleVO.setUpdateUserName(updateUser.getName());
-
- return circleVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/wrapper/CircleLikeWrapper.java b/src/main/java/org/springblade/modules/circle/wrapper/CircleLikeWrapper.java
deleted file mode 100644
index b86e440..0000000
--- a/src/main/java/org/springblade/modules/circle/wrapper/CircleLikeWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.circle.entity.CircleLikeEntity;
-import org.springblade.modules.circle.vo.CircleLikeVO;
-import java.util.Objects;
-
-/**
- * 圈子点赞表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-30
- */
-public class CircleLikeWrapper extends BaseEntityWrapper<CircleLikeEntity, CircleLikeVO> {
-
- public static CircleLikeWrapper build() {
- return new CircleLikeWrapper();
- }
-
- @Override
- public CircleLikeVO entityVO(CircleLikeEntity circle) {
- CircleLikeVO circleVO = Objects.requireNonNull(BeanUtil.copy(circle, CircleLikeVO.class));
-
- //User createUser = UserCache.getUser(circle.getCreateUser());
- //User updateUser = UserCache.getUser(circle.getUpdateUser());
- //circleVO.setCreateUserName(createUser.getName());
- //circleVO.setUpdateUserName(updateUser.getName());
-
- return circleVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/circle/wrapper/CircleWrapper.java b/src/main/java/org/springblade/modules/circle/wrapper/CircleWrapper.java
deleted file mode 100644
index 2dda406..0000000
--- a/src/main/java/org/springblade/modules/circle/wrapper/CircleWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.circle.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.modules.circle.vo.CircleVO;
-import java.util.Objects;
-
-/**
- * 圈子表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-30
- */
-public class CircleWrapper extends BaseEntityWrapper<CircleEntity, CircleVO> {
-
- public static CircleWrapper build() {
- return new CircleWrapper();
- }
-
- @Override
- public CircleVO entityVO(CircleEntity circle) {
- CircleVO circleVO = Objects.requireNonNull(BeanUtil.copy(circle, CircleVO.class));
-
- //User createUser = UserCache.getUser(circle.getCreateUser());
- //User updateUser = UserCache.getUser(circle.getUpdateUser());
- //circleVO.setCreateUserName(createUser.getName());
- //circleVO.setUpdateUserName(updateUser.getName());
-
- return circleVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/community/controller/CommunityController.java b/src/main/java/org/springblade/modules/community/controller/CommunityController.java
deleted file mode 100644
index b81ec3d..0000000
--- a/src/main/java/org/springblade/modules/community/controller/CommunityController.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.community.excel.CommunityExcel;
-import org.springblade.modules.community.excel.CommunityImporter;
-import org.springblade.modules.grid.excel.GridExcel;
-import org.springblade.modules.grid.excel.GridImporter;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.vo.CommunityVO;
-import org.springblade.modules.community.wrapper.CommunityWrapper;
-import org.springblade.modules.community.service.ICommunityService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 社区表 控制器
- *
- * @author BladeX
- * @since 2023-12-21
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-community/community")
-@Api(value = "社区表", tags = "社区表接口")
-public class CommunityController {
-
- private final ICommunityService communityService;
-
- /**
- * 社区表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入community")
- public R<CommunityVO> detail(CommunityEntity community) {
- CommunityEntity detail = communityService.getOne(Condition.getQueryWrapper(community));
- return R.data(CommunityWrapper.build().entityVO(detail));
- }
-
- /**
- * 社区表 自定义详情
- */
- @GetMapping("/getDetail")
- public R<CommunityVO> getDetail(CommunityEntity community) {
- return R.data(communityService.getDetail(community));
- }
-
- /**
- * 社区表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入community")
- public R<IPage<CommunityVO>> list(CommunityEntity community, Query query) {
- IPage<CommunityEntity> pages = communityService.page(Condition.getPage(query), Condition.getQueryWrapper(community));
- return R.data(CommunityWrapper.build().pageVO(pages));
- }
-
- /**
- * 社区表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入community")
- public R<IPage<CommunityVO>> page(CommunityVO community, Query query) {
- IPage<CommunityVO> pages = communityService.selectCommunityPage(Condition.getPage(query), community);
- return R.data(pages);
- }
-
- /**
- * 社区表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入community")
- public R save(@Valid @RequestBody CommunityEntity community) {
- return R.status(communityService.save(community));
- }
-
- /**
- * 社区表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入community")
- public R update(@Valid @RequestBody CommunityEntity community) {
- return R.status(communityService.updateById(community));
- }
-
- /**
- * 社区表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入community")
- public R submit(@Valid @RequestBody CommunityEntity community) {
- return R.status(communityService.saveOrUpdate(community));
- }
-
- /**
- * 社区表 自定义新增或修改
- */
- @PostMapping("/saveOrUpdate")
- public R saveOrUpdate(@Valid @RequestBody CommunityEntity community) {
- return R.status(communityService.saveOrUpdateCommunityEntity(community));
- }
-
- /**
- * 社区表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(communityService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 导入社区数据
- */
- @PostMapping("/import-community")
- public R importCommunity(MultipartFile file, Integer isCovered) {
- CommunityImporter communityImporter = new CommunityImporter(communityService, isCovered == 1);
- ExcelUtil.save(file, communityImporter, CommunityExcel.class);
- return R.success("操作成功");
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/community/dto/CommunityDTO.java b/src/main/java/org/springblade/modules/community/dto/CommunityDTO.java
deleted file mode 100644
index 83b8f49..0000000
--- a/src/main/java/org/springblade/modules/community/dto/CommunityDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.dto;
-
-import org.springblade.modules.community.entity.CommunityEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 社区表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-21
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CommunityDTO extends CommunityEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/community/entity/CommunityEntity.java b/src/main/java/org/springblade/modules/community/entity/CommunityEntity.java
deleted file mode 100644
index 6b4a2cb..0000000
--- a/src/main/java/org/springblade/modules/community/entity/CommunityEntity.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springblade.modules.grid.handle.GeometryTypeHandler;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 社区表 实体类
- *
- * @author BladeX
- * @since 2023-12-21
- */
-@Data
-@TableName("jczz_community")
-@ApiModel(value = "Community对象", description = "社区表")
-public class CommunityEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 街道编号
- */
- @ApiModelProperty(value = "街道编号")
- private String streetCode;
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String code;
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称")
- private String name;
- /**
- * 图片url
- */
- @ApiModelProperty(value = "图片url")
- private String picUrl;
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
- /**
- * 社区负责民警user_id
- */
- @ApiModelProperty(value = "社区负责民警user_id")
- private String resPoliceUserId;
- /**
- * 中心坐标-经度
- */
- @ApiModelProperty(value = "中心坐标-经度")
- private String lng;
- /**
- * 中心坐标-纬度
- */
- @ApiModelProperty(value = "中心坐标-纬度")
- private String lat;
- /**
- * 社区面数据
- * @TableField(typeHandler = GeometryTypeHandler.class) 操作面的时候用,平时注释掉
- */
- @ApiModelProperty(value = "社区面数据")
-// @TableField(typeHandler = GeometryTypeHandler.class)
- private String geom;
- /**
- * 简介
- */
- @ApiModelProperty(value = "简介")
- private String remark;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private String createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/community/excel/CommunityExcel.java b/src/main/java/org/springblade/modules/community/excel/CommunityExcel.java
deleted file mode 100644
index 09ec2bf..0000000
--- a/src/main/java/org/springblade/modules/community/excel/CommunityExcel.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.springblade.modules.community.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import java.io.Serializable;
-
-/**
- * GridExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class CommunityExcel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @ColumnWidth(15)
- @ExcelProperty("社区名称")
- private String communityName;
-
- @ColumnWidth(15)
- @ExcelProperty("社区编号")
- private String communityCode;
-
- @ColumnWidth(100)
- @ExcelProperty("区域")
- private String geom;
-
-}
diff --git a/src/main/java/org/springblade/modules/community/excel/CommunityImporter.java b/src/main/java/org/springblade/modules/community/excel/CommunityImporter.java
deleted file mode 100644
index 11252a3..0000000
--- a/src/main/java/org/springblade/modules/community/excel/CommunityImporter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.springblade.modules.community.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.community.service.ICommunityService;
-import java.util.List;
-
-/**
- * 社区数据导入类
- *
- * @author zhongrj
- */
-@RequiredArgsConstructor
-public class CommunityImporter implements ExcelImporter<CommunityExcel> {
-
- private final ICommunityService communityService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<CommunityExcel> data) {
- communityService.importCommunity(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java
deleted file mode 100644
index 317e954..0000000
--- a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.vo.CommunityVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 社区表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-21
- */
-public interface CommunityMapper extends BaseMapper<CommunityEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param community
- * @return
- */
- List<CommunityVO> selectCommunityPage(IPage page,
- @Param("community") CommunityVO community,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 查询个人社区编号集合
- * @param userId
- * @return
- */
- List<String> getCommunityCodeListByUserId(@Param("userId") Long userId);
-
- /**
- * 社区表 自定义详情
- */
- CommunityVO getDetail(@Param("community") CommunityEntity community);
-}
diff --git a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
deleted file mode 100644
index 4c67739..0000000
--- a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.community.mapper.CommunityMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="communityResultMap" type="org.springblade.modules.community.entity.CommunityEntity">
- <result column="id" property="id"/>
- <result column="street_code" property="streetCode"/>
- <result column="code" property="code"/>
- <result column="name" property="name"/>
- <result column="pic_url" property="picUrl"/>
- <result column="address" property="address"/>
- <result column="res_police_user_id" property="resPoliceUserId"/>
- <result column="lng" property="lng"/>
- <result column="lat" property="lat"/>
- <result column="remark" property="remark"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定义分页列表查询-->
- <select id="selectCommunityPage" resultType="org.springblade.modules.community.vo.CommunityVO">
- select
- jc.id,
- jc.street_code,
- jc.code,
- jc.name,
- jc.pic_url,
- jc.address,
- jc.res_police_user_id,
- jc.lng,
- jc.lat,
- jc.remark,
- br.town_name townName
- from jczz_community jc
- left join blade_region br on br.code = jc.code
- where jc.is_deleted = 0
- <if test="community.name !=null and community.name!=''">
- and jc.name like concat('%',#{community.name},'%')
- </if>
- <if test="community.code !=null and community.code!=''">
- and jc.code like concat('%',#{community.code},'%')
- </if>
- <if test="community.streetCode !=null and community.streetCode!=''">
- and jc.street_code like concat('%',#{community.streetCode},'%')
- </if>
- <if test="community.townName !=null and community.townName !=''">
- and br.town_name like concat('%',#{community.townName},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jc.code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jc.code in ('')
- </otherwise>
- </choose>
- </if>
- </select>
-
- <!--自定义分页列表查询-->
- <select id="getCommunityCodeListByUserId" resultType="java.lang.String">
- select code from jczz_community
- where is_deleted = 0 and res_police_user_id like concat('%',#{userId},'%')
- </select>
-
- <!--自定义分页列表查询-->
- <select id="getDetail" resultType="org.springblade.modules.community.vo.CommunityVO">
- select
- jc.id,
- jc.street_code,
- jc.code,
- jc.name,
- jc.pic_url,
- jc.address,
- jc.res_police_user_id,
- jc.lng,
- jc.lat,
- jc.remark,
- br.town_name townName
- from jczz_community jc
- left join blade_region br on br.code = jc.code
- where jc.is_deleted = 0
- and jc.id = #{community.id}
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/community/service/ICommunityService.java b/src/main/java/org/springblade/modules/community/service/ICommunityService.java
deleted file mode 100644
index 3f0c549..0000000
--- a/src/main/java/org/springblade/modules/community/service/ICommunityService.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.excel.CommunityExcel;
-import org.springblade.modules.community.vo.CommunityVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 社区表 服务类
- *
- * @author BladeX
- * @since 2023-12-21
- */
-public interface ICommunityService extends IService<CommunityEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param community
- * @return
- */
- IPage<CommunityVO> selectCommunityPage(IPage<CommunityVO> page, CommunityVO community);
-
-
- /**
- * 查询个人社区编号集合
- * @param userId
- * @return
- */
- List<String> getCommunityCodeListByUserId(Long userId);
-
- /**
- * 导入社区数据
- * @param data
- * @param isCovered
- */
- void importCommunity(List<CommunityExcel> data, Boolean isCovered);
-
- /**
- * 社区表 自定义新增或修改
- */
- boolean saveOrUpdateCommunityEntity(CommunityEntity community);
-
- /**
- * 社区表 自定义详情
- */
- CommunityVO getDetail(CommunityEntity community);
-}
diff --git a/src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java b/src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java
deleted file mode 100644
index 232c69a..0000000
--- a/src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.excel.CommunityExcel;
-import org.springblade.modules.community.vo.CommunityVO;
-import org.springblade.modules.community.mapper.CommunityMapper;
-import org.springblade.modules.community.service.ICommunityService;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.service.IDeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 社区表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-21
- */
-@Service
-public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, CommunityEntity> implements ICommunityService {
-
- @Override
- public IPage<CommunityVO> selectCommunityPage(IPage<CommunityVO> page, CommunityVO community) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(CommunityVO.class, community);
- return page.setRecords(baseMapper.selectCommunityPage(page,
- community,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator()));
- }
-
- /**
- * 查询个人社区编号集合
- * @param userId
- * @return
- */
- @Override
- public List<String> getCommunityCodeListByUserId(Long userId) {
- return baseMapper.getCommunityCodeListByUserId(userId);
- }
-
- /**
- * 导入社区数据
- * @param data
- * @param isCovered
- */
- @Override
- public void importCommunity(List<CommunityExcel> data, Boolean isCovered) {
- for (CommunityExcel communityExcel : data) {
- // 查询是否存在,存在即更新,否则新增
- QueryWrapper<CommunityEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted",0).eq("code",communityExcel.getCommunityCode());
- CommunityEntity one = getOne(wrapper);
- if (null!=one){
- // 更新
- one.setGeom(communityExcel.getGeom());
- // 更新
- updateById(one);
- }else {
- // 新增
- CommunityEntity communityEntity = new CommunityEntity();
- communityEntity.setCode(communityExcel.getCommunityCode());
- communityEntity.setName(communityExcel.getCommunityName());
- communityEntity.setGeom(communityExcel.getGeom());
- save(communityEntity);
- }
- }
- }
-
- /**
- * 社区表 自定义新增或修改
- */
- @Override
- public boolean saveOrUpdateCommunityEntity(CommunityEntity community) {
- return false;
- }
-
- /**
- * 社区表 自定义详情
- */
- @Override
- public CommunityVO getDetail(CommunityEntity community) {
- return baseMapper.getDetail(community);
- }
-}
diff --git a/src/main/java/org/springblade/modules/community/vo/CommunityVO.java b/src/main/java/org/springblade/modules/community/vo/CommunityVO.java
deleted file mode 100644
index e0a88f7..0000000
--- a/src/main/java/org/springblade/modules/community/vo/CommunityVO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.vo;
-
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 社区表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-21
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CommunityVO extends CommunityEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 街道名称
- */
- private String townName;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java b/src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java
deleted file mode 100644
index c8f419f..0000000
--- a/src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.community.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.vo.CommunityVO;
-import java.util.Objects;
-
-/**
- * 社区表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-21
- */
-public class CommunityWrapper extends BaseEntityWrapper<CommunityEntity, CommunityVO> {
-
- public static CommunityWrapper build() {
- return new CommunityWrapper();
- }
-
- @Override
- public CommunityVO entityVO(CommunityEntity community) {
- CommunityVO communityVO = Objects.requireNonNull(BeanUtil.copy(community, CommunityVO.class));
-
- //User createUser = UserCache.getUser(community.getCreateUser());
- //User updateUser = UserCache.getUser(community.getUpdateUser());
- //communityVO.setCreateUserName(createUser.getName());
- //communityVO.setUpdateUserName(updateUser.getName());
-
- return communityVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java b/src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java
deleted file mode 100644
index bb57e75..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
-import org.springblade.modules.convenienceHotline.wrapper.ConvenienceHotlineWrapper;
-import org.springblade.modules.convenienceHotline.service.IConvenienceHotlineService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 热线表 控制器
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-convenienceHotline/convenienceHotline")
-@Api(value = "热线表", tags = "热线表接口")
-public class ConvenienceHotlineController extends BladeController {
-
- private final IConvenienceHotlineService convenienceHotlineService;
-
- /**
- * 热线表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入convenienceHotline")
- public R<ConvenienceHotlineVO> detail(ConvenienceHotlineEntity convenienceHotline) {
- ConvenienceHotlineEntity detail = convenienceHotlineService.getOne(Condition.getQueryWrapper(convenienceHotline));
- return R.data(ConvenienceHotlineWrapper.build().entityVO(detail));
- }
- /**
- * 热线表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入convenienceHotline")
- public R<IPage<ConvenienceHotlineVO>> list(ConvenienceHotlineEntity convenienceHotline, Query query) {
- IPage<ConvenienceHotlineEntity> pages = convenienceHotlineService.page(Condition.getPage(query), Condition.getQueryWrapper(convenienceHotline));
- return R.data(ConvenienceHotlineWrapper.build().pageVO(pages));
- }
-
- /**
- * 热线表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入convenienceHotline")
- public R<IPage<ConvenienceHotlineVO>> page(ConvenienceHotlineVO convenienceHotline, Query query) {
- IPage<ConvenienceHotlineVO> pages = convenienceHotlineService.selectConvenienceHotlinePage(Condition.getPage(query), convenienceHotline);
- return R.data(pages);
- }
-
- /**
- * 热线表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入convenienceHotline")
- public R save(@Valid @RequestBody ConvenienceHotlineEntity convenienceHotline) {
- return R.status(convenienceHotlineService.save(convenienceHotline));
- }
-
- /**
- * 热线表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入convenienceHotline")
- public R update(@Valid @RequestBody ConvenienceHotlineEntity convenienceHotline) {
- return R.status(convenienceHotlineService.updateById(convenienceHotline));
- }
-
- /**
- * 热线表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入convenienceHotline")
- public R submit(@Valid @RequestBody ConvenienceHotlineEntity convenienceHotline) {
- return R.status(convenienceHotlineService.saveOrUpdate(convenienceHotline));
- }
-
- /**
- * 热线表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(convenienceHotlineService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java b/src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java
deleted file mode 100644
index a7e6d93..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.dto;
-
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 热线表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ConvenienceHotlineDTO extends ConvenienceHotlineEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java b/src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java
deleted file mode 100644
index 0103f33..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * 热线表 实体类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Data
-@TableName("jczz_convenience_hotline")
-@ApiModel(value = "ConvenienceHotline对象", description = "热线表")
-public class ConvenienceHotlineEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- /**
- * 主键
- */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 名称
- */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /**
- * 电话号码
- */
- @ApiModelProperty(value = "电话号码", example = "")
- @TableField("telephone")
- private String telephone;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注", example = "")
- @TableField("remark")
- private String remark;
-}
-
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java b/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java
deleted file mode 100644
index 6937f2a..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 热线表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-27
- */
-public interface ConvenienceHotlineMapper extends BaseMapper<ConvenienceHotlineEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param convenienceHotline
- * @return
- */
- List<ConvenienceHotlineVO> selectConvenienceHotlinePage(IPage page, @Param("convenienceHotline") ConvenienceHotlineVO convenienceHotline);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml b/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml
deleted file mode 100644
index 0aca37d..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.convenienceHotline.mapper.ConvenienceHotlineMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="convenienceHotlineResultMap" type="org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity">
- </resultMap>
-
-
- <select id="selectConvenienceHotlinePage" resultMap="convenienceHotlineResultMap">
- <include refid="selectConvenienceHotline"/>
- <where>
- <if test="convenienceHotline.id != null "> and id = #{convenienceHotline.id}</if>
- <if test="convenienceHotline.name != null and convenienceHotline.name != ''"> and name like concat('%', #{convenienceHotline.name},'%')</if>
- <if test="convenienceHotline.telephone != null and convenienceHotline.telephone != ''"> and telephone like
- concat ('%', #{convenienceHotline.telephone},'%') </if>
- <if test="convenienceHotline.remark != null and convenienceHotline.remark != ''"> and remark = #{convenienceHotline.remark}</if>
- </where>
- </select>
-
-
- <sql id="selectConvenienceHotline">
- select
- id,
- name,
- telephone,
- remark
- from
- jczz_convenience_hotline
- </sql>
-
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java b/src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java
deleted file mode 100644
index 5c263f2..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 热线表 服务类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-public interface IConvenienceHotlineService extends IService<ConvenienceHotlineEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param convenienceHotline
- * @return
- */
- IPage<ConvenienceHotlineVO> selectConvenienceHotlinePage(IPage<ConvenienceHotlineVO> page, ConvenienceHotlineVO convenienceHotline);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java b/src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java
deleted file mode 100644
index 973d8f8..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
-import org.springblade.modules.convenienceHotline.mapper.ConvenienceHotlineMapper;
-import org.springblade.modules.convenienceHotline.service.IConvenienceHotlineService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 热线表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Service
-public class ConvenienceHotlineServiceImpl extends ServiceImpl<ConvenienceHotlineMapper, ConvenienceHotlineEntity> implements IConvenienceHotlineService {
-
- @Override
- public IPage<ConvenienceHotlineVO> selectConvenienceHotlinePage(IPage<ConvenienceHotlineVO> page, ConvenienceHotlineVO convenienceHotline) {
- return page.setRecords(baseMapper.selectConvenienceHotlinePage(page, convenienceHotline));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java b/src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java
deleted file mode 100644
index 786b8fe..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.vo;
-
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 热线表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ConvenienceHotlineVO extends ConvenienceHotlineEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java b/src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java
deleted file mode 100644
index f69e1d1..0000000
--- a/src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.convenienceHotline.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
-import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
-import java.util.Objects;
-
-/**
- * 热线表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-27
- */
-public class ConvenienceHotlineWrapper extends BaseEntityWrapper<ConvenienceHotlineEntity, ConvenienceHotlineVO> {
-
- public static ConvenienceHotlineWrapper build() {
- return new ConvenienceHotlineWrapper();
- }
-
- @Override
- public ConvenienceHotlineVO entityVO(ConvenienceHotlineEntity convenienceHotline) {
- ConvenienceHotlineVO convenienceHotlineVO = Objects.requireNonNull(BeanUtil.copy(convenienceHotline, ConvenienceHotlineVO.class));
-
- //User createUser = UserCache.getUser(convenienceHotline.getCreateUser());
- //User updateUser = UserCache.getUser(convenienceHotline.getUpdateUser());
- //convenienceHotlineVO.setCreateUserName(createUser.getName());
- //convenienceHotlineVO.setUpdateUserName(updateUser.getName());
-
- return convenienceHotlineVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java b/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java
deleted file mode 100644
index 5ff7167..0000000
--- a/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.controller;
-
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.vo.PublicDiscussVO;
-import org.springblade.modules.discuss.wrapper.PublicDiscussWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 公益报名与议事 控制器
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("public_discuss/publicDiscuss")
-@Api(value = "公益报名与议事", tags = "公益报名与议事接口")
-public class PublicDiscussController extends BladeController {
-
- private final IPublicDiscussService publicDiscussService;
-
- /**
- * 公益报名与议事 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入publicDiscuss")
- public R<PublicDiscussEntity> detail(PublicDiscussVO publicDiscuss) {
-// publicDiscuss.setUserId(AuthUtil.getUserId());
- PublicDiscussEntity detail = publicDiscussService.getDetail(publicDiscuss);
- return R.data(detail);
- }
-
- /**
- * 公益报名与议事 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入publicDiscuss")
- public R<IPage<PublicDiscussVO>> list(PublicDiscussEntity publicDiscuss, Query query) {
- IPage<PublicDiscussEntity> pages = publicDiscussService.page(Condition.getPage(query), Condition.getQueryWrapper(publicDiscuss));
- return R.data(PublicDiscussWrapper.build().pageVO(pages));
- }
-
- /**
- * 公益报名与议事 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入publicDiscuss")
- public R<IPage<PublicDiscussVO>> page(PublicDiscussVO publicDiscuss, Query query) {
- IPage<PublicDiscussVO> pages = publicDiscussService.selectPublicDiscussPage(Condition.getPage(query), publicDiscuss);
- return R.data(pages);
- }
-
- /**
- * 公益报名与议事 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入publicDiscuss")
- public R save(@Valid @RequestBody PublicDiscussEntity publicDiscuss) {
- return R.status(publicDiscussService.save(publicDiscuss));
- }
-
- /**
- * 公益报名与议事 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入publicDiscuss")
- public R update(@Valid @RequestBody PublicDiscussEntity publicDiscuss) {
- return R.status(publicDiscussService.updateById(publicDiscuss));
- }
-
- /**
- * 公益报名与议事 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入publicDiscuss")
- public R submit(@Valid @RequestBody PublicDiscussEntity publicDiscuss) {
- publicDiscuss.setCreateBy(AuthUtil.getUserId());
- return R.status(publicDiscussService.saveOrUpdate(publicDiscuss));
- }
-
- /**
- * 公益报名与议事 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(publicDiscussService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java b/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
deleted file mode 100644
index c84bf62..0000000
--- a/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.discuss.dto.TopicsDTO;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.service.ITopicsService;
-import org.springblade.modules.discuss.service.IUserTopicsService;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import org.springblade.modules.discuss.wrapper.TopicsWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 议题表 控制器
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-topics/topics")
-@Api(value = "议题表", tags = "议题表接口")
-public class TopicsController extends BladeController {
-
- private final ITopicsService topicsService;
-
- /**
- * 议题表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入topics")
- public R<TopicsVO> detail(TopicsEntity topics) {
- TopicsEntity detail = topicsService.getOne(Condition.getQueryWrapper(topics));
- return R.data(TopicsWrapper.build().entityVO(detail));
- }
-
- /**
- * 议题表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入topics")
- public R<IPage<TopicsVO>> list(TopicsEntity topics, Query query) {
- IPage<TopicsEntity> pages = topicsService.page(Condition.getPage(query), Condition.getQueryWrapper(topics));
- return R.data(TopicsWrapper.build().pageVO(pages));
- }
-
- /**
- * 议题表 分页
- */
- @GetMapping("/lists")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入topics")
- public R<List<TopicsDTO>> list(TopicsDTO topics) {
- List<TopicsDTO> topicsDTOS = topicsService.selectTopicsList(topics);
- return R.data(topicsDTOS);
- }
-
- /**
- * 议题表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入topics")
- public R<IPage<TopicsVO>> page(TopicsVO topics, Query query) {
- IPage<TopicsVO> pages = topicsService.selectTopicsPage(Condition.getPage(query), topics);
- return R.data(pages);
- }
-
- /**
- * 议题表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入topics")
- public R save(@Valid @RequestBody TopicsDTO topics) {
- return R.status(topicsService.save(topics));
- }
-
- /**
- * 议题表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入topics")
- public R update(@Valid @RequestBody TopicsEntity topics) {
- return R.status(topicsService.updateById(topics));
- }
-
-
- /**
- * 议题表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入topics")
- public R submit(@Valid @RequestBody TopicsDTO topics) {
- boolean b = topicsService.saveOrUpdate(topics);
- if (b) {
- List<TopicsDTO> children = topics.getChildren();
- for (TopicsDTO child : children) {
- child.setParentId(topics.getId());
- child.setDiscussContent(topics.getDiscussContent());
- child.setLevel(2);
- boolean b2 = topicsService.saveOrUpdate(child);
- }
- return R.status(b);
- }
- return R.status(false);
- }
-
- /**
- * 议题表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam Integer ids) {
- return R.status(topicsService.removeById(ids));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/controller/UserPublicEnrollController.java b/src/main/java/org/springblade/modules/discuss/controller/UserPublicEnrollController.java
deleted file mode 100644
index fb82889..0000000
--- a/src/main/java/org/springblade/modules/discuss/controller/UserPublicEnrollController.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.service.IUserPublicEnrollService;
-import org.springblade.modules.discuss.vo.UserPublicEnrollVO;
-import org.springblade.modules.discuss.wrapper.UserPublicEnrollWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 用户公益报名记录表 控制器
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-userPublicEnroll/userPublicEnroll")
-@Api(value = "用户公益报名记录表", tags = "用户公益报名记录表接口")
-public class UserPublicEnrollController extends BladeController {
-
- private final IUserPublicEnrollService userPublicEnrollService;
-
- /**
- * 用户公益报名记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入userPublicEnroll")
- public R<UserPublicEnrollVO> detail(UserPublicEnrollEntity userPublicEnroll) {
- UserPublicEnrollEntity detail = userPublicEnrollService.getOne(Condition.getQueryWrapper(userPublicEnroll));
- return R.data(UserPublicEnrollWrapper.build().entityVO(detail));
- }
-
- /**
- * 用户公益报名记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入userPublicEnroll")
- public R<IPage<UserPublicEnrollVO>> list(UserPublicEnrollEntity userPublicEnroll, Query query) {
- IPage<UserPublicEnrollEntity> pages = userPublicEnrollService.page(Condition.getPage(query), Condition.getQueryWrapper(userPublicEnroll));
- return R.data(UserPublicEnrollWrapper.build().pageVO(pages));
- }
-
- /**
- * 用户公益报名记录表 分页
- */
- @GetMapping("/count")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "分页", notes = "传入userPublicEnroll")
- public R<Long> count(UserPublicEnrollEntity userPublicEnroll) {
- long count = userPublicEnrollService.count(Wrappers.<UserPublicEnrollEntity>lambdaQuery()
- .eq(UserPublicEnrollEntity::getPublicDiscussId, userPublicEnroll.getPublicDiscussId()));
- return R.data(count);
- }
-
- /**
- * 用户公益报名记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入userPublicEnroll")
- public R<IPage<UserPublicEnrollVO>> page(UserPublicEnrollVO userPublicEnroll, Query query) {
- IPage<UserPublicEnrollVO> pages = userPublicEnrollService.selectUserPublicEnrollPage(Condition.getPage(query), userPublicEnroll);
- return R.data(pages);
- }
-
- /**
- * 用户公益报名记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入userPublicEnroll")
- public R save(@Valid @RequestBody UserPublicEnrollEntity userPublicEnroll) {
- Integer aBoolean = userPublicEnrollService.saveUserPublicEnrollEntity(userPublicEnroll);
- if (aBoolean.equals(3)) {
- return R.fail("您房屋已经报名,不能重复报名!");
- } else if (aBoolean.equals(4)) {
- return R.fail("您已报名,不能重复报名!");
- } else if (aBoolean.equals(1)) {
- return R.status(true);
- }
- return R.fail("失败!");
- }
-
- /**
- * 用户公益报名记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入userPublicEnroll")
- public R update(@Valid @RequestBody UserPublicEnrollEntity userPublicEnroll) {
- return R.status(userPublicEnrollService.updateById(userPublicEnroll));
- }
-
- /**
- * 用户公益报名记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入userPublicEnroll")
- public R submit(@Valid @RequestBody UserPublicEnrollEntity userPublicEnroll) {
- return R.status(userPublicEnrollService.saveOrUpdate(userPublicEnroll));
- }
-
- /**
- * 用户公益报名记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(userPublicEnrollService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java b/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java
deleted file mode 100644
index 0ddb529..0000000
--- a/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.xxl.job.core.biz.impl.ExecutorBizImpl;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.excel.UserTopicsExcel;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.service.IUserTopicsService;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import org.springblade.modules.discuss.vo.UserTopicsVO;
-import org.springblade.modules.discuss.wrapper.UserTopicsWrapper;
-import org.springblade.modules.house.excel.HouseExcel;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.io.OutputStream;
-import java.net.URLEncoder;
-import java.util.List;
-
-/**
- * 用户议题报表 控制器
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-userTopics/userTopics")
-@Api(value = "用户议题报表", tags = "用户议题报表接口")
-public class UserTopicsController extends BladeController {
- private static Logger logger = LoggerFactory.getLogger(UserTopicsController.class);
-
-
- private final IUserTopicsService userTopicsService;
-
- /**
- * 用户议题报表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入userTopics")
- public R<UserTopicsVO> detail(UserTopicsEntity userTopics) {
- UserTopicsEntity detail = userTopicsService.getOne(Condition.getQueryWrapper(userTopics));
- return R.data(UserTopicsWrapper.build().entityVO(detail));
- }
-
- /**
- * 用户议题报表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入userTopics")
- public R<IPage<UserTopicsVO>> list(UserTopicsEntity userTopics, Query query) {
- IPage<UserTopicsEntity> pages = userTopicsService.page(Condition.getPage(query), Condition.getQueryWrapper(userTopics));
- return R.data(UserTopicsWrapper.build().pageVO(pages));
- }
-
- /**
- * 用户议题报表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入userTopics")
- public R<IPage<UserTopicsVO>> page(UserTopicsVO userTopics, Query query) {
- IPage<UserTopicsVO> pages = userTopicsService.selectUserTopicsPage(Condition.getPage(query), userTopics);
- return R.data(pages);
- }
-
- /**
- * 用户议题报表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入userTopics")
- public R save(@Valid @RequestBody UserTopicsEntity userTopics) {
- return R.status(userTopicsService.save(userTopics));
- }
-
- /**
- * 用户议题报表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入userTopics")
- public R update(@Valid @RequestBody UserTopicsEntity userTopics) {
- return R.status(userTopicsService.updateById(userTopics));
- }
-
- /**
- * 用户议题报表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入userTopics")
- public R submit(@Valid @RequestBody UserTopicsEntity userTopics) {
- return R.status(userTopicsService.saveUserTopicsEntity(userTopics));
- }
-
- /**
- * 用户议题报表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam Integer ids) {
- UserTopicsEntity userTopicsEntity = new UserTopicsEntity();
- userTopicsEntity.setDeleteFlag(1);
- userTopicsEntity.setId(ids);
- return R.status(userTopicsService.updateById(userTopicsEntity));
- }
-
- /**
- * 议题表 修改
- */
- @PostMapping("/updateBath")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "批量更新", notes = "传入topics")
- public R updateBath(@Valid @RequestBody TopicsVO topics) throws Exception {
- String result = userTopicsService.batchSave(topics);
- if (result.equals("200")) {
- return R.data("操作成功");
- }
- return R.fail(result);
- }
-
- /**
- * 导出用户
- */
- @GetMapping("/exportUser")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "导出用户", notes = "传入userTopics")
- public void exportUser(UserTopicsVO userTopics, HttpServletResponse response) {
- List<UserTopicsExcel> list = userTopicsService.exportUser(userTopics);
- ExcelUtil.export(response, "投票人员" + DateUtil.time(), "投票人员数据表", list, UserTopicsExcel.class);
- }
-
- /**
- * 导出Excel文件的方法。
- * 该方法用于将用户主题数据导出为Excel格式,供用户下载。
- *
- * @param response 用于设置HTTP响应,包括内容类型和文件名等信息。
- * @param userTopics 包含要导出的数据的用户主题视图对象。
- * @return 该方法不返回任何内容,而是将数据直接输出到HTTP响应的输出流中。
- */
- @GetMapping("/exportDataIndex")
- public void exportExcel(HttpServletResponse response, UserTopicsVO userTopics) {
- try (OutputStream out = response.getOutputStream()) {
- // 设置响应的内容类型为Excel文件
- response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
- // 设置响应的字符编码为UTF-8
- response.setCharacterEncoding("utf-8");
- // 编码文件名,并替换+号为%20,以兼容URL下载
- String fileName = URLEncoder.encode("投票人员", "UTF-8").replaceAll("\\+", "%20");
- // 设置响应头,指示浏览器以附件形式下载文件,并设置文件名
- response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
- // 调用服务层处理Excel数据的写入
- userTopicsService.handleExcel(out, userTopics);
- // 刷新输出流
- out.flush();
- } catch (Exception e) {
- // 记录异常信息
- logger.error(e.getMessage(), e);
- }
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/dto/PublicDiscussDTO.java b/src/main/java/org/springblade/modules/discuss/dto/PublicDiscussDTO.java
deleted file mode 100644
index 8e5d39d..0000000
--- a/src/main/java/org/springblade/modules/discuss/dto/PublicDiscussDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.dto;
-
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 公益报名与议事 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PublicDiscussDTO extends PublicDiscussEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java b/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
deleted file mode 100644
index b3b3f38..0000000
--- a/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.dto;
-
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 议题表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TopicsDTO extends TopicsEntity {
- private static final long serialVersionUID = 1L;
-
- private List<TopicsDTO> children;
-
- private Long userId;
- private Long householdId;
-
- private String houseCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/dto/UserPublicEnrollDTO.java b/src/main/java/org/springblade/modules/discuss/dto/UserPublicEnrollDTO.java
deleted file mode 100644
index 8bddac2..0000000
--- a/src/main/java/org/springblade/modules/discuss/dto/UserPublicEnrollDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.dto;
-
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 用户公益报名记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class UserPublicEnrollDTO extends UserPublicEnrollEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/dto/UserTopicsDTO.java b/src/main/java/org/springblade/modules/discuss/dto/UserTopicsDTO.java
deleted file mode 100644
index 2eb507f..0000000
--- a/src/main/java/org/springblade/modules/discuss/dto/UserTopicsDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.dto;
-
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 用户议题报表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class UserTopicsDTO extends UserTopicsEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java b/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java
deleted file mode 100644
index 04d4ef9..0000000
--- a/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 公益报名与议事 实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@TableName("jczz_public_discuss")
-@ApiModel(value = "PublicDiscuss对象", description = "公益报名与议事")
-public class PublicDiscussEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 标题
- */
- @ApiModelProperty(value = "标题", example = "")
- @TableField("title")
- private String title;
-
- /**
- * 0 开启:1关闭
- */
- @ApiModelProperty(value = "0 开启:1关闭", example = "")
- @TableField("open_flag")
- private Integer openFlag;
-
- /**
- * 人数限制:0 不限制
- */
- @ApiModelProperty(value = "人数限制:0 不限制", example = "")
- @TableField("number_restrictions")
- private Integer numberRestrictions;
-
- /**
- * 投票限制:0 一人一票 1 一户一票
- */
- @ApiModelProperty(value = "投票限制:0 一人一票 1 一户一票", example = "")
- @TableField("vote_restrictions")
- private Integer voteRestrictions;
-
- /**
- * 用户限制 0 不限制 1 必须绑定手机 2 必须绑定住房
- */
- @ApiModelProperty(value = "用户限制 0 不限制 1 必须绑定手机 2 必须绑定住房", example = "")
- @TableField("user_restrictions")
- private Integer userRestrictions;
-
- /**
- * 截止时间
- */
- @ApiModelProperty(value = "截止时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("end_time")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date endTime;
-
- /**
- * 开始时间
- */
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("start_time")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date startTime;
-
- /**
- * 文章id
- */
- @ApiModelProperty(value = "文章id", example = "")
- @TableField("article_id")
- private Integer articleId;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /**
- * 0:否 1 是
- */
- @ApiModelProperty(value = "0:否 1 是", example = "")
- @TableField("deleted_flag")
- @TableLogic
- private Integer deletedFlag;
-
- /**
- * 多房屋可重复投票 0否 1是
- */
- @ApiModelProperty(value = "多房屋可重复投票 0否 1是", example = "")
- @TableField("repeat_vote")
- private Integer repeatVote;
-
- /**
- * 票数公开 0 全程公开 1 投票后公开 2 投票结束公开 3 不公开
- */
- @ApiModelProperty(value = "票数公开 0 全程公开 1 投票后公开 2 投票结束公开 3 不公开", example = "")
- @TableField("vote_number_public")
- private Integer voteNumberPublic;
-
- /**
- * 指定用户 0 否 1是
- */
- @ApiModelProperty(value = "指定用户 0 否 1是", example = "")
- @TableField("appoint_user")
- private Integer appointUser;
-
- /**
- * 指定用户id [ 1,2,3,4,5,6,7,8,9 ]
- */
- @ApiModelProperty(value = "指定用户id [ 1,2,3,4,5,6,7,8,9 ]", example = "")
- @TableField("user_ids")
- private String userIds;
-
- /**
- * 0:公益报名 1:议事
- */
- @ApiModelProperty(value = "0:公益报名 1:议事", example = "")
- @TableField("event_type")
- private Integer eventType;
-
- /**
- * 创建人
- */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_by")
- private Long createBy;
-
- @ApiModelProperty(value = "0:未开启 1:已开启", example = "")
- @TableField("signature_flag")
- private Integer signatureFlag;
-}
diff --git a/src/main/java/org/springblade/modules/discuss/entity/TopicsEntity.java b/src/main/java/org/springblade/modules/discuss/entity/TopicsEntity.java
deleted file mode 100644
index 1374999..0000000
--- a/src/main/java/org/springblade/modules/discuss/entity/TopicsEntity.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import liquibase.pro.packaged.S;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 议题表 实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@TableName("jczz_topics")
-@ApiModel(value = "Topics对象", description = "议题表")
-public class TopicsEntity implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 议题内容 */
- @ApiModelProperty(value = "议题内容", example = "")
- @TableField("discuss_content")
- private String discussContent;
-
- /** 选项 0:单 1多 */
- @ApiModelProperty(value = "选项 0:单 1多", example = "")
- @TableField("option_range")
- private Integer optionRange;
-
- /** 排序 */
- @ApiModelProperty(value = "排序", example = "")
- @TableField("sort")
- private Integer sort;
-
- /** 选择内容 */
- @ApiModelProperty(value = "选择内容", example = "")
- @TableField("option_content")
- private String optionContent;
-
- /** 选项说明 */
- @ApiModelProperty(value = "选项说明", example = "")
- @TableField("option_detail")
- private String optionDetail;
-
- /** 投票数量 */
- @ApiModelProperty(value = "投票数量", example = "")
- @TableField("number")
- private Integer number;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 0否 1是 */
- @ApiModelProperty(value = "0否 1是", example = "")
- @TableField("delete_flag")
-// @TableLogic
- private Integer deleteFlag;
-
- /** 公益报名与议事表id */
- @ApiModelProperty(value = "公益报名与议事表id", example = "")
- @TableField("public_discuss_id")
- private Integer publicDiscussId;
-
- /** 父级id */
- @ApiModelProperty(value = "父级id", example = "")
- @TableField("parent_id")
- private Integer parentId;
-
- /**
- * 层级
- */
- @ApiModelProperty(value = "层级", example = "")
- @TableField("level")
- private Integer level;
-
- @ApiModelProperty(value = "选中", example = "")
- @TableField("selected")
- private String selected;
-
-
- @ApiModelProperty(value = "文章id", example = "")
- @TableField("article_id")
- private Integer articleId;
-
- /** 最多可选数量 */
- @ApiModelProperty(value = "最多可选数量", example = "")
- @TableField("option_number")
- private Integer optionNumber;
-
- /** 必选:1:否 2:是 */
- @ApiModelProperty(value = "必选:1:否 2:是", example = "")
- @TableField("mandatory_flag")
- private Integer mandatoryFlag;
-
- /** 附件 */
- @ApiModelProperty(value = "附件", example = "")
- @TableField("attachment")
- private String attachment;
-
- /** 最少可选数量 */
- @ApiModelProperty(value = "最少可选数量", example = "")
- @TableField("option_number_min")
- private Integer optionNumberMin;
-
-}
-
diff --git a/src/main/java/org/springblade/modules/discuss/entity/UserPublicEnrollEntity.java b/src/main/java/org/springblade/modules/discuss/entity/UserPublicEnrollEntity.java
deleted file mode 100644
index 785ee40..0000000
--- a/src/main/java/org/springblade/modules/discuss/entity/UserPublicEnrollEntity.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 用户公益报名记录表 实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@TableName("jczz_user_public_enroll")
-@ApiModel(value = "UserPublicEnroll对象", description = "用户公益报名记录表")
-public class UserPublicEnrollEntity implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 公益报名与议事表id */
- @ApiModelProperty(value = "公益报名与议事表id", example = "")
- @TableField("public_discuss_id")
- private Integer publicDiscussId;
-
- /**
- * 住户id
- */
- @ApiModelProperty(value = "住户id", example = "")
- @TableField("household_id")
- private Long householdId;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 0否 1是 */
- @ApiModelProperty(value = "0否 1是", example = "")
- @TableField("deleted_flag")
- @TableLogic
- private Integer deletedFlag;
-
- @ApiModelProperty(value = "签名地址", example = "")
- @TableField("signature_path")
- private String signaturePath;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- @TableField("house_code")
- private String houseCode;
-
- @ApiModelProperty(value = "文章id", example = "")
- @TableField("article_id")
- private Integer articleId;
-}
-
diff --git a/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java b/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java
deleted file mode 100644
index b9fe1c6..0000000
--- a/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 用户议题报表 实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@TableName("jczz_user_topics")
-@ApiModel(value = "UserTopics对象", description = "用户议题报表")
-public class UserTopicsEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 住户id
- */
- @ApiModelProperty(value = "住户id", example = "")
- @TableField("household_id")
- private Long householdId;
-
- /**
- * 议题id
- */
- @ApiModelProperty(value = "议题id", example = "")
- @TableField("topics_id")
- private Integer topicsId;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time", fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /**
- * 0否 1是
- */
- @ApiModelProperty(value = "0否 1是", example = "")
- @TableField("delete_flag")
- private Integer deleteFlag;
-
- /**
- * 公益报名与议事表id
- */
- @ApiModelProperty(value = "公益报名与议事表id", example = "")
- @TableField("public_discuss_id")
- private Integer publicDiscussId;
-
- @ApiModelProperty(value = "选项内容", example = "")
- @TableField("selected")
- private String selected;
-
- @ApiModelProperty(value = "签名地址", example = "")
- @TableField("signature_path")
- private String signaturePath;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- @TableField("house_code")
- private String houseCode;
-
-
- @ApiModelProperty(value = "文章id", example = "")
- @TableField("article_id")
- private Integer articleId;
-}
diff --git a/src/main/java/org/springblade/modules/discuss/excel/UserTopicsExcel.java b/src/main/java/org/springblade/modules/discuss/excel/UserTopicsExcel.java
deleted file mode 100644
index 495d2d1..0000000
--- a/src/main/java/org/springblade/modules/discuss/excel/UserTopicsExcel.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.springblade.modules.discuss.excel;
-
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class UserTopicsExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty( "业主姓名")
- private String name;
-
- @ExcelProperty( "业主电话")
- private String phone;
-
- @ExcelProperty( "地块")
- private String districtName;
-
- @ExcelProperty( "栋号")
- private String building;
-
- @ExcelProperty( "房号")
- private String room;
-
- @ExcelProperty( "地址")
- private String addressName;
-
- @ExcelProperty( "面积")
- private BigDecimal area;
-
- @ExcelProperty( "候选人")
- private String optionContent;
-
- @ExcelProperty(value = "投票时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/discuss/excel/holdExcel.java b/src/main/java/org/springblade/modules/discuss/excel/holdExcel.java
deleted file mode 100644
index 1ca2bf4..0000000
--- a/src/main/java/org/springblade/modules/discuss/excel/holdExcel.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.springblade.modules.discuss.excel;
-
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class holdExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty( "业主姓名")
- private String name;
-
- @ExcelProperty( "业主电话")
- private String phone;
-
- @ExcelProperty( "地块")
- private String districtName;
-
- @ExcelProperty( "栋号")
- private String building;
-
- @ExcelProperty( "房号")
- private String room;
-
-
- @ExcelProperty( "地址")
- private String houseName;
-
-// @ExcelProperty( "小区")
-// private String aoiName;
-
- @ExcelProperty( "面积")
- private BigDecimal area;
-
- @ExcelProperty( "是否投票")
- private String voteFlag;
-
- @ExcelProperty( "管理公约")
- private String managementRegulations;
-
- @ExcelProperty( "议事规则")
- private String rulesOfProcedure;
-
- @ExcelProperty( "投票项")
- @ExcelIgnore
- private String optionContent;
-
-
- @ExcelProperty(value = "投票时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/discuss/excel/topicsExcel.java b/src/main/java/org/springblade/modules/discuss/excel/topicsExcel.java
deleted file mode 100644
index c6ad98e..0000000
--- a/src/main/java/org/springblade/modules/discuss/excel/topicsExcel.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.springblade.modules.discuss.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class topicsExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty( "姓名")
- private String name;
-
- @ExcelProperty( "手机号")
- private String phone;
-
- @ExcelProperty( "地址")
- private String addressName;
-
- @ExcelProperty( "小区")
- private String aoiName;
-
- @ExcelProperty( "面积")
- private String area;
-
- @ExcelProperty( "地块")
- private String remark;
-
- @ExcelProperty( "投票项")
- private String optionContent;
-
-
- @ExcelProperty(value = "创建时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.java b/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.java
deleted file mode 100644
index d8b37f0..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.discuss.dto.PublicDiscussDTO;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.vo.PublicDiscussVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 公益报名与议事 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface PublicDiscussMapper extends BaseMapper<PublicDiscussEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param publicDiscuss
- * @return
- */
- List<PublicDiscussVO> selectPublicDiscussPage(IPage page, PublicDiscussVO publicDiscuss);
-
- /**
- * 查询公益报名与议事表列表
- *
- * @param publicDiscussDTO 公益报名与议事表
- * @return 公益报名与议事表集合
- */
- public List<PublicDiscussDTO> selectPublicDiscussList(PublicDiscussDTO publicDiscussDTO);
-
-
- /**
- * 查询公益报名与议事表详情
- *
- * @param publicDiscussVO 公益报名与议事表
- * @return 公益报名与议事表集合
- */
- public PublicDiscussVO selectPublicDiscuss(@Param("publicDiscuss") PublicDiscussVO publicDiscussVO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
deleted file mode 100644
index 1a7096b..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.discuss.mapper.PublicDiscussMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="publicDiscussResultMap" type="org.springblade.modules.discuss.vo.PublicDiscussVO">
- <result property="id" column="id" />
- <result property="title" column="title" />
- <result property="openFlag" column="open_flag" />
- <result property="numberRestrictions" column="number_restrictions" />
- <result property="voteRestrictions" column="vote_restrictions" />
- <result property="userRestrictions" column="user_restrictions" />
- <result property="endTime" column="end_time" />
- <result property="startTime" column="start_time" />
- <result property="articleId" column="article_id" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="deletedFlag" column="deleted_flag" />
- <result property="repeatVote" column="repeat_vote" />
- <result property="voteNumberPublic" column="vote_number_public" />
- <result property="appointUser" column="appoint_user" />
- <result property="userIds" column="user_ids" />
- <result property="eventType" column="event_type" />
- </resultMap>
-
-
- <sql id="selectPublicDiscuss">
- select
- id,
- title,
- open_flag,
- number_restrictions,
- vote_restrictions,
- user_restrictions,
- end_time,
- start_time,
- article_id,
- create_time,
- update_time,
- deleted_flag,
- repeat_vote,
- vote_number_public,
- appoint_user,
- user_ids,
- event_type
- from
- jczz_public_discuss
- </sql>
-
-
- <select id="selectPublicDiscussPage" resultMap="publicDiscussResultMap">
- select jpd.id,
- jpd.title,
- jpd.open_flag,
- jpd.number_restrictions,
- jpd.vote_restrictions,
- jpd.user_restrictions,
- jpd.end_time,
- jpd.start_time,
- jpd.article_id,
- jpd.create_time,
- jpd.update_time,
- jpd.deleted_flag,
- jpd.repeat_vote,
- jpd.vote_number_public,
- jpd.appoint_user,
- jpd.user_ids,
- jpd.event_type,
- jpd.signature_flag,
- GROUP_CONCAT(jh.name) userName
- from jczz_public_discuss jpd
- LEFT JOIN jczz_household jh ON FIND_IN_SET ( jh.id, jpd.user_ids )
- <where>
- <if test="publicDiscuss.id != null "> and id = #{publicDiscuss.id}</if>
- <if test="publicDiscuss.title != null and publicDiscuss.title != ''"> and title = #{publicDiscuss.title}</if>
- <if test="publicDiscuss.openFlag != null "> and open_flag = #{publicDiscuss.openFlag}</if>
- <if test="publicDiscuss.numberRestrictions != null "> and number_restrictions = #{publicDiscuss.numberRestrictions}</if>
- <if test="publicDiscuss.voteRestrictions != null "> and vote_restrictions = #{publicDiscuss.voteRestrictions}</if>
- <if test="publicDiscuss.userRestrictions != null "> and user_restrictions = #{publicDiscuss.userRestrictions}</if>
- <if test="publicDiscuss.endTime != null "> and end_time = #{publicDiscuss.endTime}</if>
- <if test="publicDiscuss.articleId != null "> and article_id = #{publicDiscuss.articleId}</if>
- <if test="publicDiscuss.createTime != null "> and create_time = #{publicDiscuss.createTime}</if>
- <if test="publicDiscuss.updateTime != null "> and update_time = #{publicDiscuss.updateTime}</if>
- <if test="publicDiscuss.deletedFlag != null "> and deleted_flag = #{publicDiscuss.deletedFlag}</if>
- <if test="publicDiscuss.repeatVote != null "> and repeat_vote = #{publicDiscuss.repeatVote}</if>
- <if test="publicDiscuss.voteNumberPublic != null "> and vote_number_public = #{publicDiscuss.voteNumberPublic}</if>
- <if test="publicDiscuss.appointUser != null "> and appoint_user = #{publicDiscuss.appointUser}</if>
- <if test="publicDiscuss.userIds != null and publicDiscuss.userIds != ''"> and user_ids = #{publicDiscuss.userIds}</if>
- <if test="publicDiscuss.eventType != null "> and event_type = #{publicDiscuss.eventType}</if>
- </where>
- GROUP BY jpd.id
- </select>
-
- <select id="selectPublicDiscussList" parameterType="org.springblade.modules.discuss.dto.PublicDiscussDTO" resultMap="publicDiscussResultMap">
- <include refid="selectPublicDiscuss"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="title != null and title != ''"> and title = #{title}</if>
- <if test="openFlag != null "> and open_flag = #{openFlag}</if>
- <if test="numberRestrictions != null "> and number_restrictions = #{numberRestrictions}</if>
- <if test="voteRestrictions != null "> and vote_restrictions = #{voteRestrictions}</if>
- <if test="userRestrictions != null "> and user_restrictions = #{userRestrictions}</if>
- <if test="endTime != null "> and end_time = #{endTime}</if>
- <if test="articleId != null "> and article_id = #{articleId}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="deletedFlag != null "> and deleted_flag = #{deletedFlag}</if>
- <if test="repeatVote != null "> and repeat_vote = #{repeatVote}</if>
- <if test="voteNumberPublic != null "> and vote_number_public = #{voteNumberPublic}</if>
- <if test="appointUser != null "> and appoint_user = #{appointUser}</if>
- <if test="userIds != null and userIds != ''"> and user_ids = #{userIds}</if>
- <if test="eventType != null "> and event_type = #{eventType}</if>
- </where>
- </select>
-
-
- <select id="selectPublicDiscuss" parameterType="org.springblade.modules.discuss.vo.PublicDiscussVO" resultMap="publicDiscussResultMap">
- select
- jpd.id,
- jpd.title,
- jpd.open_flag,
- jpd.number_restrictions,
- jpd.vote_restrictions,
- jpd.user_restrictions,
- jpd.end_time,
- jpd.start_time,
- jpd.article_id,
- jpd.create_time,
- jpd.update_time,
- jpd.deleted_flag,
- jpd.repeat_vote,
- jpd.vote_number_public,
- jpd.appoint_user,
- jpd.user_ids,
- jpd.event_type,
- jpd.signature_flag,
- (SELECT household_id from jczz_user_public_enroll where household_id = #{householdId} and article_id = jpd.article_id)householdId
- from
- jczz_public_discuss jpd
- <where>
- <if test="articleId != null ">and jpd.article_id = #{articleId}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java
deleted file mode 100644
index 4ec1125..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.mapper;
-
-import org.springblade.modules.discuss.dto.TopicsDTO;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 议题表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface TopicsMapper extends BaseMapper<TopicsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param topics
- * @return
- */
- List<TopicsVO> selectTopicsPage(IPage page, TopicsVO topics);
-
- /**
- * 查询议题表列表
- *
- * @param topicsDTO 议题表
- * @return 议题表集合
- */
- public List<TopicsDTO> selectTopicsList(TopicsDTO topicsDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
deleted file mode 100644
index ef46d1b..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.discuss.mapper.TopicsMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="topicsResultMap" type="org.springblade.modules.discuss.entity.TopicsEntity">
- <result property="id" column="id" />
- <result property="discussContent" column="discuss_content" />
- <result property="optionRange" column="option_range" />
- <result property="sort" column="sort" />
- <result property="optionContent" column="option_content" />
- <result property="optionDetail" column="option_detail" />
- <result property="number" column="number" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="deleteFlag" column="delete_flag" />
- <result property="publicDiscussId" column="public_discuss_id" />
- <result property="parentId" column="parent_id" />
- <result property="level" column="level" />
- <result property="selected" column="selected" />
- <result property="articleId" column="article_id" />
- <result property="optionNumber" column="option_number" />
- <result property="mandatoryFlag" column="mandatory_flag" />
- <result property="attachment" column="attachment" />
- <result property="optionNumberMin" column="option_number_min" />
- </resultMap>
-
-
- <resultMap type="org.springblade.modules.discuss.dto.TopicsDTO" id="TopicsDTOResult">
- <result property="id" column="id" />
- <result property="discussContent" column="discuss_content" />
- <result property="optionRange" column="option_range" />
- <result property="sort" column="sort" />
- <result property="optionContent" column="option_content" />
- <result property="optionDetail" column="option_detail" />
- <result property="number" column="number" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="deleteFlag" column="delete_flag" />
- <result property="publicDiscussId" column="public_discuss_id" />
- <result property="parentId" column="parent_id" />
- <result property="level" column="level" />
- <result property="selected" column="selected" />
- <result property="articleId" column="article_id" />
- <result property="optionNumber" column="option_number" />
- <result property="optionNumberMin" column="option_number_min" />
- <result property="mandatoryFlag" column="mandatory_flag" />
- <result property="attachment" column="attachment" />
- <collection property="children" column="id" javaType="list" ofType="org.springblade.modules.discuss.dto.TopicsDTO" select="selectStlCount">
- </collection>
-
-
- </resultMap>
-
- <select id="selectStlCount" parameterType="int" resultType="org.springblade.modules.discuss.dto.TopicsDTO">
- <include refid="selectTopics"/>
- <where>
- <if test="id != null "> parent_id = #{id}</if>
- and delete_flag = 0
- </where>
- </select>
-
-
- <sql id="selectTopics">
- select
- id,
- discuss_content,
- option_range,
- sort,
- option_content,
- option_detail,
- number,
- create_time,
- update_time,
- delete_flag,
- public_discuss_id,
- parent_id,
- level,
- selected,
- article_id,
- option_number,
- option_number_min,
- mandatory_flag,
- attachment
- from
- jczz_topics
- </sql>
- <select id="selectTopicsPage" resultMap="topicsResultMap">
- select * from jczz_topics where deleted_flag = 0
- </select>
-
- <select id="selectTopicsList" parameterType="org.springblade.modules.discuss.dto.TopicsDTO" resultMap="TopicsDTOResult">
- SELECT
- jt.id,
- jt.discuss_content,
- jt.option_range,
- jt.sort,
- jt.option_content,
- jt.option_detail,
- jt.number,
- jt.create_time,
- jt.update_time,
- jt.delete_flag,
- jt.public_discuss_id,
- jt.parent_id,
- jt.article_id,
- jt.LEVEL,
- jt.option_number,
- jt.option_number_min,
- jt.mandatory_flag,
- jt.attachment,
- ( SELECT
- jut.selected
- FROM
- jczz_user_topics jut
- LEFT JOIN jczz_topics jts ON jts.id = jut.topics_id
- WHERE
- jut.article_id = jt.article_id
- AND jts.parent_id = jt.id
- <if test="householdId != null "> AND jut.household_id = #{householdId}</if>
- AND jut.house_code = #{houseCode}
- limit 1
- ) selected
- FROM
- jczz_topics jt
- <where>
- <if test="id != null "> and jt.id = #{id}</if>
- <if test="discussContent != null and discussContent != ''"> and jt.discuss_content = #{discussContent}</if>
- <if test="optionRange != null "> and jt.option_range = #{optionRange}</if>
- <if test="sort != null "> and jt.sort = #{sort}</if>
- <if test="optionContent != null and optionContent != ''"> and jt.option_content = #{optionContent}</if>
- <if test="optionDetail != null and optionDetail != ''"> and jt.option_detail = #{optionDetail}</if>
- <if test="number != null "> and jt.number = #{number}</if>
- <if test="createTime != null "> and jt.create_time = #{createTime}</if>
- <if test="updateTime != null "> and jt.update_time = #{updateTime}</if>
- <if test="deleteFlag != null "> and jt.delete_flag = #{deleteFlag}</if>
- <if test="publicDiscussId != null "> and jt.public_discuss_id = #{publicDiscussId}</if>
- <if test="parentId != null "> and jt.parent_id = #{parentId}</if>
- <if test="level != null "> and jt.level = #{level}</if>
- <if test="articleId != null ">and jt.article_id = #{articleId}</if>
- and jt.delete_flag = 0
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.java b/src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.java
deleted file mode 100644
index 0111d8b..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.mapper;
-
-import org.springblade.modules.discuss.dto.UserPublicEnrollDTO;
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import org.springblade.modules.discuss.vo.UserPublicEnrollVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 用户公益报名记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface UserPublicEnrollMapper extends BaseMapper<UserPublicEnrollEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param userPublicEnroll
- * @return
- */
- List<UserPublicEnrollVO> selectUserPublicEnrollPage(IPage page, UserPublicEnrollVO userPublicEnroll);
-
- /**
- * 查询用户公益报名记录表列表
- *
- * @param userPublicEnrollDTO 用户公益报名记录表
- * @return 用户公益报名记录表集合
- */
- public List<UserPublicEnrollDTO> selectUserPublicEnrollList(UserPublicEnrollDTO userPublicEnrollDTO);
-}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.xml
deleted file mode 100644
index 7ff0b51..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.discuss.mapper.UserPublicEnrollMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="userPublicEnrollResultMap" type="org.springblade.modules.discuss.vo.UserPublicEnrollVO">
- <result property="id" column="id" />
- <result property="publicDiscussId" column="public_discuss_id" />
- <result property="householdId" column="household_id" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="deletedFlag" column="deleted_flag" />
- </resultMap>
-
- <sql id="selectUserPublicEnroll">
- select
- id,
- public_discuss_id,
- user_id,
- create_time,
- update_time,
- deleted_flag
- from
- jczz_user_public_enroll
- </sql>
-
-
-
- <select id="selectUserPublicEnrollPage" resultMap="userPublicEnrollResultMap">
- SELECT
- jup.id,
- jup.public_discuss_id,
- jup.household_id,
- jup.create_time,
- jup.update_time,
- jup.deleted_flag,
- jup.signature_path,
- bu.avatar,
- jh.`name`,
- jh.phone_number phone,
- jda.address_name,
- jda.aoi_name
- FROM
- jczz_user_public_enroll jup
- LEFT JOIN jczz_household jh ON jh.house_code = jup.house_code
- AND jh.is_deleted = 0
- AND jup.household_id = jh.id
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN blade_user bu ON jh.associated_user_id = bu.id
- AND bu.is_deleted = 0
- <where>
- <if test="userPublicEnroll.id != null "> and jup.id = #{userPublicEnroll.id}</if>
- <if test="userPublicEnroll.publicDiscussId != null "> and jup.public_discuss_id = #{userPublicEnroll.publicDiscussId}</if>
- <if test="userPublicEnroll.householdId != null "> and jup.household_id = #{userPublicEnroll.householdId}</if>
- <if test="userPublicEnroll.createTime != null "> and jup.create_time = #{userPublicEnroll.createTime}</if>
- <if test="userPublicEnroll.updateTime != null "> and jup.update_time = #{userPublicEnroll.updateTime}</if>
- <if test="userPublicEnroll.deletedFlag != null "> and jup.deleted_flag = #{userPublicEnroll.deletedFlag}</if>
- <if test="userPublicEnroll.articleId != null ">and jup.article_id = #{userPublicEnroll.articleId}</if>
- </where>
- </select>
-
- <select id="selectUserPublicEnrollList" parameterType="org.springblade.modules.discuss.dto.UserPublicEnrollDTO" resultMap="userPublicEnrollResultMap">
- <include refid="selectUserPublicEnroll"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="publicDiscussId != null "> and public_discuss_id = #{publicDiscussId}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="deletedFlag != null "> and deleted_flag = #{deletedFlag}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java
deleted file mode 100644
index 59d79de..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.discuss.dto.UserTopicsDTO;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.excel.UserTopicsExcel;
-import org.springblade.modules.discuss.excel.holdExcel;
-import org.springblade.modules.discuss.vo.UserTopicsVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 用户议题报表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface UserTopicsMapper extends BaseMapper<UserTopicsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param userTopics
- * @return
- */
- List<UserTopicsVO> selectUserTopicsPage(IPage page, UserTopicsVO userTopics);
-
-
- /**
- * 查询用户议题报表列表
- *
- * @param userTopicsDTO 用户议题报表
- * @return 用户议题报表集合
- */
- public List<UserTopicsDTO> selectUserTopicsList(UserTopicsDTO userTopicsDTO);
-
- List<UserTopicsExcel> exportUser( @Param("userTopics") UserTopicsVO userTopics);
- List<UserTopicsExcel> getresultTwo( @Param("userTopics") UserTopicsVO userTopics);
-
- UserTopicsVO getresult(UserTopicsVO userTopics);
-
- List<holdExcel> getHouseholdList(UserTopicsVO userTopics);
-}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
deleted file mode 100644
index 171bc4e..0000000
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
+++ /dev/null
@@ -1,272 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.discuss.mapper.UserTopicsMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="userTopicsResultMap" type="org.springblade.modules.discuss.vo.UserTopicsVO">
- <result property="id" column="id"/>
- <result property="householdId" column="household_id"/>
- <result property="topicsId" column="topics_id"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="deleteFlag" column="delete_flag"/>
- <result property="publicDiscussId" column="public_discuss_id"/>
- <result property="selected" column="selected"/>
- </resultMap>
-
- <sql id="selectUserTopics">
- select
- id,
- household_id,
- topics_id,
- create_time,
- update_time,
- delete_flag,
- selected,
- public_discuss_id
- from
- jczz_user_topics
- </sql>
-
-
- <select id="selectUserTopicsPage" resultMap="userTopicsResultMap">
- SELECT
- jut.article_id,
- jut.delete_flag,
- jut.signature_path,
- jut.create_time,
- jut.household_id,
- bu.avatar,
- jh.name,
- jh.phone_number phone,
- jda.address_name,
- jda.aoi_name
- <if test="userTopics.articleId != null ">,
- group_concat(jt.option_content) optionContent </if>
- FROM
- jczz_user_topics as jut
- LEFT JOIN jczz_household jh ON jh.id = jut.household_id and jh.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_topics jt on jt.id = jut.topics_id
- LEFT JOIN blade_user bu ON jh.associated_user_id = bu.id AND bu.is_deleted = 0
- <where>
- <if test="userTopics.id != null ">and jut.id = #{userTopics.id}</if>
- <if test="userTopics.name != null and userTopics.name != ''">
- and bu.name like concat('%',#{userTopics.name},'%')
- </if>
- <if test="userTopics.phone != null and userTopics.phone != ''">
- and bu.phone like concat('%',#{userTopics.phone},'%')
- </if>
-
- <if test="userTopics.aoiCodeList != null and userTopics.aoiCodeList.size() > 0">
- and jda.aoi_code in
- <foreach collection="userTopics.aoiCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </if>
-
- <if test="userTopics.householdId != null ">and jut.household_id = #{userTopics.householdId}</if>
- <if test="userTopics.topicsId != null ">and jut.topics_id = #{userTopics.topicsId}</if>
- <if test="userTopics.createTime != null ">and jut.create_time = #{userTopics.createTime}</if>
- <if test="userTopics.updateTime != null ">and jut.update_time = #{userTopics.updateTime}</if>
- <if test="userTopics.deleteFlag != null ">and jut.delete_flag = #{userTopics.deleteFlag}</if>
- <if test="userTopics.articleId != null ">
- and jut.article_id = #{userTopics.articleId}
- and jut.delete_flag = 0
- GROUP BY jut.article_id, jut.signature_path,jut.create_time,jut.household_id,jut.delete_flag,
- bu.avatar,
- jh.name,
- jh.phone_number,
- jda.address_name,
- jda.aoi_name
- </if>
- </where>
- </select>
-
- <select id="selectUserTopicsList" parameterType="org.springblade.modules.discuss.dto.UserTopicsDTO"
- resultMap="userTopicsResultMap">
- <include refid="selectUserTopics"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="userId != null ">and user_id = #{userId}</if>
- <if test="topicsId != null ">and topics_id = #{topicsId}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
- <if test="publicDiscussId != null ">and public_discuss_id = #{publicDiscussId}</if>
- </where>
- </select>
-
-
- <select id="exportUser" resultType="org.springblade.modules.discuss.excel.UserTopicsExcel">
- SELECT
- jut.article_id,
- jut.delete_flag,
- jut.signature_path,
- jut.create_time,
- jut.household_id,
- bu.avatar,
- jh.name,
- jh.phone_number phone,
- jda.address_name,
- jhs.area,
- jhs.remark,
- jda.address_code houseCode,
- jda.aoi_name
- <if test="articleId != null ">,
- group_concat(jt.option_content) optionContent </if>
- FROM
- jczz_user_topics as jut
- LEFT JOIN jczz_household jh ON jh.id = jut.household_id and jh.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_topics jt on jt.id = jut.topics_id
- LEFT JOIN blade_user bu ON jh.associated_user_id = bu.id AND bu.is_deleted = 0
- LEFT JOIN jczz_house jhs on jhs.house_code= jda.address_code
- <where>
- <if test="id != null ">and jut.id = #{id}</if>
- <if test="name != null and name != ''">
- and bu.name like concat('%',#{name},'%')
- </if>
- <if test="phone != null and phone != ''">
- and bu.phone like concat('%',#{phone},'%')
- </if>
-
- <if test="aoiCodeList != null and aoiCodeList.size() > 0">
- and jda.aoi_code in
- <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </if>
-
- <if test="householdId != null ">and jut.household_id = #{householdId}</if>
- <if test="topicsId != null ">and jut.topics_id = #{topicsId}</if>
- <if test="createTime != null ">and jut.create_time = #{createTime}</if>
- <if test="updateTime != null ">and jut.update_time = #{updateTime}</if>
- <if test="deleteFlag != null ">and jut.delete_flag = #{deleteFlag}</if>
- <if test="articleId != null ">
- and jut.article_id = #{articleId}
- and jut.delete_flag = 0
- GROUP BY jut.article_id, jut.signature_path,jut.create_time,jut.household_id,jut.delete_flag,
- bu.avatar,
- jh.name,
- jh.phone_number,
- jda.address_name,
- jhs.area,
- jhs.remark,
- jda.address_code,
- jda.aoi_name
- </if>
- </where>
-
- </select>
-
-
- <select id="getresult" resultMap="userTopicsResultMap">
-
- SELECT
- jts.option_content
- FROM
- jczz_user_topics jut
- LEFT JOIN jczz_topics jts ON jts.id = jut.topics_id
- WHERE
- jut.article_id = #{articleId}
- and jut.household_id=#{householdId}
- and jts.discuss_content=#{discussContent}
-
- </select>
-
- <select id="getresultTwo" resultType="org.springblade.modules.discuss.excel.UserTopicsExcel">
- SELECT
- jut.article_id,
- jut.delete_flag,
- jut.signature_path,
- jut.create_time,
- jut.household_id,
- bu.avatar,
- jh.name,
- jh.phone_number phone,
- jda.address_name,
- jhs.area,
- jhs.remark,
- jda.address_code houseCode,
- jda.aoi_name,
- jt.option_content,
- jhs.building,
- jhs.room,
- jhs.district_name
- FROM
- jczz_user_topics as jut
- LEFT JOIN jczz_household jh ON jh.id = jut.household_id
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_topics jt on jt.id = jut.topics_id
- LEFT JOIN blade_user bu ON jh.associated_user_id = bu.id AND bu.is_deleted = 0
- LEFT JOIN jczz_house jhs on jhs.house_code= jda.address_code
- <where>
- and jt.discuss_content != '议事规则'
- and jt.discuss_content != '管理公约'
- <if test="id != null ">and jut.id = #{id}</if>
- <if test="name != null and name != ''">
- and bu.name like concat('%',#{name},'%')
- </if>
- <if test="phone != null and phone != ''">
- and bu.phone like concat('%',#{phone},'%')
- </if>
-
- <if test="aoiCodeList != null and aoiCodeList.size() > 0">
- and jda.aoi_code in
- <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </if>
-
- <if test="householdId != null ">and jut.household_id = #{householdId}</if>
- <if test="topicsId != null ">and jut.topics_id = #{topicsId}</if>
- <if test="createTime != null ">and jut.create_time = #{createTime}</if>
- <if test="updateTime != null ">and jut.update_time = #{updateTime}</if>
- <if test="deleteFlag != null ">and jut.delete_flag = #{deleteFlag}</if>
- <if test="articleId != null ">
- and jut.article_id = #{articleId}
- and jut.delete_flag = 0
- </if>
- </where>
-
- </select>
- <select id="getHouseholdList" resultType="org.springblade.modules.discuss.excel.holdExcel">
- SELECT
- jh.id,
- jh.room,
- jh.building,
- jh.house_name,
- jh.district_name,
- jut.create_time,
- jh.area,
- (
- SELECT
- group_concat( jt.id ) AS optionContent
- FROM
- jczz_user_topics jut
- LEFT JOIN jczz_topics jt ON jt.id = jut.topics_id
- WHERE
- jut.house_code = jh.house_code
- AND jut.article_id = #{articleId}
- ) optionContent,
- (SELECT jhd.name from jczz_household jhd where jhd.house_code = jh.house_code AND jhd.is_deleted = 0 and jhd.relationship = 1 limit 1 ) name,
- (SELECT jhd.phone_number from jczz_household jhd where jhd.house_code = jh.house_code AND jhd.is_deleted = 0 and jhd.relationship = 1 limit 1 ) phone
- FROM
- jczz_house jh
- LEFT JOIN jczz_household jhd ON jhd.house_code = jh.house_code
- AND jh.is_deleted = 0 and jhd.relationship = 1
- LEFT JOIN jczz_user_topics jut on jut.household_id = jhd.id
- <where>
- <if test="aoiCodeList != null and aoiCodeList.size() > 0">
- and jh.district_code in
- <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </if>
- </where>
- GROUP BY id
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java b/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java
deleted file mode 100644
index 1f1a324..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.vo.PublicDiscussVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 公益报名与议事 服务类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface IPublicDiscussService extends IService<PublicDiscussEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param publicDiscuss
- * @return
- */
- IPage<PublicDiscussVO> selectPublicDiscussPage(IPage<PublicDiscussVO> page, PublicDiscussVO publicDiscuss);
-
-
- PublicDiscussVO getDetail(PublicDiscussVO publicDiscuss);
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java b/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java
deleted file mode 100644
index c20d3d7..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.discuss.dto.TopicsDTO;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import org.springblade.modules.discuss.vo.TopicsVO;
-
-import java.util.List;
-
-/**
- * 议题表 服务类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface ITopicsService extends IService<TopicsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param topics
- * @return
- */
- IPage<TopicsVO> selectTopicsPage(IPage<TopicsVO> page, TopicsVO topics);
-
-
- /**
- *
- * @param topicsDTO
- * @return
- */
- public List<TopicsDTO> selectTopicsList(TopicsDTO topicsDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java b/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java
deleted file mode 100644
index be23ef7..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import org.springblade.modules.discuss.vo.UserPublicEnrollVO;
-
-/**
- * 用户公益报名记录表 服务类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface IUserPublicEnrollService extends IService<UserPublicEnrollEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param userPublicEnroll
- * @return
- */
- IPage<UserPublicEnrollVO> selectUserPublicEnrollPage(IPage<UserPublicEnrollVO> page, UserPublicEnrollVO userPublicEnroll);
-
-
- Long getCount(Integer id);
-
- Integer saveUserPublicEnrollEntity(UserPublicEnrollEntity userPublicEnroll);
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java b/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
deleted file mode 100644
index f34c44b..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.excel.UserTopicsExcel;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import org.springblade.modules.discuss.vo.UserTopicsVO;
-
-import java.io.OutputStream;
-import java.util.List;
-
-/**
- * 用户议题报表 服务类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public interface IUserTopicsService extends IService<UserTopicsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param userTopics
- * @return
- */
- IPage<UserTopicsVO> selectUserTopicsPage(IPage<UserTopicsVO> page, UserTopicsVO userTopics);
-
-
- String batchSave(TopicsVO topics) throws Exception;
-
- Integer getCount(Integer id);
-
- List<UserTopicsExcel> exportUser(UserTopicsVO userTopics);
-
- Boolean saveUserTopicsEntity(UserTopicsEntity userTopics);
-
- void handleExcel(OutputStream out,UserTopicsVO userTopics);
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
deleted file mode 100644
index aa99403..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.mapper.PublicDiscussMapper;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.service.IUserPublicEnrollService;
-import org.springblade.modules.discuss.service.IUserTopicsService;
-import org.springblade.modules.discuss.vo.PublicDiscussVO;
-import org.springblade.modules.discuss.vo.UserTopicsVO;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-/**
- * 公益报名与议事 服务实现类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Service
-public class PublicDiscussServiceImpl extends ServiceImpl<PublicDiscussMapper, PublicDiscussEntity> implements IPublicDiscussService {
-
- @Resource
- private IUserPublicEnrollService iUserPublicEnrollService;
-
- @Resource
- private IUserTopicsService iUserTopicsService;
-
- @Override
- public IPage<PublicDiscussVO> selectPublicDiscussPage(IPage<PublicDiscussVO> page, PublicDiscussVO publicDiscuss) {
- List<PublicDiscussVO> publicDiscussVOS = baseMapper.selectPublicDiscussPage(page, publicDiscuss);
- for (PublicDiscussVO publicDiscussVO : publicDiscussVOS) {
- Long result = iUserPublicEnrollService.getCount(publicDiscussVO.getId());
- if (result != null) {
- publicDiscussVO.setEnrollCount(result.intValue());
- }
- UserTopicsVO userTopicsVo = new UserTopicsVO();
- userTopicsVo.setPublicDiscussId(publicDiscussVO.getId());
- Query query = new Query();
- query.setCurrent(1);
- query.setSize(10);
- IPage<UserTopicsVO> userTopicsVOIPage = iUserTopicsService.selectUserTopicsPage(Condition.getPage(query), userTopicsVo);
- if (userTopicsVOIPage != null) {
- Long total = userTopicsVOIPage.getTotal();
- publicDiscussVO.setTopsCount(total.intValue());
- }
- }
- return page.setRecords(publicDiscussVOS);
- }
-
-
- @Override
- public PublicDiscussVO getDetail(PublicDiscussVO publicDiscuss) {
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, publicDiscuss.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (householdEntity != null) {
- publicDiscuss.setHouseholdId(householdEntity.getId());
- }
- PublicDiscussVO publicDiscussVO = baseMapper.selectPublicDiscuss(publicDiscuss);
- publicDiscussVO.setDisabled(false);
- if (householdEntity != null) {
- // 一户一票
- IUserTopicsService bean = SpringUtils.getBean(IUserTopicsService.class);
- if (publicDiscussVO.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) {
- long count = bean.count(Wrappers.<UserTopicsEntity>lambdaQuery()
- .eq(UserTopicsEntity::getHouseCode, publicDiscuss.getHouseCode())
- .eq(UserTopicsEntity::getArticleId, publicDiscussVO.getArticleId()));
- if (count > 0) {
- publicDiscussVO.setDisabled(true);
- }
- } else {
- // 一个一票
- long count = bean.count(Wrappers.<UserTopicsEntity>lambdaQuery()
- .eq(UserTopicsEntity::getHouseholdId, householdEntity.getId())
- .eq(UserTopicsEntity::getArticleId, publicDiscussVO.getArticleId()));
- if (count > 0) {
- publicDiscussVO.setDisabled(true);
- }
- }
- // 判断是否业主,只有业主可以投票
- }
- return publicDiscussVO;
- }
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
deleted file mode 100644
index 4d3201f..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.discuss.dto.TopicsDTO;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import org.springblade.modules.discuss.mapper.TopicsMapper;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.service.ITopicsService;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 议题表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Service
-public class TopicsServiceImpl extends ServiceImpl<TopicsMapper, TopicsEntity> implements ITopicsService {
-
- @Override
- public IPage<TopicsVO> selectTopicsPage(IPage<TopicsVO> page, TopicsVO topics) {
- return page.setRecords(baseMapper.selectTopicsPage(page, topics));
- }
-
- @Override
- public List<TopicsDTO> selectTopicsList(TopicsDTO topicsDTO) {
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, topicsDTO.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (householdEntity != null) {
- topicsDTO.setHouseholdId(householdEntity.getId());
- }
- // 判断是否一户一票,如果一户一票,回显之前投票结果
- IPublicDiscussService discussService = SpringUtils.getBean(IPublicDiscussService.class);
- PublicDiscussEntity discussEntity = discussService.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, topicsDTO.getArticleId()));
- if (discussEntity != null && discussEntity.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) {
- topicsDTO.setHouseholdId(null);
- }
- return baseMapper.selectTopicsList(topicsDTO);
- }
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java
deleted file mode 100644
index a0f832f..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import org.springblade.modules.discuss.mapper.UserPublicEnrollMapper;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.service.IUserPublicEnrollService;
-import org.springblade.modules.discuss.vo.UserPublicEnrollVO;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springframework.stereotype.Service;
-
-/**
- * 用户公益报名记录表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Service
-public class UserPublicEnrollServiceImpl extends ServiceImpl<UserPublicEnrollMapper, UserPublicEnrollEntity> implements IUserPublicEnrollService {
-
- @Override
- public IPage<UserPublicEnrollVO> selectUserPublicEnrollPage(IPage<UserPublicEnrollVO> page, UserPublicEnrollVO userPublicEnroll) {
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, userPublicEnroll.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted,0)
- .last("limit 1"));
- if (householdEntity != null) {
- userPublicEnroll.setHouseholdId(householdEntity.getId());
- }
- return page.setRecords(baseMapper.selectUserPublicEnrollPage(page, userPublicEnroll));
- }
-
- @Override
- public Long getCount(Integer id) {
- return baseMapper.selectCount(Wrappers.<UserPublicEnrollEntity>lambdaQuery().
- eq(UserPublicEnrollEntity::getPublicDiscussId, id));
- }
-
- @Override
- public Integer saveUserPublicEnrollEntity(UserPublicEnrollEntity userPublicEnroll) {
- // userPublicEnroll.setUserId(AuthUtil.getUserId());
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, userPublicEnroll.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (householdEntity != null) {
- userPublicEnroll.setHouseholdId(householdEntity.getId());
- }
- // 判断是否一户一票 还是一人一票
- IPublicDiscussService bean = SpringUtil.getBean(IPublicDiscussService.class);
- PublicDiscussEntity one = bean.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, userPublicEnroll.getArticleId()));
- // 一户一票
- if (one.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) {
- long count = count(Wrappers.<UserPublicEnrollEntity>lambdaQuery()
- .eq(UserPublicEnrollEntity::getArticleId, userPublicEnroll.getArticleId())
- .eq(UserPublicEnrollEntity::getHouseCode, userPublicEnroll.getHouseCode()));
- if (count > 0) {
- return 3;
- }
- // 一人一票
- } else {
- long count = count(Wrappers.<UserPublicEnrollEntity>lambdaQuery()
- .eq(UserPublicEnrollEntity::getArticleId, userPublicEnroll.getArticleId())
- .eq(UserPublicEnrollEntity::getHouseholdId, userPublicEnroll.getHouseholdId()));
- if (count > 0) {
- return 4;
- }
- }
- boolean save = save(userPublicEnroll);
- return save ? 1 : 2;
- }
-}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
deleted file mode 100644
index f07bb6b..0000000
--- a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.service.impl;
-
-import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.ExcelWriter;
-import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder;
-import com.alibaba.excel.write.metadata.style.WriteCellStyle;
-import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang.time.DateFormatUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.jetbrains.annotations.Nullable;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.excel.UserTopicsExcel;
-import org.springblade.modules.discuss.excel.holdExcel;
-import org.springblade.modules.discuss.mapper.UserTopicsMapper;
-import org.springblade.modules.discuss.service.IPublicDiscussService;
-import org.springblade.modules.discuss.service.ITopicsService;
-import org.springblade.modules.discuss.service.IUserTopicsService;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import org.springblade.modules.discuss.vo.UserTopicsVO;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.excel.HouseHoldExcel;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 用户议题报表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Service
-public class UserTopicsServiceImpl extends ServiceImpl<UserTopicsMapper, UserTopicsEntity> implements IUserTopicsService {
- @Resource
- private ITopicsService topicsService;
- public static final String SMS_VALIDATE_PHONE = "sms:validate:code:";
-
- @Autowired
- private BladeRedis redisTemplate;
-
- @Override
- public IPage<UserTopicsVO> selectUserTopicsPage(IPage<UserTopicsVO> page, UserTopicsVO userTopics) {
- if (StringUtils.isNotBlank(userTopics.getDistrictId())) {
- List<String> longs = Arrays.asList(userTopics.getDistrictId().split(","));
- IDistrictService bean = SpringUtils.getBean(IDistrictService.class);
- List<DistrictEntity> list = bean.list(Wrappers.<DistrictEntity>lambdaQuery().in(DistrictEntity::getId, longs));
- List<String> collect = list.stream().map(item ->
- item.getAoiCode()
- ).collect(Collectors.toList());
- if (collect != null) {
- userTopics.setAoiCodeList(collect);
- }
- }
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, userTopics.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (householdEntity != null) {
- userTopics.setHouseholdId(householdEntity.getId());
- }
- List<UserTopicsVO> userTopicsVOS = baseMapper.selectUserTopicsPage(page, userTopics);
- return page.setRecords(userTopicsVOS);
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public String batchSave(TopicsVO topics) throws Exception {
- List<TopicsVO> topicsList = topics.getChildren();
- if (topicsList == null || topicsList.isEmpty()) {
- return "你未选选项内容";
- }
- IPublicDiscussService bean = SpringUtil.getBean(IPublicDiscussService.class);
- PublicDiscussEntity discussEntity = bean.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, topicsList.get(0).getArticleId()));
- // 判断是否在开始和结束时间内
- if (discussEntity.getStartTime().getTime() > System.currentTimeMillis() || discussEntity.getEndTime().getTime() < System.currentTimeMillis()) {
- return "目前不在投票时间内,投票时间:"+ DateUtil.formatDateTime(discussEntity.getStartTime()) +" 至 "+DateUtil.formatDateTime(discussEntity.getEndTime());
- }
- if (StringUtils.isNotBlank(topics.getPhone())) {
- if (StringUtils.isBlank(topics.getCode())) {
- return "验证码不能为空!";
- }
- Object validateCode = redisTemplate.get(SMS_VALIDATE_PHONE + topics.getPhone());
- if (validateCode == null) {
- return "验证码已过期";
- }
- if (!validateCode.toString().equals(topics.getCode())) {
- return "验证码错误";
- }
- //删除验证码
- redisTemplate.del(SMS_VALIDATE_PHONE + topics.getPhone());
- }
- // 判断是否一户一票 还是一人一票
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, topicsList.get(0).getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
-
- // 一户一票
- if (discussEntity.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) {
- long count = count(Wrappers.<UserTopicsEntity>lambdaQuery()
- .eq(UserTopicsEntity::getHouseCode, topicsList.get(0).getHouseCode())
- .eq(UserTopicsEntity::getArticleId, topicsList.get(0).getArticleId()));
- if (count > 0) {
- return "您的房屋已投票,不能重复投票!";
- }
- } else {
- //
- long count = count(Wrappers.<UserTopicsEntity>lambdaQuery()
- .eq(UserTopicsEntity::getHouseholdId, householdEntity.getId())
- .eq(UserTopicsEntity::getArticleId, topicsList.get(0).getArticleId()));
- if (count > 0) {
- return "您已投票,不能重复投票!";
- }
- }
- for (TopicsVO topic : topicsList) {
- if (topic.getMandatoryFlag().equals(2)) {
- if (topic.getOptionNumberMin() > 1) {
- JSONArray objects1 = JSON.parseArray(topic.getSelected());
- if (objects1.size() < topic.getOptionNumberMin()) {
- return topic.getDiscussContent() + ":议题最少需要选择" + topic.getOptionNumberMin() + "项";
- }
- }
- if (topic.getOptionNumber() > 1) {
- JSONArray objects1 = JSON.parseArray(topic.getSelected());
- if (objects1.size() > topic.getOptionNumber()) {
- return topic.getDiscussContent() + ":议题最多需要选择" + topic.getOptionNumber() + "项";
- }
- }
- }
- }
- Boolean userTopics = getaBoolean(topicsList, householdEntity);
- if (userTopics) return "200";
- return "操作失败!";
- }
-
- @Nullable
- private Boolean getaBoolean(List<TopicsVO> topics, HouseholdEntity householdEntity) {
- List<UserTopicsEntity> objects = new ArrayList<>();
- Boolean result = false;
- for (TopicsVO topic : topics) {
- UserTopicsEntity userTopicsEntity = new UserTopicsEntity();
- userTopicsEntity.setHouseholdId(householdEntity.getId());
- userTopicsEntity.setSelected(topic.getSelected());
- userTopicsEntity.setTopicsId(topic.getId());
- userTopicsEntity.setPublicDiscussId(topic.getPublicDiscussId());
- objects.add(userTopicsEntity);
- // 单选
- if (topic.getOptionRange().equals(0)) {
- if (StringUtils.isBlank(topic.getSelected())) {
- break;
- }
- UserTopicsEntity userTopics = new UserTopicsEntity();
- userTopics.setSelected(topic.getSelected());
- userTopics.setHouseholdId(householdEntity.getId());
- userTopics.setPublicDiscussId(topic.getPublicDiscussId());
- userTopics.setTopicsId(Integer.valueOf(topic.getSelected()));
- userTopics.setArticleId(topic.getArticleId());
- userTopics.setHouseCode(topic.getHouseCode());
- userTopics.setSignaturePath(topic.getSignaturePath());
- UpdateWrapper<TopicsEntity> objectUpdateWrapper = new UpdateWrapper<>();
- objectUpdateWrapper.setSql("number = number + 1");
- objectUpdateWrapper.eq("id", topic.getSelected());
- topicsService.update(null, objectUpdateWrapper);
- result = save(userTopics);
- } else {
- // 多选
- if (StringUtils.isBlank(topic.getSelected())) {
- break;
- }
- JSONArray objects1 = JSON.parseArray(topic.getSelected());
- List<UserTopicsEntity> objectsTwo = new ArrayList<>();
- for (Object o : objects1) {
- UserTopicsEntity userTopics = new UserTopicsEntity();
- userTopics.setSelected(topic.getSelected());
- userTopics.setHouseholdId(householdEntity.getId());
- userTopics.setPublicDiscussId(topic.getPublicDiscussId());
- userTopics.setArticleId(topic.getArticleId());
- userTopics.setHouseCode(topic.getHouseCode());
- userTopics.setTopicsId((Integer) o);
- userTopics.setSignaturePath(topic.getSignaturePath());
- objectsTwo.add(userTopics);
- UpdateWrapper<TopicsEntity> objectUpdateWrapper = new UpdateWrapper<>();
- objectUpdateWrapper.setSql("number = number + 1");
- objectUpdateWrapper.eq("id", o);
- topicsService.update(null, objectUpdateWrapper);
- }
- result = saveBatch(objectsTwo);
- }
- }
- return result;
- }
-
-
- @Override
- public Integer getCount(Integer id) {
- List<UserTopicsEntity> list = list(Wrappers.<UserTopicsEntity>lambdaQuery()
- .eq(UserTopicsEntity::getPublicDiscussId, id)
- .groupBy(UserTopicsEntity::getHouseholdId));
- return list.size();
- }
-
- @Override
- public List<UserTopicsExcel> exportUser(UserTopicsVO userTopics) {
- if (StringUtils.isNotBlank(userTopics.getDistrictId())) {
- List<String> longs = Arrays.asList(userTopics.getDistrictId().split(","));
- IDistrictService bean = SpringUtils.getBean(IDistrictService.class);
- List<DistrictEntity> list = bean.list(Wrappers.<DistrictEntity>lambdaQuery().in(DistrictEntity::getId, longs));
- List<String> collect = list.stream().map(item ->
- item.getAoiCode()
- ).collect(Collectors.toList());
- if (collect != null) {
- userTopics.setAoiCodeList(collect);
- }
- }
- List<UserTopicsExcel> userTopicsExcels = baseMapper.exportUser(userTopics);
- return userTopicsExcels;
- }
-
- @Override
- public Boolean saveUserTopicsEntity(UserTopicsEntity userTopics) {
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getHouseCode, userTopics.getHouseCode())
- .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId())
- .eq(HouseholdEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (householdEntity != null) {
- userTopics.setHouseholdId(householdEntity.getId());
- }
- return save(userTopics);
- }
-
- /**
- * 处理Excel文件的生成,将用户主题数据写入Excel并输出到流中。
- *
- * @param out 输出流,用于保存生成的Excel文件。
- * @param userTopics 用户主题数据,包含提案和投票记录信息。
- */
- @Override
- public void handleExcel(OutputStream out, UserTopicsVO userTopics) {
-
- // 初始化Excel写入器
- ExcelWriter excelWriter = EasyExcel.write(out)
- .build();
-
- // 设置内容自动换行的样式
- WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
- contentWriteCellStyle.setWrapped(true);
-
- // 处理并写入提案数据
- List<holdExcel> proposal = getProposal(userTopics);
- ExcelWriterSheetBuilder userExcelSheet = new ExcelWriterSheetBuilder();
- userExcelSheet.registerWriteHandler(new HorizontalCellStyleStrategy(null, contentWriteCellStyle));
- userExcelSheet.sheetName("小区投票人员");
- userExcelSheet.sheetNo(0);
- userExcelSheet.head(holdExcel.class);
- excelWriter.write(proposal, userExcelSheet.build());
-
- // 处理并写入投票记录数据
- List<UserTopicsExcel> publicopinion = getPublicopinion(userTopics);
- ExcelWriterSheetBuilder classExcelSheet = new ExcelWriterSheetBuilder();
- classExcelSheet.registerWriteHandler(new HorizontalCellStyleStrategy(null, contentWriteCellStyle));
- classExcelSheet.sheetName("投票记录");
- classExcelSheet.sheetNo(1);
- classExcelSheet.head(UserTopicsExcel.class);
- excelWriter.write(publicopinion, classExcelSheet.build());
- // 完成Excel写入并释放资源
- excelWriter.finish();
-
-
- }
-
- /**
- * 获取首页的房屋记录
- *
- * @param userTopics 包含用户话题信息的对象,其中可能含有区域ID等关键信息
- * @return 返回一个包含房屋记录信息的列表
- */
- private List<holdExcel> getProposal(UserTopicsVO userTopics) {
- List<holdExcel> resultList = new ArrayList<>();
- try {
- // 检查区域ID字符串是否有效
- List<String> strings = validateAndParseDistrictId(userTopics.getDistrictId());
- // 获取区域服务和话题服务的实例
- IDistrictService districtService = SpringUtils.getBean(IDistrictService.class);
- ITopicsService topicsService = SpringUtils.getBean(ITopicsService.class);
- // 处理区域ID并查询对应的区域实体列表
- List<String> aoiCodeList = processDistrictIds(districtService, strings);
- // 设置AOI代码列表到用户话题对象中
- userTopics.setAoiCodeList(aoiCodeList);
- // 查询并处理房屋列表信息
- List<holdExcel> householdList = processHouseholdList(topicsService, userTopics);
- resultList.addAll(householdList);
- } catch (Exception e) {
- // 适当的异常处理逻辑
- // 例如:记录日志、返回错误信息等
- e.printStackTrace();
- }
- return resultList;
- }
-
- /**
- * 验证并解析区域ID字符串。
- *
- * @param districtIdStr 区域ID的字符串表示。不能为空或空白字符串。
- * @return 返回一个JSONArray对象,包含解析后的区域ID。
- * @throws IllegalArgumentException 如果区域ID字符串为空或空白字符串,抛出此异常。
- */
- private List<String> validateAndParseDistrictId(String districtIdStr) throws IllegalArgumentException {
- // 验证区域ID字符串是否为空
- if (StringUtils.isBlank(districtIdStr)) {
- throw new IllegalArgumentException("区域ID不能为空");
- }
- // 解析区域ID字符串为JSONArray对象
- return Arrays.asList(districtIdStr.split(","));
- }
-
- private List<String> processDistrictIds(IDistrictService districtService, List<String> districtIds) {
- List<String> collect1 = districtIds.stream().map(item -> (String) item).collect(Collectors.toList());
- List<DistrictEntity> list3 = districtService.list(Wrappers.<DistrictEntity>lambdaQuery().in(DistrictEntity::getId, collect1));
- return list3.stream().map(item -> item.getAoiCode()).collect(Collectors.toList());
- }
-
- private List<holdExcel> processHouseholdList(ITopicsService topicsService, UserTopicsVO userTopics) {
- List<holdExcel> householdList = baseMapper.getHouseholdList(userTopics);
- householdList.forEach(item -> processItem(topicsService, item));
- return householdList;
- }
-
- private void processItem(ITopicsService topicsService, holdExcel item) {
- if (StringUtils.isBlank(item.getOptionContent())) {
- item.setVoteFlag("否");
- } else {
- List<Long> longs = Func.toLongList(item.getOptionContent());
- for (Long aLong : longs) {
- TopicsEntity topics = topicsService.getById(aLong);
- setManagementRegulationsOrRulesOfProcedure(item, topics);
- }
- item.setVoteFlag("是");
- }
- }
-
- private void setManagementRegulationsOrRulesOfProcedure(holdExcel item, TopicsEntity topics) {
- if (StringUtils.isNotBlank(topics.getDiscussContent())) {
- if (topics.getDiscussContent().equals("管理公约")) {
- item.setManagementRegulations(topics.getOptionContent());
- } else if (topics.getDiscussContent().equals("议事规则")) {
- item.setRulesOfProcedure(topics.getOptionContent());
- }
- }
- }
-
-
- /**
- * 获取公开意见信息
- *
- * @param userTopics 用户话题VO对象,封装了用户话题的查询条件
- * @return 返回用户话题的Excel格式列表,包含所有符合条件的意见信息
- */
- private List<UserTopicsExcel> getPublicopinion(UserTopicsVO userTopics) {
- // 初始化返回列表
- List<UserTopicsExcel> list = new ArrayList<>();
- // 通过基础mapper查询结果,并将结果添加到列表中
- List<UserTopicsExcel> userTopicsExcels = baseMapper.getresultTwo(userTopics);
- list.addAll(userTopicsExcels);
- return list;
- }
-}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java b/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java
deleted file mode 100644
index 13b69aa..0000000
--- a/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.vo;
-
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 公益报名与议事 视图实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PublicDiscussVO extends PublicDiscussEntity {
- private static final long serialVersionUID = 1L;
-
- private Integer enrollCount;
-
- private Integer topsCount;
-
- private Long householdId;
- private String userName;
-
- private String houseCode;
-
- private Boolean disabled;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java b/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java
deleted file mode 100644
index bcf772b..0000000
--- a/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-
-import java.util.List;
-
-/**
- * 议题表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TopicsVO extends TopicsEntity {
-
- private static final long serialVersionUID = 1L;
-
- private List<TopicsVO> children;
-
- private String houseCode;
-
- private String signaturePath;
- private String phone;
- private String code;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/UserPublicEnrollVO.java b/src/main/java/org/springblade/modules/discuss/vo/UserPublicEnrollVO.java
deleted file mode 100644
index 4c4e67b..0000000
--- a/src/main/java/org/springblade/modules/discuss/vo/UserPublicEnrollVO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.vo;
-
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 用户公益报名记录表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class UserPublicEnrollVO extends UserPublicEnrollEntity {
- private static final long serialVersionUID = 1L;
-
- private String avatar;
-
- private String name;
-
- private String phone;
-
- private String addressName;
-
- private String aoiName;
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java b/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java
deleted file mode 100644
index a8bdc14..0000000
--- a/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.vo;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 用户议题报表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-22
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class UserTopicsVO extends UserTopicsEntity {
- private static final long serialVersionUID = 1L;
-
- private String avatar;
-
- private String name;
-
- private String phone;
-
- private String addressName;
-
- private String aoiName;
-
- private List<String> aoiCodeList;
-
- private String districtId;
-
-
- private String optionContent;
-
- /** 议题内容 */
- @ApiModelProperty(value = "议题内容", example = "")
- private String discussContent;
-}
diff --git a/src/main/java/org/springblade/modules/discuss/wrapper/PublicDiscussWrapper.java b/src/main/java/org/springblade/modules/discuss/wrapper/PublicDiscussWrapper.java
deleted file mode 100644
index 5dd2b5d..0000000
--- a/src/main/java/org/springblade/modules/discuss/wrapper/PublicDiscussWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.discuss.entity.PublicDiscussEntity;
-import org.springblade.modules.discuss.vo.PublicDiscussVO;
-import java.util.Objects;
-
-/**
- * 公益报名与议事 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public class PublicDiscussWrapper extends BaseEntityWrapper<PublicDiscussEntity, PublicDiscussVO> {
-
- public static PublicDiscussWrapper build() {
- return new PublicDiscussWrapper();
- }
-
- @Override
- public PublicDiscussVO entityVO(PublicDiscussEntity publicDiscuss) {
- PublicDiscussVO publicDiscussVO = Objects.requireNonNull(BeanUtil.copy(publicDiscuss, PublicDiscussVO.class));
-
- //User createUser = UserCache.getUser(publicDiscuss.getCreateUser());
- //User updateUser = UserCache.getUser(publicDiscuss.getUpdateUser());
- //publicDiscussVO.setCreateUserName(createUser.getName());
- //publicDiscussVO.setUpdateUserName(updateUser.getName());
-
- return publicDiscussVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/wrapper/TopicsWrapper.java b/src/main/java/org/springblade/modules/discuss/wrapper/TopicsWrapper.java
deleted file mode 100644
index 1e06482..0000000
--- a/src/main/java/org/springblade/modules/discuss/wrapper/TopicsWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.discuss.entity.TopicsEntity;
-import org.springblade.modules.discuss.vo.TopicsVO;
-import java.util.Objects;
-
-/**
- * 议题表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public class TopicsWrapper extends BaseEntityWrapper<TopicsEntity, TopicsVO> {
-
- public static TopicsWrapper build() {
- return new TopicsWrapper();
- }
-
- @Override
- public TopicsVO entityVO(TopicsEntity topics) {
- TopicsVO topicsVO = Objects.requireNonNull(BeanUtil.copy(topics, TopicsVO.class));
-
- //User createUser = UserCache.getUser(topics.getCreateUser());
- //User updateUser = UserCache.getUser(topics.getUpdateUser());
- //topicsVO.setCreateUserName(createUser.getName());
- //topicsVO.setUpdateUserName(updateUser.getName());
-
- return topicsVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/wrapper/UserPublicEnrollWrapper.java b/src/main/java/org/springblade/modules/discuss/wrapper/UserPublicEnrollWrapper.java
deleted file mode 100644
index f14ef0f..0000000
--- a/src/main/java/org/springblade/modules/discuss/wrapper/UserPublicEnrollWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
-import org.springblade.modules.discuss.vo.UserPublicEnrollVO;
-import java.util.Objects;
-
-/**
- * 用户公益报名记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public class UserPublicEnrollWrapper extends BaseEntityWrapper<UserPublicEnrollEntity, UserPublicEnrollVO> {
-
- public static UserPublicEnrollWrapper build() {
- return new UserPublicEnrollWrapper();
- }
-
- @Override
- public UserPublicEnrollVO entityVO(UserPublicEnrollEntity userPublicEnroll) {
- UserPublicEnrollVO userPublicEnrollVO = Objects.requireNonNull(BeanUtil.copy(userPublicEnroll, UserPublicEnrollVO.class));
-
- //User createUser = UserCache.getUser(userPublicEnroll.getCreateUser());
- //User updateUser = UserCache.getUser(userPublicEnroll.getUpdateUser());
- //userPublicEnrollVO.setCreateUserName(createUser.getName());
- //userPublicEnrollVO.setUpdateUserName(updateUser.getName());
-
- return userPublicEnrollVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/discuss/wrapper/UserTopicsWrapper.java b/src/main/java/org/springblade/modules/discuss/wrapper/UserTopicsWrapper.java
deleted file mode 100644
index fbb0d26..0000000
--- a/src/main/java/org/springblade/modules/discuss/wrapper/UserTopicsWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.discuss.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.discuss.entity.UserTopicsEntity;
-import org.springblade.modules.discuss.vo.UserTopicsVO;
-import java.util.Objects;
-
-/**
- * 用户议题报表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-22
- */
-public class UserTopicsWrapper extends BaseEntityWrapper<UserTopicsEntity, UserTopicsVO> {
-
- public static UserTopicsWrapper build() {
- return new UserTopicsWrapper();
- }
-
- @Override
- public UserTopicsVO entityVO(UserTopicsEntity userTopics) {
- UserTopicsVO userTopicsVO = Objects.requireNonNull(BeanUtil.copy(userTopics, UserTopicsVO.class));
-
- //User createUser = UserCache.getUser(userTopics.getCreateUser());
- //User updateUser = UserCache.getUser(userTopics.getUpdateUser());
- //userTopicsVO.setCreateUserName(createUser.getName());
- //userTopicsVO.setUpdateUserName(updateUser.getName());
-
- return userTopicsVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/controller/DisputeRecordController.java b/src/main/java/org/springblade/modules/disputeRecord/controller/DisputeRecordController.java
deleted file mode 100644
index 20ebb04..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/controller/DisputeRecordController.java
+++ /dev/null
@@ -1,200 +0,0 @@
-package org.springblade.modules.disputeRecord.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
-import org.springblade.modules.disputeRecord.excel.DisputeRecordImporter;
-import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
-import org.springblade.modules.disputeRecord.wrapper.DisputeRecordWrapper;
-import org.springblade.modules.disputeRecord.service.IDisputeRecordService;
-import org.springframework.web.multipart.MultipartFile;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 矛盾纠纷记录表 控制器
- *
- * @author BladeX
- * @since 2024-03-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-disputeRecord/disputeRecord")
-@Api(value = "矛盾纠纷记录表", tags = "矛盾纠纷记录表接口")
-public class DisputeRecordController {
-
- private final IDisputeRecordService disputeRecordService;
-
- /**
- * 矛盾纠纷记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入disputeRecord")
- public R detail(DisputeRecordEntity disputeRecord) {
- DisputeRecordEntity detail = disputeRecordService.getOne(Condition.getQueryWrapper(disputeRecord));
- return R.data(detail);
- }
- /**
- * 矛盾纠纷记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入disputeRecord")
- public R<IPage<DisputeRecordVO>> list(DisputeRecordEntity disputeRecord, Query query) {
- IPage<DisputeRecordEntity> pages = disputeRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(disputeRecord));
- return R.data(DisputeRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 矛盾纠纷记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入disputeRecord")
- public R<IPage<DisputeRecordVO>> page(DisputeRecordVO disputeRecord, Query query) {
- IPage<DisputeRecordVO> pages = disputeRecordService.selectDisputeRecordPage(Condition.getPage(query), disputeRecord);
- return R.data(pages);
- }
-
- /**
- * 矛盾纠纷记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入disputeRecord")
- public R save(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
- return R.status(disputeRecordService.save(disputeRecord));
- }
-
- /**
- * 矛盾纠纷记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入disputeRecord")
- public R update(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
- return R.status(disputeRecordService.updateById(disputeRecord));
- }
-
- /**
- * 矛盾纠纷记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入disputeRecord")
- public R submit(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
- return R.status(disputeRecordService.saveOrUpdate(disputeRecord));
- }
-
- /**
- * 矛盾纠纷记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(disputeRecordService.removeByIds(Func.toLongList(ids)));
- }
-
-
- /**
- * 矛盾纠纷记录表 自定义新增或修改
- * @param disputeRecord
- * @return
- */
- @PostMapping("/saveOrUpdate")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "自定义新增或修改", notes = "传入disputeRecord")
- public R saveOrUpdate(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
- return R.status(disputeRecordService.saveOrUpdateDisputeRecord(disputeRecord));
- }
-
- /**
- * 矛盾纠纷记录表 自定义详情
- * @param disputeRecord
- * @return
- */
- @GetMapping("/getDetail")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "自定义详情", notes = "传入disputeRecord")
- public R getDetail(DisputeRecordVO disputeRecord) {
- return R.data(disputeRecordService.getDetail(disputeRecord));
- }
-
- /**
- * 导入矛盾纠纷记录表
- */
- @PostMapping("import-disputeRecord")
- @ApiOperationSupport(order = 10)
- @ApiOperation(value = "导入矛盾纠纷记录表", notes = "传入excel")
- public R importDisputeRecord(MultipartFile file, Integer isCovered) {
- DisputeRecordImporter disputeRecordImporter = new DisputeRecordImporter(disputeRecordService, 1 == 1);
- ExcelUtil.save(file, disputeRecordImporter, DisputeRecordExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 导出矛盾纠纷记录表
- */
- @GetMapping("export-disputeRecord")
- @ApiOperationSupport(order = 11)
- @ApiOperation(value = "导出矛盾纠纷记录表", notes = "传入disputeRecord")
- public void exportDisputeRecord(DisputeRecordVO disputeRecord, HttpServletResponse response) {
- List<ExportDisputeRecordExcel> list = disputeRecordService.exportDisputeRecordList(disputeRecord);
- ExcelUtil.export(response, "矛盾纠纷记录数据" + DateUtil.time(), "矛盾纠纷记录数据表", list, ExportDisputeRecordExcel.class);
- }
-
- /**
- * 导出模板
- */
- @GetMapping("/export-template")
- @ApiOperationSupport(order = 12)
- @ApiOperation(value = "导出模板")
- public void exportTemplate(HttpServletResponse response) {
- List<DisputeRecordExcel> list = new ArrayList<>();
- DisputeRecordExcel disputeRecordExcel = new DisputeRecordExcel();
- disputeRecordExcel.setAddress("江西省上饶市茅家岭街道***社区****");
- disputeRecordExcel.setLng("117.12241224");
- disputeRecordExcel.setLat("28.154412451");
- disputeRecordExcel.setEventTime("2024-01-01 12:00:00");
- disputeRecordExcel.setNameOne("张三");
- disputeRecordExcel.setGenderOne("男");
- disputeRecordExcel.setPhoneOne("131****1234");
- disputeRecordExcel.setIdCardOne("360728*********0000");
- disputeRecordExcel.setNameTwo("李四");
- disputeRecordExcel.setGenderTwo("女");
- disputeRecordExcel.setPhoneTwo("132****1234");
- disputeRecordExcel.setIdCardTwo("360728*********0001");
- disputeRecordExcel.setDisputeType("2");
- disputeRecordExcel.setDisputeContent("隔壁半夜放音乐太大声");
- disputeRecordExcel.setInjuryFlag("否");
- disputeRecordExcel.setInjuryDesc("");
- disputeRecordExcel.setAlarmNum(3);
- disputeRecordExcel.setSource("1");
- disputeRecordExcel.setHandleResult("未化解");
- // 加入集合
- list.add(disputeRecordExcel);
- // 写入返回
- ExcelUtil.export(response, "矛盾纠纷记录数据模板", "矛盾纠纷记录数据表", list, DisputeRecordExcel.class);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/dto/DisputeRecordDTO.java b/src/main/java/org/springblade/modules/disputeRecord/dto/DisputeRecordDTO.java
deleted file mode 100644
index 22b68b6..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/dto/DisputeRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.disputeRecord.dto;
-
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 矛盾纠纷记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DisputeRecordDTO extends DisputeRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/entity/DisputeRecordEntity.java b/src/main/java/org/springblade/modules/disputeRecord/entity/DisputeRecordEntity.java
deleted file mode 100644
index cef0656..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/entity/DisputeRecordEntity.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package org.springblade.modules.disputeRecord.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 矛盾纠纷记录表 实体类
- *
- * @author BladeX
- * @since 2024-03-23
- */
-@Data
-@TableName("jczz_dispute_record")
-@ApiModel(value = "DisputeRecord对象", description = "矛盾纠纷记录表")
-public class DisputeRecordEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 事发地址
- */
- @ApiModelProperty(value = "事发地址")
- private String address;
- /**
- * 事发经度
- */
- @ApiModelProperty(value = "事发经度")
- private String lng;
- /**
- * 事发纬度
- */
- @ApiModelProperty(value = "事发纬度")
- private String lat;
-
- /** 事发时间 */
- @ApiModelProperty(value = "事发时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "event_time")
- private Date eventTime;
- /**
- * 当事人1姓名
- */
- @ApiModelProperty(value = "当事人1姓名")
- private String nameOne;
- /**
- * 当事人1性别
- */
- @ApiModelProperty(value = "当事人1性别")
- private Integer genderOne;
- /**
- * 当事人1电话
- */
- @ApiModelProperty(value = "当事人1电话")
- private String phoneOne;
- /**
- * 当事人1身份证号码
- */
- @ApiModelProperty(value = "当事人1身份证号码")
- private String idCardOne;
- /**
- * 当事人2姓名
- */
- @ApiModelProperty(value = "当事人2姓名")
- private String nameTwo;
- /**
- * 当事人2性别
- */
- @ApiModelProperty(value = "当事人2性别")
- private Integer genderTwo;
- /**
- * 当事人2电话
- */
- @ApiModelProperty(value = "当事人2电话")
- private String phoneTwo;
- /**
- * 当事人2身份证号码
- */
- @ApiModelProperty(value = "当事人2身份证号码")
- private String idCardTwo;
- /**
- * 纠纷类型 业务字典:disputeType
- */
- @ApiModelProperty(value = "纠纷类型 业务字典:disputeType")
- private Integer disputeType;
- /**
- * 纠纷内容
- */
- @ApiModelProperty(value = "纠纷内容")
- private String disputeContent;
- /**
- * 0:否 1:是 是否受伤
- */
- @ApiModelProperty(value = "0:否 1:是 是否受伤 ")
- private Integer injuryFlag;
- /**
- * 受伤情况描述
- */
- @ApiModelProperty(value = "受伤情况描述")
- private String injuryDesc;
- /**
- * 报警次数
- */
- @ApiModelProperty(value = "报警次数")
- private Integer alarmNum;
- /**
- * 信息来源:1:群众报警 2:e呼即办推送 3:走访发现 业务字典:disputeSource
- */
- @ApiModelProperty(value = "信息来源 业务字典:disputeSource")
- private Integer source;
- /**
- * 处理结果 1:已化解 2:未化解 3:移送e呼即办
- */
- @ApiModelProperty(value = "处理结果 1:已化解 2:未化解 3:移送e呼即办")
- private Integer handleResult;
- /**
- * 网格编码
- */
- @ApiModelProperty(value = "网格编码")
- private String gridCode;
- /**
- * 警务网格编码
- */
- @ApiModelProperty(value = "警务网格编码")
- private String jwGridCode;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordExcel.java b/src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordExcel.java
deleted file mode 100644
index bdb35b0..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordExcel.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.springblade.modules.disputeRecord.excel;
-
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-import org.springblade.common.excel.ExcelDictItemLabel;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * DisputeRecordExcel
- * 矛盾纠纷事件
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class DisputeRecordExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 事发地址 */
- @ExcelProperty( "事发地址")
- private String address;
- /**
- * 事发经度
- */
- @ExcelProperty( "事发经度")
- private String lng;
- /**
- * 事发纬度
- */
- @ExcelProperty( "事发纬度")
- private String lat;
-
- /**
- * 事发时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @ExcelProperty( "事发时间")
- private String eventTime;
-
- /**
- * 当事人1姓名
- */
- @ApiModelProperty(value = "当事人1姓名")
- @ExcelProperty( "当事人1姓名")
- private String nameOne;
- /**
- * 当事人1性别
- */
- @ApiModelProperty(value = "当事人1性别")
- @ExcelProperty( "当事人1性别(男/女)")
- private String genderOne;
- /**
- * 当事人1电话
- */
- @ApiModelProperty(value = "当事人1电话")
- @ExcelProperty( "当事人1电话")
- private String phoneOne;
- /**
- * 当事人1身份证号码
- */
- @ApiModelProperty(value = "当事人1身份证号码")
- @ExcelProperty( "当事人1身份证号码")
- private String idCardOne;
- /**
- * 当事人2姓名
- */
- @ApiModelProperty(value = "当事人2姓名")
- @ExcelProperty( "当事人2姓名")
- private String nameTwo;
- /**
- * 当事人2性别
- */
- @ApiModelProperty(value = "当事人2性别")
- @ExcelProperty( "当事人2性别(男/女)")
- private String genderTwo;
- /**
- * 当事人2电话
- */
- @ApiModelProperty(value = "当事人2电话")
- @ExcelProperty( "当事人2电话")
- private String phoneTwo;
- /**
- * 当事人2身份证号码
- */
- @ApiModelProperty(value = "当事人2身份证号码")
- @ExcelProperty( "当事人2身份证号码")
- private String idCardTwo;
-
- /**
- * 纠纷类型 业务字典:disputeType
- */
- @ApiModelProperty(value = "纠纷类型 业务字典:disputeType")
- @ExcelProperty( value = "纠纷类型(家庭婚恋纠纷/邻里纠纷/劳务劳资纠纷/经济纠纷/消防纠纷/医疗纠纷/交通纠纷/其他纠纷)",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "disputeType")
- @ExcelDictItem(type = "disputeType")
- private String disputeType;
- /**
- * 纠纷内容
- */
- @ApiModelProperty(value = "纠纷内容")
- @ExcelProperty( "纠纷内容")
- private String disputeContent;
- /**
- * 0:否 1:是 是否受伤
- */
- @ApiModelProperty(value = "0:否 1:是 是否受伤 ")
- @ExcelProperty( "是否受伤(是/否)")
- private String injuryFlag;
- /**
- * 受伤情况描述
- */
- @ApiModelProperty(value = "受伤情况描述")
- @ExcelProperty( "受伤情况描述")
- private String injuryDesc;
- /**
- * 报警次数
- */
- @ApiModelProperty(value = "报警次数")
- @ExcelProperty( "报警次数")
- private Integer alarmNum;
- /**
- * 信息来源:1:群众报警 2:e呼即办推送 3:走访发现 业务字典:disputeSource
- */
- @ApiModelProperty(value = "信息来源 业务字典:disputeSource")
- @ExcelProperty( value = "信息来源(群众报警/e呼即办推送/走访发现/)",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "disputeSource")
- @ExcelDictItem(type = "disputeSource")
- private String source;
- /**
- * 处理结果 1:已化解 2:未化解 3:移送e呼即办
- */
- @ApiModelProperty(value = "处理结果 1:已化解 2:未化解 3:移送e呼即办")
- @ExcelProperty( value = "处理结果(已化解/未化解/移送e呼即办)")
- private String handleResult;
-}
-
diff --git a/src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordImporter.java b/src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordImporter.java
deleted file mode 100644
index 457b1ff..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordImporter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.springblade.modules.disputeRecord.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.disputeRecord.service.IDisputeRecordService;
-import java.util.List;
-
-/**
- * 矛盾纠纷事件数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class DisputeRecordImporter implements ExcelImporter<DisputeRecordExcel> {
-
- private final IDisputeRecordService disputeRecordService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<DisputeRecordExcel> data) {
- disputeRecordService.importDisputeRecord(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/excel/ExportDisputeRecordExcel.java b/src/main/java/org/springblade/modules/disputeRecord/excel/ExportDisputeRecordExcel.java
deleted file mode 100644
index 1455a29..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/excel/ExportDisputeRecordExcel.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.springblade.modules.disputeRecord.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * DisputeRecordExcel
- * 矛盾纠纷事件
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class ExportDisputeRecordExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 事发地址 */
- @ExcelProperty( "事发地址")
- private String address;
-// /**
-// * 事发经度
-// */
-// @ExcelProperty( "事发经度")
-// private String lng;
-// /**
-// * 事发纬度
-// */
-// @ExcelProperty( "事发纬度")
-// private String lat;
- /**
- * 事发时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @ExcelProperty( "事发时间")
- private Date eventTime;
-
- /**
- * 纠纷方1姓名
- */
- @ApiModelProperty(value = "纠纷方1姓名")
- @ExcelProperty( "纠纷方1姓名")
- private String nameOne;
- /**
- * 当事人1性别
- */
- @ApiModelProperty(value = "当事人1性别")
- @ExcelProperty( "当事人1性别(男/女)")
- private String genderOne;
- /**
- * 纠纷方1电话
- */
- @ApiModelProperty(value = "纠纷方1电话")
- @ExcelProperty( "纠纷方1电话")
- private String phoneOne;
- /**
- * 纠纷方1身份证号码
- */
- @ApiModelProperty(value = "纠纷方1身份证号码")
- @ExcelProperty( "纠纷方1身份证号码")
- private String idCardOne;
- /**
- * 纠纷方2姓名
- */
- @ApiModelProperty(value = "纠纷方2姓名")
- @ExcelProperty( "纠纷方2姓名")
- private String nameTwo;
- /**
- * 当事人2性别
- */
- @ApiModelProperty(value = "当事人2性别")
- @ExcelProperty( "当事人2性别(男/女)")
- private String genderTwo;
- /**
- * 纠纷方2电话
- */
- @ApiModelProperty(value = "纠纷方2电话")
- @ExcelProperty( "纠纷方2电话")
- private String phoneTwo;
- /**
- * 纠纷方2身份证号码
- */
- @ApiModelProperty(value = "纠纷方2身份证号码")
- @ExcelProperty( "纠纷方2身份证号码")
- private String idCardTwo;
-
- /**
- * 纠纷类型 业务字典:disputeType
- */
- @ApiModelProperty(value = "纠纷类型 业务字典:disputeType")
- @ExcelProperty( value = "纠纷类型(家庭婚恋纠纷/邻里纠纷/劳务劳资纠纷/经济纠纷/消防纠纷/医疗纠纷/交通纠纷/其他纠纷)",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "disputeType")
- private String disputeType;
- /**
- * 纠纷内容
- */
- @ApiModelProperty(value = "纠纷内容")
- @ExcelProperty( "纠纷内容")
- private String disputeContent;
- /**
- * 0:否 1:是 是否受伤
- */
- @ApiModelProperty(value = "0:否 1:是 是否受伤 ")
- @ExcelProperty( "是否受伤(是/否)")
- private String injuryFlag;
- /**
- * 受伤情况描述
- */
- @ApiModelProperty(value = "受伤情况描述")
- @ExcelProperty( "受伤情况描述")
- private String injuryDesc;
- /**
- * 报警次数
- */
- @ApiModelProperty(value = "报警次数")
- @ExcelProperty( "报警次数")
- private Integer alarmNum;
- /**
- * 信息来源:1:群众报警 2:e呼即办推送 3:走访发现 业务字典:disputeSource
- */
- @ApiModelProperty(value = "信息来源 业务字典:disputeSource")
- @ExcelProperty( value = "信息来源(群众报警/e呼即办推送/走访发现/)",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "disputeSource")
- private String source;
- /**
- * 处理结果 1:已化解 2:未化解 3:移送e呼即办
- */
- @ApiModelProperty(value = "处理结果 1:已化解 2:未化解 3:移送e呼即办")
- @ExcelProperty( value = "处理结果(已化解/未化解/移送e呼即办)")
- private String handleResult;
-
-
- /**
- * 乡镇名称
- */
- @ApiModelProperty(value = "乡镇名称", example = "")
- @ExcelProperty( value = "地区")
- private String townName;
-
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称", example = "")
- @ExcelProperty( value = "辖区派出所")
- private String pcsName;
-}
-
diff --git a/src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.java b/src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.java
deleted file mode 100644
index dfeb3b2..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.disputeRecord.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
-import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
-import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 矛盾纠纷记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-23
- */
-public interface DisputeRecordMapper extends BaseMapper<DisputeRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param disputeRecord
- * @return
- */
- List<DisputeRecordVO> selectDisputeRecordPage(IPage page,
- @Param("disputeRecord") DisputeRecordVO disputeRecord,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 矛盾纠纷记录表 自定义详情
- * @param disputeRecord
- * @return
- */
- DisputeRecordVO getDetail(@Param("disputeRecord") DisputeRecordVO disputeRecord);
-
- /**
- * 导出矛盾纠纷记录表
- * @param disputeRecord
- * @return
- */
- List<ExportDisputeRecordExcel> exportDisputeRecordList(@Param("disputeRecord") DisputeRecordVO disputeRecord,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.xml b/src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.xml
deleted file mode 100644
index d1c563b..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.xml
+++ /dev/null
@@ -1,378 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.disputeRecord.mapper.DisputeRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="disputeRecordResultMap" type="org.springblade.modules.disputeRecord.vo.DisputeRecordVO">
- <result column="id" property="id"/>
- <result column="address" property="address"/>
- <result column="lng" property="lng"/>
- <result column="lat" property="lat"/>
- <result column="name_one" property="nameOne"/>
- <result column="phone_one" property="phoneOne"/>
- <result column="id_card_one" property="idCardOne"/>
- <result column="name_two" property="nameTwo"/>
- <result column="phone_two" property="phoneTwo"/>
- <result column="id_card_two" property="idCardTwo"/>
- <result column="dispute_type" property="disputeType"/>
- <result column="dispute_content" property="disputeContent"/>
- <result column="injury_flag" property="injuryFlag"/>
- <result column="injury_desc" property="injuryDesc"/>
- <result column="alarm_num" property="alarmNum"/>
- <result column="source" property="source"/>
- <result column="handle_result" property="handleResult"/>
- <result column="grid_code" property="gridCode"/>
- <result column="jw_grid_code" property="jwGridCode"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定列表分页查询-->
- <select id="selectDisputeRecordPage" resultMap="disputeRecordResultMap">
- select
- jdr.*,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName
- from jczz_dispute_record jdr
- LEFT JOIN jczz_grid jg on jg.grid_code = jdr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jdr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jdr.is_deleted = 0
- <if test="disputeRecord.disputeType != null">
- and jdr.dispute_type = #{disputeRecord.disputeType}
- </if>
- <if test="disputeRecord.injuryFlag != null">
- and jdr.injury_flag = #{disputeRecord.injuryFlag}
- </if>
- <if test="disputeRecord.source != null">
- and jdr.source = #{disputeRecord.source}
- </if>
- <if test="disputeRecord.townName != null and disputeRecord.townName != ''">
- and br.town_name like concat('%',#{disputeRecord.townName},'%')
- </if>
- <if test="disputeRecord.communityName != null and disputeRecord.communityName != ''">
- and jbr.name like concat('%',#{disputeRecord.communityName},'%')
- </if>
- <if test="disputeRecord.pcsName != null and disputeRecord.pcsName != ''">
- and jpag.pcs_name like concat('%',#{disputeRecord.pcsName},'%')
- </if>
- <if test="disputeRecord.address != null and disputeRecord.address != ''">
- and jdr.address like concat('%',#{disputeRecord.address},'%')
- </if>
- <if test="disputeRecord.disputeContent != null and disputeRecord.disputeContent != ''">
- and jdr.dispute_content like concat('%',#{disputeRecord.disputeContent},'%')
- </if>
- <if test="disputeRecord.nameOne != null and disputeRecord.nameOne != ''">
- and jdr.name_one like concat('%',#{disputeRecord.nameOne},'%')
- </if>
- <if test="disputeRecord.phoneOne != null and disputeRecord.phoneOne != ''">
- and jdr.phone_one like concat('%',#{disputeRecord.phoneOne},'%')
- </if>
- <if test="disputeRecord.idCardOne != null and disputeRecord.idCardOne != ''">
- and jdr.id_card_one like concat('%',#{disputeRecord.idCardOne},'%')
- </if>
- <if test="disputeRecord.nameTwo != null and disputeRecord.nameTwo != ''">
- and jdr.name_two like concat('%',#{disputeRecord.nameTwo},'%')
- </if>
- <if test="disputeRecord.phoneTwo != null and disputeRecord.phoneTwo != ''">
- and jdr.phone_two like concat('%',#{disputeRecord.phoneOne},'%')
- </if>
- <if test="disputeRecord.idCardTwo != null and disputeRecord.idCardTwo != ''">
- and jdr.id_card_two like concat('%',#{disputeRecord.idCardTwo},'%')
- </if>
- <if test="disputeRecord.startTime != null and disputeRecord.startTime != ''">
- and date_format(jdr.event_time,'%Y-%m-%d') >= #{disputeRecord.startTime}
- </if>
- <if test="disputeRecord.endTime != null and disputeRecord.endTime != ''">
- and date_format(jdr.event_time,'%Y-%m-%d') <= #{disputeRecord.endTime}
- </if>
- <if test="disputeRecord.searchKey!=null and disputeRecord.searchKey!=''">
- and CONCAT(
- ifnull(jdr.name_one,''),
- ifnull(jdr.phone_one,''),
- ifnull(jdr.name_two,''),
- ifnull(jdr.phone_two,''),
- ifnull(jdr.address,''),
- ifnull(jdr.dispute_content,'')
- ) like CONCAT ('%', #{disputeRecord.searchKey},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="disputeRecord.roleName != null and disputeRecord.roleName != ''">
- <if test="disputeRecord.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="disputeRecord.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jdr.id desc,jdr.create_time desc
- </select>
-
- <!--自定列表分页查询-->
- <select id="getDetail" resultType="org.springblade.modules.disputeRecord.vo.DisputeRecordVO">
- select
- jdr.*,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName
- from jczz_dispute_record jdr
- LEFT JOIN jczz_grid jg on jg.grid_code = jdr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jdr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jdr.is_deleted = 0
- <if test="disputeRecord.id != null">
- and jdr.id = #{disputeRecord.id}
- </if>
- <if test="disputeRecord.disputeType != null">
- and jdr.dispute_type = #{disputeRecord.disputeType}
- </if>
- <if test="disputeRecord.injuryFlag != null">
- and jdr.injury_flag = #{disputeRecord.injuryFlag}
- </if>
- <if test="disputeRecord.source != null">
- and jdr.source = #{disputeRecord.source}
- </if>
- <if test="disputeRecord.handleResult != null">
- and jdr.handle_result = #{disputeRecord.handleResult}
- </if>
- <if test="disputeRecord.townName != null and disputeRecord.townName != ''">
- and br.town_name like concat('%',#{disputeRecord.townName},'%')
- </if>
- <if test="disputeRecord.communityName != null and disputeRecord.communityName != ''">
- and jbr.name like concat('%',#{disputeRecord.communityName},'%')
- </if>
- <if test="disputeRecord.pcsName != null and disputeRecord.pcsName != ''">
- and jpag.pcs_name like concat('%',#{disputeRecord.pcsName},'%')
- </if>
- <if test="disputeRecord.address != null and disputeRecord.address != ''">
- and jdr.address like concat('%',#{disputeRecord.address},'%')
- </if>
- <if test="disputeRecord.disputeContent != null and disputeRecord.disputeContent != ''">
- and jdr.dispute_content like concat('%',#{disputeRecord.disputeContent},'%')
- </if>
- <if test="disputeRecord.nameOne != null and disputeRecord.nameOne != ''">
- and jdr.name_one like concat('%',#{disputeRecord.nameOne},'%')
- </if>
- <if test="disputeRecord.phoneOne != null and disputeRecord.phoneOne != ''">
- and jdr.phone_one like concat('%',#{disputeRecord.phoneOne},'%')
- </if>
- <if test="disputeRecord.idCardOne != null and disputeRecord.idCardOne != ''">
- and jdr.id_card_one like concat('%',#{disputeRecord.idCardOne},'%')
- </if>
- <if test="disputeRecord.nameTwo != null and disputeRecord.nameTwo != ''">
- and jdr.name_two like concat('%',#{disputeRecord.nameTwo},'%')
- </if>
- <if test="disputeRecord.phoneTwo != null and disputeRecord.phoneTwo != ''">
- and jdr.phone_two like concat('%',#{disputeRecord.phoneOne},'%')
- </if>
- <if test="disputeRecord.idCardTwo != null and disputeRecord.idCardTwo != ''">
- and jdr.id_card_two like concat('%',#{disputeRecord.idCardTwo},'%')
- </if>
- </select>
-
- <!--导出矛盾纠纷记录表-->
- <select id="exportDisputeRecordList" resultType="org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel">
- select
- jdr.address,
- jdr.event_time,
- jdr.name_one,
- case when jdr.gender_one =1 then '男'
- when jdr.gender_one=2 then '女'
- end as gender_one,
- jdr.phone_one,
- jdr.id_card_one,
- jdr.name_two,
- case when jdr.gender_two =1 then '男'
- when jdr.gender_two=2 then '女'
- end as gender_two,
- jdr.phone_two,
- jdr.id_card_two,
- jdr.dispute_type,
- jdr.dispute_content,
- case when jdr.injury_flag=1 then '是'
- when jdr.injury_flag=0 then '否'
- end as injury_flag,
- jdr.injury_desc,
- jdr.alarm_num,
- jdr.source,
- case when jdr.handle_result=1 then '已化解'
- when jdr.handle_result=2 then '未化解'
- when jdr.handle_result=3 then '移送e呼即办'
- end as handle_result,
- br.town_name as townName,
- br.name as communityName,
- jpag.pcs_name pcsName
- from jczz_dispute_record jdr
- LEFT JOIN jczz_grid jg on jg.grid_code = jdr.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jdr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jdr.is_deleted = 0
- <if test="disputeRecord.disputeType != null">
- and jdr.dispute_type = #{disputeRecord.disputeType}
- </if>
- <if test="disputeRecord.injuryFlag != null">
- and jdr.injury_flag = #{disputeRecord.injuryFlag}
- </if>
- <if test="disputeRecord.source != null">
- and jdr.source = #{disputeRecord.source}
- </if>
- <if test="disputeRecord.townName != null and disputeRecord.townName != ''">
- and br.town_name like concat('%',#{disputeRecord.townName},'%')
- </if>
- <if test="disputeRecord.communityName != null and disputeRecord.communityName != ''">
- and jbr.name like concat('%',#{disputeRecord.communityName},'%')
- </if>
- <if test="disputeRecord.pcsName != null and disputeRecord.pcsName != ''">
- and jpag.pcs_name like concat('%',#{disputeRecord.pcsName},'%')
- </if>
- <if test="disputeRecord.address != null and disputeRecord.address != ''">
- and jdr.address like concat('%',#{disputeRecord.address},'%')
- </if>
- <if test="disputeRecord.disputeContent != null and disputeRecord.disputeContent != ''">
- and jdr.dispute_content like concat('%',#{disputeRecord.disputeContent},'%')
- </if>
- <if test="disputeRecord.nameOne != null and disputeRecord.nameOne != ''">
- and jdr.name_one like concat('%',#{disputeRecord.nameOne},'%')
- </if>
- <if test="disputeRecord.phoneOne != null and disputeRecord.phoneOne != ''">
- and jdr.phone_one like concat('%',#{disputeRecord.phoneOne},'%')
- </if>
- <if test="disputeRecord.idCardOne != null and disputeRecord.idCardOne != ''">
- and jdr.id_card_one like concat('%',#{disputeRecord.idCardOne},'%')
- </if>
- <if test="disputeRecord.nameTwo != null and disputeRecord.nameTwo != ''">
- and jdr.name_two like concat('%',#{disputeRecord.nameTwo},'%')
- </if>
- <if test="disputeRecord.phoneTwo != null and disputeRecord.phoneTwo != ''">
- and jdr.phone_two like concat('%',#{disputeRecord.phoneOne},'%')
- </if>
- <if test="disputeRecord.idCardTwo != null and disputeRecord.idCardTwo != ''">
- and jdr.id_card_two like concat('%',#{disputeRecord.idCardTwo},'%')
- </if>
- <if test="disputeRecord.startTime != null and disputeRecord.startTime != ''">
- and date_format(jdr.event_time,'%Y-%m-%d') >= #{disputeRecord.startTime}
- </if>
- <if test="disputeRecord.endTime != null and disputeRecord.endTime != ''">
- and date_format(jdr.event_time,'%Y-%m-%d') <= #{disputeRecord.endTime}
- </if>
- <if test="disputeRecord.searchKey!=null and disputeRecord.searchKey!=''">
- and CONCAT(
- ifnull(jdr.name_one,''),
- ifnull(jdr.phone_one,''),
- ifnull(jdr.name_two,''),
- ifnull(jdr.phone_two,''),
- ifnull(jdr.address,''),
- ifnull(jdr.dispute_content,'')
- ) like CONCAT ('%', #{disputeRecord.searchKey},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="disputeRecord.roleName != null and disputeRecord.roleName != ''">
- <if test="disputeRecord.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="disputeRecord.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jdr.id desc,jdr.create_time desc
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/disputeRecord/service/IDisputeRecordService.java b/src/main/java/org/springblade/modules/disputeRecord/service/IDisputeRecordService.java
deleted file mode 100644
index a0795e0..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/service/IDisputeRecordService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.springblade.modules.disputeRecord.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
-import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
-import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 矛盾纠纷记录表 服务类
- *
- * @author BladeX
- * @since 2024-03-23
- */
-public interface IDisputeRecordService extends IService<DisputeRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param disputeRecord
- * @return
- */
- IPage<DisputeRecordVO> selectDisputeRecordPage(IPage<DisputeRecordVO> page, DisputeRecordVO disputeRecord);
-
-
- /**
- * 矛盾纠纷记录表 自定义新增或修改
- * @param disputeRecord
- * @return
- */
- boolean saveOrUpdateDisputeRecord(DisputeRecordEntity disputeRecord);
-
- /**
- * 矛盾纠纷记录表 自定义详情
- * @param disputeRecord
- * @return
- */
- DisputeRecordVO getDetail(DisputeRecordVO disputeRecord);
-
- /**
- * 矛盾纠纷事件数据导入类
- * @author Chill
- */
- void importDisputeRecord(List<DisputeRecordExcel> data, Boolean isCovered);
-
- /**
- * 导出矛盾纠纷记录表
- * @param disputeRecord
- * @return
- */
- List<ExportDisputeRecordExcel> exportDisputeRecordList(DisputeRecordVO disputeRecord);
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/service/impl/DisputeRecordServiceImpl.java b/src/main/java/org/springblade/modules/disputeRecord/service/impl/DisputeRecordServiceImpl.java
deleted file mode 100644
index fcca3c8..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/service/impl/DisputeRecordServiceImpl.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package org.springblade.modules.disputeRecord.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.param.GridSet;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
-import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
-import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
-import org.springblade.modules.disputeRecord.mapper.DisputeRecordMapper;
-import org.springblade.modules.disputeRecord.service.IDisputeRecordService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * 矛盾纠纷记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-23
- */
-@Service
-public class DisputeRecordServiceImpl extends ServiceImpl<DisputeRecordMapper, DisputeRecordEntity> implements IDisputeRecordService {
-
- @Override
- public IPage<DisputeRecordVO> selectDisputeRecordPage(IPage<DisputeRecordVO> page, DisputeRecordVO disputeRecord) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(DisputeRecordVO.class, disputeRecord);
- return page.setRecords(
- baseMapper.selectDisputeRecordPage(page,
- disputeRecord,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList())
- );
- }
-
- /**
- * 矛盾纠纷记录表 自定义新增或修改
- * @param disputeRecord
- * @return
- */
- @Override
- public boolean saveOrUpdateDisputeRecord(DisputeRecordEntity disputeRecord) {
- // 点落面计算警格,网格,警格
- GridSet invoke = new GridSet().invoke(DisputeRecordEntity.class, disputeRecord,
- "lng", "lat", "gridCode", "jwGridCode");
- if (null!=disputeRecord.getId()){
- // 更新
- return updateById(disputeRecord);
- }
- // 新增
- return save(disputeRecord);
- }
-
- /**
- * 矛盾纠纷记录表 自定义详情
- * @param disputeRecord
- * @return
- */
- @Override
- public DisputeRecordVO getDetail(DisputeRecordVO disputeRecord) {
- return baseMapper.getDetail(disputeRecord);
- }
-
- /**
- * 矛盾纠纷事件数据导入类
- * @param data
- * @param isCovered
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void importDisputeRecord(List<DisputeRecordExcel> data, Boolean isCovered) {
- for (DisputeRecordExcel disputeRecordExcel : data) {
- // 获取转换数据对象
- DisputeRecordEntity disputeRecordEntity
- = Objects.requireNonNull(BeanUtil.copy(disputeRecordExcel, DisputeRecordEntity.class));
- //处理经纬度
- GridSet gridSet
- = new GridSet<>().invoke(DisputeRecordEntity.class, disputeRecordEntity, "lng", "lat", "gridCode", "jwGridCode");
- //处理需要转换的数据(字典/非字典)
- // 纠纷类型
- if (!Strings.isBlank(disputeRecordExcel.getDisputeType())) {
- disputeRecordEntity.setDisputeType(Integer.parseInt(disputeRecordExcel.getDisputeType()));
- }
- // 信息来源
- if (!Strings.isBlank(disputeRecordExcel.getSource())) {
- disputeRecordEntity.setSource(Integer.parseInt(disputeRecordExcel.getSource()));
- }
- // 受伤情况 0:否 1:是
- if (!Strings.isBlank(disputeRecordExcel.getInjuryFlag())) {
- if (disputeRecordExcel.getInjuryFlag().equals("是")){
- disputeRecordEntity.setInjuryFlag(1);
- }
- if (disputeRecordExcel.getInjuryFlag().equals("否")){
- disputeRecordEntity.setInjuryFlag(0);
- }
- }
- // 当事人1性别 1:男 2:女
- if (!Strings.isBlank(disputeRecordExcel.getGenderOne())) {
- if (disputeRecordExcel.getGenderOne().contains("男")){
- disputeRecordEntity.setGenderOne(1);
- }
- if (disputeRecordExcel.getGenderOne().contains("女")){
- disputeRecordEntity.setGenderOne(2);
- }
- }
- // 当事人2性别 1:男 2:女
- if (!Strings.isBlank(disputeRecordExcel.getGenderTwo())) {
- if (disputeRecordExcel.getGenderTwo().contains("男")){
- disputeRecordEntity.setGenderTwo(1);
- }
- if (disputeRecordExcel.getGenderTwo().contains("女")){
- disputeRecordEntity.setGenderTwo(2);
- }
- }
- // 处理结果 1:已化解 2:未化解 3:移送e呼即办
- if (!Strings.isBlank(disputeRecordExcel.getHandleResult())) {
- if (disputeRecordExcel.getHandleResult().equals("已化解")) {
- disputeRecordEntity.setHandleResult(1);
- }
- if (disputeRecordExcel.getHandleResult().equals("未化解")) {
- disputeRecordEntity.setHandleResult(2);
- }
- if (disputeRecordExcel.getHandleResult().equals("移送e呼即办")) {
- disputeRecordEntity.setHandleResult(3);
- }
- }
- // 日期处理
- if (!Strings.isBlank(disputeRecordExcel.getEventTime())) {
- try {
- Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(disputeRecordExcel.getEventTime());
- disputeRecordEntity.setEventTime(date);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- }
- // 判断是否重复
- QueryWrapper<DisputeRecordEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("address", disputeRecordExcel.getAddress())
- .eq("event_time", disputeRecordEntity.getEventTime())
- .eq("is_deleted", 0);
- // 查询
- List<DisputeRecordEntity> list = list(queryWrapper);
- if (list.size()>0){
- // 更新
- disputeRecordEntity.setId(list.get(0).getId());
- // 更新
- updateById(disputeRecordEntity);
- }else {
- // 插入
- save(disputeRecordEntity);
- }
- }
- }
-
- /**
- * 导出矛盾纠纷记录表
- * @param disputeRecord
- * @return
- */
- @Override
- public List<ExportDisputeRecordExcel> exportDisputeRecordList(DisputeRecordVO disputeRecord) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(DisputeRecordVO.class, disputeRecord);
- return baseMapper.exportDisputeRecordList(
- disputeRecord,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList());
- }
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/vo/DisputeRecordVO.java b/src/main/java/org/springblade/modules/disputeRecord/vo/DisputeRecordVO.java
deleted file mode 100644
index 7f0cbfe..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/vo/DisputeRecordVO.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.disputeRecord.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 矛盾纠纷记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DisputeRecordVO extends DisputeRecordEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
-
- @ApiModelProperty(value = "角色别名", example = "")
- private String roleName;
-
- /**
- * 搜索关键字
- */
- @ApiModelProperty(value = "搜索关键字", example = "")
- private String searchKey;
-
- /**
- * 开始时间
- */
- @ApiModelProperty(value = "开始时间", example = "")
- private String startTime;
-
- /**
- * 结束时间
- */
- @ApiModelProperty(value = "结束时间", example = "")
- private String endTime;
-
- /**
- * 乡镇名称
- */
- @ApiModelProperty(value = "乡镇名称", example = "")
- private String townName;
-
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称", example = "")
- private String pcsName;
-
-}
diff --git a/src/main/java/org/springblade/modules/disputeRecord/wrapper/DisputeRecordWrapper.java b/src/main/java/org/springblade/modules/disputeRecord/wrapper/DisputeRecordWrapper.java
deleted file mode 100644
index 6e26c08..0000000
--- a/src/main/java/org/springblade/modules/disputeRecord/wrapper/DisputeRecordWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.disputeRecord.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
-import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
-import java.util.Objects;
-
-/**
- * 矛盾纠纷记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-23
- */
-public class DisputeRecordWrapper extends BaseEntityWrapper<DisputeRecordEntity, DisputeRecordVO> {
-
- public static DisputeRecordWrapper build() {
- return new DisputeRecordWrapper();
- }
-
- @Override
- public DisputeRecordVO entityVO(DisputeRecordEntity disputeRecord) {
- DisputeRecordVO disputeRecordVO = Objects.requireNonNull(BeanUtil.copy(disputeRecord, DisputeRecordVO.class));
-
- //User createUser = UserCache.getUser(disputeRecord.getCreateUser());
- //User updateUser = UserCache.getUser(disputeRecord.getUpdateUser());
- //disputeRecordVO.setCreateUserName(createUser.getName());
- //disputeRecordVO.setUpdateUserName(updateUser.getName());
-
- return disputeRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/district/controller/DistrictController.java b/src/main/java/org/springblade/modules/district/controller/DistrictController.java
deleted file mode 100644
index bbf14f4..0000000
--- a/src/main/java/org/springblade/modules/district/controller/DistrictController.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.vo.DistrictVO;
-import org.springblade.modules.district.wrapper.DistrictWrapper;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 小区表 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-district/district")
-@Api(value = "小区表", tags = "小区表接口")
-public class DistrictController{
-
- private final IDistrictService districtService;
-
- /**
- * 小区表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入district")
- public R<DistrictVO> detail(DistrictEntity district) {
- DistrictEntity detail = districtService.getOne(Condition.getQueryWrapper(district));
- return R.data(DistrictWrapper.build().entityVO(detail));
- }
-
-
- /**
- * 小区表 自定义获取详情
- * @param district
- * @return
- */
- @GetMapping("/getDetail")
- public R<DistrictVO> getDetail(DistrictVO district) {
- return R.data(districtService.getDetail(district));
- }
-
- /**
- * 小区表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入district")
- public R<IPage<DistrictVO>> list(DistrictEntity district, Query query) {
- IPage<DistrictEntity> pages = districtService.page(Condition.getPage(query), Condition.getQueryWrapper(district));
- return R.data(DistrictWrapper.build().pageVO(pages));
- }
-
- /**
- * 小区表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入district")
- public R<IPage<DistrictVO>> page(DistrictVO district, Query query) {
- IPage<DistrictVO> pages = districtService.selectDistrictPage(Condition.getPage(query), district);
- return R.data(pages);
- }
-
- /**
- * 小区表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入district")
- public R save(@Valid @RequestBody DistrictEntity district) {
- return R.status(districtService.save(district));
- }
-
- /**
- * 小区表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入district")
- public R update(@Valid @RequestBody DistrictEntity district) {
- return R.status(districtService.updateById(district));
- }
-
- /**
- * 小区表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入district")
- public R submit(@Valid @RequestBody DistrictEntity district) {
- return R.status(districtService.saveOrUpdate(district));
- }
-
- /**
- * 小区表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(districtService.removeByIds(Func.toStrList(ids)));
- }
-
- /**
- * 获取小区树
- */
- @GetMapping("/getDistrictTree")
- public R getDistrictTree(DistrictVO district) {
- return R.data(districtService.getDistrictTree(district));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/district/dto/DistrictDTO.java b/src/main/java/org/springblade/modules/district/dto/DistrictDTO.java
deleted file mode 100644
index f626849..0000000
--- a/src/main/java/org/springblade/modules/district/dto/DistrictDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.dto;
-
-import org.springblade.modules.district.entity.DistrictEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 小区表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DistrictDTO extends DistrictEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/district/entity/DistrictEntity.java b/src/main/java/org/springblade/modules/district/entity/DistrictEntity.java
deleted file mode 100644
index 8e6d973..0000000
--- a/src/main/java/org/springblade/modules/district/entity/DistrictEntity.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 小区表 实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@TableName("jczz_district")
-@ApiModel(value = "District对象", description = "小区表")
-public class DistrictEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_UUID)
- private String id;
-
- /**
- * 小区编号
- */
- @ApiModelProperty(value = "小区编号")
- private String aoiCode;
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String communityCode;
- /**
- * 小区名称
- */
- @ApiModelProperty(value = "小区名称")
- private String name;
-
- /**
- * 小区图片url
- */
- @ApiModelProperty(value = "小区图片url")
- private String picUrl;
-
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
- /**
- * 中心坐标-经度
- */
- @ApiModelProperty(value = "中心坐标-经度")
- private String lng;
- /**
- * 中心坐标-纬度
- */
- @ApiModelProperty(value = "中心坐标-纬度")
- private String lat;
- /**
- * 简介
- */
- @ApiModelProperty(value = "简介")
- private String remark;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private String createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.java b/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.java
deleted file mode 100644
index db3af60..0000000
--- a/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.mapper;
-
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.vo.DistrictVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 小区表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface DistrictMapper extends BaseMapper<DistrictEntity> {
-
- /**
- * 自定义分页
- * @param page
- * @param district
- * @return
- */
- List<DistrictVO> selectDistrictPage(IPage page,
- @Param("district") DistrictVO district,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 获取小区树
- * @param district
- * @return
- */
- @MapKey(value = "id")
- Map<String, TreeStringNode> getDistrictTree(@Param("district") DistrictVO district,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 小区表 自定义获取详情
- * @param district
- * @return
- */
- DistrictVO getDetail(@Param("district") DistrictVO district);
-}
diff --git a/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml b/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
deleted file mode 100644
index 48790f9..0000000
--- a/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.district.mapper.DistrictMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="districtResultMap" type="org.springblade.modules.district.entity.DistrictEntity">
- <result column="id" property="id"/>
- <result column="aoi_code" property="aoiCode"/>
- <result column="community_code" property="communityCode"/>
- <result column="name" property="name"/>
- <result column="address" property="address"/>
- <result column="lng" property="lng"/>
- <result column="lat" property="lat"/>
- <result column="remark" property="remark"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定义分页-->
- <select id="selectDistrictPage" resultType="org.springblade.modules.district.vo.DistrictVO">
- select
- jd.*,
- br.village_name as communityName,br.town_name as townStreetName
- from jczz_district jd
- left join blade_region br on br.code = jd.community_code
- where jd.is_deleted = 0
- <if test="district.name !=null and district.name !=''">
- and jd.name like concat('%',#{district.name},'%')
- </if>
- <if test="district.communityName !=null and district.communityName !=''">
- and br.village_name like concat('%', #{district.communityName},'%')
- </if>
- <if test="district.communityCode !=null and district.communityCode !=''">
- and jd.community_code = #{district.communityCode}
- </if>
- <if test="district.townStreetName !=null and district.townStreetName !=''">
- and br.town_name like concat('%',#{district.townStreetName},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jd.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jd.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </select>
-
- <!--小区树查询-->
- <select id="getDistrictTree" resultType="org.springblade.common.node.TreeStringNode">
- SELECT
- code as id,
- parent_code as parentId,
- name,
- remark aoiCode
- FROM blade_region where district_code like concat('361102','%')
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and code in ('')
- </otherwise>
- </choose>
- </if>
- union all
- (
- select
- id,
- community_code as parentId,
- name,
- aoi_code aoiCode
- from jczz_district
- where is_deleted = 0 and community_code like concat('361102','%')
- <if test="district.districtIdList!=null and district.districtIdList.size() > 0">
- and id in
- <foreach collection="district.districtIdList" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and community_code in ('')
- </otherwise>
- </choose>
- </if>
- )
- </select>
-
- <!--小区自定义获取详情查询-->
- <select id="getDetail" resultType="org.springblade.modules.district.vo.DistrictVO">
- SELECT jd.*,
- jda.nei_code as communityCode,
- jda.nei_name as communityName,
- jpo.organization_name,
- jpo.organization_type,
- jpo.branch_type,
- jpo.charge_person,
- jpo.phone
- FROM jczz_district jd
- left join jczz_doorplate_address jda on jda.aoi_code = jd.aoi_code
- LEFT JOIN jczz_party_organization jpo on jpo.area_id = jda.nei_code and jpo.is_deleted=0
- where jd.is_deleted = 0
- and jda.address_code = #{district.houseCode}
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/district/service/IDistrictService.java b/src/main/java/org/springblade/modules/district/service/IDistrictService.java
deleted file mode 100644
index 50c75dd..0000000
--- a/src/main/java/org/springblade/modules/district/service/IDistrictService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.vo.DistrictVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 小区表 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IDistrictService extends IService<DistrictEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param district
- * @return
- */
- IPage<DistrictVO> selectDistrictPage(IPage<DistrictVO> page, DistrictVO district);
-
-
- /**
- * 获取小区树
- * @param district
- * @return
- */
- Object getDistrictTree(DistrictVO district);
-
- /**
- * 小区表 自定义获取详情
- * @param district
- * @return
- */
- DistrictVO getDetail(DistrictVO district);
-}
diff --git a/src/main/java/org/springblade/modules/district/service/impl/DistrictServiceImpl.java b/src/main/java/org/springblade/modules/district/service/impl/DistrictServiceImpl.java
deleted file mode 100644
index aef457b..0000000
--- a/src/main/java/org/springblade/modules/district/service/impl/DistrictServiceImpl.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.common.utils.RoleUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.mapper.DistrictMapper;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.district.vo.DistrictVO;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-/**
- * 小区表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Service
-public class DistrictServiceImpl extends ServiceImpl<DistrictMapper, DistrictEntity> implements IDistrictService {
-
- @Autowired
- private IGridService gridService;
-
- @Override
- public IPage<DistrictVO> selectDistrictPage(IPage<DistrictVO> page, DistrictVO district) {
- CommonParamSet invoke = new CommonParamSet<>().invoke(DistrictVO.class, district);
- List<DistrictVO> districtVOS = baseMapper.selectDistrictPage(page,
- district,
- invoke.getRegionChildCodesList(),
- invoke.getIsAdministrator());
- // 遍历
- for (DistrictVO districtVO : districtVOS) {
- // 设置对应的网格名称
- List<GridVO> gridVO = gridService.getGridListByAoiCode(districtVO.getAoiCode());
- if (gridVO.size() > 0) {
- StringBuilder builder = new StringBuilder();
- for (GridVO vo : gridVO) {
- builder.append(vo.getGridName()).append(",");
- }
- String bui = builder.toString();
- String substring = bui.substring(0, bui.length() - 1);
- districtVO.setGridName(substring);
- }
- }
- // 返回
- return page.setRecords(districtVOS);
- }
-
- /**
- * 获取小区树
- *
- * @param district
- * @return
- */
- @Override
- public Object getDistrictTree(DistrictVO district) {
- // 判断角色,物业角色只能查询当前小区的
- String userRole = AuthUtil.getUserRole();
- CommonParamSet invoke = new CommonParamSet<>().invoke(DistrictVO.class, district);
-
- if (RoleUtil.isProperty(userRole)) {
- if (district.getFilterFlag().equals(1)) {
- // 查询小区id
- IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
- List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
- // 通过用户机构查询用户的物业公司
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery()
- .eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()).last("limit 1"));
- if (one != null) {
- IPropertyCompanyDistrictService bean2 = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // 通过物业公司,查询小区
- List<PropertyCompanyDistrictEntity> list = bean2.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, one.getId()));
- if (list.size() > 0) {
- List<String> collect = list.stream().map(i -> i.getDistrictId()).collect(Collectors.toList());
- districtIds.addAll(collect);
- }
- }
- district.setDistrictIdList(districtIds);
- if (districtIds.size() == 0) {
- return new ArrayList<>();
- }
- }
- }
- Map<String, TreeStringNode> districtTree = baseMapper.getDistrictTree(district,invoke.getRegionChildCodesList(),invoke.getIsAdministrator());
- List<TreeStringNode> stringNodeTree = NodeTreeUtil.getStringNodeTree(districtTree);
- stringNodeTree.forEach(node -> recursion(node));
- return stringNodeTree;
- }
-
-
- /**
- * 去除空的数据组
- *
- * @param node
- */
- private void recursion(TreeStringNode node) {
- if (node.getChildren() != null && node.getChildren().size() > 0) {
- node.getChildren().forEach(node2 -> recursion(node2));
- } else {
- node.setChildren(null);
- }
- }
-
- /**
- * 小区表 自定义获取详情
- *
- * @param district
- * @return
- */
- @Override
- public DistrictVO getDetail(DistrictVO district) {
- // 小区自定义获取详情查询并返回
- return baseMapper.getDetail(district);
- }
-}
diff --git a/src/main/java/org/springblade/modules/district/vo/DistrictVO.java b/src/main/java/org/springblade/modules/district/vo/DistrictVO.java
deleted file mode 100644
index 7bd2a4f..0000000
--- a/src/main/java/org/springblade/modules/district/vo/DistrictVO.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 小区表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DistrictVO extends DistrictEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 地址门牌编号
- */
- private String houseCode;
-
- /**
- * 居委会名称
- */
- private String communityName;
-
- /**
- * 街道名称
- */
- private String townStreetName;
-
- /**
- * 网格名称
- */
- private String gridName;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- private List<String> districtIdList;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- // 是否过滤0 否 1 是
- private Integer filterFlag = 0;
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String communityCode;
-
-
- private String organizationName;
-
- //组织类型
- private String organizationType;
-
-
- //支部类型
- private String branchType;
-
- //负责人姓名
- private String chargePerson;
-
- //负责人手机号
- private String phone;
-
-}
diff --git a/src/main/java/org/springblade/modules/district/wrapper/DistrictWrapper.java b/src/main/java/org/springblade/modules/district/wrapper/DistrictWrapper.java
deleted file mode 100644
index 7b53ad9..0000000
--- a/src/main/java/org/springblade/modules/district/wrapper/DistrictWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.district.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.vo.DistrictVO;
-import java.util.Objects;
-
-/**
- * 小区表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public class DistrictWrapper extends BaseEntityWrapper<DistrictEntity, DistrictVO> {
-
- public static DistrictWrapper build() {
- return new DistrictWrapper();
- }
-
- @Override
- public DistrictVO entityVO(DistrictEntity district) {
- DistrictVO districtVO = Objects.requireNonNull(BeanUtil.copy(district, DistrictVO.class));
-
- //User createUser = UserCache.getUser(district.getCreateUser());
- //User updateUser = UserCache.getUser(district.getUpdateUser());
- //districtVO.setCreateUserName(createUser.getName());
- //districtVO.setUpdateUserName(updateUser.getName());
-
- return districtVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java b/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
deleted file mode 100644
index 886f04d..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.controller;
-
-import cn.hutool.json.JSONUtil;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.common.param.ToObject;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.node.ForestNodeMerger;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
-import org.springblade.modules.doorplateAddress.wrapper.DoorplateAddressWrapper;
-import org.springblade.modules.house.vo.HouseParam;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import sun.rmi.runtime.Log;
-
-import java.util.List;
-
-/*
- * 门牌地址表(总台账数据) 控制器
- *
- * @author zhongrj
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-doorplateAddress/doorplateAddress")
-@Api(value = "门牌地址表(总台账数据)", tags = "门牌地址表(总台账数据)接口")
-public class DoorplateAddressController{
-
- private final IDoorplateAddressService doorplateAddressService;
- private final BladeLogger bladeLogger;
-
- /**
- * 门牌地址表(总台账数据) 详情
- */
- @GetMapping("/detail")
- @ApiLog("门牌地址表(总台账数据) 详情")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入doorplateAddress")
- public R<DoorplateAddressVO> detail(DoorplateAddressEntity doorplateAddress) {
- bladeLogger.info("blade-doorplateAddress_detail", JsonUtil.toJson(doorplateAddress));
- DoorplateAddressEntity detail = doorplateAddressService.getOne(Condition.getQueryWrapper(doorplateAddress));
- return R.data(DoorplateAddressWrapper.build().entityVO(detail));
- }
-
- /**
- * 门牌地址表(总台账数据) 自定义详情
- */
- @GetMapping("/getDetail")
- @ApiLog("门牌地址表(总台账数据) 自定义详情")
- public R getDetail(DoorplateAddressVO doorplateAddress) {
- bladeLogger.info("blade-doorplateAddress_getDetail", JsonUtil.toJson(doorplateAddress));
- return R.data(doorplateAddressService.getDetail(doorplateAddress));
- }
-
- /**
- * 门牌地址表(总台账数据) 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入doorplateAddress")
- public R<IPage<DoorplateAddressVO>> list(DoorplateAddressEntity doorplateAddress, Query query) {
- IPage<DoorplateAddressEntity> pages = doorplateAddressService.page(Condition.getPage(query), Condition.getQueryWrapper(doorplateAddress));
- return R.data(DoorplateAddressWrapper.build().pageVO(pages));
- }
-
- /**
- * 门牌地址表(总台账数据) 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("门牌地址表(总台账数据) 自定义分页")
- @ApiOperation(value = "分页", notes = "传入doorplateAddress")
- public R<IPage<DoorplateAddressVO>> page(DoorplateAddressVO doorplateAddress, Query query) {
- IPage<DoorplateAddressVO> pages = doorplateAddressService.selectDoorplateAddressPage(Condition.getPage(query), doorplateAddress);
- return R.data(pages);
- }
-
- /**
- * 门牌地址表(总台账数据) 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入doorplateAddress")
- public R save(@Valid @RequestBody DoorplateAddressEntity doorplateAddress) {
- return R.status(doorplateAddressService.save(doorplateAddress));
- }
-
- /**
- * 门牌地址表(总台账数据) 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入doorplateAddress")
- public R update(@Valid @RequestBody DoorplateAddressEntity doorplateAddress) {
- return R.status(doorplateAddressService.updateById(doorplateAddress));
- }
-
- /**
- * 门牌地址表(总台账数据) 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入doorplateAddress")
- public R submit(@Valid @RequestBody DoorplateAddressEntity doorplateAddress) {
- return R.status(doorplateAddressService.saveOrUpdate(doorplateAddress));
- }
-
- /**
- * 门牌地址表(总台账数据) 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(doorplateAddressService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 根据角色获取功能集合数据
- * @param type 1:查社区 2:查房屋和场所(居民角色)
- * @param roleName
- * @return
- */
- @GetMapping("/getFuncList")
- @ApiLog("根据角色获取功能集合数据")
- public R getFuncList(Integer type,String roleName) {
- bladeLogger.info("blade-doorplateAddress_getFuncList", JsonUtil.toJson(ToObject.toMap("type:" + type,"roleName:"+ roleName)));
- return R.data(doorplateAddressService.getFuncList(type,roleName));
- }
-
- /**
- * 获取楼盘相关集合数据
- * @param houseParam
- * @return
- */
- @GetMapping("/getHousesList")
- @ApiLog("获取楼盘相关集合数据")
- public R getHousesList(HouseParam houseParam) {
- bladeLogger.info("获取楼盘相关集合数据", JsonUtil.toJson(houseParam));
- return R.data(doorplateAddressService.getHousesList(houseParam));
- }
-
- /**
- * 查询房屋及出租详情信息
- * @param code 门牌地址编号
- * @return
- */
- @GetMapping("/getHouseRentInfo")
- @ApiLog("查询房屋及出租详情信息")
- public R getHouseRentInfo(String code, Long houseId) {
- bladeLogger.info("获取楼盘相关集合数据", JsonUtil.toJson(code));
- return R.data(doorplateAddressService.getHouseRentInfo(code,houseId));
- }
-
- /**
- * 判断房屋类型
- * @param code 门牌地址编号
- * @return
- */
-// @GetMapping("/getHouseType")
-// @ApiOperation(value = "通过houseCode判断房屋类型")
-// public R getHouseType(String code) {
-// return R.data(doorplateAddressService.getHouseType(code));
-// }
-
- /**
- * 获取门牌地址树集合信息
- * @param code
- * @param type
- * @return
- */
- @ApiLog("获取门牌地址树集合信息")
- @GetMapping("/getDoorplateAddressList")
- public R<List<DoorplateAddressVOTree>> getDoorplateAddressList(String code, String type){
- List<DoorplateAddressVOTree> list = doorplateAddressService.getDoorplateAddressList(code,type);
- return R.data(list);
- }
-
- /**
- * 获取房屋树--数据有问题暂时不用2023/11/16
- * @param houseParam
- * @return
- */
- @GetMapping("/getHouseTree")
- public R getHouseTree(HouseParam houseParam){
- return R.data(doorplateAddressService.getHouseTree(houseParam));
- }
-
- /**
- * 根据参数获取地址详情
- * @return
- */
- @ApiLog("根据参数获取地址详情")
- @GetMapping("/getDoorplateAddressDetail")
- public R getDoorplateAddressDetail(DoorplateAddressVO doorplateAddressVO){
- DoorplateAddressVO detail = doorplateAddressService.getDoorplateAddressDetail(doorplateAddressVO);
- return R.data(detail);
- }
-
- /**
- * 房屋数据处理
- * @return
- */
- @GetMapping("/houseDataHandle")
- public R dataHandle(String townName){
- return R.data(doorplateAddressService.houseDataHandle(townName));
- }
-
- /**
- * 小区数据处理
- * @return
- */
- @GetMapping("/aoiDataHandle")
- public R aoiDataHandle(){
- return R.data(doorplateAddressService.aoiDataHandle());
- }
-
- /**
- * 场所数据处理
- * @return
- */
- @GetMapping("/placeDataHandle")
- public R placeDataHandle(String townName){
- return R.data(doorplateAddressService.placeDataHandle(townName));
- }
-
- /**
- * 社区数据处理
- * @return
- */
- @GetMapping("/communityDataHandle")
- public R communityDataHandle(){
- return R.data(doorplateAddressService.communityDataHandle());
- }
-
-
- /**
- * 网格范围数据处理
- * @return
- */
- @GetMapping("/gridRangeDataHandle")
- public R gridRangeDataHandle(String townName,String communityName){
- return R.data(doorplateAddressService.gridRangeDataHandle(townName,communityName));
- }
-
-
- /**
- * 查询场所标准地址数据
- * @param doorplateAddressVO
- * 查询场所标准地址数据
- * @return
- */
- @ApiLog("查询场所标准地址数据")
- @GetMapping("/getPlaceList")
- public R getPlaceList(DoorplateAddressVO doorplateAddressVO,Integer size){
- return R.data(doorplateAddressService.getPlaceList(doorplateAddressVO,size));
- }
-
- /**
- * 通过小区id 查询楼栋编码
- * @param districtId 门牌地址编号
- * @return
- */
- @GetMapping("/getHouseBuildingCode")
- @ApiLog("通过小区id 查询楼栋编码")
- public R<List<DoorplateAddressVO>> getHouseBuildingCode(String districtId) {
- List<DoorplateAddressVO> houseBuildingCode = doorplateAddressService.getHouseBuildingCode(districtId);
- return R.data(houseBuildingCode);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/dto/DoorplateAddressDTO.java b/src/main/java/org/springblade/modules/doorplateAddress/dto/DoorplateAddressDTO.java
deleted file mode 100644
index d3acceb..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/dto/DoorplateAddressDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-
-/**
- * 门牌地址表(总台账数据) 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DoorplateAddressDTO extends DoorplateAddressEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/entity/DoorplateAddressEntity.java b/src/main/java/org/springblade/modules/doorplateAddress/entity/DoorplateAddressEntity.java
deleted file mode 100644
index bf26270..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/entity/DoorplateAddressEntity.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * 门牌地址表(总台账数据) 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_doorplate_address")
-@ApiModel(value = "DoorplateAddress对象", description = "门牌地址表(总台账数据)")
-public class DoorplateAddressEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
-
- /**
- * 地址名称
- */
- @ApiModelProperty(value = "地址名称")
- private String addressName;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String addressCode;
-
- /**
- * 经度
- */
- @ApiModelProperty(value = "经度")
- private String X;
- /**
- * 纬度
- */
- @ApiModelProperty(value = "纬度")
- private String Y;
-
- /**
- * x84经度
- */
- @ApiModelProperty(value = "x84经度")
- @TableField("x_84")
- private String x84;
- /**
- * y84纬度
- */
- @ApiModelProperty(value = "y84纬度")
- @TableField("y_84")
- private String y84;
- /**
- * 行政区编码
- */
- @ApiModelProperty(value = "行政区编码")
- private String regionCode;
- /**
- * 行政区名称
- */
- @ApiModelProperty(value = "行政区名称")
- private String regionName;
- /**
- * 乡镇街道编号
- */
- @ApiModelProperty(value = "乡镇街道编号")
- @TableField("town_street_code")
- private String townStreetCode;
- /**
- * 乡镇街道名称
- */
- @ApiModelProperty(value = "乡镇街道名称")
- private String townStreetName;
- /**
- * 居委会(社区)编号
- */
- @ApiModelProperty(value = "居委会(社区)编号")
- private String neiCode;
- /**
- * 居委会(社区)名称
- */
- @ApiModelProperty(value = "居委会(社区)名称")
- private String neiName;
- /**
- * 街路巷编码
- */
- @ApiModelProperty(value = "街路巷编码")
- private String streetRuCode;
- /**
- * 街路巷名称
- */
- @ApiModelProperty(value = "街路巷名称")
- private String streetRuName;
- /**
- * 分局代码
- */
- @ApiModelProperty(value = "分局代码")
- private String branchCode;
- /**
- * 分局名称
- */
- @ApiModelProperty(value = "分局名称")
- private String branchName;
- /**
- * 派出所代码
- */
- @ApiModelProperty(value = "派出所代码")
- private String localPoliceStationCode;
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称")
- private String localPoliceStationName;
- /**
- * 警务室代码
- */
- @ApiModelProperty(value = "警务室代码")
- private String policeAffairsCode;
- /**
- * 警务室名称
- */
- @ApiModelProperty(value = "警务室名称")
- private String policeAffairsName;
- /**
- * 单元编码
- */
- @ApiModelProperty(value = "单元编码")
- private String unitCode;
- /**
- * 单元号(名称)
- */
- @ApiModelProperty(value = "单元号(名称)")
- private String unitName;
- /**
- * 楼栋编码
- */
- @ApiModelProperty(value = "楼栋编码")
- private String buildingCode;
- /**
- * 楼栋号(名称)
- */
- @ApiModelProperty(value = "楼栋号(名称)")
- private String buildingName;
- /**
- * 户室号(名称)
- */
- @ApiModelProperty(value = "户室号(名称)")
- private String houseName;
- /**
- * 楼层
- */
- @ApiModelProperty(value = "楼层")
- private String floor;
- /**
- * 小区编码
- */
- @ApiModelProperty(value = "小区编码")
- private String aoiCode;
- /**
- * 小区名称
- */
- @ApiModelProperty(value = "小区名称")
- private String aoiName;
- /**
- * 兴趣点code
- */
- @ApiModelProperty(value = "兴趣点code")
- private String poiCode;
- /**
- * 兴趣点名称
- */
- @ApiModelProperty(value = "兴趣点名称")
- private String poi;
- /**
- * 地址级别
- */
- @ApiModelProperty(value = "地址级别")
- private Integer addressLevel;
- /**
- * 父节点地址编码
- */
- @ApiModelProperty(value = "父节点地址编码")
- private String parentAddressCode;
- /**
- * 采集照片url
- */
- @ApiModelProperty(value = "采集照片url")
- private String gatPicUrl;
- /**
- * 门牌状态
- */
- @ApiModelProperty(value = "门牌状态")
- private String doorplateStatus;
- /**
- * 门牌类型
- */
- @ApiModelProperty(value = "门牌类型")
- private String doorplateType;
- /**
- * 门牌类型编号
- */
- @ApiModelProperty(value = "门牌类型编号")
- private String doorplateTypeCode;
- /**
- * 门牌号
- */
- @ApiModelProperty(value = "门牌号")
- private String doorplateNum;
- /**
- * 门牌名称
- */
- @ApiModelProperty(value = "门牌名称")
- private String doorplateName;
- /**
- * 二维码路径
- */
- @ApiModelProperty(value = "二维码路径")
- private String qrCodePath;
-
- /**
- * 子门牌号
- */
- @ApiModelProperty(value = "子门牌号")
- private String subDoorPlateNo;
-
- /**
- * 大门名称
- */
- @ApiModelProperty(value = "大门名称")
- private String gateName;
- /**
- * 操作类型
- */
- @ApiModelProperty(value = "操作类型")
- private Integer operationType;
- /**
- * 地址类型
- */
- @ApiModelProperty(value = "地址类型")
- private Integer addressType;
- /**
- * 子小区名称
- */
- @ApiModelProperty(value = "子小区名称")
- private String subAoi;
- /**
- * 民警姓名
- */
- @ApiModelProperty(value = "民警姓名")
- private String policeman;
- /**
- * 民警电话
- */
- @ApiModelProperty(value = "民警电话")
- private String policemanPhone;
- /**
- * 警务网格编码
- */
- @ApiModelProperty(value = "警务网格编码")
- private String jwwgCode;
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
deleted file mode 100644
index db50ef8..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.mapper;
-
-import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
-import org.springblade.modules.doorplateAddress.vo.FuncNode;
-import org.springblade.modules.house.vo.HouseParam;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 门牌地址表(总台账数据) Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface DoorplateAddressMapper extends BaseMapper<DoorplateAddressEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param doorplateAddress
- * @return
- */
- List<DoorplateAddressVO> selectDoorplateAddressPage(IPage page,
- @Param("doorplateAddress") DoorplateAddressVO doorplateAddress);
-
-
- /**
- * 查询街道数据
- * @return
- */
- List<TreeStringNode> getRegionListByGroupTwon(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list,
- @Param("communityList") List<String> communityList);
-
- /**
- * 查询社区数据
- * @return
- */
- List<TreeStringNode> getRegionListByGroupNei(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list,
- @Param("communityList") List<String> communityList);
-
- /**
- * 根据社区名称查询小区集合
- * @param houseParam
- * @param list
- * @return
- */
- List<TreeStringNode> getDistrictList(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list,
- @Param("communityList") List<String> communityList);
-
- /**
- * 根据社区名称查询楼栋集合
- * @param houseParam
- * @param list
- * @return
- */
- List<TreeStringNode> getBuildingList(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list);
-
- /**
- * 查询户室及住户相关信息,单元中包含住户
- * @param houseParam
- * @param list
- * @return
- */
- List<FuncNode> getUnitHouseholdList(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list);
-
- /**
- * 先查询门牌信息
- * @param code
- * @return
- */
- DoorplateAddressVO getDoorplateAddressDetailByCode(@Param("code") String code);
-
- List<DoorplateAddressVOTree> getTownStreetVOTreeList();
-
- List<DoorplateAddressVOTree> getNeiVOTreeList(@Param("code") String code);
-
- List<DoorplateAddressVOTree> getStreetRuVOTreeList(@Param("code") String code);
-
-
- List<DoorplateAddressVOTree> getDistrictVOTreeList(@Param("code") String code);
-
- List<DoorplateAddressVOTree> getBuildingVOTreeList(@Param("code") String code);
-
- /**
- * 查询街路巷
- * @param houseParam
- * @param list
- * @return
- */
- List<TreeStringNode> getStreetRuList(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list);
-
- /**
- * 根据街路巷编号查询街路巷门牌名称集合
- * @param houseParam name/code 该处当社区编号用/ 街路巷编号
- * @param list
- * @return
- */
- List<FuncNode> getDoorplateNameList(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list);
-
- /**
- * 根据参数获取地址详情
- * @param doorplateAddressVO
- * @return
- */
- @InterceptorIgnore(tenantLine = "true")
- DoorplateAddressVO getDoorplateAddressDetail(@Param("vo") DoorplateAddressVO doorplateAddressVO);
-
- /**
- * 根据参数获取地址详情
- * @param doorplateAddressVO
- * @return
- */
- DoorplateAddressVO getDoorplateAddressList(@Param("vo") DoorplateAddressVO doorplateAddressVO);
-
- /**
- * 查询社区信息
- * @param doorplateAddressEntity
- * @return
- */
- List<DoorplateAddressEntity> getAllDoorplateAddress(@Param("doorplateAddressEntity") DoorplateAddressEntity doorplateAddressEntity);
-
- /**
- * 获取房屋树
- * @param houseParam
- * @param list
- * @return
- */
- @MapKey("code")
- Map<String, DoorplateAddressVOTree> getHouseTree(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list);
- /**
- * 查询所有户室数据
- * @param townName
- * @return
- */
- List<DoorplateAddressEntity> getHouseList(@Param("townName") String townName);
-
- /**
- * 查询商超
- * @param houseParam
- * @return
- */
- List<TreeStringNode> getPlaceRelList(@Param("houseParam") HouseParam houseParam);
-
- /**
- * 查询商超详情集合
- * @param houseParam
- * @return
- */
- List<FuncNode> getPlaceRelDetailList(@Param("houseParam") HouseParam houseParam);
-
- /**
- * 查询小区集合
- * @param list
- * @return
- */
- List<DoorplateAddressEntity> getAoiList(@Param("list") List<Long> list);
-
- /**
- * 查询所有的地址表id集合
- * @return
- */
- List<Long> getAoiCodeList();
-
- /**
- * 查询所有的地址表和场所表差集集合(没有入库的)
- * @return
- */
- List<DoorplateAddressEntity> getNotInPlaceList(@Param("townName") String townName);
-
- /**
- * 查询场所标准地址数据
- * @param doorplateAddressVO
- * @param size
- * @return
- */
- List<DoorplateAddressEntity> getPlaceList(@Param("doorplateAddress") DoorplateAddressVO doorplateAddressVO,
- @Param("size") Integer size,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 查询详情
- * @param doorplateAddress
- * @return
- */
- DoorplateAddressVO getDoorplateAddressVODetail(@Param("doorplateAddress") DoorplateAddressVO doorplateAddress);
-
- /**
- * 查询所有的社区集合信息
- * @return
- */
- List<DoorplateAddressEntity> getAllCommunityList();
-
- /**
- * 通过小区id 查询楼栋编码
- * @param districtId
- * @return
- */
- List<DoorplateAddressVO> getHouseBuildingCode(String districtId);
-
- /**
- * 查询绑定房屋总数
- * @param townName
- * @return
- */
- Integer getNotHouseListCount(@Param("townName") String townName);
-
- /**
- * 查询网格范围表未绑定的地址表信息数量
- * @param townName
- * @return
- */
- Integer getNotBindGridRangeDoorListCount(@Param("townName") String townName,
- @Param("communityName") String communityName);
-
- /**
- * 查询所有未匹配的网格范围地址数据
- * @param townName
- * @param communityName
- * @return
- */
- List<DoorplateAddressEntity> getNotBindGridRangeDoorList(@Param("townName") String townName,
- @Param("communityName") String communityName);
-
- /**
- * 根据房屋id 查询对应的地址信息
- * @param houseId
- * @return
- */
- DoorplateAddressVO getDoorplateAddressDetailByHouseId(@Param("houseId") Long houseId);
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
deleted file mode 100644
index 3cd380b..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
+++ /dev/null
@@ -1,793 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.doorplateAddress.mapper.DoorplateAddressMapper">
-
- <!--过滤网格数据-->
- <sql id="filterHouseGrid">
- <if test="houseParam.roleName!=null and houseParam.roleName!=''">
- <if test="houseParam.roleName=='wgy' and houseParam.userId!='1726859808689696770'">
- <choose>
- <when test="list != null and list.size()>0">
- and address_code in
- <foreach collection="list" item="houseCode" separator ="," open="(" close=")">
- #{houseCode}
- </foreach>
- </when>
- <otherwise>
- and address_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </sql>
-
-
-
- <!--过滤社区数据-->
- <sql id="filterCommunity">
- <if test="houseParam.roleName!=null and houseParam.roleName!=''">
- <if test="houseParam.roleName=='mj' and houseParam.userId!='1726859808689696770'">
- <choose>
- <when test="communityList != null and communityList.size()>0">
- and nei_code in
- <foreach collection="communityList" item="neiCode" separator ="," open="(" close=")">
- #{neiCode}
- </foreach>
- </when>
- <otherwise>
- and nei_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </sql>
-
-
- <!--门牌地址详情查询-->
- <resultMap id="doorplateAddressDetailMap" type="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO"
- autoMapping="true">
- <id property="id" column="id"/>
- <association property="place" javaType="org.springblade.modules.place.vo.PlaceVO"
- autoMapping="true">
- <id property="id" column="cid"/>
- <result property="createTime" column="pcreateTime"/>
- <result property="createUserName" column="createUserName"/>
- </association>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectDoorplateAddressPage" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
- select * from jczz_doorplate_address where 1=1
- <if test="doorplateAddress.aoiName!=null and doorplateAddress.aoiName!=''">
- and aoi_name like concat('%',#{doorplateAddress.aoiName},'%')
- </if>
- <if test="doorplateAddress.addressName!=null and doorplateAddress.addressName!=''">
- and address_name like concat('%',#{doorplateAddress.addressName},'%')
- </if>
- <if test="doorplateAddress.townStreetCode != null and doorplateAddress.townStreetCode != ''">
- and town_street_code like concat('%',#{doorplateAddress.townStreetCode},'%')
- </if>
- </select>
-
-
- <!--查询区域数据-街道-->
-<!-- <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeStringNode" >-->
-<!-- select town_street_code as id,town_street_name as name from jczz_doorplate_address-->
-<!-- where 1=1-->
-<!-- <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'">-->
-<!-- and nei_name = '万达社区居民委员会'-->
-<!-- </if>-->
-<!-- <include refid="filterHouseGrid"/>-->
-<!-- <include refid="filterCommunity"/>-->
-<!-- group by town_street_code,town_street_name-->
-<!-- </select>-->
-
- <!--过滤网格数据-->
- <sql id="filterHouseGridByTownOrCommunity">
- <if test="houseParam.roleName!=null and houseParam.roleName!='' and houseParam.roleName!='admin'">
- <choose>
- <when test="(houseParam.roleName=='wgy' or houseParam.roleName=='wzcj') and houseParam.userId!='1726859808689696770'">
- <choose>
- <when test="list != null and list.size()>0">
- and jg.grid_code in
- <foreach collection="list" item="gridCode" separator ="," open="(" close=")">
- #{gridCode}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- </sql>
-
- <!--查询区域数据-街道-->
- <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeStringNode" >
- select br.town_code as id,br.town_name as name from jczz_grid jg
- left join blade_region br on jg.community_code = br.code
- where jg.is_deleted = 0
- <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'">
- and br.name = '万达社区居民委员会'
- </if>
- <include refid="filterHouseGridByTownOrCommunity"/>
- group by br.town_code,br.town_name
- union
- select br.town_code as id,br.town_name as name from jczz_police_affairs_grid jpag
- left join blade_region br on jpag.community_code = br.code
- where jpag.is_deleted = 0 and br.town_code is not null
- <include refid="filterCommunityByTownOrCommunity"/>
- group by br.town_code,br.town_name
- </select>
-
- <!--过滤社区数据-->
- <sql id="filterCommunityByTownOrCommunity">
- <if test="houseParam.roleName!=null and houseParam.roleName!=''">
- <choose>
- <when test="houseParam.roleName=='mj'">
- <choose>
- <when test="communityList != null and communityList.size()>0">
- and jpag.jw_grid_code in
- <foreach collection="communityList" item="code" separator ="," open="(" close=")">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.jw_grid_code in ('')
- </otherwise>
- </choose>
- </when>
- <otherwise>
- and jpag.jw_grid_code in ('')
- </otherwise>
- </choose>
- </if>
- </sql>
-
- <!--查询区域数据-社区-->
- <select id="getRegionListByGroupNei" resultType="org.springblade.common.node.TreeStringNode" >
- select br.village_code as id,br.village_name as name,br.town_code as parentId from jczz_grid jg
- left join blade_region br on jg.community_code = br.code
- where jg.is_deleted = 0
- <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'">
- and nei_name = '万达社区居民委员会'
- </if>
- <include refid="filterHouseGridByTownOrCommunity"/>
- union
- select br.village_code as id,br.village_name as name,br.town_code as parentId from jczz_police_affairs_grid jpag
- left join blade_region br on jpag.community_code = br.code
- where jpag.is_deleted = 0 and br.village_code is not null
- <include refid="filterCommunityByTownOrCommunity"/>
- </select>
-
- <!--根据社区名称查询小区集合-->
- <select id="getDistrictList" resultType="org.springblade.common.node.TreeStringNode" >
- select aoi_code as id,aoi_name as name,1 as addressType from jczz_doorplate_address
- where 1=1
- and aoi_name !=''
- and aoi_code !=''
- <if test="houseParam.name != null and houseParam.name!=''">
- and nei_name = #{houseParam.name}
- </if>
- <if test="houseParam.code != null and houseParam.code!=''">
- and nei_code = #{houseParam.code}
- </if>
- <include refid="filterHouseGrid"/>
- <include refid="filterCommunity"/>
- group by aoi_code,aoi_name
- union all
- (
- select aoi_code as id,sub_aoi as name,1 as addressType from jczz_doorplate_address
- where 1=1
- and aoi_code !=''
- and aoi_name is null
- and sub_aoi != ''
- <if test="houseParam.name != null and houseParam.name!=''">
- and nei_name = #{houseParam.name}
- </if>
- <if test="houseParam.code != null and houseParam.code!=''">
- and nei_code = #{houseParam.code}
- </if>
- <include refid="filterHouseGrid"/>
- <include refid="filterCommunity"/>
- group by aoi_code,sub_aoi
- )
- union all
- (
- select nei_code as id,'自建房/商铺' as name,2 as addressType from jczz_doorplate_address
- where 1=1
- and aoi_code is null
- <if test="houseParam.name != null and houseParam.name!=''">
- and nei_name = #{houseParam.name}
- </if>
- <if test="houseParam.code != null and houseParam.code!=''">
- and nei_code = #{houseParam.code}
- </if>
- <include refid="filterHouseGrid"/>
- <include refid="filterCommunity"/>
- group by nei_code
- )
- union all
- (
- select '企业商超' as id,'企业商超' as name,4 as addressType from jczz_place_rel jpl
- join jczz_place jp on jpl.place_id = jp.id and jp.is_deleted = 0
- where jpl.is_deleted = 0
- <if test="houseParam.communityName!=null and houseParam.communityName!=''">
- and community_name like concat('%',#{houseParam.communityName},'%')
- </if>
- <if test="houseParam.code != null and houseParam.code!=''">
- and community_code = #{houseParam.code}
- </if>
- limit 1
- )
- </select>
-
- <!--根据小区名称查询楼栋/商铺集合-->
- <select id="getBuildingList" resultType="org.springblade.common.node.TreeStringNode" >
- (
- select building_code as id,ifnull(building_name,'1栋') as name,1 as addressType from jczz_doorplate_address
- where 1=1
- and aoi_code = #{houseParam.code}
- and building_code !=''
- and doorplate_type = '户室牌'
- <include refid="filterHouseGrid"/>
- group by building_code,building_name
- order by building_name
- )
- union all
- (
- select address_code as id,doorplate_name as name,2 as addressType from jczz_doorplate_address
- where 1=1
- and aoi_code = #{houseParam.code}
- and building_name is null
- and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
- <include refid="filterHouseGrid"/>
- )
- </select>
-
- <!--户室map-->
- <resultMap id="houseFuncNodeMap" type="org.springblade.modules.doorplateAddress.vo.FuncNode" autoMapping="true" >
- <id column="id" property="id"/>
- <collection property="householdLabelList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
- <id property="id" column="cid"/>
- </collection>
- </resultMap>
-
- <!--查询户室及住户相关信息,单元中包含住户-->
- <select id="getUnitHouseholdList" resultMap="houseFuncNodeMap" >
- (
- select
- jda.id,ifnull(jda.unit_name,"未知单元") unitName,jda.unit_code unitCode,jda.floor,jda.house_name as houseNo,
- jda.address_code addressCode,
- jh.name as realName,jh.relationship as roleType,1 as addressType,
- juhl.id as cid,juhl.house_code,juhl.label_id,juhl.label_name,juhl.color,juhl.household_id,
- juhlh.color as houseColor
- from jczz_doorplate_address jda
- left join
- (
- SELECT house_code, NAME, relationship FROM jczz_household WHERE id in(
- SELECT max(id) FROM jczz_household where is_deleted =0 and relationship = 1 GROUP BY house_code
- )
- ) jh
- on jda.address_code = jh.house_code
- left join jczz_user_house_label juhl on juhl.house_code = jda.address_code and juhl.lable_type=1
- left join jczz_user_house_label juhlh on juhlh.house_code = jda.address_code and juhlh.lable_type=2
- where 1=1
- and floor != ''
- and house_name != ''
- and doorplate_type = '户室牌'
- and building_code = #{houseParam.code}
- <if test="houseParam.searchKey!=null and houseParam.searchKey!=''">
- and jh.name like concat('%',#{houseParam.searchKey},'%')
- </if>
- <include refid="filterHouseGrid"/>
- )
- union all
- (
- select jda2.id,'' as unitName,address_code as unitCode,doorplate_name as floor,'' as houseNo,address_code as addressCode,
- '' as realName,'' as roleType,2 as addressType,
- juhl.id as cid,juhl.house_code,juhl.label_id,juhl.label_name,juhl.color,juhl.household_id,
- juhlh.color as houseColor
- from jczz_doorplate_address jda2
- left join jczz_user_house_label juhl on juhl.house_code = jda2.address_code and juhl.lable_type=1
- left join jczz_user_house_label juhlh on juhlh.house_code = jda2.address_code and juhlh.lable_type=2
- where 1=1
- and building_code = #{houseParam.code}
- and building_name != ''
- and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
- <include refid="filterHouseGrid"/>
- )
- </select>
-
- <!--先查询门牌信息-->
- <select id="getDoorplateAddressDetailByCode" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
- select * from jczz_doorplate_address where address_code = #{code}
- </select>
-
- <select id="getTownStreetVOTreeList"
- resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree">
- SELECT town_street_code as code,town_street_name as name FROM jczz_doorplate_address group by town_street_code , town_street_name
- </select>
-
- <select id="getNeiVOTreeList" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree">
- SELECT nei_code as code,nei_name as name FROM jczz_doorplate_address WHERE town_street_code =#{code} GROUP BY nei_code,nei_name
- </select>
- <select id="getStreetRuVOTreeList"
- resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree">
- SELECT street_ru_code as code,street_ru_name as name
- FROM jczz_doorplate_address
- WHERE nei_code =#{code}
- and street_ru_code is not null and street_ru_code !=''
- and street_ru_name is not null and street_ru_name !=''
- GROUP BY street_ru_code,street_ru_name
- </select>
-
- <select id="getDistrictVOTreeList"
- resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree">
- SELECT aoi_code as code,aoi_name as name
- FROM jczz_doorplate_address
- WHERE street_ru_code =#{code}
- and aoi_code is not null and aoi_code !=''
- and aoi_name is not null and aoi_name !=''
- GROUP BY aoi_code,aoi_name
- </select>
-
- <select id="getBuildingVOTreeList"
- resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree">
- SELECT building_code as code,building_name as name
- FROM jczz_doorplate_address
- WHERE aoi_code =#{code}
- and building_code is not null and building_code !=''
- and building_name is not null and building_name !=''
- GROUP BY building_code,building_name
- </select>
-
- <!--根据社区查询街路巷集合-->
- <select id="getStreetRuList" resultType="org.springblade.common.node.TreeStringNode" >
- select street_ru_code as id,street_ru_name as name,3 as addressType from jczz_doorplate_address
- where 1=1
- and aoi_code is null
- <if test="houseParam.name != null and houseParam.name!=''">
- and nei_name = #{houseParam.name}
- </if>
- <if test="houseParam.code != null and houseParam.code!=''">
- and nei_code = #{houseParam.code}
- </if>
- <include refid="filterHouseGrid"/>
- group by street_ru_code,street_ru_name
- </select>
-
- <!--根据街路巷编号查询街路巷门牌名称集合-->
- <select id="getDoorplateNameList" resultType="org.springblade.modules.doorplateAddress.vo.FuncNode">
- select address_code as addressCode,
- IFNULL(CONCAT(doorplate_num,sub_door_plate_no), IF(doorplate_num IS NULL, sub_door_plate_no, doorplate_num)) as floor,
- 3 as addressType
- from jczz_doorplate_address
- where 1=1
- and street_ru_code = #{houseParam.code}
- and nei_code = #{houseParam.name}
- and aoi_code is null
- and doorplate_type = '中门牌'
- <include refid="filterHouseGrid"/>
- order by doorplate_num,sub_door_plate_no
- </select>
-
- <select id="getDoorplateAddressDetail"
- resultMap="doorplateAddressDetailMap">
- SELECT
- jda.*,
- jp.id as cid,jp.*,jp.create_time as pcreateTime,
- bu.real_name as createUserName
- FROM jczz_doorplate_address jda
- left join jczz_place jp on jda.address_code = jp.house_code= and jp.is_deleted = 0
- left join blade_user bu on bu.id = jp.create_user and bu.is_deleted = 0
- WHERE 1=1
- <if test="vo.stdId != null and vo.stdId != ''">
- AND address_code = #{vo.stdId}
- </if>
- <if test="vo.buildingCode != null and vo.buildingCode !='' ">
- AND building_code = #{vo.buildingCode}
- </if>
- </select>
-
- <select id="getDoorplateAddressList"
- resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
- SELECT * FROM jczz_doorplate_address
- WHERE 1=1
- <if test="vo.stdId != null and vo.stdId != ''">
- AND address_code = #{vo.stdId}
- </if>
- <if test="vo.buildingCode != null and vo.buildingCode !='' ">
- AND building_code = #{vo.buildingCode}
- </if>
- </select>
-
- <!--查询社区信息-->
- <select id="getAllDoorplateAddress" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select
- jda.id,
- jda.address_code,
- jda.aoi_code,
- jda.aoi_name,
- jda.x,
- jda.y
- from jczz_doorplate_address jda
- left join jczz_grid_range jgr on jda.address_code = jgr.house_code
- where 1=1 and jgr.id is null
- <if test="doorplateAddressEntity.neiName!=null and doorplateAddressEntity.neiName!=''">
- and jda.nei_name = #{doorplateAddressEntity.neiName}
- </if>
- <if test="doorplateAddressEntity.townStreetName!=null and doorplateAddressEntity.townStreetName!=''">
- and jda.town_street_name = #{doorplateAddressEntity.townStreetName}
- </if>
- </select>
-
- <!--获取房屋树-->
- <select id="getHouseTree" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree">
- SELECT
- aoi_code as code,
- aoi_name as name,
- nei_code as parentCode
- FROM jczz_doorplate_address
- WHERE nei_code = #{houseParam.code}
- and aoi_code is not null and aoi_code !=''
- and aoi_name is not null and aoi_name !=''
- GROUP BY aoi_code,aoi_name,nei_code
- <include refid="filterHouseGrid"/>
- union all
- (
- SELECT
- building_code as code,
- building_name as name,
- aoi_code as parentCode
- FROM jczz_doorplate_address
- WHERE nei_code = #{houseParam.code}
- and building_code is not null and building_code !=''
- and building_name is not null and building_name !=''
- GROUP BY building_code,building_name,aoi_code
- <include refid="filterHouseGrid"/>
- )
- union all
- (
- select
- jda.unit_code as code,
- ifnull(jda.unit_name,"一单元") name,
- jda.building_code as parentCode
- from jczz_doorplate_address jda
- where 1=1
- and floor != ''
- and house_name != ''
- and doorplate_type = '户室牌'
- and nei_code = #{houseParam.code}
- <include refid="filterHouseGrid"/>
- group by unit_name,unit_code,building_code
- )
- union all
- (
- select
- jda.address_code as code,
- jda.house_name as name,
- jda.unit_code as parentCode
- from jczz_doorplate_address jda
- where 1=1
- and floor != ''
- and house_name != ''
- and doorplate_type = '户室牌'
- and nei_code = #{houseParam.code}
- <include refid="filterHouseGrid"/>
- )
- </select>
-
- <!--查询所有户室数据-->
- <select id="getHouseList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select jda.* from jczz_doorplate_address jda
- left join jczz_house jh on jh.house_code = jda.address_code
- where 1=1
- and jh.house_code is null
- and doorplate_type = '户室牌'
- <if test="townName!=null and townName!=''">
- and jda.town_street_name like concat('%',#{townName},'%')
- </if>
- limit 0,1000
- </select>
-
- <!--查询商超-->
- <select id="getPlaceRelList" resultType="org.springblade.common.node.TreeStringNode">
- select building_name as id,building_name as name,4 as addressType from jczz_place_rel jpl
- join jczz_place jp on jpl.place_id = jp.id and jp.is_deleted = 0
- where jpl.is_deleted = 0
- <if test="houseParam.communityName!=null and houseParam.communityName!=''">
- and community_name like concat('%',#{houseParam.communityName},'%')
- </if>
- group by building_name
- </select>
-
- <!--查询商超详情集合-->
- <select id="getPlaceRelDetailList" resultType="org.springblade.modules.doorplateAddress.vo.FuncNode">
- select jp.id as addressCode,
- jpl.grid_name as unitName,
- jpl.community_code as unitCode,
- doorplate_num as floor,
- 4 as addressType
- from jczz_place_rel jpl
- join jczz_place jp on jpl.place_id = jp.id and jp.is_deleted = 0
- where jpl.is_deleted = 0
- and doorplate_num!=''
- <if test="houseParam.communityName!=null and houseParam.communityName!=''">
- and community_name like concat('%',#{houseParam.communityName},'%')
- </if>
- <if test="houseParam.buildingName!=null and houseParam.buildingName!=''">
- and building_name = #{houseParam.buildingName}
- </if>
- </select>
-
- <!--查询小区集合-->
- <select id="getAoiList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select nei_code,aoi_code,ifnull(aoi_name,sub_aoi) as aoi_name,x,y,address_name from jczz_doorplate_address
- where 1=1
- <choose>
- <when test="list != null and list.size()>0">
- and id in
- <foreach collection="list" item="id" separator ="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and id in ('')
- </otherwise>
- </choose>
- </select>
-
- <!--查询所有的地址表id集合-->
- <select id="getAoiCodeList" resultType="java.lang.Long">
- select
- min(id)
- from jczz_doorplate_address
- where aoi_code != "" and aoi_name !=""
- and doorplate_type = '大门牌'
- GROUP BY aoi_code
- union all
- (
- select
- min(id)
- from jczz_doorplate_address
- where aoi_code != "" and sub_aoi != ""
- and doorplate_type = '大门牌'
- group by aoi_code
- )
- </select>
-
- <!--查询所有的地址表和场所表差集集合(小区和非小区的)-->
- <select id="getNotInPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select jda.* from jczz_doorplate_address jda
- left join jczz_place jp on jda.address_code=jp.house_code and jp.is_deleted = 0
- where 1=1
- and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
- and jp.id is null
- <if test="townName!=null and townName!=''">
- and jda.town_street_name like concat('%',#{townName},'%')
- </if>
- </select>
-
- <!--查询场所标准地址数据-->
- <select id="getPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select jda.*
- from jczz_doorplate_address jda
- left join jczz_grid_range jgr on jda.address_code = jgr.house_code
- where 1=1
--- and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
- <if test="doorplateAddress.addressName!=null and doorplateAddress.addressName!=''">
- and jda.address_name like concat('%',#{doorplateAddress.addressName},'%')
- </if>
- <if test="doorplateAddress.poi!=null and doorplateAddress.poi!=''">
- and jda.poi like concat('%',#{doorplateAddress.poi},'%')
- </if>
- <if test="doorplateAddress.addressCode!=null and doorplateAddress.addressCode!=''">
- and jda.address_code in
- <foreach collection="addressCode.split(',')" item="addressCode" open="(" close=")" separator=",">
- #{addressCode}
- </foreach>
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="doorplateAddress.roleName != null and doorplateAddress.roleName != ''">
- <if test="doorplateAddress.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jgr.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jgr.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="doorplateAddress.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jda.nei_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jda.nei_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jgr.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jda.nei_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jgr.grid_code in ('') or jda.nei_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- limit 0,#{size}
- </select>
-
- <!--查询地址表详情-->
- <select id="getDoorplateAddressVODetail" resultMap="detailMap">
- select
- jda.*,
- jh.id as hid,
- jh.name as hname,
- jh.phone_number,
- jh.card_no,
- jh.occupation,
- jh.current_address,
- jp.id as pid,
- jp.principal,
- jp.principal_phone,
- jp.principal_id_card,
- case
- when jh.id is not null then 1
- when jp.id is not null then 2
- when jp.id is not null and jh.id is not null then 3
- when jp.id is null and jh.id is null then 4
- end as addType
- from jczz_doorplate_address jda
- left join jczz_place jp on jp.house_code = jda.address_code and jp.is_deleted = 0
- left join jczz_household jh on jh.house_code = jda.address_code and jh.is_deleted = 0 and jh.relationship = 1
- where address_code = #{doorplateAddress.addressCode}
- </select>
-
- <!--门牌地址详情查询-->
- <resultMap id="detailMap" type="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO"
- autoMapping="true">
- <id property="id" column="id"/>
- <association property="place" javaType="org.springblade.modules.place.vo.PlaceVO">
- <id property="id" column="pid"/>
- <result property="principal" column="principal"/>
- <result property="principalPhone" column="principal_phone"/>
- <result property="principalIdCard" column="principal_id_card"/>
- </association>
- <collection property="householdList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.HouseholdVO">
- <id property="id" column="hid"/>
- <result property="name" column="hname"/>
- <result property="phoneNumber" column="phone_number"/>
- <result property="cardNo" column="card_no"/>
- <result property="occupation" column="occupation"/>
- <result property="currentAddress" column="current_address"/>
- </collection>
- </resultMap>
-
- <!--查询所有的社区集合信息-->
- <select id="getAllCommunityList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- SELECT
- jda.nei_code,
- jda.nei_name,
- jda.town_street_code
- FROM
- jczz_doorplate_address jda
- WHERE
- 1 = 1
- GROUP BY
- jda.nei_code,
- jda.nei_name,
- jda.town_street_code
- </select>
-
-
- <select id="getHouseBuildingCode"
- resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
-
- SELECT DISTINCT
- jda.building_code,
- jda.building_name
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_district jd ON jd.aoi_code = jda.aoi_code
- WHERE
- jd.id = #{districtId}
- and jda.building_code is not null
-
- </select>
-
-
- <!--查询所有户室数据-->
- <select id="getNotHouseListCount" resultType="java.lang.Integer">
- select count(*) from jczz_doorplate_address jda
- left join jczz_house jh on jh.house_code = jda.address_code
- where 1=1
- and jh.house_code is null
- and doorplate_type = '户室牌'
- <if test="townName!=null and townName!=''">
- and jda.town_street_name like concat('%',#{townName},'%')
- </if>
- limit 0,1000
- </select>
-
- <!--查询网格范围表未绑定的地址表信息数量-->
- <select id="getNotBindGridRangeDoorListCount" resultType="java.lang.Integer">
- select count(*) from jczz_doorplate_address jda
- left join jczz_grid_range jgr on jgr.house_code = jda.address_code
- where 1=1
- and jgr.house_code is null
- <if test="townName!=null and townName!=''">
- and jda.town_street_name like concat('%',#{townName},'%')
- </if>
- <if test="communityName!=null and communityName!=''">
- and jda.nei_name like concat('%',#{communityName},'%')
- </if>
- limit 0,1000
- </select>
-
- <!--查询所有未匹配的网格范围地址数据-->
- <select id="getNotBindGridRangeDoorList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select
- jda.address_code,
- jda.aoi_code,
- jda.building_code,
- jda.x,
- jda.y
- from jczz_doorplate_address jda
- left join jczz_grid_range jgr on jgr.house_code = jda.address_code
- where 1=1
- and jgr.house_code is null
- <if test="townName!=null and townName!=''">
- and jda.town_street_name like concat('%',#{townName},'%')
- </if>
- <if test="communityName!=null and communityName!=''">
- and jda.nei_name like concat('%',#{communityName},'%')
- </if>
- limit 0,1000
- </select>
-
- <!--查询所有未匹配的网格范围地址数据-->
- <select id="getDoorplateAddressDetailByHouseId" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
- select
- jda.*
- from jczz_doorplate_address jda
- left join jczz_house jh on jh.house_code = jda.address_code and jh.is_deleted = 0
- where 1=1
- and jh.id = #{houseId}
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java b/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
deleted file mode 100644
index 93c9e9d..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
-import org.springblade.modules.house.vo.HouseParam;
-
-import java.util.List;
-
-/**
- * 门牌地址表(总台账数据) 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IDoorplateAddressService extends IService<DoorplateAddressEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param doorplateAddress
- * @return
- */
- IPage<DoorplateAddressVO> selectDoorplateAddressPage(IPage<DoorplateAddressVO> page, DoorplateAddressVO doorplateAddress);
-
- /**
- * 根据角色获取功能集合数据
- * @param type
- * @param roleName
- * @return
- */
- Object getFuncList(Integer type,String roleName);
-
- /**
- * 获取楼盘相关集合数据
- * @param houseParam
- * @return
- */
- Object getHousesList(HouseParam houseParam);
-
- /**
- * 查询房屋及出租详情信息
- * @param code 门牌地址编号
- * @return
- */
- Object getHouseRentInfo(String code,Long houseId);
-
- List<DoorplateAddressVOTree> getDoorplateAddressList(String code, String type);
-
- /**
- * 根据参数获取地址详情
- * @return
- */
- DoorplateAddressVO getDoorplateAddressDetail(DoorplateAddressVO doorplateAddressVO);
-
- /**
- *
- * @param code
- * @return
- */
- Object getHouseType(String code);
-
- /**
- * 查询社区信息
- * @param doorplateAddressEntity
- * @return
- */
- List<DoorplateAddressEntity> getAllDoorplateAddress(DoorplateAddressEntity doorplateAddressEntity);
-
- /**
- * 获取房屋树
- * @param houseParam
- * @return
- */
- List<DoorplateAddressVOTree> getHouseTree(HouseParam houseParam);
-
- /**
- * 房屋数据处理
- * @return
- */
- Object houseDataHandle(String townName);
-
- /**
- * 小区数据处理
- * @return
- */
- Object aoiDataHandle();
-
- /**
- * 场所数据处理
- * @return
- */
- Object placeDataHandle(String townName);
-
- /**
- * 门牌地址表(总台账数据) 自定义详情
- */
- Object getDetail(DoorplateAddressVO doorplateAddress);
-
- /**
- * 社区数据处理
- * @return
- */
- Object communityDataHandle();
-
- /**
- * 查询场所标准地址数据
- * @param doorplateAddressVO
- * @param size
- * 查询场所标准地址数据
- * @return
- */
- Object getPlaceList(DoorplateAddressVO doorplateAddressVO, Integer size);
-
- /**
- * 通过小区id 查询楼栋编码
- * @param districtId
- * @return
- */
- List<DoorplateAddressVO> getHouseBuildingCode(String districtId);
-
- /**
- * 网格范围数据处理
- * @return
- */
- boolean gridRangeDataHandle(String townName,String communityName);
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java b/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
deleted file mode 100644
index 6e58274..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
+++ /dev/null
@@ -1,1177 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.ComplexNumberStringComparator;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
-import org.springblade.modules.category.dto.CategoryDTO;
-import org.springblade.modules.category.service.ICategoryService;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.service.ICommunityService;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.mapper.DoorplateAddressMapper;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree;
-import org.springblade.modules.doorplateAddress.vo.FuncNode;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.service.IGridRangeService;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.service.IGridmanService;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.service.IHouseRentalService;
-import org.springblade.modules.house.service.IHouseService;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.house.vo.HouseParam;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.service.IPlaceExtService;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.service.IRegionService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-
-/**
- * 门牌地址表(总台账数据) 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class DoorplateAddressServiceImpl extends ServiceImpl<DoorplateAddressMapper, DoorplateAddressEntity> implements IDoorplateAddressService {
-
- @Autowired
- private IPlaceService placeService;
-
- @Autowired
- private IPlaceExtService placeExtService;
-
- @Autowired
- private IHouseService houseService;
-
- @Autowired
- private IHouseholdService householdService;
-
- @Autowired
- private IHouseRentalService houseRentalService;
-
- @Autowired
- private IGridService gridService;
-
- @Autowired
- private IGridmanService gridmanService;
-
- @Autowired
- private IRegionService regionService;
-
- @Autowired
- private IDistrictService districtService;
-
- @Autowired
- private ICategoryService iCategoryService;
-
- @Autowired
- private ICommunityService communityService;
-
- @Autowired
- private IPoliceAffairsGridService policeAffairsGridService;
-
-
- @Override
- public IPage<DoorplateAddressVO> selectDoorplateAddressPage(IPage<DoorplateAddressVO> page, DoorplateAddressVO doorplateAddress) {
- return page.setRecords(baseMapper.selectDoorplateAddressPage(page, doorplateAddress));
- }
-
- /**
- * 根据角色获取功能集合数据
- *
- * @param type 1:查社区 2:查房屋和场所(居民角色)--2024/04/10 弃用
- * @param roleNames --2024/04/10 弃用
- * @return
- */
- @Override
- public Object getFuncList(Integer type, String roleNames) {
- HouseParam houseParam = new HouseParam();
- String userId = AuthUtil.getUserId().toString();
- houseParam.setUserId(userId);
- List<String> stringList = new ArrayList<>();
- List<String> communityList = new ArrayList<>();
- List<TreeStringNode> list = new ArrayList<>();
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- if (!Strings.isBlank(roleName)) {
- // 如果是网格管理员,系统管理员,民警,无诈场所采集
- if (roleName.equals("admin") ||
- roleName.equals("wzcj") ||
- roleName.equals("wgy") ||
- roleName.equals("mj")) {
- houseParam.setRoleName(roleName);
- if ((roleName.equals("wgy") || roleName.equals("wzcj"))
- && !userId.equals("1726859808689696770")) {
- // 查询对应的网格code
-// stringList = gridService.getGridListByUserId(AuthUtil.getUserId());
- stringList = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(), null, roleName);
- }
- if (roleName.equals("mj")) {
- // 查询对应的社区编号
- communityList = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(), null, roleName);
- }
- // 查询街道
- List<TreeStringNode> townList = baseMapper.getRegionListByGroupTwon(houseParam, stringList, communityList);
- // 查询社区
- List<TreeStringNode> neiList = baseMapper.getRegionListByGroupNei(houseParam, stringList, communityList);
- // 遍历
- for (TreeStringNode treeNode : townList) {
- // 遍历
- for (TreeStringNode node : neiList) {
- if (treeNode.getId().equals(node.getParentId())) {
- node.setHasChildren(false);
- treeNode.getChildren().add(node);
- }
- }
- }
- // 查询区域数据
- return townList;
- }
- // 如果是居民
- if (roleName.equals("inhabitant")) {
- return getInhabitantInfo(list);
- }
- }
- return list;
- }
-
- /**
- * 获取居民角色对应的房屋,场所信息
- *
- * @param list
- * @return
- */
- private Object getInhabitantInfo(List<TreeStringNode> list) {
- // 查询房屋集合信息
- List<TreeStringNode> houseNodeList = householdService.selectHouseNodeList(AuthUtil.getUserId());
- for (TreeStringNode treeNode : houseNodeList) {
- // 判断房屋类型类型
- if (DictConstant.SMALL_DOORPLATE.equals(treeNode.getDoorplateType()) ||
- (DictConstant.centre_DOORPLATE.equals(treeNode.getDoorplateType()) &&
- treeNode.getAddressLevel().equals(1))) {
- treeNode.setAddressType(2);
- } else {
- treeNode.setAddressType(1);
- }
- }
- // 查询场所集合信息
- List<TreeStringNode> placeNodeList = placeService.selectPlaceNodeList(AuthUtil.getUserId());
- for (TreeStringNode treeNode : placeNodeList) {
- treeNode.setAddressType(2);
- CategoryDTO categoryDTO = new CategoryDTO();
- categoryDTO.setPlaceId(treeNode.getId());
- List<CategoryDTO> categoryDTOS = iCategoryService.selectCategoryLabelList(categoryDTO);
- treeNode.setCategoryList(categoryDTOS);
-// if (DictConstant.SMALL_DOORPLATE.equals(treeNode.getDoorplateType()) ||
-// (DictConstant.centre_DOORPLATE.equals(treeNode.getDoorplateType()) &&
-// treeNode.getAddressLevel().equals(1))) {
-// treeNode.setAddressType(2);
-// } else {
-// treeNode.setAddressType(3);
-// }
- }
- if (houseNodeList.size() > 0 && placeNodeList.size() > 0) {
- // 合并
- TreeStringNode houseNode = new TreeStringNode();
- houseNode.setName("房屋");
- houseNode.setId("1");
- houseNode.setHasChildren(true);
- houseNode.setChildren(houseNodeList);
- list.add(houseNode);
-
- TreeStringNode placeNode = new TreeStringNode();
- placeNode.setName("经营场所");
- placeNode.setId("2");
- placeNode.setHasChildren(true);
- placeNode.setChildren(placeNodeList);
- list.add(placeNode);
- // 返回
- return list;
- }
- if (houseNodeList.size() > 0) {
- TreeStringNode houseNode = new TreeStringNode();
- houseNode.setName("房屋");
- houseNode.setId("1");
- houseNode.setHasChildren(true);
- houseNode.setChildren(houseNodeList);
- list.add(houseNode);
- }
- if (placeNodeList.size() > 0) {
- TreeStringNode placeNode = new TreeStringNode();
- placeNode.setName("经营场所");
- placeNode.setId("2");
- placeNode.setHasChildren(true);
- placeNode.setChildren(placeNodeList);
- list.add(placeNode);
- }
- // 返回
- return list;
- }
-
- /**
- * 获取楼盘相关集合数据
- *
- * @param houseParam
- * @return
- */
- @Override
- public Object getHousesList(HouseParam houseParam) {
- List<TreeStringNode> list = new ArrayList<>();
- Map<String, Object> map = new HashMap<>(2);
- String roleName = SpringUtils.getRequestParam("roleName");
- if (!Strings.isBlank(roleName)){
- houseParam.setRoleName(roleName);
- }
- // 获取网格员对应的地址编号集合
- List<String> addressCodeList = getHouseCodeList(houseParam);
- List<String> communityCodeList = getCommunityCodeList(houseParam);
- // 获取网格员对应的网格信息
- getGridInfoByGridman(houseParam);
- // 查小区,场所
- if (houseParam.getType() == 1) {
- // 根据社区名称查询小区集合
- list = baseMapper.getDistrictList(houseParam, addressCodeList, communityCodeList);
- }
- // 查楼栋,街路巷
- if (houseParam.getType() == 2) {
- return getBuildLevelData(houseParam,addressCodeList, map);
- }
- // 查户室
- if (houseParam.getType() == 3) {
- return getHouseLevelData(houseParam,addressCodeList, map);
- }
- return list;
- }
-
- /**
- * 获取网格员对应的网格信息
- *
- * @param houseParam
- */
- private void getGridInfoByGridman(HouseParam houseParam) {
- if (houseParam.getRoleName().equals("wgy")) {
- if (Strings.isBlank(houseParam.getRoleName())){
- houseParam.setRoleName(SpringUtils.getRequestParam("roleName"));
- }
- // 查询网格员的网格编号集合
- List<String> gridCodeList
- = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(), null, houseParam.getRoleName());
- String communityCode = SpringUtils.getRequestParam("communityCode");
- List<GridVO> list = gridService.getGridListByComAndList(communityCode,gridCodeList);
- if (list.size()>0){
- GridVO grid = list.get(0);
- houseParam.setCommunityName(grid.getCommunityName());
- houseParam.setGridName(grid.getGridName());
- }
- }
- }
-
- /**
- * 查询户室级别数据
- *
- * @param houseParam
- * @param map
- * @return
- */
- private Map<String, Object> getHouseLevelData(HouseParam houseParam, List<String> stringList,Map<String, Object> map) {
- // 判断地址类型
- if (houseParam.getAddressType() == 1) {
- List<FuncNode> aoiList = new ArrayList<>();
- List<FuncNode> shopList = new ArrayList<>();
- // 查询户室及住户相关信息,单元中包含住户,或者和单元平级的 商铺
- List<FuncNode> householdList = getUnitHouseholdList(houseParam, stringList);
- // 遍历
- if (householdList.size() > 0) {
- for (FuncNode funcNode : householdList) {
- if (funcNode.getAddressType() == 1) {
- aoiList.add(funcNode);
- }
- if (funcNode.getAddressType() == 2) {
- shopList.add(funcNode);
- }
- }
- }
- map.put("aoiList", aoiList);
- map.put("shopList", shopList);
- // 返回
- return map;
- }
- if (houseParam.getAddressType() == 3) {
- // 根据街路巷编号查询街路巷门牌名称集合
- List<FuncNode> doorplateNameList = baseMapper.getDoorplateNameList(houseParam, stringList);
- map.put("aoiList", new ArrayList<>());
- map.put("shopList", doorplateNameList);
- // 返回
- return map;
- }
- if (houseParam.getAddressType() == 4) {
- getGridInfoByGridman(houseParam);
- // 查询商超
- List<FuncNode> doorplateNameList = baseMapper.getPlaceRelDetailList(houseParam);
- // 按单元(网格)分组
- Map<String, List<FuncNode>> listMap = doorplateNameList.stream().collect(Collectors.groupingBy(FuncNode::getUnitName));
- //
- List<FuncNode> tempList = new ArrayList<>();
- // 遍历
- listMap.forEach((s, temps) -> {
- FuncNode funcNode = new FuncNode();
- funcNode.setUnitName(s);
- funcNode.setAddressType(4);
- funcNode.setUnitCode(temps.get(0).getUnitCode());
- funcNode.setChildren(temps);
- // 查询网格对应的排序
- QueryWrapper<GridEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("community_code", funcNode.getUnitCode()).eq("grid_name", funcNode.getUnitName());
- // 查询网格
- GridEntity one = gridService.getOne(wrapper);
- if (null != one) {
- funcNode.setSort(one.getSort());
- }
- tempList.add(funcNode);
- });
- // 排序
- List<FuncNode> sortList = tempList.stream().sorted(Comparator.comparing(X -> X.getSort())).collect(Collectors.toList());
- map.put("aoiList", new ArrayList<>());
- map.put("shopList", sortList);
- // 返回
- return map;
- }
- return map;
- }
-
- /**
- * 获取楼栋层级数据
- *
- * @param houseParam
- * @param map
- * @return
- */
- private Object getBuildLevelData(HouseParam houseParam,List<String> stringList, Map<String, Object> map) {
- if (houseParam.getAddressType() == 4) {
- // 获取网格员对应的网格信息
- getGridInfoByGridman(houseParam);
- // 查询商超
- List<TreeStringNode> list = baseMapper.getPlaceRelList(houseParam);
- map.put("aoiList", new ArrayList<>());
- map.put("shopList", list);
- // 返回
- return map;
- } else {
- // 判断 code 长度,如果 code 长度大于 12 则为小区查楼栋/商铺,否则则按社区查街路巷
- if (houseParam.getCode().length() > 12) {
- List<TreeStringNode> aoiList = new ArrayList<>();
- List<TreeStringNode> shopList = new ArrayList<>();
- // 根据社区名称查询楼栋或者商铺的集合
- List<TreeStringNode> list = baseMapper.getBuildingList(houseParam, stringList);
- // 排序 StringUtils.getDigits(X.getName()) 取出数字排序
- List<TreeStringNode> sortList = list.stream().
- sorted(new Comparator<TreeStringNode>() {
- @Override
- public int compare(TreeStringNode o1, TreeStringNode o2) {
- return ComplexNumberStringComparator.compare(o1.getName(), o2.getName());
- }
- }).collect(Collectors.toList());
- if (list.size() > 0) {
- for (TreeStringNode treeNode : sortList) {
- if (treeNode.getAddressType() == 1) {
- aoiList.add(treeNode);
- }
- if (treeNode.getAddressType() == 2) {
- shopList.add(treeNode);
- }
- }
- }
- map.put("aoiList", aoiList);
- map.put("shopList", shopList);
- // 返回
- return map;
- } else {
- // 查询街路巷
- List<TreeStringNode> list = baseMapper.getStreetRuList(houseParam, stringList);
- map.put("aoiList", new ArrayList<>());
- map.put("shopList", list);
- // 返回
- return map;
- }
- }
- }
-
- /**
- * 查询户室及住户相关信息,单元中包含住户
- *
- * @param houseParam
- * @param stringList
- * @return
- */
- private List<FuncNode> getUnitHouseholdList(HouseParam houseParam, List<String> stringList) {
- List<FuncNode> list = new ArrayList<>();
- // 查询户室及住户相关信息,单元中包含住户
- List<FuncNode> funcNodes = baseMapper.getUnitHouseholdList(houseParam, stringList);
- // 遍历
- List<FuncNode> aoiNodes = new ArrayList<>();
- List<FuncNode> shopNodes = new ArrayList<>();
- for (FuncNode funcNode : funcNodes) {
- if (funcNode.getAddressType() == 1) {
- aoiNodes.add(funcNode);
- }
- if (funcNode.getAddressType() == 2) {
- shopNodes.add(funcNode);
- }
- }
- // 处理,先按单元分组,再按楼层分组
- if (aoiNodes.size() > 0) {
- // 按单元分组
- Map<String, List<FuncNode>> listMap = aoiNodes.stream().collect(Collectors.groupingBy(FuncNode::getUnitName));
- // 单个单元
- oneUnitHandle(list, listMap);
- // 多个单元
- moreUnitHandle(list, listMap);
- }
- list.addAll(shopNodes);
- // 返回
- return list;
- }
-
- /**
- * 单个单元处理
- *
- * @param list
- * @param listMap
- */
- private void oneUnitHandle(List<FuncNode> list, Map<String, List<FuncNode>> listMap) {
- if (listMap.size() == 1) {
- Set<String> keySet = listMap.keySet();
- // 获取第一个key
- String firstKey = null;
- for (String key : keySet) {
- firstKey = key;
- break;
- }
- // 取出数据按楼层分组
- List<FuncNode> unitList = listMap.get(firstKey);
- Map<String, List<FuncNode>> floorListMap = unitList.stream().collect(Collectors.groupingBy(FuncNode::getFloor));
- List<FuncNode> funcNodeList = new ArrayList<>();
- floorListMap.forEach((s, temps) -> {
- FuncNode funcNode = new FuncNode();
- funcNode.setFloor(s);
- funcNode.setChildren(temps);
- funcNode.setAddressType(1);
- funcNodeList.add(funcNode);
- });
- FuncNode funcNode = new FuncNode();
- if (firstKey.equals("未知单元")) {
- funcNode.setUnitName("一单元");
- } else {
- funcNode.setUnitName(firstKey);
- }
- funcNode.setChildren(funcNodeList);
- funcNode.setAddressType(1);
- list.add(funcNode);
- }
- }
-
- /**
- * 多单元处理
- *
- * @param list
- * @param listMap
- */
- private void moreUnitHandle(List<FuncNode> list, Map<String, List<FuncNode>> listMap) {
- // 不止一个单元
- if (listMap.size() > 1) {
- List<FuncNode> tempList = new ArrayList<>();
- // 遍历
- listMap.forEach((s, temps) -> {
- FuncNode funcNode = new FuncNode();
- funcNode.setUnitName(s);
- funcNode.setAddressType(1);
- // 按楼层分组
- Map<String, List<FuncNode>> floorListMap = temps.stream().collect(Collectors.groupingBy(FuncNode::getFloor));
- List<FuncNode> floorNodeList = new ArrayList<>();
- floorListMap.forEach((floor, houseList) -> {
- FuncNode floorNode = new FuncNode();
- floorNode.setFloor(floor);
- floorNode.setChildren(houseList);
- floorNode.setAddressType(1);
- floorNodeList.add(floorNode);
- });
- funcNode.setChildren(floorNodeList);
- tempList.add(funcNode);
- });
- // 排序
- sortUnit(tempList, list);
-
- }
- }
-
- /**
- * 单元排序
- *
- * @param tempList
- * @param list
- */
- private void sortUnit(List<FuncNode> tempList, List<FuncNode> list) {
- // 遍历
- if (tempList.size() > 1) {
- for (FuncNode funcNode : tempList) {
- if (funcNode.getUnitName().contains("一")) {
- funcNode.setSort(1);
- } else if (funcNode.getUnitName().contains("二")) {
- funcNode.setSort(2);
- } else if (funcNode.getUnitName().contains("三")) {
- funcNode.setSort(3);
- } else if (funcNode.getUnitName().contains("四")) {
- funcNode.setSort(4);
- } else if (funcNode.getUnitName().contains("五")) {
- funcNode.setSort(5);
- } else if (funcNode.getUnitName().contains("六")) {
- funcNode.setSort(6);
- } else {
- if (!containsNumber(funcNode.getUnitName())) {
- funcNode.setSort(1);
- } else {
- funcNode.setSort(getNumber(funcNode.getUnitName()));
- }
- }
- }
- // 排序
- List<FuncNode> sortList = tempList.stream().sorted(Comparator.comparing(X -> X.getSort())).collect(Collectors.toList());
- list.addAll(sortList);
- }
- }
-
- /**
- * 判断是否包含数字
- *
- * @param str
- * @return
- */
- public static boolean containsNumber(String str) {
- Pattern pattern = Pattern.compile(".*\\d+.*");
- Matcher matcher = pattern.matcher(str);
- return matcher.matches();
- }
-
- /**
- * 取出字符串中的数字
- *
- * @param str
- * @return
- */
- public static int getNumber(String str) {
- StringBuilder sb = new StringBuilder();
- for (char c : str.toCharArray()) {
- if (Character.isDigit(c)) {
- sb.append(c);
- }
- }
- return Integer.parseInt(sb.toString());
- }
-
- /**
- * 查询房屋及出租详情信息
- *
- * @param code 门牌地址编号
- * @return
- */
- @Override
- public Object getHouseRentInfo(String code,Long houseId) {
- DoorplateAddressVO doorplateAddressDetailVO = new DoorplateAddressVO();
- if (Strings.isBlank(code) && null!=houseId) {
- // 先查询门牌信息
- doorplateAddressDetailVO = baseMapper.getDoorplateAddressDetailByHouseId(houseId);
- }else {
- // 先查询门牌信息
- doorplateAddressDetailVO = baseMapper.getDoorplateAddressDetailByCode(code);
- }
- if (null != doorplateAddressDetailVO) {
- // 查询房屋出租情况
- List<HouseRentalVO> houseRentalVOS = houseRentalService.getHouseRentalListByCode(doorplateAddressDetailVO.getAddressCode());
- // 查询房屋人员情况
- List<HouseholdVO> householdVOS = householdService.getHouseholdListByCode(doorplateAddressDetailVO.getAddressCode());
- // 设置数据
- doorplateAddressDetailVO.setHouseRentalList(houseRentalVOS);
- doorplateAddressDetailVO.setHouseholdList(householdVOS);
- }
- // 返回
- return doorplateAddressDetailVO;
- }
-
- @Override
- public List<DoorplateAddressVOTree> getDoorplateAddressList(String code, String type) {
-
- //西市街道 万达社区 滨江西路66号 万达华府 26栋
- List<DoorplateAddressVOTree> list = new ArrayList<>();
-
-
- if (type.equals("townStreet")) {
- //获取所有街道街道
- list = baseMapper.getTownStreetVOTreeList();
- } else if (type.equals("nei")) {
- list = baseMapper.getNeiVOTreeList(code);
- } else if (type.equals("streetRu")) {
- list = baseMapper.getStreetRuVOTreeList(code);
- } else if (type.equals("district")) {
- list = baseMapper.getDistrictVOTreeList(code);
- } else if (type.equals("building")) {
- list = baseMapper.getBuildingVOTreeList(code);
- }
-
- return list;
- }
-
- /**
- * 根据参数获取地址详情
- *
- * @return
- */
- @Override
- public DoorplateAddressVO getDoorplateAddressDetail(DoorplateAddressVO doorplateAddressVO) {
- //根据参数获取地址详情
- DoorplateAddressVO doorplateAddress = baseMapper.getDoorplateAddressDetail(doorplateAddressVO);
- // 返回
- return doorplateAddress;
- }
-
- @Override
- public Object getHouseType(String code) {
- DoorplateAddressEntity doorplateAddressEntity = baseMapper.selectOne(Wrappers.<DoorplateAddressEntity>lambdaQuery().eq(DoorplateAddressEntity::getAddressCode, code));
- // 判断房屋信息是否住宅
- if (doorplateAddressEntity.getDoorplateType().equals(DictConstant.SMALL_DOORPLATE) ||
- (doorplateAddressEntity.getDoorplateType().equals(DictConstant.centre_DOORPLATE) &&
- doorplateAddressEntity.getAddressLevel().equals(1))) {
- return 1;
- }
- return 0;
- }
-
- /**
- * 查询社区信息
- *
- * @param doorplateAddressEntity
- * @return
- */
- @Override
- public List<DoorplateAddressEntity> getAllDoorplateAddress(DoorplateAddressEntity doorplateAddressEntity) {
- return baseMapper.getAllDoorplateAddress(doorplateAddressEntity);
- }
-
- /**
- * 获取房屋树
- *
- * @param houseParam
- * @return
- */
- @Override
- public List<DoorplateAddressVOTree> getHouseTree(HouseParam houseParam) {
- String roleName = SpringUtils.getRequestParam("roleName");
- if (!Strings.isBlank(roleName)){
- houseParam.setRoleName(roleName);
- }
- List<String> stringList = getHouseCodeList(houseParam);
- // 根据社区居委会编号获取对应的小区/楼栋/单元/户室
- return NodeTreeUtil.getAddressNodeTree(baseMapper.getHouseTree(houseParam, stringList));
- }
-
- /**
- * 根据角色获取地址编号集合
- *
- * @param houseParam
- * @return
- */
- private List<String> getHouseCodeList(HouseParam houseParam) {
- List<String> addressCodeList = new ArrayList<>();
- String userId = AuthUtil.getUserId().toString();
- houseParam.setUserId(userId);
- if (null != houseParam.getRoleName() && !houseParam.getRoleName().equals("")) {
- if ((houseParam.getRoleName().equals("wgy") || houseParam.getRoleName().equals("wzcj"))
- && !userId.equals("1726859808689696770")) {
- // 先取对应网格员对应的网格编号集合
- List<String> gridCodeList
- = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(), null, houseParam.getRoleName());
- // 查询对应的房屋地址code
-// addressCodeList = gridService.getAddressCodeListByUserId(AuthUtil.getUserId(),null);
- addressCodeList =
- gridService.getAddressCodeListByGridCodeList(SpringUtils.getRequestParam("communityCode"),gridCodeList);
- }
- }
- return addressCodeList;
- }
-
- /**
- * 根据角色获取社区编号集合
- *
- * @param houseParam
- * @return
- */
- private List<String> getCommunityCodeList(HouseParam houseParam) {
- List<String> stringList = new ArrayList<>();
- String userId = AuthUtil.getUserId().toString();
- houseParam.setUserId(userId);
- if (null != houseParam.getRoleName() && !houseParam.getRoleName().equals("")) {
- if (houseParam.getRoleName().equals("mj") && !userId.equals("1726859808689696770")) {
- // 查询对应社区编号集合
- stringList = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(),null,houseParam.getRoleName());
- }
- }
- return stringList;
- }
-
- /**
- * 房屋数据处理
- *
- * @return
- */
- @Override
- public Object houseDataHandle(String townName) {
- // 处理房屋数据
- handleHouseData(townName);
-
- return null;
- }
-
- /**
- * 处理房屋数据
- */
- private void handleHouseData(String townName) {
- // 查询总数
- Integer count = baseMapper.getNotHouseListCount(townName);
- if (count > 0) {
- int num = count / 1000;
- for (int i = 0; i <= num + 1; i++) {
- // 查询所有户室数据(未入库的)
- List<DoorplateAddressEntity> list = baseMapper.getHouseList(townName);
- // 需要新增的房屋 list
- List<HouseEntity> houseList = new ArrayList<>();
- // 处理户室数据
- for (DoorplateAddressEntity doorplateAddressEntity : list) {
- // 查询是否已存在,存在就插入,不存在则插入
- QueryWrapper<HouseEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", doorplateAddressEntity.getAddressCode())
- .eq("is_deleted", 0);
- HouseEntity one = houseService.getOne(wrapper);
- if (null == one) {
- HouseEntity houseEntity = new HouseEntity();
- houseEntity.setHouseCode(doorplateAddressEntity.getAddressCode());
- houseEntity.setDistrictCode(doorplateAddressEntity.getAoiCode());
- houseEntity.setDistrictName(doorplateAddressEntity.getAoiName());
- houseEntity.setLng(doorplateAddressEntity.getX());
- houseEntity.setLat(doorplateAddressEntity.getY());
- houseEntity.setHouseName(doorplateAddressEntity.getAddressName());
- houseEntity.setAddress(doorplateAddressEntity.getAddressName());
- houseEntity.setFloor(doorplateAddressEntity.getFloor());
- houseEntity.setBuilding(doorplateAddressEntity.getBuildingName());
- houseEntity.setUnit(doorplateAddressEntity.getUnitName());
- houseEntity.setRoom(doorplateAddressEntity.getHouseName());
- houseEntity.setBuildingNo(doorplateAddressEntity.getBuildingCode());
- houseEntity.setCreateUser(AuthUtil.getUserId().toString());
- houseEntity.setCreateTime(new Date());
- houseEntity.setUpdateUser(AuthUtil.getUserId().toString());
- houseEntity.setUpdateTime(new Date());
- // 设置来源 1:地址总表 2:国控采集
- houseEntity.setSource(1);
- // 根据位置设置网格,警格编号
- String point = "'POINT(" + doorplateAddressEntity.getX() + " " + doorplateAddressEntity.getY() + ")'";
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size()>0){
- GridEntity gridEntity = gridEntityList.get(0);
- houseEntity.setGridId(gridEntity.getId());
- houseEntity.setGridCode(gridEntity.getGridCode());
- }
- //点坐标解析警格
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
- if (policeAffairsGridEntityList.size()>0){
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
- houseEntity.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
- }
- // 加入集合
- houseList.add(houseEntity);
- }
- }
- // 批量插入
- houseService.saveBatch(houseList);
- }
- }
-
- }
-
- /**
- * 小区数据处理
- *
- * @return
- */
- @Override
- public Object aoiDataHandle() {
- // 查询所有的地址表id集合
- List<Long> aoiCodeList = baseMapper.getAoiCodeList();
- // 查询小区集合
- List<DoorplateAddressEntity> list = baseMapper.getAoiList(aoiCodeList);
- // 创建小区集合对象
- List<DistrictEntity> aoiList = new ArrayList<>();
- // 将小区数据保存到小区表中
- for (DoorplateAddressEntity addressEntity : list) {
- // 查询小区是否已存在,不存在则插入,否则不新增
- QueryWrapper<DistrictEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("aoi_code", addressEntity.getAoiCode())
- .eq("is_deleted", 0);
- DistrictEntity one = districtService.getOne(wrapper);
- if (null == one) {
- DistrictEntity districtEntity = new DistrictEntity();
- districtEntity.setCommunityCode(addressEntity.getNeiCode());
- districtEntity.setAoiCode(addressEntity.getAoiCode());
- districtEntity.setName(addressEntity.getAoiName());
- districtEntity.setAddress(addressEntity.getAddressName());
- districtEntity.setLng(addressEntity.getX());
- districtEntity.setLat(addressEntity.getY());
- // 加入集合
- districtService.save(districtEntity);
-// aoiList.add(districtEntity);
- } else {
- // 更新
- one.setCommunityCode(addressEntity.getNeiCode());
- one.setAoiCode(addressEntity.getAoiCode());
- one.setName(addressEntity.getAoiName());
- one.setAddress(addressEntity.getAddressName());
- one.setLng(addressEntity.getX());
- one.setLat(addressEntity.getY());
- // 加入集合
- districtService.updateById(one);
- }
- }
- // 批量插入
-// districtService.saveBatch(aoiList);
- // 返回
- return null;
- }
-
- /**
- * 场所数据处理
- *
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Object placeDataHandle(String townName) {
- // 查询所有的地址表和场所表差集集合
- List<DoorplateAddressEntity> list = baseMapper.getNotInPlaceList(townName);
- // 创建场所集合对象
- List<PlaceEntity> placeList = new ArrayList<>();
- if (list.size() > 0) {
- // 将场所数据保存到场所表中
- for (DoorplateAddressEntity addressEntity : list) {
- // pio 名称不为空的进行插入操作
-// if (!Strings.isBlank(addressEntity.getPoi())) {
- PlaceEntity placeEntity = new PlaceEntity();
- placeEntity.setHouseCode(addressEntity.getAddressCode());
- placeEntity.setPlaceName(addressEntity.getPoi());
- placeEntity.setLng(addressEntity.getX());
- placeEntity.setLat(addressEntity.getY());
- placeEntity.setLocation(addressEntity.getAddressName());
- // 设置来源( 1:地址总表 2:国控采集 3:商超)
- placeEntity.setSource(1);
- // 待完善
- placeEntity.setStatus(1);
- // 默认为非九小场所
- placeEntity.setIsNine(2);
- // 默认为现场采集
- placeEntity.setIsScene(1);
- // 根据位置设置网格,警格编号
- String point = "'POINT(" + addressEntity.getX() + " " + addressEntity.getY() + ")'";
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size()>0){
- GridEntity gridEntity = gridEntityList.get(0);
- placeEntity.setGridId(gridEntity.getId());
- placeEntity.setGridCode(gridEntity.getGridCode());
- }
- //点坐标解析警格
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
- if (policeAffairsGridEntityList.size()>0){
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
- placeEntity.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
- }
- // 加入集合
-// placeList.add(placeEntity);
- // 保存
- placeService.save(placeEntity);
- // 新增场所详情
- savePlaceExtAndTaskInfo(placeEntity);
-// }
- }
- // 批量插入
-// savePlaceExtAndTaskInfo(placeList);
- }
- // 返回
- return null;
- }
-
- /**
- * 新增场所详情
- *
- * @param placeEntity
- */
- public void savePlaceExtAndTaskInfo(PlaceEntity placeEntity) {
- PlaceExtEntity placeExtEntity = new PlaceExtEntity();
- placeExtEntity.setPlaceId(placeEntity.getId());
- // 判断是否已存在,已存在则不新增
- QueryWrapper<PlaceExtEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0)
- .eq("place_id", placeEntity.getId());
- PlaceExtEntity one = placeExtService.getOne(wrapper);
- if (null == one) {
- placeExtEntity.setPlaceId(placeEntity.getId());
- // 默认给待完善状态
- placeExtEntity.setConfirmFlag(4);
- placeExtEntity.setCreateTime(new Date());
- placeExtEntity.setUpdateTime(new Date());
- placeExtEntity.setCreateUser(AuthUtil.getUserId());
- placeExtEntity.setUpdateUser(AuthUtil.getUserId());
- // 新增场所详情
- placeExtService.save(placeExtEntity);
- }
- }
-
- /**
- * 门牌地址表(总台账数据) 自定义详情
- */
- @Override
- public Object getDetail(DoorplateAddressVO doorplateAddress) {
- List<String> list = new ArrayList<>();
- // 扫码时调用,需判断是否有权限查看
- DoorplateAddressVO doorplateAddressVO = baseMapper.getDoorplateAddressVODetail(doorplateAddress);
- if (null != doorplateAddressVO) {
- // 不限制
- doorplateAddressVO.setIsJur(1);
- String roleName = SpringUtils.getRequestParam("roleName");
- if (!Strings.isBlank(roleName)) {
- // 判断是否有权限
- if (roleName.equals("wgy") || roleName.equals("wzcj")) {
- // 无权限
- doorplateAddressVO.setIsJur(2);
-// list = gridService.getAddressCodeListByUserId(AuthUtil.getUserId(),doorplateAddress.getAddressCode());
- list = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(),null,roleName);
- if (null != list && list.size() > 0) {
- List<String> arrayList = new ArrayList<>();
- for (String gridCode : list) {
- if (gridCode.length()>12) {
- arrayList.add(gridCode.substring(0, gridCode.length() - 2));
- }else {
- arrayList.add(gridCode);
- }
- }
- boolean contains = arrayList.contains(doorplateAddressVO.getNeiCode());
- if (contains) {
- doorplateAddressVO.setIsJur(1);
- }
- }
- }else if (roleName.equals("mj")) {
- // 无权限
- doorplateAddressVO.setIsJur(2);
- // 查询对应的社区code
- list = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(),null,roleName);
- if (null != list && list.size() > 0) {
- boolean contains = list.contains(doorplateAddressVO.getNeiCode());
- if (contains) {
- doorplateAddressVO.setIsJur(1);
- }
- }
- } else {
- // 不限制
- doorplateAddressVO.setIsJur(1);
- }
- }
- if(doorplateAddressVO != null ){
- // 获取房屋标签
- IUserHouseLabelService userHouseLabelService = SpringUtils.getBean(IUserHouseLabelService.class);
- List<UserHouseLabelEntity> houseLabelEntityList = userHouseLabelService.list(Wrappers.<UserHouseLabelEntity>lambdaQuery()
- .eq(UserHouseLabelEntity::getHouseCode, doorplateAddressVO.getAddressCode())
- .eq(UserHouseLabelEntity::getLableType, 2));
- doorplateAddressVO.setUserHouseLabelVOList(houseLabelEntityList);
- }
- return doorplateAddressVO;
- }
- return null;
- }
-
- /**
- * 社区数据处理
- *
- * @return
- */
- @Override
- public Object communityDataHandle() {
- // 查询所有的社区差值
- List<DoorplateAddressEntity> doorplateAddressEntities = baseMapper.getAllCommunityList();
- // 遍历,插入库
- for (DoorplateAddressEntity doorplateAddressEntity : doorplateAddressEntities) {
- QueryWrapper<CommunityEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("name", doorplateAddressEntity.getNeiName())
- .eq("code", doorplateAddressEntity.getNeiCode())
- .eq("is_deleted", 0);
- CommunityEntity one = communityService.getOne(queryWrapper);
- if (null == one) {
- // 插入
- CommunityEntity communityEntity = new CommunityEntity();
- communityEntity.setCode(doorplateAddressEntity.getNeiCode());
- communityEntity.setName(doorplateAddressEntity.getNeiName());
- communityEntity.setStreetCode(doorplateAddressEntity.getTownStreetCode().replaceAll("0+$", ""));
- //新增操作
- communityService.save(communityEntity);
- }
- }
- return null;
- }
-
- /**
- * 查询场所标准地址数据
- *
- * @param doorplateAddress
- * @param size
- * @return
- */
- @Override
- public Object getPlaceList(DoorplateAddressVO doorplateAddress, Integer size) {
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(DoorplateAddressVO.class, doorplateAddress);
- return baseMapper.getPlaceList(doorplateAddress,
- null == size ? 10 : size,
- commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator()
- );
- }
-
- /**
- * 通过小区id 查询楼栋编码
- *
- * @param districtId
- * @return
- */
- @Override
- public List<DoorplateAddressVO> getHouseBuildingCode(String districtId) {
- return baseMapper.getHouseBuildingCode(districtId);
- }
-
- /**
- * 网格范围数据处理
- * @return
- */
- @Override
- public boolean gridRangeDataHandle(String townName,String communityName) {
- // 查询未匹配的网格范围地址信息
- // 查询总数
- Integer count = baseMapper.getNotBindGridRangeDoorListCount(townName,communityName);
- if (count > 0) {
- IGridRangeService gridRangeService = SpringUtils.getBean(IGridRangeService.class);
- int num = count / 1000;
- for (int i = 0; i <= num + 1; i++) {
- // 查询所有未匹配的网格范围地址数据
- List<DoorplateAddressEntity> list = baseMapper.getNotBindGridRangeDoorList(townName,communityName);
- // 需要新增的网格范围 list
- List<GridRangeEntity> gridRangeEntityList = new ArrayList<>();
- // 处理户室数据
- for (DoorplateAddressEntity doorplateAddressEntity : list) {
- // 查询是否已存在,存在就插入,不存在则插入
- QueryWrapper<GridRangeEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", doorplateAddressEntity.getAddressCode());
- GridRangeEntity one = gridRangeService.getOne(wrapper);
- if (null == one) {
- // 设置网格
- String point = "'POINT(" + doorplateAddressEntity.getX() + " " + doorplateAddressEntity.getY() + ")'";
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size()>0){
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setHouseCode(doorplateAddressEntity.getAddressCode());
- gridRangeEntity.setDistrictCode(doorplateAddressEntity.getAoiCode());
- gridRangeEntity.setBuilding(doorplateAddressEntity.getBuildingCode());
- GridEntity gridEntity = gridEntityList.get(0);
- gridRangeEntity.setGridId(gridEntity.getId());
- gridRangeEntity.setGridCode(gridEntity.getGridCode());
- // 加入集合
- gridRangeEntityList.add(gridRangeEntity);
- }
- }
- }
- // 批量插入
- gridRangeService.saveBatch(gridRangeEntityList);
- }
- }
- return false;
- }
-
- /**
- * 设置警格网格信息
- * @param doorplateAddressEntity
- */
- public void setGridInfo(DoorplateAddressEntity doorplateAddressEntity,GridRangeEntity gridRangeEntity) {
- // 根据位置设置网格,警格编号
-// IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
- String point = "'POINT(" + doorplateAddressEntity.getX() + " " + doorplateAddressEntity.getY() + ")'";
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size()>0){
- GridEntity gridEntity = gridEntityList.get(0);
- gridRangeEntity.setGridId(gridEntity.getId());
- gridRangeEntity.setGridCode(gridEntity.getGridCode());
- }
-// //点坐标解析警格
-// List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
-// if (policeAffairsGridEntityList.size()>0){
-// PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
-// backblastPubRecord.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
-// }
- }
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVO.java b/src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVO.java
deleted file mode 100644
index b9dfce8..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVO.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.springblade.modules.doorplateAddress.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.place.vo.PlaceVO;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 门牌地址表(总台账数据) 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DoorplateAddressVO extends DoorplateAddressEntity {
- private static final long serialVersionUID = 1L;
-
- private List<HouseRentalVO> houseRentalList = new ArrayList<>();
-
- private List<HouseholdVO> householdList = new ArrayList<>();
-
- private List<UserHouseLabelEntity> userHouseLabelVOList = new ArrayList<>();
-
- private PlaceVO place;
-
- //对应address_code
- private String stdId;
-
- /**
- * roleName
- */
- private String roleName;
-
- /**
- * 是否有权限 1:是 2:否
- */
- private Integer isJur;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 类型 1:房屋 2:场所 3:都是 4:都不是
- */
- private Integer addType;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVOTree.java b/src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVOTree.java
deleted file mode 100644
index aab8639..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVOTree.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.springblade.modules.doorplateAddress.vo;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tool.node.INode;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Data
-public class DoorplateAddressVOTree {
-
- private static final long serialVersionUID = 1L;
-
- private String name;
-
- private String code;
-
- private String parentCode;
-
- private List<DoorplateAddressVOTree> children;
-
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/vo/FuncNode.java b/src/main/java/org/springblade/modules/doorplateAddress/vo/FuncNode.java
deleted file mode 100644
index 2251b0c..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/vo/FuncNode.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.springblade.modules.doorplateAddress.vo;
-
-import lombok.Data;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-@Data
-public class FuncNode implements Serializable {
-
- private Long id;
-
- /**
- * 单元编号
- */
- private String unitCode;
-
- /**
- * 单元名称
- */
- private String unitName;
-
- /**
- * 楼层
- */
- private String floor;
-
- /**
- * 房间号
- */
- private String houseNo;
-
- /**
- * 门牌地址编码
- */
- private String addressCode;
-
- /**
- * 姓名
- */
- private String realName;
-
- /**
- * 角色
- */
- private String roleType;
-
- /**
- * 颜色(房屋标签对应的颜色)
- */
- private String houseColor;
-
- /**
- * 居住状态
- */
- private String residentialStatus;
-
- /**
- * 地址类型 1:小区 2:非小区 3:商超
- */
- private Integer addressType;
-
- /**
- * 排序
- */
- private Integer sort;
-
- /**
- * 子孙节点
- */
- private List<FuncNode> children = new ArrayList<>();
-
- /**
- * 标签
- */
- private List<HouseholdLabelVO> householdLabelList = new ArrayList<>();
-
-}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/wrapper/DoorplateAddressWrapper.java b/src/main/java/org/springblade/modules/doorplateAddress/wrapper/DoorplateAddressWrapper.java
deleted file mode 100644
index aafb197..0000000
--- a/src/main/java/org/springblade/modules/doorplateAddress/wrapper/DoorplateAddressWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.doorplateAddress.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
-
-import java.util.Objects;
-
-/**
- * 门牌地址表(总台账数据) 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class DoorplateAddressWrapper extends BaseEntityWrapper<DoorplateAddressEntity, DoorplateAddressVO> {
-
- public static DoorplateAddressWrapper build() {
- return new DoorplateAddressWrapper();
- }
-
- @Override
- public DoorplateAddressVO entityVO(DoorplateAddressEntity doorplateAddress) {
- DoorplateAddressVO doorplateAddressVO = Objects.requireNonNull(BeanUtil.copy(doorplateAddress, DoorplateAddressVO.class));
-
- //User createUser = UserCache.getUser(doorplateAddress.getCreateUser());
- //User updateUser = UserCache.getUser(doorplateAddress.getUpdateUser());
- //doorplateAddressVO.setCreateUserName(createUser.getName());
- //doorplateAddressVO.setUpdateUserName(updateUser.getName());
-
- return doorplateAddressVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/email/config/MailProperties.java b/src/main/java/org/springblade/modules/email/config/MailProperties.java
deleted file mode 100644
index 6796a3b..0000000
--- a/src/main/java/org/springblade/modules/email/config/MailProperties.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.springblade.modules.email.config;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * @author crush
- */
-@Data
-@Component
-@ConfigurationProperties(prefix = "spring.mail")
-public class MailProperties {
- /** * 用户名 */
- private String username;
- /** * 授权码 */
- private String password;
- /** * host */
- private String host;
- /** * 端口 */
- private Integer port;
- /*** 协议 */
- private String protocol;
- /** * 默认编码*/
- private String defaultEncoding;
-}
diff --git a/src/main/java/org/springblade/modules/email/config/MailSenderConfig.java b/src/main/java/org/springblade/modules/email/config/MailSenderConfig.java
deleted file mode 100644
index 9491222..0000000
--- a/src/main/java/org/springblade/modules/email/config/MailSenderConfig.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.springblade.modules.email.config;
-
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.modules.email.mapper.EmailMapper;
-import org.springframework.mail.javamail.JavaMailSenderImpl;
-import org.springframework.stereotype.Component;
-
-import javax.mail.*;
-import java.security.Security;
-import java.util.List;
-import java.util.Properties;
-
-@Slf4j
-@Component
-@AllArgsConstructor
-public class MailSenderConfig {
-
- private final MailProperties mailProperties;
-
- private final EmailMapper emailMapper;
-
- /**
- * 初始化 sender
- * PostConstruct注解用于需要在依赖注入完成后执行任何初始化的方法。 必须在类投入使用之前调用此方法
- * 因为刚开始我觉得这种方式(@PostConstruct) 不合适,就是没能做到修改了马上就能用的那种感觉。
- * 但是后来写完才发现,其实只要每次添加新的邮件发送人时,都重新初始化一次就可以了。
- * 后来我又用启动事件监听器。@PostConstruct 后来就没去测试了。
- * 理论添加、修改完 调用这个初始化方法就可以了。
- */
-// @PostConstruct
- public JavaMailSenderImpl buildMailSender() {
- log.info("初始化mailSender");
-
- //获取数据库中启用的邮件配置
- EmailEntity params = new EmailEntity();
- params.setStatus(2);
- params.setEmailType("1");
-
- EmailEntity email = emailMapper.selectOne(Condition.getQueryWrapper(params));
- JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl();
-
- //如果数据库中没有配置邮件,则使用默认的邮件配置
- if(email != null){
- javaMailSender.setDefaultEncoding(email.getDefaultEncoding());
- javaMailSender.setHost(email.getHost());
- javaMailSender.setPort(email.getPort());
- javaMailSender.setProtocol(email.getProtocol());
- javaMailSender.setUsername(email.getUsername());
- javaMailSender.setPassword(email.getPassword());
- }
- else{
- javaMailSender.setDefaultEncoding(mailProperties.getDefaultEncoding());
- javaMailSender.setHost(mailProperties.getHost());
- javaMailSender.setPort(mailProperties.getPort());
- javaMailSender.setProtocol(mailProperties.getProtocol());
- javaMailSender.setUsername(mailProperties.getUsername());
- javaMailSender.setPassword(mailProperties.getPassword());
- }
- return javaMailSender;
-
-
- }
-
- /**
- *
- * @return
- * @throws MessagingException
- */
- public Store buildMailReceive() throws MessagingException {
- log.info("初始化mailReceive");
-
- //获取数据库中启用的邮件配置
- EmailEntity params = new EmailEntity();
- params.setStatus(2);
- params.setEmailType("2");
-
- EmailEntity email = emailMapper.selectOne(Condition.getQueryWrapper(params));
-
- Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
- final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";//ssl加密
-
- //有些参数可能不需要
- Properties props = new Properties();
- props.setProperty("mail.imap.socketFactory.class", SSL_FACTORY);
- props.setProperty("mail.imap.socketFactory.fallback", "false");
- props.setProperty("mail.transport.protocol", email.getProtocol()); // 使用的协议
- props.setProperty("mail.imap.port", email.getPort().toString());
- props.setProperty("mail.imap.socketFactory.port", email.getPort().toString());
-
- //创建会话
- Session session = Session.getInstance(props, new Authenticator() {
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(email.getUsername(),email.getPassword());
- }
- });
- //存储对象
- Store store = session.getStore("imap");
- //连接
- store.connect("imap.qq.com",email.getPort(),email.getUsername(),email.getPassword());
- return store;
-
-
- }
-
- /**
- * 获取MailSender
- *
- * @return CustomMailSender
- */
- public JavaMailSenderImpl getSender() {
- return buildMailSender();
- }
-
-
- /**
- * 获取MailSender
- *
- * @return CustomMailSender
- */
- public Store getReceive() throws MessagingException {
- return buildMailReceive();
- }
-}
diff --git a/src/main/java/org/springblade/modules/email/config/StartListener.java b/src/main/java/org/springblade/modules/email/config/StartListener.java
deleted file mode 100644
index e2fd1f2..0000000
--- a/src/main/java/org/springblade/modules/email/config/StartListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.springblade.modules.email.config;
-
-import groovyjarjarantlr4.v4.runtime.misc.NotNull;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.boot.context.event.ApplicationStartedEvent;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.Ordered;
-import org.springframework.core.annotation.Order;
-
-@Slf4j
-@Configuration
-@Order(Ordered.HIGHEST_PRECEDENCE)
-public class StartListener implements ApplicationListener<ApplicationStartedEvent> {
-
- MailSenderConfig mailSenderConfig;
-
- public StartListener(MailSenderConfig mailSenderConfig) {
- this.mailSenderConfig = mailSenderConfig;
- }
-
- @SneakyThrows
- @Override
- public void onApplicationEvent(@NotNull ApplicationStartedEvent event) {
- this.mailSenderConfig.buildMailSender();
- }
-}
diff --git a/src/main/java/org/springblade/modules/email/config/ThreadPoolTaskExecutorConfig.java b/src/main/java/org/springblade/modules/email/config/ThreadPoolTaskExecutorConfig.java
deleted file mode 100644
index 0158795..0000000
--- a/src/main/java/org/springblade/modules/email/config/ThreadPoolTaskExecutorConfig.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.springblade.modules.email.config;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.task.TaskExecutor;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-
-import java.util.concurrent.ThreadPoolExecutor;
-
-@Configuration
-@EnableAsync // 开启异步配置
-public class ThreadPoolTaskExecutorConfig {
-
- @Bean
- public TaskExecutor taskExecutor() {
- ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
- //设置核心线程数
- executor.setCorePoolSize(10);
- //设置最大线程数
- executor.setMaxPoolSize(20);
- //缓冲队列200:用来缓冲执行任务的队列
- executor.setQueueCapacity(200);
- //线程活路时间 60 秒
- executor.setKeepAliveSeconds(60);
- //线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
- executor.setThreadNamePrefix("taskExecutor-");
- //设置拒绝策略
- executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
- executor.setWaitForTasksToCompleteOnShutdown(true);
- return executor;
- }
-}
diff --git a/src/main/java/org/springblade/modules/email/controller/EmailController.java b/src/main/java/org/springblade/modules/email/controller/EmailController.java
deleted file mode 100644
index 3394bdc..0000000
--- a/src/main/java/org/springblade/modules/email/controller/EmailController.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.springblade.modules.email.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.email.entity.EmailAccount;
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.modules.email.service.IEmailAccountService;
-import org.springblade.modules.email.service.IEmailService;
-import org.springblade.modules.email.vo.EmailVO;
-import org.springblade.modules.email.wrapper.EmailWrapper;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.validation.Valid;
-
-import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
-
-@NonDS
-@RestController
-@RequestMapping("/blade-email/email")
-@AllArgsConstructor
-@Api(value = "邮件设置", tags = "邮件表接口")
-public class EmailController extends BladeController {
-
- private final IEmailAccountService emailAccountService;
-
- private final IEmailService emailService;
-
- /**
- * 邮件配置 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入email")
- public R<EmailVO> detail(EmailEntity email) {
- EmailEntity detail = emailService.getOne(Condition.getQueryWrapper(email));
- return R.data(EmailWrapper.build().entityVO(detail));
- }
- /**
- * 邮件配置 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入email")
- public R<IPage<EmailVO>> list(EmailEntity email, Query query) {
- IPage<EmailEntity> pages = emailService.page(Condition.getPage(query), Condition.getQueryWrapper(email));
- return R.data(EmailWrapper.build().pageVO(pages));
- }
-
- /**
- * 邮件配置 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入email")
- public R<IPage<EmailVO>> page(EmailVO email, Query query) {
- IPage<EmailVO> pages = emailService.selectEmailPage(Condition.getPage(query), email);
- return R.data(pages);
- }
-
- /**
- * 邮件配置 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入email")
- public R save(@Valid @RequestBody EmailEntity email) {
- return R.status(emailService.save(email));
- }
-
- /**
- * 邮件配置 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入email")
- public R update(@Valid @RequestBody EmailEntity email) {
- return R.status(emailService.updateById(email));
- }
-
- /**
- * 邮件配置 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入email")
- public R submit(@Valid @RequestBody EmailEntity email) {
- return R.status(emailService.saveOrUpdate(email));
- }
-
- /**
- * 邮件配置 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(emailService.deleteLogic(Func.toLongList(ids)));
- }
-
- /**
- * 启用
- */
- @PostMapping("/enable")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "配置启用", notes = "传入id")
- public R enable(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
- return R.status(emailService.enable(id));
- }
-
-
-
- @PostMapping("/sendEmail")
- public R sendEmail( EmailAccount emailAccount){
- emailAccountService.senderEmail(emailAccount);
- return R.success("发送成功");
- }
-}
diff --git a/src/main/java/org/springblade/modules/email/controller/EmailTemplateController.java b/src/main/java/org/springblade/modules/email/controller/EmailTemplateController.java
deleted file mode 100644
index 4e4a6c4..0000000
--- a/src/main/java/org/springblade/modules/email/controller/EmailTemplateController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import org.springblade.modules.email.vo.EmailTemplateVO;
-import org.springblade.modules.email.wrapper.EmailTemplateWrapper;
-import org.springblade.modules.email.service.IEmailTemplateService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 邮件模版表 控制器
- *
- * @author BladeX
- * @since 2024-03-04
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-email/emailTemplate")
-@Api(value = "邮件模版表", tags = "邮件模版表接口")
-public class EmailTemplateController extends BladeController {
-
- private final IEmailTemplateService emailTemplateService;
-
- /**
- * 邮件模版表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入emailTemplate")
- public R<EmailTemplateVO> detail(EmailTemplateEntity emailTemplate) {
- EmailTemplateEntity detail = emailTemplateService.getOne(Condition.getQueryWrapper(emailTemplate));
- return R.data(EmailTemplateWrapper.build().entityVO(detail));
- }
- /**
- * 邮件模版表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入emailTemplate")
- public R<IPage<EmailTemplateVO>> list(EmailTemplateEntity emailTemplate, Query query) {
- IPage<EmailTemplateEntity> pages = emailTemplateService.page(Condition.getPage(query), Condition.getQueryWrapper(emailTemplate));
- return R.data(EmailTemplateWrapper.build().pageVO(pages));
- }
-
- /**
- * 邮件模版表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入emailTemplate")
- public R<IPage<EmailTemplateVO>> page(EmailTemplateVO emailTemplate, Query query) {
- IPage<EmailTemplateVO> pages = emailTemplateService.selectEmailTemplatePage(Condition.getPage(query), emailTemplate);
- return R.data(pages);
- }
-
- /**
- * 邮件模版表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入emailTemplate")
- public R save(@Valid @RequestBody EmailTemplateEntity emailTemplate) {
- return R.status(emailTemplateService.save(emailTemplate));
- }
-
- /**
- * 邮件模版表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入emailTemplate")
- public R update(@Valid @RequestBody EmailTemplateEntity emailTemplate) {
- return R.status(emailTemplateService.updateById(emailTemplate));
- }
-
- /**
- * 邮件模版表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入emailTemplate")
- public R submit(@Valid @RequestBody EmailTemplateEntity emailTemplate) {
- return R.status(emailTemplateService.saveOrUpdate(emailTemplate));
- }
-
- /**
- * 邮件模版表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(emailTemplateService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/email/dto/EmailTemplateDTO.java b/src/main/java/org/springblade/modules/email/dto/EmailTemplateDTO.java
deleted file mode 100644
index 2677b0a..0000000
--- a/src/main/java/org/springblade/modules/email/dto/EmailTemplateDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.dto;
-
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 邮件模版表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class EmailTemplateDTO extends EmailTemplateEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/email/entity/EmailAccount.java b/src/main/java/org/springblade/modules/email/entity/EmailAccount.java
deleted file mode 100644
index b6f6ba7..0000000
--- a/src/main/java/org/springblade/modules/email/entity/EmailAccount.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.email.entity;
-
-import lombok.Data;
-
-import java.util.List;
-
-@Data
-public class EmailAccount {
-
- //主题
- private String subject;
-
- //内容
- private String content;
-
-
- private List<String> emails;
-}
diff --git a/src/main/java/org/springblade/modules/email/entity/EmailEntity.java b/src/main/java/org/springblade/modules/email/entity/EmailEntity.java
deleted file mode 100644
index 2bc1591..0000000
--- a/src/main/java/org/springblade/modules/email/entity/EmailEntity.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-/**
- * 邮件配置 实体类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-@Data
-@TableName("blade_email")
-@ApiModel(value = "Email对象", description = "邮件配置")
-@EqualsAndHashCode(callSuper = true)
-public class EmailEntity extends TenantEntity {
-
- /**
- * 发送者邮箱
- */
- @ApiModelProperty(value = "发送者邮箱")
- private String username;
- /**
- * 授权码
- */
- @ApiModelProperty(value = "授权码")
- private String password;
- /**
- * 服务器地址
- */
- @ApiModelProperty(value = "服务器地址")
- private String host;
- /**
- * 端口号
- */
- @ApiModelProperty(value = "端口号")
- private Integer port;
- /**
- * 默认编码
- */
- @ApiModelProperty(value = "默认编码(默认UTF-8)")
- private String defaultEncoding;
- /**
- * 协议(默认stmp)
- */
- @ApiModelProperty(value = "协议(默认stmps)")
- private String protocol;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- @ApiModelProperty(value = "1:发送配置 2:接收配置")
- private String emailType;
-
-}
diff --git a/src/main/java/org/springblade/modules/email/entity/EmailTemplateEntity.java b/src/main/java/org/springblade/modules/email/entity/EmailTemplateEntity.java
deleted file mode 100644
index 04faaff..0000000
--- a/src/main/java/org/springblade/modules/email/entity/EmailTemplateEntity.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 邮件模版表 实体类
- *
- * @author BladeX
- * @since 2024-03-04
- */
-@Data
-@TableName("blade_email_template")
-@ApiModel(value = "EmailTemplate对象", description = "邮件模版表")
-public class EmailTemplateEntity{
-
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 标题 */
- @ApiModelProperty(value = "标题", example = "")
- @TableField("title")
- private String title;
-
- /** 邮件内容 */
- @ApiModelProperty(value = "邮件内容", example = "")
- @TableField("content")
- private String content;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 是否已删除 */
- @ApiModelProperty(value = "是否已删除", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_by")
- private Long createBy;
-}
diff --git a/src/main/java/org/springblade/modules/email/mapper/EmailMapper.java b/src/main/java/org/springblade/modules/email/mapper/EmailMapper.java
deleted file mode 100644
index 8481428..0000000
--- a/src/main/java/org/springblade/modules/email/mapper/EmailMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.mapper;
-
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.modules.email.vo.EmailVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 邮件配置 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-18
- */
-public interface EmailMapper extends BaseMapper<EmailEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param email
- * @return
- */
- List<EmailVO> selectEmailPage(IPage page, EmailVO email);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/email/mapper/EmailMapper.xml b/src/main/java/org/springblade/modules/email/mapper/EmailMapper.xml
deleted file mode 100644
index 6f9abe2..0000000
--- a/src/main/java/org/springblade/modules/email/mapper/EmailMapper.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.email.mapper.EmailMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="emailResultMap" type="org.springblade.modules.email.entity.EmailEntity">
- <result column="id" property="id"/>
- <result column="username" property="username"/>
- <result column="password" property="password"/>
- <result column="host" property="host"/>
- <result column="port" property="port"/>
- <result column="default_encoding" property="defaultEncoding"/>
- <result column="protocol" property="protocol"/>
- <result column="remark" property="remark"/>
- <result column="tenant_id" property="tenantId"/>
- <result column="create_user" property="createUser"/>
- <result column="create_dept" property="createDept"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="status" property="status"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
-
- <select id="selectEmailPage" resultMap="emailResultMap">
- select * from blade_email where is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.java b/src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.java
deleted file mode 100644
index 37ade8c..0000000
--- a/src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.email.dto.EmailTemplateDTO;
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import org.springblade.modules.email.vo.EmailTemplateVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 邮件模版表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-04
- */
-public interface EmailTemplateMapper extends BaseMapper<EmailTemplateEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param emailTemplate
- * @return
- */
- List<EmailTemplateVO> selectEmailTemplatePage(IPage page, @Param("emailTemplate") EmailTemplateVO emailTemplate);
-
-
- /**
- * 查询
- *
- * @param id ID
- * @return
- */
- public EmailTemplateDTO selectBladeEmailTemplateById(Integer id);
-
- /**
- * 查询列表
- *
- * @param bladeEmailTemplateDTO
- * @return 集合
- */
- public List<EmailTemplateDTO> selectBladeEmailTemplateList(EmailTemplateDTO bladeEmailTemplateDTO);
-}
diff --git a/src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.xml b/src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.xml
deleted file mode 100644
index 29c4dcb..0000000
--- a/src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.email.mapper.EmailTemplateMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="emailTemplateResultMap" type="org.springblade.modules.email.entity.EmailTemplateEntity">
- </resultMap>
-
-
- <select id="selectEmailTemplatePage" resultMap="emailTemplateResultMap">
- select * from blade_email_template
- <where>
- <if test="emailTemplate.id != null ">and id = #{emailTemplate.id}</if>
- <if test="emailTemplate.title != null and emailTemplate.title != ''">and title like CONCAT('%', #{emailTemplate.title},'%')</if>
- <if test="emailTemplate.content != null and emailTemplate.content != ''">and content = #{emailTemplate.content}</if>
- <if test="emailTemplate.createTime != null ">and create_time = #{emailTemplate.createTime}</if>
- <if test="emailTemplate.updateTime != null ">and update_time = #{emailTemplate.updateTime}</if>
- <if test="emailTemplate.isDeleted != null ">and is_deleted = #{emailTemplate.isDeleted}</if>
- <if test="emailTemplate.createBy != null ">and create_by = #{emailTemplate.createBy}</if>
- and is_deleted = 0
- </where>
- </select>
-
- <resultMap type="org.springblade.modules.email.dto.EmailTemplateDTO" id="BladeEmailTemplateDTOResult">
- <result property="id" column="id"/>
- <result property="title" column="title"/>
- <result property="content" column="content"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="isDeleted" column="is_deleted"/>
- <result property="createBy" column="create_by"/>
- </resultMap>
-
- <sql id="selectBladeEmailTemplate">
- select id,
- title,
- content,
- create_time,
- update_time,
- is_deleted,
- create_by
- from blade_email_template
- </sql>
-
- <select id="selectBladeEmailTemplateById" parameterType="int" resultMap="BladeEmailTemplateDTOResult">
- <include refid="selectBladeEmailTemplate"/>
- where
- id = #{id}
- </select>
-
- <select id="selectBladeEmailTemplateList" parameterType="org.springblade.modules.email.dto.EmailTemplateDTO"
- resultMap="BladeEmailTemplateDTOResult">
- <include refid="selectBladeEmailTemplate"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="title != null and title != ''">and title = #{title}</if>
- <if test="content != null and content != ''">and content = #{content}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- <if test="isDeleted != null ">and is_deleted = #{isDeleted}</if>
- <if test="createBy != null ">and create_by = #{createBy}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/email/service/IEmailAccountService.java b/src/main/java/org/springblade/modules/email/service/IEmailAccountService.java
deleted file mode 100644
index 06cddbc..0000000
--- a/src/main/java/org/springblade/modules/email/service/IEmailAccountService.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.email.service;
-
-import org.springblade.modules.email.entity.EmailAccount;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-
-import javax.mail.MessagingException;
-import java.util.List;
-
-public interface IEmailAccountService {
-
- /**用于注册成功后发送邮件 @param account 账号信息*/
- Boolean senderEmail(EmailAccount account);
-
- Boolean sendMessageUserEmail(String title, String content, List<MessageUser> messageUserList);
-
- List<MessageRecordVO> getUnreadList() throws MessagingException;
-}
diff --git a/src/main/java/org/springblade/modules/email/service/IEmailService.java b/src/main/java/org/springblade/modules/email/service/IEmailService.java
deleted file mode 100644
index 358fbf0..0000000
--- a/src/main/java/org/springblade/modules/email/service/IEmailService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.service;
-
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.modules.email.vo.EmailVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 邮件配置 服务类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-public interface IEmailService extends BaseService<EmailEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param email
- * @return
- */
- IPage<EmailVO> selectEmailPage(IPage<EmailVO> page, EmailVO email);
-
-
- boolean enable(Long id);
-}
diff --git a/src/main/java/org/springblade/modules/email/service/IEmailTemplateService.java b/src/main/java/org/springblade/modules/email/service/IEmailTemplateService.java
deleted file mode 100644
index 142069d..0000000
--- a/src/main/java/org/springblade/modules/email/service/IEmailTemplateService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.email.dto.EmailTemplateDTO;
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import org.springblade.modules.email.vo.EmailTemplateVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 邮件模版表 服务类
- *
- * @author BladeX
- * @since 2024-03-04
- */
-public interface IEmailTemplateService extends IService<EmailTemplateEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param emailTemplate
- * @return
- */
- IPage<EmailTemplateVO> selectEmailTemplatePage(IPage<EmailTemplateVO> page, EmailTemplateVO emailTemplate);
- /**
- * 查询
- *
- * @param id ID
- * @return
- */
- public EmailTemplateDTO selectBladeEmailTemplateById(Integer id);
-
- /**
- * 查询列表
- *
- * @param bladeEmailTemplateDTO
- * @return 集合
- */
- public List<EmailTemplateDTO> selectBladeEmailTemplateList(EmailTemplateDTO bladeEmailTemplateDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/email/service/impl/EmailAccountServiceImpl.java b/src/main/java/org/springblade/modules/email/service/impl/EmailAccountServiceImpl.java
deleted file mode 100644
index bec5ba0..0000000
--- a/src/main/java/org/springblade/modules/email/service/impl/EmailAccountServiceImpl.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package org.springblade.modules.email.service.impl;
-
-import com.sun.mail.imap.IMAPFolder;
-import com.sun.mail.imap.IMAPStore;
-import com.xxl.job.core.util.DateUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.utils.ParseMail;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.email.config.MailProperties;
-import org.springblade.modules.email.config.MailSenderConfig;
-import org.springblade.modules.email.entity.EmailAccount;
-import org.springblade.modules.email.service.IEmailAccountService;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.mail.javamail.JavaMailSenderImpl;
-import org.springframework.mail.javamail.MimeMessageHelper;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import javax.mail.*;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeUtility;
-import javax.mail.search.FlagTerm;
-import java.io.File;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.stream.Collectors;
-
-@Service
-@Slf4j
-public class EmailAccountServiceImpl implements IEmailAccountService {
-
- private static Logger logger = LoggerFactory.getLogger(EmailAccountServiceImpl.class);
-
- @Autowired
- MailSenderConfig senderConfig;
-
- @Autowired
- MailProperties mailProperties;
-
-
- @Override
- public Boolean senderEmail(EmailAccount account) {
-
- if (account.getEmails().size() > 0) {
- log.info(Thread.currentThread().getName());
- JavaMailSenderImpl javaMailSender = senderConfig.getSender();
- //一个复杂的邮件
- MimeMessage message = javaMailSender.createMimeMessage();
- try {
- //组装
- MimeMessageHelper helper = new MimeMessageHelper(message, true);
-
- //主题(标题)
- helper.setSubject(account.getSubject());
-
- helper.setText(account.getContent(), true);
-
- helper.setTo(account.getEmails().toArray(new String[account.getEmails().size()]));
-
- helper.setFrom(javaMailSender.getUsername());
-
- javaMailSender.send(message);
- return true;
-
- } catch (MessagingException e) {
- logger.error("邮件发送失败!", e);
- return false;
- }
- }
- return false;
- }
-
- @Override
- public Boolean sendMessageUserEmail(String title, String content, List<MessageUser> messageUserList) {
-
- List<String> emails = messageUserList.stream().filter(e -> StringUtil.isNotBlank(e.getEmail())).map(MessageUser::getEmail).collect(Collectors.toList());
-
- EmailAccount emailAccount = new EmailAccount();
-
- emailAccount.setEmails(emails);
- emailAccount.setSubject(title);
- emailAccount.setContent(content);
-
- return senderEmail(emailAccount);
- }
-
-
- @Override
- public List<MessageRecordVO> getUnreadList() throws MessagingException {
- Folder folder = null;
- Store store = senderConfig.getReceive();
- List<MessageRecordVO> MessageRecordVOList = new ArrayList<>();
- try {
- // 获得收件箱
- folder = store.getFolder("INBOX");
- // 以读写模式打开收件箱
- folder.open(Folder.READ_WRITE);
- //false 表示未读
- FlagTerm flagTerm = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
- //获得收件箱的邮件列表
- Message[] messages = folder.search(flagTerm);
- // 打印不同状态的邮件数量
- System.out.println("收件箱中共" + messages.length + "封邮件!");
- System.out.println("收件箱中共" + folder.getUnreadMessageCount() + "封未读邮件!");
- System.out.println("收件箱中共" + folder.getNewMessageCount() + "封新邮件!");
- System.out.println("收件箱中共" + folder.getDeletedMessageCount() + "封已删除邮件!");
-
- System.out.println("------------------------开始解析邮件----------------------------------");
-// ParseMail.getMailTextContent(messages.)
- StringBuffer content = new StringBuffer(30);
-
-// for (int i = 0; i < messages.length; i++) {
-// System.out.println("消息:"+messages[i].getSubject());
-// String from = MimeUtility.decodeText(messages[i].getFrom()[0].toString());
-// InternetAddress internetAddress = new InternetAddress(from);
-// System.out.println("发件人:" + internetAddress.getPersonal() + '(' + internetAddress.getAddress() + ')');
-// }
- for (Message message : messages) {
-
- ParseMail.getMailTextContent(message, content);
-
- MessageRecordVO messageRecordVO = new MessageRecordVO();
- String from = MimeUtility.decodeText(message.getFrom()[0].toString());
- InternetAddress ia = new InternetAddress(from);
-
- System.out.println("发件人:" + ia.getPersonal() + '(' + ia.getAddress() + ')');
- System.out.println("主题:" + message.getSubject());
- System.out.println("主题fa:" + message.getFlags());
- if (message.getSentDate() != null) {
- System.out.println("邮件发送时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(message.getSentDate()));
- }
- System.out.println("-------------------------------------------\n");
-// message.setFlag(Flags.Flag.SEEN, true);
- messageRecordVO.setTitle(message.getSubject());
- if (message.getSentDate() != null) {
- messageRecordVO.setStartTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(message.getSentDate()));
- }
- messageRecordVO.setUserName(ia.getPersonal() + '(' + ia.getAddress() + ')');
- messageRecordVO.setContent(String.valueOf(content));
- MessageRecordVOList.add(messageRecordVO);
- }
- return MessageRecordVOList;
-
- } catch (NoSuchProviderException e) {
- e.printStackTrace();
- } catch (MessagingException e) {
- e.printStackTrace();
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- if (folder != null) {
- folder.close(false);
- }
- if (store != null) {
- store.close();
- }
- } catch (MessagingException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
-}
diff --git a/src/main/java/org/springblade/modules/email/service/impl/EmailServiceImpl.java b/src/main/java/org/springblade/modules/email/service/impl/EmailServiceImpl.java
deleted file mode 100644
index 6fc7d99..0000000
--- a/src/main/java/org/springblade/modules/email/service/impl/EmailServiceImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.modules.email.vo.EmailVO;
-import org.springblade.modules.email.mapper.EmailMapper;
-import org.springblade.modules.email.service.IEmailService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.resource.entity.Oss;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * 邮件配置 服务实现类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-@Service
-public class EmailServiceImpl extends BaseServiceImpl<EmailMapper, EmailEntity> implements IEmailService {
-
- @Override
- public IPage<EmailVO> selectEmailPage(IPage<EmailVO> page, EmailVO email) {
- return page.setRecords(baseMapper.selectEmailPage(page, email));
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean enable(Long id) {
- // 先禁用
- boolean temp1 = this.update(Wrappers.<EmailEntity>update().lambda().set(EmailEntity::getStatus, 1));
- // 在启用
- boolean temp2 = this.update(Wrappers.<EmailEntity>update().lambda().set(EmailEntity::getStatus, 2).eq(EmailEntity::getId, id));
- return temp1 && temp2;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/email/service/impl/EmailTemplateServiceImpl.java b/src/main/java/org/springblade/modules/email/service/impl/EmailTemplateServiceImpl.java
deleted file mode 100644
index 76a7a9a..0000000
--- a/src/main/java/org/springblade/modules/email/service/impl/EmailTemplateServiceImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.email.dto.EmailTemplateDTO;
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import org.springblade.modules.email.vo.EmailTemplateVO;
-import org.springblade.modules.email.mapper.EmailTemplateMapper;
-import org.springblade.modules.email.service.IEmailTemplateService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 邮件模版表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-04
- */
-@Service
-public class EmailTemplateServiceImpl extends ServiceImpl<EmailTemplateMapper, EmailTemplateEntity> implements IEmailTemplateService {
-
- @Override
- public IPage<EmailTemplateVO> selectEmailTemplatePage(IPage<EmailTemplateVO> page, EmailTemplateVO emailTemplate) {
- return page.setRecords(baseMapper.selectEmailTemplatePage(page, emailTemplate));
- }
-
- /**
- * 查询
- *
- * @param id ID
- * @return
- */
- @Override
- public EmailTemplateDTO selectBladeEmailTemplateById(Integer id)
- {
- return this.baseMapper.selectBladeEmailTemplateById(id);
- }
-
- /**
- * 查询列表
- *
- * @param bladeEmailTemplateDTO
- * @return 集合
- */
- @Override
- public List<EmailTemplateDTO> selectBladeEmailTemplateList(EmailTemplateDTO bladeEmailTemplateDTO)
- {
- return this.baseMapper.selectBladeEmailTemplateList(bladeEmailTemplateDTO);
- }
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/email/vo/EmailTemplateVO.java b/src/main/java/org/springblade/modules/email/vo/EmailTemplateVO.java
deleted file mode 100644
index aa10266..0000000
--- a/src/main/java/org/springblade/modules/email/vo/EmailTemplateVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.vo;
-
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 邮件模版表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class EmailTemplateVO extends EmailTemplateEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/email/vo/EmailVO.java b/src/main/java/org/springblade/modules/email/vo/EmailVO.java
deleted file mode 100644
index cad0b24..0000000
--- a/src/main/java/org/springblade/modules/email/vo/EmailVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.vo;
-
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 邮件模版表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class EmailVO extends EmailEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/email/wrapper/EmailTemplateWrapper.java b/src/main/java/org/springblade/modules/email/wrapper/EmailTemplateWrapper.java
deleted file mode 100644
index 56f5aae..0000000
--- a/src/main/java/org/springblade/modules/email/wrapper/EmailTemplateWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.email.entity.EmailTemplateEntity;
-import org.springblade.modules.email.vo.EmailTemplateVO;
-import java.util.Objects;
-
-/**
- * 邮件模版表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-04
- */
-public class EmailTemplateWrapper extends BaseEntityWrapper<EmailTemplateEntity, EmailTemplateVO> {
-
- public static EmailTemplateWrapper build() {
- return new EmailTemplateWrapper();
- }
-
- @Override
- public EmailTemplateVO entityVO(EmailTemplateEntity emailTemplate) {
- EmailTemplateVO emailTemplateVO = Objects.requireNonNull(BeanUtil.copy(emailTemplate, EmailTemplateVO.class));
-
- //User createUser = UserCache.getUser(emailTemplate.getCreateUser());
- //User updateUser = UserCache.getUser(emailTemplate.getUpdateUser());
- //emailTemplateVO.setCreateUserName(createUser.getName());
- //emailTemplateVO.setUpdateUserName(updateUser.getName());
-
- return emailTemplateVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/email/wrapper/EmailWrapper.java b/src/main/java/org/springblade/modules/email/wrapper/EmailWrapper.java
deleted file mode 100644
index 69121d5..0000000
--- a/src/main/java/org/springblade/modules/email/wrapper/EmailWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.email.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.email.entity.EmailEntity;
-import org.springblade.modules.email.vo.EmailVO;
-import java.util.Objects;
-
-/**
- * 邮件模版表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-04
- */
-public class EmailWrapper extends BaseEntityWrapper<EmailEntity, EmailVO> {
-
- public static EmailWrapper build() {
- return new EmailWrapper();
- }
-
- @Override
- public EmailVO entityVO(EmailEntity emailTemplate) {
- EmailVO emailTemplateVO = Objects.requireNonNull(BeanUtil.copy(emailTemplate, EmailVO.class));
-
- //User createUser = UserCache.getUser(emailTemplate.getCreateUser());
- //User updateUser = UserCache.getUser(emailTemplate.getUpdateUser());
- //emailTemplateVO.setCreateUserName(createUser.getName());
- //emailTemplateVO.setUpdateUserName(updateUser.getName());
-
- return emailTemplateVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/controller/GridController.java b/src/main/java/org/springblade/modules/grid/controller/GridController.java
deleted file mode 100644
index b93abe5..0000000
--- a/src/main/java/org/springblade/modules/grid/controller/GridController.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.grid.excel.GridExcel;
-import org.springblade.modules.grid.excel.GridImporter;
-import org.springblade.modules.system.excel.UserExcel;
-import org.springblade.modules.system.excel.UserImporter;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.modules.grid.wrapper.GridWrapper;
-import org.springblade.modules.grid.service.IGridService;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 网格表 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-grid/grid")
-@Api(value = "网格表", tags = "网格表接口")
-public class GridController{
-
- private final IGridService gridService;
-
- /**
- * 网格表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入grid")
- public R<GridVO> detail(GridEntity grid) {
- GridEntity detail = gridService.getOne(Condition.getQueryWrapper(grid));
- return R.data(GridWrapper.build().entityVO(detail));
- }
-
- /**
- * 网格表 自定义详情
- */
- @GetMapping("/getGridDetail")
- public R getGridDetail(GridVO grid) {
- return R.data(gridService.getGridDetail(grid));
- }
- /**
- * 网格表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入grid")
- public R<IPage<GridVO>> list(GridEntity grid, Query query) {
- IPage<GridEntity> pages = gridService.page(Condition.getPage(query), Condition.getQueryWrapper(grid));
- return R.data(GridWrapper.build().pageVO(pages));
- }
-
- /**
- * 网格表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入grid")
- public R<IPage<GridVO>> page(GridVO grid, Query query) {
- IPage<GridVO> pages = gridService.selectGridPage(Condition.getPage(query), grid);
- return R.data(pages);
- }
-
- /**
- * 网格表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入grid")
- public R save(@Valid @RequestBody GridEntity grid) {
- return R.status(gridService.save(grid));
- }
-
- /**
- * 网格表 自定义新增或修改
- */
- @PostMapping("/saveOrUpdate")
- public R saveOrUpdate(@Valid @RequestBody GridEntity grid) {
- return R.status(gridService.saveOrUpdateGrid(grid));
- }
-
- /**
- * 网格表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入grid")
- public R update(@Valid @RequestBody GridEntity grid) {
- return R.status(gridService.updateById(grid));
- }
-
- /**
- * 网格表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入grid")
- public R submit(@Valid @RequestBody GridEntity grid) {
- return R.status(gridService.saveOrUpdate(grid));
- }
-
- /**
- * 网格表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(gridService.removeByIds(Func.toIntList(ids)));
- }
-
- /**
- * 导入网格数据
- */
- @PostMapping("/import-grid")
- public R importGrid(MultipartFile file, Integer isCovered) {
- GridImporter gridImporter = new GridImporter(gridService, isCovered == 1);
- ExcelUtil.save(file, gridImporter, GridExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 空间分析
- */
- @GetMapping("/spatialAnalysis")
- public R spatialAnalysis(DoorplateAddressEntity addressEntity) {
- return R.data(gridService.spatialAnalysis(addressEntity));
- }
-
- /**
- * 网格数据同步处理
- */
- @GetMapping("/asyncGridDept")
- public R asyncGridDept() {
- return R.data(gridService.asyncGridDept());
- }
-
- /**
- * 网格树
- * @param grid
- * @return
- */
- @GetMapping("/getGridTree")
- public R getGridTree(GridVO grid) {
- return R.data(gridService.getGridTree(grid));
- }
-
- /**
- * 综治网格信息
- */
- @ApiOperation(value = "获取综治网格信息", notes = "传入houseCode")
- @GetMapping("/gridInfoByHouseCode")
- public R gridInfoByHouseCode( @RequestParam("houseCode") String houseCode) {
- return R.data(gridService.gridInfoByHouseCode(houseCode));
- }
-
-
- /**
- * 网格集合查询
- * @param grid
- * @return
- */
- @GetMapping("/getGridList")
- public R getGridList(GridVO grid) {
- return R.data(gridService.getGridList(grid));
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/controller/GridPatrolRecordController.java b/src/main/java/org/springblade/modules/grid/controller/GridPatrolRecordController.java
deleted file mode 100644
index 9b45436..0000000
--- a/src/main/java/org/springblade/modules/grid/controller/GridPatrolRecordController.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.modules.grid.vo.GridPatrolRecordVO;
-import org.springblade.modules.grid.wrapper.GridPatrolRecordWrapper;
-import org.springblade.modules.grid.service.IGridPatrolRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.Date;
-
-/**
- * 网格巡查记录表 控制器
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-gridPatrolRecord/gridPatrolRecord")
-@Api(value = "网格巡查记录表", tags = "网格巡查记录表接口")
-public class GridPatrolRecordController{
-
- private final IGridPatrolRecordService gridPatrolRecordService;
-
- /**
- * 网格巡查记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入gridPatrolRecord")
- public R<GridPatrolRecordVO> detail(GridPatrolRecordEntity gridPatrolRecord) {
- GridPatrolRecordEntity detail = gridPatrolRecordService.getOne(Condition.getQueryWrapper(gridPatrolRecord));
- return R.data(GridPatrolRecordWrapper.build().entityVO(detail));
- }
- /**
- * 网格巡查记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入gridPatrolRecord")
- public R<IPage<GridPatrolRecordVO>> list(GridPatrolRecordEntity gridPatrolRecord, Query query) {
- IPage<GridPatrolRecordEntity> pages = gridPatrolRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(gridPatrolRecord));
- return R.data(GridPatrolRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 网格巡查记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入gridPatrolRecord")
- public R<IPage<GridPatrolRecordVO>> page(GridPatrolRecordVO gridPatrolRecord, Query query) {
- IPage<GridPatrolRecordVO> pages = gridPatrolRecordService.selectGridPatrolRecordPage(Condition.getPage(query), gridPatrolRecord);
- return R.data(pages);
- }
-
- /**
- * 网格巡查记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入gridPatrolRecord")
- public R save(@Valid @RequestBody GridPatrolRecordEntity gridPatrolRecord) {
- gridPatrolRecord.setCreateTime(new Date());
- gridPatrolRecord.setCreateUser(AuthUtil.getUserId());
- return R.status(gridPatrolRecordService.save(gridPatrolRecord));
- }
-
- /**
- * 网格巡查记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入gridPatrolRecord")
- public R update(@Valid @RequestBody GridPatrolRecordEntity gridPatrolRecord) {
- return R.status(gridPatrolRecordService.updateById(gridPatrolRecord));
- }
-
- /**
- * 网格巡查记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入gridPatrolRecord")
- public R submit(@Valid @RequestBody GridPatrolRecordEntity gridPatrolRecord) {
- return R.status(gridPatrolRecordService.saveOrUpdate(gridPatrolRecord));
- }
-
- /**
- * 网格巡查记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(gridPatrolRecordService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/controller/GridRangeController.java b/src/main/java/org/springblade/modules/grid/controller/GridRangeController.java
deleted file mode 100644
index 555af96..0000000
--- a/src/main/java/org/springblade/modules/grid/controller/GridRangeController.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.vo.GridRangeVO;
-import org.springblade.modules.grid.wrapper.GridRangeWrapper;
-import org.springblade.modules.grid.service.IGridRangeService;
-
-/**
- * 网格范围表 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-gridRange/gridRange")
-@Api(value = "网格范围表", tags = "网格范围表接口")
-public class GridRangeController{
-
- private final IGridRangeService gridRangeService;
-
- /**
- * 网格范围表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入gridRange")
- public R<GridRangeVO> detail(GridRangeEntity gridRange) {
- GridRangeEntity detail = gridRangeService.getOne(Condition.getQueryWrapper(gridRange));
- return R.data(GridRangeWrapper.build().entityVO(detail));
- }
- /**
- * 网格范围表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入gridRange")
- public R<IPage<GridRangeVO>> list(GridRangeEntity gridRange, Query query) {
- IPage<GridRangeEntity> pages = gridRangeService.page(Condition.getPage(query), Condition.getQueryWrapper(gridRange));
- return R.data(GridRangeWrapper.build().pageVO(pages));
- }
-
- /**
- * 网格范围表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入gridRange")
- public R<IPage<GridRangeVO>> page(GridRangeVO gridRange, Query query) {
- IPage<GridRangeVO> pages = gridRangeService.selectGridRangePage(Condition.getPage(query), gridRange);
- return R.data(pages);
- }
-
- /**
- * 网格范围表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入gridRange")
- public R save(@Valid @RequestBody GridRangeEntity gridRange) {
- return R.status(gridRangeService.save(gridRange));
- }
-
- /**
- * 网格范围表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入gridRange")
- public R update(@Valid @RequestBody GridRangeEntity gridRange) {
- return R.status(gridRangeService.updateById(gridRange));
- }
-
- /**
- * 网格范围表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入gridRange")
- public R submit(@Valid @RequestBody GridRangeEntity gridRange) {
- return R.status(gridRangeService.saveOrUpdate(gridRange));
- }
-
- /**
- * 网格范围表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(gridRangeService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 网格范围表数据处理
- */
- @GetMapping("/dataHandle")
- public R dataHandle() {
- return R.data(gridRangeService.dataHandle());
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/controller/GridWorkLogController.java b/src/main/java/org/springblade/modules/grid/controller/GridWorkLogController.java
deleted file mode 100644
index db1dd22..0000000
--- a/src/main/java/org/springblade/modules/grid/controller/GridWorkLogController.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.modules.grid.vo.GridWorkLogVO;
-import org.springblade.modules.grid.wrapper.GridWorkLogWrapper;
-import org.springblade.modules.grid.service.IGridWorkLogService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.Date;
-
-/**
- * 网格工作日志表 控制器
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-gridWorkLog/gridWorkLog")
-@Api(value = "网格工作日志表", tags = "网格工作日志表接口")
-public class GridWorkLogController{
-
- private final IGridWorkLogService gridWorkLogService;
-
- /**
- * 网格工作日志表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入gridWorkLog")
- public R<GridWorkLogVO> detail(GridWorkLogEntity gridWorkLog) {
- GridWorkLogEntity detail = gridWorkLogService.getOne(Condition.getQueryWrapper(gridWorkLog));
- return R.data(GridWorkLogWrapper.build().entityVO(detail));
- }
- /**
- * 网格工作日志表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入gridWorkLog")
- public R<IPage<GridWorkLogVO>> list(GridWorkLogEntity gridWorkLog, Query query) {
- IPage<GridWorkLogEntity> pages = gridWorkLogService.page(Condition.getPage(query), Condition.getQueryWrapper(gridWorkLog));
- return R.data(GridWorkLogWrapper.build().pageVO(pages));
- }
-
- /**
- * 网格工作日志表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入gridWorkLog")
- public R<IPage<GridWorkLogVO>> page(GridWorkLogVO gridWorkLog, Query query) {
- IPage<GridWorkLogVO> pages = gridWorkLogService.selectGridWorkLogPage(Condition.getPage(query), gridWorkLog);
- return R.data(pages);
- }
-
- /**
- * 网格工作日志表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入gridWorkLog")
- public R save(@Valid @RequestBody GridWorkLogEntity gridWorkLog) {
- gridWorkLog.setCreateTime(new Date());
- gridWorkLog.setCreateUser(AuthUtil.getUserId());
- return R.status(gridWorkLogService.save(gridWorkLog));
- }
-
- /**
- * 网格工作日志表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入gridWorkLog")
- public R update(@Valid @RequestBody GridWorkLogEntity gridWorkLog) {
- return R.status(gridWorkLogService.updateById(gridWorkLog));
- }
-
- /**
- * 网格工作日志表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入gridWorkLog")
- public R submit(@Valid @RequestBody GridWorkLogEntity gridWorkLog) {
- return R.status(gridWorkLogService.saveOrUpdate(gridWorkLog));
- }
-
- /**
- * 网格工作日志表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(gridWorkLogService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/controller/GridmanController.java b/src/main/java/org/springblade/modules/grid/controller/GridmanController.java
deleted file mode 100644
index 2f1420e..0000000
--- a/src/main/java/org/springblade/modules/grid/controller/GridmanController.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.grid.excel.GridmanExcel;
-import org.springblade.modules.grid.excel.GridmanImporter;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.vo.GridmanVO;
-import org.springblade.modules.grid.wrapper.GridmanWrapper;
-import org.springblade.modules.grid.service.IGridmanService;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 网格员表 控制器
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-gridman/gridman")
-@Api(value = "网格员表", tags = "网格员表接口")
-public class GridmanController {
-
- private final IGridmanService gridmanService;
-
- /**
- * 网格员表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入gridman")
- public R<GridmanVO> detail(GridmanEntity gridman) {
- GridmanEntity detail = gridmanService.getOne(Condition.getQueryWrapper(gridman));
- return R.data(GridmanWrapper.build().entityVO(detail));
- }
-
- /**
- * 网格员表 自定义详情
- */
- @GetMapping("/getDetail")
- public R<GridmanVO> getDetail(GridmanEntity gridman) {
- return R.data(gridmanService.getDetail(gridman));
- }
- /**
- * 网格员表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入gridman")
- public R<IPage<GridmanVO>> list(GridmanEntity gridman, Query query) {
- IPage<GridmanEntity> pages = gridmanService.page(Condition.getPage(query), Condition.getQueryWrapper(gridman));
- return R.data(GridmanWrapper.build().pageVO(pages));
- }
-
- /**
- * 网格员表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入gridman")
- public R<IPage<GridmanVO>> page(GridmanVO gridman, Query query) {
- IPage<GridmanVO> pages = gridmanService.selectGridmanPage(Condition.getPage(query), gridman);
- return R.data(pages);
- }
-
- /**
- * 网格员表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入gridman")
- public R save(@Valid @RequestBody GridmanEntity gridman) {
- return R.status(gridmanService.save(gridman));
- }
-
- /**
- * 网格员表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入gridman")
- public R update(@Valid @RequestBody GridmanEntity gridman) {
- return R.status(gridmanService.updateById(gridman));
- }
-
- /**
- * 网格员表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入gridman")
- public R submit(@Valid @RequestBody GridmanEntity gridman) {
- return R.status(gridmanService.saveOrUpdate(gridman));
- }
-
- /**
- * 网格员表 自定义新增或修改
- * @param gridman
- * @return
- */
- @PostMapping("/saveOrUpdate")
- public R saveOrUpdate(@Valid @RequestBody GridmanEntity gridman) {
- return R.status(gridmanService.saveOrUpdateGridman(gridman));
- }
-
- /**
- * 网格员表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(gridmanService.removeByIds(Func.toIntList(ids)));
- }
-
- /**
- * 导入网格员数据
- */
- @PostMapping("/import-gridman")
- public R importGrid(MultipartFile file, Integer isCovered) {
- GridmanImporter gridmanImporter = new GridmanImporter(gridmanService, isCovered == 1);
- ExcelUtil.save(file, gridmanImporter, GridmanExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 网格员查询
- * @param gridman
- * @return
- */
- @GetMapping("/getGridmanList")
- public R getGridmanList(GridmanVO gridman) {
- return R.data(gridmanService.getGridmanList(gridman));
- }
-
-
- /**
- *
- * @param code
- * @param roleType
- * @return
- */
- @ApiOperation(value = "网格员和物业人公司统计", notes = "")
- @GetMapping("/getGridStatistics")
- public R getGridStatistics(@RequestParam("code") String code, @RequestParam("roleType") String roleType) {
- return R.data(gridmanService.getGridStatistics(code,roleType));
- }
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/dto/GridDTO.java b/src/main/java/org/springblade/modules/grid/dto/GridDTO.java
deleted file mode 100644
index 4a8fa65..0000000
--- a/src/main/java/org/springblade/modules/grid/dto/GridDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.dto;
-
-import org.springblade.modules.grid.entity.GridEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridDTO extends GridEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/dto/GridPatrolRecordDTO.java b/src/main/java/org/springblade/modules/grid/dto/GridPatrolRecordDTO.java
deleted file mode 100644
index e9c60ca..0000000
--- a/src/main/java/org/springblade/modules/grid/dto/GridPatrolRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.dto;
-
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格巡查记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridPatrolRecordDTO extends GridPatrolRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/dto/GridRangeDTO.java b/src/main/java/org/springblade/modules/grid/dto/GridRangeDTO.java
deleted file mode 100644
index 9ef2ab6..0000000
--- a/src/main/java/org/springblade/modules/grid/dto/GridRangeDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.dto;
-
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格范围表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridRangeDTO extends GridRangeEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/dto/GridWorkLogDTO.java b/src/main/java/org/springblade/modules/grid/dto/GridWorkLogDTO.java
deleted file mode 100644
index 4927ed6..0000000
--- a/src/main/java/org/springblade/modules/grid/dto/GridWorkLogDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.dto;
-
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格工作日志表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridWorkLogDTO extends GridWorkLogEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/dto/GridmanDTO.java b/src/main/java/org/springblade/modules/grid/dto/GridmanDTO.java
deleted file mode 100644
index c37bc69..0000000
--- a/src/main/java/org/springblade/modules/grid/dto/GridmanDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.dto;
-
-import org.springblade.modules.grid.entity.GridmanEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格员表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridmanDTO extends GridmanEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/entity/GridEntity.java b/src/main/java/org/springblade/modules/grid/entity/GridEntity.java
deleted file mode 100644
index 08c977c..0000000
--- a/src/main/java/org/springblade/modules/grid/entity/GridEntity.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.entity;
-
-import com.alibaba.fastjson.support.geo.Geometry;
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springblade.modules.grid.handle.GeometryTypeHandler;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 网格表 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_grid")
-@ApiModel(value = "Grid对象", description = "网格表")
-public class GridEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
- /**
- * 网格编号
- */
- @ApiModelProperty(value = "网格编号")
- private String gridCode;
- /**
- * 机构id
- */
- @ApiModelProperty(value = "机构id")
- private Long deptId;
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String communityCode;
-
- /**
- * 网格名称
- */
- @ApiModelProperty(value = "网格名称")
- private String gridName;
- /**
- * 负责人名称
- */
- @ApiModelProperty(value = "负责人名称")
- private String principal;
- /**
- * 联系电话
- */
- @ApiModelProperty(value = "联系电话")
- private String principalPhone;
- /**
- * 网格面数据
- * @TableField(typeHandler = GeometryTypeHandler.class) 操作面的时候用,平时注释掉
- */
- @ApiModelProperty(value = "网格面数据")
-// @TableField(typeHandler = GeometryTypeHandler.class)
- private String geom;
-
- /**
- * 排序
- */
- @ApiModelProperty(value = "排序")
- private Integer sort;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 备注/简介
- */
- @ApiModelProperty(value = "备注/简介")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/entity/GridPatrolRecordEntity.java b/src/main/java/org/springblade/modules/grid/entity/GridPatrolRecordEntity.java
deleted file mode 100644
index e075656..0000000
--- a/src/main/java/org/springblade/modules/grid/entity/GridPatrolRecordEntity.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 网格巡查记录表 实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@TableName("jczz_grid_patrol_record")
-@ApiModel(value = "GridPatrolRecord对象", description = "网格巡查记录表")
-public class GridPatrolRecordEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 名称 */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /** 内容 */
- @ApiModelProperty(value = "内容", example = "")
- @TableField("context")
- private String context;
-
- /** 图片地址 */
- @ApiModelProperty(value = "图片地址", example = "")
- @TableField("url")
- private String url;
-
- /** 巡查时间 */
- @ApiModelProperty(value = "巡查时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("patrol_time")
- private Date patrolTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("latitude")
- private String latitude;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("longitude")
- private String longitude;
-
- /** 地址 */
- @ApiModelProperty(value = "地址", example = "")
- @TableField("location")
- private String location;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/entity/GridRangeEntity.java b/src/main/java/org/springblade/modules/grid/entity/GridRangeEntity.java
deleted file mode 100644
index 127b07a..0000000
--- a/src/main/java/org/springblade/modules/grid/entity/GridRangeEntity.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-
-/**
- * 网格范围表 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_grid_range")
-@ApiModel(value = "GridRange对象", description = "网格范围表")
-public class GridRangeEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 网格ID
- */
- @ApiModelProperty(value = "网格ID")
- private Integer gridId;
- /**
- * 网格编号
- */
- @ApiModelProperty(value = "网格编号")
- private String gridCode;
- /**
- * 小区ID
- */
- @ApiModelProperty(value = "小区ID")
- private String districtCode;
- /**
- * 小区名称
- */
- @ApiModelProperty(value = "小区名称")
- private String districtName;
- /**
- * 幢
- */
- @ApiModelProperty(value = "幢")
- private String building;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/entity/GridWorkLogEntity.java b/src/main/java/org/springblade/modules/grid/entity/GridWorkLogEntity.java
deleted file mode 100644
index a5fe40e..0000000
--- a/src/main/java/org/springblade/modules/grid/entity/GridWorkLogEntity.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 网格工作日志表 实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@TableName("jczz_grid_work_log")
-@ApiModel(value = "GridWorkLog对象", description = "网格工作日志表")
-public class GridWorkLogEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-//
-// /**
-// * 房屋编号
-// */
-// @ApiModelProperty(value = "房屋编号")
-// private String houseCode;
-
- /**
- * 走访类型
- */
- @ApiModelProperty(value = "走访类型")
- private Integer type;
- /**
- * 重点人员类型
- */
- @ApiModelProperty(value = "重点人员类型")
- private Integer personType;
- /**
- * 住户id
- */
- @ApiModelProperty(value = "被访人住户id")
- private Long householdId;
-//
-// /**
-// * 被访人姓名
-// */
-// @ApiModelProperty(value = "被访人姓名")
-// private String name;
-// /**
-// * 被访人电话
-// */
-// @ApiModelProperty(value = "被访人电话")
-// private String phone;
- /**
- * 内容
- */
- @ApiModelProperty(value = "内容")
- private String context;
- /**
- * 图片地址
- */
- @ApiModelProperty(value = "图片地址")
- private String url;
-
- /**
- * 走访时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("走访时间")
- private Date workTime;
-
- /**
- * 来源: 1:主动上报 2:系统自动下发
- */
- @ApiModelProperty(value = "来源: 1:主动上报 2:系统自动下发")
- private Integer source;
-
- /**
- * 状态 1:待处理 2:已处理
- */
- @ApiModelProperty(value = "状态 1:待处理 2:已处理")
- private Integer status;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/entity/GridmanEntity.java b/src/main/java/org/springblade/modules/grid/entity/GridmanEntity.java
deleted file mode 100644
index 994c105..0000000
--- a/src/main/java/org/springblade/modules/grid/entity/GridmanEntity.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 网格员表 实体类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Data
-@TableName("jczz_gridman")
-@ApiModel(value = "Gridman对象", description = "网格员表")
-public class GridmanEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
- /**
- * 网格id
- */
- @ApiModelProperty(value = "网格id")
- private Integer gridId;
- /**
- * 网格编号
- */
- @ApiModelProperty(value = "网格编号")
- private String gridCode;
- /**
- * 关联用户表id
- */
- @ApiModelProperty(value = "关联用户表id")
- private Long userId;
- /**
- * 网格员名称
- */
- @ApiModelProperty(value = "网格员名称")
- private String gridmanName;
- /**
- * 手机号
- */
- @ApiModelProperty(value = "手机号")
- private String mobile;
-
- /**
- * 形象照
- */
- @ApiModelProperty(value = "形象照")
- private String picUrl;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/excel/GridExcel.java b/src/main/java/org/springblade/modules/grid/excel/GridExcel.java
deleted file mode 100644
index af400e4..0000000
--- a/src/main/java/org/springblade/modules/grid/excel/GridExcel.java
+++ /dev/null
@@ -1,36 +0,0 @@
-
-package org.springblade.modules.grid.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import java.io.Serializable;
-
-/**
- * GridExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class GridExcel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @ColumnWidth(15)
- @ExcelProperty("社区网格名称")
- private String gridName;
-
- @ColumnWidth(15)
- @ExcelProperty("网格编号")
- private String gridCode;
-
- @ColumnWidth(100)
- @ExcelProperty("区域")
- private String geom;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/excel/GridImporter.java b/src/main/java/org/springblade/modules/grid/excel/GridImporter.java
deleted file mode 100644
index d35a839..0000000
--- a/src/main/java/org/springblade/modules/grid/excel/GridImporter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.system.service.IUserService;
-
-import java.util.List;
-
-/**
- * 网格数据导入类
- *
- * @author zhongrj
- */
-@RequiredArgsConstructor
-public class GridImporter implements ExcelImporter<GridExcel> {
-
- private final IGridService gridService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<GridExcel> data) {
- gridService.importGrid(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/excel/GridmanExcel.java b/src/main/java/org/springblade/modules/grid/excel/GridmanExcel.java
deleted file mode 100644
index ab4c16f..0000000
--- a/src/main/java/org/springblade/modules/grid/excel/GridmanExcel.java
+++ /dev/null
@@ -1,49 +0,0 @@
-
-package org.springblade.modules.grid.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * GridExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class GridmanExcel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @ColumnWidth(15)
- @ExcelProperty("社区名称")
- private String communityName;
-
- @ColumnWidth(15)
- @ExcelProperty("社区编号")
- private String communityCode;
-
- @ColumnWidth(15)
- @ExcelProperty("网格名称")
- private String gridName;
-
- @ColumnWidth(15)
- @ExcelProperty("网格编号")
- private String gridCode;
-
- @ColumnWidth(15)
- @ExcelProperty("网格员姓名")
- private String gridmanName;
-
- @ColumnWidth(15)
- @ExcelProperty("网格员电话")
- private String mobile;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/excel/GridmanImporter.java b/src/main/java/org/springblade/modules/grid/excel/GridmanImporter.java
deleted file mode 100644
index 76702a0..0000000
--- a/src/main/java/org/springblade/modules/grid/excel/GridmanImporter.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.springblade.modules.grid.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.service.IGridmanService;
-
-import java.util.List;
-
-/**
- * 网格员数据导入类
- *
- * @author zhongrj
- */
-@RequiredArgsConstructor
-public class GridmanImporter implements ExcelImporter<GridmanExcel> {
-
- private final IGridmanService gridmanService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<GridmanExcel> data) {
- gridmanService.importGridman(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/handle/GeometryTypeHandler.java b/src/main/java/org/springblade/modules/grid/handle/GeometryTypeHandler.java
deleted file mode 100644
index f221298..0000000
--- a/src/main/java/org/springblade/modules/grid/handle/GeometryTypeHandler.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package org.springblade.modules.grid.handle;
-
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.PrecisionModel;
-import com.vividsolutions.jts.io.*;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.ibatis.type.BaseTypeHandler;
-import org.apache.ibatis.type.JdbcType;
-import org.apache.ibatis.type.MappedJdbcTypes;
-import org.apache.ibatis.type.MappedTypes;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-@MappedTypes({String.class})
-@MappedJdbcTypes({JdbcType.OTHER})
-@Slf4j
-public class GeometryTypeHandler extends BaseTypeHandler<String> {
-
-
- /**
- * 设置转换
- * @param preparedStatement
- * @param i
- * @param s
- * @param jdbcType
- * @throws SQLException
- */
- @Override
- public void setNonNullParameter(PreparedStatement preparedStatement, int i, String s, JdbcType jdbcType) throws SQLException {
- try{
- //String转Geometry
- Geometry geo = new WKTReader(new GeometryFactory(new PrecisionModel())).read(s);
- // Geometry转WKB
- byte[] geometryBytes = new WKBWriter(2, ByteOrderValues.LITTLE_ENDIAN, false).write(geo);
- // 设置SRID为mysql默认的 0
- byte[] wkb = new byte[geometryBytes.length+4];
- wkb[0] = wkb[1] = wkb[2] = wkb[3] = 0;
- System.arraycopy(geometryBytes, 0, wkb, 4, geometryBytes.length);
- preparedStatement.setBytes(i,wkb);
- }catch (ParseException e){
- log.error("坐标转换异常:【{}】",e.getMessage(),e);
- }
- }
-
- @Override
- public String getNullableResult(ResultSet resultSet, String s){
- try(
- InputStream inputStream = resultSet.getBinaryStream(s)){
- Geometry geo = getGeometryFromInputStream(inputStream);
- if(geo != null){
- return geo.toString();
- }
- }catch(Exception e){
- log.error("坐标转换异常:【{}】",e.getMessage(),e);
- }
- return null;
- }
-
- @Override
- public String getNullableResult(ResultSet resultSet, int i){
- try(InputStream inputStream = resultSet.getBinaryStream(i)){
- Geometry geo = getGeometryFromInputStream(inputStream);
- if(geo != null){
- return geo.toString();
- }
- }catch(Exception e){
- log.error("坐标转换异常:【{}】",e.getMessage(),e);
- }
- return null;
- }
-
- @Override
- public String getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
- System.out.println("i = " + i);
- return "";
- }
-
- /**
- * 流 转 geometry
- * */
- private Geometry getGeometryFromInputStream(InputStream inputStream) throws Exception {
-
- Geometry dbGeometry = null;
-
- if (inputStream != null) {
- // 二进制流转成字节数组
- byte[] buffer = new byte[255];
-
- int bytesRead;
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- while ((bytesRead = inputStream.read(buffer)) != -1) {
- baos.write(buffer, 0, bytesRead);
- }
- // 得到字节数组
- byte[] geometryAsBytes = baos.toByteArray();
- // 字节数组小于5 异常
- if (geometryAsBytes.length < 5) {
- throw new RuntimeException("坐标异常");
- }
-
- //字节数组前4个字节表示srid 去掉
- byte[] sridBytes = new byte[4];
- System.arraycopy(geometryAsBytes, 0, sridBytes, 0, 4);
- boolean bigEndian = (geometryAsBytes[4] == 0x00);
- // 解析srid
- int srid = 0;
- if (bigEndian) {
- for (byte sridByte : sridBytes) {
- srid = (srid << 8) + (sridByte & 0xff);
- }
- } else {
- for (int i = 0; i < sridBytes.length; i++) {
- srid += (sridBytes[i] & 0xff) << (8 * i);
- }
- }
-
- WKBReader wkbReader = new WKBReader();
- // WKBReader 把字节数组转成geometry对象。
- byte[] wkb = new byte[geometryAsBytes.length - 4];
- System.arraycopy(geometryAsBytes, 4, wkb, 0, wkb.length);
- dbGeometry = wkbReader.read(wkb);
- dbGeometry.setSRID(srid);
- }
- return dbGeometry;
- }
-}
-
-
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridMapper.java b/src/main/java/org/springblade/modules/grid/mapper/GridMapper.java
deleted file mode 100644
index fe41db7..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridMapper.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.mapper;
-
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.vo.GridVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.vo.PlaceVO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 网格表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface GridMapper extends BaseMapper<GridEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param grid
- * @return
- */
- List<GridVO> selectGridPage(IPage page,
- @Param("grid") GridVO grid,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 根据地址编号查询网格数据
- * @param houseCode
- * @return
- */
- GridVO getPlaceGridDetailByHouseCode(@Param("houseCode") String houseCode);
-
- /**
- * 根据用户id(网格员)查询对应的房屋地址code
- * @param userId
- * @return
- */
- List<String> getAddressCodeListByUserId(@Param("userId") Long userId,@Param("addressCode") String addressCode);
-
- /**
- * 空间分析 mysql 5.7 点落面
- */
- List<GridEntity> spatialAnalysis(@Param("point")String point);
-
- /**
- * 根据参数查询网格数据
- * @param place
- * @return
- */
- GridVO getGridDetailByParam(@Param("place") PlaceVO place);
-
- /**
- * 网格表 自定义详情
- * @param grid
- * @return
- */
- GridVO getGridDetail(@Param("grid") GridVO grid);
-
- /**
- * 查询所有
- * @return
- */
- List<GridEntity> selectGridAll();
-
- /**
- * 网格树
- * @return
- */
- @MapKey(value = "id")
- Map<String, TreeStringNode> getGridTree();
-
- List<GridmanEntity> gridInfo(String houseCode);
-
- List<DoorplateAddressEntity> gridAoiName(Integer id);
-
- /**
- * 网格集合查询
- * @param grid
- * @return
- */
- List<GridEntity> getGridList(@Param("grid") GridVO grid);
-
- /**
- * 查询小区网格绑定
- * @param aoiCode 小区aoiCode
- * @return
- */
- List<GridVO> getGridListByAoiCode(@Param("aoiCode") String aoiCode);
-
- /**
- * 查询对应网格人对应的网格
- * @param userId
- * @return
- */
- GridEntity getGridByUserId(@Param("userId") Long userId);
-
- /**
- * 根据网格名称,社区名称查询对应的网格
- * @param gridName
- * @param communityName
- * @return
- */
- GridEntity getGridByNames(@Param("gridName") String gridName,
- @Param("communityName") String communityName);
-
- /**
- * 查询用户对应的网格
- * @param userId
- * @return
- */
- List<String> getGridListByUserId(@Param("userId") String userId);
-
- /**
- * 查询对应的房屋地址code(更加网格编号集合)
- * @param gridCodeList
- * @return
- */
- List<String> getAddressCodeListByGridCodeList(@Param("communityCode")String communityCode,@Param("gridCodeList")List<String> gridCodeList);
-
- /**
- * 根据社区编号及网格编号集合查询对应的网格信息
- * @param communityCode
- * @param gridCodeList
- * @return
- */
- List<GridVO> getGridListByComAndList(@Param("communityCode")String communityCode,
- @Param("gridCodeList") List<String> gridCodeList);
-
- /**
- * 根据社区名称和网格名称查询对应的网格信息
- * @param communityName
- * @param gridName
- * @return
- */
- GridEntity getGridInfoByParam(@Param("communityName")String communityName,@Param("gridName") String gridName);
-}
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml b/src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml
deleted file mode 100644
index 1013d67..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml
+++ /dev/null
@@ -1,271 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.grid.mapper.GridMapper">
-
- <!--自定义分页查询-->
- <select id="selectGridPage" resultType="org.springblade.modules.grid.vo.GridVO">
- select
- jg.id,
- jg.community_code,
- jg.grid_name,
- jg.grid_code,
- jg.principal,
- jg.principal_phone,
- jg.remark,
- br.name as communityName,br.town_name as townName
- from jczz_grid jg
- left join blade_region br on br.code = jg.community_code
- where jg.is_deleted = 0
- <if test="grid.communityCode!=null and grid.communityCode!=''">
- and jg.community_code = #{grid.communityCode}
- </if>
- <if test="grid.gridName!=null and grid.gridName!=''">
- and jg.grid_name like concat('%',#{grid.gridName},'%')
- </if>
- <if test="grid.principal!=null and grid.principal!=''">
- and jg.principal like concat('%',#{grid.principal},'%')
- </if>
- <if test="grid.gridCode!=null and grid.gridCode!=''">
- and jg.grid_code like concat('%',#{grid.gridCode},'%')
- </if>
- <if test="grid.principalPhone!=null and grid.principalPhone!=''">
- and jg.principal_phone like concat('%',#{grid.principalPhone},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.community_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="grid.communityName != null and grid.communityName !='' ">
- and br.name like concat('%',#{grid.communityName},'%')
- </if>
- <if test="grid.townName != null and grid.townName !='' ">
- and br.town_name like concat('%',#{grid.townName},'%')
- </if>
- order by community_code asc,grid_code asc
- </select>
-
- <!--根据地址编号查询网格数据-->
- <select id="getPlaceGridDetailByHouseCode" resultType="org.springblade.modules.grid.vo.GridVO">
- select jg.id,jg.grid_name,br.town_name AS townStreetName,br.name AS community_name,
- bu.real_name as realName,bu.phone as gridPhone
- from jczz_grid jg
- left join jczz_place jp on jp.grid_code = jg.grid_code and jp.is_deleted = 0
- left join jczz_gridman jgm on jg.grid_code = jgm.grid_code and jgm.is_deleted = 0
- left join blade_user bu on bu.id = jgm.user_id and bu.is_deleted = 0
- left join blade_region br ON br.code = jg.community_code
- where jg.is_deleted = 0
- and jp.house_code like concat('%',#{houseCode},'%')
- limit 1
- </select>
-
- <!--根据用户id(网格员)查询对应的房屋地址code-->
- <select id="getAddressCodeListByUserId" resultType="java.lang.String">
- select jgr.house_code from jczz_grid_range jgr
- left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0
- left join jczz_gridman jgm on jgm.grid_id = jg.id and jgm.is_deleted = 0
- where 1=1
- and jgm.user_id = #{userId}
- <if test="addressCode!=null and addressCode!=''">
- and jgr.house_code = #{addressCode}
- </if>
- </select>
-
- <!--判断该小区点在哪个派出所-->
- <select id="spatialAnalysis" resultType="org.springblade.modules.grid.entity.GridEntity">
- SELECT * FROM jczz_grid WHERE ST_Intersects(geom, ST_GeomFromText(${point},0))
- </select>
-
- <!--根据地址编号查询网格数据-->
- <select id="getGridDetailByParam" resultType="org.springblade.modules.grid.vo.GridVO">
- SELECT
- jg.id,
- jg.grid_code,
- jg.grid_name,
- br.name as community_name,
- jg.sort,
- bu.real_name AS realName,
- bu.phone AS gridPhone
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm on jg.grid_code = jgm.grid_code
- LEFT JOIN blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_place_rel jpr ON locate( jpr.community_name, br.name )> 0
- AND locate( jpr.grid_name, jg.grid_name )> 0
- AND jpr.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jgm.user_id
- AND bu.is_deleted = 0
- WHERE
- jg.is_deleted = 0
- and jpr.place_id = #{place.id}
- limit 1
- </select>
-
- <!--自定义详情查询-->
- <select id="getGridDetail" resultType="org.springblade.modules.grid.vo.GridVO">
- select id,grid_code,community_code,grid_name,principal,principal_phone,remark,sort from jczz_grid
- where is_deleted = 0 and id = #{grid.id}
- </select>
-
- <!--查询全部-->
- <select id="selectGridAll" resultType="org.springblade.modules.grid.entity.GridEntity">
- select id,grid_code,community_code,grid_name,principal,principal_phone,remark,sort from jczz_grid
- where is_deleted = 0
- </select>
-
- <!--网格树-->
- <select id="getGridTree" resultType="org.springblade.common.node.TreeStringNode">
- SELECT code as id,
- parent_code as parentId,
- name
- FROM blade_region
- where district_code = '361102000000'
- union all
- (select id,
- community_code as parentId,
- grid_name as name
- from jczz_grid
- where is_deleted = 0)
- </select>
- <select id="gridInfo" resultType="org.springblade.modules.grid.entity.GridmanEntity">
- SELECT jg.id,
- jg.grid_name,
- jgm.pic_url,
- jgm.mobile,
- jgm.gridman_name
- FROM jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jgm.grid_id = jg.id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE jgr.house_code = #{houseCode}
- AND jg.is_deleted = '0'
- AND jgm.is_deleted = '0'
- </select>
-
-
- <select id="gridAoiName"
- resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- SELECT aoi_name,
- GROUP_CONCAT(building_name) building_name
- FROM (SELECT DISTINCT aoi_name,
- building_name
- FROM jczz_doorplate_address
- WHERE address_code IN (SELECT jgr.house_code
- FROM jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jgm.grid_id = jg.id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE jg.id = #{id})) a
- GROUP BY aoi_name
-
- </select>
-
- <!--网格集合查询-->
- <select id="getGridList" resultType="org.springblade.modules.grid.entity.GridEntity">
- SELECT * from jczz_grid
- where is_deleted = 0
- <if test="grid.communityCode!=null and grid.communityCode!=''">
- and community_code = #{grid.communityCode}
- </if>
- order by sort asc
- </select>
-
- <!--查询小区网格绑定-->
- <select id="getGridListByAoiCode" resultType="org.springblade.modules.grid.vo.GridVO">
- SELECT jg.grid_name from jczz_grid jg
- left join jczz_grid_range jgr on jg.id = jgr.grid_id
- where jg.is_deleted = 0
- and jgr.district_code = #{aoiCode}
- GROUP BY jg.grid_name
- </select>
-
- <!--查询对应网格人对应的网格-->
- <select id="getGridByUserId" resultType="org.springblade.modules.grid.entity.GridEntity">
- select
- jg.*
- from jczz_grid jg
- where jg.grid_code in
- (
- select * from (select grid_code from jczz_gridman where is_deleted = 0 and user_id = #{userId} limit 1) a
- )
- </select>
-
- <!--根据网格名称,社区名称查询对应的网格-->
- <select id="getGridByNames" resultType="org.springblade.modules.grid.entity.GridEntity">
- select jg.* from jczz_grid jg
- left join blade_region br on br.village_code = jg.community_code
- where jg.is_deleted = 0
- and jg.grid_name = #{gridName}
- and br.name = #{communityName}
- </select>
-
- <!--查询用户对应的网格-->
- <select id="getGridListByUserId" resultType="java.lang.String">
- select jg.grid_code from jczz_grid jg
- left join jczz_gridman jgm on jgm.grid_code = jg.grid_code and jgm.is_deleted = 0
- where jg.is_deleted = 0
- and jgm.user_id = #{userId}
- </select>
-
- <!--查询对应的房屋地址code(更加网格编号集合)-->
- <select id="getAddressCodeListByGridCodeList" resultType="java.lang.String">
- select jgr.house_code from jczz_grid_range jgr
- left join jczz_grid jg on jg.grid_code = jgr.grid_code and jg.is_deleted = 0
- where 1=1
- <if test="communityCode!=null and communityCode!=''">
- and jg.community_code = #{communityCode}
- </if>
- <choose>
- <when test="gridCodeList!=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="gridCode" separator="," open="(" close=")">
- #{gridCode}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </select>
-
- <!--根据社区编号及网格编号集合查询对应的网格信息-->
- <select id="getGridListByComAndList" resultType="org.springblade.modules.grid.vo.GridVO">
- select
- jg.*,br.name as communityName
- from jczz_grid jg
- left join blade_region br on jg.community_code = br.code
- where jg.is_deleted = 0
- <if test="communityCode!=null and communityCode!=''">
- and jg.community_code = #{communityCode}
- </if>
- <choose>
- <when test="gridCodeList!=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="gridCode" separator="," open="(" close=")">
- #{gridCode}
- </foreach>
- </when>
- <otherwise>
- and jgr.house_code in ('')
- </otherwise>
- </choose>
- </select>
-
- <!--根据社区名称和网格名称查询对应的网格信息-->
- <select id="getGridInfoByParam" resultType="org.springblade.modules.grid.entity.GridEntity">
- select
- jg.*
- from jczz_grid jg
- left join blade_region br on jg.community_code = br.code
- where jg.is_deleted = 0
- and jg.grid_name = #{gridName}
- and br.name = #{communityName}
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.java b/src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.java
deleted file mode 100644
index 26d9479..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.modules.grid.vo.GridPatrolRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 网格巡查记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public interface GridPatrolRecordMapper extends BaseMapper<GridPatrolRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridPatrolRecord
- * @return
- */
- List<GridPatrolRecordVO> selectGridPatrolRecordPage(IPage page,
- @Param("gridPatrolRecord") GridPatrolRecordVO gridPatrolRecord,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.xml b/src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.xml
deleted file mode 100644
index 07711b0..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.grid.mapper.GridPatrolRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="gridPatrolRecordResultMap" type="org.springblade.modules.grid.entity.GridPatrolRecordEntity">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="context" column="context" />
- <result property="url" column="url" />
- <result property="patrolTime" column="patrol_time" />
- <result property="createTime" column="create_time" />
- <result property="createUser" column="create_user" />
- <result property="isDeleted" column="is_deleted" />
- <result property="latitude" column="latitude" />
- <result property="longitude" column="longitude" />
- <result property="location" column="location" />
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectGridPatrolRecordPage" resultType="org.springblade.modules.grid.vo.GridPatrolRecordVO">
- select jgpr.* from jczz_grid_patrol_record jgpr
- LEFT JOIN blade_user bu on bu.id = jgpr.create_user and bu.is_deleted = 0
- LEFT JOIN blade_dept bd on bd.id = bu.dept_id and bd.is_deleted = 0
- where jgpr.is_deleted = 0
- <if test="gridPatrolRecord.name!=null and gridPatrolRecord.name!=''">
- and jgpr.name like concat('%',#{gridPatrolRecord.name},'%')
- </if>
- <if test="gridPatrolRecord.context!=null and gridPatrolRecord.context!=''">
- and jgpr.context like concat('%',#{gridPatrolRecord.context},'%')
- </if>
- <if test="gridPatrolRecord.createUser!=null">
- and jgpr.create_user = #{gridPatrolRecord.createUser}
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.java b/src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.java
deleted file mode 100644
index dc97bd8..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.vo.GridRangeVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.grid.vo.GridVO;
-
-import java.util.List;
-
-/**
- * 网格范围表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface GridRangeMapper extends BaseMapper<GridRangeEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridRange
- * @return
- */
- List<GridRangeVO> selectGridRangePage(IPage page,@Param("gridRange") GridRangeVO gridRange);
-
- /**
- * 查询test 数据表数据
- * @return
- */
- List<GridVO> getTestGridData();
-
- /**
- * 根据房屋查询对应的小区
- * @param houseCode
- * @return
- */
- String getDistrictIdByHouseCode(@Param("houseCode") String houseCode);
-}
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.xml b/src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.xml
deleted file mode 100644
index 597aa52..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.grid.mapper.GridRangeMapper">
-
- <!--自定义分页查询-->
- <select id="selectGridRangePage" resultType="org.springblade.modules.grid.vo.GridRangeVO">
- select * from jczz_grid_range where 1=1
- </select>
-
- <!--查询test 数据表数据-->
- <select id="getTestGridData" resultType="org.springblade.modules.grid.vo.GridVO">
- select grid as gridName,SUBSTRING_INDEX(area, "-", -1) as communityName,std_id as principal from jczz_test
- </select>
-
- <!--根据房屋查询对应的小区-->
- <select id="getDistrictIdByHouseCode" resultType="java.lang.String">
- SELECT jd.id
- FROM jczz_district jd
- LEFT JOIN jczz_doorplate_address jda ON jda.aoi_code = jd.aoi_code
- WHERE jda.address_code = #{houseCode}
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.java b/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.java
deleted file mode 100644
index 51d51e9..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.modules.grid.vo.GridWorkLogVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 网格工作日志表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public interface GridWorkLogMapper extends BaseMapper<GridWorkLogEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridWorkLog
- * @return
- */
- List<GridWorkLogVO> selectGridWorkLogPage(IPage page,
- @Param("gridWorkLog") GridWorkLogVO gridWorkLog,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 走访日志数量统计
- * @param gridCode 网格编号
- * @param status 状态
- * @return
- */
- Integer getGridWorkCountHandleCount(@Param("gridCode") String gridCode,@Param("status") Integer status);
-}
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml b/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
deleted file mode 100644
index 4193d35..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.grid.mapper.GridWorkLogMapper">
-
- <!--自定义分页查询-->
- <select id="selectGridWorkLogPage" resultType="org.springblade.modules.grid.vo.GridWorkLogVO">
- select
- jgwl.*,
- jh.name,jh.phone_number as phone,
- jh.current_address AS address,
- br.town_name AS townName,
- br.name AS neiName,
- jg.grid_name,
- bu.real_name as createUserName
- from jczz_grid_work_log jgwl
- left join jczz_household jh on jgwl.household_id = jh.id and jh.is_deleted = 0
- left join jczz_house jhs on jhs.house_code = jh.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_grid jg on jhs.grid_code = jg.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_user bu on bu.id = jgwl.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- left join blade_region br on br.code = jpag.community_code
- where jgwl.is_deleted = 0
- <if test="gridWorkLog.type !=null">
- and jgwl.type = #{gridWorkLog.type}
- </if>
- <if test="gridWorkLog.source !=null">
- and jgwl.source = #{gridWorkLog.source}
- </if>
- <if test="gridWorkLog.status !=null">
- and jgwl.status = #{gridWorkLog.status}
- </if>
- <if test="gridWorkLog.personType !=null">
- and jgwl.person_type = #{gridWorkLog.personType}
- </if>
- <if test="gridWorkLog.name !=null and gridWorkLog.name!=''">
- and jh.name like concat('%',#{gridWorkLog.name},'%')
- </if>
- <if test="gridWorkLog.houseCode !=null and gridWorkLog.houseCode!=''">
- and jh.house_code = #{gridWorkLog.houseCode}
- </if>
- <if test="gridWorkLog.phone !=null and gridWorkLog.phone!=''">
- and jh.phone_number like concat('%',#{gridWorkLog.phone},'%')
- </if>
- <if test="gridWorkLog.townName!=null and gridWorkLog.townName!=''">
- and br.town_name like concat('%',#{gridWorkLog.townName},'%')
- </if>
- <if test="gridWorkLog.neiName!=null and gridWorkLog.neiName!=''">
- and br.name like concat('%',#{gridWorkLog.neiName},'%')
- </if>
- <if test="gridWorkLog.gridId !=null">
- and jg.id = #{gridWorkLog.gridId}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="gridWorkLog.roleName != null and gridWorkLog.roleName != ''">
- <if test="gridWorkLog.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jhs.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jhs.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="gridWorkLog.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </select>
-
- <!--走访日志数量统计-->
- <select id="getGridWorkCountHandleCount" resultType="java.lang.Integer">
- select count(*) from jczz_grid_work_log jgwl
- left join jczz_household jh on jgwl.household_id = jh.id and jh.is_deleted = 0
- left join jczz_house jhs on jhs.house_code=jh.house_code and jhs.is_deleted = 0
- where jgwl.is_deleted = 0
- <if test="status!=null">
- and jgwl.status = #{status}
- </if>
- <if test="gridCode!=null and gridCode!=''">
- and jhs.grid_code = #{gridCode}
- </if>
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.java b/src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.java
deleted file mode 100644
index aecce21..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.vo.GridmanVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 网格员表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-27
- */
-public interface GridmanMapper extends BaseMapper<GridmanEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridman
- * @return
- */
- List<GridmanVO> selectGridmanPage(IPage page,
- @Param("gridman") GridmanVO gridman,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 网格员查询
- * @param gridman
- * @return
- */
- List<GridmanVO> getGridmanList(@Param("gridman") GridmanVO gridman);
-
- Integer getGridStatistics(String code, Long userId, String roleType);
-
- Integer getCompanyStatistics(String code, Long userId, String roleType);
-
- Integer getOwnersCommitteeStatistics(String code, Long userId, String roleType);
-
- /**
- * 网格员表 自定义详情
- */
- GridmanVO getDetail(@Param("gridman") GridmanEntity gridman);
-
- /**
- * 查询网格id
- * @param userId
- * @return
- */
- Integer getGridIdByUserId(@Param("userId") Long userId);
-
- List<UserEntity> getGridManByCode(String houseCode);
-}
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.xml b/src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.xml
deleted file mode 100644
index fc69a04..0000000
--- a/src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.grid.mapper.GridmanMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="gridmanResultMap" type="org.springblade.modules.grid.entity.GridmanEntity">
- <result column="id" property="id"/>
- <result column="grid_id" property="gridId"/>
- <result column="user_id" property="userId"/>
- <result column="gridman_name" property="gridmanName"/>
- <result column="mobile" property="mobile"/>
- <result column="remark" property="remark"/>
- <result column="create_time" property="createTime"/>
- <result column="create_user" property="createUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectGridmanPage" resultType="org.springblade.modules.grid.vo.GridmanVO">
- select
- jgm.*,
- jg.grid_name gridName,jg.community_code communityCode,
- br.name as communityName,
- br.town_name as townName
- from jczz_gridman jgm
- left join jczz_grid jg on jg.grid_code = jgm.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- where jgm.is_deleted = 0
- <if test="gridman.gridmanName!=null and gridman.gridmanName!=''">
- and jgm.gridman_name like concat('%',#{gridman.gridmanName},'%')
- </if>
- <if test="gridman.mobile!=null and gridman.mobile!=''">
- and jgm.mobile like concat('%',#{gridman.mobile},'%')
- </if>
- <if test="gridman.gridId!=null">
- and jg.id = #{gridman.gridId}
- </if>
- <if test="gridman.communityCode!=null and gridman.communityCode!=''">
- and jg.community_code like concat('%',#{gridman.communityCode},'%')
- </if>
- <if test="gridman.communityName!=null and gridman.communityName!=''">
- and br.name like concat('%',#{gridman.communityName},'%')
- </if>
- <if test="gridman.townName!=null and gridman.townName!=''">
- and br.town_name like concat('%',#{gridman.townName},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </select>
-
- <!--自定义分页查询-->
- <select id="getGridmanList" resultType="org.springblade.modules.grid.vo.GridmanVO">
- select
- jgm.*
- from jczz_gridman jgm
- where jgm.is_deleted = 0
- <if test="gridman.gridmanName!=null and gridman.gridmanName!=''">
- and jgm.gridman_name like concat('%',#{gridman.gridmanName},'%')
- </if>
- <if test="gridman.mobile!=null and gridman.mobile!=''">
- and jgm.mobile like concat('%',#{gridman.mobile},'%')
- </if>
- </select>
-
- <select id="getGridStatistics" resultType="java.lang.Integer">
- SELECT count(1) number
- FROM jczz_gridman jgm
- LEFT JOIN jczz_grid jg ON jg.grid_code = jgm.grid_code
- WHERE jg.community_code = #{code}
- AND jg.is_deleted = 0
- <if test="userId!=null and roleType == '1'">
- and jgm.user_id= #{userId}
- </if>
- </select>
-
- <select id="getCompanyStatistics" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- jczz_property_company_district jpcd
- LEFT JOIN jczz_district jd ON jd.id = jpcd.district_id
- WHERE
- jd.community_code = #{code}
- and jpcd.is_deleted= 0
- <if test="userId!=null and roleType == '1'">
- AND jd.aoi_code in (
- SELECT distinct
- jda.aoi_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.grid_code = jgm.grid_code
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jg.house_code
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- AND jda.aoi_code IS NOT NULL
- )
- </if>
- </select>
-
- <select id="getOwnersCommitteeStatistics" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM jczz_owners_committee joc LEFT JOIN
- jczz_district jd ON jd.id = joc.area_id
- WHERE
- jd.community_code = #{code}
- and joc.delete_flag= 0
- <if test="userId!=null and roleType == '1'">
- AND jd.aoi_code in (
- SELECT distinct
- jda.aoi_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.grid_code = jgm.grid_code
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jg.house_code
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- AND jda.aoi_code IS NOT NULL
- )
- </if>
- </select>
-
-
- <!--网格员表 自定义详情-->
- <select id="getDetail" resultType="org.springblade.modules.grid.vo.GridmanVO">
- select
- jgm.*,jg.community_code communityCode
- from jczz_gridman jgm
- left join jczz_grid jg on jg.grid_code = jgm.grid_code and jg.is_deleted = 0
- where jgm.is_deleted = 0
- and jgm.id = #{gridman.id}
- </select>
-
- <!--查询网格id-->
- <select id="getGridIdByUserId" resultType="java.lang.Integer">
- select
- jgm.grid_id
- from jczz_gridman jgm
- where jgm.is_deleted = 0
- and jgm.user_id = #{userId}
- limit 1
- </select>
-
- <select id="getGridManByCode" resultType="org.springblade.modules.system.entity.User">
- SELECT
- bu.*
- FROM
- blade_user bu
- LEFT JOIN jczz_gridman jgm ON bu.id = jgm.user_id
- LEFT JOIN jczz_grid jg ON jgm.grid_code = jg.grid_code
- WHERE
- jg.community_code IN
- (
- SELECT jg.community_code FROM jczz_grid jg LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE jgr.house_code = #{houseCode}
- )
- AND bu.is_deleted = 0
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/grid/service/IGridPatrolRecordService.java b/src/main/java/org/springblade/modules/grid/service/IGridPatrolRecordService.java
deleted file mode 100644
index 24f4b23..0000000
--- a/src/main/java/org/springblade/modules/grid/service/IGridPatrolRecordService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.modules.grid.vo.GridPatrolRecordVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 网格巡查记录表 服务类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public interface IGridPatrolRecordService extends IService<GridPatrolRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridPatrolRecord
- * @return
- */
- IPage<GridPatrolRecordVO> selectGridPatrolRecordPage(IPage<GridPatrolRecordVO> page, GridPatrolRecordVO gridPatrolRecord);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/IGridRangeService.java b/src/main/java/org/springblade/modules/grid/service/IGridRangeService.java
deleted file mode 100644
index 4ec6f4a..0000000
--- a/src/main/java/org/springblade/modules/grid/service/IGridRangeService.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.vo.GridRangeVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 网格范围表 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IGridRangeService extends IService<GridRangeEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridRange
- * @return
- */
- IPage<GridRangeVO> selectGridRangePage(IPage<GridRangeVO> page, GridRangeVO gridRange);
-
- /**
- * 网格范围表数据处理
- */
- Object dataHandle();
-
- /**
- * 根据房屋查询对应的小区
- * @param houseCode
- * @return
- */
- String getDistrictIdByHouseCode(String houseCode);
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/IGridService.java b/src/main/java/org/springblade/modules/grid/service/IGridService.java
deleted file mode 100644
index 7754de9..0000000
--- a/src/main/java/org/springblade/modules/grid/service/IGridService.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.excel.GridExcel;
-import org.springblade.modules.grid.excel.GridmanExcel;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.vo.PlaceVO;
-
-import java.util.List;
-
-/**
- * 网格表 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IGridService extends IService<GridEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param grid
- * @return
- */
- IPage<GridVO> selectGridPage(IPage<GridVO> page, GridVO grid);
-
- /**
- * 网格数导入
- * @param data
- * @param isCovered
- */
- void importGrid(List<GridExcel> data, Boolean isCovered);
-
- /**
- * 根据地址编号查询网格数据
- * @param houseCode
- * @return
- */
- GridVO getPlaceGridDetailByHouseCode(String houseCode);
-
- /**
- * 根据用户id(网格员)查询对应的房屋地址code
- * @param userId
- * @param addressCode 地址编码
- * @return
- */
- List<String> getAddressCodeListByUserId(Long userId,String addressCode);
-
- /**
- * 空间分析
- */
- Object spatialAnalysis(DoorplateAddressEntity addressEntity);
-
- /**
- * 空间分析
- */
- List<GridEntity> spatialAnalysis(String point);
-
- /**
- * 根据参数查询网格数据
- * @param place
- * @return
- */
- GridVO getGridDetailByParam(PlaceVO place);
-
- /**
- * 网格表 自定义详情
- * @param grid
- * @return
- */
- GridVO getGridDetail(GridVO grid);
-
- /**
- * 网格表 自定义新增或修改
- */
- boolean saveOrUpdateGrid(GridEntity grid);
-
- /**
- * 网格数据同步处理
- */
- Object asyncGridDept();
-
- /**
- * 网格树
- * @param grid
- * @return
- */
- Object getGridTree(GridVO grid);
-
- Object gridInfoByHouseCode(String houseCode);
-
- /**
- * 网格集合查询
- * @param grid
- * @return
- */
- Object getGridList(GridVO grid);
-
- /**
- * 查询小区网格绑定
- * @param aoiCode 小区aoiCode
- * @return
- */
- List<GridVO> getGridListByAoiCode(String aoiCode);
-
- /**
- * 查询对应网格人对应的网格
- * @param userId
- * @return
- */
- GridEntity getGridByUserId(Long userId);
-
- /**
- * 根据网格名称,社区名称查询对应的网格
- * @param gridName
- * @param communityName
- * @return
- */
- GridEntity getGridByNames(String gridName, String communityName);
-
- /**
- * 查询用户对应的网格编号集合
- * @param userId
- * @return
- */
- List<String> getGridListByUserId(Long userId);
-
- /**
- * 查询对应的房屋地址code(更加网格编号集合)
- * @param gridCodeList
- * @return
- */
- List<String> getAddressCodeListByGridCodeList(String communityCode, List<String> gridCodeList);
-
- /**
- * 根据社区编号及网格编号集合查询对应的网格信息
- * @param communityCode
- * @param gridCodeList
- * @return
- */
- List<GridVO> getGridListByComAndList(String communityCode, List<String> gridCodeList);
-
- /**
- * 根据社区名称和网格名称查询对应的网格信息
- * @param communityName
- * @param gridName
- * @return
- */
- GridEntity getGridInfoByParam(String communityName, String gridName);
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/IGridWorkLogService.java b/src/main/java/org/springblade/modules/grid/service/IGridWorkLogService.java
deleted file mode 100644
index 451b76c..0000000
--- a/src/main/java/org/springblade/modules/grid/service/IGridWorkLogService.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.modules.grid.vo.GridWorkLogVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 网格工作日志表 服务类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public interface IGridWorkLogService extends IService<GridWorkLogEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridWorkLog
- * @return
- */
- IPage<GridWorkLogVO> selectGridWorkLogPage(IPage<GridWorkLogVO> page, GridWorkLogVO gridWorkLog);
-
-
- /**
- * 走访日志数量统计
- * @param gridCode 网格编号
- * @param status 状态
- * @return
- */
- Integer getGridWorkCountHandleCount(String gridCode, Integer status);
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/IGridmanService.java b/src/main/java/org/springblade/modules/grid/service/IGridmanService.java
deleted file mode 100644
index a39dfb2..0000000
--- a/src/main/java/org/springblade/modules/grid/service/IGridmanService.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.apache.ibatis.annotations.Param;
-import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.excel.GridmanExcel;
-import org.springblade.modules.grid.vo.GridmanVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 网格员表 服务类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-public interface IGridmanService extends IService<GridmanEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridman
- * @return
- */
- IPage<GridmanVO> selectGridmanPage(IPage<GridmanVO> page, GridmanVO gridman);
-
- /**
- * 网格员表 自定义新增或修改
- * @param gridman
- * @return
- */
- boolean saveOrUpdateGridman(GridmanEntity gridman);
-
- /**
- * 网格员导入
- * @param data
- * @param isCovered
- */
- void importGridman(List<GridmanExcel> data, Boolean isCovered);
-
- /**
- * 网格员查询
- * @param gridman
- * @return
- */
- List<GridmanVO> getGridmanList(GridmanVO gridman);
-
- Object getGridStatistics(String code, String roleType);
-
- /**
- * 网格员表 自定义详情
- */
- GridmanVO getDetail(GridmanEntity gridman);
-
- /**
- * 查询网格id
- * @param userId
- * @return
- */
- Integer getGridIdByUserId(Long userId);
-
- List<UserEntity> getGridManByCode(String houseCode);
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/impl/GridPatrolRecordServiceImpl.java b/src/main/java/org/springblade/modules/grid/service/impl/GridPatrolRecordServiceImpl.java
deleted file mode 100644
index 0580798..0000000
--- a/src/main/java/org/springblade/modules/grid/service/impl/GridPatrolRecordServiceImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.modules.grid.vo.GridPatrolRecordVO;
-import org.springblade.modules.grid.mapper.GridPatrolRecordMapper;
-import org.springblade.modules.grid.service.IGridPatrolRecordService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 网格巡查记录表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Service
-public class GridPatrolRecordServiceImpl extends ServiceImpl<GridPatrolRecordMapper, GridPatrolRecordEntity> implements IGridPatrolRecordService {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param gridPatrolRecord
- * @return
- */
- @Override
- public IPage<GridPatrolRecordVO> selectGridPatrolRecordPage(IPage<GridPatrolRecordVO> page, GridPatrolRecordVO gridPatrolRecord) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(GridPatrolRecordVO.class, gridPatrolRecord);
- if (!Strings.isBlank(gridPatrolRecord.getRoleName())) {
- gridPatrolRecord.setCreateUser(AuthUtils.getUserId());
- }
- return page.setRecords(baseMapper.selectGridPatrolRecordPage(page,
- gridPatrolRecord,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator()));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/impl/GridRangeServiceImpl.java b/src/main/java/org/springblade/modules/grid/service/impl/GridRangeServiceImpl.java
deleted file mode 100644
index 681caf4..0000000
--- a/src/main/java/org/springblade/modules/grid/service/impl/GridRangeServiceImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.vo.GridRangeVO;
-import org.springblade.modules.grid.mapper.GridRangeMapper;
-import org.springblade.modules.grid.service.IGridRangeService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * 网格范围表 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class GridRangeServiceImpl extends ServiceImpl<GridRangeMapper, GridRangeEntity> implements IGridRangeService {
-
- @Autowired
- private IGridService gridService;
-
- @Override
- public IPage<GridRangeVO> selectGridRangePage(IPage<GridRangeVO> page, GridRangeVO gridRange) {
- return page.setRecords(baseMapper.selectGridRangePage(page, gridRange));
- }
-
- /**
- * 网格范围表数据处理
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Object dataHandle() {
- // 查询test 数据表数据
- List<GridVO> list = baseMapper.getTestGridData();
- // 匹配
- for (GridVO gridVO : list) {
- QueryWrapper<GridEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("grid_name",gridVO.getGridName())
- .eq("community_name",gridVO.getCommunityName())
- .eq("is_deleted",0);
- GridEntity one = gridService.getOne(wrapper);
- if (null!=one){
- // 查询是否已存在绑定关系,已有则不新增
- QueryWrapper<GridRangeEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("grid_id",one.getId()).eq("house_code",gridVO.getPrincipal());
- GridRangeEntity gridRangeEntity = getOne(queryWrapper);
- if (null== gridRangeEntity) {
- GridRangeEntity rangeEntity = new GridRangeEntity();
- rangeEntity.setGridId(one.getId());
- rangeEntity.setHouseCode(gridVO.getPrincipal());
- // 新增
- save(rangeEntity);
- }
- }
- }
- return null;
- }
-
- /**
- * 根据房屋查询对应的小区
- * @param houseCode
- * @return
- */
- @Override
- public String getDistrictIdByHouseCode(String houseCode) {
- return baseMapper.getDistrictIdByHouseCode(houseCode);
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/impl/GridServiceImpl.java b/src/main/java/org/springblade/modules/grid/service/impl/GridServiceImpl.java
deleted file mode 100644
index bb0117b..0000000
--- a/src/main/java/org/springblade/modules/grid/service/impl/GridServiceImpl.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.excel.GridExcel;
-import org.springblade.modules.grid.mapper.GridMapper;
-import org.springblade.modules.grid.service.IGridRangeService;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.service.IDeptService;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.task.vo.TaskVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-
-/**
- * 网格表 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class GridServiceImpl extends ServiceImpl<GridMapper, GridEntity> implements IGridService {
-
- @Autowired
- private IRegionService regionService;
-
- @Autowired
- private IDoorplateAddressService doorplateAddressService;
-
- @Autowired
- private IGridRangeService gridRangeService;
-
- @Autowired
- private IDeptService deptService;
-
- @Override
- public IPage<GridVO> selectGridPage(IPage<GridVO> page, GridVO grid) {
-// List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
-// Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2;
- CommonParamSet commonParamSet = new CommonParamSet().invoke(GridVO.class, grid);
- return page.setRecords(baseMapper.selectGridPage(page, grid,commonParamSet.getRegionChildCodesList(),commonParamSet.getIsAdministrator()));
- }
-
- /**
- * 网格数导入
- * @param data
- * @param isCovered
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void importGrid(List<GridExcel> data, Boolean isCovered) {
- List<GridEntity> list = new ArrayList<>();
- // 遍历
- for (GridExcel gridExcel : data) {
- // 取出名称分隔
- String[] split = gridExcel.getGridName().split("第");
- GridEntity gridEntity = new GridEntity();
- // 通过社区名称查询对应的社区编号
- QueryWrapper<Region> wrapper = new QueryWrapper<>();
- wrapper.like("name",split[0]);
- System.out.println("社区名称 = " + split[0]);
- Region region = regionService.getOne(wrapper);
- if (null!=region){
- gridEntity.setCommunityCode(region.getCode());
- }
- // 比对网格是否存在,如果已存在则更新,否则则新增
- QueryWrapper<GridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0)
- .eq("grid_name","第" + split[1])
- .eq("community_code",region.getCode());
- GridEntity one = getOne(queryWrapper);
- if (null!=one){
- one.setGridCode(gridExcel.getGridCode());
- one.setGridName("第" + split[1]);
- one.setGeom(gridExcel.getGeom());
- one.setUpdateUser(AuthUtil.getUserId());
- one.setUpdateTime(new Date());
- // 更新
- updateById(one);
- }else {
- // 设置网格数据
- gridEntity.setGridCode(gridExcel.getGridCode());
- gridEntity.setGridName("第" + split[1]);
- gridEntity.setGeom(gridExcel.getGeom());
- gridEntity.setCreateUser(AuthUtil.getUserId());
- gridEntity.setCreateTime(new Date());
- gridEntity.setUpdateUser(AuthUtil.getUserId());
- gridEntity.setUpdateTime(new Date());
- list.add(gridEntity);
- }
- }
- // 批量导入
- saveBatch(list);
- }
-
- /**
- * 根据地址编号查询网格数据
- * @param houseCode
- * @return
- */
- @Override
- public GridVO getPlaceGridDetailByHouseCode(String houseCode) {
- return baseMapper.getPlaceGridDetailByHouseCode(houseCode);
- }
-
- /**
- * 根据用户id(网格员)查询对应的房屋地址code
- * @param userId
- * @return
- */
- @Override
- public List<String> getAddressCodeListByUserId(Long userId,String addressCode) {
- return baseMapper.getAddressCodeListByUserId(userId,addressCode);
- }
-
- /**
- * 空间分析 mysql 5.7
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Object spatialAnalysis(DoorplateAddressEntity addressEntity) {
- // 按社区
- String name = null;
-// String name = "茶山路社区居民委员会";
- //查询社区信息
- List<DoorplateAddressEntity> doorplateAddressEntities = doorplateAddressService.getAllDoorplateAddress(addressEntity);
- //遍历
- for (DoorplateAddressEntity doorplateAddressEntity : doorplateAddressEntities) {
- //点坐标解析
- String point = "'POINT(" + doorplateAddressEntity.getX() + " " + doorplateAddressEntity.getY() +")'";
-// String point = "'POINT(" + villageInfoExcel.getLatitude() + " " + villageInfoExcel.getLongitude() +")'";
- List<GridEntity> gridEntityList = baseMapper.spatialAnalysis(point);
- if (gridEntityList.size()>0) {
- GridEntity gridEntity = gridEntityList.get(0);
- QueryWrapper<GridRangeEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("grid_id",gridEntity.getId()).eq("house_code",doorplateAddressEntity.getAddressCode());
- GridRangeEntity one = gridRangeService.getOne(queryWrapper);
- if (null==one) {
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setGridId(gridEntity.getId());
- gridRangeEntity.setHouseCode(doorplateAddressEntity.getAddressCode());
- gridRangeEntity.setDistrictCode(doorplateAddressEntity.getAoiCode());
- gridRangeEntity.setDistrictName(doorplateAddressEntity.getAoiName());
- // 保存
- gridRangeService.save(gridRangeEntity);
- }else {
- one.setGridId(gridEntity.getId());
- // 更新
- gridRangeService.updateById(one);
- }
- }
- }
- return null;
- }
-
- /**
- * 空间分析
- */
- @Override
- public List<GridEntity> spatialAnalysis(String point) {
- return baseMapper.spatialAnalysis(point);
- }
-
- /**
- * 根据参数查询网格数据
- * @param place
- * @return
- */
- @Override
- public GridVO getGridDetailByParam(PlaceVO place) {
- return baseMapper.getGridDetailByParam(place);
- }
-
- /**
- * 网格表 自定义详情
- * @param grid
- * @return
- */
- @Override
- public GridVO getGridDetail(GridVO grid) {
- return baseMapper.getGridDetail(grid);
- }
-
- /**
- * 网格表 自定义新增或修改
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean saveOrUpdateGrid(GridEntity grid) {
- boolean flag = false;
- if (null!=grid.getId()) {
- // 更新
- flag = updateById(grid);
- }else {
- // 先查询当前网格社区对应的机构id
- QueryWrapper<Region> regionWrapper = new QueryWrapper<>();
- regionWrapper.eq("code", grid.getCommunityCode());
- Region region = regionService.getOne(regionWrapper);
- // 查询父机构(社区机构)
- System.out.println("社区名称 = " + region.getName());
- QueryWrapper<Dept> wrapper = new QueryWrapper<>();
- wrapper.eq("dept_name", region.getName())
- .eq("dept_nature", 2)
- .eq("is_deleted", 0);
- Dept dept = deptService.getOne(wrapper);
- // 查询当前网格在机构中是否存在,存在不做操作,否则则新增
- QueryWrapper<Dept> wrapperChild = new QueryWrapper<>();
- wrapperChild.eq("dept_name", grid.getGridName())
- .eq("is_deleted", 0)
- .eq("dept_nature", 2)
- .eq("parent_id", dept.getId());
- List<Dept> deptChild = deptService.list(wrapperChild);
- if (deptChild.size() == 0) {
- Dept deptInfo = new Dept();
- deptInfo.setParentId(dept.getId());
- deptInfo.setFullName(grid.getGridName());
- deptInfo.setDeptName(grid.getGridName());
- deptInfo.setDeptCategory(1);
- // 综治
- deptInfo.setDeptNature(2);
- deptInfo.setTenantId("000000");
- deptInfo.setRegionCode(grid.getGridCode());
- deptInfo.setAncestors(dept.getAncestors() + "," + dept.getId());
- // 新增
- deptService.save(deptInfo);
- // 查询网格是否已存在(社区编号-网格名称),已存在更新,不存在插入新的
- QueryWrapper<GridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("grid_code", grid.getGridCode())
- .eq("is_deleted", 0);
- System.out.println("网格编号 = " + grid.getGridCode());
- GridEntity one = getOne(queryWrapper);
- if (null != one) {
- grid.setId(one.getId());
- grid.setDeptId(deptInfo.getId());
- if (null != grid.getGeom() && grid.getGeom().equals("")) {
- grid.setGeom(null);
- }
- // 更新
- flag = updateById(grid);
- } else {
- grid.setDeptId(deptInfo.getId());
- grid.setGeom(null);
- // 插入
- flag = save(grid);
- }
- }
- }
- return flag;
- }
-
- /**
- * 网格数据同步处理
- */
- @Override
- public Object asyncGridDept() {
- List<GridEntity> list = baseMapper.selectGridAll();
- for (GridEntity gridEntity : list) {
- saveOrUpdateGrid(gridEntity);
- }
- return null;
- }
-
- /**
- * 网格树
- *
- * @param grid
- * @return
- */
- @Override
- public Object getGridTree(GridVO grid) {
- return NodeTreeUtil.getStringNodeTree(baseMapper.getGridTree());
- }
-
-
- @Override
- public Object gridInfoByHouseCode(String houseCode) {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- List<GridmanEntity> gridmanEntities = baseMapper.gridInfo(houseCode);
- if (gridmanEntities.size()>0) {
- Integer id = gridmanEntities.get(0).getId();
- objectObjectHashMap.put("grid", gridmanEntities);
- List<DoorplateAddressEntity> result = baseMapper.gridAoiName(id);
- objectObjectHashMap.put("doorplateAddress", result);
- }
- return objectObjectHashMap;
- }
-
- /**
- * 网格集合查询
- * @param grid
- * @return
- */
- @Override
- public Object getGridList(GridVO grid) {
- return baseMapper.getGridList(grid);
- }
-
- /**
- * 查询小区网格绑定
- * @param aoiCode 小区aoiCode
- * @return
- */
- @Override
- public List<GridVO> getGridListByAoiCode(String aoiCode) {
- return baseMapper.getGridListByAoiCode(aoiCode);
- }
-
- /**
- * 查询对应网格人对应的网格
- * @param userId
- * @return
- */
- @Override
- public GridEntity getGridByUserId(Long userId) {
- return baseMapper.getGridByUserId(userId);
- }
-
- /**
- * 根据网格名称,社区名称查询对应的网格
- * @param gridName
- * @param communityName
- * @return
- */
- @Override
- public GridEntity getGridByNames(String gridName, String communityName) {
- return baseMapper.getGridByNames(gridName,communityName);
- }
-
- /**
- * 查询用户对应的网格
- * @param userId
- * @return
- */
- @Override
- public List<String> getGridListByUserId(Long userId) {
- return baseMapper.getGridListByUserId(userId.toString());
- }
-
- /**
- * 查询对应的房屋地址code(更加网格编号集合)
- * @param gridCodeList
- * @return
- */
- @Override
- public List<String> getAddressCodeListByGridCodeList(String communityCode, List<String> gridCodeList) {
- return baseMapper.getAddressCodeListByGridCodeList(communityCode,gridCodeList);
- }
-
- /**
- * 根据社区编号及网格编号集合查询对应的网格信息
- * @param communityCode
- * @param gridCodeList
- * @return
- */
- @Override
- public List<GridVO> getGridListByComAndList(String communityCode, List<String> gridCodeList) {
- return baseMapper.getGridListByComAndList(communityCode,gridCodeList);
- }
-
- /**
- * 根据社区名称和网格名称查询对应的网格信息
- * @param communityName
- * @param gridName
- * @return
- */
- @Override
- public GridEntity getGridInfoByParam(String communityName, String gridName) {
- return baseMapper.getGridInfoByParam(communityName,gridName);
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/impl/GridWorkLogServiceImpl.java b/src/main/java/org/springblade/modules/grid/service/impl/GridWorkLogServiceImpl.java
deleted file mode 100644
index b5218da..0000000
--- a/src/main/java/org/springblade/modules/grid/service/impl/GridWorkLogServiceImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.service.IGridmanService;
-import org.springblade.modules.grid.vo.GridWorkLogVO;
-import org.springblade.modules.grid.mapper.GridWorkLogMapper;
-import org.springblade.modules.grid.service.IGridWorkLogService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.service.IDeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 网格工作日志表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Service
-public class GridWorkLogServiceImpl extends ServiceImpl<GridWorkLogMapper, GridWorkLogEntity> implements IGridWorkLogService {
-
- @Override
- public IPage<GridWorkLogVO> selectGridWorkLogPage(IPage<GridWorkLogVO> page, GridWorkLogVO gridWorkLog) {
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(GridWorkLogVO.class,gridWorkLog);
- if (!Strings.isBlank(gridWorkLog.getRoleName()) && gridWorkLog.getRoleName().equals("网格员")){
- gridWorkLog.setGridId(getGridId());
- }
- return page.setRecords(baseMapper.selectGridWorkLogPage(page,
- gridWorkLog,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList(),
- commonParamSet.getIsAdministrator()));
- }
- /**
- * 获取网格员id
- * @return
- */
- private Integer getGridId() {
- QueryWrapper<GridmanEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted",0).eq("user_id",AuthUtil.getUserId());
- List<GridmanEntity> list = SpringUtils.getBean(IGridmanService.class).list(wrapper);
- if (list.size()>0){
- return list.get(0).getGridId();
- }
- return null;
- }
-
- /**
- * 走访日志数量统计
- * @param gridCode 网格编号
- * @param status 状态
- * @return
- */
- @Override
- public Integer getGridWorkCountHandleCount(String gridCode, Integer status) {
- return baseMapper.getGridWorkCountHandleCount(gridCode,status);
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/service/impl/GridmanServiceImpl.java b/src/main/java/org/springblade/modules/grid/service/impl/GridmanServiceImpl.java
deleted file mode 100644
index f9bc88c..0000000
--- a/src/main/java/org/springblade/modules/grid/service/impl/GridmanServiceImpl.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.excel.GridmanExcel;
-import org.springblade.modules.grid.mapper.GridmanMapper;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.service.IGridmanService;
-import org.springblade.modules.grid.vo.GridmanVO;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IDeptService;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * 网格员表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Service
-public class GridmanServiceImpl extends ServiceImpl<GridmanMapper, GridmanEntity> implements IGridmanService {
-
- @Autowired
- private IUserService userService;
-
- @Autowired
- private IGridService gridService;
-
- @Override
- public IPage<GridmanVO> selectGridmanPage(IPage<GridmanVO> page, GridmanVO gridman) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(GridmanVO.class, gridman);
- return page.setRecords(baseMapper.selectGridmanPage(page, gridman, commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator()));
- }
-
- /**
- * 网格员表 自定义新增或修改
- *
- * @param gridman
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean saveOrUpdateGridman(GridmanEntity gridman) {
- boolean flag = false;
- // 查询网格id
- IGridService bean = SpringUtil.getBean(IGridService.class);
- GridEntity gridEntity = bean.getOne(Wrappers.<GridEntity>lambdaQuery().eq(GridEntity::getGridCode, gridman.getGridCode()));
- // 修改
- if (null != gridman.getId()) {
- // 更新网格id
- gridman.setGridId(gridEntity.getId());
- // 更新网格员信息
- flag = updateById(gridman);
- } else {
- // 新增
- // 先判断用户表中是否已存在该用户,如果已存在则不新增,需要更新角色
- QueryWrapper<User> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("account", gridman.getMobile());
- List<User> list = userService.list(wrapper);
- // 更新用户,查询是否需要更新角色
- gridman.setGridId(gridEntity.getId());
- if (list.size() > 0) {
- // 默认取出第一个
- User user = list.get(0);
- // 判断角色是否包好网格员的角色,如果没有则加入网格员的角色,有则不更改
- if (!user.getRoleId().contains("1717429261910528001")) {
- user.setRoleId(user.getRoleId() + "," + "1717429261910528001");
- // 更新用户信息
- userService.updateById(user);
- }
- //插入网格员信息
- gridman.setUserId(user.getId());
- //匹配
- QueryWrapper<GridmanEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0)
- .eq("grid_id", gridman.getGridId())
- .eq("user_id", gridman.getUserId());
- GridmanEntity one = getOne(queryWrapper);
- if (null == one) {
- flag = save(gridman);
- }
- } else {
- saveUser(gridman);
- //匹配
- QueryWrapper<GridmanEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0)
- .eq("grid_id", gridman.getGridId())
- .eq("user_id", gridman.getUserId());
- GridmanEntity one = getOne(queryWrapper);
- if (null == one) {
- flag = save(gridman);
- }
- }
- }
- // 返回
- return flag;
- }
-
- /**
- * 用户新增
- *
- * @param gridman
- */
- public void saveUser(GridmanEntity gridman) {
- // 新增用户
- User userInfo = new User();
- // 设置机构
- GridEntity gridEntity = gridService.getById(gridman.getGridId());
- if (null != gridEntity) {
- userInfo.setDeptId(gridEntity.getDeptId().toString());
- }
- // 设置账号信息
- userInfo.setAccount(gridman.getMobile());
- userInfo.setPhone(gridman.getMobile());
- userInfo.setName(gridman.getGridmanName());
- userInfo.setRealName(gridman.getGridmanName());
- // 设置网格员角色
- userInfo.setRoleId("1717429261910528001");
- // 设置密码,默认密码为 123456
- userInfo.setPassword("123456");
- // 插入用户
- userService.submit(userInfo);
- // 设置网格信息
- gridman.setUserId(userInfo.getId());
- }
-
- /**
- * 网格员导入
- *
- * @param data
- * @param isCovered
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void importGridman(List<GridmanExcel> data, Boolean isCovered) {
- // 遍历
- for (GridmanExcel gridmanExcel : data) {
- // 先查询是否有对应的用户
- List<User> userList = userService.getUserListByPhoneOrAccount(gridmanExcel.getMobile());
- if (userList.size()>0){
- User user = userList.get(0);
- // 判断角色是否包好网格员的角色,如果没有则加入网格员的角色,有则不更改
- if (!user.getRoleId().contains("1717429261910528001")) {
- // 更新角色
- user.setRoleId(user.getRoleId() + "," + "1717429261910528001");
- // 更新机构
- setDeptId(gridmanExcel,user);
- // 更新用户信息
- userService.updateById(user);
- // 更新网格员绑定
- updateGridmanBind(gridmanExcel,user);
- }
- }else {
- // 创建用户
- User user = new User();
- user.setTenantId("000000");
- user.setUserType(1);
- user.setRoleId("1717429261910528001");
- user.setName(gridmanExcel.getGridmanName());
- user.setRealName(gridmanExcel.getGridmanName());
- user.setPhone(gridmanExcel.getMobile());
- user.setAccount(gridmanExcel.getMobile());
- // 更新机构
- setDeptId(gridmanExcel,user);
- // 设置默认密码
- user.setPassword("123456");
- // 保存
- userService.submit(user);
- // 更新网格员绑定
- updateGridmanBind(gridmanExcel,user);
- }
-
- }
- }
-
- /**
- * 更新网格员绑定
- * @param gridmanExcel
- * @param user
- */
- public void updateGridmanBind(GridmanExcel gridmanExcel, User user) {
- // 保存更新网格员信息
- GridmanEntity gridmanEntity = Objects.requireNonNull(BeanUtil.copy(gridmanExcel, GridmanEntity.class));
- // 通过社区名称和网格名称获取网格id
- QueryWrapper<GridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0)
- .eq("grid_code", gridmanExcel.getGridCode());
- GridEntity gridEntity = gridService.getOne(queryWrapper);
- // 设置网格id
- gridmanEntity.setGridId(gridEntity.getId());
- gridmanEntity.setUserId(user.getId());
- // 插入网格员
- // 判断是否已存,已存在则更新,否则插入
- QueryWrapper<GridmanEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted",0).eq("user_id",user.getId()).eq("grid_code",gridmanExcel.getGridCode());
- GridmanEntity entity = getOne(wrapper);
- if (null!=entity){
- gridmanEntity.setId(entity.getId());
- updateById(gridmanEntity);
- }else {
- save(gridmanEntity);
- }
- }
-
- /**
- * 更新机构
- * @param gridmanExcel
- * @param user
- */
- public void setDeptId(GridmanExcel gridmanExcel, User user) {
- // 通过社区编号查询对应的机构id
- Region region = SpringUtil.getBean(IRegionService.class).getById(gridmanExcel.getCommunityCode());
- // 查询社区对应的机构
- QueryWrapper<Dept> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted",0).eq("dept_name",region.getName());
- Dept dept = SpringUtil.getBean(IDeptService.class).getOne(wrapper);
- // 查询网格对应的机构
- QueryWrapper<Dept> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).
- eq("parent_id",dept.getId()).
- eq("dept_name",gridmanExcel.getGridName());
- System.out.println("网格名称 = " + gridmanExcel.getGridName());
- Dept deptGrid = SpringUtil.getBean(IDeptService.class).getOne(queryWrapper);
- // 设置机构
- user.setDeptId(deptGrid.getId().toString());
- }
-
- /**
- * 网格员查询
- *
- * @param gridman
- * @return
- */
- @Override
- public List<GridmanVO> getGridmanList(GridmanVO gridman) {
- return baseMapper.getGridmanList(gridman);
- }
-
- @Override
- public Object getGridStatistics(String code, String roleType) {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- if (roleType.equals("2")) {
- Integer gridStatistics = baseMapper.getGridStatistics(code, null, roleType);
- Integer companyStatistics = baseMapper.getCompanyStatistics(code, null, roleType);
- Integer ownersCommitteeStatistics = baseMapper.getOwnersCommitteeStatistics(code, null, roleType);
- objectObjectHashMap.put("gridStatistics", gridStatistics);
- objectObjectHashMap.put("companyStatistics", companyStatistics);
- objectObjectHashMap.put("ownersStatistics", ownersCommitteeStatistics);
- } else {
- Integer gridStatistics = baseMapper.getGridStatistics(code, AuthUtil.getUserId(), roleType);
- Integer companyStatistics = baseMapper.getCompanyStatistics(code, AuthUtil.getUserId(), roleType);
- Integer ownersCommitteeStatistics = baseMapper.getOwnersCommitteeStatistics(code, AuthUtil.getUserId(), roleType);
- objectObjectHashMap.put("gridStatistics", gridStatistics);
- objectObjectHashMap.put("companyStatistics", companyStatistics);
- objectObjectHashMap.put("ownersStatistics", ownersCommitteeStatistics);
-
- }
- return objectObjectHashMap;
- }
-
- /**
- * 网格员表 自定义详情
- */
- @Override
- public GridmanVO getDetail(GridmanEntity gridman) {
- return baseMapper.getDetail(gridman);
- }
-
- /**
- * 查询网格id
- *
- * @param userId
- * @return
- */
- @Override
- public Integer getGridIdByUserId(Long userId) {
- return baseMapper.getGridIdByUserId(userId);
- }
-
- @Override
- public List<UserEntity> getGridManByCode(String houseCode) {
- return baseMapper.getGridManByCode(houseCode);
- }
-}
diff --git a/src/main/java/org/springblade/modules/grid/vo/GridPatrolRecordVO.java b/src/main/java/org/springblade/modules/grid/vo/GridPatrolRecordVO.java
deleted file mode 100644
index e1ddd41..0000000
--- a/src/main/java/org/springblade/modules/grid/vo/GridPatrolRecordVO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.vo;
-
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格巡查记录表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridPatrolRecordVO extends GridPatrolRecordEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/vo/GridRangeVO.java b/src/main/java/org/springblade/modules/grid/vo/GridRangeVO.java
deleted file mode 100644
index d7c8f1c..0000000
--- a/src/main/java/org/springblade/modules/grid/vo/GridRangeVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.vo;
-
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格范围表 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridRangeVO extends GridRangeEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/vo/GridVO.java b/src/main/java/org/springblade/modules/grid/vo/GridVO.java
deleted file mode 100644
index 566810e..0000000
--- a/src/main/java/org/springblade/modules/grid/vo/GridVO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格表 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridVO extends GridEntity {
- private static final long serialVersionUID = 1L;
-
- private String realName;
-
- private String gridPhone;
-
- /**
- * 社区名称
- */
- private String communityName;
-
- /**
- * 街道名称
- */
- private String townName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/vo/GridWorkLogVO.java b/src/main/java/org/springblade/modules/grid/vo/GridWorkLogVO.java
deleted file mode 100644
index 8c5ec38..0000000
--- a/src/main/java/org/springblade/modules/grid/vo/GridWorkLogVO.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格工作日志表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridWorkLogVO extends GridWorkLogEntity {
- private static final long serialVersionUID = 1L;
- /**
- * 被访人姓名
- */
- @ApiModelProperty(value = "被访人姓名")
- private String name;
- /**
- * 被访人电话
- */
- @ApiModelProperty(value = "被访人电话")
- private String phone;
- /**
- * 被访人地址
- */
- @ApiModelProperty(value = "被访人地址")
- private String address;
-
- /**
- * 街道名称
- */
- @ApiModelProperty(value = "街道名称")
- private String townName;
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称")
- private String neiName;
-
- /**
- * 网格名称
- */
- @ApiModelProperty(value = "网格名称")
- private String gridName;
-
- /**
- * 网格id
- */
- private Integer gridId;
-
- /**
- * 创建人姓名
- */
- @ApiModelProperty(value = "创建人姓名")
- private String createUserName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 地址编码
- */
- private String houseCode;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/vo/GridmanVO.java b/src/main/java/org/springblade/modules/grid/vo/GridmanVO.java
deleted file mode 100644
index 688741e..0000000
--- a/src/main/java/org/springblade/modules/grid/vo/GridmanVO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 网格员表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GridmanVO extends GridmanEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 社区名称
- */
- private String communityName;
-
- /**
- * 街道名称
- */
- private String townName;
-
- /**
- * 网格名称
- */
- private String gridName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-}
diff --git a/src/main/java/org/springblade/modules/grid/wrapper/GridPatrolRecordWrapper.java b/src/main/java/org/springblade/modules/grid/wrapper/GridPatrolRecordWrapper.java
deleted file mode 100644
index 624cf4f..0000000
--- a/src/main/java/org/springblade/modules/grid/wrapper/GridPatrolRecordWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.modules.grid.vo.GridPatrolRecordVO;
-import java.util.Objects;
-
-/**
- * 网格巡查记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public class GridPatrolRecordWrapper extends BaseEntityWrapper<GridPatrolRecordEntity, GridPatrolRecordVO> {
-
- public static GridPatrolRecordWrapper build() {
- return new GridPatrolRecordWrapper();
- }
-
- @Override
- public GridPatrolRecordVO entityVO(GridPatrolRecordEntity gridPatrolRecord) {
- GridPatrolRecordVO gridPatrolRecordVO = Objects.requireNonNull(BeanUtil.copy(gridPatrolRecord, GridPatrolRecordVO.class));
-
- //User createUser = UserCache.getUser(gridPatrolRecord.getCreateUser());
- //User updateUser = UserCache.getUser(gridPatrolRecord.getUpdateUser());
- //gridPatrolRecordVO.setCreateUserName(createUser.getName());
- //gridPatrolRecordVO.setUpdateUserName(updateUser.getName());
-
- return gridPatrolRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/wrapper/GridRangeWrapper.java b/src/main/java/org/springblade/modules/grid/wrapper/GridRangeWrapper.java
deleted file mode 100644
index 0a33d72..0000000
--- a/src/main/java/org/springblade/modules/grid/wrapper/GridRangeWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.vo.GridRangeVO;
-import java.util.Objects;
-
-/**
- * 网格范围表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class GridRangeWrapper extends BaseEntityWrapper<GridRangeEntity, GridRangeVO> {
-
- public static GridRangeWrapper build() {
- return new GridRangeWrapper();
- }
-
- @Override
- public GridRangeVO entityVO(GridRangeEntity gridRange) {
- GridRangeVO gridRangeVO = Objects.requireNonNull(BeanUtil.copy(gridRange, GridRangeVO.class));
-
- //User createUser = UserCache.getUser(gridRange.getCreateUser());
- //User updateUser = UserCache.getUser(gridRange.getUpdateUser());
- //gridRangeVO.setCreateUserName(createUser.getName());
- //gridRangeVO.setUpdateUserName(updateUser.getName());
-
- return gridRangeVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/wrapper/GridWorkLogWrapper.java b/src/main/java/org/springblade/modules/grid/wrapper/GridWorkLogWrapper.java
deleted file mode 100644
index 7ecb7e0..0000000
--- a/src/main/java/org/springblade/modules/grid/wrapper/GridWorkLogWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.modules.grid.vo.GridWorkLogVO;
-import java.util.Objects;
-
-/**
- * 网格工作日志表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public class GridWorkLogWrapper extends BaseEntityWrapper<GridWorkLogEntity, GridWorkLogVO> {
-
- public static GridWorkLogWrapper build() {
- return new GridWorkLogWrapper();
- }
-
- @Override
- public GridWorkLogVO entityVO(GridWorkLogEntity gridWorkLog) {
- GridWorkLogVO gridWorkLogVO = Objects.requireNonNull(BeanUtil.copy(gridWorkLog, GridWorkLogVO.class));
-
- //User createUser = UserCache.getUser(gridWorkLog.getCreateUser());
- //User updateUser = UserCache.getUser(gridWorkLog.getUpdateUser());
- //gridWorkLogVO.setCreateUserName(createUser.getName());
- //gridWorkLogVO.setUpdateUserName(updateUser.getName());
-
- return gridWorkLogVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/wrapper/GridWrapper.java b/src/main/java/org/springblade/modules/grid/wrapper/GridWrapper.java
deleted file mode 100644
index 35eec51..0000000
--- a/src/main/java/org/springblade/modules/grid/wrapper/GridWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.vo.GridVO;
-import java.util.Objects;
-
-/**
- * 网格表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class GridWrapper extends BaseEntityWrapper<GridEntity, GridVO> {
-
- public static GridWrapper build() {
- return new GridWrapper();
- }
-
- @Override
- public GridVO entityVO(GridEntity grid) {
- GridVO gridVO = Objects.requireNonNull(BeanUtil.copy(grid, GridVO.class));
-
- //User createUser = UserCache.getUser(grid.getCreateUser());
- //User updateUser = UserCache.getUser(grid.getUpdateUser());
- //gridVO.setCreateUserName(createUser.getName());
- //gridVO.setUpdateUserName(updateUser.getName());
-
- return gridVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/grid/wrapper/GridmanWrapper.java b/src/main/java/org/springblade/modules/grid/wrapper/GridmanWrapper.java
deleted file mode 100644
index 15df04c..0000000
--- a/src/main/java/org/springblade/modules/grid/wrapper/GridmanWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.grid.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.grid.vo.GridmanVO;
-import java.util.Objects;
-
-/**
- * 网格员表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-27
- */
-public class GridmanWrapper extends BaseEntityWrapper<GridmanEntity, GridmanVO> {
-
- public static GridmanWrapper build() {
- return new GridmanWrapper();
- }
-
- @Override
- public GridmanVO entityVO(GridmanEntity gridman) {
- GridmanVO gridmanVO = Objects.requireNonNull(BeanUtil.copy(gridman, GridmanVO.class));
-
- //User createUser = UserCache.getUser(gridman.getCreateUser());
- //User updateUser = UserCache.getUser(gridman.getUpdateUser());
- //gridmanVO.setCreateUserName(createUser.getName());
- //gridmanVO.setUpdateUserName(updateUser.getName());
-
- return gridmanVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/controller/HiddenDangerRecordController.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/controller/HiddenDangerRecordController.java
deleted file mode 100644
index 6f7151c..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/controller/HiddenDangerRecordController.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import org.springblade.modules.hiddenDangerRecord.vo.HiddenDangerRecordVO;
-import org.springblade.modules.hiddenDangerRecord.wrapper.HiddenDangerRecordWrapper;
-import org.springblade.modules.hiddenDangerRecord.service.IHiddenDangerRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 隐患记录表 控制器
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-hiddenDangerRecord/hiddenDangerRecord")
-@Api(value = "隐患记录表", tags = "隐患记录表接口")
-public class HiddenDangerRecordController extends BladeController {
-
- private final IHiddenDangerRecordService hiddenDangerRecordService;
-
- /**
- * 隐患记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入hiddenDangerRecord")
- public R<HiddenDangerRecordVO> detail(HiddenDangerRecordEntity hiddenDangerRecord) {
- HiddenDangerRecordEntity detail = hiddenDangerRecordService.getOne(Condition.getQueryWrapper(hiddenDangerRecord));
- return R.data(HiddenDangerRecordWrapper.build().entityVO(detail));
- }
- /**
- * 隐患记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入hiddenDangerRecord")
- public R<IPage<HiddenDangerRecordVO>> list(HiddenDangerRecordEntity hiddenDangerRecord, Query query) {
- IPage<HiddenDangerRecordEntity> pages = hiddenDangerRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(hiddenDangerRecord));
- return R.data(HiddenDangerRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 隐患记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入hiddenDangerRecord")
- public R<IPage<HiddenDangerRecordVO>> page(HiddenDangerRecordVO hiddenDangerRecord, Query query) {
- IPage<HiddenDangerRecordVO> pages = hiddenDangerRecordService.selectHiddenDangerRecordPage(Condition.getPage(query), hiddenDangerRecord);
- return R.data(pages);
- }
-
- /**
- * 隐患记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入hiddenDangerRecord")
- public R save(@Valid @RequestBody HiddenDangerRecordEntity hiddenDangerRecord) {
- return R.status(hiddenDangerRecordService.save(hiddenDangerRecord));
- }
-
- /**
- * 隐患记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入hiddenDangerRecord")
- public R update(@Valid @RequestBody HiddenDangerRecordEntity hiddenDangerRecord) {
- return R.status(hiddenDangerRecordService.updateById(hiddenDangerRecord));
- }
-
- /**
- * 隐患记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入hiddenDangerRecord")
- public R submit(@Valid @RequestBody HiddenDangerRecordEntity hiddenDangerRecord) {
- return R.status(hiddenDangerRecordService.saveOrUpdate(hiddenDangerRecord));
- }
-
- /**
- * 隐患记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(hiddenDangerRecordService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
- /**
- * 隐患记录表 新增
- */
- @PostMapping("/add")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "扫码新增", notes = "传入hiddenDangerRecord")
- public R add(@Valid @RequestBody HiddenDangerRecordEntity hiddenDangerRecord) {
- return R.status(hiddenDangerRecordService.add(hiddenDangerRecord));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/dto/HiddenDangerRecordDTO.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/dto/HiddenDangerRecordDTO.java
deleted file mode 100644
index 9513b01..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/dto/HiddenDangerRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.dto;
-
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 隐患记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HiddenDangerRecordDTO extends HiddenDangerRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/entity/HiddenDangerRecordEntity.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/entity/HiddenDangerRecordEntity.java
deleted file mode 100644
index d9407a5..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/entity/HiddenDangerRecordEntity.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 隐患记录表 实体类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Data
-@TableName("jczz_hidden_danger_record")
-@ApiModel(value = "HiddenDangerRecord对象", description = "隐患记录表")
-public class HiddenDangerRecordEntity {
-
- private static final long serialVersionUID = 1L;
-
-
- /**
- * id
- */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 警务网格编码
- */
- @ApiModelProperty(value = "警务网格编码", example = "")
- @TableField("jwwg_code")
- private String jwwgCode;
-
- /**
- * 社区编码
- */
- @ApiModelProperty(value = "社区编码", example = "")
- @TableField("nei_code")
- private String neiCode;
-
- /**
- * 房屋编码
- */
- @ApiModelProperty(value = "房屋编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /**
- * 名称
- */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /**
- * 手机号
- */
- @ApiModelProperty(value = "手机号", example = "")
- @TableField("phone")
- private String phone;
-
- /**
- * 描述
- */
- @ApiModelProperty(value = "描述", example = "")
- @TableField("remark")
- private String remark;
-
- /**
- * 图片
- */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("img_url")
- private String imgUrl;
-
- /**
- * 0:否 1:是
- */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("delete_flag")
- private Integer deleteFlag;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 状态:
- */
- @ApiModelProperty(value = "状态:", example = "")
- @TableField("status")
- private Integer status;
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/mapper/HiddenDangerRecordMapper.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/mapper/HiddenDangerRecordMapper.java
deleted file mode 100644
index 01df15d..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/mapper/HiddenDangerRecordMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.mapper;
-
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import org.springblade.modules.hiddenDangerRecord.vo.HiddenDangerRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 隐患记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-27
- */
-public interface HiddenDangerRecordMapper extends BaseMapper<HiddenDangerRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param hiddenDangerRecord
- * @return
- */
- List<HiddenDangerRecordVO> selectHiddenDangerRecordPage(IPage page, HiddenDangerRecordVO hiddenDangerRecord);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/mapper/HiddenDangerRecordMapper.xml b/src/main/java/org/springblade/modules/hiddenDangerRecord/mapper/HiddenDangerRecordMapper.xml
deleted file mode 100644
index 46c5b68..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/mapper/HiddenDangerRecordMapper.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.hiddenDangerRecord.mapper.HiddenDangerRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="hiddenDangerRecordResultMap" type="org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity">
- </resultMap>
-
-
- <select id="selectHiddenDangerRecordPage" resultMap="hiddenDangerRecordResultMap">
- select * from jczz_hidden_danger_record where is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/service/IHiddenDangerRecordService.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/service/IHiddenDangerRecordService.java
deleted file mode 100644
index 13c1655..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/service/IHiddenDangerRecordService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import org.springblade.modules.hiddenDangerRecord.vo.HiddenDangerRecordVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 隐患记录表 服务类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-public interface IHiddenDangerRecordService extends IService<HiddenDangerRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param hiddenDangerRecord
- * @return
- */
- IPage<HiddenDangerRecordVO> selectHiddenDangerRecordPage(IPage<HiddenDangerRecordVO> page, HiddenDangerRecordVO hiddenDangerRecord);
-
-
- Boolean add(HiddenDangerRecordEntity hiddenDangerRecord);
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/service/impl/HiddenDangerRecordServiceImpl.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/service/impl/HiddenDangerRecordServiceImpl.java
deleted file mode 100644
index f5e61ff..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/service/impl/HiddenDangerRecordServiceImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import org.springblade.modules.hiddenDangerRecord.mapper.HiddenDangerRecordMapper;
-import org.springblade.modules.hiddenDangerRecord.service.IHiddenDangerRecordService;
-import org.springblade.modules.hiddenDangerRecord.vo.HiddenDangerRecordVO;
-import org.springframework.stereotype.Service;
-
-/**
- * 隐患记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Service
-public class HiddenDangerRecordServiceImpl extends ServiceImpl<HiddenDangerRecordMapper, HiddenDangerRecordEntity> implements IHiddenDangerRecordService {
-
- @Override
- public IPage<HiddenDangerRecordVO> selectHiddenDangerRecordPage(IPage<HiddenDangerRecordVO> page, HiddenDangerRecordVO hiddenDangerRecord) {
- return page.setRecords(baseMapper.selectHiddenDangerRecordPage(page, hiddenDangerRecord));
- }
-
- @Override
- public Boolean add(HiddenDangerRecordEntity hiddenDangerRecord) {
- IDoorplateAddressService bean = SpringUtils.getBean(IDoorplateAddressService.class);
- DoorplateAddressEntity one = bean.getOne(Wrappers.<DoorplateAddressEntity>lambdaQuery()
- .eq(DoorplateAddressEntity::getAddressCode, hiddenDangerRecord.getHouseCode()));
- if (one != null) {
- hiddenDangerRecord.setJwwgCode(one.getJwwgCode());
- hiddenDangerRecord.setNeiCode(one.getNeiCode());
- }
- return save(hiddenDangerRecord);
- }
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/vo/HiddenDangerRecordVO.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/vo/HiddenDangerRecordVO.java
deleted file mode 100644
index 0d3b00c..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/vo/HiddenDangerRecordVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.vo;
-
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 隐患记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HiddenDangerRecordVO extends HiddenDangerRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/hiddenDangerRecord/wrapper/HiddenDangerRecordWrapper.java b/src/main/java/org/springblade/modules/hiddenDangerRecord/wrapper/HiddenDangerRecordWrapper.java
deleted file mode 100644
index cc385a6..0000000
--- a/src/main/java/org/springblade/modules/hiddenDangerRecord/wrapper/HiddenDangerRecordWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.hiddenDangerRecord.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.hiddenDangerRecord.entity.HiddenDangerRecordEntity;
-import org.springblade.modules.hiddenDangerRecord.vo.HiddenDangerRecordVO;
-import java.util.Objects;
-
-/**
- * 隐患记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-27
- */
-public class HiddenDangerRecordWrapper extends BaseEntityWrapper<HiddenDangerRecordEntity, HiddenDangerRecordVO> {
-
- public static HiddenDangerRecordWrapper build() {
- return new HiddenDangerRecordWrapper();
- }
-
- @Override
- public HiddenDangerRecordVO entityVO(HiddenDangerRecordEntity hiddenDangerRecord) {
- HiddenDangerRecordVO hiddenDangerRecordVO = Objects.requireNonNull(BeanUtil.copy(hiddenDangerRecord, HiddenDangerRecordVO.class));
-
- //User createUser = UserCache.getUser(hiddenDangerRecord.getCreateUser());
- //User updateUser = UserCache.getUser(hiddenDangerRecord.getUpdateUser());
- //hiddenDangerRecordVO.setCreateUserName(createUser.getName());
- //hiddenDangerRecordVO.setUpdateUserName(updateUser.getName());
-
- return hiddenDangerRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseController.java b/src/main/java/org/springblade/modules/house/controller/HouseController.java
deleted file mode 100644
index bd59573..0000000
--- a/src/main/java/org/springblade/modules/house/controller/HouseController.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.excel.HouseAndHoldExcel;
-import org.springblade.modules.house.excel.HouseAndHoldImporter;
-import org.springblade.modules.house.excel.HouseExcel;
-import org.springblade.modules.house.excel.HouseImporter;
-import org.springblade.modules.house.service.IHouseService;
-import org.springblade.modules.house.vo.HouseParam;
-import org.springblade.modules.house.vo.HouseVO;
-import org.springblade.modules.house.wrapper.HouseWrapper;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-house/house")
-@Api(value = "房屋", tags = "房屋接口")
-public class HouseController extends BladeController {
-
- private final IHouseService houseService;
- private final BladeLogger bladeLogger;
-
- /**
- * 房屋 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入house")
- public R<HouseVO> detail(HouseEntity house) {
- HouseEntity detail = houseService.getOne(Condition.getQueryWrapper(house));
- return R.data(HouseWrapper.build().entityVO(detail));
- }
-
- /**
- * 房屋自定义详情查询
- * @param house
- * @return
- */
- @GetMapping("/getHouseDetail")
- @ApiLog("房屋自定义详情查询")
- @ApiOperation(value = "房屋自定义详情查询", notes = "传入house")
- public R<HouseVO> getHouseDetail(HouseVO house) {
- bladeLogger.info("房屋自定义详情查询", JsonUtil.toJson(house));
- HouseVO detail = houseService.getHouseDetail(house);
- return R.data(detail);
- }
-
- /**
- * 房屋 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入house")
- public R<IPage<HouseVO>> list(HouseEntity house, Query query) {
- IPage<HouseEntity> pages = houseService.page(Condition.getPage(query), Condition.getQueryWrapper(house));
- return R.data(HouseWrapper.build().pageVO(pages));
- }
-
- /**
- * 房屋 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("房屋 自定义分页")
- @ApiOperation(value = "自定义分页", notes = "传入house")
- public R<IPage<HouseVO>> page(HouseVO house, Query query) {
- bladeLogger.info("房屋 自定义分页", JsonUtil.toJson(house));
- IPage<HouseVO> pages = houseService.selectHousePage(Condition.getPage(query), house);
- return R.data(pages);
- }
-
- /**
- * 房屋标签统计
- */
- @GetMapping("/labelStatistics")
- @ApiOperationSupport(order = 3)
- @ApiLog("房屋标签统计")
- @ApiOperation(value = "房屋标签统计")
- public R labelStatistics(HouseVO house) {
- bladeLogger.info("房屋标签统计", JsonUtil.toJson(house));
- List<Map<String, Object>> pages = houseService.labelStatistics( house);
- return R.data(pages);
- }
-
- /**
- * 房屋标签区域统计
- */
- @GetMapping("/labelCommunityStatistics")
- @ApiOperationSupport(order = 3)
- @ApiLog("房屋标签区域统计")
- @ApiOperation(value = "房屋标签区域统计")
- public R labelCommunityStatistics(HouseVO house) {
- bladeLogger.info("房屋标签区域统计", JsonUtil.toJson(house));
- List<Map<String, Object>> pages = houseService.labelCommunityStatistics( house);
- return R.data(pages);
- }
-
- /**
- * 房屋 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入house")
- public R save(@Valid @RequestBody HouseEntity house) {
- return R.status(houseService.save(house));
- }
-
- /**
- * 房屋 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入house")
- public R update(@Valid @RequestBody HouseEntity house) {
- return R.status(houseService.updateById(house));
- }
-
- /**
- * 房屋 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入house")
- public R submit(@Valid @RequestBody HouseEntity house) {
- return R.status(houseService.saveOrUpdate(house));
- }
-
- /**
- * 房屋自定义新增或修改
- * @param house
- * @return
- */
- @PostMapping("/saveOrUpdateHouse")
- @ApiOperation(value = "新增或修改", notes = "传入house")
- @ApiLog("房屋 自定义分页")
- public R saveOrUpdateHouse(@RequestBody HouseEntity house) {
- return R.status(houseService.saveOrUpdateHouse(house));
- }
-
- /**
- * 房屋 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- @ApiLog("房屋 自定义分页")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("房屋 删除", JsonUtil.toJson(ids));
- return R.status(houseService.removeByIds(Func.toLongList(ids)));
- }
-
-
- /**
- * 导出房屋
- */
- @GetMapping("export-house")
- @ApiOperationSupport(order = 13)
- @ApiOperation(value = "导出房屋", notes = "传入user")
- public void exportHouse(HouseVO household, HttpServletResponse response) {
- List<HouseExcel> list = houseService.export(household);
- ExcelUtil.export(response, "房屋数据" + DateUtil.time(), "房屋数据表", list, HouseExcel.class);
- }
-
- /**
- * 导入房屋
- */
- @PostMapping("import-house")
- public R importHouse(MultipartFile file, Integer isCovered) {
- HouseImporter houseImporter = new HouseImporter(houseService, isCovered == 1);
- ExcelUtil.save(file, houseImporter, HouseExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 查询房屋树
- * @param houseParam
- * @return
- */
- @GetMapping("/getHouseTree")
- public R getHouseTree(HouseParam houseParam) {
- return R.data(houseService.getHouseTree(houseParam));
- }
-
-
- /**
- * 导入房屋及住户/租户人员数据
- */
- @PostMapping("import-houseAndHold")
- public R importHouseAndHold(MultipartFile file, Integer isCovered) {
- HouseAndHoldImporter houseImporter = new HouseAndHoldImporter(houseService, isCovered == 1);
- ExcelUtil.save(file, houseImporter, HouseAndHoldExcel.class);
- return R.success("操作成功");
- }
-
-
- @GetMapping("getHouseStatistics")
- public R getHouseStatistics(@RequestParam("code") String code,
- @RequestParam("roleType") String roleType,
- @RequestParam(value = "aoiCode", required = false) String aoiCode,
- @RequestParam(value = "buildingCode", required = false) String buildingCode,
- @RequestParam(value = "unitCode", required = false) String unitCode) {
- Map<String, Object> result = houseService.getHouseStatistics(code, roleType, aoiCode, buildingCode, unitCode);
- return R.data(result);
- }
-
- /**
- * 通过小区id查询小区的栋
- *
- * @param districtCode
- * @return
- */
- @GetMapping("/getHouseBuilding")
- @ApiOperation(value = "通过小区id查询小区的栋", notes = "传入小区id")
- public R<List<String>> getHouseBuilding(@RequestParam("districtCode") String districtCode) {
- List<String> detail = houseService.getHouseBuilding(districtCode);
- return R.data(detail);
- }
-
- /**
- * 通过小区id查询小区的单元
- *
- * @param districtCode
- * @return
- */
- @GetMapping("/getHouseUnit")
- @ApiOperation(value = "通过小区id查询小区的单元", notes = "传入小区id")
- public R<List<String>> getHouseUnit(@RequestParam("districtCode") String districtCode, @RequestParam("building") String building) {
- List<String> detail = houseService.getHouseUnit(districtCode, building);
- return R.data(detail);
- }
-
- /**
- * 房屋网格处理
- * @return
- */
- @GetMapping("/houseGridHandle")
- @ApiOperation(value = "房屋网格处理")
- public R houseGridHandle() {
- return R.data(houseService.houseGridHandle());
- }
-
- /**
- * 房屋警格处理
- * @return
- */
- @GetMapping("/houseJwGridHandle")
- @ApiOperation(value = "房屋警格处理")
- public R houseJwGridHandle() {
- return R.data(houseService.houseJwGridHandle());
- }
-
-
- /**
- * 房屋画像统计-按房屋标签统计
- * @return
- */
- @GetMapping("/getHouseLabelStatistic")
- @ApiOperation(value = "房屋画像统计")
- public R getHouseLabelStatistic(HouseVO house) {
- return R.data(houseService.getHouseLabelStatistic(house));
- }
-
- /**
- * 房屋标签初始化处置-根据有租客的,初始成出租,有业主没租客的初始化成自主,业主都没的就是闲置
- * @return
- */
- @GetMapping("/initHouseLabelBind")
- @ApiOperation(value = "房屋标签初始化处置")
- public R initHouseLabelBind(HouseVO house) {
- return R.status(houseService.initHouseLabelBind(house));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java b/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
deleted file mode 100644
index 2483b52..0000000
--- a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.controller;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.entity.HouseLabelEntity;
-import org.springblade.modules.house.vo.UserHouseLabelVO;
-import org.springblade.modules.house.wrapper.HouseLabelWrapper;
-import org.springblade.modules.house.service.IHouseLabelService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 房屋-标签 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-houseLabel/houseLabel")
-@Api(value = "房屋-标签", tags = "房屋-标签接口")
-public class HouseLabelController extends BladeController {
-
- private final IHouseLabelService houseLabelService;
-
- /**
- * 房屋-标签 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入houseLabel")
- public R<UserHouseLabelVO> detail(HouseLabelEntity houseLabel) {
- HouseLabelEntity detail = houseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
- return R.data(HouseLabelWrapper.build().entityVO(detail));
- }
- /**
- * 房屋-标签 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入houseLabel")
- public R<IPage<UserHouseLabelVO>> list(HouseLabelEntity houseLabel, Query query) {
- IPage<HouseLabelEntity> pages = houseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
- return R.data(HouseLabelWrapper.build().pageVO(pages));
- }
-
- /**
- * 房屋-标签 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入houseLabel")
- public R<IPage<UserHouseLabelVO>> page(UserHouseLabelVO houseLabel, Query query) {
- IPage<UserHouseLabelVO> pages = houseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
- return R.data(pages);
- }
-
- /**
- * 房屋-标签 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入houseLabel")
- public R save(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.save(houseLabel));
- }
-
- /**
- * 房屋-标签 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入houseLabel")
- public R update(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.updateById(houseLabel));
- }
-
- /**
- * 房屋-标签 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入houseLabel")
- public R submit(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.saveOrUpdate(houseLabel));
- }
-
- /**
- * 房屋-标签 自定义新增或修改
- * @param houseLabel
- * @return
- */
- @PostMapping("/saveOrUpdateHouseLabel")
- @ApiOperation(value = "自定义新增或修改", notes = "传入houseLabel")
- public R saveOrUpdateHouseLabel(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.saveOrUpdateHouseLabel(houseLabel));
- }
-
- /**
- * 房屋-标签 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(houseLabelService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 房屋-标签 自定义删除
- */
- @PostMapping("/removeHouseLabel")
- @ApiOperationSupport(order = 7)
- public R removeHouseLabel(@RequestBody HouseLabelEntity houseLabel) {
- QueryWrapper<HouseLabelEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("label_id",houseLabel.getLabelId())
- .eq("house_code",houseLabel.getHouseCode());
- // 返回
- return R.status(houseLabelService.remove(wrapper));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseRentalController.java b/src/main/java/org/springblade/modules/house/controller/HouseRentalController.java
deleted file mode 100644
index 2546aca..0000000
--- a/src/main/java/org/springblade/modules/house/controller/HouseRentalController.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.house.vo.HouseRentalTenantVO;
-import org.springblade.modules.house.excel.HouseRentalExcel;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import org.springblade.modules.house.wrapper.HouseRentalWrapper;
-import org.springblade.modules.house.service.IHouseRentalService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 出租屋 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-houseRental/houseRental")
-@Api(value = "出租屋", tags = "出租屋接口")
-public class HouseRentalController extends BladeController {
-
- private final IHouseRentalService houseRentalService;
- private final BladeLogger bladeLogger;
-
- /**
- * 出租屋 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("出租屋 详情")
- @ApiOperation(value = "详情", notes = "传入houseRental")
- public R<HouseRentalVO> detail(HouseRentalEntity houseRental) {
- bladeLogger.info("出租屋 详情", JsonUtil.toJson(houseRental));
- HouseRentalEntity detail = houseRentalService.getOne(Condition.getQueryWrapper(houseRental));
- return R.data(HouseRentalWrapper.build().entityVO(detail));
- }
- /**
- * 出租屋 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入houseRental")
- public R<IPage<HouseRentalVO>> list(HouseRentalEntity houseRental, Query query) {
- IPage<HouseRentalEntity> pages = houseRentalService.page(Condition.getPage(query), Condition.getQueryWrapper(houseRental));
- return R.data(HouseRentalWrapper.build().pageVO(pages));
- }
-
- /**
- * 出租屋 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("出租屋 自定义分页")
- @ApiOperation(value = "分页", notes = "传入houseRental")
- public R<IPage<HouseRentalTenantVO>> page(HouseRentalTenantVO houseRental, Query query) {
- bladeLogger.info("出租屋 自定义分页", JsonUtil.toJson(houseRental));
- IPage<HouseRentalTenantVO> pages = houseRentalService.selectHouseRentalPage(Condition.getPage(query), houseRental);
- return R.data(pages);
- }
-
- /**
- * 出租屋 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入houseRental")
- public R save(@Valid @RequestBody HouseRentalEntity houseRental) {
- return R.status(houseRentalService.save(houseRental));
- }
-
- /**
- * 出租屋 自定义新增
- */
- @PostMapping("/add")
- @ApiLog("出租屋 自定义新增")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "自定义新增", notes = "传入houseRentalVo")
- public R add(@RequestBody HouseRentalVO houseRentalVO) {
- bladeLogger.info("出租屋 自定义新增", JsonUtil.toJson(houseRentalVO));
- return R.status(houseRentalService.add(houseRentalVO));
- }
-
- /**
- * 出租屋 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入houseRental")
- public R update(@RequestBody HouseRentalEntity houseRental) {
- houseRental.setUpdateUser(AuthUtil.getUserId());
- return R.status(houseRentalService.updateById(houseRental));
- }
-
- /**
- * 出租屋 自定义修改
- * @param houseRental
- * @return
- */
- @ApiLog("出租屋 自定义修改")
- @PostMapping("/updateHouseRental")
- public R updateHouseRental(@RequestBody HouseRentalVO houseRental) {
- bladeLogger.info("出租屋 自定义修改", JsonUtil.toJson(houseRental));
- return R.status(houseRentalService.updateHouseRental(houseRental));
- }
-
- /**
- * 出租屋 确认
- * @param houseRental
- * @return
- */
- @ApiLog("出租屋 确认")
- @PostMapping("/confirmHouseRental")
- public R confirmHouseRental(@RequestBody HouseRentalVO houseRental) {
- bladeLogger.info("出租屋 确认", JsonUtil.toJson(houseRental));
- return R.status(houseRentalService.confirmHouseRental(houseRental));
- }
-
- /**
- * 出租屋 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入houseRental")
- public R submit(@Valid @RequestBody HouseRentalEntity houseRental) {
- return R.status(houseRentalService.saveOrUpdate(houseRental));
- }
-
- /**
- * 出租屋 删除
- */
- @PostMapping("/remove")
- @ApiLog("出租屋 删除")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("出租屋 删除", JsonUtil.toJson(ids));
- return R.status(houseRentalService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 出租屋 自定义删除
- * @param id
- * @return
- */
- @PostMapping("/removeHouseRental")
- @ApiLog("出租屋 详情")
- public R removeHouseRental(@ApiParam(value = "主键集合", required = true) @RequestParam Long id) {
- return R.status(houseRentalService.removeHouseRental(id));
- }
-
- /**
- * 获取统计数据
- * @return
- */
- @GetMapping("/getStatistics")
- public R getStatistics(HouseRentalTenantVO houseRental){
- return R.data(houseRentalService.getStatistics(houseRental));
- }
-
-
- @GetMapping("/getStatisticsCount")
- public R getStatisticsCount(HouseRentalTenantVO houseRental){
- houseRental.setUserId(AuthUtil.getUserId());
- return R.data(houseRentalService.getStatisticsCount(houseRental));
- }
-
- /**
- * 导出租赁信息
- */
- @GetMapping("export-houseRental")
- public void exportHouseRental(HouseRentalTenantVO houseRentalVO, HttpServletResponse response) {
- List<HouseRentalExcel> list = houseRentalService.export(houseRentalVO);
- ExcelUtil.export(response, "出租屋数据" + DateUtil.time(), "出租屋数据表", list, HouseRentalExcel.class);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseTenantController.java b/src/main/java/org/springblade/modules/house/controller/HouseTenantController.java
deleted file mode 100644
index 3608b30..0000000
--- a/src/main/java/org/springblade/modules/house/controller/HouseTenantController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import org.springblade.modules.house.vo.HouseTenantVO;
-import org.springblade.modules.house.wrapper.HouseTenantWrapper;
-import org.springblade.modules.house.service.IHouseTenantService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 租户管理 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-houseTenant/houseTenant")
-@Api(value = "租户管理", tags = "租户管理接口")
-public class HouseTenantController extends BladeController {
-
- private final IHouseTenantService houseTenantService;
-
- /**
- * 租户管理 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入houseTenant")
- public R<HouseTenantVO> detail(HouseTenantEntity houseTenant) {
- HouseTenantEntity detail = houseTenantService.getOne(Condition.getQueryWrapper(houseTenant));
- return R.data(HouseTenantWrapper.build().entityVO(detail));
- }
- /**
- * 租户管理 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入houseTenant")
- public R<IPage<HouseTenantVO>> list(HouseTenantEntity houseTenant, Query query) {
- IPage<HouseTenantEntity> pages = houseTenantService.page(Condition.getPage(query), Condition.getQueryWrapper(houseTenant));
- return R.data(HouseTenantWrapper.build().pageVO(pages));
- }
-
- /**
- * 租户管理 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入houseTenant")
- public R<IPage<HouseTenantVO>> page(HouseTenantVO houseTenant, Query query) {
- IPage<HouseTenantVO> pages = houseTenantService.selectHouseTenantPage(Condition.getPage(query), houseTenant);
- return R.data(pages);
- }
-
- /**
- * 租户管理 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入houseTenant")
- public R save(@Valid @RequestBody HouseTenantEntity houseTenant) {
- return R.status(houseTenantService.save(houseTenant));
- }
-
- /**
- * 租户管理 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入houseTenant")
- public R update(@Valid @RequestBody HouseTenantEntity houseTenant) {
- return R.status(houseTenantService.updateById(houseTenant));
- }
-
- /**
- * 租户管理 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入houseTenant")
- public R submit(@Valid @RequestBody HouseTenantEntity houseTenant) {
- return R.status(houseTenantService.saveOrUpdate(houseTenant));
- }
-
- /**
- * 租户管理 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(houseTenantService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseholdController.java b/src/main/java/org/springblade/modules/house/controller/HouseholdController.java
deleted file mode 100644
index cf113ed..0000000
--- a/src/main/java/org/springblade/modules/house/controller/HouseholdController.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import liquibase.pro.packaged.S;
-import lombok.AllArgsConstructor;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.excel.HouseHoldExcel;
-import org.springblade.modules.house.excel.HouseHoldImporter;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.house.wrapper.HouseholdWrapper;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 住户 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-household/household")
-@Api(value = "住户", tags = "住户接口")
-public class HouseholdController extends BladeController {
-
- private final IHouseholdService householdService;
- private final BladeLogger bladeLogger;
-
- /**
- * 住户 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("住户 详情")
- @ApiOperation(value = "详情", notes = "传入household")
- public R<HouseholdVO> detail(HouseholdEntity household) {
- bladeLogger.info("住户 详情", JsonUtil.toJson(household));
- HouseholdEntity detail = householdService.getOne(Condition.getQueryWrapper(household).last("limit 1"));
- return R.data(HouseholdWrapper.build().entityVO(detail));
- }
-
- /**
- * 住户 自定义查询详情
- *
- * @param household
- * @return
- */
- @GetMapping("/getDetail")
- @ApiLog("住户 详情")
- @ApiOperation(value = "详情", notes = "传入household")
- public R getDetail(HouseholdEntity household) {
- bladeLogger.info("住户 详情", JsonUtil.toJson(household));
- return R.data(householdService.getDetail(household));
- }
-
- /**
- * 住户 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入household")
- public R<IPage<HouseholdVO>> list(HouseholdEntity household, Query query) {
- IPage<HouseholdEntity> pages = householdService.page(Condition.getPage(query), Condition.getQueryWrapper(household));
- return R.data(HouseholdWrapper.build().pageVO(pages));
- }
-
- /**
- * 住户 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("住户 自定义分页")
- @ApiOperation(value = "分页", notes = "传入household")
- public R<IPage<HouseholdVO>> page(HouseholdVO household, Query query) {
- bladeLogger.info("住户 自定义分页", JsonUtil.toJson(household));
- IPage<HouseholdVO> pages = householdService.selectHouseholdPage(Condition.getPage(query), household);
- return R.data(pages);
- }
-
- /**
- * 住户 自定义分页
- */
- @GetMapping("/getKeynotePersonnelPage")
- @ApiOperationSupport(order = 3)
- @ApiLog("住户 自定义分页")
- @ApiOperation(value = "分页", notes = "传入household")
- public R<IPage<HouseholdVO>> getKeynotePersonnelPage(HouseholdVO household, Query query) {
- bladeLogger.info("住户 自定义分页", JsonUtil.toJson(household));
- IPage<HouseholdVO> pages = householdService.getKeynotePersonnelPage(Condition.getPage(query), household);
- return R.data(pages);
- }
-
- /**
- * 住户标签统计
- */
- @GetMapping("/getlabelStatistics")
- @ApiOperationSupport(order = 3)
- @ApiLog("住户标签统计")
- @ApiOperation(value = "住户标签统计", notes = "传入household")
- public R<List<TreeIntegerNode>> getlabelStatistics(HouseholdVO household) {
- bladeLogger.info("住户标签统计", JsonUtil.toJson(household));
- List<TreeIntegerNode> pages = householdService.getlabelStatistics(household);
- return R.data(pages);
- }
-
-
- /**
- * 住户列表查询
- *
- * @param household
- * @return
- */
- @GetMapping("/selectHouseholdList")
- @ApiLog("住户列表查询")
- public R selectHouseholdList(HouseholdVO household) {
- bladeLogger.info("住户列表查询", JsonUtil.toJson(household));
- return R.data(householdService.selectHouseholdList(household));
- }
-
- /**
- * 住户 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入household")
- public R save(@Valid @RequestBody HouseholdEntity household) {
- return R.status(householdService.save(household));
- }
-
- /**
- * 住户 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入household")
- public R update(@Valid @RequestBody HouseholdEntity household) {
- return R.status(householdService.updateById(household));
- }
-
- /**
- * 住户 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入household")
- public R submit(@Valid @RequestBody HouseholdEntity household) {
- return R.status(householdService.saveOrUpdate(household));
- }
-
- /**
- * 住户 自定义新增或修改
- *
- * @param household
- * @return
- */
- @PostMapping("/saveOrUpdateHousehold")
- @ApiLog("住户 自定义新增或修改")
- @ApiOperation(value = "自定义新增或修改", notes = "传入household")
- public R saveOrUpdateHousehold(@Valid @RequestBody HouseholdVO household) {
- bladeLogger.info("住户 自定义新增或修改", JsonUtil.toJson(household));
- return R.status(householdService.saveOrUpdateHousehold(household));
- }
-
- /**
- * 住户 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("住户 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- @Transactional(rollbackFor = Exception.class)
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("住户 删除", JsonUtil.toJson(ids));
- // 返回
- return R.status(householdService.removeHousehold(ids));
- }
-
-
- /**
- * 住户审核统计
- */
- @PostMapping("/statistics")
- @ApiOperationSupport(order = 7)
- @ApiLog("住户审核统计")
- @ApiOperation(value = "住户审核统计", notes = "网格员调用")
- public R getStatistics() {
- return R.data(householdService.statistics(AuthUtil.getUserId(), "",0));
- }
-
- /**
- * 导入用户
- */
- @PostMapping("import-household")
- @ApiOperationSupport(order = 12)
- @ApiOperation(value = "导入住户", notes = "传入excel")
- public R importUser(MultipartFile file, Integer isCovered) {
- HouseHoldImporter houseHoldImporter = new HouseHoldImporter(householdService, isCovered == 1);
- ExcelUtil.save(file, houseHoldImporter, HouseHoldExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 导出用户
- */
- @GetMapping("export-household")
- @ApiOperationSupport(order = 13)
- @ApiOperation(value = "导出住户", notes = "传入user")
- public void exportUser(HouseholdVO household, HttpServletResponse response) {
- List<HouseHoldExcel> list = householdService.export(household);
- ExcelUtil.export(response, "住户户数据" + DateUtil.time(), "住户数据表", list, HouseHoldExcel.class);
- }
-
-
- /**
- * 住户对应物业,网格,公安负责人查询
- *
- * @param household
- * @return
- */
- @GetMapping("/getHouseholdOtherInfo")
- @ApiOperationSupport(order = 14)
- @ApiLog("住户对应物业,网格,公安负责人查询")
- @ApiOperation(value = "住户对应物业,网格,公安负责人查询", notes = "住户对应物业,网格,公安负责人查询")
- public R getHouseholdOtherInfo(HouseholdVO household) {
- bladeLogger.info("住户对应物业,网格,公安负责人查询", JsonUtil.toJson(household));
- return R.data(householdService.getHouseholdOtherInfo(household));
- }
-
- /**
- * 用户信息统计
- *
- * @param code
- * @param roleType
- * @return
- */
- @GetMapping("/getHouseHoldStatistics")
- @ApiOperationSupport(order = 14)
- @ApiLog("e呼即办表 详情")
- @ApiOperation(value = "用户信息统计", notes = " ")
- public R getHouseHoldStatistics(@RequestParam("code") String code, @RequestParam("roleType") String roleType) {
- return R.data(householdService.getHouseHoldStatistics(code, roleType));
- }
-
-
- /**
- * 住户业主信息处理,将业主人员插入到用户表
- *
- * @return
- */
- @GetMapping("/userHandle")
- public R userHandle() {
- return R.data(householdService.userHandle());
- }
-
- /**
- * 获取所有住户
- *
- * @return
- */
- @GetMapping("/getAllHouseHold")
- public R getAllHouseHold(HouseholdVO household) {
- return R.data(householdService.getAllHouseHold(household));
- }
-
-
- /**
- * 通过小区id查询用户
- */
- @GetMapping("/getUserInfoByDistrictIds")
- @ApiOperation(value = "通过小区id查询用户")
- @ApiLog("通过小区id查询用户")
- public R<IPage<HouseholdVO>> getUserInfoByDistrictIds(Query query,HouseholdVO householdVO) {
- bladeLogger.info("通过小区id查询用户", JsonUtil.toJson(householdVO));
- IPage<HouseholdVO> pages = householdService.getUserInfoByDistrictIds(householdVO, Condition.getPage(query));
- return R.data(pages);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java b/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
deleted file mode 100644
index 0970bf2..0000000
--- a/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.controller;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.excel.UserHouseLabelExcel;
-import org.springblade.modules.house.excel.UserHouseLabelImporter;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-import org.springblade.modules.house.wrapper.HouseholdLabelWrapper;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 住户-标签 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-householdLabel/householdLabel")
-@Api(value = "住户-标签", tags = "住户-标签接口")
-public class UserHouseLabelController extends BladeController {
-
- private final IUserHouseLabelService householdLabelService;
-
- /**
- * 住户-标签 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入householdLabel")
- public R<HouseholdLabelVO> detail(UserHouseLabelEntity householdLabel) {
- UserHouseLabelEntity detail = householdLabelService.getOne(Condition.getQueryWrapper(householdLabel));
- return R.data(HouseholdLabelWrapper.build().entityVO(detail));
- }
- /**
- * 住户-标签 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入householdLabel")
- public R<IPage<HouseholdLabelVO>> list(UserHouseLabelEntity householdLabel, Query query) {
- IPage<UserHouseLabelEntity> pages = householdLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(householdLabel));
- return R.data(HouseholdLabelWrapper.build().pageVO(pages));
- }
-
- /**
- * 住户-标签 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入householdLabel")
- public R<IPage<HouseholdLabelVO>> page(HouseholdLabelVO householdLabel, Query query) {
- IPage<HouseholdLabelVO> pages = householdLabelService.selectHouseholdLabelPage(Condition.getPage(query), householdLabel);
- return R.data(pages);
- }
-
- /**
- * 住户-标签 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入householdLabel")
- public R save(@Valid @RequestBody UserHouseLabelEntity householdLabel) {
- return R.status(householdLabelService.save(householdLabel));
- }
-
- /**
- * 住户-标签 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入householdLabel")
- public R update(@Valid @RequestBody UserHouseLabelEntity householdLabel) {
- return R.status(householdLabelService.updateById(householdLabel));
- }
-
- /**
- * 住户-标签 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入householdLabel")
- public R submit(@Valid @RequestBody UserHouseLabelEntity householdLabel) {
- return R.status(householdLabelService.saveOrUpdate(householdLabel));
- }
-
- /**
- * 住户-标签 自定义新增或修改
- * @param householdLabel
- * @return
- */
- @PostMapping("/saveOrUpdateHouseholdLabel")
- @ApiOperation(value = "自定义新增或修改", notes = "传入householdLabel")
- public R saveOrUpdateHouseholdLabel(@Valid @RequestBody UserHouseLabelEntity householdLabel) {
- return R.status(householdLabelService.saveOrUpdateHouseholdLabel(householdLabel));
- }
-
- /**
- * 房屋-标签 房屋自定义新增或修改
- * @param householdLabel
- * @return
- */
- @PostMapping("/saveOrUpdateHouseLabel")
- @ApiOperation(value = "自定义新增或修改", notes = "传入householdLabel")
- public R saveOrUpdateHouseLabel(@Valid @RequestBody UserHouseLabelEntity householdLabel) {
- return R.status(householdLabelService.saveOrUpdateHouseLabel(householdLabel));
- }
-
- /**
- * 住户-标签 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(householdLabelService.removeByIds(Func.toLongList(ids)));
- }
-
-
- /**
- * 住户-标签 自定义删除
- */
- @PostMapping("/removeHouseholdLabel")
- public R removeHouseholdLabel(@RequestBody UserHouseLabelEntity householdLabel) {
- QueryWrapper<UserHouseLabelEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("household_id", householdLabel.getHouseholdId())
- .eq("label_id", householdLabel.getLabelId());
- // 返回
- return R.status(householdLabelService.remove(wrapper));
- }
-
- /**
- * 导入用户
- */
- @PostMapping("import-userHouseLabel")
- @ApiOperationSupport(order = 12)
- @ApiOperation(value = "标签住户导入", notes = "传入excel")
- public R importUser(MultipartFile file, @RequestParam(value = "isCovered", defaultValue = "0") Integer isCovered) {
- UserHouseLabelImporter userHouseLabelImporter = new UserHouseLabelImporter(householdLabelService, isCovered == 1);
- ExcelUtil.save(file, userHouseLabelImporter, UserHouseLabelExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 导出模板
- */
- @GetMapping("export-userHouseLabel")
- @ApiOperationSupport(order = 14)
- @ApiOperation(value = "导出标签住户模板")
- public void exportUser(HttpServletResponse response) {
- List<UserHouseLabelExcel> list = new ArrayList<>();
- ExcelUtil.export(response, "标签住户数据模板", "标签住户数据表", list, UserHouseLabelExcel.class);
- }
-
-
- /**
- * 街道重点人员标签统计
- * @param householdLabel
- * @param query
- * @return
- */
- @GetMapping("/getRegionStatisticalLabels")
- @ApiOperation(value = "街道重点人员标签统计", notes = "")
- public R<IPage<HouseholdLabelVO>> statisticalLabels(HouseholdLabelVO householdLabel, Query query) {
- IPage<HouseholdLabelVO> pages = householdLabelService.statisticalLabels(Condition.getPage(query), householdLabel);
- return R.data(pages);
- }
-
- /**
- * 社区重点人员标签统计
- * @param householdLabel
- * @param query
- * @return
- */
- @GetMapping("/getCommunityStatisticalLabels")
- @ApiOperation(value = "社区重点人员标签统计", notes = "")
- public R<IPage<HouseholdLabelVO>> getCommunityStatisticalLabels(HouseholdLabelVO householdLabel, Query query) {
- IPage<HouseholdLabelVO> pages = householdLabelService.getCommunityStatisticalLabels(Condition.getPage(query), householdLabel);
- return R.data(pages);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/dto/HouseDTO.java b/src/main/java/org/springblade/modules/house/dto/HouseDTO.java
deleted file mode 100644
index 22aa230..0000000
--- a/src/main/java/org/springblade/modules/house/dto/HouseDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.dto;
-
-import org.springblade.modules.house.entity.HouseEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 房屋 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseDTO extends HouseEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java b/src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java
deleted file mode 100644
index ac41331..0000000
--- a/src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.house.entity.HouseLabelEntity;
-
-/**
- * 房屋-标签 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseLabelDTO extends HouseLabelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/dto/HouseRentalDTO.java b/src/main/java/org/springblade/modules/house/dto/HouseRentalDTO.java
deleted file mode 100644
index 2e7c231..0000000
--- a/src/main/java/org/springblade/modules/house/dto/HouseRentalDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.dto;
-
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 出租屋 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseRentalDTO extends HouseRentalEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/dto/HouseTenantDTO.java b/src/main/java/org/springblade/modules/house/dto/HouseTenantDTO.java
deleted file mode 100644
index 46b4e4f..0000000
--- a/src/main/java/org/springblade/modules/house/dto/HouseTenantDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.dto;
-
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 租户管理 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseTenantDTO extends HouseTenantEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/dto/HouseholdDTO.java b/src/main/java/org/springblade/modules/house/dto/HouseholdDTO.java
deleted file mode 100644
index 66a5ea9..0000000
--- a/src/main/java/org/springblade/modules/house/dto/HouseholdDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.dto;
-
-import org.springblade.modules.house.entity.HouseholdEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 住户 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseholdDTO extends HouseholdEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java b/src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java
deleted file mode 100644
index d75780e..0000000
--- a/src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.dto;
-
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 住户-标签 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class UserHouseLabelDTO extends UserHouseLabelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/HouseEntity.java b/src/main/java/org/springblade/modules/house/entity/HouseEntity.java
deleted file mode 100644
index 5eb31ba..0000000
--- a/src/main/java/org/springblade/modules/house/entity/HouseEntity.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 房屋 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_house")
-@ApiModel(value = "House对象", description = "房屋")
-public class HouseEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
- /**
- * 小区编码
- */
- @ApiModelProperty(value = "小区编码")
- private String districtCode;
- /**
- * 小区
- */
- @ApiModelProperty(value = "小区")
- private String districtName;
- /**
- * 房屋名称
- */
- @ApiModelProperty(value = "房屋名称")
- private String houseName;
- /**
- * 绑定手机
- */
- @ApiModelProperty(value = "绑定手机")
- private String phone;
- /**
- * 面积
- */
- @ApiModelProperty(value = "面积")
- private BigDecimal area;
- /**
- * 物业单价
- */
- @ApiModelProperty(value = "物业单价")
- private BigDecimal propertyPrice;
- /**
- * 服务到期
- */
- @ApiModelProperty(value = "服务到期")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date serviceDue;
- /**
- * 楼层
- */
- @ApiModelProperty(value = "楼层")
- private String floor;
- /**
- * 幢
- */
- @ApiModelProperty(value = "幢")
- private String building;
- /**
- * 单元
- */
- @ApiModelProperty(value = "单元")
- private String unit;
- /**
- * 室
- */
- @ApiModelProperty(value = "室")
- private String room;
- /**
- * 幢编号
- */
- @ApiModelProperty(value = "幢编号")
- private String buildingNo;
- /**
- * 图片URLS
- */
- @ApiModelProperty(value = "图片URLS")
- private String imageUrls;
-
- /**
- * 经度
- */
- private String lng;
-
- /**
- * 纬度
- */
- private String lat;
-
- /**
- * 地址
- */
- private String address;
- /**
- * 网格id
- */
- @ApiModelProperty(value = "网格id")
- private Integer gridId;
- /**
- * 网格编号
- */
- @ApiModelProperty(value = "网格编号")
- private String gridCode;
-
- /**
- * 警务网格编号
- */
- @ApiModelProperty(value = "警务网格编号")
- private String jwGridCode;
-
- /**
- * 来源 1:地址总表 2:国控采集
- */
- @ApiModelProperty(value = "来源 1:地址总表 2:国控采集")
- private Integer source;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- private String createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
- /**
- * 房产证图片
- */
- @ApiModelProperty(value = "房产证图片")
- private String propertyCertificateImg;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java b/src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java
deleted file mode 100644
index 222fe3e..0000000
--- a/src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-
-/**
- * 房屋-标签 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_house_label")
-@ApiModel(value = "HouseLabel对象", description = "房屋-标签")
-public class HouseLabelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
- /**
- * 标签ID
- */
- @ApiModelProperty(value = "标签ID")
- private Integer labelId;
-
- /**
- * 标签名称
- */
- @ApiModelProperty(value = "标签名称")
- private String labelName;
- /**
- * 颜色
- */
- @ApiModelProperty(value = "颜色")
- private String color;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/HouseRentalEntity.java b/src/main/java/org/springblade/modules/house/entity/HouseRentalEntity.java
deleted file mode 100644
index b7e5d4c..0000000
--- a/src/main/java/org/springblade/modules/house/entity/HouseRentalEntity.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 出租屋 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_house_rental")
-@ApiModel(value = "HouseRental对象", description = "出租屋")
-public class HouseRentalEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
- /**
- * 租客关系 1: 同一户 2:不同一户
- */
- @ApiModelProperty(value = "租客关系 1: 同一户 2:不同一户")
- private Integer tenantRelationship;
- /**
- * 租房时间
- */
- @ApiModelProperty(value = "租房时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date rentalTime;
- /**
- * 到期时间
- */
- @ApiModelProperty(value = "到期时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date dueTime;
-
- /**
- * 终止时间
- */
- @ApiModelProperty(value = "终止时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date terminationTime;
-
- /**
- * 房屋状态 1:部分出租 2:全部出租
- */
- @ApiModelProperty(value = "房屋状态 1:部分出租 2:全部出租")
- private Integer houseStatus;
- /**
- * 租房用途 1:仓库 2:办公 3:商用 4:居住
- */
- @ApiModelProperty(value = "租房用途 1:仓库 2:办公 3:商用 4:居住")
- private Integer rentalUse;
- /**
- * 审核状态 0: 待确认 1: 已确认
- */
- @ApiModelProperty(value = "审核状态 0: 待审核 1: 审核通过 2: 审核不通过 10未到期; 20即将到期 ;30 已到期")
- private Integer auditStatus;
- /**
- * 合同附件URL
- */
- @ApiModelProperty(value = "合同附件URL")
- private String fileUrls;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/HouseTenantEntity.java b/src/main/java/org/springblade/modules/house/entity/HouseTenantEntity.java
deleted file mode 100644
index 55cd891..0000000
--- a/src/main/java/org/springblade/modules/house/entity/HouseTenantEntity.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 租户管理 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_house_tenant")
-@ApiModel(value = "HouseTenant对象", description = "租户管理")
-public class HouseTenantEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 出租屋ID
- */
- @ApiModelProperty(value = "出租屋ID")
- private Long housingRentalId;
- /**
- * 姓名
- */
- @ApiModelProperty(value = "姓名")
- private String name;
- /**
- * 联系电话
- */
- @ApiModelProperty(value = "联系电话")
- private String phone;
- /**
- * 身份证
- */
- @ApiModelProperty(value = "身份证")
- private String idCard;
- /**
- * 户籍
- */
- @ApiModelProperty(value = "户籍")
- private String domicile;
- /**
- * 工作单位
- */
- @ApiModelProperty(value = "工作单位")
- private String workUnit;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
- /** 性别 */
- @ApiModelProperty(value = "性别", example = "")
- @TableField("gender")
- private Integer gender;
-
- /** 民族 */
- @ApiModelProperty(value = "民族", example = "")
- @TableField("ethnicity")
- private Integer ethnicity;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java b/src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java
deleted file mode 100644
index 65c621b..0000000
--- a/src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java
+++ /dev/null
@@ -1,291 +0,0 @@
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.io.Serializable;
-import java.util.Date;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 住户 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_household")
-@ApiModel(value = "Household对象", description = "住户")
-public class HouseholdEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
- /**
- * 姓名
- */
- @ApiModelProperty(value = "姓名")
- private String name;
- /**
- * 手机号
- */
- @ApiModelProperty(value = "手机号")
- private String phoneNumber;
- /**
- * 绑定用户ID
- */
- @ApiModelProperty(value = "绑定用户ID")
- private Long associatedUserId;
- /**
- * 角色
- */
- @ApiModelProperty(value = "角色")
- private Integer roleType;
- /**
- * 与业主关系
- */
- @ApiModelProperty(value = "与业主关系")
- private Integer relationship;
-
- /**
- * 是否主要联系人 1:是 0:否
- */
- @ApiModelProperty(value = "是否主要联系人 1:是 0:否")
- private Integer isPrimaryContact;
-
- /**
- * 居住状态 1: 是 0:否
- */
- @ApiModelProperty(value = "居住状态 1: 是 0:否")
- private Integer residentialStatus;
-
- /**
- * 性别 1: 男 0:女 2: 未知
- */
- @ApiModelProperty(value = "性别 1: 男 0:女 2: 未知")
- private Short gender;
-
- /**
- * 生日
- */
- @ApiModelProperty(value = "生日")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date birthday;
- /**
- * 身份证
- */
- @ApiModelProperty(value = "身份证")
- private String idCard;
- /**
- * 证件类型,业务字典 cardType
- */
- @ApiModelProperty(value = "证件类型,业务字典 cardType")
- private Integer cardType;
- /**
- * 证件号码
- */
- @ApiModelProperty(value = "证件号码")
- private String cardNo;
- /**
- * 民族
- */
- @ApiModelProperty(value = "民族")
- private Integer ethnicity;
- /**
- * 学历
- */
- @ApiModelProperty(value = "学历")
- private Integer education;
- /**
- * 户籍类型 业务字典:residentType
- */
- @ApiModelProperty(value = "户籍类型 业务字典:residentType")
- private Integer residentType;
- /**
- * 户籍登记地(户籍地址)
- */
- @ApiModelProperty(value = "户籍登记地(户籍地址)")
- private String hukouRegistration;
- /**
- * 户籍地行政区划
- */
- @ApiModelProperty(value = "户籍地行政区划")
- private String residentAdcode;
- /**
- * 籍贯地行政区划
- */
- @ApiModelProperty(value = "籍贯地行政区划")
- private String nativePlaceAdcode;
- /**
- * 宗教信仰
- */
- @ApiModelProperty(value = "宗教信仰")
- private String religiousBelief;
- /**
- * 健康状况 业务字典 healthStatus
- */
- @ApiModelProperty(value = "健康状况 业务字典 healthStatus")
- private Integer healthStatus;
- /**
- * 疾病名称
- */
- @ApiModelProperty(value = "疾病名称")
- private String diseaseName;
- /**
- * 工作状态
- */
- @ApiModelProperty(value = "工作状态")
- private Integer workStatus;
- /**
- * 工作单位(就职单位)
- */
- @ApiModelProperty(value = "工作单位(就职单位)")
- private String employer;
- /**
- * 职业类别
- */
- @ApiModelProperty(value = "职业类别")
- private String occupation;
- /**
- * 就职单位地址
- */
- @ApiModelProperty(value = "就职单位地址")
- private String cmpyRegAddr;
- /**
- * 外出详址
- */
- @ApiModelProperty(value = "外出详址")
- private String goOutAddr;
- /**
- * 外出去向
- */
- @ApiModelProperty(value = "外出去向")
- private String goOutWhere;
- /**
- * 外出时间
- */
- @ApiModelProperty(value = "外出时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date goOutTime;
- /**
- * 外出原因
- */
- @ApiModelProperty(value = "外出原因")
- private String goOutReason;
- /**
- * 婚姻状态
- */
- @ApiModelProperty(value = "婚姻状态")
- private Integer maritalStatus;
- /**
- * 车牌号
- */
- @ApiModelProperty(value = "车牌号")
- private String cardNumber;
- /**
- * 其他联系方式
- */
- @ApiModelProperty(value = "其他联系方式")
- private String otherContact;
- /**
- * 居住地行政区划
- */
- @ApiModelProperty(value = "居住地行政区划")
- private String homeAdcode;
- /**
- * 现居住地址(居住地址)
- */
- @ApiModelProperty(value = "现居住地址(居住地址)")
- private String currentAddress;
- /**
- * 残疾证
- */
- @ApiModelProperty(value = "残疾证")
- private String disabilityCert;
-
- /**
- * 是否党员 1:党员 2:群众
- */
- @ApiModelProperty(value = "是否党员 1:党员 2:群众")
- private Integer partyEmber;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
- /**
- * 是否审核
- */
- @ApiModelProperty("是否审核 0:否:1 是")
- private Integer confirmFlag;
-
- /**
- * 出租屋id
- */
- @ApiModelProperty("出租屋id")
- private Long housingRentalId;
-
- /** 自愿者组织 */
- @ApiModelProperty(value = "自愿者组织", example = "")
- @TableField("volunteer_org")
- private String volunteerOrg;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java b/src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java
deleted file mode 100644
index d659d22..0000000
--- a/src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 住户-标签 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_user_house_label")
-@ApiModel(value = "userHouseLabel对象", description = "住户-标签")
-public class UserHouseLabelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 门牌地址编码 */
- @ApiModelProperty(value = "门牌地址编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 标签ID */
- @ApiModelProperty(value = "标签ID", example = "")
- @TableField("label_id")
- private Long labelId;
-
- /** 标签名称 */
- @ApiModelProperty(value = "标签名称", example = "")
- @TableField("label_name")
- private String labelName;
-
- /** 颜色 */
- @ApiModelProperty(value = "颜色", example = "")
- @TableField("color")
- private String color;
-
- /** 备注 */
- @ApiModelProperty(value = "备注", example = "")
- @TableField("remark")
- private String remark;
-
- /** 用户id */
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 标签类型:1:人:2房屋 */
- @ApiModelProperty(value = "标签类型:1:人:2房屋", example = "")
- @TableField("lable_type")
- private Integer lableType;
-
- /** 住户id */
- @ApiModelProperty(value = "住户id", example = "")
- @TableField("household_id")
- private Long householdId;
-
- @ApiModelProperty(value = "创建时间", example = "")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseAndHoldExcel.java b/src/main/java/org/springblade/modules/house/excel/HouseAndHoldExcel.java
deleted file mode 100644
index 72da2be..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseAndHoldExcel.java
+++ /dev/null
@@ -1,313 +0,0 @@
-package org.springblade.modules.house.excel;
-
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-import org.springblade.common.excel.ExcelDictItemLabel;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class HouseAndHoldExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 门牌地址编码 */
- @ExcelProperty( "门牌地址编码")
- private String houseCode;
-
- /** 街道名称 */
- @ExcelProperty( "街道名称")
- private String streetName;
-
- /** 社区名称 */
- @ExcelProperty( "社区名称")
- private String communityName;
-
- /** 所属网格 */
- @ExcelProperty( "所属网格")
- private String gridName;
-
- /** 房屋名称 */
- @ExcelProperty( "详细地址")
- private String houseName;
-
- /** 小区 */
- @ExcelProperty( "小区")
- private String districtName;
-
- /** 幢 */
- @ExcelProperty( "幢")
- private String building;
-
- /** 单元 */
- @ExcelProperty( "单元")
- private String unit;
-
- /** 楼层 */
- @ExcelProperty( "楼层")
- private String floor;
-
- /** 室 */
- @ExcelProperty( "室")
- private String room;
-
-
- /** 面积 */
- @ExcelProperty( "面积")
- private BigDecimal area;
-
- /** 物业单价 */
- @ExcelProperty( "物业单价")
- private BigDecimal propertyPrice;
-
- /** 服务到期 */
- @ExcelProperty( "服务到期")
-// @JsonFormat(pattern = "yyyy-MM-dd")
- private String serviceDue;
-
- /** 备注 */
- @ExcelProperty( "备注")
- private String remark;
-
- /** 姓名 */
- @ColumnWidth(15)
- @ExcelProperty( "姓名")
- private String name;
-
- /** 手机号 */
- @ColumnWidth(15)
- @ExcelProperty( "手机号")
- private String phoneNumber;
-
- /** 与角色关系(业主,父子,其他) */
- @ColumnWidth(15)
- @ExcelProperty( value = "与角色关系",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "roleRelation")
- private String relationship;
-
- /** 主要联系人 1:是 0:否 */
- @ColumnWidth(15)
- @ExcelProperty( value = "主要联系人",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "primaryContactType")
- private String isPrimaryContact;
-
- /** 居住状态 1: 是 0:否 */
- @ColumnWidth(15)
- @ExcelProperty( "居住状态")
- @ExcelIgnore
- private String residentialStatus;
-
- /** 性别 */
- @ColumnWidth(15)
- @ExcelProperty( value = "性别",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "sex")
- private String gender;
-
- /** 身份证 */
- @ColumnWidth(15)
- @ExcelProperty( "身份证")
- private String idCard;
-
- /*-----------用户标签-----------*/
-// /** 退役军人 */
-// @ColumnWidth(15)
-// @ExcelProperty( "退役军人")
-// private String exServiceman;
-
- /*-----------用户标签-----------*/
-
-
- /** 是否党员 1:党员 2:群众 */
- @ColumnWidth(15)
- @ExcelProperty( value = "党员(是/否)",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "partyEmberType")
- private String partyEmber;
-
- /** 港澳台通行证 */
- @ColumnWidth(15)
- @ExcelProperty( "港澳台通行证")
- private String hkmtPass;
-
- /** 护照 */
- @ColumnWidth(15)
- @ExcelProperty( "护照")
- private String passport;
-
- /** 民族 */
- @ColumnWidth(15)
- @ExcelProperty( value = "民族",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "nationType")
- private String ethnicity;
-
- /** 学历 */
- @ColumnWidth(15)
- @ExcelProperty( value = "学历",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "educationType")
- private String education;
- /**
- * 户籍类型 业务字典:residentType
- */
- @ColumnWidth(15)
- @ExcelProperty( value = "户籍类型",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "residentType")
- private String residentType;
- /**
- * 户籍省份
- */
- @ColumnWidth(15)
- @ExcelProperty( "户籍省份")
- private String residentProvinceAdcode;
- /**
- * 户籍城市
- */
- @ColumnWidth(15)
- @ExcelProperty( "户籍城市")
- private String residentCityAdcode;
- /**
- * 户籍地行政区划(需通过名称转换)
- */
- @ColumnWidth(15)
- @ExcelProperty( "户籍区县")
- private String residentAdcode;
- /**
- * 户籍登记地(户籍地址)
- */
- @ColumnWidth(15)
- @ExcelProperty( "户籍地址")
- private String hukouRegistration;
- /**
- * 籍贯地行政区划(需通过名称转换)
- */
- @ColumnWidth(15)
- @ExcelProperty( "籍贯地区县")
- private String nativePlaceAdcode;
- /**
- * 健康状况 业务字典 healthStatus
- */
- @ColumnWidth(15)
- @ExcelProperty( value = "健康状况",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "healthStatus")
- private String healthStatus;
- /**
- * 疾病名称
- */
- @ColumnWidth(15)
- @ExcelProperty( "疾病名称")
- private String diseaseName;
- /**
- * 宗教信仰
- */
- @ColumnWidth(15)
- @ExcelProperty( "宗教信仰")
- private String religiousBelief;
-
- /** 工作状态 */
- @ColumnWidth(15)
- @ExcelProperty( value = "工作状态",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "workStatusType")
- private String workStatus;
-
- /** 工作单位 */
- @ColumnWidth(15)
- @ExcelProperty( "工作单位")
- private String employer;
- /**
- * 职业类别
- */
- @ColumnWidth(15)
- @ExcelProperty( "职业类别")
- private String occupation;
- /**
- * 就职单位地址
- */
- @ExcelProperty( "就职单位地址")
- private String cmpyRegAddr;
- /**
- * 外出原因
- */
- @ColumnWidth(15)
- @ExcelProperty( "外出原因")
- private String goOutReason;
- /**
- * 外出时间
- */
- @ColumnWidth(15)
- @ExcelProperty( "外出时间")
-// @JsonFormat(pattern = "yyyy-MM-dd")
- private String goOutTime;
- /**
- * 外出去向
- */
- @ColumnWidth(15)
- @ExcelProperty( "外出去向")
- private String goOutWhere;
- /**
- * 外出详址
- */
- @ExcelProperty( "外出详址")
- private String goOutAddr;
-
- /** 婚姻状态 */
- @ColumnWidth(15)
- @ExcelProperty( value = "婚姻状态",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "marriageStatusType")
- private String maritalStatus;
-
- /** 车牌号 */
- @ColumnWidth(15)
- @ExcelProperty( "车牌号")
- private String cardNumber;
-
- /** 其他联系方式 */
- @ColumnWidth(15)
- @ExcelProperty( "其他联系方式")
- private String otherContact;
- /**
- * 居住地街道
- */
- @ApiModelProperty(value = "居住地街道")
- private String homeAdcode;
-
- /**
- * 现居住地址
- */
- @ExcelProperty( "居住地址")
- private String currentAddress;
-
- /** 残疾证 */
- @ColumnWidth(15)
- @ExcelProperty( "残疾证")
- private String disabilityCert;
-
- /** 备注 */
- @ColumnWidth(15)
- @ExcelProperty( "备注")
- private String remarks;
-
- /** 备注 */
- @ColumnWidth(15)
- @ExcelProperty( "重点人群")
- private String labelId;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseAndHoldImporter.java b/src/main/java/org/springblade/modules/house/excel/HouseAndHoldImporter.java
deleted file mode 100644
index 10846a3..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseAndHoldImporter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.house.service.IHouseService;
-
-import java.util.List;
-
-/**
- * 人房数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class HouseAndHoldImporter implements ExcelImporter<HouseAndHoldExcel> {
-
- private final IHouseService iHouseService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<HouseAndHoldExcel> data) {
- iHouseService.importHouseAndHold(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseExcel.java b/src/main/java/org/springblade/modules/house/excel/HouseExcel.java
deleted file mode 100644
index 3231913..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseExcel.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.springblade.modules.house.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class HouseExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 门牌地址编码 */
- @ExcelProperty( "门牌地址编码")
- private String houseCode;
-
- /** 小区编码 */
- @ExcelProperty( "小区编码")
- private String districtCode;
-
- /** 小区 */
- @ExcelProperty( "小区")
- private String districtName;
-
- /** 房屋名称 */
- @ExcelProperty( "房屋名称")
- private String houseName;
-
- /** 绑定手机 */
- @ExcelProperty( "绑定手机")
- private String phone;
-
- /** 面积 */
- @ExcelProperty( "面积")
- private BigDecimal area;
-
- /** 物业单价 */
- @ExcelProperty( "物业单价")
- private BigDecimal propertyPrice;
-
- /** 服务到期 */
- @ExcelProperty( "服务到期")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date serviceDue;
-
- /** 楼层 */
- @ExcelProperty( "楼层")
- private Integer floor;
-
- /** 幢 */
- @ExcelProperty( "幢")
- private String building;
-
- /** 单元 */
- @ExcelProperty( "单元")
- private String unit;
-
- /** 室 */
- @ExcelProperty( "室")
- private String room;
-
- /** 幢编号 */
- @ExcelProperty( "幢编号")
- private String buildingNo;
-
- /** 备注 */
- @ExcelProperty( "备注")
- private String remark;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java b/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java
deleted file mode 100644
index 37261a5..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package org.springblade.modules.house.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-import org.springblade.common.excel.ExcelDictItemLabel;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * UserExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class HouseHoldExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /**
- * 门牌地址编码
- */
- @ColumnWidth(25)
- @ExcelProperty( "门牌地址编码")
- private String houseCode;
-
- /** 姓名 */
- @ColumnWidth(15)
- @ExcelProperty( "姓名")
- private String name;
-
- /** 手机号 */
- @ColumnWidth(15)
- @ExcelProperty( "手机号")
- private String phoneNumber;
-
- /** 小区名称 */
- @ColumnWidth(15)
- @ExcelProperty( "小区名称")
- private String aoiName;
-
- /** 角色 */
- @ColumnWidth(15)
- @ExcelProperty( value = "角色",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "roleType")
- private String roleType;
-
- /** 与角色关系(业主,父子,其他) */
- @ColumnWidth(15)
- @ExcelProperty( value = "与角色关系",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "roleRelation")
- private String relationship;
-
- /** 是否主要联系人 1:是 0:否 */
- @ColumnWidth(15)
- @ExcelProperty( value = "是否主要联系人",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "primaryContactType")
- private String isPrimaryContact;
-
- /** 居住状态 1: 是 0:否 */
- @ColumnWidth(15)
- @ExcelProperty( value = "居住状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "residentialStatusType")
- private String residentialStatus;
-
- /** 性别 1: 男 0:女 2: 未知 */
- @ColumnWidth(15)
- @ExcelProperty( value = "性别",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "sex")
- private String gender;
-
- /** 生日 */
- @ColumnWidth(15)
- @ExcelProperty( "生日")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date birthday;
-
- /** 身份证 */
- @ColumnWidth(15)
- @ExcelProperty( "身份证")
- private String idCard;
-
- /** 港澳台通行证 */
- @ColumnWidth(15)
- @ExcelProperty( "港澳台通行证")
- private String hkmtPass;
-
- /** 护照 */
- @ColumnWidth(15)
- @ExcelProperty( "护照")
- private String passport;
-
- /** 民族 */
- @ColumnWidth(15)
- @ExcelProperty( value = "民族",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "nationType")
- private String ethnicity;
-
- /** 学历 */
- @ColumnWidth(15)
- @ExcelProperty( value = "学历",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "educationType")
- private String education;
-
- /** 户籍登记地 */
- @ColumnWidth(15)
- @ExcelProperty( "户籍登记地")
- private String hukouRegistration;
-
- /** 工作状态 */
- @ColumnWidth(15)
- @ExcelProperty( value = "工作状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "workStatusType")
- private String workStatus;
-
- /** 工作单位 */
- @ColumnWidth(15)
- @ExcelProperty( "工作单位")
- private String employer;
-
- /** 婚姻状态 */
- @ColumnWidth(15)
- @ExcelProperty( value = "婚姻状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "marriageStatusType")
- private String maritalStatus;
-
- /** 车牌号 */
- @ColumnWidth(15)
- @ExcelProperty( "车牌号")
- private String cardNumber;
-
- /** 其他联系方式 */
- @ColumnWidth(15)
- @ExcelProperty( "其他联系方式")
- private String otherContact;
-
- /** 现居住地址 */
- @ColumnWidth(15)
- @ExcelProperty( "现居住地址")
- private String currentAddress;
-
- /** 残疾证 */
- @ColumnWidth(15)
- @ExcelProperty( "残疾证")
- private String disabilityCert;
-
- /** 是否党员 1:党员 2:群众 */
- @ColumnWidth(15)
- @ExcelProperty( value = "是否党员",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "partyEmberType")
- private String partyEmber;
-
- /** 备注 */
- @ColumnWidth(15)
- @ExcelProperty( "备注")
- private String remark;
-
-}
-
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseHoldImporter.java b/src/main/java/org/springblade/modules/house/excel/HouseHoldImporter.java
deleted file mode 100644
index 0823881..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseHoldImporter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.house.service.IHouseholdService;
-
-import java.util.List;
-
-/**
- * 用户数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class HouseHoldImporter implements ExcelImporter<HouseHoldExcel> {
-
- private final IHouseholdService iHouseholdService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<HouseHoldExcel> data) {
- iHouseholdService.importUserHouseHold(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseImporter.java b/src/main/java/org/springblade/modules/house/excel/HouseImporter.java
deleted file mode 100644
index 93ba791..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseImporter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.house.excel.HouseExcel;
-import org.springblade.modules.house.service.IHouseService;
-
-import java.util.List;
-
-/**
- * 用户数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class HouseImporter implements ExcelImporter<HouseExcel> {
-
- private final IHouseService iHouseService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<HouseExcel> data) {
- iHouseService.importUserHouse(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/excel/HouseRentalExcel.java b/src/main/java/org/springblade/modules/house/excel/HouseRentalExcel.java
deleted file mode 100644
index 1467d87..0000000
--- a/src/main/java/org/springblade/modules/house/excel/HouseRentalExcel.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.springblade.modules.house.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * UserExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class HouseRentalExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 房屋 */
- @ExcelProperty( "房屋")
- @ColumnWidth(25)
- private String address;
-
- /** 租客关系 1: 同一户 2:不同一户 */
- @ColumnWidth(15)
- @ExcelProperty( value = "租客关系",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "partyEmberType")
- private String tenantRelationship;
-
- /** 租房时间 */
- @ExcelProperty( "租房时间")
- @ColumnWidth(15)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date rentalTime;
-
- /** 到期时间 */
- @ExcelProperty( "到期时间")
- @ColumnWidth(15)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date dueTime;
-
-// /** 终止时间 */
-// @ExcelProperty( "终止时间")
-// @ColumnWidth(15)
-// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-// private Date terminationTime;
-
- /** 房屋状态 1:部分出租 2:全部出租 */
- @ColumnWidth(15)
- @ExcelProperty( value = "房屋状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "houseStatusType")
- private String houseStatus;
-
- /** 租房用途 1:仓库 2:办公 3:商用 4:居住 */
- @ColumnWidth(15)
- @ExcelProperty( value = "租房用途",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "rentalUseType")
- private String rentalUse;
-
- /** 审核状态 0: 待确认 1: 已确认 */
- @ColumnWidth(15)
- @ExcelProperty( value = "审核状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "confirmStatus")
- private String auditStatus;
-
- /** 租赁期限 */
- @ColumnWidth(15)
- @ExcelProperty( value = "租赁期限",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "dldType")
- private String dldType;
-
- /** 备注 */
- @ColumnWidth(15)
- @ExcelProperty( "备注")
- private String remark;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/house/excel/UserHouseLabelExcel.java b/src/main/java/org/springblade/modules/house/excel/UserHouseLabelExcel.java
deleted file mode 100644
index 132e28f..0000000
--- a/src/main/java/org/springblade/modules/house/excel/UserHouseLabelExcel.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.springblade.modules.house.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class UserHouseLabelExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
-
- /** 门牌地址编码 */
- @ExcelProperty( "门牌地址编码")
- private String houseCode;
-
- /** 标签ID */
- @ExcelProperty( "标签ID")
- private Long labelId;
-
- /** 标签名称 */
- @ExcelProperty( "标签名称")
- private String labelName;
-
- /** 颜色 */
- @ExcelProperty( "颜色")
- private String color;
-
- /** 备注 */
- @ExcelProperty( "备注")
- private String remark;
-
- /** 用户id */
- @ExcelProperty( "用户id")
- private Long userId;
-
-// /** 标签类型:1:人:2房屋 */
-// @ExcelProperty( "标签类型:1:人:2房屋")
-// private Integer lableType;
-
- /** 住户id */
- @ExcelProperty( "住户id")
- private Integer householdId;
-
-
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/house/excel/UserHouseLabelImporter.java b/src/main/java/org/springblade/modules/house/excel/UserHouseLabelImporter.java
deleted file mode 100644
index 0f2bbea..0000000
--- a/src/main/java/org/springblade/modules/house/excel/UserHouseLabelImporter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.system.excel.UserExcel;
-import org.springblade.modules.system.service.IUserService;
-
-import java.util.List;
-
-/**
- * 用户数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class UserHouseLabelImporter implements ExcelImporter<UserHouseLabelExcel> {
-
- private final IUserHouseLabelService householdLabelService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<UserHouseLabelExcel> data) {
- householdLabelService.importUserHouseLabel(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java
deleted file mode 100644
index fbc9939..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.mapper;
-
-import org.springblade.modules.house.entity.HouseLabelEntity;
-import org.springblade.modules.house.vo.UserHouseLabelVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 房屋-标签 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface HouseLabelMapper extends BaseMapper<HouseLabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param houseLabel
- * @return
- */
- List<UserHouseLabelVO> selectHouseLabelPage(IPage page, UserHouseLabelVO houseLabel);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml
deleted file mode 100644
index 182143e..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.HouseLabelMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="houseLabelResultMap" type="org.springblade.modules.house.entity.HouseLabelEntity">
- </resultMap>
-
-
- <select id="selectHouseLabelPage" resultMap="houseLabelResultMap">
- select * from jczz_house_label where is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
deleted file mode 100644
index b26c950..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.excel.HouseExcel;
-import org.springblade.modules.house.vo.HouseParam;
-import org.springblade.modules.house.vo.HouseTree;
-import org.springblade.modules.house.vo.HouseVO;
-import org.springblade.modules.label.vo.LabelVO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface HouseMapper extends BaseMapper<HouseEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param house
- * @return
- */
- List<HouseVO> selectHousePage(IPage page,
- @Param("house") HouseVO house,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 房屋自定义详情查询
- *
- * @param house
- * @return
- */
- HouseVO getHouseDetail(@Param("house") HouseVO house);
-
- /**
- * 导出房屋数据
- *
- * @param house
- * @return
- */
- List<HouseExcel> export(@Param("house") HouseVO house);
-
- /**
- * 查询房屋树
- *
- * @param houseParam
- * @param list
- * @return
- */
- @MapKey(value = "code")
- Map<String, HouseTree> getHouseTree(@Param("houseParam") HouseParam houseParam,
- @Param("list") List<String> list);
-
- Integer getHouseStatisticsOne(String code, Long userId, String aoiCode, String buildingCode, String unitCode, String roleType);
-
- Integer getHouseStatisticsTwo(String code, Long userId, String aoiCode, String buildingCode, String unitCode, String roleType);
-
- Integer getHouseStatisticsThree(String code, Long userId, String aoiCode, String buildingCode, String unitCode, String roleType);
-
- Integer getHouseStatisticsFour(String code, Long userId, String aoiCode, String buildingCode, String unitCode, String roleType);
-
- List<String> getHouseBuilding(String districtCode);
-
- List<String> getHouseUnit(String districtCode, String building);
-
- @MapKey("id")
- List<Map<String, Object>> labelStatistics(@Param("house") HouseVO house,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- @MapKey("id")
- List<Map<String, Object>> labelCommunityStatistics(@Param("house") HouseVO house,
- @Param("regionChildCodesList") List<String> regionChildCodesList);
-
- List<LabelVO> getlabelCount(@Param("house") HouseVO house,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("streetCode") String streetCode);
-
- /**
- * 查询未绑定网格或警格的数据
- * @param type 1:网格 2:警格
- * @return
- */
- List<HouseEntity> getNotBindGridOrJwGridList(@Param("type") Integer type);
-
- /**
- * 按房屋标签统计
- * @param house
- * @param isAdministrator
- * @param regionChildCodesList
- * @param gridCodeList
- * @return
- */
- List<Map<String, Object>> getHouseLabelStatistic(@Param("house") HouseVO house,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList")List<String> regionChildCodesList,
- @Param("gridCodeList")List<String> gridCodeList);
-
- /**
- * 查询对应的社区编号
- * @param id
- * @return
- */
- String getCommunityCode(@Param("id") Long id);
-
- /**
- * 查询所有房屋总数
- * @return
- */
- int getAllListTotal();
-
- /**
- * 查询所有的房屋
- * @param i
- * @param size
- * @return
- */
- List<HouseVO> getAllList(@Param("i") int i,@Param("size") int size);
-
- /**
- * 查询无房屋状态的房屋数量
- * @param house
- * @return
- */
- int getNotBindLabelHouseNum(HouseVO house);
-
- /**
- * 查询无房屋状态的房屋列表集合
- * @param i
- * @param size
- * @return
- */
- List<HouseVO> getNotBindLabelHouseList(@Param("i") int i,@Param("size") int size);
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
deleted file mode 100644
index b477a44..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ /dev/null
@@ -1,981 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.HouseMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="houseResultMap" type="org.springblade.modules.house.entity.HouseEntity">
- <result column="id" property="id"/>
- <result column="house_code" property="houseCode"/>
- <result column="district_code" property="districtCode"/>
- <result column="district_name" property="districtName"/>
- <result column="house_name" property="houseName"/>
- <result column="phone" property="phone"/>
- <result column="area" property="area"/>
- <result column="property_price" property="propertyPrice"/>
- <result column="service_due" property="serviceDue"/>
- <result column="floor" property="floor"/>
- <result column="building" property="building"/>
- <result column="unit" property="unit"/>
- <result column="room" property="room"/>
- <result column="building_no" property="buildingNo"/>
- <result column="image_urls" property="imageUrls"/>
- <result column="create_user" property="createUser"/>
- <result column="created_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--过滤网格数据-->
- <sql id="filterHouseGrid">
- <if test="houseParam.roleName!=null and houseParam.roleName!=''">
- <if test="houseParam.roleName=='网格员'">
- <choose>
- <when test="list != null and list.size()>0">
- and house_code in
- <foreach collection="list" item="houseCode" separator="," open="(" close=")">
- #{houseCode}
- </foreach>
- </when>
- <otherwise>
- and house_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </sql>
-
- <sql id="selectHouse">
- select
- id,
- house_code,
- district_code,
- district_name,
- house_name,
- phone,
- area,
- property_price,
- service_due,
- floor,
- building,
- unit,
- room,
- building_no,
- image_urls,
- create_user,
- create_time,
- update_user,
- update_time,
- remark,
- is_deleted
- from
- jczz_house
- </sql>
-
-
- <!--房屋详情-->
- <resultMap id="houseAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
- <result column="id" property="id"/>
- <result column="house_code" property="houseCode"/>
- <result column="district_code" property="districtCode"/>
- <result column="district_name" property="districtName"/>
- <result column="house_name" property="houseName"/>
- <result column="phone" property="phone"/>
- <result column="area" property="area"/>
- <result column="property_price" property="propertyPrice"/>
- <result column="service_due" property="serviceDue"/>
- <result column="floor" property="floor"/>
- <result column="building" property="building"/>
- <result column="unit" property="unit"/>
- <result column="room" property="room"/>
- <result column="building_no" property="buildingNo"/>
- <result column="image_urls" property="imageUrls"/>
- <result column="create_user" property="createUser"/>
- <result column="created_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- <collection property="userHouseLabelVOList" javaType="java.util.List" select="selectHouseLabelPage"
- column="house_code"
- ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
- </collection>
- </resultMap>
-
-
- <select id="selectHouseLabelPage" resultType="org.springblade.modules.house.vo.HouseholdLabelVO">
- select
- id,
- house_code,
- label_id,
- label_name,
- color,
- remark cremark,
- user_id,
- lable_type,
- household_id
- from
- jczz_user_house_label
- where house_code = #{houseCode} and lable_type = 2
- </select>
-
- <!--房屋详情-->
- <resultMap id="housePageAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="userHouseLabelVOList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
- <id property="id" column="cid"/>
- <result property="remark" column="cremark"/>
- </collection>
- </resultMap>
-
- <!--自定义分页列表-->
- <select id="selectHousePage" resultMap="houseAndHouseLabelMap">
- select
- jh.*,
- concat(jh.building," ",jh.unit," ",jh.room) as address,
- br.town_name as townStreetName,br.name as neiName,
- jg.grid_name
- from jczz_house jh
- left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="house.id != null ">and jh.id = #{house.id}</if>
- <if test="house.streetCode != null and house.streetCode != ''">
- and jda.town_street_code like concat('%',#{house.streetCode},'%')
- </if>
- <if test="house.houseCode != null and house.houseCode != ''">and jh.house_code = #{house.houseCode}</if>
- <if test="house.districtCode != null and house.districtCode != ''">and jh.district_code =
- #{house.districtCode}
- </if>
- <if test="house.districtName != null and house.districtName != ''">
- and jh.district_name like concat('%',#{house.districtName},'%')
- </if>
- <if test="house.townStreetName!=null and house.townStreetName!=''">
- and br.town_name like concat('%',#{house.townStreetName},'%')
- </if>
- <if test="house.neiName!=null and house.neiName!=''">
- and br.name like concat('%',#{house.neiName},'%')
- </if>
- <if test="house.address!=null and house.address!=''">
- and jh.address like concat('%',#{house.address},'%')
- </if>
- <if test="house.houseName != null and house.houseName != ''">and jh.house_name like
- concat('%',#{house.houseName},'%')
- </if>
- <if test="house.phone != null and house.phone != ''">and jh.phone = #{house.phone}</if>
- <if test="house.area != null ">and jh.area = #{house.area}</if>
- <if test="house.propertyPrice != null ">and jh.property_price = #{house.propertyPrice}</if>
- <if test="house.serviceDue != null ">and jh.service_due = #{house.serviceDue}</if>
- <if test="house.floor != null ">and jh.floor = #{house.floor}</if>
- <if test="house.building != null and house.building != ''">and jh.building = #{house.building}</if>
- <if test="house.unit != null and house.unit != ''">and jh.unit = #{house.unit}</if>
- <if test="house.room != null and house.room != ''">and jh.room = #{house.room}</if>
- <if test="house.buildingNo != null ">and jh.building_no = #{house.buildingNo}</if>
- <if test="isAdministrator==2">
- <choose>
- <when test="house.roleName != null and house.roleName != ''">
- <if test="house.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jh.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jh.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="house.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('')
- or
- jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- <if test="house.parentId != null ">
- and jh.house_code in (
- SELECT DISTINCT
- juhl.house_code
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 2
- <if test="house.labelId != null ">
- AND jl.id = #{house.labelId}
- </if>
- <if test="house.parentId != null ">
- AND jl.parent_id = #{house.parentId}
- </if>
- AND juhl.label_id IS NOT NULL
- )
- </if>
- and jh.is_deleted = 0
- ORDER BY
- jh.update_time desc,jh.id desc
- </where>
-
-
- </select>
-
- <!--房屋详情-->
- <resultMap id="houseAndHouseLabelDetailMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
- <result column="id" property="id"/>
- <result column="house_code" property="houseCode"/>
- <result column="district_code" property="districtCode"/>
- <result column="district_name" property="districtName"/>
- <result column="house_name" property="houseName"/>
- <result column="phone" property="phone"/>
- <result column="area" property="area"/>
- <result column="property_price" property="propertyPrice"/>
- <result column="service_due" property="serviceDue"/>
- <result column="floor" property="floor"/>
- <result column="building" property="building"/>
- <result column="unit" property="unit"/>
- <result column="room" property="room"/>
- <result column="building_no" property="buildingNo"/>
- <result column="image_urls" property="imageUrls"/>
- <result column="create_user" property="createUser"/>
- <result column="created_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- <collection property="userHouseLabelVOList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
- <id property="id" column="cid"/>
- <result property="remark" column="cremark"/>
- </collection>
- </resultMap>
-
- <!--房屋自定义详情查询-->
- <select id="getHouseDetail" resultMap="houseAndHouseLabelDetailMap">
- select
- jh.*,
- jhl.id as cid,jhl.*,jhl.remark as cremark,
- br.code as neiCode,br.town_code as streetCode
- from jczz_house jh
- left join jczz_user_house_label jhl on jh.house_code = jhl.house_code and jhl.lable_type = 2
- left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- where jh.is_deleted = 0
- <if test="house.houseCode!=null and house.houseCode!=''">
- and jh.house_code = #{house.houseCode}
- </if>
- <if test="house.id!=null">
- and jh.id = #{house.id}
- </if>
- </select>
-
- <!--房屋数据导出-->
- <select id="export" resultType="org.springblade.modules.house.excel.HouseExcel">
- select
- *,
- concat(building," ",unit," ",room) as address
- from jczz_house
- where is_deleted = 0
- <if test="house.id != null ">and id = #{house.id}</if>
- <if test="house.houseCode != null and house.houseCode != ''">and house_code = #{house.houseCode}</if>
- <if test="house.districtCode != null and house.districtCode != ''">and district_code = #{house.districtCode}
- </if>
- <if test="house.districtName != null and house.districtName != ''">
- and district_name like concat('%',#{house.districtName},'%')
- </if>
- <if test="house.houseName != null and house.houseName != ''">and house_name = #{house.houseName}</if>
- <if test="house.phone != null and house.phone != ''">and phone = #{house.phone}</if>
- <if test="house.area != null ">and area = #{house.area}</if>
- <if test="house.propertyPrice != null ">and property_price = #{house.propertyPrice}</if>
- <if test="house.serviceDue != null ">and service_due = #{house.serviceDue}</if>
- <if test="house.floor != null ">and floor = #{house.floor}</if>
- <if test="house.building != null and house.building != ''">and building = #{house.building}</if>
- <if test="house.unit != null and house.unit != ''">and unit = #{house.unit}</if>
- <if test="house.room != null and house.room != ''">and room = #{house.room}</if>
- <if test="house.buildingNo != null ">and building_no = #{house.buildingNo}</if>
- </select>
-
-
- <!--获取房屋树-->
- <select id="getHouseTree" resultType="org.springblade.modules.house.vo.HouseTree">
- SELECT
- district_code as code,
- district_name as name,
- jda.nei_code as parentCode
- FROM jczz_house jh
- left join
- (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
- nei_code,aoi_code) jda
- on jda.aoi_code = jh.district_code
- WHERE jda.nei_code = #{houseParam.code}
- <include refid="filterHouseGrid"/>
- GROUP BY district_code,district_name,nei_code
- union all
- (
- SELECT
- building as code,
- building as name,
- district_code as parentCode
- FROM jczz_house jh
- left join
- (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
- nei_code,aoi_code) jda
- on jda.aoi_code = jh.district_code
- WHERE jda.nei_code = #{houseParam.code}
- <include refid="filterHouseGrid"/>
- GROUP BY building,district_code
- )
- union all
- (
- select
- unit as code,
- unit name,
- building as parentCode
- FROM jczz_house jh
- left join
- (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
- nei_code,aoi_code) jda
- on jda.aoi_code = jh.district_code
- WHERE jda.nei_code = #{houseParam.code}
- <include refid="filterHouseGrid"/>
- group by unit,building
- )
- union all
- (
- select
- room as code,
- room name,
- unit as parentCode
- FROM jczz_house jh
- left join
- (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
- nei_code,aoi_code) jda
- on jda.aoi_code = jh.district_code
- WHERE jda.nei_code = #{houseParam.code}
- <include refid="filterHouseGrid"/>
- )
- </select>
-
-
- <select id="getHouseStatisticsOne" resultType="java.lang.Integer">
- SELECT
- count( 1 )
- FROM
- (
- SELECT DISTINCT
- jda.building_code
- FROM
- jczz_house jh
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- WHERE
- jda.nei_code = #{code}
- AND jh.is_deleted = 0
- <if test="buildingCode != null and buildingCode != ''">
- and jda.building_code=#{buildingCode}
- </if>
-
- <if test="unitCode != null and unitCode != ''">
- and jda.unit_code=#{unitCode}
- </if>
-
- <if test="aoiCode != null and aoiCode != ''">
- and jda.aoi_code=#{aoiCode}
- </if>
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT DISTINCT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- ) a
-
- </select>
-
-
- <select id="getHouseStatisticsTwo" resultType="java.lang.Integer">
- SELECT
- count( 1 )
- FROM
- (
- SELECT DISTINCT
- jda.address_code
- FROM
- jczz_house jh
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- WHERE
- jda.nei_code = #{code}
- AND jh.is_deleted = 0
- and jda.doorplate_type = '户室牌'
- <if test="buildingCode != null and buildingCode != ''">
- and jda.building_code=#{buildingCode}
- </if>
-
- <if test="unitCode != null and unitCode != ''">
- and jda.unit_code=#{unitCode}
- AND jda.unit_code is not null
- </if>
-
- <if test="aoiCode != null and aoiCode != ''">
- and jda.aoi_code=#{aoiCode}
- </if>
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT DISTINCT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- ) a
-
- </select>
-
-
- <select id="getHouseStatisticsThree" resultType="java.lang.Integer">
- SELECT
- count( 1 )
- FROM
- jczz_household jhh
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jhh.house_code
- WHERE
- jda.nei_code = #{code}
- AND jhh.is_deleted = 0
- and jda.doorplate_type = '户室牌'
- <if test="buildingCode != null and buildingCode != ''">
- and jda.building_code=#{buildingCode}
- </if>
-
- <if test="unitCode != null and unitCode != ''">
- and jda.unit_code=#{unitCode}
- AND jda.unit_code is not null
- </if>
-
- <if test="aoiCode != null and aoiCode != ''">
- and jda.aoi_code=#{aoiCode}
- </if>
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT DISTINCT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- </select>
-
-
- <select id="getHouseStatisticsFour" resultType="java.lang.Integer">
- SELECT
- count( 1 )
- FROM
- (
- SELECT DISTINCT
- jda.unit_code
- FROM
- jczz_house jh
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- WHERE
- jda.nei_code = #{code}
- AND jh.is_deleted = 0
- AND jda.unit_code is not null
- <if test="buildingCode != null and buildingCode != ''">
- and jda.building_code=#{buildingCode}
- </if>
-
- <if test="unitCode != null and unitCode != ''">
- and jda.unit_code=#{unitCode}
- </if>
-
- <if test="aoiCode != null and aoiCode != ''">
- and jda.aoi_code=#{aoiCode}
- </if>
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT DISTINCT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- ) a
-
-
- </select>
-
- <select id="getHouseBuilding" resultType="java.lang.String">
- SELECT DISTINCT
- jh.building
- FROM
- jczz_house jh
- LEFT JOIN jczz_district jd ON jd.aoi_code = jh.district_code
- WHERE
- jd.id = #{districtCode}
- and jh.building is not null
- </select>
-
- <select id="getHouseUnit" resultType="java.lang.String">
- SELECT DISTINCT
- jh.unit
- FROM
- jczz_house jh
- LEFT JOIN jczz_district jd ON jd.aoi_code = jh.district_code
- WHERE
- jd.id = #{districtCode}
- and jd.building = #{building}
- and jh.building is not null
-
- </select>
-
- <select id="labelStatistics" resultType="java.util.Map">
- SELECT
- jl.id AS id,
- jl.parent_id AS parentId,
- jl.label_name AS name,
- jl.sort,
- (SELECT
- count( DISTINCT jhl.house_code )
- FROM
- jczz_user_house_label jhl
- LEFT JOIN jczz_house jh ON jhl.house_code = jh.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jh.grid_code
- AND jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.CODE = jg.community_code
- <where>
- <if test="house.id != null ">and jh.id = #{house.id}</if>
- <if test="house.streetCode != null and house.streetCode != ''">
- and jda.town_street_code like concat('%',#{house.streetCode},'%')
- </if>
- <if test="house.houseCode != null and house.houseCode != ''">and jh.house_code = #{house.houseCode}</if>
- <if test="house.districtCode != null and house.districtCode != ''">and jh.district_code =
- #{house.districtCode}
- </if>
- <if test="house.districtName != null and house.districtName != ''">
- and jh.district_name like concat('%',#{house.districtName},'%')
- </if>
- <if test="house.townStreetName!=null and house.townStreetName!=''">
- and br.town_name like concat('%',#{house.townStreetName},'%')
- </if>
- <if test="house.neiName!=null and house.neiName!=''">
- and br.name like concat('%',#{house.neiName},'%')
- </if>
- <if test="house.address!=null and house.address!=''">
- and jh.address like concat('%',#{house.address},'%')
- </if>
- <if test="house.houseName != null and house.houseName != ''">and jh.house_name like
- concat('%',#{house.houseName},'%')
- </if>
- <if test="house.phone != null and house.phone != ''">and jh.phone = #{house.phone}</if>
- <if test="house.area != null ">and jh.area = #{house.area}</if>
- <if test="house.propertyPrice != null ">and jh.property_price = #{house.propertyPrice}</if>
- <if test="house.serviceDue != null ">and jh.service_due = #{house.serviceDue}</if>
- <if test="house.floor != null ">and jh.floor = #{house.floor}</if>
- <if test="house.building != null and house.building != ''">and jh.building = #{house.building}</if>
- <if test="house.unit != null and house.unit != ''">and jh.unit = #{house.unit}</if>
- <if test="house.room != null and house.room != ''">and jh.room = #{house.room}</if>
- <if test="house.buildingNo != null ">and jh.building_no = #{house.buildingNo}</if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- </choose>
- </if>
- <if test="house.parentId != null ">
- <if test="house.labelId != null ">
- AND jl.id = #{house.labelId}
- </if>
- <if test="house.parentId != null ">
- AND jl.parent_id = #{house.parentId}
- </if>
- and jhl.label_id=jl.id
- AND jhl.lable_type = 2
- AND jhl.label_id IS NOT NULL
- </if>
- and jh.is_deleted = 0
- </where>
- ) count
- FROM
- jczz_label jl where is_deleted = 0
- <if test="house.parentId != null ">
- AND jl.parent_id = #{house.parentId}
- </if>
- and jl.id != '1002'
-
-
- </select>
-
-
- <select id="labelCommunityStatistics" resultType="java.util.Map">
- SELECT
- br.code,
- br.name,
- br.id
- FROM
- blade_region br
- <where>
- <if test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- br.code IN
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </if>
- and br.parent_code = '361102'
- </where>
- </select>
-
- <select id="getlabelCount" resultType="org.springblade.modules.label.vo.LabelVO">
-
- SELECT
- jl.label_name,
- ( SELECT
- count( DISTINCT jhl.house_code )
- FROM
- jczz_user_house_label jhl
- LEFT JOIN jczz_house jh ON jhl.house_code = jh.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jh.grid_code
- AND jg.is_deleted = 0
- LEFT JOIN jczz_community jc ON jc.CODE = jg.community_code
- LEFT JOIN blade_region br ON br.CODE = jg.community_code
- WHERE
- jhl.lable_type = 2
- AND jl.id = jhl.label_id
- AND jc.street_code = #{streetCode}
- <if test="house.townStreetName!=null and house.townStreetName!=''">
- and br.town_name like concat('%',#{house.townStreetName},'%')
- </if>
- <if test="house.neiName!=null and house.neiName!=''">
- and br.name like concat('%',#{house.neiName},'%')
- </if>
- <if test="house.neiName!=null and house.neiName!=''">
- and br.name like concat('%',#{house.neiName},'%')
- </if>
- <if test="house.address!=null and house.address!=''">
- and jh.address like concat('%',#{house.address},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- </choose>
- </if>
- <if test="house.parentId != null ">
- and jh.house_code in (
- SELECT DISTINCT
- juhl.house_code
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 2
- <if test="house.labelId != null ">
- AND jl.id = #{house.labelId}
- </if>
- <if test="house.parentId != null ">
- AND jl.parent_id = #{house.parentId}
- </if>
- AND juhl.label_id IS NOT NULL
- )
- </if>
- ) num
- FROM
- jczz_label jl
- WHERE
- jl.parent_id = '1001'
- ORDER BY
- jl.sort DESC
-
- </select>
-
- <!--查询未绑定网格或警格的数据-->
- <select id="getNotBindGridOrJwGridList" resultType="org.springblade.modules.house.entity.HouseEntity">
- select id,lng,lat from jczz_house where is_deleted = 0 and lng != ''
- <if test="type == 1">
- and grid_code is null
- </if>
- <if test="type == 2">
- and jw_grid_code is null
- </if>
- </select>
-
- <!--按房屋标签统计-->
- <select id="getHouseLabelStatistic" resultType="java.util.Map">
- select a.label_name as labelName,ifnull(b.numbers,0) numbers from
- (
- select label_name from jczz_label where parent_id = 1001 and is_deleted = 0
- union all
- select '未知' as label_name
- ) a
- left join (
- select
- ifnull(juhl.label_name,'未知') labelName,
- count(*) as numbers
- from jczz_doorplate_address jda
- LEFT JOIN jczz_house jh on jda.address_code = jh.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN jczz_user_house_label juhl ON juhl.house_code = jh.house_code and juhl.lable_type = 2
- where jda.doorplate_type = '户室牌'
- <if test="house.communityCode != null and house.communityCode != ''">
- and jg.community_code = #{house.communityCode}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="house.roleName != null and house.roleName != ''">
- <if test="house.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jh.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jh.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="house.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('')
- or
- jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- group by juhl.label_name
- ) b on a.label_name =b.labelName
- </select>
-
- <!--查询对应的社区编号-->
- <select id="getCommunityCode" resultType="java.lang.String">
- SELECT
- jpag.community_code
- FROM
- jczz_house jh
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- where jh.is_deleted = 0
- and jh.id = #{id}
- </select>
-
- <!--查询所有房屋总数-->
- <select id="getAllListTotal" resultType="java.lang.Integer">
- SELECT
- count(*)
- FROM
- jczz_house jh
- where jh.is_deleted = 0
- </select>
-
- <!--查询所有的房屋-->
- <select id="getAllList" resultType="org.springblade.modules.house.vo.HouseVO">
- SELECT
- jh.*,
- jpag.community_code
- FROM
- jczz_house jh
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- where jh.is_deleted = 0
- limit #{i},#{size}
- </select>
-
- <!--查询无房屋状态的房屋数量-->
- <select id="getNotBindLabelHouseNum" resultType="java.lang.Integer">
- select count(*) from (
- SELECT
- jh.house_code,
- case when c.house_code is not null then 1
- when a.house_code is not null and b.house_code is null then 2
- when b.house_code is not null then 3
- end as status
- FROM
- jczz_house jh
- left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship = 1 and house_code is not null and house_code != '' GROUP BY house_code
- ) a on a.house_code = jh.house_code
- left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship = 18 and house_code is not null and house_code != '' GROUP BY house_code
- ) b on b.house_code = jh.house_code
- left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship is null or (relationship!=1 and relationship!=18) and house_code is not null and house_code != '' GROUP BY house_code
- ) c on c.house_code = jh.house_code
- ) d left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
- where juhl.id is null and status is not null
- </select>
-
- <!--查询无房屋状态的房屋列表集合-->
- <select id="getNotBindLabelHouseList" resultType="org.springblade.modules.house.vo.HouseVO">
- select d.* from (
- SELECT
- jh.house_code,
- case when c.house_code is not null then 1
- when a.house_code is not null and b.house_code is null then 2
- when b.house_code is not null then 3
- end as status
- FROM
- jczz_house jh
- left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship = 1 and house_code is not null and house_code != '' GROUP BY house_code
- ) a on a.house_code = jh.house_code
- left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship = 18 and house_code is not null and house_code != '' GROUP BY house_code
- ) b on b.house_code = jh.house_code
- left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship is null or (relationship!=1 and relationship!=18) and house_code is not null and house_code != '' GROUP BY house_code
- ) c on c.house_code = jh.house_code
- ) d left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
- where juhl.id is null and status is not null
- limit #{i},#{size}
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.java
deleted file mode 100644
index ab95969..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.modules.house.vo.HouseRentalStatistics;
-import org.springblade.modules.house.vo.HouseRentalTenantVO;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.excel.HouseRentalExcel;
-
-import java.util.List;
-
-/**
- * 出租屋 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface HouseRentalMapper extends BaseMapper<HouseRentalEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param houseRental
- * @return
- */
- List<HouseRentalTenantVO> selectHouseRentalPage(IPage page,
- @Param("vo") HouseRentalTenantVO houseRental,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 查询房屋出租情况
- * @param code
- * @return
- */
- List<HouseRentalVO> getHouseRentalListByCode(@Param("code") String code);
-
- /**
- * 获取统计数据
- * @return
- */
- List<HouseRentalStatistics> getStatistics(@Param("vo") HouseRentalTenantVO houseRental,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 导出租赁信息
- * @param houseRental
- * @return
- */
- List<HouseRentalExcel> export(@Param("vo") HouseRentalTenantVO houseRental);
-
- Integer getStatisticsCount(@Param("vo") HouseRentalTenantVO houseRental,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("isAdministrator") Integer isAdministrator);
-
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
deleted file mode 100644
index 9251d39..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
+++ /dev/null
@@ -1,444 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.HouseRentalMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="houseRentalResultMap" type="org.springblade.modules.house.entity.HouseRentalEntity">
- <result column="id" property="id"/>
- <result column="house_code" property="houseCode"/>
- <result column="house_name" property="houseName"/>
- <result column="tenant_relationship" property="tenantRelationship"/>
- <result column="rental_time" property="rentalTime"/>
- <result column="due_time" property="dueTime"/>
- <result column="house_status" property="houseStatus"/>
- <result column="rental_use" property="rentalUse"/>
- <result column="file_urls" property="fileUrls"/>
- <result column="audit_status" property="auditStatus"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <resultMap id="houseRentalTenant" type="org.springblade.modules.house.vo.HouseRentalVO"
- autoMapping="true">
- <id property="id" column="id"/>
- <collection property="householdVOList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
- <id property="id" column="tenantId"/>
- </collection>
- </resultMap>
-
-
- <sql id="selectHouseRental">
- select
- id,
- house_code,
- tenant_relationship,
- rental_time,
- due_time,
- termination_time,
- house_status,
- rental_use,
- audit_status,
- file_urls,
- create_user,
- create_time,
- update_user,
- update_time,
- remark,
- is_deleted
- from
- jczz_house_rental
- </sql>
-
- <sql id="filterData">
- <if test="isAdministrator==2">
- <choose>
- <when test="vo.roleName != null and vo.roleName != ''">
- <if test="vo.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jh.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jh.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="vo.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </sql>
-
- <!--自定义列表查询-->
- <select id="selectHouseRentalPage" resultType="org.springblade.modules.house.vo.HouseRentalTenantVO">
- SELECT
- jhr.*,
- jh.address as houseName,
- b.tenantName,
- b.phone,
- concat(jh.district_name," ",jh.building," ",unit," ",room) as address,
- case when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 then 1
- when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4 then 3
- else 2 end as dldType,
- if(jhr.termination_time is null,if(date_format(jhr.due_time,'%Y-%m-%d') >= date_format(now(),'%Y-%m-%d'),0,1),2) as status
- FROM jczz_house_rental jhr
- JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN (
- SELECT jht.housing_rental_id,jht.name as tenantName,jht.phone_number as phone
- FROM jczz_household jht RIGHT JOIN (
- SELECT MAX(ID) as id,housing_rental_id
- FROM jczz_household
- WHERE is_deleted = 0
- <if test="vo.tenantName != null and vo.tenantName != ''">
- AND name LIKE CONCAT('%',#{vo.tenantName},'%')
- </if>
- and housing_rental_id is not null
- GROUP BY housing_rental_id
- ) a ON a.id = jht.id and a.housing_rental_id is not null
- ) b ON b.housing_rental_id = jhr.id
- WHERE jhr.is_deleted = 0
- <if test="vo.auditStatus != null and vo.auditStatus != ''">
- <if test="vo.auditStatus ==1">
- AND jhr.audit_status = 1
- </if>
- <if test="vo.auditStatus ==2">
- AND jhr.audit_status = 0
- </if>
- <if test="vo.auditStatus ==10">
- AND date_format(jhr.due_time,'%Y-%m-%d')>= date_format(now(),'%Y-%m-%d')
- </if>
- <if test="vo.auditStatus ==20">
- AND TIMESTAMPDIFF( day, now(), jhr.due_time )<30
- AND TIMESTAMPDIFF( day, now(), jhr.due_time )>= 0
- </if>
- <if test="vo.auditStatus ==30">
- AND date_format(jhr.due_time,'%Y-%m-%d')< date_format(now(),'%Y-%m-%d')
- </if>
- </if>
- <if test="vo.tenantName != null and vo.tenantName != ''">
- AND b.tenantName LIKE CONCAT('%',#{vo.tenantName},'%')
- </if>
- <if test="vo.tenantRelationship != null">
- AND jhr.tenant_relationship = #{vo.tenantRelationship}
- </if>
- <if test="vo.houseStatus != null">
- AND jhr.house_status = #{vo.houseStatus}
- </if>
- <if test="vo.rentalUse != null">
- AND jhr.rental_use = #{vo.rentalUse}
- </if>
- <if test="vo.dldType != null">
- <if test="vo.dldType ==1 ">
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8
- </if>
- <if test="vo.dldType ==2 ">
- AND 4 <= TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<=8
- </if>
- <if test="vo.dldType ==3 ">
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4
- </if>
- </if>
- <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != '' ">
- AND jhr.create_time BETWEEN #{vo.startTime} and #{vo.endTime}
- </if>
-
- <if test="vo.communityCode != null and vo.communityCode != ''">
- AND jpag.community_code = #{vo.communityCode}
- </if>
-
- <include refid="filterData"/>
-
- order by jhr.create_time desc,jhr.id desc
- </select>
-
- <!--查询房屋出租情况-->
- <select id="getHouseRentalListByCode" resultMap="houseRentalTenant">
- select
- jhr.*,
- if(termination_time is null,if(date_format(jhr.due_time,'%Y-%m-%d') >= date_format(now(),'%Y-%m-%d'),0,1),2) as status,
- jht.id as tenantId,
- jht.*
- from jczz_house_rental jhr
- left join jczz_household jht on jhr.id = jht.housing_rental_id and jht.is_deleted = 0
- where 1 = 1
- and jhr.is_deleted = 0
- and jhr.house_code = #{code}
- </select>
-
- <sql id="filterHouseGrid">
- <if test="vo.roleName!=null and vo.roleName!=''">
- <if test="vo.roleName=='网格员'">
- <choose>
- <when test="list != null and list.size()>0">
- and jda.address_code in
- <foreach collection="list" item="houseCode" separator ="," open="(" close=")">
- #{houseCode}
- </foreach>
- </when>
- <otherwise>
- and jda.address_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </sql>
-
- <select id="getStatistics" resultType="org.springblade.modules.house.vo.HouseRentalStatistics">
- SELECT
- 'longTerm' as term,count(1) total,ifnull(sum(num),0) as personNum
- FROM jczz_house_rental jhr
- LEFT JOIN
- (
- select housing_rental_id,count(*) num from jczz_household
- where is_deleted = 0 and housing_rental_id is not null
- GROUP BY housing_rental_id
- ) jht
- ON jht.housing_rental_id = jhr.id
- JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- WHERE jhr.is_deleted = 0
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8
- <if test="vo.auditStatus != null and vo.auditStatus != '' or vo.auditStatus == 0 ">
- AND jhr.audit_status = #{vo.auditStatus}
- </if>
- <include refid="filterData"/>
-
- UNION ALL
-
- SELECT 'middleTerm' AS term,count(1) total,ifnull(sum(num),0) as personNum
- FROM jczz_house_rental jhr
- LEFT JOIN
- (
- select housing_rental_id,count(*) num from jczz_household
- where is_deleted = 0 and housing_rental_id is not null
- GROUP BY housing_rental_id
- ) jht
- ON jht.housing_rental_id = jhr.id
- JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- WHERE jhr.is_deleted = 0
- AND 4 <= TIMESTAMPDIFF( MONTH, rental_time, due_time ) AND TIMESTAMPDIFF( MONTH, rental_time, due_time )<=8
- <if test="vo.auditStatus != null and vo.auditStatus != '' or vo.auditStatus == 0 ">
- AND jhr.audit_status = #{vo.auditStatus}
- </if>
- <include refid="filterData"/>
-
- UNION ALL
-
- SELECT 'shortTerm' AS term,count(1) total,ifnull(sum(num),0) as personNum
- FROM jczz_house_rental jhr
- LEFT JOIN
- (
- select housing_rental_id,count(*) num from jczz_household
- where is_deleted = 0 and housing_rental_id is not null
- GROUP BY housing_rental_id
- ) jht
- ON jht.housing_rental_id = jhr.id
- JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- WHERE jhr.is_deleted = 0
- AND TIMESTAMPDIFF( MONTH, rental_time, due_time )<4
- <if test="vo.auditStatus != null and vo.auditStatus != '' or vo.auditStatus == 0 ">
- AND jhr.audit_status = #{vo.auditStatus}
- </if>
- <include refid="filterData"/>
- </select>
-
- <!--导出租赁信息-->
- <select id="export" resultType="org.springblade.modules.house.excel.HouseRentalExcel">
- SELECT
- jhr.tenant_relationship,jhr.rental_time,jhr.due_time,jhr.house_status,
- jhr.rental_use,jhr.audit_status,jhr.remark,
- jda.address_name as houseName,b.tenantName,b.phone,
- concat(jh.district_name," ",jh.building," ",unit," ",room) as address,
- case when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 then 1
- when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4 then 3
- else 2 end as dldType
- FROM jczz_house_rental jhr
- JOIN jczz_doorplate_address jda ON jda.address_code = jhr.house_code
- JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
- LEFT JOIN (
- SELECT jht.housing_rental_id,jht.name as tenantName,jht.phoneNumber phone
- FROM jczz_household jht RIGHT JOIN (
- SELECT MAX(ID) as id,housing_rental_id
- FROM jczz_household
- WHERE is_deleted = 0 and house_rental_id is not null
- <if test="vo.tenantName != null and vo.tenantName != ''">
- AND name LIKE CONCAT('%',#{vo.tenantName},'%')
- </if>
- GROUP BY housing_rental_id
- ) a ON a.id = jht.id
- ) b ON b.housing_rental_id = jhr.id
- WHERE jhr.is_deleted = 0
- <if test="vo.auditStatus != null and vo.auditStatus != ''">
- <if test="vo.auditStatus ==1">
- AND jhr.audit_status = 1
- </if>
- <if test="vo.auditStatus ==2">
- AND jhr.audit_status = 0
- </if>
- <if test="vo.auditStatus ==10">
- AND date_format(jhr.due_time,'%Y-%m-%d')>= date_format(now(),'%Y-%m-%d')
- </if>
- <if test="vo.auditStatus ==20">
- AND TIMESTAMPDIFF( day, now(), jhr.due_time )<30
- </if>
- <if test="vo.auditStatus ==30">
- AND date_format(jhr.due_time,'%Y-%m-%d')< date_format(now(),'%Y-%m-%d')
- </if>
- </if>
- <if test="vo.tenantName != null and vo.tenantName != ''">
- AND b.tenantName LIKE CONCAT('%',#{vo.tenantName},'%')
- </if>
- <if test="vo.tenantRelationship != null">
- AND jhr.tenant_relationship = #{vo.tenantRelationship}
- </if>
- <if test="vo.houseStatus != null">
- AND jhr.house_status = #{vo.houseStatus}
- </if>
- <if test="vo.rentalUse != null">
- AND jhr.rental_use = #{vo.rentalUse}
- </if>
- <if test="vo.dldType != null">
- <if test="vo.dldType ==1 ">
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8
- </if>
- <if test="vo.dldType ==2 ">
- AND 4 <= TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<=8
- </if>
- <if test="vo.dldType ==3 ">
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4
- </if>
- </if>
- <include refid="filterHouseGrid"/>
- </select>
-
-
- <select id="getStatisticsCount" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM jczz_house_rental jhr
- JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN (
- SELECT jht.housing_rental_id,jht.name as tenantName,jht.phone_number as phone
- FROM jczz_household jht RIGHT JOIN (
- SELECT MAX(ID) as id,housing_rental_id
- FROM jczz_household
- WHERE is_deleted = 0
- <if test="vo.tenantName != null and vo.tenantName != ''">
- AND name LIKE CONCAT('%',#{vo.tenantName},'%')
- </if>
- and housing_rental_id is not null
- GROUP BY housing_rental_id
- ) a ON a.id = jht.id and a.housing_rental_id is not null
- ) b ON b.housing_rental_id = jhr.id
- WHERE jhr.is_deleted = 0
- <if test="vo.auditStatus != null">
- <if test="vo.auditStatus ==1">
- AND jhr.audit_status = 1
- </if>
- <if test="vo.auditStatus ==2">
- AND jhr.audit_status = 0
- </if>
- <if test="vo.auditStatus ==10">
- AND date_format(jhr.due_time,'%Y-%m-%d')>= date_format(now(),'%Y-%m-%d')
- </if>
- <if test="vo.auditStatus ==20">
- AND TIMESTAMPDIFF( day, now(), jhr.due_time )<30
- AND TIMESTAMPDIFF( day, now(), jhr.due_time )>= 0
- </if>
- <if test="vo.auditStatus ==30">
- AND date_format(jhr.due_time,'%Y-%m-%d')< date_format(now(),'%Y-%m-%d')
- </if>
- </if>
- <if test="vo.tenantName != null and vo.tenantName != ''">
- AND b.tenantName LIKE CONCAT('%',#{vo.tenantName},'%')
- </if>
- <if test="vo.tenantRelationship != null">
- AND jhr.tenant_relationship = #{vo.tenantRelationship}
- </if>
- <if test="vo.houseStatus != null">
- AND jhr.house_status = #{vo.houseStatus}
- </if>
- <if test="vo.rentalUse != null">
- AND jhr.rental_use = #{vo.rentalUse}
- </if>
- <if test="vo.dldType != null">
- <if test="vo.dldType ==1 ">
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8
- </if>
- <if test="vo.dldType ==2 ">
- AND 4 <= TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<=8
- </if>
- <if test="vo.dldType ==3 ">
- AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4
- </if>
- </if>
- <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != '' ">
- AND jhr.create_time BETWEEN #{vo.startTime} and #{vo.endTime}
- </if>
-
- <if test="vo.communityCode != null and vo.communityCode != ''">
- AND jpag.community_code = #{vo.communityCode}
- </if>
-
- <include refid="filterData"/>
-
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.java
deleted file mode 100644
index 5e384e8..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import org.springblade.modules.house.vo.HouseTenantVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 租户管理 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface HouseTenantMapper extends BaseMapper<HouseTenantEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param houseTenant
- * @return
- */
- List<HouseTenantVO> selectHouseTenantPage(IPage page, HouseTenantVO houseTenant);
-
- /**
- * 根据租房id删除租户信息
- * @param housingRentalId
- * @return
- */
- int removeByHousingRentalId(@Param("housingRentalId") Long housingRentalId);
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.xml
deleted file mode 100644
index ff7e231..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.HouseTenantMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="houseTenantResultMap" type="org.springblade.modules.house.entity.HouseTenantEntity">
- <result property="id" column="id" />
- <result property="housingRentalId" column="housing_rental_id" />
- <result property="name" column="name" />
- <result property="phone" column="phone" />
- <result property="idCard" column="id_card" />
- <result property="domicile" column="domicile" />
- <result property="workUnit" column="work_unit" />
- <result property="remark" column="remark" />
- <result property="isDeleted" column="is_deleted" />
- <result property="gender" column="gender" />
- <result property="ethnicity" column="ethnicity" />
- <result property="createTime" column="create_time" />
- </resultMap>
-
- <sql id="selectHouseTenant">
- select
- id,
- housing_rental_id,
- name,
- phone,
- id_card,
- domicile,
- work_unit,
- remark,
- is_deleted,
- gender,
- ethnicity,
- create_time
- from
- jczz_house_tenant
- </sql>
-
-
- <select id="selectHouseTenantPage" resultMap="houseTenantResultMap">
- <include refid="selectHouseTenant"/>
- <where>
- <if test="houseTenant.id != null "> and id = #{houseTenant.id}</if>
- <if test="houseTenant.housingRentalId != null "> and housing_rental_id = #{houseTenant.housingRentalId}</if>
- <if test="houseTenant.name != null and name != ''"> and name = #{houseTenant.name}</if>
- <if test="houseTenant.phone != null and phone != ''"> and phone = #{houseTenant.phone}</if>
- <if test="houseTenant.idCard != null and idCard != ''"> and id_card = #{houseTenant.idCard}</if>
- <if test="houseTenant.domicile != null and domicile != ''"> and domicile = #{houseTenant.domicile}</if>
- <if test="houseTenant.workUnit != null and workUnit != ''"> and work_unit = #{houseTenant.workUnit}</if>
- <if test="houseTenant.remark != null and remark != ''"> and remark = #{houseTenant.remark}</if>
- <if test="houseTenant.isDeleted != null "> and is_deleted = #{houseTenant.isDeleted}</if>
- <if test="houseTenant.gender != null "> and gender = #{houseTenant.gender}</if>
- <if test="houseTenant.ethnicity != null "> and ethnicity = #{houseTenant.ethnicity}</if>
- <if test="houseTenant.createTime != null "> and create_time = #{houseTenant.createTime}</if>
- </where>
- </select>
-
- <!--根据租房id删除租户信息-->
- <update id="removeByHousingRentalId">
- update jczz_house_tenant set is_deleted = 1 where housing_rental_id = #{housingRentalId}
- </update>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java
deleted file mode 100644
index 4e85451..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.excel.HouseHoldExcel;
-import org.springblade.modules.house.vo.HouseholdOtherVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 住户 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface HouseholdMapper extends BaseMapper<HouseholdEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param household
- * @return
- */
- List<HouseholdVO> selectHouseholdPage(IPage page,
- @Param("household") HouseholdVO household,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
- /**
- * 获取全部
- *
- * @param household
- * @return
- */
- List<HouseholdVO> getAllHouseHold(@Param("household") HouseholdVO household);
-
-
- /**
- * 查询房屋集合信息
- *
- * @param userId
- * @return
- */
- List<TreeStringNode> selectHouseNodeList(@Param("userId") Long userId);
-
- /**
- * 查询房屋人员情况
- *
- * @param code
- * @return
- */
- List<HouseholdVO> getHouseholdListByCode(@Param("code") String code);
-
- /**
- * 住户 自定义查询详情
- *
- * @param household
- * @return
- */
- HouseholdVO getHouseholdListById(@Param("household") HouseholdEntity household);
-
- /**
- * 导出
- *
- * @param household
- * @return
- */
- List<HouseHoldExcel> export(@Param("household") HouseholdVO household);
-
- Integer statistics(@Param("household") HouseholdVO household,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
- /**
- * 查询物业
- *
- * @param household
- * @return
- */
- HouseholdOtherVO getProperty(@Param("household") HouseholdVO household);
-
- /**
- * 查询网格
- *
- * @param household
- * @return
- */
- HouseholdOtherVO getGrid(@Param("household") HouseholdVO household);
-
- /**
- * 查询公安信息
- *
- * @param household
- * @return
- */
- HouseholdOtherVO getSecurity(@Param("household") HouseholdVO household);
-
- List<Map<String, Object>> getHouseHoldStatistics(String code, Long userId, String roleType);
-
- List<Map<String, Object>> getHouseHoldStatisticsAge(String code, Long userId, String roleType);
-
- /**
- * 查询所有未入库的业主信息
- *
- * @return
- */
- List<HouseholdEntity> getNotInsertUserHousehold();
-
- /**
- * 住户列表查询
- *
- * @param household
- * @return
- */
- List<HouseholdVO> selectHouseholdList(@Param("household") HouseholdVO household);
-
- List<HouseholdVO> getKeynotePersonnelPage(IPage<HouseholdVO> page, @Param("household") HouseholdVO household);
-
- /**
- * 根据人员标签编号集合查询对应的住户(按颜色区分近多少天没有发过任务的住户)
- *
- * @param list
- * @return
- */
- List<HouseholdVO> getHouseholdListByParam(@Param("list") List<Integer> list);
-
- @MapKey(value = "id")
- Map<Integer, TreeIntegerNode> getlabelStatistics(@Param("household") HouseholdVO household);
-
- /**
- * 多个小区id查询用户
- *
- * @param list
- * @return
- */
- List<HouseholdVO> getUserInfoByDistrictIds(@Param("list") List<String> list, @Param("vo") HouseholdVO householdVO, IPage<HouseholdVO> page);
-
- /**
- * 查询住户对应的社区编号
- * @param id
- * @return
- */
- String getCommunityCode(@Param("id") Long id);
-
- /**
- * 查询所有住户总数
- * @return
- */
- int getAllListTotal();
-
- /**
- * 查询对应的住户集合
- * @param i
- * @param size
- * @return
- */
- List<HouseholdVO> getAllList(@Param("i") int i,@Param("size") int size);
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
deleted file mode 100644
index 19d8e6f..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ /dev/null
@@ -1,1286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.HouseholdMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="householdResultMap" type="org.springblade.modules.house.entity.HouseholdEntity">
- <result property="id" column="id" />
- <result property="houseCode" column="house_code" />
- <result property="name" column="name" />
- <result property="phoneNumber" column="phone_number" />
- <result property="associatedUserId" column="associated_user_id" />
- <result property="roleType" column="role_type" />
- <result property="relationship" column="relationship" />
- <result property="isPrimaryContact" column="is_primary_contact" />
- <result property="residentialStatus" column="residential_status" />
- <result property="gender" column="gender" />
- <result property="birthday" column="birthday" />
- <result property="idCard" column="id_card" />
- <result property="cardType" column="card_type" />
- <result property="cardNo" column="card_no" />
- <result property="ethnicity" column="ethnicity" />
- <result property="education" column="education" />
- <result property="residentType" column="resident_type" />
- <result property="hukouRegistration" column="hukou_registration" />
- <result property="residentAdcode" column="resident_adcode" />
- <result property="nativePlaceAdcode" column="native_place_adcode" />
- <result property="religiousBelief" column="religious_belief" />
- <result property="healthStatus" column="health_status" />
- <result property="diseaseName" column="disease_name" />
- <result property="workStatus" column="work_status" />
- <result property="employer" column="employer" />
- <result property="occupation" column="occupation" />
- <result property="cmpyRegAddr" column="cmpy_reg_addr" />
- <result property="goOutAddr" column="go_out_addr" />
- <result property="goOutWhere" column="go_out_where" />
- <result property="goOutTime" column="go_out_time" />
- <result property="goOutReason" column="go_out_reason" />
- <result property="maritalStatus" column="marital_status" />
- <result property="cardNumber" column="card_number" />
- <result property="otherContact" column="other_contact" />
- <result property="homeAdcode" column="home_adcode" />
- <result property="currentAddress" column="current_address" />
- <result property="disabilityCert" column="disability_cert" />
- <result property="partyEmber" column="party_ember" />
- <result property="housingRentalId" column="housing_rental_id" />
- <result property="confirmFlag" column="confirm_flag" />
- <result property="createUser" column="create_user" />
- <result property="createTime" column="create_time" />
- <result property="updateUser" column="update_user" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- <result property="isDeleted" column="is_deleted" />
- <result property="volunteerOrg" column="volunteer_org" />
- </resultMap>
-
- <sql id="selectHousehold">
- select
- id,
- house_code,
- name,
- phone_number,
- associated_user_id,
- role_type,
- relationship,
- is_primary_contact,
- residential_status,
- gender,
- birthday,
- id_card,
- card_type,
- card_no,
- ethnicity,
- education,
- resident_type,
- hukou_registration,
- resident_adcode,
- native_place_adcode,
- religious_belief,
- health_status,
- disease_name,
- work_status,
- employer,
- occupation,
- cmpy_reg_addr,
- go_out_addr,
- go_out_where,
- go_out_time,
- go_out_reason,
- marital_status,
- card_number,
- other_contact,
- home_adcode,
- current_address,
- disability_cert,
- party_ember,
- housing_rental_id,
- confirm_flag,
- create_user,
- create_time,
- update_user,
- update_time,
- remark,
- is_deleted,
- volunteer_org
- from
- jczz_household
- </sql>
-
- <resultMap id="householdAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="householdLabelList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
- <id property="id" column="cid"/>
- <id property="houseCode" column="houseCodes"/>
- <result property="remark" column="cremark"/>
- </collection>
- </resultMap>
-
- <resultMap id="householdPageAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="householdLabelList" javaType="java.util.List" select="selectHouseLabelPage" column="id"
- ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
- </collection>
- </resultMap>
-
- <select id="selectHouseLabelPage" resultType="org.springblade.modules.house.vo.HouseholdLabelVO">
- select id,
- house_code,
- label_id,
- label_name,
- color,
- remark cremark,
- user_id,
- lable_type,
- household_id
- from jczz_user_house_label
- where household_id = #{id}
- and lable_type = 1
- </select>
-
- <!--自定义分页数据查询-->
- <select id="selectHouseholdPage" resultMap="householdPageAndLabelMap">
- SELECT
- jh.id,
- jh.house_code,
- jh.NAME,
- jh.phone_number,
- jh.associated_user_id,
- jh.role_type,
- jh.relationship,
- jh.is_primary_contact,
- jh.residential_status,
- jh.gender,
- jh.birthday,
- jh.id_card,
- jh.card_type,
- ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
- jh.ethnicity,
- jh.education,
- jh.resident_type,
- jh.hukou_registration,
- jh.resident_adcode,
- jh.native_place_adcode,
- jh.religious_belief,
- jh.health_status,
- jh.disease_name,
- jh.work_status,
- jh.employer,
- jh.occupation,
- jh.cmpy_reg_addr,
- jh.go_out_addr,
- jh.go_out_where,
- jh.go_out_time,
- jh.go_out_reason,
- jh.marital_status,
- jh.card_number,
- jh.other_contact,
- IF
- ( jda.id IS NOT NULL, jda.address_name, jh.current_address ) AS current_address,
- jh.disability_cert,
- jh.party_ember,
- jh.remark,
- jh.confirm_flag,
- jh.housing_rental_id,
- IF
- ( jda.id IS NOT NULL, substring( jda.town_street_code, 1, 9 ), jh.home_adcode ) AS home_adcode,
- jhs.district_name aoiName,
- concat( jhs.building, " ", unit, " ", room ) AS address,
- jda.town_street_name AS townStreetName,
- jda.nei_name AS neiName,
- jg.grid_name,
- jhs.building,
- jhs.district_code aoiCode,
- jh.volunteer_org,
- case
- when TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) < 18 then 2
- when TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) >= 18 then 1
- end as minors,
- jhs.unit
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="household.labelIdList !=null and household.labelIdList.size() >0 ">
- EXISTS (
- SELECT
- *
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- where juhl.household_id = jh.id
- and juhl.lable_type = 1
- AND juhl.household_id IS NOT NULL
- AND jl.id in
- <foreach collection="household.labelIdList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </if>
- <if test="household.userId!=null">
- AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id =
- #{household.userId}
- )
- </if>
-
- <if test="household.searchKey!=null and household.searchKey!=''">
- and CONCAT(jh.name,jh.phone_number) like CONCAT ('%', #{household.searchKey},'%')
- </if>
-
- <if test="household.name!=null and household.name !=''">
- and jh.name like concat('%',#{household.name},'%')
- </if>
- <if test="household.volunteerOrg != null and household.volunteerOrg != ''">
- and jh.volunteer_org like concat('%',#{household.volunteerOrg},'%')
- </if>
- <if test="household.houseCode!=null and household.houseCode !=''">
- and jh.house_code = #{household.houseCode}
- </if>
-
- <if test="household.communityCode!=null and household.communityCode !=''">
- and jg.community_code = #{household.communityCode}
- </if>
- <!-- 等于18 就是租户 -->
- <if test="household.relationship!=null and household.relationship == 18">
- and jh.relationship = #{household.relationship}
-
- <if test="household.minors!=null and household.minors ==2">
- and TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) < 18
- </if>
- <if test="household.minors!=null and household.minors ==1">
- and TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) >= 18
- </if>
- </if>
- <!-- 不等于18 就是非租户 -->
- <if test="household.relationship!=null and household.relationship != 18">
- and jh.relationship != #{household.relationship}
- </if>
-
- <if test="household.phoneNumber!=null and household.phoneNumber !=''">
- and jh.phone_number like concat('%',#{household.phoneNumber},'%')
- </if>
- <if test="household.idCard!=null and household.idCard !=''">
- and jh.id_card like concat('%',#{household.idCard},'%')
- </if>
- <if test="household.aoiName!=null and household.aoiName !=''">
- and jhs.district_name like concat('%',#{household.aoiName},'%')
- </if>
- <if test="household.confirmFlag != null ">
- and jh.confirm_flag = #{household.confirmFlag}
- </if>
- <if test="household.townStreetName!=null and household.townStreetName!=''">
- and jda.town_street_name like concat('%',#{household.townStreetName},'%')
- </if>
- <if test="household.neiName!=null and household.neiName!=''">
- and jda.nei_name like concat('%',#{household.neiName},'%')
- </if>
- <if test="household.housingRentalId != null ">
- and jh.housing_rental_id = #{household.housingRentalId}
- </if>
- <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
- AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="household.roleName != null and household.roleName != ''">
- <if test="household.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jhs.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jhs.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="household.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
-
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- <if test="household.building!=null and household.building!=''">
- and jhs.building like concat(#{household.building},'%')
- </if>
- <if test="household.unit!=null and household.unit!=''">
- and jhs.unit like concat(#{household.unit},'%')
- </if>
- <if test="household.aoiCode!=null and household.aoiCode!=''">
- and jhs.district_code = #{household.aoiCode}
- </if>
- and jh.is_deleted = 0
- order by jh.create_time desc
- </where>
-
-
- </select>
-
- <select id="getAllHouseHold" resultMap="householdPageAndLabelMap">
- SELECT
- jh.id,
- jh.house_code,
- jh.NAME,
- jh.phone_number,
- jh.associated_user_id,
- jh.role_type,
- jh.relationship,
- jh.is_primary_contact,
- jh.residential_status,
- jh.birthday,
- jh.id_card,
- ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
- jh.ethnicity,
- jh.education,
- jh.hukou_registration,
- jh.work_status,
- employer,
- jh.marital_status,
- jh.card_number,
- jh.other_contact,
- jh.current_address,
- jh.disability_cert,
- jh.party_ember,
- jh.create_user,
- jh.create_time,
- jh.update_user,
- jh.update_time,
- jh.confirm_flag,
- jh.remark,
- jhs.district_name aoiName,
- concat( jhs.building, " ", unit, " ", room ) AS address,
- jda.town_street_name AS townStreetName,
- jda.nei_name AS neiName,
- jh.volunteer_org,
- jg.grid_name
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0
- where jh.is_deleted = 0
- and jh.name != '' and jh.name is not null
- <if test="household.userId!=null">
- AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id =
- #{household.userId}
- )
- </if>
- <if test="household.name!=null and household.name !=''">
- and jh.name like concat('%',#{household.name},'%')
- </if>
- <if test="household.houseCode!=null and household.houseCode !=''">
- and jh.house_code = #{household.houseCode}
- </if>
- <if test="household.phoneNumber!=null and household.phoneNumber !=''">
- and jh.phone_number like concat('%',#{household.phoneNumber},'%')
- </if>
- <if test="household.idCard!=null and household.idCard !=''">
- and jh.id_card like concat('%',#{household.idCard},'%')
- </if>
- <if test="household.aoiName!=null and household.aoiName !=''">
- and jhs.district_name like concat('%',#{household.aoiName},'%')
- </if>
- <if test="household.confirmFlag != null ">
- and jh.confirm_flag = #{household.confirmFlag}
- </if>
- <if test="household.townStreetName!=null and household.townStreetName!=''">
- and jda.town_street_name like concat('%',#{household.townStreetName},'%')
- </if>
- <if test="household.neiName!=null and household.neiName!=''">
- and jda.nei_name like concat('%',#{household.neiName},'%')
- </if>
- <if test="household.housingRentalId != null ">
- and jh.housing_rental_id = #{household.housingRentalId}
- </if>
- <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
- AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
- </if>
- <if test="household.regionCode!=null and household.regionCode!=''">
- and jg.community_code like concat('%',#{household.regionCode},'%')
- </if>
- <if test="household.id!=null and household.id!=''">
- and jh.id = #{household.id}
- </if>
- order by jh.create_time desc
- </select>
-
-
- <!--查询房屋集合信息-->
- <select id="selectHouseNodeList" resultType="org.springblade.common.node.TreeStringNode">
- select jh.house_code as id,
- jh.house_code as houseCode,
- jda.address_name as name,
- false as hasChildren,
- jda.doorplate_type doorplateType,
- jda.address_level addressLevel,
- jda.nei_name neiName,
- jda.nei_code neiCode,
- jda.aoi_code aoiCode,
- jh.relationship relationship
- from jczz_household jh
- left join jczz_doorplate_address jda on jh.house_code = jda.address_code
- where 1 = 1
- and jh.is_deleted = 0
- and jh.associated_user_id = #{userId}
- </select>
-
- <!--查询房屋集合信息-->
- <select id="getHouseholdListByCode" resultMap="householdAndLabelMap">
- select jh.*,
- jhl.id as cid,
- jhl.house_code houseCodes,
- jhl.label_id,
- jhl.label_name,
- jhl.color,
- jhl.user_id,
- jhl.lable_type,
- jhl.household_id,
- jhl.remark as cremark
- from jczz_household jh
- left join jczz_user_house_label jhl on jh.id = jhl.household_id
- where 1 = 1
- and jh.is_deleted = 0
- and jh.house_code = #{code}
- order by -jh.relationship desc, jh.id desc
- </select>
-
- <!--查询房屋集合信息-按id-->
- <select id="getHouseholdListById" resultMap="householdAndLabelMap">
- select jh.id,
- jh.house_code,
- jh.name,
- jh.phone_number,
- jh.associated_user_id,
- jh.role_type,
- jh.relationship,
- jh.is_primary_contact,
- jh.residential_status,
- jh.gender,
- jh.birthday,
- jh.id_card,
- jh.card_type,
- jh.card_no,
- jh.ethnicity,
- jh.education,
- jh.resident_type,
- jh.hukou_registration,
- jh.resident_adcode,
- jh.native_place_adcode,
- jh.religious_belief,
- jh.health_status,
- jh.disease_name,
- jh.work_status,
- jh.employer,
- jh.occupation,
- jh.cmpy_reg_addr,
- jh.go_out_addr,
- jh.go_out_where,
- jh.go_out_time,
- jh.go_out_reason,
- jh.marital_status,
- jh.card_number,
- jh.other_contact,
- if(jda.id is not null, jda.address_name, jh.current_address) as current_address,
- jh.disability_cert,
- jh.party_ember,
- jh.remark,
- jh.confirm_flag,
- jh.housing_rental_id,
- jh.volunteer_org,
- if(jda.id is not null, substring(jda.town_street_code, 1, 9), jh.home_adcode) as home_adcode,
- br1.name as residentAdName,
- br1.province_code as residentProvinceAdCode,
- br1.province_name as residentProvinceAdName,
- br1.city_code as residentCityAdCode,
- br1.city_name as residentCityAdName,
- br2.name as nativePlaceAdName,
- br2.province_code as nativePlaceProvinceAdCode,
- br2.province_name as nativePlaceProvinceAdName,
- br2.city_code as nativePlaceCityAdCode,
- br2.city_name as nativePlaceCityAdName,
- jhs.source,
- jhl.id as cid,
- jhl.house_code houseCodes,
- jhl.label_id,
- jhl.label_name,
- jhl.color,
- jhl.user_id,
- jhl.lable_type,
- jhl.household_id,
- jhl.remark as cremark
- from jczz_household jh
- left join jczz_user_house_label jhl on jh.id = jhl.household_id
- left join jczz_doorplate_address jda on jda.address_code = jh.house_code
- left join jczz_house jhs on jhs.house_code = jh.house_code
- left join blade_region br1 on br1.code = jh.resident_adcode
- left join blade_region br2 on br2.code = jh.native_place_adcode
- where 1 = 1
- and jh.is_deleted = 0
- and jh.id = #{household.id}
- </select>
-
- <!--导出数据-->
- <select id="export" resultType="org.springblade.modules.house.excel.HouseHoldExcel">
- select
- jh.house_code houseCode,
- jh.name,jh.phone_number phoneNumber,jh.role_type roleType,jh.relationship relationship,
- jh.is_primary_contact isPrimaryContact,jh.residential_status residentialStatus,jh.gender,
- jh.birthday,jh.id_card idCard,jh.ethnicity,jh.education,
- jh.hukou_registration hukouRegistration,jh.work_status workStatus,jh.employer,jh.marital_status maritalStatus,
- jh.card_number cardNumber,jh.other_contact otherContact,jh.current_address currentAddress,jh.volunteer_org,
- jh.disability_cert disabilityCert,jh.party_ember partyEmber,jh.remark,
- jhs.district_name aoiName,
- concat(jhs.building," ",unit," ",room) as address
- from
- jczz_household jh join jczz_house jhs on jh.house_code = jhs.house_code and jhs.is_deleted = 0
- where jh.is_deleted = 0
- <if test="household.name!=null and household.name !=''">
- and jh.name like concat('%',#{household.name},'%')
- </if>
- <if test="household.phoneNumber!=null and household.phoneNumber !=''">
- and jh.phone_number like concat('%',#{household.phoneNumber},'%')
- </if>
- <if test="household.idCard!=null and household.idCard !=''">
- and jh.id_card like concat('%',#{household.idCard},'%')
- </if>
- <if test="household.aoiName!=null and household.aoiName !=''">
- and jhs.district_name like concat('%',#{household.aoiName},'%')
- </if>
- </select>
-
-
- <select id="statistics" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="household.communityCode != null and household.communityCode != ''">
- and jg.community_code = #{household.communityCode}
- </if>
- <if test="household.confirmFlag != null">
- and jh.confirm_flag = #{household.confirmFlag}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="household.roleName != null and household.roleName != ''">
- <if test="household.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jhs.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jhs.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="household.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
-
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- and jh.is_deleted = 0
- </where>
- </select>
-
- <!--查询物业-->
- <select id="getProperty" resultType="org.springblade.modules.house.vo.HouseholdOtherVO">
- SELECT jpcd.property_company_id AS CODE,
- bu.name AS NAME,
- jpcd.principal_phone AS phone
- FROM jczz_doorplate_address jda
- LEFT JOIN jczz_district jd ON jd.aoi_code = jda.aoi_code
- LEFT JOIN jczz_property_company_district jpcd ON jpcd.district_id = jd.id
- LEFT JOIN blade_user bu ON bu.id = jpcd.principal
- WHERE 1 = 1
- AND jda.address_code = #{household.houseCode} limit 1
- </select>
-
- <!--查询网格-->
- <select id="getGrid" resultType="org.springblade.modules.house.vo.HouseholdOtherVO">
- SELECT jg.id as code,
- jgm.gridman_name as name,
- jgm.mobile as phone
- FROM jczz_grid_range jgr
- LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id and jg.is_deleted = 0
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id and jgm.is_deleted = 0
- WHERE 1 = 1
- AND jgr.house_code = #{household.houseCode} limit 1
- </select>
-
- <!--查询公安信息-->
- <select id="getSecurity" resultType="org.springblade.modules.house.vo.HouseholdOtherVO">
- SELECT address_code as code,
- policeman as name,
- policeman_phone as phone
- FROM jczz_doorplate_address
- WHERE address_code = #{household.houseCode}
- </select>
-
-
- <select id="getHouseHoldStatistics" resultType="java.util.Map">
- SELECT
- a.gender,
- count( a.gender ) numbers
- FROM
- ( SELECT
- IF
- (
- id_card IS NULL or id_card = '',
- '未知',
- IF
- (SUBSTRING( id_card, 17, 1 ) % 2 = 1, '男', '女' )) AS gender
- FROM
- jczz_household jh
- LEFT JOIN jczz_doorplate_address jda ON jh.house_code = jda.address_code
- WHERE
- jda.nei_code = #{code}
- AND jh.is_deleted = 0
- and jda.doorplate_type = '户室牌'
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT DISTINCT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- ) a
- GROUP BY
- a.gender
- </select>
- <select id="getHouseHoldStatisticsAge" resultType="java.util.Map">
-
- select
- case
- when TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ >= ]]> 0 and
- TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ <= ]]> 3 then '0~3岁'
- when TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ >= ]]> 4 and
- TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ <= ]]> 17 then '4~17岁'
- when TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ >= ]]> 18 and
- TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ <= ]]> 39 then '18~39岁'
- when TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ >= ]]> 40 and
- TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ <= ]]> 59 then '40~59岁'
- when TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ >= ]]> 60 and
- TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ <= ]]> 79 then '60~79岁'
- when TIMESTAMPDIFF(YEAR,STR_TO_DATE(substr(id_card,7,8),'%Y%m%d'),sysdate()) <![CDATA[ > ]]> 80 then '80岁以上'
- ELSE '无身份信息'
- END AS age,
- count(1) as number FROM
- jczz_household jh
- LEFT JOIN jczz_doorplate_address jda ON jh.house_code = jda.address_code
- WHERE
- jda.nei_code = #{code}
- and jda.doorplate_type = '户室牌'
- AND jh.is_deleted = 0
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT
- distinct jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
-
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- GROUP BY age
- </select>
-
- <!--查询所有未入库的业主信息-->
- <select id="getNotInsertUserHousehold" resultType="org.springblade.modules.house.entity.HouseholdEntity">
- select jh.*
- from jczz_household jh
- where jh.is_deleted = 0
- and jh.relationship = 1
- and jh.associated_user_id is null
- and jh.phone_number !=''
- and length(jh.name)<=12
- </select>
-
- <!--关联标签-->
- <resultMap id="householdPageAndLabelMaps" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="householdLabelList" javaType="java.util.List"
- ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
- <id property="id" column="cid"/>
- <result property="houseCode" column="houseCodes"/>
- </collection>
- </resultMap>
-
- <!--住户列表查询(关联标签)-->
- <select id="selectHouseholdList" resultMap="householdPageAndLabelMaps">
- SELECT
- jh.id,
- jh.house_code,
- jh.NAME,
- jh.phone_number,
- jh.associated_user_id,
- jh.role_type,
- jh.relationship,
- jh.is_primary_contact,
- jh.residential_status,
- jh.birthday,
- jh.id_card,
- ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
- jh.ethnicity,
- jh.education,
- jh.hukou_registration,
- jh.work_status,
- employer,
- jh.marital_status,
- jh.card_number,
- jh.other_contact,
- jh.current_address,
- jh.disability_cert,
- jh.party_ember,
- jh.create_user,
- jh.create_time,
- jh.update_user,
- jh.update_time,
- jh.confirm_flag,
- jh.remark,
- jhs.district_name aoiName,
- concat( jhs.building, " ", unit, " ", room ) AS address,
- jda.town_street_name AS townStreetName,
- jda.nei_name AS neiName,
- jg.grid_name,
- juhl.id as cid,juhl.house_code as houseCodes,juhl.label_id,juhl.label_name,juhl.color
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_user_house_label juhl on juhl.house_code = jda.address_code and lable_type=1
- <where>
- <if test="household.userId!=null">
- AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id =
- #{household.userId}
- )
- </if>
- <if test="household.name!=null and household.name !=''">
- and jh.name like concat('%',#{household.name},'%')
- </if>
- <if test="household.houseCode!=null and household.houseCode !=''">
- and jh.house_code = #{household.houseCode}
- </if>
- <if test="household.phoneNumber!=null and household.phoneNumber !=''">
- and jh.phone_number like concat('%',#{household.phoneNumber},'%')
- </if>
- <if test="household.idCard!=null and household.idCard !=''">
- and jh.id_card like concat('%',#{household.idCard},'%')
- </if>
- <if test="household.aoiName!=null and household.aoiName !=''">
- and jhs.district_name like concat('%',#{household.aoiName},'%')
- </if>
- <if test="household.confirmFlag != null ">
- and jh.confirm_flag = #{household.confirmFlag}
- </if>
- <if test="household.townStreetName!=null and household.townStreetName!=''">
- and jda.town_street_name like concat('%',#{household.townStreetName},'%')
- </if>
- <if test="household.neiName!=null and household.neiName!=''">
- and jda.nei_name like concat('%',#{household.neiName},'%')
- </if>
- <if test="household.housingRentalId != null ">
- and jh.housing_rental_id = #{household.housingRentalId}
- </if>
- <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
- AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
- </if>
- <if test="household.regionCode!=null and household.regionCode!=''">
- and jg.community_code like concat('%',#{household.regionCode},'%')
- </if>
- <if test="household.id!=null">
- and jh.id = #{household.id}
- </if>
- <if test="household.labelId!=null">
- and juhl.label_id = #{household.labelId}
- </if>
- <if test="household.searchKey!=null and household.searchKey!=''">
- and CONCAT(jh.name,jh.phone_number) like CONCAT ('%', #{household.searchKey},'%')
- </if>
- and jh.is_deleted = 0
- and jh.name != '' and jh.name is not null
- order by jh.create_time desc,jh.id desc
- <if test="household.limit!=null">
- limit #{household.limit}
- </if>
- </where>
- </select>
-
-
- <select id="getKeynotePersonnelPage" resultMap="householdPageAndLabelMap">
-
- SELECT
- jh.id,
- jh.house_code,
- jh.NAME,
- jh.phone_number,
- jh.associated_user_id,
- jh.role_type,
- jh.relationship,
- jh.is_primary_contact,
- jh.residential_status,
- jh.gender,
- jh.birthday,
- jh.id_card,
- jh.card_type,
- ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
- jh.ethnicity,
- jh.education,
- jh.resident_type,
- jh.hukou_registration,
- jh.resident_adcode,
- jh.native_place_adcode,
- jh.religious_belief,
- jh.health_status,
- jh.disease_name,
- jh.work_status,
- jh.employer,
- jh.occupation,
- jh.cmpy_reg_addr,
- jh.go_out_addr,
- jh.go_out_where,
- jh.go_out_time,
- jh.go_out_reason,
- jh.marital_status,
- jh.card_number,
- jh.other_contact,
- IF
- ( jda.id IS NOT NULL, jda.address_name, jh.current_address ) AS current_address,
- jh.disability_cert,
- jh.party_ember,
- jh.remark,
- jh.confirm_flag,
- jh.housing_rental_id,
- jh.volunteer_org,
- IF
- ( jda.id IS NOT NULL, substring( jda.town_street_code, 1, 9 ), jh.home_adcode ) AS home_adcode,
- jhs.district_name aoiName,
- concat( jhs.building, " ", unit, " ", room ) AS address,
- jda.town_street_name AS townStreetName,
- jda.nei_name AS neiName,
- jg.grid_name,
- jhs.building,
- jhs.district_code aoiCode,
- jhs.unit
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0
- <where>
- <if test="household.userId!=null">
- AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id =
- #{household.userId}
- )
- </if>
- <if test="household.name!=null and household.name !=''">
- and jh.name like concat('%',#{household.name},'%')
- </if>
- <if test="household.houseCode!=null and household.houseCode !=''">
- and jh.house_code = #{household.houseCode}
- </if>
- <if test="household.phoneNumber!=null and household.phoneNumber !=''">
- and jh.phone_number like concat('%',#{household.phoneNumber},'%')
- </if>
- <if test="household.idCard!=null and household.idCard !=''">
- and jh.id_card like concat('%',#{household.idCard},'%')
- </if>
- <if test="household.aoiName!=null and household.aoiName !=''">
- and jhs.district_name like concat('%',#{household.aoiName},'%')
- </if>
- <if test="household.confirmFlag != null ">
- and jh.confirm_flag = #{household.confirmFlag}
- </if>
- <if test="household.townStreetName!=null and household.townStreetName!=''">
- and jda.town_street_name like concat('%',#{household.townStreetName},'%')
- </if>
- <if test="household.neiName!=null and household.neiName!=''">
- and jda.nei_name like concat('%',#{household.neiName},'%')
- </if>
- <if test="household.housingRentalId != null ">
- and jh.housing_rental_id = #{household.housingRentalId}
- </if>
- <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
- AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
- </if>
- <if test="household.regionCode!=null and household.regionCode!=''">
- and jg.community_code like concat(#{household.regionCode},'%')
- </if>
- <if test="household.building!=null and household.building!=''">
- and jhs.building like concat(#{household.building},'%')
- </if>
- <if test="household.unit!=null and household.unit!=''">
- and jhs.unit like concat(#{household.unit},'%')
- </if>
- <if test="household.aoiCode!=null and household.aoiCode!=''">
- and jhs.district_code = #{household.aoiCode}
- </if>
- and jh.id in (
- SELECT DISTINCT
- juhl.household_id
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- <if test="household.labelId != null ">
- AND jl.id = #{household.labelId}
- </if>
- <if test="household.parentId != null ">
- AND jl.parent_id = #{household.parentId}
- </if>
- AND juhl.label_id IS NOT NULL
- )
- and jh.is_deleted = 0
- order by jh.create_time desc
- </where>
- </select>
-
- <!--根据人员标签编号集合查询对应的住户(按颜色区分近多少天没有发过任务的住户)-->
- <select id="getHouseholdListByParam" resultType="org.springblade.modules.house.vo.HouseholdVO">
- select jh.* from jczz_household jh
- left join jczz_user_house_label juhl on juhl.household_id = jh.id
- where jh.is_deleted = 0
- and juhl.lable_type = 1
- and juhl.color = 'green'
- and jh.id in (
- select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(),
- create_time )=30
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and juhl.label_id in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and juhl.label_id in ('')
- </otherwise>
- </choose>
- union all
- (
- select jh.* from jczz_household jh
- left join jczz_user_house_label juhl on juhl.household_id = jh.id
- where jh.is_deleted = 0
- and juhl.lable_type = 1
- and juhl.color = 'yellow'
- and jh.id in (
- select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(),
- create_time )=14
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and juhl.label_id in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and juhl.label_id in ('')
- </otherwise>
- </choose>
- )
- union all
- (
- select jh.* from jczz_household jh
- left join jczz_user_house_label juhl on juhl.household_id = jh.id
- where jh.is_deleted = 0
- and juhl.lable_type = 1
- and juhl.color = 'red'
- and jh.id in (
- select household_id from jczz_grid_work_log where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(),
- create_time )=7
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and juhl.label_id in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and juhl.label_id in ('')
- </otherwise>
- </choose>
- )
- union all
- (
- select jh.* from jczz_household jh
- left join jczz_user_house_label juhl on juhl.household_id = jh.id
- where jh.is_deleted = 0 and juhl.lable_type = 1
- and jh.id not in (
- select household_id from jczz_grid_work_log where is_deleted = 0
- and household_id is not null
- and source = 2
- group by household_id
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and juhl.label_id in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and juhl.label_id in ('')
- </otherwise>
- </choose>
- )
- </select>
- <select id="getlabelStatistics" resultType="org.springblade.common.node.TreeIntegerNode">
- SELECT
- jl.id AS id,
- jl.parent_id AS parentId,
- jl.label_name AS name,
- jl.sort,
- (SELECT
- count(juhl.household_id ) counts
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_household jh ON juhl.household_id = jh.id
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code AND jhs.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jhs.grid_code AND jg.is_deleted = 0
- <where>
- <if test="household.userId!=null">
- AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id =
- #{household.userId}
- )
- </if>
- <if test="household.name!=null and household.name !=''">
- and jh.name like concat('%',#{household.name},'%')
- </if>
- <if test="household.houseCode!=null and household.houseCode !=''">
- and jh.house_code = #{household.houseCode}
- </if>
- <if test="household.phoneNumber!=null and household.phoneNumber !=''">
- and jh.phone_number like concat('%',#{household.phoneNumber},'%')
- </if>
- <if test="household.idCard!=null and household.idCard !=''">
- and jh.id_card like concat('%',#{household.idCard},'%')
- </if>
- <if test="household.aoiName!=null and household.aoiName !=''">
- and jhs.district_name like concat('%',#{household.aoiName},'%')
- </if>
- <if test="household.confirmFlag != null ">
- and jh.confirm_flag = #{household.confirmFlag}
- </if>
- <if test="household.townStreetName!=null and household.townStreetName!=''">
- and jda.town_street_name like concat('%',#{household.townStreetName},'%')
- </if>
- <if test="household.neiName!=null and household.neiName!=''">
- and jda.nei_name like concat('%',#{household.neiName},'%')
- </if>
- <if test="household.housingRentalId != null ">
- and jh.housing_rental_id = #{household.housingRentalId}
- </if>
- <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
- AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
- </if>
- <if test="household.regionCode!=null and household.regionCode!=''">
- and jg.community_code like concat(#{household.regionCode},'%')
- </if>
- <if test="household.building!=null and household.building!=''">
- and jhs.building like concat(#{household.building},'%')
- </if>
- <if test="household.unit!=null and household.unit!=''">
- and jhs.unit like concat(#{household.unit},'%')
- </if>
- <if test="household.aoiCode!=null and household.aoiCode!=''">
- and jhs.district_code = #{household.aoiCode}
- </if>
- <if test="household.labelId != null ">
- AND jl.id = #{household.labelId}
- </if>
- <if test="household.parentId != null ">
- AND jl.parent_id = #{household.parentId}
- </if>
- AND juhl.label_id IS NOT NULL
- and juhl.lable_type = 1
- and jh.is_deleted = 0
- AND juhl.label_id = jl.id
- </where>
- ) count
- FROM
- jczz_label jl where is_deleted = 0
- and jl.id != '1002'
- and jl.id != '1001'
- and jl.parent_id != '1001'
- </select>
-
- <select id="getUserInfoByDistrictIds" resultType="org.springblade.modules.house.vo.HouseholdVO">
- SELECT
- jh.*,
- jhe.house_name address,
- jhe.building,
- jhe.unit
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhe ON jhe.house_code = jh.house_code
- AND jh.is_deleted = 0
- LEFT JOIN jczz_district jd ON jd.aoi_code = jhe.district_code
- <where>
- and jd.id in
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- and jh.relationship !=18
- <if test="vo.building != null and vo.building !=''">
- and jhe.building like concat('%',#{vo.building},'%')
- </if>
- <if test="vo.unit != null and vo.unit !=''">
- and jhe.unit like concat('%',#{vo.unit},'%')
- </if>
- <if test="vo.name != null and vo.name !=''">
- and jh.name like concat('%',#{vo.name},'%')
- </if>
- <if test="vo.phoneNumber != null and vo.phoneNumber !=''">
- and jh.phone_number like concat('%',#{vo.phoneNumber},'%')
- </if>
- </where>
- </select>
-
- <!--查询住户对应的社区编号-->
- <select id="getCommunityCode" resultType="java.lang.String">
- SELECT
- jpag.community_code
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- where jh.is_deleted = 0
- and jh.id = #{id}
- </select>
-
- <!--查询所有住户总数-->
- <select id="getAllListTotal" resultType="java.lang.Integer">
- SELECT
- count(*)
- FROM
- jczz_household jh
- where jh.is_deleted = 0
- </select>
-
- <!--查询对应的住户集合-->
- <select id="getAllList" resultType="org.springblade.modules.house.vo.HouseholdVO">
- SELECT
- jh.*,
- jpag.community_code
- FROM
- jczz_household jh
- LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- where jh.is_deleted = 0
- limit #{i},#{size}
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java b/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
deleted file mode 100644
index d760555..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.dto.UserHouseLabelDTO;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-
-import java.util.List;
-
-/**
- * 住户-标签 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface UserHouseLabelMapper extends BaseMapper<UserHouseLabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param householdLabel
- * @return
- */
- List<HouseholdLabelVO> selectHouseLabelPage(IPage page, HouseholdLabelVO householdLabel);
-
- List<Integer> getUserLabelList(UserHouseLabelDTO userHouseLabelDTO);
-
- List<HouseholdLabelVO> statisticalLabels(IPage page, HouseholdLabelVO householdLabel);
-
- List<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel);
-}
diff --git a/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml b/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
deleted file mode 100644
index 5c014e2..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.UserHouseLabelMapper">
-
- <resultMap type="org.springblade.modules.house.dto.UserHouseLabelDTO" id="UserHouseLabelDTOResult">
- <result property="id" column="id"/>
- <result property="houseCode" column="house_code"/>
- <result property="labelId" column="label_id"/>
- <result property="labelName" column="label_name"/>
- <result property="color" column="color"/>
- <result property="remark" column="remark"/>
- <result property="userId" column="user_id"/>
- <result property="lableType" column="lable_type"/>
- </resultMap>
-
- <sql id="selectUserHouseLabel">
- select
- id,
- house_code,
- label_id,
- label_name,
- color,
- remark,
- user_id,
- lable_type,
- household_id
- from
- jczz_user_house_label
- </sql>
-
-
- <!-- <select id="selectUserHouseLabelList" parameterType="org.springblade.modules.house.dto.UserHouseLabelDTO" resultMap="UserHouseLabelDTOResult">-->
- <!-- <include refid="selectUserHouseLabel"/>-->
- <!-- <where>-->
- <!-- <if test="id != null "> and id = #{id}</if>-->
- <!-- <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if>-->
- <!-- <if test="labelId != null "> and label_id = #{labelId}</if>-->
- <!-- <if test="labelName != null and labelName != ''"> and label_name = #{labelName}</if>-->
- <!-- <if test="color != null and color != ''"> and color = #{color}</if>-->
- <!-- <if test="remark != null and remark != ''"> and remark = #{remark}</if>-->
- <!-- <if test="userId != null "> and user_id = #{userId}</if>-->
- <!-- <if test="lableType != null "> and lable_type = #{lableType}</if>-->
- <!-- </where>-->
- <!-- </select>-->
-
-
- <select id="selectHouseLabelPage" resultMap="UserHouseLabelDTOResult">
- <include refid="selectUserHouseLabel"/>
- <where>
- <if test="houseLabel.id != null ">and id = #{houseLabel.id}</if>
- <if test="houseLabel.houseCode != null and houseLabel.houseCode != ''">and house_code =
- #{houseLabel.houseCode}
- </if>
- <if test="houseLabel.labelId != null ">and label_id = #{houseLabel.labelId}</if>
- <if test="houseLabel.labelName != null and houseLabel.labelName != ''">and label_name =
- #{houseLabel.labelName}
- </if>
- <if test="houseLabel.color != null and houseLabel.color != ''">and color = #{houseLabel.color}</if>
- <if test="houseLabel.remark != null and remark != ''">and remark = #{houseLabel.remark}</if>
- <if test="houseLabel.userId != null ">and user_id = #{houseLabel.userId}</if>
- <if test="houseLabel.lableType != null ">and lable_type = #{houseLabel.lableType}</if>
- </where>
- </select>
-
- <!-- <!–自定义分页查询–>-->
- <!-- <select id="selectHouseholdLabelPage" resultMap="householdLabelResultMap">-->
- <!-- select * from jczz_household_label where is_deleted = 0-->
- <!-- </select>-->
-
-
- <select id="getUserLabelList" resultType="java.lang.Integer"
- parameterType="org.springblade.modules.house.dto.UserHouseLabelDTO">
- select label_id
- from jczz_user_house_label
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="houseCode != null and houseCode != ''">and house_code = #{houseCode}</if>
- <if test="labelId != null ">and label_id = #{labelId}</if>
- <if test="labelName != null and labelName != ''">and label_name = #{labelName}</if>
- <if test="color != null and color != ''">and color = #{color}</if>
- <if test="remark != null and remark != ''">and remark = #{remark}</if>
- <if test="userId != null ">and user_id = #{userId}</if>
- <if test="lableType != null ">and lable_type = #{lableType}</if>
- </where>
- </select>
-
- <select id="statisticalLabels" resultType="org.springblade.modules.house.vo.HouseholdLabelVO"
- parameterType="org.springblade.modules.house.vo.HouseholdLabelVO">
- SELECT
- br.region_level,
- br.`code` regionCode,
- br.NAME regionName,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1025'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number1,(
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1034'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number2,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1035'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number3,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1036'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number4,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '19'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number5,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '20'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number6,(
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '22'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number7,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '23'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- LEFT JOIN jczz_community jc on jc.`code` = jg.community_code
- WHERE
- br.`code` = jc.`street_code`
- )) number8
- FROM
- `blade_region` br
- WHERE
- br.region_level = 4
- AND br.city_code = 361100
- </select>
-
-
- <select id="getCommunityStatisticalLabels" resultType="org.springblade.modules.house.vo.HouseholdLabelVO">
-
- SELECT
- jc.NAME communityName,
- jc.code communityCode,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1025'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number1,(
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1034'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number2,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1035'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number3,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '1036'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number4,
- (
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '19'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number5,(
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '20'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number6,(
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '22'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number7,(
- SELECT
- count( 1 )
- FROM
- jczz_user_house_label juhl
- LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
- WHERE
- juhl.lable_type = 1
- AND jl.id = '23'
- AND juhl.household_id IS NOT NULL
- AND juhl.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jc.`code` = jg.community_code
- )) number8
- FROM
- `jczz_community` jc
- WHERE
- jc.street_code like concat(#{householdLabel.regionCode},'%')
-
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseLabelService.java b/src/main/java/org/springblade/modules/house/service/IHouseLabelService.java
deleted file mode 100644
index 5c41b04..0000000
--- a/src/main/java/org/springblade/modules/house/service/IHouseLabelService.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.house.entity.HouseLabelEntity;
-import org.springblade.modules.house.vo.UserHouseLabelVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 房屋-标签 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IHouseLabelService extends IService<HouseLabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param houseLabel
- * @return
- */
- IPage<UserHouseLabelVO> selectHouseLabelPage(IPage<UserHouseLabelVO> page, UserHouseLabelVO houseLabel);
-
-
- /**
- * 房屋-标签 自定义新增或修改
- * @param houseLabel
- * @return
- */
- boolean saveOrUpdateHouseLabel(HouseLabelEntity houseLabel);
-}
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseRentalService.java b/src/main/java/org/springblade/modules/house/service/IHouseRentalService.java
deleted file mode 100644
index ab06eb4..0000000
--- a/src/main/java/org/springblade/modules/house/service/IHouseRentalService.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.modules.house.vo.HouseRentalTenantVO;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.excel.HouseRentalExcel;
-
-import java.util.List;
-
-/**
- * 出租屋 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IHouseRentalService extends IService<HouseRentalEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param houseRental
- * @return
- */
- IPage<HouseRentalTenantVO> selectHouseRentalPage(IPage<HouseRentalTenantVO> page, HouseRentalTenantVO houseRental);
-
- /**
- * 查询房屋出租情况
- * @param code
- * @return
- */
- List<HouseRentalVO> getHouseRentalListByCode(String code);
-
- /**
- * 自定义房屋出租新增
- * @param houseRentalVO
- * @return
- */
- Boolean add(HouseRentalVO houseRentalVO);
-
- /**
- * 出租屋 自定义删除
- * @param id
- * @return
- */
- Boolean removeHouseRental(Long id);
-
- /**
- * 出租屋 自定义修改
- * @param houseRental
- * @return
- */
- Boolean updateHouseRental(HouseRentalVO houseRental);
-
- /**
- * 获取统计数据
- * @return
- */
- Object getStatistics(HouseRentalTenantVO houseRental);
-
- /**
- * 出租屋 确认
- * @param houseRental
- * @return
- */
- Boolean confirmHouseRental(HouseRentalVO houseRental);
-
- /**
- * 导出租赁信息
- * @param houseRentalVO
- * @return
- */
- List<HouseRentalExcel> export(HouseRentalTenantVO houseRentalVO);
-
- Integer getStatisticsCount(HouseRentalTenantVO houseRental);
-}
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseService.java b/src/main/java/org/springblade/modules/house/service/IHouseService.java
deleted file mode 100644
index d9c5256..0000000
--- a/src/main/java/org/springblade/modules/house/service/IHouseService.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.excel.HouseAndHoldExcel;
-import org.springblade.modules.house.excel.HouseExcel;
-import org.springblade.modules.house.vo.HouseParam;
-import org.springblade.modules.house.vo.HouseTree;
-import org.springblade.modules.house.vo.HouseVO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IHouseService extends IService<HouseEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param house
- * @return
- */
- IPage<HouseVO> selectHousePage(IPage<HouseVO> page, HouseVO house);
-
- /**
- * 房屋自定义详情查询
- *
- * @param house
- * @return
- */
- HouseVO getHouseDetail(HouseVO house);
-
- /**
- * 房屋自定义新增或修改
- *
- * @param house
- * @return
- */
- boolean saveOrUpdateHouse(HouseEntity house);
-
- void importUserHouse(List<HouseExcel> data, Boolean isCovered);
-
- List<HouseExcel> export(HouseVO household);
-
- /**
- * 查询房屋树
- *
- * @param houseParam
- * @return
- */
- List<HouseTree> getHouseTree(HouseParam houseParam);
-
- /**
- * 人房数据导入
- *
- * @param data
- * @param isCovered
- */
- void importHouseAndHold(List<HouseAndHoldExcel> data, Boolean isCovered);
-
- Map<String, Object> getHouseStatistics(String code, String roleType, String aoiCode, String buildingCode, String unitCode);
-
- List<String> getHouseBuilding(String districtCode);
-
- List<String> getHouseUnit(String districtCode, String building);
-
- List<Map<String, Object>> labelStatistics(HouseVO house);
-
- List<Map<String, Object>> labelCommunityStatistics(HouseVO house);
-
- /**
- * 房屋网格处理
- * @return
- */
- Object houseGridHandle();
-
- /**
- * 房屋警格处理
- * @return
- */
- Object houseJwGridHandle();
-
- /**
- * 房屋画像统计-按房屋标签统计
- * @param house
- * @return
- */
- List<Map<String,Object>> getHouseLabelStatistic(HouseVO house);
-
- /**
- * 查询对应的社区编号
- * @param id
- * @return
- */
- String getCommunityCode(Long id);
-
- /**
- * 查询所有房屋总数
- * @return
- */
- int getAllListTotal();
-
- /**
- * 查询所有的房屋
- * @param i
- * @param size
- * @return
- */
- List<HouseVO> getAllList(int i, int size);
-
- /**
- * 房屋标签初始化处置-根据有租客的,初始成出租,有业主没租客的初始化成自主,业主都没的就是闲置
- * @param house
- * @return
- */
- boolean initHouseLabelBind(HouseVO house);
-}
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseTenantService.java b/src/main/java/org/springblade/modules/house/service/IHouseTenantService.java
deleted file mode 100644
index af3311a..0000000
--- a/src/main/java/org/springblade/modules/house/service/IHouseTenantService.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import org.springblade.modules.house.vo.HouseTenantVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 租户管理 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IHouseTenantService extends IService<HouseTenantEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param houseTenant
- * @return
- */
- IPage<HouseTenantVO> selectHouseTenantPage(IPage<HouseTenantVO> page, HouseTenantVO houseTenant);
-
- /**
- * 根据租房id删除租户信息
- * @param id
- * @return
- */
- int removeByHousingRentalId(Long id);
-}
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseholdService.java b/src/main/java/org/springblade/modules/house/service/IHouseholdService.java
deleted file mode 100644
index 8cc5315..0000000
--- a/src/main/java/org/springblade/modules/house/service/IHouseholdService.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.excel.HouseHoldExcel;
-import org.springblade.modules.house.vo.HouseholdVO;
-
-import java.util.List;
-
-/**
- * 住户 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IHouseholdService extends IService<HouseholdEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param household
- * @return
- */
- IPage<HouseholdVO> selectHouseholdPage(IPage<HouseholdVO> page, HouseholdVO household);
-
- /**
- * 查询房屋集合信息
- * @param userId
- * @return
- */
- List<TreeStringNode> selectHouseNodeList(Long userId);
-
- /**
- * 查询房屋人员情况
- * @param code
- * @return
- */
- List<HouseholdVO> getHouseholdListByCode(String code);
-
- /**
- * 住户 自定义新增或修改
- * @param household
- * @return
- */
- boolean saveOrUpdateHousehold(HouseholdVO household);
-
- /**
- * 住户 自定义查询详情
- * @param household
- * @return
- */
- Object getDetail(HouseholdEntity household);
-
- List<HouseHoldExcel> export(HouseholdVO household);
-
- void importUserHouseHold(List<HouseHoldExcel> data, Boolean isCovered);
-
- Integer statistics(Long userId,String neiCode,Integer confirmFlag);
-
- /**
- * 住户对应物业,网格,公安负责人查询
- * @param household
- * @return
- */
- Object getHouseholdOtherInfo(HouseholdVO household);
-
- Object getHouseHoldStatistics(String code, String roleType);
-
- /**
- * 住户业主信息处理,将业主人员插入到用户表
- * @return
- */
- Object userHandle();
-
- /**
- * 住户 删除
- */
- boolean removeHousehold(String ids);
-
- List<HouseholdVO> getAllHouseHold(HouseholdVO household);
-
- /**
- * 住户列表查询
- *
- * @param household
- * @return
- */
- List<HouseholdVO> selectHouseholdList(HouseholdVO household);
-
- IPage<HouseholdVO> getKeynotePersonnelPage(IPage<HouseholdVO> page, HouseholdVO household);
-
- /**
- * 根据人员标签编号集合查询对应的住户(按颜色区分近多少天没有发过任务的住户)
- * @param list
- * @return
- */
- List<HouseholdVO> getHouseholdListByParam(List<Integer> list);
-
- List<TreeIntegerNode> getlabelStatistics(HouseholdVO household);
-
- /**
- * 通过小区id查询用户
- * @param householdVO
- * @param page
- * @return
- */
- IPage<HouseholdVO> getUserInfoByDistrictIds(HouseholdVO householdVO,IPage<HouseholdVO> page);
-
- /**
- * 查询住户对应的社区编号
- * @param id
- * @return
- */
- String getCommunityCode(Long id);
-
- /**
- * 查询所有住户总数
- * @return
- */
- int getAllListTotal();
-
- /**
- * 查询对应的住户集合
- * @param i
- * @param size
- * @return
- */
- List<HouseholdVO> getAllList(int i, int size);
-}
diff --git a/src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java b/src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
deleted file mode 100644
index f7bba5c..0000000
--- a/src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.house.dto.UserHouseLabelDTO;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.excel.UserHouseLabelExcel;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-
-import java.util.List;
-
-/**
- * 住户-标签 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IUserHouseLabelService extends IService<UserHouseLabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param householdLabel
- * @return
- */
- IPage<HouseholdLabelVO> selectHouseholdLabelPage(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel);
-
- /**
- * 住户-标签 自定义新增或修改
- *
- * @param householdLabel
- * @return
- */
- boolean saveOrUpdateHouseholdLabel(UserHouseLabelEntity householdLabel);
-
-
- List<Integer> selectUserLabelList(UserHouseLabelDTO userHouseLabelDTO);
-
- void importUserHouseLabel(List<UserHouseLabelExcel> data, Boolean isCovered);
-
- IPage<HouseholdLabelVO> statisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel);
-
- IPage<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel);
-
- /**
- * 房屋-标签 房屋自定义新增或修改
- * @param householdLabel
- * @return
- */
- boolean saveOrUpdateHouseLabel(UserHouseLabelEntity householdLabel);
-}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
deleted file mode 100644
index ea3c954..0000000
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.house.entity.HouseLabelEntity;
-import org.springblade.modules.house.vo.UserHouseLabelVO;
-import org.springblade.modules.house.mapper.HouseLabelMapper;
-import org.springblade.modules.house.service.IHouseLabelService;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.service.ILabelService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 房屋-标签 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class HouseLabelServiceImpl extends ServiceImpl<HouseLabelMapper, HouseLabelEntity> implements IHouseLabelService {
-
- @Autowired
- private ILabelService labelService;
-
- @Override
- public IPage<UserHouseLabelVO> selectHouseLabelPage(IPage<UserHouseLabelVO> page, UserHouseLabelVO houseLabel) {
- return page.setRecords(baseMapper.selectHouseLabelPage(page, houseLabel));
- }
-
- /**
- * 房屋-标签 自定义新增或修改
- * @param houseLabel
- * @return
- */
- @Override
- public boolean saveOrUpdateHouseLabel(HouseLabelEntity houseLabel) {
- // 查询标签名称
- LabelEntity labelEntity = labelService.getById(houseLabel.getLabelId());
- houseLabel.setLabelName(labelEntity.getLabelName());
- // 判断同一个房屋同一个标签是否已存在,已存在则更新,不存在则新增
- QueryWrapper<HouseLabelEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("house_code",houseLabel.getHouseCode())
- .eq("label_id",houseLabel.getLabelId());
- HouseLabelEntity one = getOne(queryWrapper);
- if (null != one){
- houseLabel.setId(one.getId());
- // 更新
- return updateById(houseLabel);
- }
- // 插入
- return save(houseLabel);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.java
deleted file mode 100644
index 456d393..0000000
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.DigestUtil;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.excel.HouseRentalExcel;
-import org.springblade.modules.house.mapper.HouseRentalMapper;
-import org.springblade.modules.house.service.IHouseRentalService;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.vo.HouseRentalStatistics;
-import org.springblade.modules.house.vo.HouseRentalTenantVO;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.entity.UserInfo;
-import org.springblade.modules.system.service.IUserService;
-import org.springblade.modules.system.vo.UserDetailVO;
-import org.springblade.modules.system.vo.UserVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 出租屋 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class HouseRentalServiceImpl extends ServiceImpl<HouseRentalMapper, HouseRentalEntity> implements IHouseRentalService {
-
- @Autowired
- private IHouseholdService iHouseholdService;
-
-
- @Autowired
- private IGridService gridService;
-
- /**
- * 自定义分页查询
- *
- * @param page
- * @param houseRental
- * @return
- */
- @Override
- public IPage<HouseRentalTenantVO> selectHouseRentalPage(IPage<HouseRentalTenantVO> page, HouseRentalTenantVO houseRental) {
- if (null != houseRental.getAuditStatus()) {
- if (houseRental.getAuditStatus() == 0) {
- houseRental.setAuditStatus(2);
- }
- }
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(HouseRentalTenantVO.class, houseRental);
- List<HouseRentalTenantVO> houseRentalTenantVOS = baseMapper.selectHouseRentalPage(page, houseRental,
- commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator());
- for (HouseRentalTenantVO houseRentalTenantVO : houseRentalTenantVOS) {
- if (houseRentalTenantVO.getStatus().equals(1)) {
- houseRentalTenantVO.setStatus(30);
- }
- if (houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getAuditStatus().equals(0)) {
- houseRentalTenantVO.setStatus(0);
- }
- if (houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getAuditStatus().equals(1)) {
- houseRentalTenantVO.setStatus(1);
- }
- if (houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getDldType().equals(3)) {
- houseRentalTenantVO.setStatus(20);
- }
- if (houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getDldType().equals(2)) {
- houseRentalTenantVO.setStatus(10);
- }
- }
- return page.setRecords(houseRentalTenantVOS);
- }
-
- /**
- * 查询房屋出租情况
- *
- * @param code
- * @return
- */
- @Override
- public List<HouseRentalVO> getHouseRentalListByCode(String code) {
- List<HouseRentalVO> houseRentalVOS = baseMapper.getHouseRentalListByCode(code);
- // 返回
- return houseRentalVOS;
- }
-
- /**
- * 自定义房屋出租新增
- *
- * @param houseRentalVO
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean add(HouseRentalVO houseRentalVO) {
- boolean flag = false;
- houseRentalVO.setCreateUser(AuthUtil.getUserId());
- houseRentalVO.setCreateTime(new Date());
- houseRentalVO.setUpdateUser(AuthUtil.getUserId());
- houseRentalVO.setUpdateTime(new Date());
- // 网格员新增默认是审核通过
- houseRentalVO.setAuditStatus(1);
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- // 居民
- if (!Strings.isBlank(roleName) && roleName.equals("inhabitant")) {
- // 待审核
- houseRentalVO.setAuditStatus(0);
- }
- //保存自身(租赁)
- flag = save(houseRentalVO);
- //保存到住户
- if (flag){
- flag = saveHousehold(houseRentalVO, flag);
- }
- return flag;
- }
-
- /**
- * 保存租户信息
- *
- * @param houseRentalVO
- * @param flag
- * @return
- */
- public boolean saveHousehold(HouseRentalVO houseRentalVO, boolean flag) {
- if (houseRentalVO.getHouseholdVOList().size() > 0) {
- houseRentalVO.getHouseholdVOList().forEach(e -> {
- e.setHouseCode(houseRentalVO.getHouseCode());
- e.setHousingRentalId(houseRentalVO.getId());
- e.setRelationship(18);
- e.setResidentialStatus(1);
- if (!Strings.isBlank(e.getIdCard())){
- e.setCardType(111);
- }
- e.setRoleType(2);
- // 添加住户
- iHouseholdService.save(e);
- // 绑定用户
- bindUserHandle(e);
- });
- }
- return flag;
- }
-
- /**
- * 租客和用户绑定
- *
- * @param
- */
- public User bindUserHandle(HouseholdEntity householdEntity) {
- IUserService userService = SpringUtils.getBean(IUserService.class);
- IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class);
- User newUser = new User();
- if (null != householdEntity.getPhoneNumber() && !householdEntity.getPhoneNumber().equals("")) {
- //根据手机号查询库里的数据
- List<User> list = userService.getUserListByPhoneOrAccount(householdEntity.getPhoneNumber());
- if (list.size()>0) {
- User user = list.get(0);
- //如果用户存在,则该用户id绑定场所
- householdEntity.setAssociatedUserId(user.getId());
- //更新住户信息
- householdService.updateById(householdEntity);
- newUser = user;
- // 判断用户是否包含了居民角色,不包含则需更新
- if (!user.getRoleId().contains("1717429059648606209")) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- //更新
- userService.updateById(user);
- }
- } else {
- //如果用户不存在,则新增一个用户
- newUser.setAccount(householdEntity.getPhoneNumber());
- newUser.setPhone(householdEntity.getPhoneNumber());
- newUser.setName(householdEntity.getName());
- newUser.setRealName(householdEntity.getName());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 设置机构
- // 用户新增
- boolean submit = userService.submit(newUser);
- //绑定id
- householdEntity.setAssociatedUserId(newUser.getId());
- //更新住户信息
- householdService.updateById(householdEntity);
- }
- }
- return newUser;
- }
-
- /**
- * 出租屋 自定义删除
- *
- * @param id
- * @return
- */
- @Override
- public Boolean removeHouseRental(Long id) {
- // 先删除出租屋信息
- boolean b = removeById(id);
- // 再删除租户信息
- boolean update = iHouseholdService.update(Wrappers.<HouseholdEntity>lambdaUpdate()
- .set(HouseholdEntity::getIsDeleted, 1)
- .eq(HouseholdEntity::getHousingRentalId, id));
- // 返回
- return b;
- }
-
- /**
- * 出租屋 自定义修改
- *
- * @param houseRental
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean updateHouseRental(HouseRentalVO houseRental) {
- boolean addFlag = true;
- boolean updateFlag = true;
- boolean removeFlag = true;
- houseRental.setUpdateUser(AuthUtil.getUserId());
- houseRental.setUpdateTime(new Date());
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- // 居民
- if (!Strings.isBlank(roleName) && roleName.equals("inhabitant")) {
- // 待审核
- houseRental.setAuditStatus(0);
- }
- //更新自身
- boolean update = updateById(houseRental);
- // 查询对应已存在的租户
- QueryWrapper<HouseholdEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("housing_rental_id", houseRental.getId());
- List<HouseholdEntity> oldList = iHouseholdService.list(wrapper);
- List<HouseholdVO> list = houseRental.getHouseholdVOList();
- // 申明新增,修改,删除集合
- List<HouseholdEntity> newList = new ArrayList<>();
- List<HouseholdEntity> addList = new ArrayList<>();
- List<HouseholdEntity> updateList = new ArrayList<>();
- List<HouseholdEntity> removeList = new ArrayList<>();
- // 找出需要新增的,否则组成新集合进行比对
- List<String> phoneList = new ArrayList<>();
- IUserService userService = SpringUtils.getBean(IUserService.class);
- for (HouseholdEntity householdEntity : list) {
- if (null == householdEntity.getId()) {
- User user = new User();
- // 新增或更新用户
- user = isSave(userService, householdEntity, user);
- // 新增住户
- householdEntity.setHouseCode(houseRental.getHouseCode());
- householdEntity.setHousingRentalId(houseRental.getId());
- householdEntity.setRelationship(18);
- householdEntity.setResidentialStatus(1);
- householdEntity.setRoleType(2);
- if (!Strings.isBlank(householdEntity.getIdCard())){
- householdEntity.setCardType(111);
- }
- if (user.getId() != null) {
- householdEntity.setAssociatedUserId(user.getId());
- }
- addList.add(householdEntity);
- // 添加手机号
- phoneList.add(householdEntity.getPhoneNumber());
- } else {
- newList.add(householdEntity);
- }
- }
- // 遍历去差集,判断是新增还是删除还是更新
- // 取旧数据和新提交数据差集--删除
- removeList = oldList.stream().filter(vo -> !newList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
-
- // 取旧数据和新提交数据交集--更新
- updateList = newList.stream().filter(vo -> oldList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
-
- // 批量新增
- if (addList.size() > 0) {
- addFlag = iHouseholdService.saveBatch(addList);
- }
- // 批量修改
- if (updateList.size() > 0) {
- for (HouseholdEntity householdEntity : updateList) {
- phoneList.add(householdEntity.getPhoneNumber());
- User user = new User();
- // 修改用户,用户存在则更新用户,不存在则新增用户
- user = isSave(userService, householdEntity, user);
- if (user.getId() != null) {
- householdEntity.setAssociatedUserId(user.getId());
- }
- }
- updateFlag = iHouseholdService.updateBatchById(updateList);
- }
- // 批量删除
- if (removeList.size() > 0) {
- removeFlag = iHouseholdService.removeBatchByIds(removeList);
- // 删除用户。判断用户是否有其他角色,
- for (HouseholdEntity householdEntity : removeList) {
- if (householdEntity.getAssociatedUserId() != null) {
- User userVO = userService.getById(householdEntity.getAssociatedUserId());
- if (userVO.getRoleId().contains("1717429059648606209")) {
- List<String> stringList = Arrays.asList(userVO.getRoleId().split(","));
- // 有其他角色
- if (stringList.size() >= 2) {
- List<String> collect = stringList.stream().filter(item -> !item.equals("1717429059648606209")).collect(Collectors.toList());
- userVO.setRoleId(StringUtils.join(collect, ","));
- userService.updateById(userVO);
- } else {
- // 没有其他角色
- userVO.setRoleId("");
- boolean b = userService.updateById(userVO);
- System.out.println(b);
- }
- }
- }
- }
- }
- // 返回
- return update && addFlag && updateFlag && removeFlag;
- }
-
- /**
- * 保存或更新用户
- *
- * @param userService
- * @param householdEntity
- * @param user
- * @return
- */
- private User isSave(IUserService userService, HouseholdEntity householdEntity, User user) {
- boolean save;
- // 查询该住户是否有账号
- IUserService userService1 = SpringUtils.getBean(IUserService.class);
- User user1 = userService1.getOne(Wrappers.<User>lambdaQuery()
- .eq(User::getAccount, householdEntity.getPhoneNumber())
- .eq(User::getIsDeleted, 0).last("limit 1"));
- if (user1 != null) {
- user = user1;
- user.setName(householdEntity.getName());
- user.setRealName(householdEntity.getName());
- if (StringUtils.isNoneBlank(user.getRoleId())) {
- boolean contains = user.getRoleId().contains("1717429059648606209");
- if (!contains) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- }
- } else {
- user.setRoleId("1717429059648606209");
- }
- // 更新用户
- save = userService.updateById(user);
- return user;
- }
- // 新增用户
- user.setAccount(householdEntity.getPhoneNumber());
- user.setUserType(1);
- user.setPhone(householdEntity.getPhoneNumber());
- user.setRealName(householdEntity.getName());
- user.setName(householdEntity.getName());
- user.setPassword(DigestUtil.encrypt(CommonConstant.DEFAULT_PASSWORD));
- user.setRoleId("1717429059648606209");
- save = userService.save(user);
- return user;
- }
-
- /**
- * 获取统计数据
- *
- * @return
- */
- @Override
- public Object getStatistics(HouseRentalTenantVO houseRental) {
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(HouseRentalTenantVO.class, houseRental);
- // 查询
- List<HouseRentalStatistics> statistics = baseMapper.getStatistics(houseRental,
- commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator());
- // 返回
- return statistics;
- }
-
- /**
- * 出租屋 确认
- *
- * @param houseRental
- * @return
- */
- @Override
- public Boolean confirmHouseRental(HouseRentalVO houseRental) {
- // 修改状态
- houseRental.setUpdateTime(new Date());
- // 修改
- return updateById(houseRental);
- }
-
- /**
- * 导出租赁信息
- *
- * @param houseRentalVO
- * @return
- */
- @Override
- public List<HouseRentalExcel> export(HouseRentalTenantVO houseRentalVO) {
- List<HouseRentalExcel> houseRentalExcels = baseMapper.export(houseRentalVO);
- return houseRentalExcels;
- }
-
- @Override
- public Integer getStatisticsCount(HouseRentalTenantVO houseRental) {
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(HouseRentalTenantVO.class, houseRental);
- return baseMapper.getStatisticsCount(houseRental, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList(), commonParamSet.getIsAdministrator());
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
deleted file mode 100644
index e4c8fda..0000000
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
+++ /dev/null
@@ -1,1014 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service.impl;
-
-import cn.hutool.core.util.IdcardUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.IdUtils;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.service.IGridRangeService;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.excel.HouseAndHoldExcel;
-import org.springblade.modules.house.excel.HouseExcel;
-import org.springblade.modules.house.mapper.HouseMapper;
-import org.springblade.modules.house.service.IHouseService;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.house.vo.HouseParam;
-import org.springblade.modules.house.vo.HouseTree;
-import org.springblade.modules.house.vo.HouseVO;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.service.ILabelService;
-import org.springblade.modules.label.vo.LabelVO;
-import org.springblade.modules.place.excel.PlaceExcel;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-/**
- * 房屋 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class HouseServiceImpl extends ServiceImpl<HouseMapper, HouseEntity> implements IHouseService {
-
-
- @Autowired
- private IGridService gridService;
-
- @Autowired
- private IHouseholdService householdService;
-
- @Autowired
- private IGridRangeService gridRangeService;
-
- @Autowired
- private IUserService userService;
-
- @Autowired
- private IRegionService regionService;
-
- @Override
- public IPage<HouseVO> selectHousePage(IPage<HouseVO> page, HouseVO house) {
-// List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
-// Integer isAdministrator = AuthUtil.isAdministrator() == true ? 1 : 2;
- CommonParamSet commonParamSet = new CommonParamSet().invoke(HouseVO.class,house);
-
- List<HouseVO> houseVOS = baseMapper.selectHousePage(page, house,
- commonParamSet.getRegionChildCodesList(),commonParamSet.getGridCodeList(), commonParamSet.getIsAdministrator()
- );
- return page.setRecords(houseVOS);
- }
-
- /**
- * 房屋自定义详情查询
- *
- * @param house
- * @return
- */
- @Override
- public HouseVO getHouseDetail(HouseVO house) {
- return baseMapper.getHouseDetail(house);
- }
-
- /**
- * 房屋自定义新增或修改
- *
- * @param house
- * @return
- */
- @Override
- public boolean saveOrUpdateHouse(HouseEntity house) {
- boolean flag = false;
- // 如果没有房屋编号,自己生成
- if (!Strings.isBlank(house.getHouseCode())) {
- // 查询是否已存在房屋数据
- QueryWrapper<HouseEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", house.getHouseCode());
- HouseEntity one = getOne(wrapper);
- if (null != one) {
- house.setId(one.getId());
- // 更新数据
- return updateById(house);
- }
- } else {
- //自己生成编号
- // 设置来源( 1:地址总表 2:国控采集)
- house.setSource(2);
- // 并生成36位的houseCode
- house.setHouseCode(IdUtils.getIdBy36());
- }
- //插入数据
- flag = save(house);
- // 设置网格绑定数据
- gridBind(house);
- // 返回
- return flag;
- }
-
- /**
- * 网格绑定
- *
- * @param house
- */
- public void gridBind(HouseEntity house) {
- if (null != house.getGridId()) {
- // 判断关联关系表是否存在
- QueryWrapper<GridRangeEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("grid_id", house.getGridId()).eq("house_code", house.getHouseCode());
- GridRangeEntity one = gridRangeService.getOne(wrapper);
- if (null == one) {
- // 新增
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setHouseCode(house.getHouseCode());
- gridRangeEntity.setGridId(house.getGridId());
- // 插入
- gridRangeService.save(gridRangeEntity);
- }
- }
- }
-
-
- /**
- * 导入房屋数据
- *
- * @param data
- * @param isCovered
- */
- @Override
- public void importUserHouse(List<HouseExcel> data, Boolean isCovered) {
- data.forEach(houseExcel -> {
- HouseEntity HouseEntity = Objects.requireNonNull(BeanUtil.copy(houseExcel, HouseEntity.class));
- this.save(HouseEntity);
- });
- }
-
- @Override
- public List<HouseExcel> export(HouseVO household) {
- List<HouseExcel> houseExcels = baseMapper.export(household);
- return houseExcels;
- }
-
- /**
- * 查询房屋树
- *
- * @param houseParam
- * @return
- */
- @Override
- public List<HouseTree> getHouseTree(HouseParam houseParam) {
- List<String> houseCodeList = getHouseCodeList(houseParam);
- return NodeTreeUtil.getHouseTree(baseMapper.getHouseTree(houseParam, houseCodeList));
- }
-
-
- /**
- * 根据角色获取地址编号集合
- *
- * @param houseParam
- * @return
- */
- private List<String> getHouseCodeList(HouseParam houseParam) {
- List<String> stringList = new ArrayList<>();
- if (null != houseParam.getRoleName() && !houseParam.getRoleName().equals("")) {
- if (houseParam.getRoleName().equals("网格员")) {
- // 查询对应的房屋地址code
- stringList = gridService.getAddressCodeListByUserId(AuthUtil.getUserId(),null);
- }
- }
- return stringList;
- }
-
- /**
- * 人房数据导入
- *
- * @param data
- * @param isCovered
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void importHouseAndHold(List<HouseAndHoldExcel> data, Boolean isCovered) {
- for (HouseAndHoldExcel houseAndHoldExcel : data) {
- // System.out.println(houseAndHoldExcel);
- System.out.println("houseAndHoldExcel = " + houseAndHoldExcel);
- // 保存房屋数据--一个一个插入,防止一个表格中存在多个地址编号相同的数据
- saveHouseData(houseAndHoldExcel);
- // 保存住户数据(包含标签)--一个一个插入,防止一个表格中存在多个地址编号相同的数据
- saveHouseholdData(houseAndHoldExcel);
- // 保存租户数据
- }
- }
-
- /**
- * 保存房屋数据
- *
- * @param houseAndHoldExcel
- */
- @Transactional(rollbackFor = Exception.class)
- public void saveHouseData(HouseAndHoldExcel houseAndHoldExcel) {
- IDoorplateAddressService doorplateAddressService = SpringUtils.getBean(IDoorplateAddressService.class);
- // 查询库中是否已存在
- QueryWrapper<HouseEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", houseAndHoldExcel.getHouseCode())
- .eq("is_deleted", 0);
- HouseEntity one = getOne(wrapper);
- // 不存在则插入,存在则不操作
- if (null == one) {
- HouseEntity houseEntity = new HouseEntity();
- houseEntity.setHouseCode(houseAndHoldExcel.getHouseCode());
- if (Strings.isBlank(houseAndHoldExcel.getHouseName())) {
- // 查询地址总表对应的数据
- QueryWrapper<DoorplateAddressEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("address_code",houseAndHoldExcel.getHouseCode());
- DoorplateAddressEntity addressEntity = doorplateAddressService.getOne(queryWrapper);
- if (null!=addressEntity){
- houseEntity.setHouseName(addressEntity.getAddressName());
- houseEntity.setAddress(addressEntity.getAddressName());
- houseEntity.setDistrictCode(addressEntity.getAoiCode());
- houseEntity.setDistrictName(addressEntity.getAoiName());
- houseEntity.setLng(addressEntity.getX());
- houseEntity.setLat(addressEntity.getY());
- }
- }else {
- houseEntity.setHouseName(houseAndHoldExcel.getHouseName());
- houseEntity.setAddress(houseAndHoldExcel.getHouseName());
- }
- if (!Strings.isBlank(houseAndHoldExcel.getDistrictName())) {
- houseEntity.setDistrictName(houseAndHoldExcel.getDistrictName());
- }
- if (!Strings.isBlank(houseAndHoldExcel.getUnit())) {
- houseEntity.setUnit(houseAndHoldExcel.getUnit());
- }
- if (!Strings.isBlank(houseAndHoldExcel.getFloor())) {
- houseEntity.setFloor(houseAndHoldExcel.getFloor());
- }
- houseEntity.setRoom(houseAndHoldExcel.getRoom());
- houseEntity.setBuilding(houseAndHoldExcel.getBuilding());
- houseEntity.setArea(houseAndHoldExcel.getArea());
- houseEntity.setPropertyPrice(houseAndHoldExcel.getPropertyPrice());
- if (!Strings.isBlank(houseAndHoldExcel.getServiceDue())) {
- try {
- Date date = new SimpleDateFormat("yyyy-MM-dd").parse(houseAndHoldExcel.getServiceDue());
- houseEntity.setServiceDue(date);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- }
- houseEntity.setRemark(houseAndHoldExcel.getRemark());
- houseEntity.setCreateTime(new Date());
- houseEntity.setCreateUser(AuthUtil.getUserId().toString());
- houseEntity.setUpdateTime(new Date());
- houseEntity.setUpdateUser(AuthUtil.getUserId().toString());
- if (!Strings.isBlank(houseAndHoldExcel.getHouseCode())) {
- houseEntity.setSource(1);
- } else {
- houseEntity.setHouseCode(IdUtils.getIdBy36());
- houseEntity.setSource(2);
- }
- // 网格处理
- importGridHandle(houseAndHoldExcel,houseEntity);
- // 新增
- save(houseEntity);
- }else {
- // 更新
- if (Strings.isBlank(houseAndHoldExcel.getHouseName())) {
- // 查询地址总表对应的数据
- QueryWrapper<DoorplateAddressEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("address_code",houseAndHoldExcel.getHouseCode());
- DoorplateAddressEntity addressEntity = doorplateAddressService.getOne(queryWrapper);
- if (null!=addressEntity){
- one.setHouseName(addressEntity.getAddressName());
- one.setAddress(addressEntity.getAddressName());
- one.setDistrictCode(addressEntity.getAoiCode());
- one.setDistrictName(addressEntity.getAoiName());
- one.setLng(addressEntity.getX());
- one.setLat(addressEntity.getY());
- }
- }else {
- one.setHouseName(houseAndHoldExcel.getHouseName());
- one.setAddress(houseAndHoldExcel.getHouseName());
- }
- if (!Strings.isBlank(houseAndHoldExcel.getDistrictName())) {
- one.setDistrictName(houseAndHoldExcel.getDistrictName());
- }
- if (!Strings.isBlank(houseAndHoldExcel.getUnit())) {
- one.setUnit(houseAndHoldExcel.getUnit());
- }
- if (!Strings.isBlank(houseAndHoldExcel.getFloor())) {
- one.setFloor(houseAndHoldExcel.getFloor());
- }
- one.setRoom(houseAndHoldExcel.getRoom());
- one.setBuilding(houseAndHoldExcel.getBuilding());
- one.setArea(houseAndHoldExcel.getArea());
- one.setPropertyPrice(houseAndHoldExcel.getPropertyPrice());
- // 网格处理
- importGridHandle(houseAndHoldExcel,one);
- // 更新
- updateById(one);
- }
- }
-
- /**
- * 保存住户数据
- *
- * @param houseAndHoldExcel
- */
- @Transactional(rollbackFor = Exception.class)
- public void saveHouseholdData(HouseAndHoldExcel houseAndHoldExcel) {
- // 查询库中是否已存在
- QueryWrapper<HouseholdEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", houseAndHoldExcel.getHouseCode())
- .eq("is_deleted", 0)
- .eq("phone_number", houseAndHoldExcel.getPhoneNumber())
- .eq("name", houseAndHoldExcel.getName());
- HouseholdEntity one = householdService.getOne(wrapper);
- // 不存在则插入,存在则不操作
- if (null == one) {
- HouseholdEntity householdEntity = new HouseholdEntity();
- householdEntity.setHouseCode(houseAndHoldExcel.getHouseCode());
- householdEntity.setName(houseAndHoldExcel.getName());
- householdEntity.setPhoneNumber(houseAndHoldExcel.getPhoneNumber());
- // 与角色关系
- if (!Strings.isBlank(houseAndHoldExcel.getRelationship())) {
- householdEntity.setRelationship(Integer.parseInt(houseAndHoldExcel.getRelationship()));
- // 如果是业主,则需要往用户表插入用户
- if (householdEntity.getRelationship() == 1) {
- saveOrUpdateUser(householdEntity);
- }
- }
- /// 是否主要联系人
- if (!Strings.isBlank(houseAndHoldExcel.getIsPrimaryContact())) {
- householdEntity.setIsPrimaryContact(Integer.parseInt(houseAndHoldExcel.getIsPrimaryContact()));
- }
- // 居住状态
- if (!Strings.isBlank(houseAndHoldExcel.getResidentialStatus())) {
- householdEntity.setResidentialStatus(Integer.parseInt(houseAndHoldExcel.getResidentialStatus()));
- }
- // 性别
- if (!Strings.isBlank(houseAndHoldExcel.getGender())) {
- householdEntity.setGender(Short.parseShort(houseAndHoldExcel.getGender()));
- }
- // 居民身份证
- if (!Strings.isBlank(houseAndHoldExcel.getIdCard())) {
- if (IdcardUtil.isValidCard(houseAndHoldExcel.getIdCard())) {
- // 身份证类型为居民身份证
- householdEntity.setCardType(111);
- householdEntity.setIdCard(houseAndHoldExcel.getIdCard());
- }else {
- householdEntity.setIdCard(houseAndHoldExcel.getIdCard());
- }
- }
- // 党员
- if (!Strings.isBlank(houseAndHoldExcel.getPartyEmber())) {
- householdEntity.setPartyEmber(Integer.parseInt(houseAndHoldExcel.getPartyEmber()));
- }
- // householdEntity.setHkmtPass(houseAndHoldExcel.getHkmtPass());
- // householdEntity.setPassport(houseAndHoldExcel.getPassport());
- // 民族
- if (!Strings.isBlank(houseAndHoldExcel.getEthnicity())) {
- householdEntity.setEthnicity(Integer.parseInt(houseAndHoldExcel.getEthnicity()));
- }
- // 学历
- if (!Strings.isBlank(houseAndHoldExcel.getEducation())) {
- householdEntity.setEducation(Integer.parseInt(houseAndHoldExcel.getEducation()));
- }
- // 户籍类型
- if (!Strings.isBlank(houseAndHoldExcel.getResidentType())) {
- householdEntity.setResidentType(Integer.parseInt(houseAndHoldExcel.getResidentType().trim()));
- }
- // 户籍地区县
- if (!Strings.isBlank(houseAndHoldExcel.getResidentAdcode())) {
- String adCode = shiftResidentResidentAdCode(houseAndHoldExcel.getResidentProvinceAdcode(),
- houseAndHoldExcel.getResidentCityAdcode(),
- houseAndHoldExcel.getResidentAdcode());
- // 转换行政区code
- houseAndHoldExcel.setResidentAdcode(adCode);
- }
- householdEntity.setHukouRegistration(houseAndHoldExcel.getHukouRegistration());
- // 籍贯地区县
- if (!Strings.isBlank(houseAndHoldExcel.getNativePlaceAdcode())) {
- String adCode = shiftResidentResidentAdCode(null,
- null,
- houseAndHoldExcel.getNativePlaceAdcode());
- // 转换行政区code
- houseAndHoldExcel.setNativePlaceAdcode(adCode);
- }
- // 健康状况
- if (!Strings.isBlank(houseAndHoldExcel.getHealthStatus())) {
- householdEntity.setHealthStatus(Integer.parseInt(houseAndHoldExcel.getHealthStatus()));
- }
- householdEntity.setDiseaseName(houseAndHoldExcel.getDiseaseName());
- householdEntity.setReligiousBelief(houseAndHoldExcel.getReligiousBelief());
- // 工作状态
- if (!Strings.isBlank(houseAndHoldExcel.getWorkStatus())) {
- householdEntity.setWorkStatus(Integer.parseInt(houseAndHoldExcel.getWorkStatus()));
- }
- householdEntity.setEmployer(houseAndHoldExcel.getEmployer());
- householdEntity.setOccupation(houseAndHoldExcel.getOccupation());
- householdEntity.setCmpyRegAddr(houseAndHoldExcel.getCmpyRegAddr());
- // 外出
- householdEntity.setGoOutReason(houseAndHoldExcel.getGoOutReason());
- if (!Strings.isBlank(houseAndHoldExcel.getGoOutTime())) {
- try {
- Date date = new SimpleDateFormat("yyyy-MM-dd").parse(houseAndHoldExcel.getGoOutTime());
- householdEntity.setGoOutTime(date);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- }
- householdEntity.setGoOutWhere(houseAndHoldExcel.getGoOutWhere());
- householdEntity.setGoOutAddr(houseAndHoldExcel.getGoOutAddr());
- // 婚姻状态
- if (!Strings.isBlank(houseAndHoldExcel.getMaritalStatus())) {
- householdEntity.setMaritalStatus(Integer.parseInt(houseAndHoldExcel.getMaritalStatus()));
- }
- // 车牌号
- householdEntity.setCardNumber(houseAndHoldExcel.getCardNumber());
- // 其他联系方式
- householdEntity.setOtherContact(houseAndHoldExcel.getOtherContact());
- if (!Strings.isBlank(householdEntity.getHomeAdcode())) {
- // 暂时不处理,导入数据目前都有house_code
- String adCode = shiftResidentHomeAdcode(houseAndHoldExcel.getHomeAdcode());
- // 转换行政区code
- houseAndHoldExcel.setHomeAdcode(adCode);
- }
- householdEntity.setCurrentAddress(houseAndHoldExcel.getCurrentAddress());
- householdEntity.setDisabilityCert(houseAndHoldExcel.getDisabilityCert());
- householdEntity.setRemark(houseAndHoldExcel.getRemarks());
- householdEntity.setCreateTime(new Date());
- householdEntity.setCreateUser(AuthUtil.getUserId());
- householdEntity.setUpdateTime(new Date());
- householdEntity.setUpdateUser(AuthUtil.getUserId());
- // 新增
- boolean save = householdService.save(householdEntity);
- if (save) {
- householdLabelHandle(houseAndHoldExcel, householdEntity);
- }
- } else {
- // 更新
- one.setHouseCode(houseAndHoldExcel.getHouseCode());
- one.setName(houseAndHoldExcel.getName());
- one.setPhoneNumber(houseAndHoldExcel.getPhoneNumber());
- // 与角色关系
- if (!Strings.isBlank(houseAndHoldExcel.getRelationship())) {
- one.setRelationship(Integer.parseInt(houseAndHoldExcel.getRelationship()));
- // 如果是业主,则需要往用户表插入用户
- if (one.getRelationship() == 1) {
- saveOrUpdateUser(one);
- }
- }
- /// 是否主要联系人
- if (!Strings.isBlank(houseAndHoldExcel.getIsPrimaryContact())) {
- one.setIsPrimaryContact(Integer.parseInt(houseAndHoldExcel.getIsPrimaryContact()));
- }
- // 居住状态
- if (!Strings.isBlank(houseAndHoldExcel.getResidentialStatus())) {
- one.setResidentialStatus(Integer.parseInt(houseAndHoldExcel.getResidentialStatus()));
- }
- // 性别
- if (!Strings.isBlank(houseAndHoldExcel.getGender())) {
- one.setGender(Short.parseShort(houseAndHoldExcel.getGender()));
- }
- // 居民身份证
- if (!Strings.isBlank(houseAndHoldExcel.getIdCard())) {
- if (IdcardUtil.isValidCard(houseAndHoldExcel.getIdCard())) {
- // 身份证类型为居民身份证
- one.setCardType(111);
- one.setIdCard(houseAndHoldExcel.getIdCard());
- }else {
- one.setIdCard(houseAndHoldExcel.getIdCard());
- }
- }
- // 党员
- if (!Strings.isBlank(houseAndHoldExcel.getPartyEmber())) {
- one.setPartyEmber(Integer.parseInt(houseAndHoldExcel.getPartyEmber()));
- }
- // 民族
- if (!Strings.isBlank(houseAndHoldExcel.getEthnicity())) {
- one.setEthnicity(Integer.parseInt(houseAndHoldExcel.getEthnicity()));
- }
- // 学历
- if (!Strings.isBlank(houseAndHoldExcel.getEducation())) {
- one.setEducation(Integer.parseInt(houseAndHoldExcel.getEducation()));
- }
- // 户籍类型
- if (!Strings.isBlank(houseAndHoldExcel.getResidentType())) {
- one.setResidentType(Integer.parseInt(houseAndHoldExcel.getResidentType().trim()));
- }
- // 户籍地区县
- if (!Strings.isBlank(houseAndHoldExcel.getResidentAdcode())) {
- String adCode = shiftResidentResidentAdCode(houseAndHoldExcel.getResidentProvinceAdcode(),
- houseAndHoldExcel.getResidentCityAdcode(),
- houseAndHoldExcel.getResidentAdcode());
- // 转换行政区code
- houseAndHoldExcel.setResidentAdcode(adCode);
- }
- one.setHukouRegistration(houseAndHoldExcel.getHukouRegistration());
- // 籍贯地区县
- if (!Strings.isBlank(houseAndHoldExcel.getNativePlaceAdcode())) {
- String adCode = shiftResidentResidentAdCode(null,
- null,
- houseAndHoldExcel.getNativePlaceAdcode());
- // 转换行政区code
- houseAndHoldExcel.setNativePlaceAdcode(adCode);
- }
- // 健康状况
- if (!Strings.isBlank(houseAndHoldExcel.getHealthStatus())) {
- one.setHealthStatus(Integer.parseInt(houseAndHoldExcel.getHealthStatus()));
- }
- one.setDiseaseName(houseAndHoldExcel.getDiseaseName());
- one.setReligiousBelief(houseAndHoldExcel.getReligiousBelief());
- // 工作状态
- if (!Strings.isBlank(houseAndHoldExcel.getWorkStatus())) {
- one.setWorkStatus(Integer.parseInt(houseAndHoldExcel.getWorkStatus()));
- }
- one.setEmployer(houseAndHoldExcel.getEmployer());
- one.setOccupation(houseAndHoldExcel.getOccupation());
- one.setCmpyRegAddr(houseAndHoldExcel.getCmpyRegAddr());
- one.setGoOutReason(houseAndHoldExcel.getGoOutReason());
- if (!Strings.isBlank(houseAndHoldExcel.getGoOutTime())) {
- try {
- Date date = new SimpleDateFormat("yyyy-MM-dd").parse(houseAndHoldExcel.getGoOutTime());
- one.setGoOutTime(date);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- }
- one.setGoOutWhere(houseAndHoldExcel.getGoOutWhere());
- one.setGoOutAddr(houseAndHoldExcel.getGoOutAddr());
- // 婚姻状态
- if (!Strings.isBlank(houseAndHoldExcel.getMaritalStatus())) {
- one.setMaritalStatus(Integer.parseInt(houseAndHoldExcel.getMaritalStatus()));
- }
- one.setCardNumber(houseAndHoldExcel.getCardNumber());
- one.setOtherContact(houseAndHoldExcel.getOtherContact());
- if (!Strings.isBlank(one.getHomeAdcode())) {
- // 暂时不处理,导入数据目前都有house_code
- String adCode = shiftResidentHomeAdcode(houseAndHoldExcel.getHomeAdcode());
- // 转换行政区code
- houseAndHoldExcel.setHomeAdcode(adCode);
- }
- one.setCurrentAddress(houseAndHoldExcel.getCurrentAddress());
- one.setDisabilityCert(houseAndHoldExcel.getDisabilityCert());
- one.setRemark(houseAndHoldExcel.getRemarks());
- one.setUpdateTime(new Date());
- one.setUpdateUser(AuthUtil.getUserId());
- // 新增
- boolean update = householdService.updateById(one);
- if (update) {
- // 住户标签处理
- householdLabelHandle(houseAndHoldExcel,one);
- }
- }
- }
-
-
- /**
- * 导入是网格数据绑定处理
- * @param houseAndHoldExcel
- * @param houseEntity
- */
- public void importGridHandle(HouseAndHoldExcel houseAndHoldExcel, HouseEntity houseEntity) {
- if (!Strings.isBlank(houseAndHoldExcel.getCommunityName()) &&
- !Strings.isBlank(houseAndHoldExcel.getGridName())){
- // 查询对应的网格信息
- GridEntity gridEntity = gridService.getGridInfoByParam(houseAndHoldExcel.getCommunityName(),houseAndHoldExcel.getGridName());
- if (null!=gridEntity){
- // 设置场所范围
- houseEntity.setGridId(gridEntity.getId());
- houseEntity.setGridCode(gridEntity.getGridCode());
- // 更新网格范围绑定
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setGridId(gridEntity.getId());
- gridRangeEntity.setGridCode(gridEntity.getGridCode());
- gridRangeEntity.setHouseCode(houseEntity.getHouseCode());
- UpdateWrapper<GridRangeEntity> updateWrapper = new UpdateWrapper<>();
- updateWrapper.eq("house_code",houseEntity.getHouseCode());
- gridRangeService.update(gridRangeEntity,updateWrapper);
- }
- }
- }
-
- /**
- * 住户标签处理
- * @param houseAndHoldExcel
- * @param householdEntity
- */
- public void householdLabelHandle(HouseAndHoldExcel houseAndHoldExcel, HouseholdEntity householdEntity) {
- String labelId = houseAndHoldExcel.getLabelId();
- if (!StringUtils.isBlank(labelId)) {
- String[] split = labelId.split(",");
- IUserHouseLabelService bean = SpringUtils.getBean(IUserHouseLabelService.class);
- ILabelService bean1 = SpringUtils.getBean(ILabelService.class);
- for (String s : split) {
- // 查询标签信息
- LabelEntity one1 = bean1.getOne(Wrappers.<LabelEntity>lambdaQuery().eq(LabelEntity::getLabelName, s));
- if (one1 != null) {
- // 判断是否已存在关联关系,没有则新增
- QueryWrapper<UserHouseLabelEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("label_id",one1.getId())
- .eq("house_code",householdEntity.getHouseCode())
- .eq("household_id",householdEntity.getId());
- UserHouseLabelEntity houseLabelEntity = bean.getOne(wrapper);
- if (null==houseLabelEntity) {
- UserHouseLabelEntity userHouseLabelEntity = new UserHouseLabelEntity();
- userHouseLabelEntity.setLabelId(BigDecimal.valueOf(one1.getId()).longValue());
- userHouseLabelEntity.setHouseholdId(householdEntity.getId());
- // 设置默认的绿色
- userHouseLabelEntity.setColor("green");
- userHouseLabelEntity.setLableType(1);
- userHouseLabelEntity.setLabelName(s);
- userHouseLabelEntity.setHouseCode(houseAndHoldExcel.getHouseCode());
- bean.save(userHouseLabelEntity);
- }
- }
- }
- }
- }
-
- /**
- * 住户业主信息处理,将业主人员插入到用户表
- *
- * @return
- */
- public void userHandle(HouseholdEntity householdEntity) {
- if (!Strings.isBlank(householdEntity.getPhoneNumber())) {
- // 根据手机号查询对应账号和手机号的用户信息
- List<User> userList = userService.getUserListByPhoneOrAccount(householdEntity.getPhoneNumber());
- if (userList.size() > 0) {
- User user = userList.get(0);
- householdEntity.setAssociatedUserId(user.getId());
- // 更新
- householdService.updateById(householdEntity);
- // 判断用户是否包含了居民角色,不包含则需更新
- if (!user.getRoleId().contains("1717429059648606209")) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- //更新
- userService.updateById(user);
- }
- } else {
- // 插入用户信息
- //如果用户不存在,则新增一个用户
- User newUser = new User();
- newUser.setAccount(householdEntity.getPhoneNumber());
- newUser.setPhone(householdEntity.getPhoneNumber());
- newUser.setName(householdEntity.getName());
- newUser.setRealName(householdEntity.getName());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 用户新增
- boolean submit = userService.submit(newUser);
- // 更新绑定用户信息
- householdEntity.setAssociatedUserId(newUser.getId());
- // 更新
- householdService.updateById(householdEntity);
- }
- }
- }
-
- /**
- * 现居住地街道转换
- *
- * @param homeAdcode
- * @return
- */
- public String shiftResidentHomeAdcode(String homeAdcode) {
- // 只根据区县名称查询
- QueryWrapper<Region> wrapper = new QueryWrapper<>();
- wrapper.eq("town_name", homeAdcode);
- List<Region> list = regionService.list(wrapper);
- if (list.size() == 1) {
- return list.get(0).getTownCode();
- }
- return "";
- }
-
- /**
- * 根据名称转成code
- *
- * @param residentProvinceAdcode 省名称
- * @param residentCityAdcode 市名称
- * @param residentAdcode 区县名称
- */
- public String shiftResidentResidentAdCode(String residentProvinceAdcode, String residentCityAdcode, String residentAdcode) {
- if (!Strings.isBlank(residentProvinceAdcode)
- && !Strings.isBlank(residentCityAdcode)) {
- // 根据省市县三级查询对应的区县code
- QueryWrapper<Region> wrapper = new QueryWrapper<>();
- wrapper.eq("province_name", residentProvinceAdcode)
- .eq("city_name", residentCityAdcode)
- .eq("district_name", residentAdcode);
- List<Region> list = regionService.list(wrapper);
- if (list.size() > 0) {
- return list.get(0).getDistrictCode();
- }
- } else {
- // 只根据区县名称查询
- QueryWrapper<Region> wrapper = new QueryWrapper<>();
- wrapper.eq("district_name", residentAdcode);
- List<Region> list = regionService.list(wrapper);
- if (list.size() == 1) {
- return list.get(0).getDistrictCode();
- }
- }
- return "";
- }
-
- /**
- * 保存或更新用户(业主)
- *
- * @param householdEntity
- */
- @Transactional(rollbackFor = Exception.class)
- public void saveOrUpdateUser(HouseholdEntity householdEntity) {
- if (null != householdEntity.getPhoneNumber() && !householdEntity.getPhoneNumber().equals("")) {
- //根据手机号查询库里的数据
- List<User> list = userService.getUserListByPhoneOrAccount(householdEntity.getPhoneNumber());
- if (list.size()>0) {
- User user = list.get(0);
- //如果用户存在,则该用户id绑定住户
- householdEntity.setAssociatedUserId(user.getId());
- // 判断用户是否包含了居民角色,不包含则需更新
- if (!user.getRoleId().contains("1717429059648606209")) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- //更新
- userService.updateById(user);
- }
- } else {
- User newUser = new User();
- //如果用户不存在,则新增一个用户
- newUser.setAccount(householdEntity.getPhoneNumber());
- newUser.setPhone(householdEntity.getPhoneNumber());
- newUser.setName(householdEntity.getName());
- newUser.setRealName(householdEntity.getName());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 设置机构
- // 用户新增
- boolean submit = userService.submit(newUser);
- //绑定id
- householdEntity.setAssociatedUserId(newUser.getId());
- }
- }
- }
-
- @Override
- public Map<String, Object> getHouseStatistics(String code, String roleType, String aoiCode, String buildingCode, String unitCode) {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- if (roleType.equals("2")) {
- // result1 查询楼栋数 result2 查询房屋套数 result3 查询住户数 result4 查询单元数
- Integer result1 = baseMapper.getHouseStatisticsOne(code, null, aoiCode, buildingCode, unitCode, roleType);
- Integer result2 = baseMapper.getHouseStatisticsTwo(code, null, aoiCode, buildingCode, unitCode, roleType);
- Integer result3 = baseMapper.getHouseStatisticsThree(code, null, aoiCode, buildingCode, unitCode, roleType);
- Integer result4 = baseMapper.getHouseStatisticsFour(code, null, aoiCode, buildingCode, unitCode, roleType);
- objectObjectHashMap.put("result1", result1);
- objectObjectHashMap.put("result2", result2);
- objectObjectHashMap.put("result3", result3);
- objectObjectHashMap.put("result4", result4);
- } else {
-
- Integer result1 = baseMapper.getHouseStatisticsOne(code, AuthUtil.getUserId(), aoiCode, buildingCode, unitCode, roleType);
- Integer result2 = baseMapper.getHouseStatisticsTwo(code, AuthUtil.getUserId(), aoiCode, buildingCode, unitCode, roleType);
- Integer result3 = baseMapper.getHouseStatisticsThree(code, AuthUtil.getUserId(), aoiCode, buildingCode, unitCode, roleType);
- Integer result4 = baseMapper.getHouseStatisticsFour(code, AuthUtil.getUserId(), aoiCode, buildingCode, unitCode, roleType);
- objectObjectHashMap.put("result1", result1);
- objectObjectHashMap.put("result2", result2);
- objectObjectHashMap.put("result3", result3);
- objectObjectHashMap.put("result4", result4);
- }
- return objectObjectHashMap;
- }
-
- @Override
- public List<String> getHouseBuilding(String districtCode) {
- return baseMapper.getHouseBuilding(districtCode);
- }
-
- @Override
- public List<String> getHouseUnit(String districtCode, String building) {
- return baseMapper.getHouseUnit(districtCode, building);
- }
-
- @Override
- public List<Map<String, Object>> labelStatistics(HouseVO house) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(HouseVO.class, house);
- return baseMapper.labelStatistics(house, commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator());
- }
-
- @Override
- public List<Map<String, Object>> labelCommunityStatistics(HouseVO house) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(HouseVO.class, house);
- List<Map<String, Object>> list = baseMapper.labelCommunityStatistics(house, commonParamSet.getRegionChildCodesList());
- for (Map<String, Object> map : list) {
- List<LabelVO> code = baseMapper.getlabelCount(house,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(),
- map.get("code").toString());
- map.put("child",code);
- }
- return list;
- }
-
- /**
- * 房屋网格处理
- * @return
- */
- @Override
- public Object houseGridHandle() {
- // 查询未处理的数据
- List<HouseEntity> houseEntityList = baseMapper.getNotBindGridOrJwGridList(1);
- // 遍历
- for (HouseEntity houseEntity : houseEntityList) {
- String point = "'POINT(" + houseEntity.getLng() + " " + houseEntity.getLat() + ")'";
- List<GridEntity> gridEntityList = SpringUtils.getBean(IGridService.class).spatialAnalysis(point);
- if (gridEntityList.size()>0){
- houseEntity.setGridCode(gridEntityList.get(0).getGridCode());
- houseEntity.setGridId(gridEntityList.get(0).getId());
- // 更新
- updateById(houseEntity);
- }
- }
-
- return null;
- }
-
- /**
- * 房屋警格处理
- * @return
- */
- @Override
- public Object houseJwGridHandle() {
- // 查询未处理的数据
- List<HouseEntity> houseEntityList = baseMapper.getNotBindGridOrJwGridList(2);
- // 遍历
- for (HouseEntity houseEntity : houseEntityList) {
- String point = "'POINT(" + houseEntity.getLng() + " " + houseEntity.getLat() + ")'";
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList = SpringUtils.getBean(IPoliceAffairsGridService.class).spatialAnalysis(point);
- if (policeAffairsGridEntityList.size()>0){
- houseEntity.setJwGridCode(policeAffairsGridEntityList.get(0).getJwGridCode());
- // 更新
- updateById(houseEntity);
- }
- }
- return null;
- }
-
- /**
- * 房屋画像统计-按房屋标签统计
- * @param house
- * @return
- */
- @Override
- public List<Map<String,Object>> getHouseLabelStatistic(HouseVO house) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(HouseVO.class, house);
- // 按房屋标签统计
- List<Map<String,Object>> list = baseMapper.getHouseLabelStatistic(house,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList());
- // 返回
- return list;
- }
-
- /**
- * 查询对应的社区编号
- * @param id
- * @return
- */
- @Override
- public String getCommunityCode(Long id) {
- return baseMapper.getCommunityCode(id);
- }
-
- /**
- * 查询所有房屋总数
- * @return
- */
- @Override
- public int getAllListTotal() {
- return baseMapper.getAllListTotal();
- }
-
- /**
- * 查询所有的房屋
- * @param i
- * @param size
- * @return
- */
- @Override
- public List<HouseVO> getAllList(int i, int size) {
- return baseMapper.getAllList(i,size);
- }
-
- /**
- * 房屋标签初始化处置-根据有租客的,初始成出租,有业主没租客的初始化成自主,业主都没的就是闲置
- * @param house
- * @return
- */
- @Override
- public boolean initHouseLabelBind(HouseVO house) {
- IUserHouseLabelService userHouseLabelService = SpringUtils.getBean(IUserHouseLabelService.class);
- // 查询无房屋状态的房屋数量
- int total = baseMapper.getNotBindLabelHouseNum(house);
- int size = 1000;
- int num = total / size;
- for (int i = 1; i <= num + 1; i++) {
- // 查询无房屋状态的房屋列表集合
- List<HouseVO> houseVOList = baseMapper.getNotBindLabelHouseList((i - 1) * size, size);
- for (HouseVO houseEntity : houseVOList) {
- //处理状态
- UserHouseLabelEntity houseLabelEntity = new UserHouseLabelEntity();
- houseLabelEntity.setHouseCode(houseEntity.getHouseCode());
- houseLabelEntity.setLableType(2);
- houseLabelEntity.setCreateTime(new Date());
- if (houseEntity.getStatus()==1) {
- // 闲置
- houseLabelEntity.setColor("green");
- houseLabelEntity.setLabelName("闲置");
- houseLabelEntity.setLabelId(1037L);
- }
- if (houseEntity.getStatus()==2) {
- // 自住
- houseLabelEntity.setColor("blue");
- houseLabelEntity.setLabelName("自住");
- houseLabelEntity.setLabelId(1038L);
- }
- if (houseEntity.getStatus()==3) {
- // 出租
- houseLabelEntity.setColor("yellow");
- houseLabelEntity.setLabelName("出租");
- houseLabelEntity.setLabelId(1039L);
- }
- // 查询当前房屋是否已有,有则更新,无则新增
- QueryWrapper<UserHouseLabelEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code",houseEntity.getHouseCode())
- .eq("lable_type",2);
- UserHouseLabelEntity userHouseLabelEntity = userHouseLabelService.getOne(wrapper);
- if (null!=userHouseLabelEntity){
- // 更新
- houseLabelEntity.setId(userHouseLabelEntity.getId());
- userHouseLabelService.updateById(houseLabelEntity);
- }else {
- // 新增
- userHouseLabelService.save(houseLabelEntity);
- }
- }
- }
- return true;
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseTenantServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseTenantServiceImpl.java
deleted file mode 100644
index 7215c76..0000000
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseTenantServiceImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import org.springblade.modules.house.vo.HouseTenantVO;
-import org.springblade.modules.house.mapper.HouseTenantMapper;
-import org.springblade.modules.house.service.IHouseTenantService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 租户管理 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class HouseTenantServiceImpl extends ServiceImpl<HouseTenantMapper, HouseTenantEntity> implements IHouseTenantService {
-
- @Override
- public IPage<HouseTenantVO> selectHouseTenantPage(IPage<HouseTenantVO> page, HouseTenantVO houseTenant) {
- return page.setRecords(baseMapper.selectHouseTenantPage(page, houseTenant));
- }
-
- /**
- * 根据租房id删除租户信息
- * @param id
- * @return
- */
- @Override
- public int removeByHousingRentalId(Long id) {
- return baseMapper.removeByHousingRentalId(id);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
deleted file mode 100644
index 6bb6fb2..0000000
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.excel.HouseHoldExcel;
-import org.springblade.modules.house.mapper.HouseholdMapper;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-import org.springblade.modules.house.vo.HouseholdOtherVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.service.ILabelService;
-import org.springblade.modules.label.vo.LabelVO;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.system.entity.DictBiz;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IDictBizService;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.StopWatch;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 住户 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class HouseholdServiceImpl extends ServiceImpl<HouseholdMapper, HouseholdEntity> implements IHouseholdService {
-
- @Autowired
- private IUserHouseLabelService userHouseLabelService;
-
- @Autowired
- private IDictBizService dictBizService;
-
- @Autowired
- private IUserService userService;
-
- @Autowired
- private IPlaceService placeService;
-
- @Override
- public IPage<HouseholdVO> selectHouseholdPage(IPage<HouseholdVO> page, HouseholdVO household) {
- StopWatch stopWatch = new StopWatch();
- stopWatch.start();
- CommonParamSet commonParamSet = new CommonParamSet().invoke(HouseholdVO.class, household);
-
-// List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
-// Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2;
- // 重点人员与关注人员
- if (Objects.nonNull(household.getLabelType())) {
- extracted(household);
- }
- List<HouseholdVO> householdVOS = baseMapper.selectHouseholdPage(page, household, commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(), commonParamSet.getGridCodeList());
- stopWatch.stop();
-// System.out.println("selectHouseholdPage:" + stopWatch.getTotalTimeMillis());
- return page.setRecords(householdVOS);
- }
-
- /**
- * 重点人员与关注人员
- * @param household
- */
- private void extracted(HouseholdVO household) {
- ILabelService iLabelService = SpringUtils.getBean(ILabelService.class);
- if (CommonConstant.NUMBER_ONE.equals(household.getLabelType())) {
- List<LabelEntity> list = iLabelService.list(Wrappers.<LabelEntity>lambdaQuery().eq(LabelEntity::getParentId, 103));
- List<Integer> collect = list.stream().map(item ->
- item.getId()
- ).collect(Collectors.toList());
- household.setLabelIdList(collect);
- } else if (CommonConstant.NUMBER_TWO.equals(household.getLabelType())) {
- List<LabelEntity> list = iLabelService.list(Wrappers.<LabelEntity>lambdaQuery().eq(LabelEntity::getParentId, 1032));
- List<Integer> collect = list.stream().map(item ->
- item.getId()
- ).collect(Collectors.toList());
- household.setLabelIdList(collect);
- }
- }
-
- /**
- * 查询房屋集合信息
- *
- * @param userId
- * @return
- */
- @Override
- public List<TreeStringNode> selectHouseNodeList(Long userId) {
- return baseMapper.selectHouseNodeList(userId);
- }
-
- /**
- * 查询房屋人员情况
- *
- * @param code
- * @return
- */
- @Override
- public List<HouseholdVO> getHouseholdListByCode(String code) {
- // 查询
- List<HouseholdVO> householdList = baseMapper.getHouseholdListByCode(code);
- // 处理字典
- handleDictBiz(householdList);
- // 返回
- return householdList;
- }
-
- /**
- * 处理字典
- *
- * @param householdList
- */
- private void handleDictBiz(List<HouseholdVO> householdList) {
- if (householdList.size() > 0) {
- // 查询角色关系字典
- List<DictBiz> dictBizList = dictBizService.getList("roleRelation", null);
- if (dictBizList.size() > 0) {
- // 遍历
- for (HouseholdVO householdVO : householdList) {
- if (null != householdVO.getRelationship()) {
- for (DictBiz dictBiz : dictBizList) {
- if (householdVO.getRelationship().toString().equals(dictBiz.getDictKey())) {
- householdVO.setRoleRelationName(dictBiz.getDictValue());
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * 住户 自定义新增或修改
- *
- * @param household
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean saveOrUpdateHousehold(HouseholdVO household) {
- boolean flag = false;
- household.setUpdateTime(new Date());
- household.setUpdateUser(AuthUtil.getUserId());
- if (!Strings.isBlank(household.getRoleName()) && household.getRoleName().equals("居民")) {
- // 待审核
- household.setConfirmFlag(0);
- }
- if (null != household.getId()) {
- // 更新
- flag = updateById(household);
- // 更新用户信息
- updateUserInfo(household);
- // 更新标签信息
- updateUserLabelInfo(household);
- } else {
- // 新增
- household.setCreateTime(new Date());
- household.setCreateUser(AuthUtil.getUserId());
- flag = save(household);
- // 更新用户信息
- updateUserInfo(household);
- // 更新标签信息
- updateUserLabelInfo(household);
- }
- return flag;
- }
-
- /**
- * 更新用户标签信息
- *
- * @param household
- */
- public void updateUserLabelInfo(HouseholdVO household) {
- if (household.getHouseholdLabelList().size() > 0) {
- List<HouseholdLabelVO> householdLabelList = household.getHouseholdLabelList();
- for (HouseholdLabelVO householdLabelVO : householdLabelList) {
- if (!Strings.isBlank(household.getHouseCode())) {
- householdLabelVO.setHouseCode(household.getHouseCode());
- }
- householdLabelVO.setHouseholdId(household.getId());
- // 先删除对应绑定的信息
- userHouseLabelService.saveOrUpdateHouseholdLabel(householdLabelVO);
- }
- }
- }
-
- /**
- * 更新用户信息
- *
- * @param household
- */
- public void updateUserInfo(HouseholdEntity household) {
- // 判断用户是否为业主,如果是业主,则新增
- if (null != household.getRelationship() && household.getRelationship() == 1) {
- // 如果为业主
- // 新增用户
- bindUserHandle(household);
- }
- }
-
- /**
- * 业主和用户绑定
- *
- * @param
- */
- public User bindUserHandle(HouseholdEntity householdEntity) {
- User newUser = new User();
- if (null != householdEntity.getPhoneNumber() && !householdEntity.getPhoneNumber().equals("")) {
- //根据手机号查询库里的数据
- List<User> list = userService.getUserListByPhoneOrAccount(householdEntity.getPhoneNumber());
- if (list.size()>0) {
- User user = list.get(0);
- //如果用户存在,则该用户id绑定场所
- householdEntity.setAssociatedUserId(user.getId());
- //更新住户信息
- updateById(householdEntity);
- newUser = user;
- // 判断用户是否包含了居民角色,不包含则需更新
- if (!user.getRoleId().contains("1717429059648606209")) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- //更新
- userService.updateById(user);
- }
- } else {
- //如果用户不存在,则新增一个用户
- newUser.setAccount(householdEntity.getPhoneNumber());
- newUser.setPhone(householdEntity.getPhoneNumber());
- newUser.setName(householdEntity.getName());
- newUser.setRealName(householdEntity.getName());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 设置机构
- // 用户新增
- boolean submit = userService.submit(newUser);
- //绑定id
- householdEntity.setAssociatedUserId(newUser.getId());
- //更新住户信息
- updateById(householdEntity);
- }
- }
- return newUser;
- }
-
- /**
- * 住户 自定义查询详情
- *
- * @param household
- * @return
- */
- @Override
- public Object getDetail(HouseholdEntity household) {
- return baseMapper.getHouseholdListById(household);
- }
-
- @Override
- public List<HouseHoldExcel> export(HouseholdVO household) {
- List<HouseHoldExcel> userHouseHoldExcels = baseMapper.export(household);
- return userHouseHoldExcels;
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void importUserHouseHold(List<HouseHoldExcel> data, Boolean isCovered) {
- data.forEach(houseHoldExcel -> {
- HouseholdEntity houseHoldEntity = Objects.requireNonNull(BeanUtil.copy(houseHoldExcel, HouseholdEntity.class));
- this.save(houseHoldEntity);
- });
- }
-
- /**
- * 住户审核统计
- *
- * @param userId
- * @return
- */
- @Override
- public Integer statistics(Long userId, String neiCode, Integer confirmFlag) {
- HouseholdVO householdVO = new HouseholdVO();
- householdVO.setConfirmFlag(confirmFlag);
- householdVO.setCommunityCode(neiCode);
- CommonParamSet commonParamSet = new CommonParamSet().invoke(HouseholdVO.class, householdVO);
-
- return baseMapper.statistics(householdVO, commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(), commonParamSet.getGridCodeList());
- }
-
- /**
- * 住户对应物业,网格,公安负责人查询
- *
- * @param household
- * @return
- */
- @Override
- public Object getHouseholdOtherInfo(HouseholdVO household) {
- Map<String, Object> map = new HashMap<>(3);
- // 查询物业
- HouseholdOtherVO propertyOtherVO = baseMapper.getProperty(household);
- map.put("wy", propertyOtherVO);
- // 查询网格
- HouseholdOtherVO gridOtherVO = baseMapper.getGrid(household);
- map.put("wg", gridOtherVO);
- // 查询公安信息
- HouseholdOtherVO securityOtherVO = baseMapper.getSecurity(household);
- map.put("ga", securityOtherVO);
- // 返回
- return map;
- }
-
- @Override
- public Object getHouseHoldStatistics(String code, String roleType) {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- if (roleType.equals("2")) {
- List<Map<String, Object>> result = baseMapper.getHouseHoldStatistics(code, null, roleType);
- List<Map<String, Object>> result1 = baseMapper.getHouseHoldStatisticsAge(code, null, roleType);
- objectObjectHashMap.put("gender", result);
- objectObjectHashMap.put("age", result1);
- return objectObjectHashMap;
- } else {
- List<Map<String, Object>> result = baseMapper.getHouseHoldStatistics(code, AuthUtil.getUserId(), roleType);
- List<Map<String, Object>> result1 = baseMapper.getHouseHoldStatisticsAge(code, AuthUtil.getUserId(), roleType);
- objectObjectHashMap.put("gender", result);
- objectObjectHashMap.put("age", result1);
- return objectObjectHashMap;
- }
-
- }
-
- /**
- * 住户业主信息处理,将业主人员插入到用户表
- *
- * @return
- */
- @Override
- public Object userHandle() {
- // 查询所有未入库的业主信息
- List<HouseholdEntity> householdEntityList = baseMapper.getNotInsertUserHousehold();
- // 批量入用户库
- for (HouseholdEntity householdEntity : householdEntityList) {
- // 根据手机号查询对应账号和手机号的用户信息
- List<User> userList = userService.getUserListByPhoneOrAccount(householdEntity.getPhoneNumber());
- if (userList.size() > 0) {
- User user = userList.get(0);
- householdEntity.setAssociatedUserId(user.getId());
- // 更新
- updateById(householdEntity);
- // 判断用户是否包含了居民角色,不包含则需更新
- if (!user.getRoleId().contains("1717429059648606209")) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- //更新
- userService.updateById(user);
- }
- } else {
- // 插入用户信息
- //如果用户不存在,则新增一个用户
- User newUser = new User();
- newUser.setAccount(householdEntity.getPhoneNumber());
- newUser.setPhone(householdEntity.getPhoneNumber());
- newUser.setName(householdEntity.getName());
- newUser.setRealName(householdEntity.getName());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 用户新增
- boolean submit = userService.submit(newUser);
- // 更新绑定用户信息
- householdEntity.setAssociatedUserId(newUser.getId());
- // 更新
- updateById(householdEntity);
- }
- }
- return null;
- }
-
- /**
- * 住户 删除
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean removeHousehold(String ids) {
- List<Long> idList = Func.toLongList(ids);
- // 同时删除当前住户对应的标签
- removeHouseholdLabel(idList);
- // 同时删除对应的用户信息
- removeHouseholdUser(idList);
- // 删除住户信息
- boolean removeByIds = removeByIds(idList);
- // 返回
- return removeByIds;
- }
-
-
- /**
- * 同时删除对应的用户信息
- *
- * @param idList
- */
- public void removeHouseholdUser(List<Long> idList) {
- for (Long id : idList) {
- HouseholdEntity householdEntity = getById(id);
- // 如果是业主
- if (null!= householdEntity.getRelationship() && householdEntity.getRelationship() == 1) {
- // 查询对应的用户
- User user = userService.getById(householdEntity.getAssociatedUserId());
- // 判断是否还绑定其他的房屋,如果有,则不操作用户
- QueryWrapper<HouseholdEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("associated_user_id", user.getId());
- List<HouseholdEntity> householdEntityList = list(wrapper);
- if (householdEntityList.size() == 1) {
- // 判断角色
- if (!Strings.isBlank(user.getRoleId())) {
- List<String> stringList = Arrays.asList(user.getRoleId().split(","));
- // 查询场所
- QueryWrapper<PlaceEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("principal_user_id", user.getId());
- List<PlaceEntity> placeEntityList = placeService.list(queryWrapper);
- // 即没有房屋和场所了就删除对应的居民角色
- if (placeEntityList.size() == 0) {
- // 查看当前用户的角色是否只有一个
- if (stringList.size() > 1) {
- // 查询是否对应有场所负责人,如果有则不删除,如果没有则删除对应的角色
- List<String> arrayList = new ArrayList<>();
- for (String roleId : stringList) {
- if (!roleId.equals("1717429059648606209")) {
- arrayList.add(roleId);
- }
- }
- user.setRoleId(StringUtils.join(arrayList, ","));
- // 更新用户
- userService.updateById(user);
- } else {
- // 删除当前用户
- userService.removeById(user.getId());
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * 删除住户标签信息
- *
- * @param idList
- */
- public void removeHouseholdLabel(List<Long> idList) {
- for (Long id : idList) {
- QueryWrapper<UserHouseLabelEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("household_id", id);
- userHouseLabelService.remove(wrapper);
- }
- }
-
- @Override
- public List<HouseholdVO> getAllHouseHold(HouseholdVO household) {
- return baseMapper.getAllHouseHold(household);
- }
-
- /**
- * 住户列表查询
- *
- * @param household
- * @return
- */
- @Override
- public List<HouseholdVO> selectHouseholdList(HouseholdVO household) {
- List<HouseholdVO> householdVOS = baseMapper.selectHouseholdList(household);
- // 遍历
- for (HouseholdVO householdVO : householdVOS) {
- if (householdVO.getHouseholdLabelList().size() > 0) {
- List<String> labelNameList = householdVO.getHouseholdLabelList().stream().map(householdLabelVO -> householdLabelVO.getLabelName())
- .collect(Collectors.toList());
- householdVO.setLabelName(String.join(",", labelNameList));
- }
- }
- // 返回
- return householdVOS;
- }
-
- @Override
- public IPage<HouseholdVO> getKeynotePersonnelPage(IPage<HouseholdVO> page, HouseholdVO household) {
- // StopWatch stopWatch = new StopWatch();
- // stopWatch.start();
- // Dept dept = deptService.getById(AuthUtil.getDeptId());
- // if (null!=dept){
- // household.setRegionCode(dept.getRegionCode());
- // }
- List<HouseholdVO> householdVOS = baseMapper.getKeynotePersonnelPage(page, household);
- // stopWatch.stop();
- // System.out.println("selectHouseholdPage:" + stopWatch.getTotalTimeMillis());
- return page.setRecords(householdVOS);
- }
-
- /**
- * 根据人员标签编号集合查询对应的住户(按颜色区分近多少天没有发过任务的住户)
- *
- * @param list
- * @return
- */
- @Override
- public List<HouseholdVO> getHouseholdListByParam(List<Integer> list) {
- return baseMapper.getHouseholdListByParam(list);
- }
-
- @Override
- public List<TreeIntegerNode> getlabelStatistics(HouseholdVO household) {
- Map<Integer, TreeIntegerNode> labelTreeList = baseMapper.getlabelStatistics(household);
- List<TreeIntegerNode> nodeTree = NodeTreeUtil.getNodeTree(labelTreeList);
- nodeTree.forEach(node -> recursion(node));
- return nodeTree;
- }
-
- private void recursion(TreeIntegerNode node) {
- if (node.getChildren() != null && node.getChildren().size() > 0) {
- if (node.getId().equals(1030)) {
- int sum = node.getChildren().stream().mapToInt(TreeIntegerNode::getCount).sum();
- node.setCount(sum);
- }
- if (node.getId().equals(1031)) {
- int sum = node.getChildren().stream().mapToInt(TreeIntegerNode::getCount).sum();
- node.setCount(sum);
- }
- node.getChildren().forEach(node2 -> recursion(node2));
- } else {
- node.setChildren(null);
- }
- }
-
- /**
- * 通过小区id查询用户
- * @param householdVO
- * @param page
- * @return
- */
- @Override
- public IPage<HouseholdVO> getUserInfoByDistrictIds(HouseholdVO householdVO, IPage<HouseholdVO> page) {
- List<String> list = JSON.parseArray(householdVO.getDistrictIds()).toJavaList(String.class);
- List<HouseholdVO> userInfoByDistrictIds = baseMapper.getUserInfoByDistrictIds(list, householdVO, page);
- return page.setRecords(userInfoByDistrictIds);
- }
-
- /**
- * 查询住户对应的社区编号
- * @param id
- * @return
- */
- @Override
- public String getCommunityCode(Long id) {
- return baseMapper.getCommunityCode(id);
- }
-
- /**
- * 查询所有住户总数
- * @return
- */
- @Override
- public int getAllListTotal() {
- return baseMapper.getAllListTotal();
- }
-
- /**
- * 查询对应的住户集合
- * @param i
- * @param size
- * @return
- */
- @Override
- public List<HouseholdVO> getAllList(int i, int size) {
- return baseMapper.getAllList(i,size);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
deleted file mode 100644
index 3971f67..0000000
--- a/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.dto.UserHouseLabelDTO;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.excel.UserHouseLabelExcel;
-import org.springblade.modules.house.mapper.UserHouseLabelMapper;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.service.ILabelService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Objects;
-
-/**
- * 住户-标签 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class UserHouseLabelServiceImpl extends ServiceImpl<UserHouseLabelMapper, UserHouseLabelEntity> implements IUserHouseLabelService {
-
-
- @Autowired
- private ILabelService labelService;
-
- @Override
- public IPage<HouseholdLabelVO> selectHouseholdLabelPage(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) {
- return page.setRecords(baseMapper.selectHouseLabelPage(page, householdLabel));
- }
-
- /**
- * 住户-标签 自定义新增或修改
- *
- * @param householdLabel
- * @return
- */
- @Override
- public boolean saveOrUpdateHouseholdLabel(UserHouseLabelEntity householdLabel) {
- // 查询标签名称
- LabelEntity labelEntity = labelService.getById(householdLabel.getLabelId());
- householdLabel.setLabelName(labelEntity.getLabelName());
- // 判断同一个住户同一个标签是否已存在,已存在则更新,不存在则新增
- QueryWrapper<UserHouseLabelEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("household_id", householdLabel.getHouseholdId())
- .eq("label_id", householdLabel.getLabelId());
- UserHouseLabelEntity one = getOne(queryWrapper);
- if (null != one) {
- householdLabel.setId(one.getId());
- // 更新
- return updateById(householdLabel);
- }
- // 插入
- return save(householdLabel);
- }
-
- @Override
- public List<Integer> selectUserLabelList(UserHouseLabelDTO userHouseLabelDTO) {
- List<Integer> userLabelList = baseMapper.getUserLabelList(userHouseLabelDTO);
- return userLabelList;
- }
-
- @Override
- public void importUserHouseLabel(List<UserHouseLabelExcel> data, Boolean isCovered) {
- data.forEach(houseHoldExcel -> {
- UserHouseLabelEntity userHouseLabelEntity = Objects.requireNonNull(BeanUtil.copy(houseHoldExcel, UserHouseLabelEntity.class));
- this.save(userHouseLabelEntity);
- });
- }
-
- @Override
- public IPage<HouseholdLabelVO> statisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) {
- return page.setRecords(baseMapper.statisticalLabels(page, householdLabel));
- }
-
- @Override
- public IPage<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) {
- return page.setRecords(baseMapper.getCommunityStatisticalLabels(page, householdLabel));
- }
-
- /**
- * 房屋-标签 房屋自定义新增或修改
- *
- * @param userHouseLabelEntity
- * @return
- */
- @Override
- public boolean saveOrUpdateHouseLabel(UserHouseLabelEntity userHouseLabelEntity) {
- // 查询标签名称
- LabelEntity labelEntity = labelService.getById(userHouseLabelEntity.getLabelId());
- if (labelEntity != null) {
- userHouseLabelEntity.setLabelName(labelEntity.getLabelName());
- }
- // 先删除之前的房屋绑定的标签
- QueryWrapper<UserHouseLabelEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("house_code", userHouseLabelEntity.getHouseCode())
- .eq("lable_type", 2);
- // 删除
- remove(queryWrapper);
- // 插入
- return save(userHouseLabelEntity);
- }
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseParam.java b/src/main/java/org/springblade/modules/house/vo/HouseParam.java
deleted file mode 100644
index ca74f12..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseParam.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class HouseParam implements Serializable {
-
- /**
- * 分类
- */
- private Integer type;
-
- /**
- * 名称
- */
- private String name;
-
- /**
- * 编号
- */
- private String code;
-
- /**
- * 地址类型 1:小区 2:非小区
- */
- private Integer addressType;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 网格名称
- */
- private String gridName;
-
- /**
- * 社区名称
- */
- private String communityName;
-
- /**
- * 商超写字楼名称
- */
- private String buildingName;
-
- /**
- * 商超写字楼名称
- */
- private String userId;
-
- /**
- * 搜索key
- */
- private String searchKey;
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseRentalStatistics.java b/src/main/java/org/springblade/modules/house/vo/HouseRentalStatistics.java
deleted file mode 100644
index bd3318b..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseRentalStatistics.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-
-/**
- * 房屋出租统计
- */
-@Data
-public class HouseRentalStatistics {
-
- //周期
- private String term;
-
- //户数
- private Integer total;
-
- //一户的人数
- private Integer personNum;
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseRentalTenantVO.java b/src/main/java/org/springblade/modules/house/vo/HouseRentalTenantVO.java
deleted file mode 100644
index 5f242dd..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseRentalTenantVO.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.modules.house.entity.HouseTenantEntity;
-
-import java.util.List;
-
-/**
- * 房屋租户VO
- */
-@Data
-public class HouseRentalTenantVO extends HouseRentalEntity {
-
- //租户名
- private String tenantName;
-
- //房屋名
- private String houseName;
-
- //电话
- private String phone;
-
- /**
- * 租房时间类型 1:长期 2:中期 3:短期
- */
- private Integer dldType;
-
-
-
- /**
- * 拼接地址
- */
- private String address;
-
- /**
- * 是否到期 0:未到期 1:已到期 2:已终止
- */
- private Integer status;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 开始时间
- */
- private String startTime;
-
- /**
- * 结束时间
- */
- private String endTime;
-
- private String neiCode;
-
- private Long userId;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseRentalVO.java b/src/main/java/org/springblade/modules/house/vo/HouseRentalVO.java
deleted file mode 100644
index fbfe3b2..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseRentalVO.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 出租屋 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseRentalVO extends HouseRentalEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 数量
- */
- private Integer number;
-
- /**
- * 是否到期 0:未到期 1:已到期 2:已终止
- */
- private Integer status;
-
- /**
- * 租户集合信息
- */
- private List<HouseholdVO> householdVOList = new ArrayList<>();
-
- @ApiModelProperty("开始时间")
- private String startTime;
-
- @ApiModelProperty("结束时间")
- private String endTime;
-
- /**
- * 角色名称
- */
- @ApiModelProperty("角色名称")
- private String roleName;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseTenantVO.java b/src/main/java/org/springblade/modules/house/vo/HouseTenantVO.java
deleted file mode 100644
index 87961f0..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseTenantVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 租户管理 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseTenantVO extends HouseTenantEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseTree.java b/src/main/java/org/springblade/modules/house/vo/HouseTree.java
deleted file mode 100644
index 02a7b46..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseTree.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Data
-public class HouseTree {
-
- private static final long serialVersionUID = 1L;
-
- private String name;
-
- private String code;
-
- private String parentCode;
-
- private boolean hashChild;
-
- private List<HouseTree> children = new ArrayList<>();
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseVO.java b/src/main/java/org/springblade/modules/house/vo/HouseVO.java
deleted file mode 100644
index b3cf0fe..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseVO.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.house.entity.HouseEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 房屋 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseVO extends HouseEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 拼接地址
- */
- private String address;
-
- /**
- * 街道编号
- */
- private String streetCode;
- /**
- * 街道名称
- */
- private String townStreetName;
- /**
- * 社区编号
- */
- private String neiCode;
- /**
- * 社区名称
- */
- private String neiName;
- /**
- * 网格名称
- */
- private String gridName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 标签id
- */
- private Integer labelId;
-
- // 标签父级id
- private Integer parentId;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
- private List<UserHouseLabelVO> userHouseLabelVOList = new ArrayList<>();
-
- /**
- * 标签id
- */
- private Integer status;
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseholdLabelVO.java b/src/main/java/org/springblade/modules/house/vo/HouseholdLabelVO.java
deleted file mode 100644
index 001f2e3..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseholdLabelVO.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-
-import java.util.List;
-
-/**
- * 住户-标签 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseholdLabelVO extends UserHouseLabelEntity {
- private static final long serialVersionUID = 1L;
-
-
- private String communityName;
-
- private String regionName;
- private String regionCode;
-
- private String communityCode;
-
- // 刑释解教人员
-// 肇事肇祸精神障碍患者
-// 一般精神障碍患者
-// 重点对象
-// 取保候审
- private Integer number1;
- private Integer number2;
- private Integer number3;
- private Integer number4;
- private Integer number5;
- private Integer number6;
- private Integer number7;
- private Integer number8;
-
- private List<Integer> ListId;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseholdOtherVO.java b/src/main/java/org/springblade/modules/house/vo/HouseholdOtherVO.java
deleted file mode 100644
index 7fa3900..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseholdOtherVO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.house.entity.HouseholdEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 住户 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-public class HouseholdOtherVO{
- private static final long serialVersionUID = 1L;
-
- /**
- * 编号
- */
- private String code;
-
- /**
- * 姓名
- */
- private String name;
-
- /**
- * 电话
- */
- private String phone;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseholdVO.java b/src/main/java/org/springblade/modules/house/vo/HouseholdVO.java
deleted file mode 100644
index 87125df..0000000
--- a/src/main/java/org/springblade/modules/house/vo/HouseholdVO.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.house.entity.HouseholdEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 住户 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HouseholdVO extends HouseholdEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 角色类型名称
- */
- private String roleRelationName;
-
- @ApiModelProperty(value = "标签")
- private List<Integer> labelIdList;
-
- @ApiModelProperty(value = "标签类型:重点人员,关注人员")
- private Integer labelType;
-
- /**
- * 小区名称
- */
- private String aoiName;
-
- /**
- * 地址
- */
- private String address;
- /**
- * 街道名称
- */
- private String townStreetName;
- /**
- * 社区名称
- */
- private String neiName;
-
- /**
- * 网格名称
- */
- private String gridName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 标签
- */
- private List<HouseholdLabelVO> householdLabelList = new ArrayList<>();
-
- @ApiModelProperty("开始时间")
- private String startTime;
-
- @ApiModelProperty("结束时间")
- private String endTime;
-
- @ApiModelProperty("用户id")
- private Long userId;
-
- /**
- * 来源
- */
- private Integer source;
-
- /**
- * 户籍地行政区划区县名称
- */
- private String residentAdName;
-
- /**
- * 户籍地行政区划省名称
- */
- private String residentProvinceAdName;
-
- /**
- * 户籍地行政区划省编号
- */
- private String residentProvinceAdCode;
-
- /**
- * 户籍地行政区划市名称
- */
- private String residentCityAdName;
-
- /**
- * 户籍地行政区划市编号
- */
- private String residentCityAdCode;
-
- /**
- * 籍贯地行政区划区县名称
- */
- private String nativePlaceAdName;
-
- /**
- * 籍贯地行政区划省名称
- */
- private String nativePlaceProvinceAdName;
-
- /**
- * 籍贯地行政区划省编号
- */
- private String nativePlaceProvinceAdCode;
-
- /**
- * 籍贯地行政区划市名称
- */
- private String nativePlaceCityAdName;
-
- /**
- * 籍贯地行政区划市编号
- */
- private String nativePlaceCityAdCode;
-
- private String building;
-
- private String unit;
-
- private String aoiCode;
-
- private String neiCode;
-
- /**
- * 标签id
- */
- private Integer labelId;
-
- // 标签父级id
- private Integer parentId;
-
- /**
- * 标签名称
- */
- private String labelName;
-
- /**
- * 查询key
- */
- private String searchKey;
-
- /**
- * 取值数
- */
- private Integer limit;
-
- @ApiModelProperty(value = "未成年 1:否 2:是", example = "")
- private Integer minors;
-
- /**
- * 角色名称
- */
-// private String roleName;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
- @ApiModelProperty(value = "小区id", example = "")
- private String districtIds;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/vo/UserHouseLabelVO.java b/src/main/java/org/springblade/modules/house/vo/UserHouseLabelVO.java
deleted file mode 100644
index 869a0f8..0000000
--- a/src/main/java/org/springblade/modules/house/vo/UserHouseLabelVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-
-/**
- * 房屋-标签 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class UserHouseLabelVO extends UserHouseLabelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java
deleted file mode 100644
index aab363a..0000000
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.HouseLabelEntity;
-import org.springblade.modules.house.vo.UserHouseLabelVO;
-
-import java.util.Objects;
-
-/**
- * 房屋-标签 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class HouseLabelWrapper extends BaseEntityWrapper<HouseLabelEntity, UserHouseLabelVO> {
-
- public static HouseLabelWrapper build() {
- return new HouseLabelWrapper();
- }
-
- @Override
- public UserHouseLabelVO entityVO(HouseLabelEntity houseLabel) {
- UserHouseLabelVO houseLabelVO = Objects.requireNonNull(BeanUtil.copy(houseLabel, UserHouseLabelVO.class));
-
- //User createUser = UserCache.getUser(houseLabel.getCreateUser());
- //User updateUser = UserCache.getUser(houseLabel.getUpdateUser());
- //houseLabelVO.setCreateUserName(createUser.getName());
- //houseLabelVO.setUpdateUserName(updateUser.getName());
-
- return houseLabelVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseRentalWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseRentalWrapper.java
deleted file mode 100644
index 93f817d..0000000
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseRentalWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.HouseRentalEntity;
-import org.springblade.modules.house.vo.HouseRentalVO;
-import java.util.Objects;
-
-/**
- * 出租屋 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class HouseRentalWrapper extends BaseEntityWrapper<HouseRentalEntity, HouseRentalVO> {
-
- public static HouseRentalWrapper build() {
- return new HouseRentalWrapper();
- }
-
- @Override
- public HouseRentalVO entityVO(HouseRentalEntity houseRental) {
- HouseRentalVO houseRentalVO = Objects.requireNonNull(BeanUtil.copy(houseRental, HouseRentalVO.class));
-
- //User createUser = UserCache.getUser(houseRental.getCreateUser());
- //User updateUser = UserCache.getUser(houseRental.getUpdateUser());
- //houseRentalVO.setCreateUserName(createUser.getName());
- //houseRentalVO.setUpdateUserName(updateUser.getName());
-
- return houseRentalVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseTenantWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseTenantWrapper.java
deleted file mode 100644
index ed351f4..0000000
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseTenantWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.HouseTenantEntity;
-import org.springblade.modules.house.vo.HouseTenantVO;
-import java.util.Objects;
-
-/**
- * 租户管理 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class HouseTenantWrapper extends BaseEntityWrapper<HouseTenantEntity, HouseTenantVO> {
-
- public static HouseTenantWrapper build() {
- return new HouseTenantWrapper();
- }
-
- @Override
- public HouseTenantVO entityVO(HouseTenantEntity houseTenant) {
- HouseTenantVO houseTenantVO = Objects.requireNonNull(BeanUtil.copy(houseTenant, HouseTenantVO.class));
-
- //User createUser = UserCache.getUser(houseTenant.getCreateUser());
- //User updateUser = UserCache.getUser(houseTenant.getUpdateUser());
- //houseTenantVO.setCreateUserName(createUser.getName());
- //houseTenantVO.setUpdateUserName(updateUser.getName());
-
- return houseTenantVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseWrapper.java
deleted file mode 100644
index 14cc874..0000000
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.vo.HouseVO;
-import java.util.Objects;
-
-/**
- * 房屋 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class HouseWrapper extends BaseEntityWrapper<HouseEntity, HouseVO> {
-
- public static HouseWrapper build() {
- return new HouseWrapper();
- }
-
- @Override
- public HouseVO entityVO(HouseEntity house) {
- HouseVO houseVO = Objects.requireNonNull(BeanUtil.copy(house, HouseVO.class));
-
- //User createUser = UserCache.getUser(house.getCreateUser());
- //User updateUser = UserCache.getUser(house.getUpdateUser());
- //houseVO.setCreateUserName(createUser.getName());
- //houseVO.setUpdateUserName(updateUser.getName());
-
- return houseVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseholdLabelWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseholdLabelWrapper.java
deleted file mode 100644
index 06b5feb..0000000
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseholdLabelWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-import java.util.Objects;
-
-/**
- * 住户-标签 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class HouseholdLabelWrapper extends BaseEntityWrapper<UserHouseLabelEntity, HouseholdLabelVO> {
-
- public static HouseholdLabelWrapper build() {
- return new HouseholdLabelWrapper();
- }
-
- @Override
- public HouseholdLabelVO entityVO(UserHouseLabelEntity householdLabel) {
- HouseholdLabelVO householdLabelVO = Objects.requireNonNull(BeanUtil.copy(householdLabel, HouseholdLabelVO.class));
-
- //User createUser = UserCache.getUser(householdLabel.getCreateUser());
- //User updateUser = UserCache.getUser(householdLabel.getUpdateUser());
- //householdLabelVO.setCreateUserName(createUser.getName());
- //householdLabelVO.setUpdateUserName(updateUser.getName());
-
- return householdLabelVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseholdWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseholdWrapper.java
deleted file mode 100644
index 2f4463b..0000000
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseholdWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.vo.HouseholdVO;
-import java.util.Objects;
-
-/**
- * 住户 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class HouseholdWrapper extends BaseEntityWrapper<HouseholdEntity, HouseholdVO> {
-
- public static HouseholdWrapper build() {
- return new HouseholdWrapper();
- }
-
- @Override
- public HouseholdVO entityVO(HouseholdEntity household) {
- HouseholdVO householdVO = Objects.requireNonNull(BeanUtil.copy(household, HouseholdVO.class));
-
- //User createUser = UserCache.getUser(household.getCreateUser());
- //User updateUser = UserCache.getUser(household.getUpdateUser());
- //householdVO.setCreateUserName(createUser.getName());
- //householdVO.setUpdateUserName(updateUser.getName());
-
- return householdVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/label/controller/LabelController.java b/src/main/java/org/springblade/modules/label/controller/LabelController.java
deleted file mode 100644
index c8266f5..0000000
--- a/src/main/java/org/springblade/modules/label/controller/LabelController.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.service.ILabelService;
-import org.springblade.modules.label.vo.LabelVO;
-import org.springblade.modules.label.wrapper.LabelWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 标签管理 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-label/label")
-@Api(value = "标签管理", tags = "标签管理接口")
-public class LabelController {
-
- private final ILabelService labelService;
-
- /**
- * 标签管理 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入label")
- public R<LabelVO> detail(LabelEntity label) {
- LabelEntity detail = labelService.getOne(Condition.getQueryWrapper(label));
- return R.data(LabelWrapper.build().entityVO(detail));
- }
-
- /**
- * 标签管理 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入label")
- public R<IPage<LabelVO>> list(LabelEntity label, Query query) {
- IPage<LabelEntity> pages = labelService.page(Condition.getPage(query), Condition.getQueryWrapper(label));
- return R.data(LabelWrapper.build().pageVO(pages));
- }
-
-
- /**
- * 标签管理 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入label")
- public R<IPage<LabelVO>> page(LabelVO label, Query query) {
- IPage<LabelVO> pages = labelService.selectLabelPage(Condition.getPage(query), label);
- return R.data(pages);
- }
-
- /**
- * 标签查询,按父id查询下级
- * @param label
- * @return
- */
- @GetMapping("/getLabelList")
- public R getLabelList(LabelVO label) {
- return R.data(labelService.getLabelList(label));
- }
-
-
- /**
- * 查询人员标签(不包含人这一级)
- * @param label
- * @return
- */
- @GetMapping("/getPersonLabelList")
- public R getPersonLabelList(LabelVO label) {
- return R.data(labelService.getPersonLabelList(label));
- }
-
- /**
- * 标签管理 分页
- */
- @GetMapping("/tree")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "树形接口", notes = "传入label")
- public R<List<TreeIntegerNode>> tree(LabelVO label) {
- List<TreeIntegerNode> pages = labelService.tree(label);
- return R.data( pages);
- }
-
- /**
- * 标签管理 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入label")
- public R save(@Valid @RequestBody LabelEntity label) {
- return R.status(labelService.save(label));
- }
-
- /**
- * 标签管理 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入label")
- public R update(@Valid @RequestBody LabelEntity label) {
- return R.status(labelService.updateById(label));
- }
-
- /**
- * 标签管理 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入label")
- public R submit(@Valid @RequestBody LabelEntity label) {
- label.setCreateUser(AuthUtil.getUserId());
- return R.status(labelService.saveOrUpdate(label));
- }
-
- /**
- * 标签管理 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(labelService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/label/dto/LabelDTO.java b/src/main/java/org/springblade/modules/label/dto/LabelDTO.java
deleted file mode 100644
index 1ba247d..0000000
--- a/src/main/java/org/springblade/modules/label/dto/LabelDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.dto;
-
-import org.springblade.modules.label.entity.LabelEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 标签管理 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class LabelDTO extends LabelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/label/entity/LabelEntity.java b/src/main/java/org/springblade/modules/label/entity/LabelEntity.java
deleted file mode 100644
index 8e02e54..0000000
--- a/src/main/java/org/springblade/modules/label/entity/LabelEntity.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 标签管理 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_label")
-@ApiModel(value = "Label对象", description = "标签管理")
-public class LabelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- /** 标签ID */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 父级id */
- @ApiModelProperty(value = "父级id", example = "")
- @TableField("parent_id")
- private Integer parentId;
-
- /** 标签名称 */
- @ApiModelProperty(value = "标签名称", example = "")
- @TableField("label_name")
- @JsonProperty("name")
- private String labelName;
-
- /** 排序 */
- @ApiModelProperty(value = "排序", example = "")
- @TableField("sort")
- private Integer sort;
-
- /** 是否删除 0否,1是 */
- @ApiModelProperty(value = "是否删除 0否,1是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 备注 */
- @ApiModelProperty(value = "备注", example = "")
- @TableField("remark")
- private String remark;
-
-}
diff --git a/src/main/java/org/springblade/modules/label/mapper/LabelMapper.java b/src/main/java/org/springblade/modules/label/mapper/LabelMapper.java
deleted file mode 100644
index c4fee96..0000000
--- a/src/main/java/org/springblade/modules/label/mapper/LabelMapper.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.mapper;
-
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.vo.LabelVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 标签管理 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface LabelMapper extends BaseMapper<LabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param label
- * @return
- */
- List<LabelVO> selectLabelPage(IPage page,@Param("label") LabelVO label);
-
-
- /**
- * 标签查询,按父id查询下级
- * @param label
- * @return
- */
- @MapKey(value = "id")
- Map<Integer, TreeIntegerNode> getLabelList(@Param("label") LabelVO label);
-
- @MapKey(value = "id")
- Map<Integer, TreeIntegerNode> getLabelTreeList(@Param("label") LabelVO label);
-
- /**
- * 查询子集标签集合
- * @param list
- * @return
- */
- @MapKey(value = "id")
- Map<Integer, TreeIntegerNode> getChildrenLabelList(@Param("list") List<Integer> list);
-
- /**
- * 查询人员标签(不包含人这一级)
- * @param label
- * @return
- */
- @MapKey(value = "id")
- Map<Integer, TreeIntegerNode> getPersonLabelList(@Param("label") LabelVO label);
-}
diff --git a/src/main/java/org/springblade/modules/label/mapper/LabelMapper.xml b/src/main/java/org/springblade/modules/label/mapper/LabelMapper.xml
deleted file mode 100644
index c906bb3..0000000
--- a/src/main/java/org/springblade/modules/label/mapper/LabelMapper.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.label.mapper.LabelMapper">
-
- <!--自定义列表-->
- <select id="selectLabelPage" resultType="org.springblade.modules.label.vo.LabelVO">
- select * from jczz_label where 1=1
- </select>
-
- <!--标签查询,按父id查询下级 mysql 5.7 有时会查询无结果-->
-<!-- <select id="getLabelList" resultType="org.springblade.common.node.TreeIntegerNode">-->
-<!-- SELECT-->
-<!-- jl.id as id,jl.parent_id as parentId,jl.label_name as name-->
-<!-- FROM-->
-<!-- (-->
-<!-- SELECT-->
-<!-- @ids AS ids,-->
-<!-- ( SELECT @ids := GROUP_CONCAT( id ) FROM jczz_label WHERE FIND_IN_SET( parent_id, @ids ) ) AS cids-->
-<!-- FROM-->
-<!-- jczz_label-->
-<!-- WHERE-->
-<!-- @ids IS NOT NULL-->
-<!-- AND @ids := #{label.parentId}-->
-<!-- ) id,-->
-<!-- jczz_label jl-->
-<!-- WHERE-->
-<!-- FIND_IN_SET(jl.parent_id,ids)-->
-<!-- </select>-->
-
- <!--标签查询,按父id查询下级-->
- <select id="getLabelList" resultType="org.springblade.common.node.TreeIntegerNode">
- SELECT
- jl.id as id,jl.parent_id as parentId,jl.label_name as name,
- (
- SELECT
- CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
- FROM
- jczz_label
- WHERE
- parent_id = jl.id and is_deleted = 0
- ) AS hasChildren
- FROM
- jczz_label jl
- where is_deleted = 0
- and parent_id = #{label.parentId}
- </select>
-
- <!--标签查询,按父id查询下级-->
- <select id="getChildrenLabelList" resultType="org.springblade.common.node.TreeIntegerNode">
- SELECT
- jl.id as id,jl.parent_id as parentId,jl.label_name as name,
- (
- SELECT
- CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
- FROM
- jczz_label
- WHERE
- parent_id = jl.id and is_deleted = 0
- ) AS hasChildren
- FROM
- jczz_label jl
- where is_deleted = 0
- and parent_id in
- <foreach collection="list" separator="," item="id" open="(" close=")">
- #{id}
- </foreach>
- </select>
-
-
- <select id="getLabelTreeList" resultType="org.springblade.common.node.TreeIntegerNode">
- SELECT
- jl.id AS id,
- jl.parent_id AS parentId,
- jl.label_name AS NAME,
- jl.sort,
- (SELECT count(1) from jczz_user_house_label where label_id = jl.id ) count
- FROM
- jczz_label jl where is_deleted = 0
- and jl.id != '1002'
- order by jl.sort desc
- </select>
-
- <!--查询人员标签(不包含人这一级)-->
- <select id="getPersonLabelList" resultType="org.springblade.common.node.TreeIntegerNode">
- SELECT
- jl.id AS id,
- jl.parent_id AS parentId,
- jl.label_name AS NAME,
- jl.sort,
- (SELECT count(1) from jczz_user_house_label where label_id = jl.id ) count,
- (
- SELECT
- CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
- FROM
- jczz_label
- WHERE
- parent_id = jl.id and is_deleted = 0
- ) AS hasChildren
- FROM
- jczz_label jl where is_deleted = 0
- and jl.id != '1002'
- and jl.id != '1000'
- order by jl.sort desc
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/label/service/ILabelService.java b/src/main/java/org/springblade/modules/label/service/ILabelService.java
deleted file mode 100644
index 1c01e3b..0000000
--- a/src/main/java/org/springblade/modules/label/service/ILabelService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.vo.LabelVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 标签管理 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface ILabelService extends IService<LabelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param label
- * @return
- */
- IPage<LabelVO> selectLabelPage(IPage<LabelVO> page, LabelVO label);
-
- /**
- * 标签查询,按父id查询下级
- * @param label
- * @return
- */
- Object getLabelList(LabelVO label);
-
- List<TreeIntegerNode> tree(LabelVO label);
-
- /**
- * 查询人员标签(不包含人这一级)
- * @param label
- * @return
- */
- List<TreeIntegerNode> getPersonLabelList(LabelVO label);
-}
diff --git a/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java b/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java
deleted file mode 100644
index 10c8dc4..0000000
--- a/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.swagger.models.auth.In;
-import org.springblade.common.node.TreeIntegerNode;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.mapper.LabelMapper;
-import org.springblade.modules.label.service.ILabelService;
-import org.springblade.modules.label.vo.LabelVO;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
-/**
- * 标签管理 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class LabelServiceImpl extends ServiceImpl<LabelMapper, LabelEntity> implements ILabelService {
-
- @Override
- public IPage<LabelVO> selectLabelPage(IPage<LabelVO> page, LabelVO label) {
- return page.setRecords(baseMapper.selectLabelPage(page, label));
- }
-
- /**
- * 标签查询,按父id查询下级
- *
- * @param label
- * @return
- */
-// @Override
-// public Object getLabelList(LabelVO label) {
-// Map<Integer, TreeIntegerNode> labelList = baseMapper.getLabelList(label);
-// List<Integer> list = new ArrayList<>();
-// // 遍历
-// labelList.forEach((id, treeNode) -> {
-// if (treeNode.getHasChildren()) {
-// list.add(id);
-// }
-// });
-// if (list.size() > 0) {
-// // 查询子集
-// Map<Integer, TreeIntegerNode> childrenLabelList = baseMapper.getChildrenLabelList(list);
-// List<Integer> list2 = new ArrayList<>();
-// for (TreeIntegerNode value : childrenLabelList.values()) {
-// if(value.getHasChildren()){
-// list2.add(value.getId());
-// }
-// }
-// Map<Integer, TreeIntegerNode> childrenLabelList2 = baseMapper.getChildrenLabelList(list2);
-// // 合并集合
-// labelList.putAll(childrenLabelList);
-// labelList.putAll(childrenLabelList2);
-// }
-// // 处理并返回
-// return NodeTreeUtil.getNodeTree(labelList);
-// }
-
- @Override
- public Object getLabelList(LabelVO label) {
- // 使用Optional避免空指针异常
- Optional<Map<Integer, TreeIntegerNode>> labelListOptional = Optional.ofNullable(baseMapper.getLabelList(label));
-
- if (!labelListOptional.isPresent()) {
- return null; // 返回空Map代替null
- }
-
- Map<Integer, TreeIntegerNode> labelList = labelListOptional.get();
- List<Integer> list = new ArrayList<>();
-
- // 遍历,筛选有子节点的标签
- labelList.forEach((id, treeNode) -> {
- if (treeNode.getHasChildren()) {
- list.add(id);
- }
- });
-
- if (!list.isEmpty()) {
- // 使用批量查询以提高性能
- Map<Integer, TreeIntegerNode> childrenLabelList = baseMapper.getChildrenLabelList(list);
-
- List<Integer> list2 = new ArrayList<>();
- // 筛选出有子节点的标签
- childrenLabelList.values().forEach(value -> {
- if(value.getHasChildren()){
- list2.add(value.getId());
- }
- });
-
- // 避免重复查询,直接合并结果
- labelList.putAll(childrenLabelList);
-
- if (!list2.isEmpty()) {
- // 如果有第二层子节点,进行查询并合并
- Map<Integer, TreeIntegerNode> childrenLabelList2 = baseMapper.getChildrenLabelList(list2);
- labelList.putAll(childrenLabelList2);
- }
- }
-
- // 处理并返回标签树
- return NodeTreeUtil.getNodeTree(labelList); // 假设NodeTreeUtil.getNodeTree已做空值检查
- }
-
- @Override
- public List<TreeIntegerNode> tree(LabelVO label) {
- Map<Integer, TreeIntegerNode> labelTreeList = baseMapper.getLabelTreeList(label);
- List<TreeIntegerNode> nodeTree = NodeTreeUtil.getNodeTree(labelTreeList);
- nodeTree.forEach(node -> recursion(node));
- return nodeTree;
- }
-
- private void recursion(TreeIntegerNode node) {
- if (node.getChildren() != null && node.getChildren().size() > 0) {
-// BigDecimal bigDecimal = BigDecimal.valueOf(0);
-// node.setCount(node.getChildren().stream().map(item -> {
-// bigDecimal.add(BigDecimal.valueOf(item.getCount()));
-// }));
- node.getChildren().forEach(node2 -> recursion(node2));
- } else {
- node.setChildren(null);
- }
- }
-
- /**
- * 查询人员标签(不包含人这一级)
- * @param label
- * @return
- */
- @Override
- public List<TreeIntegerNode> getPersonLabelList(LabelVO label) {
- Map<Integer, TreeIntegerNode> labelTreeList = baseMapper.getPersonLabelList(label);
- List<TreeIntegerNode> nodeTree = NodeTreeUtil.getNodeTree(labelTreeList);
- nodeTree.forEach(node -> recursion(node));
- return nodeTree;
- }
-}
diff --git a/src/main/java/org/springblade/modules/label/vo/LabelVO.java b/src/main/java/org/springblade/modules/label/vo/LabelVO.java
deleted file mode 100644
index f4ee85d..0000000
--- a/src/main/java/org/springblade/modules/label/vo/LabelVO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.vo;
-
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 标签管理 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class LabelVO extends LabelEntity {
- private static final long serialVersionUID = 1L;
-
- private Integer num;
-}
diff --git a/src/main/java/org/springblade/modules/label/wrapper/LabelWrapper.java b/src/main/java/org/springblade/modules/label/wrapper/LabelWrapper.java
deleted file mode 100644
index 6ba76d0..0000000
--- a/src/main/java/org/springblade/modules/label/wrapper/LabelWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.label.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.vo.LabelVO;
-import java.util.Objects;
-
-/**
- * 标签管理 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class LabelWrapper extends BaseEntityWrapper<LabelEntity, LabelVO> {
-
- public static LabelWrapper build() {
- return new LabelWrapper();
- }
-
- @Override
- public LabelVO entityVO(LabelEntity label) {
- LabelVO labelVO = Objects.requireNonNull(BeanUtil.copy(label, LabelVO.class));
-
- //User createUser = UserCache.getUser(label.getCreateUser());
- //User updateUser = UserCache.getUser(label.getUpdateUser());
- //labelVO.setCreateUserName(createUser.getName());
- //labelVO.setUpdateUserName(updateUser.getName());
-
- return labelVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/controller/MessageRecordController.java b/src/main/java/org/springblade/modules/messageRecord/controller/MessageRecordController.java
deleted file mode 100644
index 57cbc6b..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/controller/MessageRecordController.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import org.springblade.modules.messageRecord.service.IMessageRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.List;
-
-/**
- * 消息记录表 控制器
- *
- * @author BladeX
- * @since 2024-01-18
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("messageRecord/messageRecord")
-@Api(value = "消息记录表", tags = "消息记录表接口")
-public class MessageRecordController extends BladeController {
-
- private final IMessageRecordService messageRecordService;
-
- /**
- * 消息记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入messageRecord")
- public R<MessageRecord> detail(MessageRecord messageRecord) {
- MessageRecord detail = messageRecordService.getOne(Condition.getQueryWrapper(messageRecord));
- return R.data(detail);
- }
- /**
- * 消息记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入messageRecord")
- public R<IPage<MessageRecord>> list(MessageRecord messageRecord, Query query) {
- IPage<MessageRecord> pages = messageRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(messageRecord));
- return R.data(pages);
- }
-
- /**
- * 消息记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入messageRecord")
- public R<IPage<MessageRecordVO>> page(MessageRecordVO messageRecord, Query query) {
- IPage<MessageRecordVO> pages = messageRecordService.selectMessageRecordPage(Condition.getPage(query), messageRecord);
- return R.data(pages);
- }
-
- /**
- * 消息记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入messageRecord")
- public R save(@Valid @RequestBody MessageRecordVO messageRecord) {
- return R.status(messageRecordService.save(messageRecord));
- }
-
- /**
- * 消息记录表 自定义新增
- */
- @PostMapping("/customizeSave")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入messageRecord")
- public R customizeSave(@Valid @RequestBody MessageRecordVO messageRecord) {
- return R.status(messageRecordService.customizeSave(messageRecord));
- }
-
- /**
- * 消息记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入messageRecord")
- public R update(@Valid @RequestBody MessageRecord messageRecord) {
- return R.status(messageRecordService.updateById(messageRecord));
- }
-
- /**
- * 消息记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入messageRecord")
- public R submit(@Valid @RequestBody MessageRecord messageRecord) {
- return R.status(messageRecordService.saveOrUpdate(messageRecord));
- }
-
- /**
- * 消息记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(messageRecordService.deleteLogic(Func.toLongList(ids)));
- }
-
- /**
- * 发送消息
- */
- @PostMapping("/sendMessage")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R sendMessage(@RequestParam String id) {
- return R.status(messageRecordService.sendMessage(id));
- }
-
- /**
- * 消息记录表 分页
- */
- @GetMapping("/getUnreadList")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入meseRecord")
- public R<List<MessageRecordVO>> getUnreadList() {
- List<MessageRecordVO> pages = messageRecordService.getUnreadList();
- return R.data(pages);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/controller/MessageUserController.java b/src/main/java/org/springblade/modules/messageRecord/controller/MessageUserController.java
deleted file mode 100644
index a5b174c..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/controller/MessageUserController.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.springblade.modules.messageRecord.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.service.IMessageUserService;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import org.springblade.modules.messageRecord.vo.MessageUserVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("messageUser/messageUser")
-public class MessageUserController extends BladeController {
-
- private final IMessageUserService messageUserService;
-
- @GetMapping("/getPage")
- public R<IPage<MessageUserVO>> page(MessageUserVO messageUserVO, Query query) {
- IPage<MessageUserVO> pages = messageUserService.getPage(Condition.getPage(query), messageUserVO);
- return R.data(pages);
- }
-
- /**
- * 消息记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入messageRecord")
- public R update(@Valid @RequestBody MessageUser messageUser) {
- return R.status(messageUserService.updateById(messageUser));
- }
-
- @PostMapping("updateIsReadStatus")
- public R updateIsReadStatus(String ids,String isRead){
- Boolean res = messageUserService.updateIsReadStatus(ids,isRead);
- return R.status(res);
- }
-
- @GetMapping("/getMessage")
- public R<IPage<MessageUserVO>> getMessage(MessageUserVO messageUserVO, Query query) {
- IPage<MessageUserVO> pages = messageUserService.getMessagePage(Condition.getPage(query), messageUserVO);
- return R.data(pages);
- }
-
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/entity/MessageRecord.java b/src/main/java/org/springblade/modules/messageRecord/entity/MessageRecord.java
deleted file mode 100644
index a582a14..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/entity/MessageRecord.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-
-/**
- * 消息记录表 实体类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-@Data
-@TableName("blade_message_record")
-@ApiModel(value = "MessageRecord对象", description = "消息记录表")
-public class MessageRecord extends BaseEntity {
- private static final long serialVersionUID = 1L;
-
- //接收对象
- private String receiver;
-
- /**
- * 消息发送类型(1、站内信;2、邮件;3、短信)
- */
- @ApiModelProperty(value = "消息发送类型(1、站内信;2、邮件;3、短信)")
- private String type;
- /**
- * 消息来源(1、系统消息;2、用户消息)
- */
- @ApiModelProperty(value = "消息来源(1、系统消息;2、用户消息)")
- private String messageResource;
- /**
- * 标题
- */
- @ApiModelProperty(value = "标题")
- private String title;
- /**
- * 内容
- */
- @ApiModelProperty(value = "内容")
- private String content;
-
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/entity/MessageUser.java b/src/main/java/org/springblade/modules/messageRecord/entity/MessageUser.java
deleted file mode 100644
index 731261f..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/entity/MessageUser.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.springblade.modules.messageRecord.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 用户消息表
- */
-@Data
-@TableName("blade_message_user")
-public class MessageUser implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 消息记录表主键 */
- @ApiModelProperty(value = "消息记录表主键", example = "")
- @TableField("message_record_id")
- private Long messageRecordId;
-
- /** 是否已读(1、已读;2、未读) */
- @ApiModelProperty(value = "是否已读(1、已读;2、未读)", example = "")
- @TableField("is_read")
- private String isRead;
-
- /** 用户id */
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private String userId;
-
- /** 消息类型 */
- @ApiModelProperty(value = "消息类型", example = "")
- @TableField("type")
- private String type;
-
- /** 邮箱 */
- @ApiModelProperty(value = "邮箱", example = "")
- @TableField("email")
- private String email;
-
- /** 电话号码 */
- @ApiModelProperty(value = "电话号码", example = "")
- @TableField("phone")
- private String phone;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 1:待发送,2.:发送成功 3:发送失败 */
- @ApiModelProperty(value = "1:待发送,2.:发送成功 3:发送失败", example = "")
- @TableField("send_status")
- private String sendStatus;
-
- /** 重试次数 */
- @ApiModelProperty(value = "重试次数", example = "")
- @TableField("retry_number")
- private Integer retryNumber;
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.java b/src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.java
deleted file mode 100644
index 7a3da57..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 消息记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-18
- */
-public interface MessageRecordMapper extends BaseMapper<MessageRecord> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param messageRecord
- * @return
- */
- List<MessageRecordVO> selectMessageRecordPage(IPage page,@Param("vo") MessageRecordVO messageRecord);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.xml b/src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.xml
deleted file mode 100644
index f508b36..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.messageRecord.mapper.MessageRecordMapper">
-
-
- <select id="selectMessageRecordPage" resultType="org.springblade.modules.messageRecord.vo.MessageRecordVO">
- select bmr.*,GROUP_CONCAT(bu.real_name) userName
- from blade_message_record bmr
- LEFT JOIN blade_user bu on bmr.receiver like CONCAT('%',bu.id,'%')
- where bmr.is_deleted = 0
- <if test="vo.type != null and vo.type !=''">
- and bmr.type LIKE CONCAT('%',#{vo.type},'%')
- </if>
- <if test="vo.startTime!=null and vo.startTime!=''">
- and bmr.create_time>=#{vo.startTime}
- </if>
- <if test="vo.endTime!=null and vo.endTime!=''">
- and bmr.create_time<=#{vo.endTime}
- </if>
- <if test="vo.title != null and vo.title != ''">
- and bmr.title LIKE CONCAT('%',#{vo.title},'%')
- </if>
- <if test="vo.createUser != null and vo.createUser != ''">
- and bmr.create_user = #{vo.createUser}
- </if>
- <if test="vo.messageResource != null and vo.messageResource !=''">
- and bmr.message_resource = #{vo.messageResource}
- </if>
- GROUP BY bmr.id
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.java b/src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.java
deleted file mode 100644
index b1381b4..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import org.springblade.modules.messageRecord.vo.MessageUserVO;
-
-import java.util.List;
-
-/**
- * 消息记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-18
- */
-public interface MessageUserMapper extends BaseMapper<MessageUser> {
-
-
- List<MessageUserVO> getPage(IPage<MessageUserVO> page, @Param("vo") MessageUserVO messageUserVO);
-
- /**
- * 我发送的消息
- * @param page
- * @param messageUserVO
- * @return
- */
- List<MessageUserVO> getMySendMessage(IPage<MessageUserVO> page, @Param("vo") MessageUserVO messageUserVO);
-
- /**
- * 我收到的消息
- * @param page
- * @param messageUserVO
- * @return
- */
- List<MessageUserVO> getMyReceiveMessage(IPage<MessageUserVO> page, @Param("vo") MessageUserVO messageUserVO);
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.xml b/src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.xml
deleted file mode 100644
index 373e570..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.messageRecord.mapper.MessageUserMapper">
-
-
- <select id="getPage" resultType="org.springblade.modules.messageRecord.vo.MessageUserVO">
-
- SELECT
- bmu.*,
- bmr.title,bmr.content,bmr.create_time as sendTime,bmr.create_user as sendUserId,
- bu.real_name as sendUserName,
- bu1.real_name as receiveUserName
- FROM blade_message_user bmu
- LEFT JOIN blade_message_record bmr ON bmr.id = bmu.message_record_id
- LEFT JOIN blade_user bu ON bu.id = bmr.create_user
- LEFT JOIN blade_user bu1 ON bu1.id = bmu.user_id
- where 1=1
- <if test="vo.userId != null and vo.userId !=''">
- and bmu.user_id = #{vo.userId}
- </if>
- <if test="vo.type != null and vo.type !=''">
- AND bmu.type LIKE CONCAT('%',#{vo.type},'%')
- </if>
-
- <if test="vo.title != null and vo.title !=''">
- AND bmr.title LIKE CONCAT('%',#{vo.title},'%')
- </if>
-
- <if test="vo.sendStatus != null and vo.sendStatus !=''">
- AND bmu.send_status = #{vo.sendStatus}
- </if>
-
- <if test="vo.content != null and vo.content !=''">
- AND bmr.content LIKE CONCAT('%',#{vo.content},'%')
- </if>
- <if test="vo.sendUserId != null and vo.sendUserId !=''">
- AND bmr.create_user = #{vo.sendUserId}
- </if>
- <if test="vo.sendUserName != null and vo.sendUserName !=''">
- AND bu.real_name LIKE CONCAT('%',#{vo.sendUserName},'%')
- </if>
- <if test="vo.receiveUserName != null and vo.receiveUserName !=''">
- AND bu1.real_name LIKE CONCAT('%',#{vo.receiveUserName},'%')
- </if>
- ORDER BY bmu.create_time DESC
- </select>
-
-
- <select id="getMySendMessage" resultType="org.springblade.modules.messageRecord.vo.MessageUserVO">
- SELECT
- bmu.*,
- bmr.title,bmr.content,bmr.create_time as time,
- bu.real_name as userName,
- bd.dept_name as deptName,
- bd.id as deptId
- FROM blade_message_user bmu
- LEFT JOIN blade_message_record bmr ON bmr.id = bmu.message_record_id
- LEFT JOIN blade_user bu ON bu.id = bmu.user_id
- LEFT JOIN blade_dept bd ON bu.dept_id = bd.id
- where 1=1
- <if test="vo.userId != null and vo.userId !=''">
- and bmr.create_user = #{vo.userId}
- </if>
- <if test="vo.type != null and vo.type !=''">
- AND bmu.type LIKE CONCAT('%',#{vo.type},'%')
- </if>
-
- <if test="vo.title != null and vo.title !='' ">
- and bmr.title LIKE CONCAT('%',#{vo.title},'%')
- </if>
- <if test="vo.startTime!=null and vo.startTime!=''">
- AND date_format(bmr.create_time,'%Y-%m-%d')>= #{vo.startTime}
- </if>
- <if test="vo.endTime!=null and vo.endTime!=''">
- AND date_format(bmr.create_time,'%Y-%m-%d')<= #{vo.endTime}
- </if>
-
- ORDER BY bmu.create_time DESC
- </select>
- <select id="getMyReceiveMessage" resultType="org.springblade.modules.messageRecord.vo.MessageUserVO">
- SELECT
- bmu.id,
- bmu.message_record_id,
- bmu.is_read,
- bmu.type,
- bmu.email,
- bmu.phone,
- bmu.create_time,
- bmu.update_time,
- bmr.title,
- bmr.content,
- bmr.create_time as time,
- bmr.create_user as userId,
- bu.real_name as userName,
- bd.dept_name as deptName,
- bd.id as deptId
- FROM blade_message_user bmu
- LEFT JOIN blade_message_record bmr ON bmr.id = bmu.message_record_id
- LEFT JOIN blade_user bu ON bu.id = bmr.create_user
- LEFT JOIN blade_dept bd ON bu.dept_id = bd.id
- where 1=1
- <if test="vo.userId != null and vo.userId !=''">
- and bmu.user_id = #{vo.userId}
- </if>
- <if test="vo.type != null and vo.type !=''">
- AND bmu.type LIKE CONCAT('%',#{vo.type},'%')
- </if>
- <if test="vo.title != null and vo.title !='' ">
- and bmr.title LIKE CONCAT('%',#{vo.title},'%')
- </if>
-
- <if test="vo.startTime!=null and vo.startTime!=''">
- AND date_format(bmr.create_time,'%Y-%m-%d')>= #{vo.startTime}
- </if>
- <if test="vo.endTime!=null and vo.endTime!=''">
- AND date_format(bmr.create_time,'%Y-%m-%d')<= #{vo.endTime}
- </if>
- <if test="vo.isRead != null and vo.isRead !=''">
- AND is_read = #{vo.isRead}
- </if>
-
- ORDER BY bmu.create_time DESC
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/messageRecord/service/IMessageRecordService.java b/src/main/java/org/springblade/modules/messageRecord/service/IMessageRecordService.java
deleted file mode 100644
index f636433..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/service/IMessageRecordService.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.service;
-
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 消息记录表 服务类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-public interface IMessageRecordService extends BaseService<MessageRecord> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param messageRecord
- * @return
- */
- IPage<MessageRecordVO> selectMessageRecordPage(IPage<MessageRecordVO> page, MessageRecordVO messageRecord);
-
-
- Boolean customizeSave(MessageRecordVO messageRecord);
-
- Boolean sendMessage(String id);
-
- List<MessageRecordVO> getUnreadList();
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/service/IMessageUserService.java b/src/main/java/org/springblade/modules/messageRecord/service/IMessageUserService.java
deleted file mode 100644
index 0f48f16..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/service/IMessageUserService.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.springblade.modules.messageRecord.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.vo.MessageUserVO;
-
-public interface IMessageUserService extends IService<MessageUser> {
- IPage<MessageUserVO> getPage(IPage<MessageUserVO> page, MessageUserVO messageUserVO);
-
- Boolean updateIsReadStatus(String ids, String isRead);
-
- IPage<MessageUserVO> getMessagePage(IPage<MessageUserVO> page, MessageUserVO messageUserVO);
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/service/impl/MessageRecordServiceImpl.java b/src/main/java/org/springblade/modules/messageRecord/service/impl/MessageRecordServiceImpl.java
deleted file mode 100644
index e0d0cf9..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/service/impl/MessageRecordServiceImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import liquibase.pro.packaged.S;
-import lombok.AllArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.email.service.IEmailAccountService;
-import org.springblade.modules.email.service.IEmailService;
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.service.IMessageUserService;
-import org.springblade.modules.messageRecord.vo.MessageRecordVO;
-import org.springblade.modules.messageRecord.mapper.MessageRecordMapper;
-import org.springblade.modules.messageRecord.service.IMessageRecordService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.mail.MessagingException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 消息记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-@Service
-@AllArgsConstructor
-public class MessageRecordServiceImpl extends BaseServiceImpl<MessageRecordMapper, MessageRecord> implements IMessageRecordService {
-
- private final IMessageUserService messageUserService;
- private final IUserService userService;
- private final IEmailAccountService emailAccountService;
-
- @Override
- public IPage<MessageRecordVO> selectMessageRecordPage(IPage<MessageRecordVO> page, MessageRecordVO messageRecord) {
- return page.setRecords(baseMapper.selectMessageRecordPage(page, messageRecord));
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean customizeSave(MessageRecordVO messageRecord) {
- if (StringUtils.isBlank(messageRecord.getType())) {
- return false;
- }
- List<User> userList = new ArrayList();
- if (messageRecord.getMessageResource().equals("1")) {
- //系统消息(receiveUser指定的是部门,所以要通过部门去查人)
- userList = userService.getUserListByDeptIds(messageRecord.getReceiver());
- } else if (messageRecord.getMessageResource().equals("2")) {
- //用户消息(receiveUser指定的是人)
- userList = userService.getUserListByIds(messageRecord.getReceiver());
- }
-
- //保存消息记录
- boolean saveRecord = save(messageRecord);
- List<MessageUser> messageUserList = new ArrayList<>();
- userList.forEach(user -> {
- List<String> longs = Func.toStrList(messageRecord.getType());
- for (String type : longs) {
- MessageUser messageUser = new MessageUser();
- messageUser.setUserId(user.getId().toString());
- messageUser.setMessageRecordId(messageRecord.getId());
- messageUser.setType(type);
- messageUser.setCreateTime(DateUtil.now());
- messageUser.setUpdateTime(DateUtil.now());
- messageUser.setSendStatus("1");
- if (messageUser.getType().indexOf("1") > -1) {
- messageUser.setSendStatus("2");
- } else if (messageUser.getType().indexOf("2") > -1) {
- messageUser.setEmail(user.getEmail());
- } else if (messageUser.getType().indexOf("3") > -1) {
- messageUser.setSendStatus("2");
- messageUser.setPhone(user.getPhone());
- }
- messageUserList.add(messageUser);
- }
- });
- //在message_user表里存数据
- boolean saveBatch = messageUserService.saveBatch(messageUserList);
-
- if (saveBatch && saveRecord) {
- if (messageRecord.getType().indexOf("2") > -1) {
- Boolean aBoolean = emailAccountService.sendMessageUserEmail(messageRecord.getTitle(), messageRecord.getContent(), messageUserList);
- // 邮件发送成功,更新邮件状态
- if (aBoolean) {
- List<MessageUser> collect = messageUserList.stream().filter(e -> StringUtil.isNotBlank(e.getEmail())).collect(Collectors.toList());
- messageUserService.updateBatchById(collect);
- }
- }
-
- if (messageRecord.getType().indexOf("3") > -1) {
- return true;
- }
- }
- return saveBatch && saveRecord;
- }
-
- @Override
- public Boolean sendMessage(String id) {
-
- //查询MessageRecord表里的数据
- MessageRecord messageRecord = getById(id);
-
- //查询MessageUser表里的数据
- List<MessageUser> messageUserList = messageUserService.list(new QueryWrapper<MessageUser>().eq("message_record_id", id));
-
- if (messageRecord.getType().indexOf("2") > -1) {
- return emailAccountService.sendMessageUserEmail(messageRecord.getTitle(), messageRecord.getContent(), messageUserList);
- }
-
- if (messageRecord.getType().indexOf("3") > -1) {
- return true;
- }
-
- return true;
- }
-
- @Override
- public List<MessageRecordVO> getUnreadList() {
- try {
- List<MessageRecordVO> aa = emailAccountService.getUnreadList();
- return aa;
- } catch (MessagingException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/service/impl/MessageUserServiceImpl.java b/src/main/java/org/springblade/modules/messageRecord/service/impl/MessageUserServiceImpl.java
deleted file mode 100644
index 87e87ca..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/service/impl/MessageUserServiceImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.springblade.modules.messageRecord.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-import org.springblade.modules.messageRecord.mapper.MessageUserMapper;
-import org.springblade.modules.messageRecord.service.IMessageUserService;
-import org.springblade.modules.messageRecord.vo.MessageUserVO;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-@Service
-public class MessageUserServiceImpl extends ServiceImpl<MessageUserMapper, MessageUser> implements IMessageUserService {
- @Override
- public IPage<MessageUserVO> getPage(IPage<MessageUserVO> page, MessageUserVO messageUserVO) {
- return page.setRecords(baseMapper.getPage(page, messageUserVO));
- }
-
- @Override
- public Boolean updateIsReadStatus(String ids, String isRead) {
-
- List<MessageUser> messageUserList = baseMapper.selectBatchIds(Arrays.asList(ids));
-
- messageUserList.forEach(messageUser ->{
- messageUser.setUpdateTime(DateUtil.now());
- messageUser.setIsRead(isRead);
- });
-
- boolean b = updateBatchById(messageUserList);
- return b;
- }
-
- @Override
- public IPage<MessageUserVO> getMessagePage(IPage<MessageUserVO> page, MessageUserVO messageUserVO) {
- List<MessageUserVO> list = new ArrayList<>();
-
- if (messageUserVO.getMessageType().equals("send")){
- //我发送的
- list = baseMapper.getMySendMessage(page,messageUserVO);
-
- }else if (messageUserVO.getMessageType().equals("receive")){
- //我收到的
- list = baseMapper.getMyReceiveMessage(page,messageUserVO);
- }
- page.setRecords(list);
- return page;
- }
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/vo/MessageRecordVO.java b/src/main/java/org/springblade/modules/messageRecord/vo/MessageRecordVO.java
deleted file mode 100644
index 15b9e1f..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/vo/MessageRecordVO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.messageRecord.vo;
-
-import org.springblade.modules.messageRecord.entity.MessageRecord;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 消息记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-18
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class MessageRecordVO extends MessageRecord {
- private static final long serialVersionUID = 1L;
-
- private String startTime;
-
- private String endTime;
-
- private String userName;
-}
diff --git a/src/main/java/org/springblade/modules/messageRecord/vo/MessageUserVO.java b/src/main/java/org/springblade/modules/messageRecord/vo/MessageUserVO.java
deleted file mode 100644
index 6bbe2d0..0000000
--- a/src/main/java/org/springblade/modules/messageRecord/vo/MessageUserVO.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.springblade.modules.messageRecord.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.modules.messageRecord.entity.MessageUser;
-
-@Data
-public class MessageUserVO extends MessageUser {
-
- private String title;
-
- private String content;
-
- private String messageType;
-
- //取的是记录表里的创建时间
- private String time;
-
- private String userName;
- private String deptId;
- private String deptName;
-
- private String startTime;
- private String endTime;
- @ApiModelProperty(value = "发送人", example = "")
- private String sendUserName;
- @ApiModelProperty(value = "接收人", example = "")
- private String receiveUserName;
-
- private Long sendUserId;
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/controller/NursingCheckInController.java b/src/main/java/org/springblade/modules/nursingCheckIn/controller/NursingCheckInController.java
deleted file mode 100644
index fe5cc82..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/controller/NursingCheckInController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
-import org.springblade.modules.nursingCheckIn.wrapper.NursingCheckInWrapper;
-import org.springblade.modules.nursingCheckIn.service.INursingCheckInService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 护学打卡 控制器
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-nursingCheckIn/nursingCheckIn")
-@Api(value = "护学打卡", tags = "护学打卡接口")
-public class NursingCheckInController extends BladeController {
-
- private final INursingCheckInService nursingCheckInService;
-
- /**
- * 护学打卡 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入nursingCheckIn")
- public R<NursingCheckInVO> detail(NursingCheckInEntity nursingCheckIn) {
- NursingCheckInEntity detail = nursingCheckInService.getOne(Condition.getQueryWrapper(nursingCheckIn));
- return R.data(NursingCheckInWrapper.build().entityVO(detail));
- }
- /**
- * 护学打卡 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入nursingCheckIn")
- public R<IPage<NursingCheckInVO>> list(NursingCheckInEntity nursingCheckIn, Query query) {
- IPage<NursingCheckInEntity> pages = nursingCheckInService.page(Condition.getPage(query), Condition.getQueryWrapper(nursingCheckIn));
- return R.data(NursingCheckInWrapper.build().pageVO(pages));
- }
-
- /**
- * 护学打卡 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入nursingCheckIn")
- public R<IPage<NursingCheckInVO>> page(NursingCheckInVO nursingCheckIn, Query query) {
- IPage<NursingCheckInVO> pages = nursingCheckInService.selectNursingCheckInPage(Condition.getPage(query), nursingCheckIn);
- return R.data(pages);
- }
-
- /**
- * 护学打卡 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入nursingCheckIn")
- public R save(@Valid @RequestBody NursingCheckInEntity nursingCheckIn) {
- return R.status(nursingCheckInService.save(nursingCheckIn));
- }
-
- /**
- * 护学打卡 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入nursingCheckIn")
- public R update(@Valid @RequestBody NursingCheckInEntity nursingCheckIn) {
- return R.status(nursingCheckInService.updateById(nursingCheckIn));
- }
-
- /**
- * 护学打卡 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入nursingCheckIn")
- public R submit(@Valid @RequestBody NursingCheckInEntity nursingCheckIn) {
- return R.status(nursingCheckInService.saveOrUpdate(nursingCheckIn));
- }
-
- /**
- * 护学打卡 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(nursingCheckInService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/dto/NursingCheckInDTO.java b/src/main/java/org/springblade/modules/nursingCheckIn/dto/NursingCheckInDTO.java
deleted file mode 100644
index 388ae01..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/dto/NursingCheckInDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.dto;
-
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 护学打卡 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class NursingCheckInDTO extends NursingCheckInEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/entity/NursingCheckInEntity.java b/src/main/java/org/springblade/modules/nursingCheckIn/entity/NursingCheckInEntity.java
deleted file mode 100644
index f3a65c4..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/entity/NursingCheckInEntity.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 护学打卡 实体类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Data
-@TableName("jczz_nursing_check_in")
-@ApiModel(value = "NursingCheckIn对象", description = "护学打卡")
-public class NursingCheckInEntity {
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 定位地址 */
- @ApiModelProperty(value = "定位地址", example = "")
- @TableField("location")
- private String location;
-
- /** 家长名称 */
- @ApiModelProperty(value = "家长名称", example = "")
- @TableField("name")
- private String name;
-
- /** 家长电话 */
- @ApiModelProperty(value = "家长电话", example = "")
- @TableField("phone")
- private String phone;
-
- /** 年级与班级 */
- @ApiModelProperty(value = "年级与班级", example = "")
- @TableField("grade_and_class")
- private String gradeAndClass;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("images")
- private String images;
-
- /** 场所id */
- @ApiModelProperty(value = "场所id", example = "")
- @TableField("place_id")
- private Long placeId;
-
- /** 1:民警 2:家长 */
- @ApiModelProperty(value = "1:民警 2:家长", example = "")
- @TableField("type")
- private String type;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("longitude")
- private String longitude;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("latitude")
- private String latitude;
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.java b/src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.java
deleted file mode 100644
index 6113dcf..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.mapper;
-
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 护学打卡 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-18
- */
-public interface NursingCheckInMapper extends BaseMapper<NursingCheckInEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param nursingCheckIn
- * @return
- */
- List<NursingCheckInVO> selectNursingCheckInPage(IPage page, NursingCheckInVO nursingCheckIn);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.xml b/src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.xml
deleted file mode 100644
index 2e09646..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.nursingCheckIn.mapper.NursingCheckInMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="nursingCheckInResultMap" type="org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity">
- </resultMap>
-
-
- <select id="selectNursingCheckInPage" resultMap="nursingCheckInResultMap">
- select * from jczz_nursing_check_in
- </select>
-
-
- <resultMap type="org.springblade.modules.nursingCheckIn.dto.NursingCheckInDTO" id="NursingCheckInDTOResult">
- <result property="id" column="id" />
- <result property="createUser" column="create_user" />
- <result property="location" column="location" />
- <result property="name" column="name" />
- <result property="phone" column="phone" />
- <result property="gradeAndClass" column="grade_and_class" />
- <result property="images" column="images" />
- <result property="placeId" column="place_id" />
- <result property="type" column="type" />
- </resultMap>
-
- <sql id="selectNursingCheckIn">
- select
- id,
- create_user,
- location,
- name,
- phone,
- grade_and_class,
- images,
- place_id,
- type
- from
- jczz_nursing_check_in
- </sql>
-
-<!-- <select id="selectNursingCheckInById" parameterType="long" resultMap="NursingCheckInDTOResult">-->
-<!-- <include refid="selectNursingCheckIn"/>-->
-<!-- where-->
-<!-- id = #{id}-->
-<!-- </select>-->
-
-<!-- <select id="selectNursingCheckInList" parameterType="org.springblade.modules..dto.NursingCheckInDTO" resultMap="NursingCheckInDTOResult">-->
-<!-- <include refid="selectNursingCheckIn"/>-->
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>-->
-<!-- <if test="createUser != null "> and create_user = #{createUser}</if>-->
-<!-- <if test="location != null and location != ''"> and location = #{location}</if>-->
-<!-- <if test="name != null and name != ''"> and name = #{name}</if>-->
-<!-- <if test="phone != null and phone != ''"> and phone = #{phone}</if>-->
-<!-- <if test="gradeAndClass != null and gradeAndClass != ''"> and grade_and_class = #{gradeAndClass}</if>-->
-<!-- <if test="images != null and images != ''"> and images = #{images}</if>-->
-<!-- <if test="placeId != null "> and place_id = #{placeId}</if>-->
-<!-- <if test="type != null and type != ''"> and type = #{type}</if>-->
-<!-- </where>-->
-<!-- </select>-->
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/service/INursingCheckInService.java b/src/main/java/org/springblade/modules/nursingCheckIn/service/INursingCheckInService.java
deleted file mode 100644
index 34ef802..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/service/INursingCheckInService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 护学打卡 服务类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-public interface INursingCheckInService extends IService<NursingCheckInEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param nursingCheckIn
- * @return
- */
- IPage<NursingCheckInVO> selectNursingCheckInPage(IPage<NursingCheckInVO> page, NursingCheckInVO nursingCheckIn);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/service/impl/NursingCheckInServiceImpl.java b/src/main/java/org/springblade/modules/nursingCheckIn/service/impl/NursingCheckInServiceImpl.java
deleted file mode 100644
index 52254d3..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/service/impl/NursingCheckInServiceImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
-import org.springblade.modules.nursingCheckIn.mapper.NursingCheckInMapper;
-import org.springblade.modules.nursingCheckIn.service.INursingCheckInService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 护学打卡 服务实现类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Service
-public class NursingCheckInServiceImpl extends ServiceImpl<NursingCheckInMapper, NursingCheckInEntity> implements INursingCheckInService {
-
- @Override
- public IPage<NursingCheckInVO> selectNursingCheckInPage(IPage<NursingCheckInVO> page, NursingCheckInVO nursingCheckIn) {
- return page.setRecords(baseMapper.selectNursingCheckInPage(page, nursingCheckIn));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/vo/NursingCheckInVO.java b/src/main/java/org/springblade/modules/nursingCheckIn/vo/NursingCheckInVO.java
deleted file mode 100644
index b11e737..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/vo/NursingCheckInVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.vo;
-
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 护学打卡 视图实体类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class NursingCheckInVO extends NursingCheckInEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/nursingCheckIn/wrapper/NursingCheckInWrapper.java b/src/main/java/org/springblade/modules/nursingCheckIn/wrapper/NursingCheckInWrapper.java
deleted file mode 100644
index 296d033..0000000
--- a/src/main/java/org/springblade/modules/nursingCheckIn/wrapper/NursingCheckInWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.nursingCheckIn.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
-import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
-import java.util.Objects;
-
-/**
- * 护学打卡 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-18
- */
-public class NursingCheckInWrapper extends BaseEntityWrapper<NursingCheckInEntity, NursingCheckInVO> {
-
- public static NursingCheckInWrapper build() {
- return new NursingCheckInWrapper();
- }
-
- @Override
- public NursingCheckInVO entityVO(NursingCheckInEntity nursingCheckIn) {
- NursingCheckInVO nursingCheckInVO = Objects.requireNonNull(BeanUtil.copy(nursingCheckIn, NursingCheckInVO.class));
-
- //User createUser = UserCache.getUser(nursingCheckIn.getCreateUser());
- //User updateUser = UserCache.getUser(nursingCheckIn.getUpdateUser());
- //nursingCheckInVO.setCreateUserName(createUser.getName());
- //nursingCheckInVO.setUpdateUserName(updateUser.getName());
-
- return nursingCheckInVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/controller/OwnersCommitteeController.java b/src/main/java/org/springblade/modules/ownersCommittee/controller/OwnersCommitteeController.java
deleted file mode 100644
index b031bfa..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/controller/OwnersCommitteeController.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
-import org.springblade.modules.ownersCommittee.wrapper.OwnersCommitteeWrapper;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 业委会表 控制器
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-ownersCommittee/ownersCommittee")
-@Api(value = "业委会表", tags = "业委会表接口")
-public class OwnersCommitteeController extends BladeController {
-
- private final IOwnersCommitteeService ownersCommitteeService;
-
- /**
- * 业委会表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入ownersCommittee")
- public R<OwnersCommitteeVO> detail(OwnersCommitteeEntity ownersCommittee) {
- OwnersCommitteeEntity detail = ownersCommitteeService.getOne(Condition.getQueryWrapper(ownersCommittee));
- return R.data(OwnersCommitteeWrapper.build().entityVO(detail));
- }
- /**
- * 业委会表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入ownersCommittee")
- public R<IPage<OwnersCommitteeVO>> list(OwnersCommitteeEntity ownersCommittee, Query query) {
- IPage<OwnersCommitteeEntity> pages = ownersCommitteeService.page(Condition.getPage(query), Condition.getQueryWrapper(ownersCommittee));
- return R.data(OwnersCommitteeWrapper.build().pageVO(pages));
- }
-
- /**
- * 业委会表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入ownersCommittee")
- public R<IPage<OwnersCommitteeVO>> page(OwnersCommitteeVO ownersCommittee, Query query) {
- IPage<OwnersCommitteeVO> pages = ownersCommitteeService.selectOwnersCommitteePage(Condition.getPage(query), ownersCommittee);
- return R.data(pages);
- }
-
- /**
- * 业委会表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入ownersCommittee")
- public R save(@Valid @RequestBody OwnersCommitteeEntity ownersCommittee) {
- return R.status(ownersCommitteeService.save(ownersCommittee));
- }
-
- /**
- * 业委会表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入ownersCommittee")
- public R update(@Valid @RequestBody OwnersCommitteeEntity ownersCommittee) {
- // 负责人修改了需要去更新负责人
- return R.status(ownersCommitteeService.updateOwnersCommittee(ownersCommittee));
- }
-
- /**
- * 业委会表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入ownersCommittee")
- public R submit(@Valid @RequestBody OwnersCommitteeEntity ownersCommittee) {
- return R.status(ownersCommitteeService.saveOrUpdateOwnersCommittee(ownersCommittee));
- }
-
- /**
- * 业委会表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(ownersCommitteeService.removeOwnersCommittee(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/controller/OwnersCommitteeMemberController.java b/src/main/java/org/springblade/modules/ownersCommittee/controller/OwnersCommitteeMemberController.java
deleted file mode 100644
index 5510f02..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/controller/OwnersCommitteeMemberController.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeMemberService;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeService;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeMemberVO;
-import org.springblade.modules.ownersCommittee.wrapper.OwnersCommitteeMemberWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 业委会成员表 控制器
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-ownersCommitteeMember/ownersCommitteeMember")
-@Api(value = "业委会成员表", tags = "业委会成员表接口")
-public class OwnersCommitteeMemberController extends BladeController {
-
- private final IOwnersCommitteeMemberService ownersCommitteeService;
-
- /**
- * 业委会成员表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入ownersCommittee")
- public R<OwnersCommitteeMemberVO> detail(OwnersCommitteeMemberEntity ownersCommittee) {
- OwnersCommitteeMemberEntity detail = ownersCommitteeService.getOne(Condition.getQueryWrapper(ownersCommittee));
- return R.data(OwnersCommitteeMemberWrapper.build().entityVO(detail));
- }
-
- /**
- * 业委会成员表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入ownersCommittee")
- public R<IPage<OwnersCommitteeMemberVO>> list(OwnersCommitteeMemberEntity ownersCommittee, Query query) {
- IPage<OwnersCommitteeMemberEntity> pages = ownersCommitteeService.page(Condition.getPage(query), Condition.getQueryWrapper(ownersCommittee));
- return R.data(OwnersCommitteeMemberWrapper.build().pageVO(pages));
- }
-
- /**
- * 业委会成员表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入ownersCommittee")
- public R<IPage<OwnersCommitteeMemberVO>> page(OwnersCommitteeMemberVO ownersCommittee, Query query) {
- IPage<OwnersCommitteeMemberVO> pages = ownersCommitteeService.selectOwnersCommitteeMemberPage(Condition.getPage(query), ownersCommittee);
- return R.data(pages);
- }
-
- /**
- * 业委会成员表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入ownersCommittee")
- public R save(@Valid @RequestBody OwnersCommitteeMemberEntity ownersCommittee) {
- return R.status(ownersCommitteeService.save(ownersCommittee));
- }
-
- /**
- * 业委会成员表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入ownersCommittee")
- public R update(@Valid @RequestBody OwnersCommitteeMemberEntity ownersCommittee) {
- return R.status(ownersCommitteeService.updateById(ownersCommittee));
- }
-
- /**
- * 业委会成员表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入ownersCommittee")
- public R submit(@Valid @RequestBody OwnersCommitteeMemberEntity ownersCommittee) {
- long count = ownersCommitteeService.count(Wrappers.<OwnersCommitteeMemberEntity>lambdaQuery()
- .eq(OwnersCommitteeMemberEntity::getAreaId, ownersCommittee.getAreaId())
- .eq(OwnersCommitteeMemberEntity::getUserId, ownersCommittee.getUserId()));
- if (count > 1 && ownersCommittee.getId() != null) {
- return R.fail("该业委会成员已存在");
- }
- long number = ownersCommitteeService.count(Wrappers.<OwnersCommitteeMemberEntity>lambdaQuery()
- .eq(OwnersCommitteeMemberEntity::getOwnersId, ownersCommittee.getOwnersId()));
- IOwnersCommitteeService bean = SpringUtils.getBean(IOwnersCommitteeService.class);
- OwnersCommitteeEntity committeeEntity = bean.getById(ownersCommittee.getOwnersId());
- committeeEntity.setPeopleTotal(String.valueOf(number));
- bean.updateById(committeeEntity);
- return R.status(ownersCommitteeService.saveOrUpdate(ownersCommittee));
- }
-
- /**
- * 业委会成员表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(ownersCommitteeService.removeOwnersCommittee(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/dto/OwnersCommitteeDTO.java b/src/main/java/org/springblade/modules/ownersCommittee/dto/OwnersCommitteeDTO.java
deleted file mode 100644
index c3f73c7..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/dto/OwnersCommitteeDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.dto;
-
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 业委会表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OwnersCommitteeDTO extends OwnersCommitteeEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/dto/OwnersCommitteeMemberDTO.java b/src/main/java/org/springblade/modules/ownersCommittee/dto/OwnersCommitteeMemberDTO.java
deleted file mode 100644
index 9b11006..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/dto/OwnersCommitteeMemberDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.dto;
-
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 业委会成员表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OwnersCommitteeMemberDTO extends OwnersCommitteeMemberEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/entity/OwnersCommitteeEntity.java b/src/main/java/org/springblade/modules/ownersCommittee/entity/OwnersCommitteeEntity.java
deleted file mode 100644
index 2c53fd4..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/entity/OwnersCommitteeEntity.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 业委会表 实体类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@ApiModel(value = "OwnersCommittee对象" , description = "业委会表")
-@Data
-@TableName("jczz_owners_committee")
-public class OwnersCommitteeEntity implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 小区id */
- @ApiModelProperty(value = "小区id", example = "")
- @TableField("area_id")
- private String areaId;
-
- /** 小区名称 */
- @ApiModelProperty(value = "小区名称", example = "")
- @TableField("area_name")
- private String areaName;
-
- /** 建立时间 */
- @ApiModelProperty(value = "建立时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField("establish_time")
- private Date establishTime;
-
- /** 图片地址 */
- @ApiModelProperty(value = "图片地址", example = "")
- @TableField("image_url")
- private String imageUrl;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("latitude")
- private String latitude;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("longitude")
- private String longitude;
-
- /** 地址 */
- @ApiModelProperty(value = "地址", example = "")
- @TableField("location")
- private String location;
-
- /** 手机号 */
- @ApiModelProperty(value = "手机号", example = "")
- @TableField("mobile")
- private String mobile;
-
- /** 业委会名称 */
- @ApiModelProperty(value = "业委会名称", example = "")
- @TableField("name")
- private String name;
-
- /** 总人数 */
- @ApiModelProperty(value = "总人数", example = "")
- @TableField("people_total")
- private String peopleTotal;
-
- /** 负责人id */
- @ApiModelProperty(value = "负责人id", example = "")
- @TableField("principal_id")
- private Long principalId;
-
- /** 负责人名称 */
- @ApiModelProperty(value = "负责人名称", example = "")
- @TableField("principal_name")
- private String principalName;
-
- /** 简介 */
- @ApiModelProperty(value = "简介", example = "")
- @TableField("profile")
- private String profile;
-
- /** 业委会届别 */
- @ApiModelProperty(value = "业委会届别", example = "")
- @TableField("session")
- private Integer session;
-
- /** 开始时间 */
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField("start_time")
- private Date startTime;
-
- /** 截止时间 */
- @ApiModelProperty(value = "截止时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField("end_time")
- private Date endTime;
-
- /** 排序 */
- @ApiModelProperty(value = "排序", example = "")
- @TableField("sort")
- private Integer sort;
-
- /** 0 正常 1 关闭 */
- @ApiModelProperty(value = "0 正常 1 关闭", example = "")
- @TableField("status")
- private Integer status;
-
- /** 0 业委会 1 物管会/自管会 */
- @ApiModelProperty(value = "0 业委会 1 物管会/自管会", example = "")
- @TableField("type")
- private Integer type;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_id")
- private Long createId;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_id")
- private Integer updateId;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /** 0否 1是 */
- @ApiModelProperty(value = "0否 1是", example = "")
- @TableField("delete_flag")
- private Integer deleteFlag;
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/entity/OwnersCommitteeMemberEntity.java b/src/main/java/org/springblade/modules/ownersCommittee/entity/OwnersCommitteeMemberEntity.java
deleted file mode 100644
index 3069517..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/entity/OwnersCommitteeMemberEntity.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import liquibase.pro.packaged.I;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 业委会成员表 实体类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@ApiModel(value = "OwnersCommitteeMember对象" , description = "业委会成员表")
-@Data
-@TableName("jczz_owners_committee_member")
-public class OwnersCommitteeMemberEntity implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 小区id */
- @ApiModelProperty(value = "小区id", example = "")
- @TableField("area_id")
- private String areaId;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_id")
- private Long createId;
-
- /** 学历 */
- @ApiModelProperty(value = "学历", example = "")
- @TableField("education")
- private String education;
-
- /** 身份证号码 */
- @ApiModelProperty(value = "身份证号码", example = "")
- @TableField("identity_num")
- private String identityNum;
-
- /** 身份证类型 */
- @ApiModelProperty(value = "身份证类型", example = "")
- @TableField("identity_type")
- private Integer identityType;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("image_url")
- private String imageUrl;
-
- /** 加入时间 */
- @ApiModelProperty(value = "加入时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField("join_time")
- private Date joinTime;
-
- /** 手机 */
- @ApiModelProperty(value = "手机", example = "")
- @TableField("mobile")
- private String mobile;
-
- /** 名称 */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /** 业主委员会名称 */
- @ApiModelProperty(value = "业主委员会名称", example = "")
- @TableField("owners_committee_name")
- private String ownersCommitteeName;
-
- /** 业主委员会id */
- @ApiModelProperty(value = "业主委员会id", example = "")
- @TableField("owners_id")
- private Integer ownersId;
-
- /** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", example = "")
- @TableField("political_status")
- private String politicalStatus;
-
- /** 职务:1主任,2副主任,3秘书长,4委员 */
- @ApiModelProperty(value = "职务:1主任,2副主任,3秘书长,4委员", example = "")
- @TableField("post")
- private String post;
-
- /** 简介 */
- @ApiModelProperty(value = "简介", example = "")
- @TableField("profile")
- private String profile;
-
- /** 性别 */
- @ApiModelProperty(value = "性别", example = "")
- @TableField("sex")
- private String sex;
-
- /** 排序 */
- @ApiModelProperty(value = "排序", example = "")
- @TableField("sort")
- private Integer sort;
-
- /** 0 正常 1 关闭 */
- @ApiModelProperty(value = "0 正常 1 关闭", example = "")
- @TableField("status")
- private Integer status;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_id")
- private Long updateId;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 0否 1 是 */
- @ApiModelProperty(value = "0否 1 是", example = "")
- @TableField("delete_flag")
- // @TableLogic
- private Integer deleteFlag;
-
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private Long userId;
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMapper.java b/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMapper.java
deleted file mode 100644
index 787d039..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 业委会表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-19
- */
-public interface OwnersCommitteeMapper extends BaseMapper<OwnersCommitteeEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param ownersCommittee
- * @return
- */
- List<OwnersCommitteeVO> selectOwnersCommitteePage(IPage page,@Param("ownersCommittee") OwnersCommitteeVO ownersCommittee);
-
-
- /**
- * 查询业委会表
- *
- * @param id 业委会表ID
- * @return 业委会表
- */
- public OwnersCommitteeDTO selectOwnersCommitteeById(Integer id);
-
- /**
- * 查询业委会表列表
- *
- * @param ownersCommitteeDTO 业委会表
- * @return 业委会表集合
- */
- public List<OwnersCommitteeDTO> selectOwnersCommitteeList(OwnersCommitteeDTO ownersCommitteeDTO);
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMapper.xml b/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMapper.xml
deleted file mode 100644
index 41a131b..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMapper.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.ownersCommittee.mapper.OwnersCommitteeMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="ownersCommitteeResultMap"
- type="org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity">
- </resultMap>
-
-
- <select id="selectOwnersCommitteePage" resultMap="ownersCommitteeResultMap">
- <include refid="selectOwnersCommittee"/>
- <where>
- <if test="ownersCommittee.id != null ">and id = #{ownersCommittee.id}</if>
- <if test="ownersCommittee.areaId != null ">and area_id = #{ownersCommittee.areaId}</if>
- <if test="ownersCommittee.areaName != null and ownersCommittee.areaName != ''">and area_name =
- #{ownersCommittee.areaName}
- </if>
- <if test="ownersCommittee.establishTime != null ">and establish_time = #{ownersCommittee.establishTime}</if>
- <if test="ownersCommittee.imageUrl != null and ownersCommittee.imageUrl != ''">and image_url =
- #{ownersCommittee.imageUrl}
- </if>
- <if test="ownersCommittee.latitude != null and ownersCommittee.latitude != ''">and latitude =
- #{ownersCommittee.latitude}
- </if>
- <if test="ownersCommittee.longitude != null and ownersCommittee.longitude != ''">and longitude =
- #{ownersCommittee.longitude}
- </if>
- <if test="ownersCommittee.location != null and ownersCommittee.location != ''">and location =
- #{ownersCommittee.location}
- </if>
- <if test="ownersCommittee.mobile != null and ownersCommittee.mobile != ''">and mobile =
- #{ownersCommittee.mobile}
- </if>
- <if test="ownersCommittee.name != null and ownersCommittee.name != ''">and name like
- concat('%',#{ownersCommittee.name},'%')
- </if>
- <if test="ownersCommittee.peopleTotal != null and ownersCommittee.peopleTotal != ''">and people_total =
- #{ownersCommittee.peopleTotal}
- </if>
- <if test="ownersCommittee.principalId != null ">and principal_id = #{ownersCommittee.principalId}</if>
- <if test="ownersCommittee.principalName != null and ownersCommittee.principalName != ''">and principal_name
- = #{ownersCommittee.principalName}
- </if>
- <if test="ownersCommittee.profile != null and ownersCommittee.profile != ''">and profile =
- #{ownersCommittee.profile}
- </if>
- <if test="ownersCommittee.session != null ">and session = #{ownersCommittee.session}</if>
- <if test="ownersCommittee.startTime != null ">and start_time = #{ownersCommittee.startTime}</if>
- <if test="ownersCommittee.endTime != null ">and end_time = #{ownersCommittee.endTime}</if>
- <if test="ownersCommittee.sort != null ">and sort = #{ownersCommittee.sort}</if>
- <if test="ownersCommittee.status != null ">and status = #{ownersCommittee.status}</if>
- <if test="ownersCommittee.type != null ">and type = #{ownersCommittee.type}</if>
- <if test="ownersCommittee.createId != null ">and create_id = #{ownersCommittee.createId}</if>
- <if test="ownersCommittee.updateId != null ">and update_id = #{ownersCommittee.updateId}</if>
- <if test="ownersCommittee.createTime != null ">and create_time = #{ownersCommittee.createTime}</if>
- <if test="ownersCommittee.updateTime != null ">and update_time = #{ownersCommittee.updateTime}</if>
- <if test="ownersCommittee.deleteFlag != null ">and delete_flag = #{ownersCommittee.deleteFlag}</if>
- <if test="ownersCommittee.areaIdList != null ">
- and area_id in
- <foreach collection="ownersCommittee.areaIdList" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
-
- </if>
- </where>
- </select>
-
-
- <resultMap type="org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO" id="OwnersCommitteeDTOResult">
- <result property="id" column="id"/>
- <result property="areaId" column="area_id"/>
- <result property="areaName" column="area_name"/>
- <result property="establishTime" column="establish_time"/>
- <result property="imageUrl" column="image_url"/>
- <result property="latitude" column="latitude"/>
- <result property="longitude" column="longitude"/>
- <result property="location" column="location"/>
- <result property="mobile" column="mobile"/>
- <result property="name" column="name"/>
- <result property="peopleTotal" column="people_total"/>
- <result property="principalId" column="principal_id"/>
- <result property="principalName" column="principal_name"/>
- <result property="profile" column="profile"/>
- <result property="session" column="session"/>
- <result property="startTime" column="start_time"/>
- <result property="endTime" column="end_time"/>
- <result property="sort" column="sort"/>
- <result property="status" column="status"/>
- <result property="type" column="type"/>
- <result property="createId" column="create_id"/>
- <result property="updateId" column="update_id"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="deleteFlag" column="delete_flag"/>
- </resultMap>
-
- <sql id="selectOwnersCommittee">
- select
- id,
- area_id,
- area_name,
- establish_time,
- image_url,
- latitude,
- longitude,
- location,
- mobile,
- name,
- people_total,
- principal_id,
- principal_name,
- profile,
- session,
- start_time,
- end_time,
- sort,
- status,
- type,
- create_id,
- update_id,
- create_time,
- update_time,
- delete_flag
- from
- jczz_owners_committee
- </sql>
-
- <select id="selectOwnersCommitteeById" parameterType="int" resultMap="OwnersCommitteeDTOResult">
- <include refid="selectOwnersCommittee"/>
- where
- id = #{id}
- </select>
-
- <select id="selectOwnersCommitteeList"
- parameterType="org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO"
- resultMap="OwnersCommitteeDTOResult">
- <include refid="selectOwnersCommittee"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="areaId != null ">and area_id = #{areaId}</if>
- <if test="areaName != null and areaName != ''">and area_name = #{areaName}</if>
- <if test="establishTime != null ">and establish_time = #{establishTime}</if>
- <if test="imageUrl != null and imageUrl != ''">and image_url = #{imageUrl}</if>
- <if test="latitude != null and latitude != ''">and latitude = #{latitude}</if>
- <if test="longitude != null and longitude != ''">and longitude = #{longitude}</if>
- <if test="location != null and location != ''">and location = #{location}</if>
- <if test="mobile != null and mobile != ''">and mobile = #{mobile}</if>
- <if test="name != null and name != ''">and name = #{name}</if>
- <if test="peopleTotal != null and peopleTotal != ''">and people_total = #{peopleTotal}</if>
- <if test="principalId != null ">and principal_id = #{principalId}</if>
- <if test="principalName != null and principalName != ''">and principal_name = #{principalName}</if>
- <if test="profile != null and profile != ''">and profile = #{profile}</if>
- <if test="session != null ">and session = #{session}</if>
- <if test="startTime != null ">and start_time = #{startTime}</if>
- <if test="endTime != null ">and end_time = #{endTime}</if>
- <if test="sort != null ">and sort = #{sort}</if>
- <if test="status != null ">and status = #{status}</if>
- <if test="type != null ">and type = #{type}</if>
- <if test="createId != null ">and create_id = #{createId}</if>
- <if test="updateId != null ">and update_id = #{updateId}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMemberMapper.java b/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMemberMapper.java
deleted file mode 100644
index 2c8bb27..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMemberMapper.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.ownersCommittee.dto.OwnersCommitteeMemberDTO;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeMemberVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 业委会成员表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-19
- */
-public interface OwnersCommitteeMemberMapper extends BaseMapper<OwnersCommitteeMemberEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param ownersCommittee
- * @return
- */
- List<OwnersCommitteeMemberVO> selectOwnersCommitteeMemberPage(IPage page, @Param("ownersCommittee") OwnersCommitteeMemberVO ownersCommittee);
-
- /**
- * 查询业委会成员表
- *
- * @param id 业委会成员表ID
- * @return 业委会成员表
- */
- public OwnersCommitteeMemberDTO selectOwnersCommitteeMemberById(Integer id);
-
- /**
- * 查询业委会成员表列表
- *
- * @param ownersCommitteeMemberDTO 业委会成员表
- * @return 业委会成员表集合
- */
- public List<OwnersCommitteeMemberDTO> selectOwnersCommitteeMemberList(OwnersCommitteeMemberDTO ownersCommitteeMemberDTO);
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMemberMapper.xml b/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMemberMapper.xml
deleted file mode 100644
index 2334a40..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/mapper/OwnersCommitteeMemberMapper.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.ownersCommittee.mapper.OwnersCommitteeMemberMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="ownersCommitteeResultMap"
- type="org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity">
- </resultMap>
-
-
- <select id="selectOwnersCommitteeMemberPage" resultMap="ownersCommitteeResultMap">
- <include refid="selectOwnersCommitteeMember"/>
- <where>
- <if test="ownersCommittee.id != null ">and id = #{ownersCommittee.id}</if>
- <if test="ownersCommittee.areaId != null ">and area_id = #{ownersCommittee.areaId}</if>
- <if test="ownersCommittee.createId != null ">and create_id = #{ownersCommittee.createId}</if>
- <if test="ownersCommittee.education != null and ownersCommittee.education != ''">and education = #{ownersCommittee.education}</if>
- <if test="ownersCommittee.identityNum != null ">and identity_num = #{ownersCommittee.identityNum}</if>
- <if test="ownersCommittee.identityType != null ">and identity_type = #{ownersCommittee.identityType}</if>
- <if test="ownersCommittee.imageUrl != null and ownersCommittee.imageUrl != ''">and image_url = #{ownersCommittee.imageUrl}</if>
- <if test="ownersCommittee.joinTime != null ">and join_time = #{ownersCommittee.joinTime}</if>
- <if test="ownersCommittee.mobile != null and ownersCommittee.mobile != ''">and mobile = #{ownersCommittee.mobile}</if>
- <if test="ownersCommittee.name != null and ownersCommittee.name != ''">and name like concat('%',#{ownersCommittee.name},'%') </if>
- <if test="ownersCommittee.ownersCommitteeName != null and ownersCommittee.ownersCommitteeName != ''">and owners_committee_name =
- #{ownersCommittee.ownersCommitteeName}
- </if>
- <if test="ownersCommittee.ownersId != null ">and owners_id = #{ownersCommittee.ownersId}</if>
- <if test="ownersCommittee.politicalStatus != null and ownersCommittee.politicalStatus != ''">and political_status = #{ownersCommittee.politicalStatus}</if>
- <if test="ownersCommittee.post != null and ownersCommittee.post != ''">and post = #{ownersCommittee.post}</if>
- <if test="ownersCommittee.profile != null and ownersCommittee.profile != ''">and profile = #{ownersCommittee.profile}</if>
- <if test="ownersCommittee.sex != null and ownersCommittee.sex != ''">and sex = #{ownersCommittee.sex}</if>
- <if test="ownersCommittee.sort != null ">and sort = #{ownersCommittee.sort}</if>
- <if test="ownersCommittee.status != null ">and status = #{ownersCommittee.status}</if>
- <if test="ownersCommittee.updateId != null ">and update_id = #{ownersCommittee.updateId}</if>
- <if test="ownersCommittee.updateTime != null ">and update_time = #{ownersCommittee.updateTime}</if>
- <if test="ownersCommittee.createTime != null ">and create_time = #{ownersCommittee.createTime}</if>
- <if test="ownersCommittee.deleteFlag != null ">and delete_flag = #{ownersCommittee.deleteFlag}</if>
- </where>
- </select>
-
- <resultMap type="org.springblade.modules.ownersCommittee.dto.OwnersCommitteeMemberDTO"
- id="OwnersCommitteeMemberDTOResult">
- <result property="id" column="id"/>
- <result property="areaId" column="area_id"/>
- <result property="createId" column="create_id"/>
- <result property="education" column="education"/>
- <result property="identityNum" column="identity_num"/>
- <result property="identityType" column="identity_type"/>
- <result property="imageUrl" column="image_url"/>
- <result property="joinTime" column="join_time"/>
- <result property="mobile" column="mobile"/>
- <result property="name" column="name"/>
- <result property="ownersCommitteeName" column="owners_committee_name"/>
- <result property="ownersId" column="owners_id"/>
- <result property="politicalStatus" column="political_status"/>
- <result property="post" column="post"/>
- <result property="profile" column="profile"/>
- <result property="sex" column="sex"/>
- <result property="sort" column="sort"/>
- <result property="status" column="status"/>
- <result property="updateId" column="update_id"/>
- <result property="updateTime" column="update_time"/>
- <result property="createTime" column="create_time"/>
- <result property="deleteFlag" column="delete_flag"/>
- <result property="userId" column="user_id"/>
- </resultMap>
-
- <sql id="selectOwnersCommitteeMember">
- select id,
- area_id,
- create_id,
- education,
- identity_num,
- identity_type,
- image_url,
- join_time,
- mobile,
- name,
- owners_committee_name,
- owners_id,
- political_status,
- post,
- profile,
- sex,
- sort,
- status,
- update_id,
- update_time,
- create_time,
- delete_flag,
- user_id
- from jczz_owners_committee_member
- </sql>
-
- <select id="selectOwnersCommitteeMemberById" parameterType="int" resultMap="OwnersCommitteeMemberDTOResult">
- <include refid="selectOwnersCommitteeMember"/>
- where
- id = #{id}
- </select>
-
- <select id="selectOwnersCommitteeMemberList"
- parameterType="org.springblade.modules.ownersCommittee.dto.OwnersCommitteeMemberDTO"
- resultMap="OwnersCommitteeMemberDTOResult">
- <include refid="selectOwnersCommitteeMember"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="areaId != null ">and area_id = #{areaId}</if>
- <if test="createId != null ">and create_id = #{createId}</if>
- <if test="education != null and education != ''">and education = #{education}</if>
- <if test="identityNum != null ">and identity_num = #{identityNum}</if>
- <if test="identityType != null ">and identity_type = #{identityType}</if>
- <if test="imageUrl != null and imageUrl != ''">and image_url = #{imageUrl}</if>
- <if test="joinTime != null ">and join_time = #{joinTime}</if>
- <if test="mobile != null and mobile != ''">and mobile = #{mobile}</if>
- <if test="name != null and name != ''">and name = #{name}</if>
- <if test="ownersCommitteeName != null and ownersCommitteeName != ''">and owners_committee_name =
- #{ownersCommitteeName}
- </if>
- <if test="ownersId != null ">and owners_id = #{ownersId}</if>
- <if test="politicalStatus != null and politicalStatus != ''">and political_status = #{politicalStatus}</if>
- <if test="post != null and post != ''">and post = #{post}</if>
- <if test="profile != null and profile != ''">and profile = #{profile}</if>
- <if test="sex != null and sex != ''">and sex = #{sex}</if>
- <if test="sort != null ">and sort = #{sort}</if>
- <if test="status != null ">and status = #{status}</if>
- <if test="updateId != null ">and update_id = #{updateId}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
- </where>
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/service/IOwnersCommitteeMemberService.java b/src/main/java/org/springblade/modules/ownersCommittee/service/IOwnersCommitteeMemberService.java
deleted file mode 100644
index 22a0eb6..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/service/IOwnersCommitteeMemberService.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.ownersCommittee.dto.OwnersCommitteeMemberDTO;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeMemberVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 业委会成员表 服务类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-public interface IOwnersCommitteeMemberService extends IService<OwnersCommitteeMemberEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param ownersCommittee
- * @return
- */
- IPage<OwnersCommitteeMemberVO> selectOwnersCommitteeMemberPage(IPage<OwnersCommitteeMemberVO> page, OwnersCommitteeMemberVO ownersCommittee);
-
- /**
- * 查询业委会成员表
- *
- * @param id 业委会成员表ID
- * @return 业委会成员表
- */
- public OwnersCommitteeMemberDTO selectOwnersCommitteeMemberById(Integer id);
-
- /**
- * 查询业委会成员表列表
- *
- * @param ownersCommitteeMemberDTO 业委会成员表
- * @return 业委会成员表集合
- */
- public List<OwnersCommitteeMemberDTO> selectOwnersCommitteeMemberList(OwnersCommitteeMemberDTO ownersCommitteeMemberDTO);
-
- boolean removeOwnersCommittee(List<Long> toLongList);
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/service/IOwnersCommitteeService.java b/src/main/java/org/springblade/modules/ownersCommittee/service/IOwnersCommitteeService.java
deleted file mode 100644
index 8b1d87b..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/service/IOwnersCommitteeService.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 业委会表 服务类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-public interface IOwnersCommitteeService extends IService<OwnersCommitteeEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param ownersCommittee
- * @return
- */
- IPage<OwnersCommitteeVO> selectOwnersCommitteePage(IPage<OwnersCommitteeVO> page, OwnersCommitteeVO ownersCommittee);
-
- /**
- * 查询业委会表
- *
- * @param id 业委会表ID
- * @return 业委会表
- */
- public OwnersCommitteeDTO selectOwnersCommitteeById(Integer id);
-
- /**
- * 查询业委会表列表
- *
- * @param ownersCommitteeDTO 业委会表
- * @return 业委会表集合
- */
- public List<OwnersCommitteeDTO> selectOwnersCommitteeList(OwnersCommitteeDTO ownersCommitteeDTO);
-
- Boolean saveOrUpdateOwnersCommittee(OwnersCommitteeEntity ownersCommittee);
-
- Boolean removeOwnersCommittee(List<Long> toLongList);
-
- Boolean updateOwnersCommittee(OwnersCommitteeEntity ownersCommittee);
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeMemberServiceImpl.java b/src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeMemberServiceImpl.java
deleted file mode 100644
index 73fc10d..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeMemberServiceImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.ownersCommittee.dto.OwnersCommitteeMemberDTO;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeService;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeMemberVO;
-import org.springblade.modules.ownersCommittee.mapper.OwnersCommitteeMemberMapper;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeMemberService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 业委会成员表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@Service
-public class OwnersCommitteeMemberServiceImpl extends ServiceImpl<OwnersCommitteeMemberMapper, OwnersCommitteeMemberEntity> implements IOwnersCommitteeMemberService {
-
- @Override
- public IPage<OwnersCommitteeMemberVO> selectOwnersCommitteeMemberPage(IPage<OwnersCommitteeMemberVO> page, OwnersCommitteeMemberVO ownersCommittee) {
- return page.setRecords(baseMapper.selectOwnersCommitteeMemberPage(page, ownersCommittee));
- }
-
- /**
- * 查询业委会成员表
- *
- * @param id 业委会成员表ID
- * @return 业委会成员表
- */
- @Override
- public OwnersCommitteeMemberDTO selectOwnersCommitteeMemberById(Integer id) {
- return this.baseMapper.selectOwnersCommitteeMemberById(id);
- }
-
- /**
- * 查询业委会成员表列表
- *
- * @param ownersCommitteeMemberDTO 业委会成员表
- * @return 业委会成员表集合
- */
- @Override
- public List<OwnersCommitteeMemberDTO> selectOwnersCommitteeMemberList(OwnersCommitteeMemberDTO ownersCommitteeMemberDTO) {
- return this.baseMapper.selectOwnersCommitteeMemberList(ownersCommitteeMemberDTO);
- }
-
- @Override
- public boolean removeOwnersCommittee(List<Long> toLongList) {
- for (Long aLong : toLongList) {
- OwnersCommitteeMemberEntity memberEntity = getById(aLong);
- // 1.删除业委会成员
- boolean removeById = removeById(aLong);
- // 2.查询人数
- long number = count(Wrappers.<OwnersCommitteeMemberEntity>lambdaQuery()
- .eq(OwnersCommitteeMemberEntity::getOwnersId, memberEntity.getOwnersId()));
- // 3.更新业委会人数
- IOwnersCommitteeService bean = SpringUtils.getBean(IOwnersCommitteeService.class);
- OwnersCommitteeEntity committeeEntity = bean.getById(memberEntity.getOwnersId());
- committeeEntity.setPeopleTotal(String.valueOf(number));
- // 4.更新
- bean.updateById(committeeEntity);
- return removeById;
- }
- return false;
- }
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeServiceImpl.java b/src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeServiceImpl.java
deleted file mode 100644
index af3be18..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeServiceImpl.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.mapper.OwnersCommitteeMapper;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeService;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 业委会表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@Service
-public class OwnersCommitteeServiceImpl extends ServiceImpl<OwnersCommitteeMapper, OwnersCommitteeEntity> implements IOwnersCommitteeService {
-
- @Override
- public IPage<OwnersCommitteeVO> selectOwnersCommitteePage(IPage<OwnersCommitteeVO> page, OwnersCommitteeVO ownersCommittee) {
- String userRole = AuthUtil.getUserRole();
- // 街道身份,只查找该街道下面的业委会
- if (userRole.contains("jdgly")) {
- List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId(),null);
- IDistrictService bean = SpringUtils.getBean(IDistrictService.class);
- List<DistrictEntity> list = bean.list(Wrappers.<DistrictEntity>lambdaQuery()
- .in(DistrictEntity::getCommunityCode, regionChildCodesList));
- List<String> fieldValues = list.stream().map(DistrictEntity::getId).collect(Collectors.toList());
- ownersCommittee.setAreaIdList(fieldValues);
- }
- return page.setRecords(baseMapper.selectOwnersCommitteePage(page, ownersCommittee));
- }
-
- /**
- * 查询业委会表
- *
- * @param id 业委会表ID
- * @return 业委会表
- */
- @Override
- public OwnersCommitteeDTO selectOwnersCommitteeById(Integer id) {
- return this.baseMapper.selectOwnersCommitteeById(id);
- }
-
- /**
- * 查询业委会表列表
- *
- * @param ownersCommitteeDTO 业委会表
- * @return 业委会表集合
- */
- @Override
- public List<OwnersCommitteeDTO> selectOwnersCommitteeList(OwnersCommitteeDTO ownersCommitteeDTO) {
- return this.baseMapper.selectOwnersCommitteeList(ownersCommitteeDTO);
- }
-
- @Override
- public Boolean saveOrUpdateOwnersCommittee(OwnersCommitteeEntity ownersCommittee) {
- boolean b = saveOrUpdate(ownersCommittee);
- if (b) {
- // 更新负责人用户角色
- IUserService bean = SpringUtils.getBean(IUserService.class);
- User userInfo = bean.getOne(Wrappers.<User>lambdaQuery().eq(User::getId, ownersCommittee.getPrincipalId()));
- // 判断角色
- if (!userInfo.getRoleId().contains("1759487358708310017")) {
- userInfo.setRoleId(userInfo.getRoleId() + ",1759487358708310017");
- }
- bean.updateById(userInfo);
- }
- //
- return b;
- }
-
- @Override
- public Boolean updateOwnersCommittee(OwnersCommitteeEntity ownersCommittee) {
- OwnersCommitteeEntity one = getOne(Wrappers.<OwnersCommitteeEntity>lambdaQuery().eq(OwnersCommitteeEntity::getId, ownersCommittee.getId()));
- // 负责人没有变化
- if(one.getPrincipalId().equals(ownersCommittee.getPrincipalId())){
- // 更新业委会信息
- return updateById(ownersCommittee);
- }
- // 负责人有变化
- // 1.更新原负责人用户角色
- IUserService bean = SpringUtils.getBean(IUserService.class);
- User userInfo = bean.getOne(Wrappers.<User>lambdaQuery().eq(User::getId, one.getPrincipalId()));
- // 判断角色
- if (userInfo.getRoleId().contains("1759487358708310017")) {
- userInfo.setRoleId(userInfo.getRoleId().replace("1759487358708310017", ""));
- }
- List<String> stringList = Arrays.asList(userInfo.getRoleId().split(","));
- // 查询是否对应有业委会负责人,如果有则删除,如果没有则不删除对应的角色
- List<String> arrayList = new ArrayList<>();
- for (String roleId : stringList) {
- if (!roleId.equals("1759487358708310017")) {
- arrayList.add(roleId);
- }
- }
- userInfo.setRoleId(StringUtils.join(arrayList, ","));
- bean.updateById(userInfo);
- // 2.更新现在的负责人
- User userInfoNew = bean.getOne(Wrappers.<User>lambdaQuery().eq(User::getId, ownersCommittee.getPrincipalId()));
- // 判断角色
- if (!userInfoNew.getRoleId().contains("1759487358708310017")) {
- userInfoNew.setRoleId(userInfo.getRoleId() + ",1759487358708310017");
- }
- bean.updateById(userInfoNew);
- // 3.更新业委会信息
- return updateById(ownersCommittee);
- }
-
- @Override
- public Boolean removeOwnersCommittee(List<Long> toLongList) {
- for (Long aLong : toLongList) {
- OwnersCommitteeEntity ownersCommittee = getOne(Wrappers.<OwnersCommitteeEntity>lambdaQuery().eq(OwnersCommitteeEntity::getId, aLong));
- // 更新负责人用户角色
- IUserService bean = SpringUtils.getBean(IUserService.class);
- User userInfo = bean.getOne(Wrappers.<User>lambdaQuery().eq(User::getId, ownersCommittee.getPrincipalId()));
- // 判断角色
- if (userInfo.getRoleId().contains("1759487358708310017")) {
- userInfo.setRoleId(userInfo.getRoleId().replace("1759487358708310017", ""));
- }
- List<String> stringList = Arrays.asList(userInfo.getRoleId().split(","));
- // 查询是否对应有业委会负责人,如果有则删除,如果没有则不删除对应的角色
- List<String> arrayList = new ArrayList<>();
- for (String roleId : stringList) {
- if (!roleId.equals("1759487358708310017")) {
- arrayList.add(roleId);
- }
- }
- userInfo.setRoleId(StringUtils.join(arrayList, ","));
- bean.updateById(userInfo);
- return removeById(ownersCommittee);
- }
- return false;
- }
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/vo/OwnersCommitteeMemberVO.java b/src/main/java/org/springblade/modules/ownersCommittee/vo/OwnersCommitteeMemberVO.java
deleted file mode 100644
index d6ef6d6..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/vo/OwnersCommitteeMemberVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.vo;
-
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 业委会成员表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OwnersCommitteeMemberVO extends OwnersCommitteeMemberEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/vo/OwnersCommitteeVO.java b/src/main/java/org/springblade/modules/ownersCommittee/vo/OwnersCommitteeVO.java
deleted file mode 100644
index d355df2..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/vo/OwnersCommitteeVO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-
-import java.util.List;
-
-/**
- * 业委会表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-19
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OwnersCommitteeVO extends OwnersCommitteeEntity {
- private static final long serialVersionUID = 1L;
-
- // 小区id
- private List<String> areaIdList;
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/wrapper/OwnersCommitteeMemberWrapper.java b/src/main/java/org/springblade/modules/ownersCommittee/wrapper/OwnersCommitteeMemberWrapper.java
deleted file mode 100644
index 1927e5f..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/wrapper/OwnersCommitteeMemberWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeMemberEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeMemberVO;
-import java.util.Objects;
-
-/**
- * 业委会成员表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-19
- */
-public class OwnersCommitteeMemberWrapper extends BaseEntityWrapper<OwnersCommitteeMemberEntity, OwnersCommitteeMemberVO> {
-
- public static OwnersCommitteeMemberWrapper build() {
- return new OwnersCommitteeMemberWrapper();
- }
-
- @Override
- public OwnersCommitteeMemberVO entityVO(OwnersCommitteeMemberEntity ownersCommittee) {
- OwnersCommitteeMemberVO ownersCommitteeVO = Objects.requireNonNull(BeanUtil.copy(ownersCommittee, OwnersCommitteeMemberVO.class));
-
- //User createUser = UserCache.getUser(ownersCommittee.getCreateUser());
- //User updateUser = UserCache.getUser(ownersCommittee.getUpdateUser());
- //ownersCommitteeVO.setCreateUserName(createUser.getName());
- //ownersCommitteeVO.setUpdateUserName(updateUser.getName());
-
- return ownersCommitteeVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/ownersCommittee/wrapper/OwnersCommitteeWrapper.java b/src/main/java/org/springblade/modules/ownersCommittee/wrapper/OwnersCommitteeWrapper.java
deleted file mode 100644
index 9496ca7..0000000
--- a/src/main/java/org/springblade/modules/ownersCommittee/wrapper/OwnersCommitteeWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.ownersCommittee.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
-import java.util.Objects;
-
-/**
- * 业委会表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-19
- */
-public class OwnersCommitteeWrapper extends BaseEntityWrapper<OwnersCommitteeEntity, OwnersCommitteeVO> {
-
- public static OwnersCommitteeWrapper build() {
- return new OwnersCommitteeWrapper();
- }
-
- @Override
- public OwnersCommitteeVO entityVO(OwnersCommitteeEntity ownersCommittee) {
- OwnersCommitteeVO ownersCommitteeVO = Objects.requireNonNull(BeanUtil.copy(ownersCommittee, OwnersCommitteeVO.class));
-
- //User createUser = UserCache.getUser(ownersCommittee.getCreateUser());
- //User updateUser = UserCache.getUser(ownersCommittee.getUpdateUser());
- //ownersCommitteeVO.setCreateUserName(createUser.getName());
- //ownersCommitteeVO.setUpdateUserName(updateUser.getName());
-
- return ownersCommitteeVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java b/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java
deleted file mode 100644
index 88129cc..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.springblade.modules.partyOrganization.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("partyOrganization/partyOrganization")
-@Api(value = "业委会表", tags = "业委会表接口")
-public class PartyOrganizationController extends BladeController {
-
- private final IPartyOrganizationService partyOrganizationService;
-
-
- /**
- * 党组织 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入ownersCommittee")
- public R<PartyOrganization> detail(PartyOrganizationVO partyOrganizationVO) {
- PartyOrganization detail = partyOrganizationService.getOne(Condition.getQueryWrapper(partyOrganizationVO));
- return R.data(detail);
- }
-
- /**
- * 党组织 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入ownersCommittee")
- public R<IPage<PartyOrganizationVO>> page(PartyOrganizationVO PartyOrganizationVO, Query query) {
- IPage<PartyOrganizationVO> pages = partyOrganizationService.getPage(Condition.getPage(query), PartyOrganizationVO);
- return R.data(pages);
- }
-
- /**
- * 党组织 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入ownersCommittee")
- public R save(@Valid @RequestBody PartyOrganization partyOrganization) {
- return R.status(partyOrganizationService.save(partyOrganization));
- }
-
- /**
- * 党组织 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入ownersCommittee")
- public R update(@Valid @RequestBody PartyOrganization partyOrganization) {
- return R.status(partyOrganizationService.updateById(partyOrganization));
- }
-
- /**
- * 党组织 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入ownersCommittee")
- public R submit(@Valid @RequestBody PartyOrganization partyOrganization) {
- return R.status(partyOrganizationService.saveOrUpdate(partyOrganization));
- }
-
- /**
- * 党组织 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(partyOrganizationService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java b/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java
deleted file mode 100644
index f8833f8..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package org.springblade.modules.partyOrganization.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
-import org.springblade.modules.partyOrganization.service.IPartyOrganizationMemberService;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("partyOrganizationMember/partyOrganizationMember")
-@Api(value = "党成员表", tags = "党成员表接口")
-public class PartyOrganizationMemberController extends BladeController {
-
- private final IPartyOrganizationMemberService partyOrganizationMemberService;
-
-
- /**
- * 党组织成员 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入PartyOrganizationMember")
- public R<PartyOrganizationMember> detail(PartyOrganizationMemberVO partyOrganizationVO) {
- PartyOrganizationMember detail = partyOrganizationMemberService.getOne(Condition.getQueryWrapper(partyOrganizationVO));
- return R.data(detail);
- }
-
- /**
- * 党组织成员 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入PartyOrganizationMember")
- public R<IPage<PartyOrganizationMemberVO>> page(PartyOrganizationMemberVO PartyOrganizationMemberVO, Query query) {
- IPage<PartyOrganizationMemberVO> pages = partyOrganizationMemberService.getPage(Condition.getPage(query), PartyOrganizationMemberVO);
- return R.data(pages);
- }
-
- /**
- * 党组织成员 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入PartyOrganizationMember")
- public R save(@Valid @RequestBody PartyOrganizationMember PartyOrganizationMember) {
- return R.status(partyOrganizationMemberService.save(PartyOrganizationMember));
- }
-
- /**
- * 党组织成员 新增
- */
- @PostMapping("/add")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入PartyOrganizationMember")
- public R add(@Valid @RequestBody PartyOrganizationMemberVO PartyOrganizationMember) {
- return R.status(partyOrganizationMemberService.addVO(PartyOrganizationMember));
- }
-
- /**
- * 党组织成员 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入PartyOrganizationMember")
- public R update(@Valid @RequestBody PartyOrganizationMember PartyOrganizationMember) {
- return R.status(partyOrganizationMemberService.updateById(PartyOrganizationMember));
- }
-
- /**
- * 党组织成员 修改
- */
- @PostMapping("/edit")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入PartyOrganizationMember")
- public R edit(@Valid @RequestBody PartyOrganizationMemberVO PartyOrganizationMember) {
- return R.status(partyOrganizationMemberService.editVO(PartyOrganizationMember));
- }
-
- /**
- * 党组织成员 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入PartyOrganizationMember")
- public R submit(@Valid @RequestBody PartyOrganizationMember PartyOrganizationMember) {
- return R.status(partyOrganizationMemberService.saveOrUpdate(PartyOrganizationMember));
- }
-
- /**
- * 党组织成员 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(partyOrganizationMemberService.removeBatchByIds(Func.toLongList(ids)));
- }
-
- /**
- * 党组织成员 删除
- */
- @PostMapping("/delete")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R delete(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(partyOrganizationMemberService.delete(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java b/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java
deleted file mode 100644
index 862c169..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.springblade.modules.partyOrganization.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-@Data
-@TableName("jczz_party_organization")
-@EqualsAndHashCode(callSuper = true)
-public class PartyOrganization extends BaseEntity {
-
-
- private static final long serialVersionUID = 1L;
-
- //社区id
- private String areaId;
-
- //组织名称
- private String organizationName;
-
- //组织类型
- private String organizationType;
-
- //支部类型
- private String branchType;
-
- //负责人姓名
- private String chargePerson;
-
- //负责人手机号
- private String phone;
-
- //成立日期
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date establishmentDate;
-
- //图片
- private String urls;
-
- //排序
- private String sort;
-
- //简介
- private String profile;
-
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java b/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java
deleted file mode 100644
index f9045a6..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.springblade.modules.partyOrganization.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-@Data
-@TableName("jczz_party_organization_member")
-@EqualsAndHashCode(callSuper = true)
-public class PartyOrganizationMember extends BaseEntity {
-
-
- private static final long serialVersionUID = 1L;
-
- //住户id
- private String householdId;
-
- //党组织id
- private String organizationId;
-
- //党员类型
- private String partyMemberType;
-
- //党员职务
- private String partyMemberPost;
-
- //入党日期
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date joinDate;
-
- //转入日期
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date transferDate;
-
- //签入社区日期
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date signInDate;
-
- //是否先锋岗(1、是;2、否)
- private String isPioneer;
-
- //家庭住址
- private String address;
-
- //图片
- private String urls;
-
- //排序
- private String sort;
-
- //简介
- private String profile;
-
- private String userHouseLabelId;
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java
deleted file mode 100644
index fec9226..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.springblade.modules.partyOrganization.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
-import org.springblade.modules.ownersCommittee.wrapper.OwnersCommitteeWrapper;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import javax.validation.Valid;
-import java.util.List;
-
-public interface PartyOrganizationMapper extends BaseMapper<PartyOrganization> {
-
-
- List<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page,
- @Param("vo") PartyOrganizationVO partyOrganizationVO,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml
deleted file mode 100644
index 55e64db..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.partyOrganization.mapper.PartyOrganizationMapper">
-
-
- <select id="getPage" resultType="org.springblade.modules.partyOrganization.vo.PartyOrganizationVO">
- SELECT
- DISTINCT
- jpo.*,
- IFNULL(countTable.memberCount ,0) as memberCount
- FROM
- jczz_party_organization jpo
- LEFT JOIN ( SELECT COUNT(*) memberCount, organization_id FROM jczz_party_organization_member WHERE is_deleted = 0 GROUP BY organization_id ) countTable ON countTable.organization_id = jpo.id
- left join jczz_party_organization_member jpom ON jpom.organization_id = jpo.id
- left join jczz_household jh ON jh.id = jpom.household_id
- WHERE
- jpo.is_deleted = 0
- <if test="vo.organizationName != null and vo.organizationName != ''">
- AND jpo.organization_name LIKE CONCAT('%',#{vo.organizationName},'%')
- </if>
- <if test="vo.areaId != null and vo.areaId !='' ">
- AND jpo.area_id like concat('%',#{vo.areaId},'%')
- </if>
- <if test="vo.name != null and vo.name != ''">
- AND(jh.name LIKE CONCAT('%',#{vo.name},'%') OR jpo.charge_person LIKE CONCAT('%',#{vo.name},'%'))
- </if>
- ORDER BY
- jpo.sort ASC
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java
deleted file mode 100644
index c6ef452..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.springblade.modules.partyOrganization.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-
-import java.util.List;
-
-public interface PartyOrganizationMemberMapper extends BaseMapper<PartyOrganizationMember> {
-
-
- List<PartyOrganizationMemberVO> getPage(IPage<PartyOrganizationMemberVO> page, @Param("vo") PartyOrganizationMemberVO partyOrganizationMemberVO);
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml
deleted file mode 100644
index 63d8b59..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.partyOrganization.mapper.PartyOrganizationMemberMapper">
-
-
- <select id="getPage" resultType="org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO">
- SELECT
- jpom.*,
- jh.name as houseHoldName,
- jh.phone_number as phoneNumber,
- jh.gender as gender,
- jh.birthday as birthday,
- jh.card_type as cardType,
- jh.id_card as idCard
- FROM jczz_party_organization_member jpom
- LEFT JOIN jczz_household jh ON jpom.household_id = jh.id
- where jpom.is_deleted = 0
- <if test="vo.organizationId != null and vo.organizationId !='' ">
- AND jpom.organization_id = #{vo.organizationId}
- </if>
- <if test="vo.phoneNumber != null and vo.phoneNumber !='' ">
- AND jh.phone_number LIKE CONCAT('%',#{vo.phoneNumber},'%')
- </if>
- <if test="vo.houseHoldName != null and vo.houseHoldName !='' ">
- AND jh.name LIKE CONCAT('%',#{vo.houseHoldName},'%')
- </if>
- ORDER BY jpom.sort asc
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java b/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java
deleted file mode 100644
index c258445..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.springblade.modules.partyOrganization.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-
-import java.util.List;
-
-public interface IPartyOrganizationMemberService extends BaseService<PartyOrganizationMember> {
- IPage<PartyOrganizationMemberVO> getPage(IPage<PartyOrganizationMemberVO> page, PartyOrganizationMemberVO partyOrganizationMemberVO);
-
- Boolean addVO(PartyOrganizationMemberVO partyOrganizationMember);
-
- Boolean editVO(PartyOrganizationMemberVO partyOrganizationMember);
-
- Boolean delete(List<Long> toLongList);
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java b/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java
deleted file mode 100644
index 868ca70..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.springblade.modules.partyOrganization.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-
-public interface IPartyOrganizationService extends BaseService<PartyOrganization> {
- IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO);
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java b/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java
deleted file mode 100644
index d467afe..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.springblade.modules.partyOrganization.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.label.service.ILabelService;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
-import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMapper;
-import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMemberMapper;
-import org.springblade.modules.partyOrganization.service.IPartyOrganizationMemberService;
-import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-@Service
-@Transactional(rollbackFor = Exception.class)
-public class PartyOrganizationMemberServiceImpl extends BaseServiceImpl<PartyOrganizationMemberMapper, PartyOrganizationMember> implements IPartyOrganizationMemberService {
-
- @Autowired
- private IUserHouseLabelService userHouseLabelService;
-
- @Autowired
- private ILabelService labelService;
-
- @Override
- public IPage<PartyOrganizationMemberVO> getPage(IPage<PartyOrganizationMemberVO> page, PartyOrganizationMemberVO partyOrganizationMemberVO) {
- return page.setRecords(baseMapper.getPage(page,partyOrganizationMemberVO));
- }
-
- @Override
- public Boolean addVO(PartyOrganizationMemberVO partyOrganizationMember) {
-
- UserHouseLabelEntity userHouseLabelEntity = new UserHouseLabelEntity();
-
- userHouseLabelEntity.setHouseCode(partyOrganizationMember.getHouseCode());
- userHouseLabelEntity.setLabelId(Long.parseLong(partyOrganizationMember.getPartyMemberType()));
- userHouseLabelEntity.setColor("green");
- userHouseLabelEntity.setLableType(1);
- userHouseLabelEntity.setHouseholdId(Long.parseLong(partyOrganizationMember.getHouseholdId()));
- userHouseLabelEntity.setCreateTime(DateUtil.now());
-
- LabelEntity labelDetail = labelService.getById(partyOrganizationMember.getPartyMemberType());
- userHouseLabelEntity.setLabelName(labelDetail.getLabelName());
-
-
- boolean saveUserLabel = userHouseLabelService.save(userHouseLabelEntity);
-
- partyOrganizationMember.setUserHouseLabelId(userHouseLabelEntity.getId().toString());
- boolean saveMember = save(partyOrganizationMember);
- return saveUserLabel&&saveMember;
- }
-
- @Override
- public Boolean editVO(PartyOrganizationMemberVO partyOrganizationMember) {
-
- UserHouseLabelEntity userHouseLabelEntity = userHouseLabelService.getById(partyOrganizationMember.getUserHouseLabelId());
-
-
- //更新userhouselabel标签
- LabelEntity labelDetail = labelService.getById(partyOrganizationMember.getPartyMemberType());
- userHouseLabelEntity.setLabelName(labelDetail.getLabelName());
- userHouseLabelEntity.setLabelId(Long.parseLong(partyOrganizationMember.getPartyMemberType()));
- boolean updateLabel = userHouseLabelService.updateById(userHouseLabelEntity);
-
- //更新党员信息
- boolean updateMember = updateById(partyOrganizationMember);
-
-
- return updateLabel&&updateMember;
- }
-
- @Override
- public Boolean delete(List<Long> toLongList) {
-
- //把userhouselabel中的数据删除
- List<PartyOrganizationMember> partyOrganizationMembers = listByIds(toLongList);
-
- //循环删除
- partyOrganizationMembers.forEach(partyOrganizationMember ->{
- userHouseLabelService.removeById(partyOrganizationMember.getUserHouseLabelId());
- });
-
- //删自己
- return removeBatchByIds(toLongList);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java b/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java
deleted file mode 100644
index 28ffa48..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.springblade.modules.partyOrganization.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.house.vo.HouseVO;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMapper;
-import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.service.IDeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class PartyOrganizationServiceImpl extends BaseServiceImpl<PartyOrganizationMapper, PartyOrganization> implements IPartyOrganizationService {
-
-
- @Override
- public IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(PartyOrganizationVO.class, partyOrganizationVO);
- return page.setRecords(baseMapper.getPage(page,
- partyOrganizationVO,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator()));
- }
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java b/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java
deleted file mode 100644
index 9d936f0..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.springblade.modules.partyOrganization.vo;
-
-import lombok.Data;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
-
-@Data
-public class PartyOrganizationMemberVO extends PartyOrganizationMember {
-
- private String houseHoldName;
-
- private String phoneNumber;
-
- private String gender;
-
- private String birthday;
-
-
-
- private String cardType;
-
- private String idCard;
-
- //房屋code
- private String houseCode;
-
-
-
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java b/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java
deleted file mode 100644
index 7bc4969..0000000
--- a/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.springblade.modules.partyOrganization.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.modules.partyOrganization.entity.PartyOrganization;
-
-@Data
-public class PartyOrganizationVO extends PartyOrganization {
-
- //党员数
- private Integer memberCount;
-
- //负责人名字或者党成员名字
- private String name;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-}
diff --git a/src/main/java/org/springblade/modules/patrol/controller/PatrolGroupController.java b/src/main/java/org/springblade/modules/patrol/controller/PatrolGroupController.java
deleted file mode 100644
index e77e3ef..0000000
--- a/src/main/java/org/springblade/modules/patrol/controller/PatrolGroupController.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.springblade.modules.patrol.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.patrol.entity.PatrolGroup;
-import org.springblade.modules.patrol.service.IPatrolGroupService;
-import org.springblade.modules.patrol.vo.PatrolGroupVO;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @Description: 巡查指标组
- */
-@Slf4j
-@Api(tags = "巡查指标组")
-@RestController
-@RequestMapping("/patrol/patrolGroup")
-@AllArgsConstructor
-public class PatrolGroupController extends BladeController {
- private IPatrolGroupService patrolGroupService;
-
- /**
- * 分页列表查询
- *
- * @param patrolGroup
- */
- @ApiOperation(value = "巡查指标组-分页列表查询", notes = "巡查指标组-分页列表查询")
- @GetMapping(value = "/list")
- public R queryPageList(PatrolGroup patrolGroup, Query query) {
-// IPage<PatrolGroup> pageList = patrolGroupService.selectPatrolConfig(Condition.getPage(query),patrolGroup);
- IPage<PatrolGroup> pageList = patrolGroupService.page(Condition.getPage(query), Condition.getQueryWrapper(patrolGroup));
- return R.data(pageList);
- }
-
-
- /**
- * 检查内容组 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入patrolGroup")
- public R<IPage<PatrolGroupVO>> page(PatrolGroupVO patrolGroup, Query query) {
- IPage<PatrolGroupVO> pages = patrolGroupService.selectPatrolGroupPage(Condition.getPage(query), patrolGroup);
- return R.data(pages);
- }
-
-
-
- /**
- * 添加
- *
- * @param patrolGroup
- * @return
- */
- @ApiOperation(value = "巡查指标组-添加", notes = "巡查指标组-添加")
- @PostMapping(value = "/add")
- public R add(@RequestBody PatrolGroup patrolGroup) {
- return R.data(patrolGroupService.save(patrolGroup));
- }
-
-
- /**
- * 添加
- *
- * @param patrolGroup
- * @return
- */
- @ApiOperation(value = "巡查指标组-添加", notes = "巡查指标组-添加")
- @PostMapping(value = "/addTwo")
- public R addTwo(@RequestBody PatrolGroupVO patrolGroup) {
- return R.data(patrolGroupService.addTwo(patrolGroup));
- }
-
-
- /**
- * 编辑
- *
- * @param patrolGroup
- * @return
- */
- @ApiOperation(value = "巡查指标组-编辑", notes = "巡查指标组-编辑")
- @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
- public R edit(@RequestBody PatrolGroup patrolGroup) {
- return R.data(patrolGroupService.updateById(patrolGroup));
- }
-
- /**
- * 通过id删除
- *
- * @param id
- * @return
- */
- @ApiOperation(value = "巡查指标组-通过id删除", notes = "巡查指标组-通过id删除")
- @PostMapping(value = "/delete")
- public R delete(@RequestParam(name = "id", required = true) String id) {
- return R.data(patrolGroupService.removeById(id));
- }
-
- /**
- * 批量删除
- *
- * @param ids
- * @return
- */
- @ApiOperation(value = "巡查指标组-批量删除", notes = "巡查指标组-批量删除")
- @PostMapping(value = "/deleteBatch")
- public R deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
- return R.data(patrolGroupService.removePatrolGroupByIds(Arrays.asList(ids.split(","))));
- }
-
- /**
- * 通过id查询
- *
- * @param id
- * @return
- */
- @ApiOperation(value = "巡查指标组-通过id查询", notes = "巡查指标组-通过id查询")
- @GetMapping(value = "/queryById")
- public R queryById(@RequestParam(name = "id", required = true) String id) {
- PatrolGroup patrolGroup = patrolGroupService.getById(id);
- return R.data(patrolGroup);
- }
-
- /**
- * 根据工程id查询巡查指标组
- *
- * @return
- */
- @ApiOperation(value = "巡查指标组-根据工程id查询巡查指标组", notes = "巡查指标组-根据工程id查询巡查指标组")
- @GetMapping(value = "/getPatrolGroupByProjectId")
- public R queryTree(@RequestParam(name = "projectId", required = true) String projectId) {
- List<PatrolGroup> list = patrolGroupService.getPatrolGroupByProjectId(projectId);
- return R.data(list);
- }
-
- /**
- * 获取全部指标组
- *
- * @return
- */
- @ApiOperation(value = "获取全部指标组", notes = "获取全部指标组")
- @GetMapping(value = "/all")
- public R getAll() {
- List<PatrolGroup> list = patrolGroupService.list();
- return R.data(list);
- }
-
- /**
- * 查询巡查项树数据
- * @return
- */
- @ApiOperation(value = "查询巡查项树数据", notes = "查询巡查项树数据")
- @GetMapping(value = "/getPatrolGroupTree")
- public R getPatrolGroupTree(@RequestParam(value = "type",required = false)String type,@RequestParam(value = "childType",required = false)String childType) {
- return R.data(patrolGroupService.getPatrolGroupTree(type,childType));
- }
-
- /**
- * 根据项id查询组id
- * @return
- */
- @ApiOperation(value = "根据项id查询组id", notes = "根据项id查询组id")
- @GetMapping(value = "/getPatrolGroupByItemId")
- public R getPatrolGroupByItemId(String itemIds) {
- return R.data(patrolGroupService.getPatrolGroupByItemId(itemIds));
- }
-
- /**
- * 根据任务id获取巡查项,可判断是否已选
- */
- @GetMapping(value = "/getAllPatrolGroupByTaskId")
- public R getAllPatrolGroupByTaskId(String taskId) {
- return R.data(patrolGroupService.getAllPatrolGroupByTaskId(taskId));
- }
-
- /**
- * 根据任务id获取巡查组,返回组下的record
- */
- @GetMapping(value = "/getPatrolGroupDTO")
- public R getPatrolGroupDTO(String taskId) {
- return R.data(patrolGroupService.getPatrolGroupDTO(taskId));
- }
-
- /**
- * 根据任务id获取巡查组
- */
- @GetMapping(value = "/getPatrolGroupByTaskId")
- public R getPatrolGroupByTaskId(String taskId) {
- return R.data(patrolGroupService.getPatrolGroupByTaskId(taskId));
- }
-
- /**
- * 根据任务id获取巡查组,返回组下的record(web任务详情)
- */
- @GetMapping(value = "/getGroupDTORecord")
- public R getGroupDTORecord(String taskId){
- return R.data(patrolGroupService.getGroupDTORecord(taskId));
- }
-}
diff --git a/src/main/java/org/springblade/modules/patrol/controller/PatrolGroupItemController.java b/src/main/java/org/springblade/modules/patrol/controller/PatrolGroupItemController.java
deleted file mode 100644
index 16bd29e..0000000
--- a/src/main/java/org/springblade/modules/patrol/controller/PatrolGroupItemController.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.springblade.modules.patrol.controller;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-import org.springblade.modules.patrol.service.IPatrolGroupItemService;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @Description: 巡查指标项目
- */
-@Slf4j
-@Api(tags="巡查指标项目")
-@RestController
-@RequestMapping("/patrol/patrolGroupItem")
-@AllArgsConstructor
-public class PatrolGroupItemController extends BladeController {
-
- private IPatrolGroupItemService patrolGroupItemService;
-
- /**
- * 分页列表查询
- *
- * @param patrolGroupItem
- * @return
- */
- @ApiOperation(value="巡查指标项目-分页列表查询", notes="巡查指标项目-分页列表查询")
- @GetMapping(value = "/list")
- public R queryPageList(PatrolGroupItemVO patrolGroupItem, Query query) {
- IPage<PatrolGroupItemVO> pageList = patrolGroupItemService.selectPatrolConfig(Condition.getPage(query),patrolGroupItem);
- return R.data(pageList);
- }
-
- /**
- * 列表查询
- *
- * @param patrolGroupItem
- * @return
- */
- @ApiOperation(value="巡查指标项目-列表查询", notes="巡查指标项目-列表查询")
- @GetMapping(value = "/queryList")
- public R queryList(PatrolGroupItemVO patrolGroupItem) {
- List<PatrolGroupItemVO> list = patrolGroupItemService.selectPatrolGroupItemList(patrolGroupItem);
- return R.data(list);
- }
-
- /**
- * 添加
- *
- * @param patrolGroupItem
- * @return
- */
- @ApiOperation(value="巡查指标项目-添加", notes="巡查指标项目-添加")
- @PostMapping(value = "/add")
- public R add(@RequestBody PatrolGroupItem patrolGroupItem) {
- return R.data(patrolGroupItemService.save(patrolGroupItem));
- }
-
- /**
- * 编辑
- *
- * @param patrolGroupItem
- * @return
- */
- @ApiOperation(value="巡查指标项目-编辑", notes="巡查指标项目-编辑")
- @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
- public R edit(@RequestBody PatrolGroupItem patrolGroupItem) {
- return R.data(patrolGroupItemService.updateById(patrolGroupItem));
- }
-
- /**
- * 通过id删除
- *
- * @param id
- * @return
- */
- @ApiOperation(value="巡查指标项目-通过id删除", notes="巡查指标项目-通过id删除")
- @PostMapping(value = "/delete")
- public R delete(@RequestParam(name="id",required=true) String id) {
- return R.data(patrolGroupItemService.removeById(id));
- }
-
- /**
- * 批量删除
- *
- * @param ids
- * @return
- */
- @ApiOperation(value="巡查指标项目-批量删除", notes="巡查指标项目-批量删除")
- @PostMapping(value = "/deleteBatch")
- public R deleteBatch(@RequestParam(name="ids",required=true) String ids) {
- return R.data(patrolGroupItemService.removeByIds(Arrays.asList(ids.split(","))));
- }
-
- /**
- * 通过id查询
- *
- * @param id
- * @return
- */
- @ApiOperation(value="巡查指标项目-通过id查询", notes="巡查指标项目-通过id查询")
- @GetMapping(value = "/queryById")
- public R queryById(@RequestParam(name="id",required=true) String id) {
- PatrolGroupItem patrolGroupItem = patrolGroupItemService.getById(id);
- return R.data(patrolGroupItem);
- }
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/controller/PatrolRecordController.java b/src/main/java/org/springblade/modules/patrol/controller/PatrolRecordController.java
deleted file mode 100644
index cfd4a6a..0000000
--- a/src/main/java/org/springblade/modules/patrol/controller/PatrolRecordController.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package org.springblade.modules.patrol.controller;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.service.IPatrolRecordService;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
-* @Description: 巡查记录
-*/
-@Slf4j
-@Api(tags="巡查记录")
-@RestController
-@RequestMapping("/patrol/patrolRecord")
-@AllArgsConstructor
-public class PatrolRecordController extends BladeController {
- private IPatrolRecordService patrolRecordService;
-
- /**
- * 分页列表查询
- */
- @ApiOperation(value="巡查记录-分页列表查询", notes="巡查记录-分页列表查询")
- @GetMapping(value = "/list")
- public R queryPageList(PatrolRecordVO patrolRecord, Query query) {
- IPage<PatrolRecord> pageList = patrolRecordService.selectPatrolRecord(Condition.getPage(query),patrolRecord);
- return R.data(pageList);
- }
-
- /**
- * 获取所有巡查记录
- */
- @ApiOperation(value="获取所有巡查类型", notes="获取所有巡查类型")
- @GetMapping(value = "/all")
- public R getAll(PatrolRecord patrolRecord){
- List<PatrolRecord> list = patrolRecordService.list(Condition.getQueryWrapper(patrolRecord));
- return R.data(list);
- }
-
- /**
- * 添加
- */
- @ApiOperation(value="巡查记录-添加", notes="巡查记录-添加")
- @PostMapping(value = "/add")
- public R add(@RequestBody PatrolRecord patrolRecord) {
- return R.data(patrolRecordService.save(patrolRecord));
- }
-
- /**
- * 编辑
- */
- @ApiOperation(value="巡查记录-编辑", notes="巡查记录-编辑")
- @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
- public R edit(@RequestBody PatrolRecord patrolRecord) {
- return R.data(patrolRecordService.updateById(patrolRecord));
- }
-
- /**
- * 通过id删除
- *
- * @param id
- * @return
- */
- @ApiOperation(value="巡查记录-通过id删除", notes="巡查记录-通过id删除")
- @PostMapping(value = "/delete")
- public R delete(@RequestParam(name="id",required=true) String id) {
- return R.data(patrolRecordService.removeById(id));
- }
-
- /**
- * 批量删除
- *
- * @param ids
- * @return
- */
- @ApiOperation(value="巡查记录-批量删除", notes="巡查记录-批量删除")
- @PostMapping(value = "/deleteBatch")
- public R deleteBatch(@RequestParam(name="ids",required=true) String ids) {
- return R.data(patrolRecordService.removeByIds(Arrays.asList(ids.split(","))));
- }
-
- /**
- * 通过id查询
- *
- * @param id
- * @return
- */
- @ApiOperation(value="巡查记录-通过id查询", notes="巡查记录-通过id查询")
- @GetMapping(value = "/queryById")
- public R queryById(@RequestParam(name="id",required=true) String id) {
- PatrolRecordVO patrolRecordVO = patrolRecordService.getDetail(id);
- return R.data(patrolRecordVO);
- }
-
- /**
- * 通过taskId,itemsIds查询(用来判断是否完成任务)
- * @return
- */
- @ApiOperation(value="巡查记录-通过taskId,itemsIds查询", notes="巡查记录-通过taskId,itemsIds查询")
- @GetMapping(value = "/getPatrolRecordByTaskId")
- public R getPatrolRecordByTaskId(String taskId,String itemIds) {
- List<PatrolGroupItemVO> list = patrolRecordService.getPatrolRecordByTaskId(taskId,itemIds);
- return R.data(list);
- }
-
- /**
- * 通过taskId,itemsIds查询(用来查询巡查记录)
- * @return
- */
- @ApiOperation(value="巡查记录-通过itemId查询", notes="巡查记录-通过itemId查询")
- @GetMapping(value = "/getByTaskIdAndItemId")
- public R getByTaskIdAndItemId(String taskId,String itemIds){
- List<PatrolRecordVO> list = patrolRecordService.getByTaskIdAndItemId(taskId,itemIds);
- return R.data(list);
- }
-
- /**
- * 通过itemIds查询(用于巡查上报时的回显)
- *
- * @return
- */
- @ApiOperation(value="巡查指标项目-通过itemIds查询", notes="巡查指标项目-通过itemIds查询")
- @GetMapping(value = "/getItemByItemIds")
- public R getItemByItemIds(String itemIds,String groupId,String taskId){
- List list = patrolRecordService.getItemByItemIds(itemIds,groupId,taskId);
- return R.data(list);
- }
-
- /**
- * 通过任务id和组id获取记录表中的数据,用于数据回显
- *
- * @return
- */
- @GetMapping(value = "/getByTaskIdAndGroupId")
- public R getByTaskIdAndGroupId(PatrolRecordVO patrolRecordVO){
- List<PatrolRecord> list = patrolRecordService.getByTaskIdAndGroupId(patrolRecordVO);
- return R.data(list);
- }
-
- /**
- * 记录更新并且新增数据(适用于app处理)
- */
- // @ApiOperation(value="巡查记录-记录更新并且新增数据", notes="巡查记录-记录更新并且新增数据")
- // @RequestMapping(value = "/updateThenSaveBatch", method = {RequestMethod.PUT,RequestMethod.POST})
- // public R updateThenSaveBatch(@RequestBody RecordBatchVO recordBatchVO){
- // return R.data(patrolRecordService.updateThenSaveBatch(recordBatchVO));
- // }
-
- /**
- * 获取历史记录
- */
- @ApiOperation(value="巡查记录-获取历史记录", notes="巡查记录-获取历史记录")
- @RequestMapping(value = "/getHistoryRecord", method = {RequestMethod.PUT,RequestMethod.POST})
- public R getHistoryRecord(PatrolRecordVO patrolRecordVO){
- return R.data(patrolRecordService.getHistoryRecord(patrolRecordVO));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/dto/PatrolGroupDTO.java b/src/main/java/org/springblade/modules/patrol/dto/PatrolGroupDTO.java
deleted file mode 100644
index 417d956..0000000
--- a/src/main/java/org/springblade/modules/patrol/dto/PatrolGroupDTO.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.springblade.modules.patrol.dto;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import org.springblade.modules.patrol.entity.PatrolGroup;
-
-/**
- * 巡查指标组对象 jczz_patrol_group
- *
- * @author ${context.author}
- * @date 2024-01-29 13:40:49
- */
-@ApiModel(value = "PatrolGroupDTO对象")
-@Data
-public class PatrolGroupDTO extends PatrolGroup {
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/dto/PatrolGroupItemDTO.java b/src/main/java/org/springblade/modules/patrol/dto/PatrolGroupItemDTO.java
deleted file mode 100644
index 8a3845c..0000000
--- a/src/main/java/org/springblade/modules/patrol/dto/PatrolGroupItemDTO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.patrol.dto;
-
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-
-/**
- * 巡查指标项目对象 jczz_patrol_group_item
- *
- * @author ${context.author}
- * @date 2024-01-29 13:40:49
- */
-@ApiModel(value = "PatrolGroupItemDTO对象")
-@Data
-public class PatrolGroupItemDTO extends PatrolGroupItem {
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/dto/PatrolRecordDTO.java b/src/main/java/org/springblade/modules/patrol/dto/PatrolRecordDTO.java
deleted file mode 100644
index 3dfa9dc..0000000
--- a/src/main/java/org/springblade/modules/patrol/dto/PatrolRecordDTO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.patrol.dto;
-
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-
-/**
- * 巡查记录表对象 jczz_patrol_record
- *
- * @author ${context.author}
- * @date 2024-01-29 13:40:49
- */
-@ApiModel(value = "PatrolRecordDTO对象")
-@Data
-public class PatrolRecordDTO extends PatrolRecord {
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/entity/PatrolGroup.java b/src/main/java/org/springblade/modules/patrol/entity/PatrolGroup.java
deleted file mode 100644
index 3447f3f..0000000
--- a/src/main/java/org/springblade/modules/patrol/entity/PatrolGroup.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.springblade.modules.patrol.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 巡查指标组对象 jczz_patrol_group
- *
- * @author ${context.author}
- * @date 2024-01-29 13:40:49
- */
-@ApiModel(value = "PatrolGroup对象" , description = "巡查指标组")
-@Data
-@TableName("jczz_patrol_group")
-public class PatrolGroup implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
-
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 名称 */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 修改时间 */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 是否已删除 0: 否 1:是 */
- @ApiModelProperty(value = "是否已删除 0: 否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 1.自查 2.无诈 */
- @ApiModelProperty(value = "1.自查 2.无诈", example = "")
- @TableField("type")
- private Integer type;
-}
diff --git a/src/main/java/org/springblade/modules/patrol/entity/PatrolGroupItem.java b/src/main/java/org/springblade/modules/patrol/entity/PatrolGroupItem.java
deleted file mode 100644
index a36c900..0000000
--- a/src/main/java/org/springblade/modules/patrol/entity/PatrolGroupItem.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.springblade.modules.patrol.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 巡查指标项目对象 jczz_patrol_group_item
- *
- * @author ${context.author}
- * @date 2024-01-29 13:40:49
- */
-@ApiModel(value = "PatrolGroupItem对象" , description = "巡查指标项目")
-@Data
-@TableName("jczz_patrol_group_item")
-public class PatrolGroupItem implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 内容组id */
- @ApiModelProperty(value = "内容组id", example = "")
- @TableField("group_id")
- private Long groupId;
-
- /** 名称 */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("items_name")
- private String itemsName;
-
- /** 名称说明 */
- @ApiModelProperty(value = "名称说明", example = "")
- @TableField("description")
- private String description;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 修改时间 */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 是否已删除 0: 否 1:是 */
- @ApiModelProperty(value = "是否已删除 0: 否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 1.自查 2.“无诈”企业 3.“无诈”工地 4.“无诈”学校 5.“无诈”医院 6.“无诈”村(社区7.“无诈”厂(园)区 8.“无诈”单位 */
- @ApiModelProperty(value = "1.自查 2.“无诈”企业 3.“无诈”工地 4.“无诈”学校 5.“无诈”医院 6.“无诈”村(社区7.“无诈”厂(园)区 8.“无诈”单位", example = "")
- @TableField("type")
- private Integer type;
-}
diff --git a/src/main/java/org/springblade/modules/patrol/entity/PatrolRecord.java b/src/main/java/org/springblade/modules/patrol/entity/PatrolRecord.java
deleted file mode 100644
index ddab949..0000000
--- a/src/main/java/org/springblade/modules/patrol/entity/PatrolRecord.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.springblade.modules.patrol.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 巡查记录表对象 jczz_patrol_record
- *
- * @author ${context.author}
- * @date 2024-01-29 13:40:49
- */
-@ApiModel(value = "PatrolRecord对象" , description = "巡查记录表")
-@Data
-@TableName("jczz_patrol_record")
-public class PatrolRecord implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 内容项id */
- @ApiModelProperty(value = "内容项id", example = "")
- @TableField("item_id")
- private Integer itemId;
-
- /** 场所检查id */
- @ApiModelProperty(value = "场所检查id", example = "")
- @TableField("place_check_id")
- private Long placeCheckId;
-
- /** 是否存在隐患 0:存在 1 不存在 */
- @ApiModelProperty(value = "是否存在隐患 0:存在 1 不存在", example = "")
- @TableField("state")
- private Integer state;
-
- /** 隐患备注 */
- @ApiModelProperty(value = "隐患备注", example = "")
- @TableField("remark")
- private String remark;
-
- /** 照片 */
- @ApiModelProperty(value = "照片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 修改时间 */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 是否删除 0: 否 1:是 */
- @ApiModelProperty(value = "是否删除 0: 否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 整改照片 */
- @ApiModelProperty(value = "整改照片", example = "")
- @TableField("rectification_image_urls")
- private String rectificationImageUrls;
-
- /** 整改描述 */
- @ApiModelProperty(value = "整改描述", example = "")
- @TableField("rectification_remark")
- private String rectificationRemark;
-
- /** 整改时间 */
- @ApiModelProperty(value = "整改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_time")
- private Date rectificationTime;
-}
diff --git a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupItemMapper.java b/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupItemMapper.java
deleted file mode 100644
index 39e23d9..0000000
--- a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupItemMapper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.springblade.modules.patrol.mapper;
-
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-
-import java.util.List;
-
-/**
- * @Description: 巡查指标项目
- */
-public interface PatrolGroupItemMapper extends BaseMapper<PatrolGroupItem> {
-
- List<PatrolGroupItemVO> selectPatrolGroupItemList(@Param("patrolGroupItem") PatrolGroupItemVO patrolGroupItem);
-
- PatrolGroupItemVO getPatrolGroupItemVOById(@Param("id") Long id);
-
- List<PatrolGroupItem> getItemByItemIds(@Param("itemIds") String itemIds, @Param("groupId") String groupId);
-}
diff --git a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupItemMapper.xml b/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupItemMapper.xml
deleted file mode 100644
index e5b09f1..0000000
--- a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupItemMapper.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.patrol.mapper.PatrolGroupItemMapper">
-
- <select id="selectPatrolGroupItemList" resultType="org.springblade.modules.patrol.vo.PatrolGroupItemVO">
- SELECT
- spgi.id,spgi.group_id,spgi.items_name,spgi.description,
- spg.name as groupName
- FROM jczz_patrol_group_ITEM spgi
- left join jczz_patrol_group spg on spg.id = spgi.group_id
- WHERE spgi.is_deleted = 0
- <if test="patrolGroupItem.groupId != null and patrolGroupItem.groupId != '' ">
- and spgi.group_id = #{patrolGroupItem.groupId}
- </if>
- <if test="patrolGroupItem.itemsName !=null and patrolGroupItem.itemsName !=''">
- AND spgi.items_name LIKE CONCAT('%',#{patrolGroupItem.itemsName},'%')
- </if>
- <if test="patrolGroupItem.description !=null and patrolGroupItem.description !=''">
- AND spgi.description LIKE CONCAT('%',#{patrolGroupItem.description},'%')
- </if>
- </select>
- <select id="getPatrolGroupItemVOById" resultType="org.springblade.modules.patrol.vo.PatrolGroupItemVO">
- SELECT item.id,item.items_name,item.description,item.group_id,b.name groupName
- FROM jczz_patrol_group_item item
- LEFT JOIN sm_patrol_group b ON b.id = item.group_id
- WHERE item.is_deleted = 0
- AND item.id = #{id}
- </select>
- <select id="getItemByItemIds" resultType="org.springblade.modules.patrol.entity.PatrolGroupItem">
- SELECT ID,GROUP_ID,ITEMS_NAME,DESCRIPTION FROM jczz_patrol_group_ITEM
- WHERE ID IN
- <foreach collection="itemIds.split(',')" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- AND is_deleted = 0 AND group_id = #{groupId}
- </select>
-
-<!-- <resultMap type="org.springblade.modules.dto.PatrolGroupDTO" id="PatrolGroupDTOResult">-->
-<!-- <result property="id" column="id" />-->
-<!-- <result property="name" column="name" />-->
-<!-- <result property="createUser" column="create_user" />-->
-<!-- <result property="createTime" column="create_time" />-->
-<!-- <result property="updateTime" column="update_time" />-->
-<!-- <result property="isDeleted" column="is_deleted" />-->
-<!-- </resultMap>-->
-
- <sql id="selectPatrolGroup">
- select
- id,
- name,
- create_user,
- create_time,
- update_time,
- is_deleted
- from
- jczz_patrol_group
- </sql>
-
-<!-- <select id="selectPatrolGroupById" parameterType="long" resultMap="PatrolGroupDTOResult">-->
-<!-- <include refid="selectPatrolGroup"/>-->
-<!-- where-->
-<!-- id = #{id}-->
-<!-- </select>-->
-
-<!-- <select id="selectPatrolGroupList" parameterType="org.springblade.modules.dto.PatrolGroupDTO" resultMap="PatrolGroupDTOResult">-->
-<!-- <include refid="selectPatrolGroup"/>-->
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>-->
-<!-- <if test="name != null and name != ''"> and name = #{name}</if>-->
-<!-- <if test="createUser != null "> and create_user = #{createUser}</if>-->
-<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
-<!-- <if test="updateTime != null "> and update_time = #{updateTime}</if>-->
-<!-- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>-->
-<!-- </where>-->
-<!-- </select>-->
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.java b/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.java
deleted file mode 100644
index fcd1520..0000000
--- a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.springblade.modules.patrol.mapper;
-
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.core.tool.node.TreeNode;
-import org.springblade.modules.patrol.dto.PatrolGroupDTO;
-import org.springblade.modules.patrol.entity.PatrolGroup;
-import org.springblade.modules.patrol.vo.PatrolGroupVO;
-
-import java.util.List;
-
-/**
- * @Description: 巡查指标组
- */
-public interface PatrolGroupMapper extends BaseMapper<PatrolGroup> {
-
- List<PatrolGroup> getPatrolGroupByProjectId(@Param("projectId") String projectId);
- /**
- * 自定义分页
- *
- * @param page
- * @param patrolGroup
- * @return
- */
- List<PatrolGroupVO> selectPatrolGroupPage(IPage page, @Param("patrolGroup") PatrolGroupVO patrolGroup);
-
- /**
- * 查询巡查项树数据
- * @return
- */
- List<TreeNode> getPatrolGroupTree(String type);
-
- /**
- * 查询巡查项树数据
- * @return
- */
- List<TreeNode> getPatrolGroupItemTree( String childType);
-
- List<PatrolGroup> getPatrolGroupByItemId(@Param("itemIds") String itemIds);
-
- List<PatrolGroupVO> getAllPatrolGroupByTaskId(@Param("taskId") String taskId);
-
- List<PatrolGroupDTO> getPatrolGroupDTO(@Param("taskId") String taskId);
-
- List<PatrolGroup> getPatrolGroupByTaskId(String taskId);
-
- List<PatrolGroupDTO> getGroupDTORecord(@Param("taskId")String taskId);
-}
diff --git a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.xml b/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.xml
deleted file mode 100644
index c410487..0000000
--- a/src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.patrol.mapper.PatrolGroupMapper">
-
- <select id="getPatrolGroupByProjectId" resultType="org.springblade.modules.patrol.entity.PatrolGroup">
- SELECT g.id,g.name
- FROM jczz_patrol_group g
- WHERE g.is_deleted = 0
- AND g.project_id = #{projectId}
- </select>
-
- <!-- 通用查询映射结果 -->
- <resultMap id="patrolGroupResultMap" type="org.springblade.modules.patrol.vo.PatrolGroupVO">
- <id property="id" column="id"/>
- <result property="name" column="name"/>
- <collection property="patrolGroupItemList" javaType="java.util.List" select="selectPatrolGroupItem"
- column="id"
- ofType="org.springblade.modules.patrol.vo.PatrolGroupItemVO" autoMapping="true">
- </collection>
-
- </resultMap>
-
- <select id="selectPatrolGroupItem" resultType="org.springblade.modules.patrol.vo.PatrolGroupItemVO">
- select
- id,
- group_id,
- items_name,
- description,
- create_user,
- create_time,
- update_time,
- is_deleted,
- type
- from
- jczz_patrol_group_item
- where group_id = #{houseCode} and is_deleted = 0
- </select>
-
- <select id="selectPatrolGroupPage" resultMap="patrolGroupResultMap">
- select * from jczz_patrol_group
- <where>
- <if test="patrolGroup.id != null "> and id = #{patrolGroup.id}</if>
- <if test="patrolGroup.name != null and patrolGroup.name != ''"> and name = #{patrolGroup.name}</if>
- <if test="patrolGroup.createUser != null "> and create_user = #{patrolGroup.createUser}</if>
- <if test="patrolGroup.createTime != null "> and create_time = #{patrolGroup.createTime}</if>
- <if test="patrolGroup.updateTime != null "> and update_time = #{patrolGroup.updateTime}</if>
- <if test="patrolGroup.isDeleted != null "> and is_deleted = #{patrolGroup.isDeleted}</if>
- <if test="patrolGroup.type != null "> and type = #{patrolGroup.type}</if>
- </where>
- </select>
-
- <!--查询巡查项树数据-->
- <select id="getPatrolGroupTree" resultType="org.springblade.core.tool.node.TreeNode" >
- SELECT
- spg.id,
- spg.name as title,
- 0 as parentId,
- (
- SELECT
- CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
- FROM
- jczz_patrol_group_item
- WHERE
- group_id = spg.id and is_deleted = 0
- ) AS "has_children"
- FROM jczz_patrol_group spg
- <where>
- spg.is_deleted = 0
- <if test="param1 != null">
- and spg.type = #{param1}
- </if>
- </where>
- order by spg.create_time desc
- </select>
-
- <!--查询巡查项树数据-->
- <select id="getPatrolGroupItemTree" resultType="org.springblade.core.tool.node.TreeNode" >
- SELECT
- spgi.id,
- spgi.items_name as title,
- spgi.group_id as parentId,
- false AS hasChildren
- FROM jczz_patrol_group_item spgi where spgi.is_deleted = 0
- <if test="param1 != null">
- and spgi.type = #{param1}
- </if>
- order by spgi.create_time desc
- </select>
- <select id="getPatrolGroupByItemId" resultType="org.springblade.modules.patrol.entity.PatrolGroup">
- SELECT distinct b.ID,b.NAME FROM
- (
- SELECT ID,GROUP_ID FROM SM_PATROL_GROUP_ITEM WHERE ID IN
- <foreach collection="itemIds.split(',')" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- ) a ,SM_PATROL_GROUP b
- WHERE b.is_deleted = 0 AND a.group_id = b.id
- </select>
- <select id="getAllPatrolGroupByTaskId" resultType="org.springblade.modules.patrol.vo.PatrolGroupVO">
- SELECT G.*,IF(C.GROUP_ID,1,2) isSelect,IFNULL(C.problemCount,0) problemCount FROM SM_PATROL_GROUP G
- LEFT JOIN (
- <!--获取巡查记录表中的已选项,并获取问题数量-->
- SELECT DISTINCT I.GROUP_ID,D.problemCount FROM SM_PATROL_RECORD R
- INNER JOIN SM_PATROL_GROUP_ITEM I ON R.ITEM_ID = I.ID
- LEFT JOIN (
- SELECT I.GROUP_ID,COUNT(*) problemCount FROM SM_PATROL_RECORD R
- INNER JOIN SM_PATROL_GROUP_ITEM I ON R.ITEM_ID = I.ID
- WHERE R.IS_DELETED = 0 AND R.TASK_ID = #{taskId}
- AND R.STATUS = 2
- AND R.SOLUTION = 2
- AND R.state = 0
- GROUP BY I.GROUP_ID
- )D ON D.GROUP_ID = I.GROUP_ID
- WHERE R.IS_DELETED = 0 AND R.TASK_ID = #{taskId}
- )C ON C.GROUP_ID = G.ID
- WHERE IS_DELETED = 0
- ORDER BY G.CREATE_TIME
- </select>
-
- <resultMap id="patrolGroupDTO" type="org.springblade.modules.patrol.dto.PatrolGroupDTO">
- <id property="id" column="id"/>
- <result property="name" column="gname"/>
- </resultMap>
-
-
- <select id="getPatrolGroupDTO" resultMap="patrolGroupDTO">
- SELECT G.ID,
- G.NAME AS gname,
- R.ID AS rId,
- R.VIDEOS,
- R.IMAGES,
- R.STATUS,
- R.IS_DELETED,
- R.ITEM_ID AS itemId,
- I.ITEMS_NAME AS itemsName,
- R.TASK_ID AS taskId ,
- R.SOLUTION,
- R.CONTENT
- FROM SM_PATROL_GROUP G
- LEFT JOIN SM_PATROL_GROUP_ITEM I ON I.GROUP_ID = G.ID
- LEFT JOIN SM_PATROL_RECORD R ON R.ITEM_ID = I.ID
- WHERE G.IS_DELETED = 0
- AND R.STATUS = 2 AND R.state = 0 AND R.SOLUTION = 2
- AND R.TASK_ID = #{taskId}
- </select>
-
-
- <select id="getPatrolGroupByTaskId" resultType="org.springblade.modules.patrol.entity.PatrolGroup">
- SELECT G.ID,G.NAME FROM SM_PATROL_GROUP G
- LEFT JOIN SM_PATROL_GROUP_ITEM I ON I.GROUP_ID = G.ID
- LEFT JOIN SM_PATROL_REPORT R ON R.ITEM_ID = I.ID
- WHERE G.IS_DELETED = 0
- AND R.STATUS = 2
- AND R.TASK_ID = #{taskId}
- </select>
- <select id="getGroupDTORecord" resultMap="patrolGroupDTO">
- SELECT G.ID,
- G.NAME AS gname,
- R.ID AS rId,
- R.VIDEOS,
- R.IMAGES,
- R.STATUS,
- R.IS_DELETED,
- R.ITEM_ID AS itemId,
- I.ITEMS_NAME AS itemsName,
- R.TASK_ID AS taskId ,
- R.SOLUTION,
- R.CONTENT
- FROM SM_PATROL_GROUP G
- LEFT JOIN SM_PATROL_GROUP_ITEM I ON I.GROUP_ID = G.ID
- LEFT JOIN SM_PATROL_RECORD R ON R.ITEM_ID = I.ID
- WHERE G.IS_DELETED = 0
- AND R.STATUS = 2
- AND R.TASK_ID = #{taskId}
- </select>
-
-
-
-<!-- <select id="selectPatrolGroupItemById" parameterType="long" resultMap="PatrolGroupItemDTOResult">-->
-<!-- <include refid="selectPatrolGroupItem"/>-->
-<!-- where-->
-<!-- id = #{id}-->
-<!-- </select>-->
-
-<!-- <select id="selectPatrolGroupItemList" parameterType="org.springblade.modules.patrol.dto.PatrolGroupItemDTO" resultMap="PatrolGroupItemDTOResult">-->
-<!-- <include refid="selectPatrolGroupItem"/>-->
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>-->
-<!-- <if test="groupId != null "> and group_id = #{groupId}</if>-->
-<!-- <if test="itemsName != null and itemsName != ''"> and items_name = #{itemsName}</if>-->
-<!-- <if test="description != null and description != ''"> and description = #{description}</if>-->
-<!-- <if test="createUser != null "> and create_user = #{createUser}</if>-->
-<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
-<!-- <if test="updateTime != null "> and update_time = #{updateTime}</if>-->
-<!-- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>-->
-<!-- </where>-->
-<!-- </select>-->
-</mapper>
diff --git a/src/main/java/org/springblade/modules/patrol/mapper/PatrolRecordMapper.java b/src/main/java/org/springblade/modules/patrol/mapper/PatrolRecordMapper.java
deleted file mode 100644
index fa5e3ce..0000000
--- a/src/main/java/org/springblade/modules/patrol/mapper/PatrolRecordMapper.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.springblade.modules.patrol.mapper;
-
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.patrol.dto.PatrolGroupDTO;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-
-import java.util.List;
-
-public interface PatrolRecordMapper extends BaseMapper<PatrolRecord> {
- List<PatrolRecord> selectPatrolRecord(IPage<PatrolRecord> page, @Param("patrolRecord") PatrolRecordVO patrolRecord);
-
- PatrolRecordVO getDetail(@Param("id") String id);
-
- PatrolRecord selectPatrolRecordByTaskIdAndItemId(@Param("taskId") String taskId, @Param("itemId") Long itemId);
-
- List<PatrolRecordVO> getByTaskIdAndItemId(@Param("taskId") String taskId, @Param("itemIds") String itemIds);
-
- PatrolRecordVO getPatrolRecordVO(@Param("itemId") Long itemId, @Param("taskId") String taskId);
-
- List<PatrolRecord> getByTaskIdAndGroupId(@Param("vo") PatrolRecordVO patrolRecordVO);
-
- List<PatrolGroupDTO> getHistoryRecord(@Param("vo") PatrolRecordVO patrolRecordVO);
-}
diff --git a/src/main/java/org/springblade/modules/patrol/mapper/PatrolRecordMapper.xml b/src/main/java/org/springblade/modules/patrol/mapper/PatrolRecordMapper.xml
deleted file mode 100644
index 6ab9ddd..0000000
--- a/src/main/java/org/springblade/modules/patrol/mapper/PatrolRecordMapper.xml
+++ /dev/null
@@ -1,249 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.patrol.mapper.PatrolRecordMapper">
-
- <resultMap id="selectPatrolRecordList" type="org.springblade.modules.patrol.vo.PatrolRecordVO">
- <result column="id" property="id"/>
- <result column="patrol_type" property="patrolType"/>
- <result column="device_ids" property="deviceIds"/>
- <result column="images" property="images"
- typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
- <result column="videos" property="videos"
- typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
- <result column="content" property="content"/>
- <result column="status" property="status"/>
- <result column="item_id" property="itemId"/>
- <result column="task_id" property="taskId"/>
- <result column="patrol_route" property="patrolRoute"/>
- <result column="taskRoute" property="taskRoute"/>
- <result property="groupName" column="groupName"/>
- <result property="groupId" column="groupId"/>
- <result property="itemsName" column="itemsName"/>
- <result property="description" column="description"/>
- <result property="patrolTime" column="update_time"/>
- <result property="phone" column="phone"/>
- <result property="toUserId" column="create_user"/>
- <result property="toUserName" column="real_name"/>
- <result property="taskName" column="taskName"/>
-
- <result column="create_user" property="createUser"/>
- <result column="create_dept" property="createDept"/>
-
- <result column="update_time" property="updateTime"/>
-
- </resultMap>
-
- <select id="selectPatrolRecord" resultMap="selectPatrolRecordList">
- SELECT
- record.id,record.patrol_type,record.device_ids,record.images,record.videos,record.content,record.status,record.item_id,record.task_id,record.patrol_route,record.create_time,record.update_time,record.solution,
- task.route_coordinates taskRoute,task.title taskName,
- item.items_name itemsName,item.description,
- u.real_name,res."name" resName,res."guid" resGuid,res."res_reg_code" resRegCode,res."res_loc" resLoc
- FROM SM_PATROL_RECORD record
- LEFT JOIN sm_patrol_type type ON type.id = record.patrol_type
- LEFT JOIN sm_patrol_task task ON task.id = record.task_id
- LEFT JOIN sjzt_md."att_res_base" res ON task.project_id = res."guid"
- LEFT JOIN jczz_patrol_group_item item ON item.id = record.item_id
- LEFT JOIN BLADE_USER u ON u.id = record.create_user
- WHERE record.is_deleted = 0
- <if test="patrolRecord.status !=null and patrolRecord.status != '' ">
- AND record.status = #{patrolRecord.status}
- </if>
- <if test="patrolRecord.patrolType !=null and patrolRecord.patrolType !=''">
- AND record.patrolType = #{patrolRecord.patrolType}
- </if>
- <if test="patrolRecord.taskId !=null and patrolRecord.taskId !=''">
- AND record.task_id = #{patrolRecord.taskId}
- </if>
- <if test="patrolRecord.resName != null and patrolRecord.resName !=''">
- AND res."name" LIKE CONCAT('%',#{patrolRecord.resName},'%')
- </if>
- ORDER BY record.create_time DESC
- </select>
- <select id="getDetail" resultMap="selectPatrolRecordList">
- SELECT
- record.id,record.patrol_type,record.images,record.videos,record.content,record.status,record.item_id,record.content,record.task_id,record.patrol_route,record.create_user,record.solution,
- item.description,
- u.phone
- FROM SM_PATROL_RECORD record
- LEFT JOIN sm_patrol_type type ON type.id = record.patrol_type
- LEFT JOIN sm_patrol_task task ON task.id = record.task_id
- LEFT JOIN jczz_patrol_group_item item ON item.id = record.item_id
- LEFT JOIN BLADE_USER u ON u.id = record.create_user
- WHERE record.is_deleted = 0
- AND record.id =#{id}
- </select>
- <select id="selectPatrolRecordByTaskIdAndItemId" resultType="org.springblade.modules.patrol.entity.PatrolRecord">
- SELECT id FROM sm_patrol_record WHERE is_deleted = 0 AND task_id = #{taskId} AND item_id = #{itemId}
- </select>
-
- <select id="getByTaskIdAndItemId" resultMap="selectPatrolRecordList">
- SELECT r.id,r.patrol_type,r.device_ids,r.images,r.videos,r.content,r.status,r.item_id,r.task_id,r.update_time,r.solution,
- c.name groupName,c.id groupId,c.items_name itemsName,c.description,
- u.real_name
- FROM SM_PATROL_RECORD r
- LEFT JOIN
- (SELECT g.ID,g.NAME,a.id itemId, a.items_name,description FROM
- (
- SELECT ID,GROUP_ID,items_name,description FROM SM_PATROL_GROUP_ITEM WHERE ID IN
- <foreach collection="itemIds.split(',')" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- ) a ,SM_PATROL_GROUP g
- WHERE g.is_deleted = 0 AND a.group_id = g.id) c
-
- ON c.itemId = r.item_id
- LEFT JOIN SM_PATROL_TASK t ON t.id = r.task_id
- LEFT JOIN BLADE_USER u ON u.id = r.create_user
- where r.task_id = #{taskId}
- </select>
- <select id="getPatrolRecordVO" resultMap="selectPatrolRecordList">
- SELECT r.id,r.patrol_type,r.device_ids,r.images,r.videos,r.content,r.status,r.item_id,r.task_id,r.create_user,r.create_dept,r.solution,
- i.items_name itemsName,i.description
- FROM sm_patrol_record r
- LEFT JOIN jczz_patrol_group_item i ON i.id = r.item_id
- WHERE r.is_deleted = 0
- AND r.item_id = #{itemId}
- AND r.task_id = #{taskId}
- </select>
- <select id="getByTaskIdAndGroupId" resultMap="selectPatrolRecordList">
- SELECT
- c.group_id AS groupId,
- r.id,
- r.patrol_type,
- r.device_ids,
- r.images,
- r.videos,
- r.content,
- r.status,
- r.item_id,
- r.task_id,
- r.create_user,
- r.create_dept,
- r.solution,
- C.items_name AS itemsName,
- C.description
- FROM SM_PATROL_RECORD r
- RIGHT JOIN (
- SELECT B.ID,B.GROUP_ID,B.ITEMS_NAME,B.DESCRIPTION
- FROM SM_PATROL_GROUP A
- INNER JOIN SM_PATROL_GROUP_ITEM B ON A.ID = B.GROUP_ID
- WHERE 1=1
- <if test="vo.groupId != null and vo.groupId !=''">
- AND B.GROUP_ID = #{vo.groupId}
- </if>
- ORDER BY B.GROUP_ID
- )C ON C.ID = r.ITEM_ID
- WHERE r.state = 0
- <if test="vo.taskId != null and vo.taskId !=''">
- AND r.task_id = #{vo.taskId}
- </if>
- <if test="vo.flowTaskId != null and vo.flowTaskId !=''">
- AND r.flow_task_id = #{vo.flowTaskId}
- </if>
- </select>
-
- <resultMap id="patrolGroupDTO" type="org.springblade.modules.patrol.dto.PatrolGroupDTO">
- <id property="id" column="id"/>
- <result property="name" column="gname"/>
- <collection property="patrolRecordVOList" javaType="java.util.List" ofType="org.springblade.modules.patrol.vo.PatrolRecordVO">
- <result property="id" column="rId"/>
- <result property="videos" column="videos" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
- <result property="images" column="images" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
- <result property="status" column="status"/>
- <result property="isDeleted" column="isDeleted"/>
- <result property="itemId" column="itemId"/>
- <result property="itemsName" column="itemsName"/>
- <result property="taskId" column="taskId"/>
- <result property="solution" column="solution"/>
- <result property="content" column="content"/>
- </collection>
- </resultMap>
-
- <select id="getHistoryRecord" resultMap="patrolGroupDTO">
-
- SELECT G.ID,
- G.NAME AS gname,
- R.ID AS rId,
- R.VIDEOS,
- R.IMAGES,
- R.STATUS,
- R.IS_DELETED,
- R.ITEM_ID AS itemId,
- I.ITEMS_NAME AS itemsName,
- R.TASK_ID AS taskId ,
- R.SOLUTION,
- R.CONTENT
- FROM SM_PATROL_GROUP G
- LEFT JOIN SM_PATROL_GROUP_ITEM I ON I.GROUP_ID = G.ID
- LEFT JOIN SM_PATROL_RECORD R ON R.ITEM_ID = I.ID
- WHERE G.IS_DELETED = 0
- <if test="vo.flowTaskId != null and vo.flowTaskId !='' ">
- AND R.FLOW_TASK_ID = #{vo.flowTaskId}
- </if>
- <if test="vo.taskId !=null and vo.taskId !='' ">
- AND R.TASK_ID = #{vo.taskId}
- </if>
- <if test="vo.recordType !=null and vo.recordType !=''">
- AND R.record_type = #{vo.recordType}
- </if>
-
- </select>
-
-
-
-<!-- <resultMap type="org.springblade.modules.dto.PatrolRecordDTO" id="PatrolRecordDTOResult">-->
-<!-- <result property="id" column="id" />-->
-<!-- <result property="itemId" column="item_id" />-->
-<!-- <result property="placeCheckId" column="place_check_id" />-->
-<!-- <result property="state" column="state" />-->
-<!-- <result property="remark" column="remark" />-->
-<!-- <result property="imageUrls" column="image_urls" />-->
-<!-- <result property="createUser" column="create_user" />-->
-<!-- <result property="createTime" column="create_time" />-->
-<!-- <result property="isDeleted" column="is_deleted" />-->
-<!-- </resultMap>-->
-
-
- <sql id="selectPatrolRecord">
- select
- id,
- item_id,
- place_check_id,
- state,
- remark,
- image_urls,
- create_user,
- create_time,
- is_deleted,
- rectification_image_urls,
- rectification_remark,
- rectification_time
- from
- jczz_patrol_record
- </sql>
-
-
- <!-- <select id="selectPatrolRecordById" parameterType="long" resultMap="PatrolRecordDTOResult">-->
-<!-- <include refid="selectPatrolRecord"/>-->
-<!-- where-->
-<!-- id = #{id}-->
-<!-- </select>-->
-
-<!-- <select id="selectPatrolRecordList" parameterType="org.springblade.modules.dto.PatrolRecordDTO" resultMap="PatrolRecordDTOResult">-->
-<!-- <include refid="selectPatrolRecord"/>-->
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>-->
-<!-- <if test="itemId != null "> and item_id = #{itemId}</if>-->
-<!-- <if test="placeCheckId != null "> and place_check_id = #{placeCheckId}</if>-->
-<!-- <if test="state != null "> and state = #{state}</if>-->
-<!-- <if test="remark != null and remark != ''"> and remark = #{remark}</if>-->
-<!-- <if test="imageUrls != null and imageUrls != ''"> and image_urls = #{imageUrls}</if>-->
-<!-- <if test="createUser != null "> and create_user = #{createUser}</if>-->
-<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
-<!-- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>-->
-<!-- </where>-->
-<!-- </select>-->
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/patrol/service/IPatrolGroupItemService.java b/src/main/java/org/springblade/modules/patrol/service/IPatrolGroupItemService.java
deleted file mode 100644
index 812289e..0000000
--- a/src/main/java/org/springblade/modules/patrol/service/IPatrolGroupItemService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.springblade.modules.patrol.service;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-
-import java.util.List;
-
-/**
- * @Description: 巡查指标项目
- */
-public interface IPatrolGroupItemService extends IService<PatrolGroupItem> {
-
- /**
- * 查询全部
- * @param patrolGroupItem
- * @return
- */
- List<PatrolGroupItemVO> selectPatrolGroupItemList(PatrolGroupItemVO patrolGroupItem);
-
- /**
- * 自定义分页
- * @param page
- * @param patrolGroupItem
- * @return
- */
- IPage<PatrolGroupItemVO> selectPatrolConfig(IPage<PatrolGroupItemVO> page, PatrolGroupItemVO patrolGroupItem);
-
- /**
- * 获取vo数据
- * @param id
- * @return
- */
- PatrolGroupItemVO getPatrolGroupItemVOById(Long id);
-
- /**
- * 获取项集合
- * @param itemIds 指标项ids
- * @param groupId 组id
- * @return
- */
- List<PatrolGroupItem> getItemByItemIds(String itemIds, String groupId);
-}
diff --git a/src/main/java/org/springblade/modules/patrol/service/IPatrolGroupService.java b/src/main/java/org/springblade/modules/patrol/service/IPatrolGroupService.java
deleted file mode 100644
index c3c2672..0000000
--- a/src/main/java/org/springblade/modules/patrol/service/IPatrolGroupService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.springblade.modules.patrol.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.patrol.dto.PatrolGroupDTO;
-import org.springblade.modules.patrol.entity.PatrolGroup;
-import org.springblade.modules.patrol.vo.PatrolGroupVO;
-
-import java.util.List;
-
-/**
- * @Description: 巡查指标组
- */
-public interface IPatrolGroupService extends IService<PatrolGroup> {
-
- /**
- * 自定义分页查询
- * @param page
- * @param patrolGroup
- * @return
- */
- IPage<PatrolGroup> selectPatrolConfig(IPage<Object> page, PatrolGroup patrolGroup);
-
- /**
- * 自定义分页
- *
- * @param page
- * @param patrolGroup
- * @return
- */
- IPage<PatrolGroupVO> selectPatrolGroupPage(IPage<PatrolGroupVO> page, PatrolGroupVO patrolGroup);
-
-
- List<PatrolGroup> getPatrolGroupByProjectId(String projectId);
-
- /**
- * 查询巡查项树数据
- * @return
- */
- Object getPatrolGroupTree(String type,String childType);
-
- /**
- * 获取组
- * @param itemIds 项ids
- * @return
- */
- List<PatrolGroup> getPatrolGroupByItemId(String itemIds);
-
- List<PatrolGroupVO> getAllPatrolGroupByTaskId(String taskId);
-
- List<PatrolGroupDTO> getPatrolGroupDTO(String taskId);
-
- List<PatrolGroup> getPatrolGroupByTaskId(String taskId);
-
- List<PatrolGroupDTO> getGroupDTORecord(String taskId);
-
- boolean addTwo(PatrolGroupVO patrolGroup);
-
- boolean removePatrolGroupByIds(List<String> asList);
-}
diff --git a/src/main/java/org/springblade/modules/patrol/service/IPatrolRecordService.java b/src/main/java/org/springblade/modules/patrol/service/IPatrolRecordService.java
deleted file mode 100644
index d98414a..0000000
--- a/src/main/java/org/springblade/modules/patrol/service/IPatrolRecordService.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.springblade.modules.patrol.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.patrol.dto.PatrolGroupDTO;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-
-import java.util.List;
-
-public interface IPatrolRecordService extends IService<PatrolRecord> {
- /**
- * 自定义分页查询
- * @param page
- * @param patrolRecord
- * @return
- */
- IPage<PatrolRecord> selectPatrolRecord(IPage<PatrolRecord> page, PatrolRecordVO patrolRecord);
-
- /**
- * 获取详情
- * @param id
- * @return
- */
- PatrolRecordVO getDetail(String id);
-
- /**
- * 根据任务id查询巡查记录表中的内容
- * @param taskId
- * @param itemIds
- * @return
- */
- List<PatrolGroupItemVO> getPatrolRecordByTaskId(String taskId, String itemIds);
-
- /**
- * 通过taskId,itemsIds查询(用来查询巡查记录)
- * @param taskId 任务id
- * @param itemIds 项ids
- * @return
- */
- List<PatrolRecordVO> getByTaskIdAndItemId(String taskId, String itemIds);
-
- /**
- * 用于app巡查上报
- * @param itemIds
- * @param groupId
- * @param taskId
- * @return
- */
- List getItemByItemIds(String itemIds, String groupId, String taskId);
-
- List<PatrolRecord> getByTaskIdAndGroupId(PatrolRecordVO patrolRecordVO);
-
- // Boolean updateThenSaveBatch(RecordBatchVO recordBatchVO);
-
- List<PatrolGroupDTO> getHistoryRecord(PatrolRecordVO patrolRecordVO);
-}
diff --git a/src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupItemServiceImpl.java b/src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupItemServiceImpl.java
deleted file mode 100644
index b31d4fa..0000000
--- a/src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupItemServiceImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.springblade.modules.patrol.service.impl;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import lombok.AllArgsConstructor;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-import org.springblade.modules.patrol.mapper.PatrolGroupItemMapper;
-import org.springblade.modules.patrol.service.IPatrolGroupItemService;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * @Description: 巡查指标项目
- */
-@Service
-@AllArgsConstructor
-public class PatrolGroupItemServiceImpl extends ServiceImpl<PatrolGroupItemMapper, PatrolGroupItem> implements IPatrolGroupItemService {
-
- @Override
- public List<PatrolGroupItemVO> selectPatrolGroupItemList(PatrolGroupItemVO patrolGroupItem) {
- return baseMapper.selectPatrolGroupItemList(patrolGroupItem);
- }
-
- @Override
- public IPage<PatrolGroupItemVO> selectPatrolConfig(IPage<PatrolGroupItemVO> page, PatrolGroupItemVO patrolGroupItem) {
- return page.setRecords(baseMapper.selectPatrolGroupItemList(patrolGroupItem));
- }
-
- @Override
- public PatrolGroupItemVO getPatrolGroupItemVOById(Long id) {
- return baseMapper.getPatrolGroupItemVOById(id);
- }
-
- @Override
- public List<PatrolGroupItem> getItemByItemIds(String itemIds, String groupId) {
- return baseMapper.getItemByItemIds(itemIds,groupId);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupServiceImpl.java b/src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupServiceImpl.java
deleted file mode 100644
index f540b6f..0000000
--- a/src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupServiceImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.springblade.modules.patrol.service.impl;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.tool.node.TreeNode;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.patrol.dto.PatrolGroupDTO;
-import org.springblade.modules.patrol.entity.PatrolGroup;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-import org.springblade.modules.patrol.mapper.PatrolGroupMapper;
-import org.springblade.modules.patrol.service.IPatrolGroupItemService;
-import org.springblade.modules.patrol.service.IPatrolGroupService;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-import org.springblade.modules.patrol.vo.PatrolGroupVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * @Description: 巡查指标组
- */
-@Service
-public class PatrolGroupServiceImpl extends ServiceImpl<PatrolGroupMapper, PatrolGroup> implements IPatrolGroupService {
- @Autowired
- private IPatrolGroupItemService patrolGroupItemService;
-
- @Override
- public IPage<PatrolGroupVO> selectPatrolGroupPage(IPage<PatrolGroupVO> page, PatrolGroupVO patrolGroup) {
- patrolGroup.setIsDeleted(0);
- List<PatrolGroupVO> patrolGroupVOS = baseMapper.selectPatrolGroupPage(page, patrolGroup);
- return page.setRecords(patrolGroupVOS);
- }
-
- @Override
- public IPage<PatrolGroup> selectPatrolConfig(IPage<Object> page, PatrolGroup patrolGroup) {
- return null;
- }
-
- @Override
- public List<PatrolGroup> getPatrolGroupByProjectId(String projectId) {
- return baseMapper.getPatrolGroupByProjectId(projectId);
- }
-
- /**
- * 查询巡查项树数据
- *
- * @return
- */
- @Override
- public Object getPatrolGroupTree(String type, String childType) {
- // 查询父树目录
- List<TreeNode> patrolGroupTree = baseMapper.getPatrolGroupTree(type);
- // 查询孩子树目录
- List<TreeNode> patrolGroupItemTree = baseMapper.getPatrolGroupItemTree(childType);
- // 数据处理
- return NodeTreeUtil.getNodeTree(patrolGroupTree, patrolGroupItemTree);
- }
-
- @Override
- public List<PatrolGroup> getPatrolGroupByItemId(String itemIds) {
- return baseMapper.getPatrolGroupByItemId(itemIds);
- }
-
- @Override
- public List<PatrolGroupVO> getAllPatrolGroupByTaskId(String taskId) {
- return baseMapper.getAllPatrolGroupByTaskId(taskId);
- }
-
- @Override
- public List<PatrolGroupDTO> getPatrolGroupDTO(String taskId) {
- return baseMapper.getPatrolGroupDTO(taskId);
- }
-
- @Override
- public List<PatrolGroup> getPatrolGroupByTaskId(String taskId) {
- return baseMapper.getPatrolGroupByTaskId(taskId);
- }
-
- @Override
- public List<PatrolGroupDTO> getGroupDTORecord(String taskId) {
- return baseMapper.getGroupDTORecord(taskId);
- }
-
- @Override
- public boolean addTwo(PatrolGroupVO patrolGroup) {
- boolean orUpdate = saveOrUpdate(patrolGroup);
- if (orUpdate) {
- List<PatrolGroupItemVO> patrolGroupItemList = patrolGroup.getPatrolGroupItemList();
- for (PatrolGroupItemVO patrolGroupItemVO : patrolGroupItemList) {
- patrolGroupItemVO.setGroupId(patrolGroup.getId());
- }
- List<PatrolGroupItem> patrolGroupItems = BeanUtil.copy(patrolGroupItemList, PatrolGroupItem.class);
- patrolGroupItemService.saveOrUpdateBatch(patrolGroupItems);
- }
- return false;
- }
-
- @Override
- public boolean removePatrolGroupByIds(List<String> asList) {
- if (asList == null || asList.isEmpty()) {
- return false;
- }
- // 将IPatrolGroupItemService实例化提到循环外部以避免重复实例化
- IPatrolGroupItemService bean = SpringUtils.getBean(IPatrolGroupItemService.class);
- boolean allSuccess = true; // 记录是否有任何操作失败
- for (String id : asList) {
- try {
- PatrolGroup patrolGroup = baseMapper.selectById(id);
- if (patrolGroup != null) {
- patrolGroup.setIsDeleted(1);
- int update = baseMapper.updateById(patrolGroup);
- if (update > 0) {
- allSuccess = bean.update(Wrappers.<PatrolGroupItem>lambdaUpdate()
- .set(PatrolGroupItem::getIsDeleted, 1)
- .eq(PatrolGroupItem::getGroupId, id));
- }
- }
- } catch (Exception e) {
- // 记录或处理异常,例如日志记录
- // log.error("Failed to remove patrol group by id: " + id, e);
- allSuccess = false;
- }
- }
- return allSuccess;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/service/impl/PatrolRecordServiceImpl.java b/src/main/java/org/springblade/modules/patrol/service/impl/PatrolRecordServiceImpl.java
deleted file mode 100644
index 1fc1d0f..0000000
--- a/src/main/java/org/springblade/modules/patrol/service/impl/PatrolRecordServiceImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.springblade.modules.patrol.service.impl;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import lombok.AllArgsConstructor;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.ObjectUtil;
-import org.springblade.modules.patrol.dto.PatrolGroupDTO;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.mapper.PatrolRecordMapper;
-import org.springblade.modules.patrol.service.IPatrolGroupItemService;
-import org.springblade.modules.patrol.service.IPatrolRecordService;
-import org.springblade.modules.patrol.vo.PatrolGroupItemVO;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Service
-@AllArgsConstructor
-public class PatrolRecordServiceImpl extends ServiceImpl<PatrolRecordMapper, PatrolRecord> implements IPatrolRecordService {
- IPatrolGroupItemService patrolGroupItemService;
-
- @Override
- public IPage<PatrolRecord> selectPatrolRecord(IPage<PatrolRecord> page, PatrolRecordVO patrolRecord) {
- return page.setRecords(baseMapper.selectPatrolRecord(page, patrolRecord));
- }
-
- @Override
- public PatrolRecordVO getDetail(String id) {
- return baseMapper.getDetail(id);
- }
-
- @Override
- public List<PatrolGroupItemVO> getPatrolRecordByTaskId(String taskId, String itemIds) {
- List<Long> longList = Func.toLongList(itemIds);
- List<PatrolGroupItemVO> patrolGroupItemVOList = new ArrayList<>();
- longList.forEach(e -> {
- PatrolRecord patrolRecord = baseMapper.selectPatrolRecordByTaskIdAndItemId(taskId, e);
- if (ObjectUtil.isEmpty(patrolRecord)) {
- PatrolGroupItemVO patrolGroupItemVO = patrolGroupItemService.getPatrolGroupItemVOById(e);
- patrolGroupItemVOList.add(patrolGroupItemVO);
- }
- });
-
- return patrolGroupItemVOList;
- }
-
- @Override
- public List<PatrolRecordVO> getByTaskIdAndItemId(String taskId, String itemIds) {
- return baseMapper.getByTaskIdAndItemId(taskId, itemIds);
- }
-
- @Override
- public List getItemByItemIds(String itemIds, String groupId, String taskId) {
- List<PatrolGroupItem> itemList = patrolGroupItemService.getItemByItemIds(itemIds, groupId);
- List<PatrolRecord> patrolRecordList = new ArrayList<>();
- itemList.forEach(item -> {
- PatrolRecordVO one = baseMapper.getPatrolRecordVO(item.getId(), taskId);
- if (ObjectUtil.isNotEmpty(one)) {
- patrolRecordList.add(one);
- }
- });
-
- if (patrolRecordList.size() > 0) {
- return patrolRecordList;
- } else {
- return itemList;
- }
- }
-
- @Override
- public List<PatrolRecord> getByTaskIdAndGroupId(PatrolRecordVO patrolRecordVO) {
- return baseMapper.getByTaskIdAndGroupId(patrolRecordVO);
- }
-
- // @Override
- // @Transactional(rollbackFor = Exception.class)
- // public Boolean updateThenSaveBatch(RecordBatchVO recordBatchVO) {
- //
- //
- // boolean b = updateBatchById(recordBatchVO.getUpdateList());
- // boolean b1 = saveBatch(recordBatchVO.getAddList());
- //
- // return b && b1;
- // }
-
- @Override
- public List<PatrolGroupDTO> getHistoryRecord(PatrolRecordVO patrolRecordVO) {
- return baseMapper.getHistoryRecord(patrolRecordVO);
- }
-}
diff --git a/src/main/java/org/springblade/modules/patrol/vo/PatrolGroupItemVO.java b/src/main/java/org/springblade/modules/patrol/vo/PatrolGroupItemVO.java
deleted file mode 100644
index 8b74544..0000000
--- a/src/main/java/org/springblade/modules/patrol/vo/PatrolGroupItemVO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.patrol.vo;
-
-import lombok.Data;
-import org.springblade.modules.patrol.entity.PatrolGroupItem;
-
-/**
- * 巡查组明细 vo
- * @author zhongrj
- * @date 2023-03-31
- */
-@Data
-public class PatrolGroupItemVO extends PatrolGroupItem {
-
- /**
- * 组名称
- */
- private String groupName;
-}
diff --git a/src/main/java/org/springblade/modules/patrol/vo/PatrolGroupVO.java b/src/main/java/org/springblade/modules/patrol/vo/PatrolGroupVO.java
deleted file mode 100644
index b263a2a..0000000
--- a/src/main/java/org/springblade/modules/patrol/vo/PatrolGroupVO.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.springblade.modules.patrol.vo;
-
-import lombok.Data;
-import org.springblade.modules.patrol.entity.PatrolGroup;
-
-import java.util.List;
-
-/**
- * 巡查组vo
- */
-@Data
-public class PatrolGroupVO extends PatrolGroup {
-
- /**
- * 是否在记录表中
- */
- private String isSelect;
-
- /**
- * 问题数量
- */
- private Integer problemCount;
-
- private List<PatrolGroupItemVO> patrolGroupItemList;
-
-}
diff --git a/src/main/java/org/springblade/modules/patrol/vo/PatrolRecordVO.java b/src/main/java/org/springblade/modules/patrol/vo/PatrolRecordVO.java
deleted file mode 100644
index df097da..0000000
--- a/src/main/java/org/springblade/modules/patrol/vo/PatrolRecordVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.springblade.modules.patrol.vo;
-
-import lombok.Data;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-
-@Data
-public class PatrolRecordVO extends PatrolRecord {
-
-
- /**
- * 组名称
- */
- private String groupName;
-
- /**
- * 组id
- */
- private String groupId;
-
- /**
- * 项名称
- */
- private String itemsName;
-
- /**
- * 项描述
- */
- private String description;
-
- /**
- * 联系方式
- */
- private String phone;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/controller/AliPayController.java b/src/main/java/org/springblade/modules/pay/controller/AliPayController.java
deleted file mode 100644
index a4e55a9..0000000
--- a/src/main/java/org/springblade/modules/pay/controller/AliPayController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.springblade.modules.pay.controller;
-
-import io.swagger.annotations.Api;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.service.IAliPayService;
-import org.springblade.modules.pay.service.IWxPayService;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("/alipay")
-@Api(value = "微信支付接口", tags = "微信支付接口")
-public class AliPayController extends BladeController {
-
- private IAliPayService aliPayService;
-
- @PostMapping("/save")
- public R save(@RequestBody AliPayInfo aliPayInfo) {
- return R.status(aliPayService.save(aliPayInfo));
- }
-
- @PostMapping("/update")
- public R update(@RequestBody AliPayInfo aliPayInfo) {
- return R.status(aliPayService.updateById(aliPayInfo));
- }
-
- @PostMapping("saveOrUpdate")
- public R saveOrUpdate(@RequestBody AliPayInfo aliPayInfo) {
- return R.status(aliPayService.saveOrUpdate(aliPayInfo));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/controller/OrderInfoController.java b/src/main/java/org/springblade/modules/pay/controller/OrderInfoController.java
deleted file mode 100644
index 7812ab3..0000000
--- a/src/main/java/org/springblade/modules/pay/controller/OrderInfoController.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.pay.vo.OrderInfoVO;
-import org.springblade.modules.pay.wrapper.OrderInfoWrapper;
-import org.springblade.modules.pay.service.IOrderInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 订单信息 控制器
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-orderInfo/orderInfo")
-@Api(value = "订单信息", tags = "订单信息接口")
-public class OrderInfoController extends BladeController {
-
- private final IOrderInfoService orderInfoService;
-
- /**
- * 订单信息 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入orderInfo")
- public R<OrderInfoVO> detail(OrderInfoEntity orderInfo) {
- OrderInfoEntity detail = orderInfoService.getOne(Condition.getQueryWrapper(orderInfo));
- return R.data(OrderInfoWrapper.build().entityVO(detail));
- }
- /**
- * 订单信息 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入orderInfo")
- public R<IPage<OrderInfoVO>> list(OrderInfoEntity orderInfo, Query query) {
- IPage<OrderInfoEntity> pages = orderInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(orderInfo));
- return R.data(OrderInfoWrapper.build().pageVO(pages));
- }
-
- /**
- * 订单信息 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入orderInfo")
- public R<IPage<OrderInfoVO>> page(OrderInfoVO orderInfo, Query query) {
- IPage<OrderInfoVO> pages = orderInfoService.selectOrderInfoPage(Condition.getPage(query), orderInfo);
- return R.data(pages);
- }
-
- /**
- * 订单信息 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入orderInfo")
- public R save(@Valid @RequestBody OrderInfoEntity orderInfo) {
- return R.status(orderInfoService.save(orderInfo));
- }
-
- /**
- * 创建订单信息
- */
- @PostMapping("/add")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入orderInfo")
- public R save(@RequestParam Long propertyChargeRecordId) {
- return R.data(orderInfoService.createOrderByPropertyChargeRecordId(propertyChargeRecordId));
- }
-
- /**
- * 订单信息 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入orderInfo")
- public R update(@Valid @RequestBody OrderInfoEntity orderInfo) {
- return R.status(orderInfoService.updateById(orderInfo));
- }
-
- /**
- * 订单信息 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入orderInfo")
- public R submit(@Valid @RequestBody OrderInfoEntity orderInfo) {
- return R.status(orderInfoService.saveOrUpdate(orderInfo));
- }
-
- /**
- * 订单信息 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(orderInfoService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/controller/PaymentInfoController.java b/src/main/java/org/springblade/modules/pay/controller/PaymentInfoController.java
deleted file mode 100644
index 0c13196..0000000
--- a/src/main/java/org/springblade/modules/pay/controller/PaymentInfoController.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import org.springblade.modules.pay.vo.PaymentInfoVO;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.pay.wrapper.PaymentInfoWrapper;
-import org.springblade.modules.pay.service.IPaymentInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 支付信息 控制器
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-paymentInfo/paymentInfo")
-@Api(value = "支付信息", tags = "支付信息接口")
-public class PaymentInfoController extends BladeController {
-
- private final IPaymentInfoService paymentInfoService;
-
- /**
- * 支付信息 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入paymentInfo")
- public R<PaymentInfoVO> detail(PaymentInfoEntity paymentInfo) {
- PaymentInfoEntity detail = paymentInfoService.getOne(Condition.getQueryWrapper(paymentInfo));
- return R.data(PaymentInfoWrapper.build().entityVO(detail));
- }
- /**
- * 支付信息 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入paymentInfo")
- public R<IPage<PaymentInfoVO>> list(PaymentInfoEntity paymentInfo, Query query) {
- IPage<PaymentInfoEntity> pages = paymentInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(paymentInfo));
- return R.data(PaymentInfoWrapper.build().pageVO(pages));
- }
-
- /**
- * 支付信息 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入paymentInfo")
- public R<IPage<PaymentInfoVO>> page(PaymentInfoVO paymentInfo, Query query) {
- IPage<PaymentInfoVO> pages = paymentInfoService.selectPaymentInfoPage(Condition.getPage(query), paymentInfo);
- return R.data(pages);
- }
-
- /**
- * 支付信息 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入paymentInfo")
- public R save(@Valid @RequestBody PaymentInfoEntity paymentInfo) {
- return R.status(paymentInfoService.save(paymentInfo));
- }
-
- /**
- * 支付信息 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入paymentInfo")
- public R update(@Valid @RequestBody PaymentInfoEntity paymentInfo) {
- return R.status(paymentInfoService.updateById(paymentInfo));
- }
-
- /**
- * 支付信息 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入paymentInfo")
- public R submit(@Valid @RequestBody PaymentInfoEntity paymentInfo) {
- return R.status(paymentInfoService.saveOrUpdate(paymentInfo));
- }
-
- /**
- * 支付信息 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(paymentInfoService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/controller/RefundInfoController.java b/src/main/java/org/springblade/modules/pay/controller/RefundInfoController.java
deleted file mode 100644
index 9a88bd8..0000000
--- a/src/main/java/org/springblade/modules/pay/controller/RefundInfoController.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import org.springblade.modules.pay.service.IRefundInfoService;
-import org.springblade.modules.pay.vo.RefundInfoVO;
-import org.springblade.modules.pay.wrapper.RefundInfoWrapper;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 退款信息 控制器
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-refundInfo/refundInfo")
-@Api(value = "退款信息", tags = "退款信息接口")
-public class RefundInfoController extends BladeController {
-
- private final IRefundInfoService refundInfoService;
-
- /**
- * 退款信息 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入refundInfo")
- public R<RefundInfoVO> detail(RefundInfoEntity refundInfo) {
- RefundInfoEntity detail = refundInfoService.getOne(Condition.getQueryWrapper(refundInfo));
- return R.data(RefundInfoWrapper.build().entityVO(detail));
- }
- /**
- * 退款信息 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入refundInfo")
- public R<IPage<RefundInfoVO>> list(RefundInfoEntity refundInfo, Query query) {
- IPage<RefundInfoEntity> pages = refundInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(refundInfo));
- return R.data(RefundInfoWrapper.build().pageVO(pages));
- }
-
- /**
- * 退款信息 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入refundInfo")
- public R<IPage<RefundInfoVO>> page(RefundInfoVO refundInfo, Query query) {
- IPage<RefundInfoVO> pages = refundInfoService.selectRefundInfoPage(Condition.getPage(query), refundInfo);
- return R.data(pages);
- }
-
- /**
- * 退款信息 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入refundInfo")
- public R save(@Valid @RequestBody RefundInfoEntity refundInfo) {
- return R.status(refundInfoService.save(refundInfo));
- }
-
- /**
- * 退款信息 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入refundInfo")
- public R update(@Valid @RequestBody RefundInfoEntity refundInfo) {
- return R.status(refundInfoService.updateById(refundInfo));
- }
-
- /**
- * 退款信息 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入refundInfo")
- public R submit(@Valid @RequestBody RefundInfoEntity refundInfo) {
- return R.status(refundInfoService.saveOrUpdate(refundInfo));
- }
-
- /**
- * 退款信息 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(refundInfoService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/controller/WxPayController.java b/src/main/java/org/springblade/modules/pay/controller/WxPayController.java
deleted file mode 100644
index 8ebb8b6..0000000
--- a/src/main/java/org/springblade/modules/pay/controller/WxPayController.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.springblade.modules.pay.controller;
-
-import com.google.gson.Gson;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.common.utils.HttpUtils;
-import org.springblade.common.utils.WechatPay2ValidatorForRequest;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.pay.service.IWxPayService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
-import java.util.Map;
-
-@CrossOrigin //跨域
-@RestController
-@RequestMapping("/wxPay")
-@Api(tags = "网站微信支付APIv3")
-@Slf4j
-public class WxPayController {
-
- @Resource
- private IWxPayService wxPayService;
-
-
- @PostMapping("/save")
- public R save(@RequestBody WxPayInfo wxPayInfo) {
- return R.status(wxPayService.save(wxPayInfo));
- }
-
- @PostMapping("/update")
- public R update(@RequestBody WxPayInfo wxPayInfo) {
- return R.status(wxPayService.updateById(wxPayInfo));
- }
-
- @PostMapping("saveOrUpdate")
- public R saveOrUpdate(@RequestBody WxPayInfo wxPayInfo) {
- return R.status(wxPayService.saveOrUpdate(wxPayInfo));
- }
-
-
- /**
- * jsapi下单
- *
- * @param properChargeRecordId
- * @return
- * @throws Exception
- */
- @ApiOperation("调用jsapi统一下单API")
- @GetMapping("/jsapiPay")
- public R jsapiPay(@RequestParam("properChargeRecordId") Long properChargeRecordId) throws Exception {
-
- log.info("发起支付请求 v3");
-
- //返回支付二维码连接和订单号
- Map<String, String> map = wxPayService.jsapiPay(properChargeRecordId);
-
- return R.data(map);
- }
-
- /**
- * 支付通知
- * 微信支付通过支付通知接口将用户支付成功消息通知给商户
- */
- @ApiOperation("支付通知")
- @PostMapping("/native/notify")
- public String nativeNotify(HttpServletRequest request, HttpServletResponse response) {
- return wxPayService.nativeNotify(request, response);
- }
-
- /**
- * 用户取消订单
- *
- * @param orderNo
- * @return
- * @throws Exception
- */
- @ApiOperation("用户取消订单")
- @PostMapping("/cancel/{orderNo}")
- public R cancel(@PathVariable String orderNo) throws Exception {
-
- log.info("取消订单");
-
- wxPayService.cancelOrder(orderNo);
- return R.data("订单已取消");
- }
-
- /**
- * 查询订单
- *
- * @param orderNo
- * @return
- * @throws Exception
- */
- @ApiOperation("查询订单")
- @GetMapping("/query/{orderNo}")
- public R queryOrder(@PathVariable String orderNo) throws Exception {
-
- log.info("查询订单");
-
- String result = wxPayService.queryOrder(orderNo);
- return R.data("result", result);
-
- }
-
-
- @ApiOperation("申请退款")
- @PostMapping("/refunds/{orderNo}/{reason}")
- public R refunds(@PathVariable String orderNo, @PathVariable String reason) throws Exception {
-
- log.info("申请退款");
- wxPayService.refund(orderNo, reason);
- return R.success("退款申请成功");
- }
-
- /**
- * 查询退款
- *
- * @param refundNo
- * @return
- * @throws Exception
- */
- @ApiOperation("查询退款")
- @GetMapping("/query-refund/{refundNo}")
- public R queryRefund(@PathVariable String refundNo) throws Exception {
-
- log.info("查询退款");
-
- String result = wxPayService.queryRefund(refundNo);
- return R.data("result", result);
- }
-
-
- /**
- * 退款结果通知
- * 退款状态改变后,微信会把相关退款结果发送给商户。
- */
- @ApiOperation("退款结果通知")
- @PostMapping("/refunds/notify")
- public String refundsNotify(HttpServletRequest request, HttpServletResponse response) {
-
- log.info("退款通知执行");
- return wxPayService.refundsNotify(request, response);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/dto/OrderInfoDTO.java b/src/main/java/org/springblade/modules/pay/dto/OrderInfoDTO.java
deleted file mode 100644
index de45776..0000000
--- a/src/main/java/org/springblade/modules/pay/dto/OrderInfoDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.dto;
-
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 订单信息 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OrderInfoDTO extends OrderInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/dto/PaymentInfoDTO.java b/src/main/java/org/springblade/modules/pay/dto/PaymentInfoDTO.java
deleted file mode 100644
index 0eca252..0000000
--- a/src/main/java/org/springblade/modules/pay/dto/PaymentInfoDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.dto;
-
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 支付信息 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PaymentInfoDTO extends PaymentInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/dto/RefundInfoDTO.java b/src/main/java/org/springblade/modules/pay/dto/RefundInfoDTO.java
deleted file mode 100644
index 41b82ac..0000000
--- a/src/main/java/org/springblade/modules/pay/dto/RefundInfoDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.dto;
-
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 退款信息 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class RefundInfoDTO extends RefundInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/entity/AliPayInfo.java b/src/main/java/org/springblade/modules/pay/entity/AliPayInfo.java
deleted file mode 100644
index 5f6dcd7..0000000
--- a/src/main/java/org/springblade/modules/pay/entity/AliPayInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.springblade.modules.pay.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-@TableName("jczz_property_company_alipay")
-@ApiModel(value = "支付宝商户信息", description = "支付宝商户信息")
-public class AliPayInfo implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- //物业id
- private String propertyCompanyId;
-
- private String appId;
- private String privateKey;
- private String publicKey;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/entity/OrderInfoEntity.java b/src/main/java/org/springblade/modules/pay/entity/OrderInfoEntity.java
deleted file mode 100644
index f7e08e3..0000000
--- a/src/main/java/org/springblade/modules/pay/entity/OrderInfoEntity.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 订单信息 实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@TableName("jczz_order_info")
-@ApiModel(value = "OrderInfo对象", description = "订单信息")
-public class OrderInfoEntity {
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 订单标题 */
- @ApiModelProperty(value = "订单标题", example = "")
- @TableField("title")
- private String title;
-
- /** 商户订单编号 */
- @ApiModelProperty(value = "商户订单编号", example = "")
- @TableField("order_no")
- private String orderNo;
-
- /** 用户id */
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 支付产品id */
- @ApiModelProperty(value = "支付产品id", example = "")
- @TableField("proper_charge_record_id")
- private Long properChargeRecordId;
-
- /** 订单二维码连接 */
- @ApiModelProperty(value = "订单二维码连接", example = "")
- @TableField("code_url")
- private String codeUrl;
-
- /** 订单金额(分) */
- @ApiModelProperty(value = "订单金额(分)", example = "")
- @TableField("total_fee")
- private Integer totalFee;
-
- /** 订单状态 */
- @ApiModelProperty(value = "订单状态", example = "")
- @TableField("order_status")
- private String orderStatus;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 物业id */
- @ApiModelProperty(value = "物业id", example = "")
- @TableField("proper_id")
- private Long properId;
-}
diff --git a/src/main/java/org/springblade/modules/pay/entity/PaymentInfoEntity.java b/src/main/java/org/springblade/modules/pay/entity/PaymentInfoEntity.java
deleted file mode 100644
index 46c08d3..0000000
--- a/src/main/java/org/springblade/modules/pay/entity/PaymentInfoEntity.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 支付信息 实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@TableName("jczz_payment_info")
-@ApiModel(value = "PaymentInfo对象", description = "支付信息")
-public class PaymentInfoEntity {
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 订单编号 */
- @ApiModelProperty(value = "订单编号", example = "")
- @TableField("order_no")
- private String orderNo;
-
- /** 支付系统交易编号 */
- @ApiModelProperty(value = "支付系统交易编号", example = "")
- @TableField("transaction_id")
- private String transactionId;
-
- /** 支付类型 */
- @ApiModelProperty(value = "支付类型", example = "")
- @TableField("payment_type")
- private String paymentType;
-
- /** 交易类型 */
- @ApiModelProperty(value = "交易类型", example = "")
- @TableField("trade_type")
- private String tradeType;
-
- /** 交易状态 */
- @ApiModelProperty(value = "交易状态", example = "")
- @TableField("trade_state")
- private String tradeState;
-
- /** 支付金额(分) */
- @ApiModelProperty(value = "支付金额(分)", example = "")
- @TableField("payer_total")
- private Integer payerTotal;
-
- /** 通知参数 */
- @ApiModelProperty(value = "通知参数", example = "")
- @TableField("content")
- private String content;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-}
diff --git a/src/main/java/org/springblade/modules/pay/entity/RefundInfoEntity.java b/src/main/java/org/springblade/modules/pay/entity/RefundInfoEntity.java
deleted file mode 100644
index ec28d2e..0000000
--- a/src/main/java/org/springblade/modules/pay/entity/RefundInfoEntity.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 退款信息 实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@TableName("jczz_refund_info")
-@ApiModel(value = "RefundInfo对象", description = "退款信息")
-public class RefundInfoEntity {
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 订单编号 */
- @ApiModelProperty(value = "订单编号", example = "")
- @TableField("order_no")
- private String orderNo;
-
- /** 退款单编号 */
- @ApiModelProperty(value = "退款单编号", example = "")
- @TableField("refund_no")
- private String refundNo;
-
- /** 支付系统退款单号 */
- @ApiModelProperty(value = "支付系统退款单号", example = "")
- @TableField("refund_id")
- private String refundId;
-
- /** 原订单金额(分) */
- @ApiModelProperty(value = "原订单金额(分)", example = "")
- @TableField("total_fee")
- private Integer totalFee;
-
- /** 退款金额(分) */
- @ApiModelProperty(value = "退款金额(分)", example = "")
- @TableField("refund")
- private Integer refund;
-
- /** 退款原因 */
- @ApiModelProperty(value = "退款原因", example = "")
- @TableField("reason")
- private String reason;
-
- /** 退款单状态 */
- @ApiModelProperty(value = "退款单状态", example = "")
- @TableField("refund_status")
- private String refundStatus;
-
- /** 申请退款返回参数 */
- @ApiModelProperty(value = "申请退款返回参数", example = "")
- @TableField("content_return")
- private String contentReturn;
-
- /** 退款结果通知参数 */
- @ApiModelProperty(value = "退款结果通知参数", example = "")
- @TableField("content_notify")
- private String contentNotify;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/entity/WeChatMiniAuthorizeVo.java b/src/main/java/org/springblade/modules/pay/entity/WeChatMiniAuthorizeVo.java
deleted file mode 100644
index 13625aa..0000000
--- a/src/main/java/org/springblade/modules/pay/entity/WeChatMiniAuthorizeVo.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.springblade.modules.pay.entity;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-@ApiModel(value="WeChatMiniAuthorizeVo对象", description="微信小程序用户授权返回数据")
-public class WeChatMiniAuthorizeVo implements Serializable {
-
- private static final long serialVersionUID=1L;
-
- @ApiModelProperty(value = "会话密钥")
- @JSONField(name = "session_key")
- private String sessionKey;
-
- @ApiModelProperty(value = "用户唯一标识")
- @JSONField(name = "openid")
- private String openId;
-
- @ApiModelProperty(value = "用户在开放平台的唯一标识符,若当前小程序已绑定到微信开放平台帐号下会返回")
- @JSONField(name = "unionid")
- private String unionId;
-
- @ApiModelProperty(value = "错误码")
- @JSONField(name = "errcode")
- private String errCode;
-
- @ApiModelProperty(value = "错误信息")
- @JSONField(name = "errmsg")
- private String errMsg;
-}
diff --git a/src/main/java/org/springblade/modules/pay/entity/WxPayInfo.java b/src/main/java/org/springblade/modules/pay/entity/WxPayInfo.java
deleted file mode 100644
index 5aeb5a9..0000000
--- a/src/main/java/org/springblade/modules/pay/entity/WxPayInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.springblade.modules.pay.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-@TableName("jczz_property_company_wxpay")
-@ApiModel(value = "微信商户信息", description = "微信商户信息")
-public class WxPayInfo implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- //物业id
- private String propertyCompanyId;
-
- private String appId;
- private String mchId;
- private String mchKey;
- private String appSecret;
- private String keyPath;
- private String officialAppId;
- private String officialAppSecret;
-}
diff --git a/src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.java b/src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.java
deleted file mode 100644
index a90c049..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.springblade.modules.pay.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-
-public interface AliPayMapper extends BaseMapper<AliPayInfo> {
-}
diff --git a/src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.xml b/src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.xml
deleted file mode 100644
index 8f7e8d3..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.pay.mapper.AliPayMapper">
-
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.java b/src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.java
deleted file mode 100644
index a6c5f59..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.mapper;
-
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springblade.modules.pay.vo.OrderInfoVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 订单信息 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public interface OrderInfoMapper extends BaseMapper<OrderInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param orderInfo
- * @return
- */
- List<OrderInfoVO> selectOrderInfoPage(IPage page, OrderInfoVO orderInfo);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.xml b/src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.xml
deleted file mode 100644
index adbec62..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.pay.mapper.OrderInfoMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="orderInfoResultMap" type="org.springblade.modules.pay.vo.OrderInfoVO">
- </resultMap>
-
-
- <select id="selectOrderInfoPage" resultMap="orderInfoResultMap">
- select * from jczz_order_info where is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.java b/src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.java
deleted file mode 100644
index 875b7c5..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.mapper;
-
-import org.springblade.modules.pay.dto.PaymentInfoDTO;
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import org.springblade.modules.pay.vo.PaymentInfoVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 支付信息 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public interface PaymentInfoMapper extends BaseMapper<PaymentInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param paymentInfo
- * @return
- */
- List<PaymentInfoVO> selectPaymentInfoPage(IPage page, PaymentInfoVO paymentInfo);
-
-
- /**
- * 查询支付信息
- *
- * @param id 支付信息ID
- * @return 支付信息
- */
- public PaymentInfoDTO selectPaymentInfoById(Long id);
-
- /**
- * 查询支付信息列表
- *
- * @param paymentInfoDTO 支付信息
- * @return 支付信息集合
- */
- public List<PaymentInfoDTO> selectPaymentInfoList(PaymentInfoDTO paymentInfoDTO);
-}
diff --git a/src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.xml b/src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.xml
deleted file mode 100644
index 266d878..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.pay.mapper.PaymentInfoMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="paymentInfoResultMap" type="org.springblade.modules.pay.entity.PaymentInfoEntity">
- </resultMap>
-
-
- <select id="selectPaymentInfoPage" resultMap="paymentInfoResultMap">
- select * from jczz_payment_info where is_deleted = 0
- </select>
-
- <resultMap type="org.springblade.modules.pay.dto.PaymentInfoDTO" id="PaymentInfoDTOResult">
- <result property="id" column="id" />
- <result property="orderNo" column="order_no" />
- <result property="transactionId" column="transaction_id" />
- <result property="paymentType" column="payment_type" />
- <result property="tradeType" column="trade_type" />
- <result property="tradeState" column="trade_state" />
- <result property="payerTotal" column="payer_total" />
- <result property="content" column="content" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- </resultMap>
-
- <sql id="selectPaymentInfo">
- select
- id,
- order_no,
- transaction_id,
- payment_type,
- trade_type,
- trade_state,
- payer_total,
- content,
- create_time,
- update_time
- from
- jczz_payment_info
- </sql>
-
- <select id="selectPaymentInfoById" parameterType="long" resultMap="PaymentInfoDTOResult">
- <include refid="selectPaymentInfo"/>
- where
- id = #{id}
- </select>
-
- <select id="selectPaymentInfoList" parameterType="org.springblade.modules.pay.dto.PaymentInfoDTO" resultMap="PaymentInfoDTOResult">
- <include refid="selectPaymentInfo"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
- <if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
- <if test="paymentType != null and paymentType != ''"> and payment_type = #{paymentType}</if>
- <if test="tradeType != null and tradeType != ''"> and trade_type = #{tradeType}</if>
- <if test="tradeState != null and tradeState != ''"> and trade_state = #{tradeState}</if>
- <if test="payerTotal != null and payerTotal != ''"> and payer_total = #{payerTotal}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- </where>
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.java b/src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.java
deleted file mode 100644
index f42ae01..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.mapper;
-
-import org.springblade.modules.pay.dto.RefundInfoDTO;
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import org.springblade.modules.pay.vo.RefundInfoVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 退款信息 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public interface RefundInfoMapper extends BaseMapper<RefundInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param refundInfo
- * @return
- */
- List<RefundInfoVO> selectRefundInfoPage(IPage page, RefundInfoVO refundInfo);
-
- /**
- * 查询退款信息
- *
- * @param id 退款信息ID
- * @return 退款信息
- */
- public RefundInfoDTO selectRefundInfoById(Long id);
-
- /**
- * 查询退款信息列表
- *
- * @param refundInfoDTO 退款信息
- * @return 退款信息集合
- */
- public List<RefundInfoDTO> selectRefundInfoList(RefundInfoDTO refundInfoDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.xml b/src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.xml
deleted file mode 100644
index 511768f..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.pay.mapper.RefundInfoMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="refundInfoResultMap" type="org.springblade.modules.pay.entity.RefundInfoEntity">
- </resultMap>
-
-
- <select id="selectRefundInfoPage" resultMap="refundInfoResultMap">
- select * from jczz_refund_info where is_deleted = 0
- </select>
- <resultMap type="org.springblade.modules.pay.dto.RefundInfoDTO" id="RefundInfoDTOResult">
- <result property="id" column="id" />
- <result property="orderNo" column="order_no" />
- <result property="refundNo" column="refund_no" />
- <result property="refundId" column="refund_id" />
- <result property="totalFee" column="total_fee" />
- <result property="refund" column="refund" />
- <result property="reason" column="reason" />
- <result property="refundStatus" column="refund_status" />
- <result property="contentReturn" column="content_return" />
- <result property="contentNotify" column="content_notify" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- </resultMap>
-
- <sql id="selectRefundInfo">
- select
- id,
- order_no,
- refund_no,
- refund_id,
- total_fee,
- refund,
- reason,
- refund_status,
- content_return,
- content_notify,
- create_time,
- update_time
- from
- jczz_refund_info
- </sql>
-
- <select id="selectRefundInfoById" parameterType="long" resultMap="RefundInfoDTOResult">
- <include refid="selectRefundInfo"/>
- where
- id = #{id}
- </select>
-
- <select id="selectRefundInfoList" parameterType="org.springblade.modules.pay.dto.RefundInfoDTO" resultMap="RefundInfoDTOResult">
- <include refid="selectRefundInfo"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="orderNo != null "> and order_no = #{orderNo}</if>
- <if test="refundNo != null "> and refund_no = #{refundNo}</if>
- <if test="refundId != null "> and refund_id = #{refundId}</if>
- <if test="totalFee != null and totalFee != ''"> and total_fee = #{totalFee}</if>
- <if test="refund != null and refund != ''"> and refund = #{refund}</if>
- <if test="reason != null and reason != ''"> and reason = #{reason}</if>
- <if test="refundStatus != null and refundStatus != ''"> and refund_status = #{refundStatus}</if>
- <if test="contentReturn != null and contentReturn != ''"> and content_return = #{contentReturn}</if>
- <if test="contentNotify != null and contentNotify != ''"> and content_notify = #{contentNotify}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.java b/src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.java
deleted file mode 100644
index a616426..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.springblade.modules.pay.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.pay.entity.WxPayInfo;
-
-public interface WxPayMapper extends BaseMapper<WxPayInfo> {
-}
diff --git a/src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.xml b/src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.xml
deleted file mode 100644
index 3baff40..0000000
--- a/src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.pay.mapper.WxPayMapper">
-
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/pay/service/IAliPayService.java b/src/main/java/org/springblade/modules/pay/service/IAliPayService.java
deleted file mode 100644
index e352a40..0000000
--- a/src/main/java/org/springblade/modules/pay/service/IAliPayService.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.springblade.modules.pay.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-
-public interface IAliPayService extends IService<AliPayInfo> {
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/IOrderInfoService.java b/src/main/java/org/springblade/modules/pay/service/IOrderInfoService.java
deleted file mode 100644
index 1ded657..0000000
--- a/src/main/java/org/springblade/modules/pay/service/IOrderInfoService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.common.enums.OrderStatus;
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springblade.modules.pay.vo.OrderInfoVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 订单信息 服务类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public interface IOrderInfoService extends IService<OrderInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param orderInfo
- * @return
- */
- IPage<OrderInfoVO> selectOrderInfoPage(IPage<OrderInfoVO> page, OrderInfoVO orderInfo);
-
-
- OrderInfoEntity createOrderByPropertyChargeRecordId(Long propertyChargeRecordId);
-
- void saveCodeUrl(String orderNo, String codeUrl);
-
- List<OrderInfoEntity> listOrderByCreateTimeDesc();
-
- void updateStatusByOrderNo(String orderNo, OrderStatus orderStatus);
-
- String getOrderStatus(String orderNo);
-
- List<OrderInfoEntity> getNoPayOrderByDuration(int minutes);
-
- OrderInfoEntity getOrderByOrderNo(String orderNo);
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/IPaymentInfoService.java b/src/main/java/org/springblade/modules/pay/service/IPaymentInfoService.java
deleted file mode 100644
index f2501c2..0000000
--- a/src/main/java/org/springblade/modules/pay/service/IPaymentInfoService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import org.springblade.modules.pay.vo.PaymentInfoVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 支付信息 服务类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public interface IPaymentInfoService extends IService<PaymentInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param paymentInfo
- * @return
- */
- IPage<PaymentInfoVO> selectPaymentInfoPage(IPage<PaymentInfoVO> page, PaymentInfoVO paymentInfo);
-
- void createPaymentInfo(String plainText);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/IRefundInfoService.java b/src/main/java/org/springblade/modules/pay/service/IRefundInfoService.java
deleted file mode 100644
index a1eab06..0000000
--- a/src/main/java/org/springblade/modules/pay/service/IRefundInfoService.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import org.springblade.modules.pay.vo.RefundInfoVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 退款信息 服务类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public interface IRefundInfoService extends IService<RefundInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param refundInfo
- * @return
- */
- IPage<RefundInfoVO> selectRefundInfoPage(IPage<RefundInfoVO> page, RefundInfoVO refundInfo);
-
-
- RefundInfoEntity createRefundByOrderNo(String orderNo, String reason);
-
- void updateRefund(String plainText);
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/IWxPayService.java b/src/main/java/org/springblade/modules/pay/service/IWxPayService.java
deleted file mode 100644
index 8881e34..0000000
--- a/src/main/java/org/springblade/modules/pay/service/IWxPayService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.springblade.modules.pay.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.pay.entity.WxPayInfo;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.util.Map;
-
-public interface IWxPayService extends IService<WxPayInfo> {
-
-
- void processOrder(Map<String, Object> bodyMap) throws GeneralSecurityException;
-
- void cancelOrder(String orderNo) throws Exception;
-
- String queryOrder(String orderNo) throws Exception;
-
- void checkOrderStatus(String orderNo) throws Exception;
-
- void refund(String orderNo, String reason) throws Exception;
-
- String queryRefund(String orderNo) throws Exception;
-
- void checkRefundStatus(String refundNo) throws Exception;
-
- void processRefund(Map<String, Object> bodyMap) throws Exception;
-
- Map<String, String> jsapiPay(Long productId) throws IOException;
-
- String refundsNotify(HttpServletRequest request, HttpServletResponse response);
-
- String nativeNotify(HttpServletRequest request, HttpServletResponse response);
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/impl/AliPayServiceImpl.java b/src/main/java/org/springblade/modules/pay/service/impl/AliPayServiceImpl.java
deleted file mode 100644
index 2b616a1..0000000
--- a/src/main/java/org/springblade/modules/pay/service/impl/AliPayServiceImpl.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.springblade.modules.pay.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.pay.mapper.AliPayMapper;
-import org.springblade.modules.pay.mapper.WxPayMapper;
-import org.springblade.modules.pay.service.IAliPayService;
-import org.springblade.modules.pay.service.IWxPayService;
-import org.springframework.stereotype.Service;
-
-@Service
-public class AliPayServiceImpl extends ServiceImpl<AliPayMapper, AliPayInfo> implements IAliPayService {
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/impl/OrderInfoServiceImpl.java b/src/main/java/org/springblade/modules/pay/service/impl/OrderInfoServiceImpl.java
deleted file mode 100644
index e3cfef6..0000000
--- a/src/main/java/org/springblade/modules/pay/service/impl/OrderInfoServiceImpl.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.enums.OrderStatus;
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springblade.modules.pay.vo.OrderInfoVO;
-import org.springblade.modules.pay.mapper.OrderInfoMapper;
-import org.springblade.modules.pay.service.IOrderInfoService;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-import org.springblade.modules.property.service.IPropertyChargeRecordService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import javax.annotation.Resource;
-import java.text.SimpleDateFormat;
-import java.time.Duration;
-import java.time.Instant;
-import java.util.Date;
-import java.util.List;
-import java.util.Random;
-
-/**
- * 订单信息 服务实现类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Service
-public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfoEntity> implements IOrderInfoService {
-
- private static Logger logger = LoggerFactory.getLogger(OrderInfoServiceImpl.class);
-
-
- @Resource
- private IPropertyChargeRecordService iPropertyChargeRecordService;
-
- @Override
- public IPage<OrderInfoVO> selectOrderInfoPage(IPage<OrderInfoVO> page, OrderInfoVO orderInfo) {
- return page.setRecords(baseMapper.selectOrderInfoPage(page, orderInfo));
- }
-
-
- @Override
- public OrderInfoEntity createOrderByPropertyChargeRecordId(Long propertyChargeRecordId) {
-
- //查找已存在但未支付的订单
- OrderInfoEntity orderInfo = this.getNoPayOrderByPropertyChargeRecordId(propertyChargeRecordId);
- if( orderInfo != null){
- return orderInfo;
- }
- //获取商品信息
- PropertyChargeRecord propertyChargeRecord = iPropertyChargeRecordService.getById(propertyChargeRecordId);
- //生成订单
- orderInfo = new OrderInfoEntity();
- orderInfo.setTitle(propertyChargeRecord.getPayContent());
- orderInfo.setOrderNo(getOrderNoStr()); //订单号
- orderInfo.setProperChargeRecordId(propertyChargeRecordId);
- orderInfo.setTotalFee(propertyChargeRecord.getPayPrice().intValue()); //分
- orderInfo.setOrderStatus(OrderStatus.NOTPAY.getType());
- baseMapper.insert(orderInfo);
- return orderInfo;
- }
-
- /**
- * 存储订单二维码
- * @param orderNo
- * @param codeUrl
- */
- @Override
- public void saveCodeUrl(String orderNo, String codeUrl) {
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("order_no", orderNo);
-
- OrderInfoEntity orderInfo = new OrderInfoEntity();
- orderInfo.setCodeUrl(codeUrl);
-
- baseMapper.update(orderInfo, queryWrapper);
- }
-
- /**
- * 查询订单列表,并倒序查询
- * @return
- */
- @Override
- public List<OrderInfoEntity> listOrderByCreateTimeDesc() {
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<OrderInfoEntity>().orderByDesc("create_time");
- return baseMapper.selectList(queryWrapper);
- }
-
- /**
- * 根据订单号更新订单状态
- * @param orderNo
- * @param orderStatus
- */
- @Override
- public void updateStatusByOrderNo(String orderNo, OrderStatus orderStatus) {
-
- logger.info("更新订单状态 ===> {}", orderStatus.getType());
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("order_no", orderNo);
-
- OrderInfoEntity orderInfo = new OrderInfoEntity();
- orderInfo.setOrderStatus(orderStatus.getType());
-
- baseMapper.update(orderInfo, queryWrapper);
- }
-
- /**
- * 根据订单号获取订单状态
- * @param orderNo
- * @return
- */
- @Override
- public String getOrderStatus(String orderNo) {
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("order_no", orderNo);
- OrderInfoEntity orderInfo = baseMapper.selectOne(queryWrapper);
- if(orderInfo == null){
- return null;
- }
- return orderInfo.getOrderStatus();
- }
-
- /**
- * 查询创建超过minutes分钟并且未支付的订单
- * @param minutes
- * @return
- */
- @Override
- public List<OrderInfoEntity> getNoPayOrderByDuration(int minutes) {
-
- Instant instant = Instant.now().minus(Duration.ofMinutes(minutes));
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("order_status", OrderStatus.NOTPAY.getType());
- queryWrapper.le("create_time", instant);
-
- List<OrderInfoEntity> orderInfoList = baseMapper.selectList(queryWrapper);
-
- return orderInfoList;
- }
-
- /**
- * 根据订单号获取订单
- * @param orderNo
- * @return
- */
- @Override
- public OrderInfoEntity getOrderByOrderNo(String orderNo) {
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("order_no", orderNo);
- OrderInfoEntity orderInfo = baseMapper.selectOne(queryWrapper);
-
- return orderInfo;
- }
-
-
- /**
- * 根据商品id查询未支付订单
- * 防止重复创建订单对象
- * @param propertyChargeRecordId
- * @return
- */
- private OrderInfoEntity getNoPayOrderByPropertyChargeRecordId(Long propertyChargeRecordId) {
-
- QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("product_id", propertyChargeRecordId);
- queryWrapper.eq("order_status", OrderStatus.NOTPAY.getType());
-// queryWrapper.eq("user_id", userId);
- OrderInfoEntity orderInfo = baseMapper.selectOne(queryWrapper);
- return orderInfo;
- }
-
- //生成订单号
- public static String getOrderNoStr() {
- String order = "pay" + new SimpleDateFormat("yyyyMMdd").format(new Date());
- Random r = new Random();
- for (int i = 0; i < 10; i++) {
- order += r.nextInt(9);
- }
- return order;
- }
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/impl/PaymentInfoServiceImpl.java b/src/main/java/org/springblade/modules/pay/service/impl/PaymentInfoServiceImpl.java
deleted file mode 100644
index a42515e..0000000
--- a/src/main/java/org/springblade/modules/pay/service/impl/PaymentInfoServiceImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.google.gson.Gson;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.enums.PayType;
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import org.springblade.modules.pay.mapper.PaymentInfoMapper;
-import org.springblade.modules.pay.vo.PaymentInfoVO;
-import org.springblade.modules.pay.service.IPaymentInfoService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 支付信息 服务实现类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Service
-public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, PaymentInfoEntity> implements IPaymentInfoService {
-
- private static Logger logger = LoggerFactory.getLogger(PaymentInfoServiceImpl.class);
-
- @Override
- public IPage<PaymentInfoVO> selectPaymentInfoPage(IPage<PaymentInfoVO> page, PaymentInfoVO paymentInfo) {
- return page.setRecords(baseMapper.selectPaymentInfoPage(page, paymentInfo));
- }
-
- /**
- * 记录支付日志
- * @param plainText
- */
- @Override
- public void createPaymentInfo(String plainText) {
-
- logger.info("记录支付日志");
-
- Gson gson = new Gson();
- HashMap plainTextMap = gson.fromJson(plainText, HashMap.class);
-
- //订单号
- String orderNo = (String)plainTextMap.get("out_trade_no");
- //业务编号
- String transactionId = (String)plainTextMap.get("transaction_id");
- //支付类型
- String tradeType = (String)plainTextMap.get("trade_type");
- //交易状态
- String tradeState = (String)plainTextMap.get("trade_state");
- //用户实际支付金额
- Map<String, Object> amount = (Map)plainTextMap.get("amount");
- Integer payerTotal = ((Double) amount.get("payer_total")).intValue();
-
- PaymentInfoEntity paymentInfo = new PaymentInfoEntity();
- paymentInfo.setOrderNo(orderNo);
- paymentInfo.setPaymentType(PayType.WXPAY.getType());
- paymentInfo.setTransactionId(transactionId);
- paymentInfo.setTradeType(tradeType);
- paymentInfo.setTradeState(tradeState);
- paymentInfo.setPayerTotal(payerTotal);
- paymentInfo.setContent(plainText);
-
- baseMapper.insert(paymentInfo);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/impl/RefundInfoServiceImpl.java b/src/main/java/org/springblade/modules/pay/service/impl/RefundInfoServiceImpl.java
deleted file mode 100644
index be4852f..0000000
--- a/src/main/java/org/springblade/modules/pay/service/impl/RefundInfoServiceImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.google.gson.Gson;
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import org.springblade.modules.pay.mapper.RefundInfoMapper;
-import org.springblade.modules.pay.service.IOrderInfoService;
-import org.springblade.modules.pay.service.IRefundInfoService;
-import org.springblade.modules.pay.vo.RefundInfoVO;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * 退款信息 服务实现类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Service
-public class RefundInfoServiceImpl extends ServiceImpl<RefundInfoMapper, RefundInfoEntity> implements IRefundInfoService {
-
-
- @Resource
- private IOrderInfoService orderInfoService;
- @Override
- public IPage<RefundInfoVO> selectRefundInfoPage(IPage<RefundInfoVO> page, RefundInfoVO refundInfo) {
- return page.setRecords(baseMapper.selectRefundInfoPage(page, refundInfo));
- }
-
- @Override
- public RefundInfoEntity createRefundByOrderNo(String orderNo, String reason) {
-
- //根据订单号获取订单信息
- OrderInfoEntity orderInfo = orderInfoService.getOne(Wrappers.<OrderInfoEntity>lambdaQuery()
- .eq(OrderInfoEntity::getOrderNo, orderNo));
-
- //根据订单号生成退款订单
- RefundInfoEntity refundInfo = new RefundInfoEntity();
- refundInfo.setOrderNo(orderNo);//订单编号
- refundInfo.setRefundNo(getOrderNoStr());//退款单编号
- refundInfo.setTotalFee(orderInfo.getTotalFee());//原订单金额(分)
- refundInfo.setRefund(orderInfo.getTotalFee());//退款金额(分)
- refundInfo.setReason(reason);//退款原因
-
- //保存退款订单
- baseMapper.insert(refundInfo);
-
- return refundInfo;
- }
-
-
- @Override
- public void updateRefund(String content) {
- //将json字符串转换成Map
- Gson gson = new Gson();
- Map<String, String> resultMap = gson.fromJson(content, HashMap.class);
-
- //根据退款单编号修改退款单
- QueryWrapper<RefundInfoEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("refund_no", resultMap.get("out_refund_no"));
-
- //设置要修改的字段
- RefundInfoEntity refundInfo = new RefundInfoEntity();
-
- refundInfo.setRefundId(resultMap.get("refund_id"));//微信支付退款单号
-
- //查询退款和申请退款中的返回参数
- if(resultMap.get("status") != null){
- refundInfo.setRefundStatus(resultMap.get("status"));//退款状态
- refundInfo.setContentReturn(content);//将全部响应结果存入数据库的content字段
- }
- //退款回调中的回调参数
- if(resultMap.get("refund_status") != null){
- refundInfo.setRefundStatus(resultMap.get("refund_status"));//退款状态
- refundInfo.setContentNotify(content);//将全部响应结果存入数据库的content字段
- }
-
- //更新退款单
- baseMapper.update(refundInfo, queryWrapper);
- }
-
-
- //生成订单号
- public static String getOrderNoStr() {
- String order = "refund" + new SimpleDateFormat("yyyyMMdd").format(new Date());
- Random r = new Random();
- for (int i = 0; i < 10; i++) {
- order += r.nextInt(9);
- }
- return order;
- }
-}
diff --git a/src/main/java/org/springblade/modules/pay/service/impl/WxPayServiceImpl.java b/src/main/java/org/springblade/modules/pay/service/impl/WxPayServiceImpl.java
deleted file mode 100644
index 925189e..0000000
--- a/src/main/java/org/springblade/modules/pay/service/impl/WxPayServiceImpl.java
+++ /dev/null
@@ -1,750 +0,0 @@
-package org.springblade.modules.pay.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.wxpay.sdk.WXPayUtil;
-import com.google.gson.Gson;
-import com.wechat.pay.contrib.apache.httpclient.util.AesUtil;
-import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.config.WxPayConfig;
-import org.springblade.common.enums.OrderStatus;
-import org.springblade.common.enums.wxpay.WxApiType;
-import org.springblade.common.enums.wxpay.WxNotifyType;
-import org.springblade.common.enums.wxpay.WxRefundStatus;
-import org.springblade.common.enums.wxpay.WxTradeState;
-import org.springblade.common.exception.CustomException;
-import org.springblade.common.utils.HttpUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.common.utils.WechatPay2ValidatorForRequest;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.pay.mapper.WxPayMapper;
-import org.springblade.modules.pay.service.IOrderInfoService;
-import org.springblade.modules.pay.service.IPaymentInfoService;
-import org.springblade.modules.pay.service.IRefundInfoService;
-import org.springblade.modules.pay.service.IWxPayService;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.nio.charset.StandardCharsets;
-import java.security.*;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
-
-@Service
-public class WxPayServiceImpl extends ServiceImpl<WxPayMapper, WxPayInfo> implements IWxPayService {
- private static Logger logger = LoggerFactory.getLogger(WxPayServiceImpl.class);
-
-
- @Resource
- private WxPayConfig wxPayConfig;
-
-// @Resource
-// private CloseableHttpClient wxPayClient;
-
- @Resource
- private IOrderInfoService orderInfoService;
-
- @Resource
- private IPaymentInfoService paymentInfoService;
-
- @Resource
- private IRefundInfoService refundsInfoService;
-
- private final ReentrantLock lock = new ReentrantLock();
-
- @Transactional(rollbackFor = Exception.class)
- @Override
- public void processOrder(Map<String, Object> bodyMap) throws GeneralSecurityException {
- logger.info("处理订单");
-
- //解密报文
- String plainText = decryptFromResource(bodyMap);
-
- //将明文转换成map
- Gson gson = new Gson();
- HashMap plainTextMap = gson.fromJson(plainText, HashMap.class);
- String orderNo = (String) plainTextMap.get("out_trade_no");
-
-
- /*在对业务数据进行状态检查和处理之前,
- 要采用数据锁进行并发控制,
- 以避免函数重入造成的数据混乱*/
- //尝试获取锁:
- // 成功获取则立即返回true,获取失败则立即返回false。不必一直等待锁的释放
- if (lock.tryLock()) {
- try {
- //处理重复的通知
- //接口调用的幂等性:无论接口被调用多少次,产生的结果是一致的。
- String orderStatus = orderInfoService.getOrderStatus(orderNo);
- if (!OrderStatus.NOTPAY.getType().equals(orderStatus)) {
- return;
- }
-
- //模拟通知并发
- try {
- TimeUnit.SECONDS.sleep(5);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- //更新订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.SUCCESS);
-
- //记录支付日志
- paymentInfoService.createPaymentInfo(plainText);
- } finally {
- //要主动释放锁
- lock.unlock();
- }
- }
- }
-
- /**
- * 用户取消订单
- *
- * @param orderNo
- */
- @Override
- public void cancelOrder(String orderNo) throws Exception {
-
- //调用微信支付的关单接口
- this.closeOrder(orderNo);
-
- //更新商户端的订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.CANCEL);
- }
-
- @Override
- public String queryOrder(String orderNo) throws Exception {
-
- logger.info("查单接口调用 ===> {}", orderNo);
-
- String url = String.format(WxApiType.ORDER_QUERY_BY_NO.getType(), orderNo);
- url = wxPayConfig.getDomain().concat(url).concat("?mchid=").concat(wxPayConfig.getMchId());
-
- HttpGet httpGet = new HttpGet(url);
- httpGet.setHeader("Accept", "application/json");
-
- //完成签名并执行请求
- CloseableHttpResponse response = null;//wxPayClient.execute(httpGet);
-
- try {
- String bodyAsString = EntityUtils.toString(response.getEntity());//响应体
- int statusCode = response.getStatusLine().getStatusCode();//响应状态码
- if (statusCode == 200) { //处理成功
- logger.info("成功, 返回结果 = " + bodyAsString);
- } else if (statusCode == 204) { //处理成功,无返回Body
- logger.info("成功");
- } else {
- logger.info("查单接口调用,响应码 = " + statusCode + ",返回结果 = " + bodyAsString);
- throw new IOException("request failed");
- }
-
- return bodyAsString;
-
- } finally {
- response.close();
- }
-
- }
-
- /**
- * 根据订单号查询微信支付查单接口,核实订单状态
- * 如果订单已支付,则更新商户端订单状态,并记录支付日志
- * 如果订单未支付,则调用关单接口关闭订单,并更新商户端订单状态
- *
- * @param orderNo
- */
- @Transactional(rollbackFor = Exception.class)
- @Override
- public void checkOrderStatus(String orderNo) throws Exception {
-
- logger.info("根据订单号核实订单状态 ===> {}", orderNo);
-
- //调用微信支付查单接口
- String result = this.queryOrder(orderNo);
-
- Gson gson = new Gson();
- Map<String, String> resultMap = gson.fromJson(result, HashMap.class);
-
- //获取微信支付端的订单状态
- String tradeState = resultMap.get("trade_state");
-
- //判断订单状态
- if (WxTradeState.SUCCESS.getType().equals(tradeState)) {
-
- logger.info("核实订单已支付 ===> {}", orderNo);
-
- //如果确认订单已支付则更新本地订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.SUCCESS);
- //记录支付日志
- paymentInfoService.createPaymentInfo(result);
- }
-
- if (WxTradeState.NOTPAY.getType().equals(tradeState)) {
- logger.info("核实订单未支付 ===> {}", orderNo);
-
- //如果订单未支付,则调用关单接口
- this.closeOrder(orderNo);
-
- //更新本地订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.CLOSED);
- }
-
- }
-
- /**
- * 退款
- *
- * @param orderNo
- * @param reason
- * @throws IOException
- */
- @Transactional(rollbackFor = Exception.class)
- @Override
- public void refund(String orderNo, String reason) throws Exception {
-
- logger.info("创建退款单记录");
- //根据订单编号创建退款单
- RefundInfoEntity refundsInfo = refundsInfoService.createRefundByOrderNo(orderNo, reason);
-
- logger.info("调用退款API");
-
- //调用统一下单API
- String url = wxPayConfig.getDomain().concat(WxApiType.DOMESTIC_REFUNDS.getType());
- HttpPost httpPost = new HttpPost(url);
-
- // 请求body参数
- Gson gson = new Gson();
- Map paramsMap = new HashMap();
- paramsMap.put("out_trade_no", orderNo);//订单编号
- paramsMap.put("out_refund_no", refundsInfo.getRefundNo());//退款单编号
- paramsMap.put("reason", reason);//退款原因
- paramsMap.put("notify_url", wxPayConfig.getNotifyDomain().concat(WxNotifyType.REFUND_NOTIFY.getType()));//退款通知地址
-
- Map amountMap = new HashMap();
- amountMap.put("refund", refundsInfo.getRefund());//退款金额
- amountMap.put("total", refundsInfo.getTotalFee());//原订单金额
- amountMap.put("currency", "CNY");//退款币种
- paramsMap.put("amount", amountMap);
-
- //将参数转换成json字符串
- String jsonParams = gson.toJson(paramsMap);
- logger.info("请求参数 ===> {}" + jsonParams);
-
- StringEntity entity = new StringEntity(jsonParams, "utf-8");
- entity.setContentType("application/json");//设置请求报文格式
- httpPost.setEntity(entity);//将请求报文放入请求对象
- httpPost.setHeader("Accept", "application/json");//设置响应报文格式
-
- //完成签名并执行请求,并完成验签
- CloseableHttpResponse response =null;// wxPayClient.execute(httpPost);
-
- try {
-
- //解析响应结果
- String bodyAsString = EntityUtils.toString(response.getEntity());
- int statusCode = response.getStatusLine().getStatusCode();
- if (statusCode == 200) {
- logger.info("成功, 退款返回结果 = " + bodyAsString);
- } else if (statusCode == 204) {
- logger.info("成功");
- } else {
- throw new RuntimeException("退款异常, 响应码 = " + statusCode + ", 退款返回结果 = " + bodyAsString);
- }
-
- //更新订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.REFUND_PROCESSING);
-
- //更新退款单
- refundsInfoService.updateRefund(bodyAsString);
-
- } finally {
- response.close();
- }
- }
-
-
- /**
- * 查询退款接口调用
- *
- * @param refundNo
- * @return
- */
- @Override
- public String queryRefund(String refundNo) throws Exception {
-
- logger.info("查询退款接口调用 ===> {}", refundNo);
-
- String url = String.format(WxApiType.DOMESTIC_REFUNDS_QUERY.getType(), refundNo);
- url = wxPayConfig.getDomain().concat(url);
-
- //创建远程Get 请求对象
- HttpGet httpGet = new HttpGet(url);
- httpGet.setHeader("Accept", "application/json");
-
- //完成签名并执行请求
- CloseableHttpResponse response = null;//wxPayClient.execute(httpGet);
-
- try {
- String bodyAsString = EntityUtils.toString(response.getEntity());
- int statusCode = response.getStatusLine().getStatusCode();
- if (statusCode == 200) {
- logger.info("成功, 查询退款返回结果 = " + bodyAsString);
- } else if (statusCode == 204) {
- logger.info("成功");
- } else {
- throw new RuntimeException("查询退款异常, 响应码 = " + statusCode + ", 查询退款返回结果 = " + bodyAsString);
- }
-
- return bodyAsString;
-
- } finally {
- response.close();
- }
- }
-
- /**
- * 根据退款单号核实退款单状态
- *
- * @param refundNo
- * @return
- */
- @Transactional(rollbackFor = Exception.class)
- @Override
- public void checkRefundStatus(String refundNo) throws Exception {
-
- logger.info("根据退款单号核实退款单状态 ===> {}", refundNo);
-
- //调用查询退款单接口
- String result = this.queryRefund(refundNo);
-
- //组装json请求体字符串
- Gson gson = new Gson();
- Map<String, String> resultMap = gson.fromJson(result, HashMap.class);
-
- //获取微信支付端退款状态
- String status = resultMap.get("status");
-
- String orderNo = resultMap.get("out_trade_no");
-
- if (WxRefundStatus.SUCCESS.getType().equals(status)) {
-
- logger.info("核实订单已退款成功 ===> {}", refundNo);
-
- //如果确认退款成功,则更新订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.REFUND_SUCCESS);
-
- //更新退款单
- refundsInfoService.updateRefund(result);
- }
-
- if (WxRefundStatus.ABNORMAL.getType().equals(status)) {
-
- logger.info("核实订单退款异常 ===> {}", refundNo);
-
- //如果确认退款成功,则更新订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.REFUND_ABNORMAL);
-
- //更新退款单
- refundsInfoService.updateRefund(result);
- }
- }
-
- /**
- * 处理退款单
- */
- @Transactional(rollbackFor = Exception.class)
- @Override
- public void processRefund(Map<String, Object> bodyMap) throws Exception {
-
- logger.info("退款单");
-
- //解密报文
- String plainText = decryptFromResource(bodyMap);
-
- //将明文转换成map
- Gson gson = new Gson();
- HashMap plainTextMap = gson.fromJson(plainText, HashMap.class);
- String orderNo = (String) plainTextMap.get("out_trade_no");
-
- if (lock.tryLock()) {
- try {
-
- String orderStatus = orderInfoService.getOrderStatus(orderNo);
- if (!OrderStatus.REFUND_PROCESSING.getType().equals(orderStatus)) {
- return;
- }
-
- //更新订单状态
- orderInfoService.updateStatusByOrderNo(orderNo, OrderStatus.REFUND_SUCCESS);
-
- //更新退款单
- refundsInfoService.updateRefund(plainText);
-
- } finally {
- //要主动释放锁
- lock.unlock();
- }
- }
- }
-
-
- @Override
- public Map<String, String> jsapiPay(Long properChargeRecordId) throws IOException {
-
- String prepayId = "";
- //生成订单
- OrderInfoEntity orderInfo = orderInfoService.getOne(Wrappers.<OrderInfoEntity>lambdaQuery().eq(OrderInfoEntity::getProperChargeRecordId, properChargeRecordId));
- if (orderInfo.getTotalFee() <= 0) {
- throw new CustomException("支付金额不能低于等于0元");
- }
- IUserService userService = SpringUtils.getBean(IUserService.class);
- User serviceOne = userService.getOne(Wrappers.<User>lambdaQuery().eq(User::getId, AuthUtil.getUserId()));
-
- logger.info("调用统一下单API");
-
- //调用统一下单API
- HttpPost httpPost = new HttpPost(wxPayConfig.getDomain().concat(WxApiType.JSAPI_PAY.getType()));
-
- // 请求body参数
-
- Gson gson = new Gson();
- Map paramsMap = new HashMap();
- paramsMap.put("appid", wxPayConfig.getAppid());
- paramsMap.put("mchid", wxPayConfig.getMchId());
- paramsMap.put("description", orderInfo.getTitle());
- paramsMap.put("out_trade_no", orderInfo.getOrderNo());
- paramsMap.put("notify_url", wxPayConfig.getNotifyDomain().concat(WxNotifyType.NATIVE_NOTIFY.getType()));
-
- Map amountMap = new HashMap();
- amountMap.put("total", orderInfo.getTotalFee());
- amountMap.put("currency", "CNY");
-
- paramsMap.put("amount", amountMap);
-
- Map payerMap = new HashMap();
- payerMap.put("openid", serviceOne.getMiniOpenId());
-
- paramsMap.put("payer", payerMap);
-
- // 是否指定分账,枚举值 true:是 false:否
- paramsMap.put("profit_sharing", true);
-
- //将参数转换成json字符串
- String jsonParams = gson.toJson(paramsMap);
- logger.info("请求参数 ===> {}" + jsonParams);
-
- StringEntity entity = new StringEntity(jsonParams, "utf-8");
- entity.setContentType("application/json");
- httpPost.setEntity(entity);
- httpPost.setHeader("Accept", "application/json");
-
- //完成签名并执行请求
- CloseableHttpResponse response = null;//wxPayClient.execute(httpPost);
-
- try {
- String bodyAsString = EntityUtils.toString(response.getEntity());//响应体
- int statusCode = response.getStatusLine().getStatusCode();//响应状态码
- if (statusCode == 200) { //处理成功
- logger.info("成功, 返回结果 = " + bodyAsString);
- } else if (statusCode == 204) { //处理成功,无返回Body
- logger.info("成功");
- } else {
- logger.info("jszpi下单失败,响应码 = " + statusCode + ",返回结果 = " + bodyAsString);
- throw new IOException("request failed");
- }
- //响应结果
- Map<String, String> resultMap = gson.fromJson(bodyAsString, HashMap.class);
- //预支付交易会话标识
- prepayId = resultMap.get("prepay_id");
-
- //返回预支付交易会话标识
- // 组装前端预下单参数
- /** 返回给前端所需要的数据 */
- SortedMap<String, String> payMap = new TreeMap<>();
- String nonceStr = WXPayUtil.generateNonceStr();
- String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
- payMap.put("appId", wxPayConfig.getAppid());
- payMap.put("timeStamp", timestamp);
- payMap.put("nonceStr", nonceStr);
- payMap.put("signType", "RSA");
- payMap.put("package", "prepay_id=" + prepayId);
- String paySign = getSign(wxPayConfig.getAppid(), prepayId, timestamp, nonceStr);
- payMap.put("paySign", paySign);
- logger.info("返回参数 ===> {}" + gson.toJson(payMap));
- return payMap;
- } catch (IOException e) {
- throw new RuntimeException(e);
- } catch (SignatureException e) {
- throw new RuntimeException(e);
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException(e);
- } catch (InvalidKeyException e) {
- throw new RuntimeException(e);
- } finally {
- response.close();
- }
- }
-
- /**
- * 通过prepay_id获取签名
- *
- * @param appid
- * @param prepay_id
- * @param timestamp
- * @param nonceStr
- * @return
- * @throws IOException
- * @throws SignatureException
- * @throws NoSuchAlgorithmException
- * @throws InvalidKeyException
- */
- String getSign(String appid, String prepay_id, String timestamp, String nonceStr) throws IOException, SignatureException, NoSuchAlgorithmException, InvalidKeyException {
- //从下往上依次生成
- String message = getSignStr(appid, timestamp, nonceStr, "prepay_id=" + prepay_id);
- //签名
- String signature = sign(message.getBytes("utf-8"));
- return signature;
- }
-
- String sign(byte[] message) throws NoSuchAlgorithmException, SignatureException, IOException, InvalidKeyException {
- //签名方式
- Signature sign = Signature.getInstance("SHA256withRSA");
- //私钥,通过MyPrivateKey来获取,这是个静态类可以接调用方法 ,需要的是_key.pem文件的绝对路径配上文件名
- sign.initSign(getPrivateKey(wxPayConfig.getPrivateKeyPath()));
- sign.update(message);
-
- return Base64.getEncoder().encodeToString(sign.sign());
- }
-
- /**
- * 按照前端签名文档规范进行排序
- *
- * @param appId
- * @param timeStamp
- * @param nonceStr
- * @param packageValue
- * @return
- */
- private String getSignStr(String appId, String timeStamp, String nonceStr, String packageValue) {
- return String.format("%s\n%s\n%s\n%s\n", appId, timeStamp, nonceStr, packageValue);
- }
-
- private PrivateKey getPrivateKey(String filename) {
-
- try {
- FileInputStream fileInputStream = new FileInputStream(filename);
- logger.info("文件内容:" + fileInputStream);
- return PemUtil.loadPrivateKey(fileInputStream);
- } catch (Exception e) {
- logger.info("私钥文件不存在", e);
- throw new RuntimeException("私钥文件不存在", e);
- }
- }
-
-
- /**
- * 关单接口的调用
- *
- * @param orderNo
- */
- private void closeOrder(String orderNo) throws Exception {
-
- logger.info("关单接口的调用,订单号 ===> {}", orderNo);
- //创建远程请求对象
- String url = String.format(WxApiType.CLOSE_ORDER_BY_NO.getType(), orderNo);
- url = wxPayConfig.getDomain().concat(url);
- HttpPost httpPost = new HttpPost(url);
-
- //组装json请求体
- Gson gson = new Gson();
- Map<String, String> paramsMap = new HashMap<>();
- paramsMap.put("mchid", wxPayConfig.getMchId());
- String jsonParams = gson.toJson(paramsMap);
- logger.info("请求参数 ===> {}", jsonParams);
-
- //将请求参数设置到请求对象中
- StringEntity entity = new StringEntity(jsonParams, "utf-8");
- entity.setContentType("application/json");
- httpPost.setEntity(entity);
- httpPost.setHeader("Accept", "application/json");
-
- //完成签名并执行请求
- CloseableHttpResponse response = null;//wxPayClient.execute(httpPost);
-
- try {
- int statusCode = response.getStatusLine().getStatusCode();//响应状态码
- if (statusCode == 200) { //处理成功
- logger.info("成功200");
- } else if (statusCode == 204) { //处理成功,无返回Body
- logger.info("成功204");
- } else {
- logger.info("Native下单失败,响应码 = " + statusCode);
- throw new IOException("request failed");
- }
-
- } finally {
- response.close();
- }
- }
-
- /**
- * 对称解密
- *
- * @param bodyMap
- * @return
- */
- private String decryptFromResource(Map<String, Object> bodyMap) throws GeneralSecurityException {
-
- logger.info("密文解密");
-
- //通知数据
- Map<String, String> resourceMap = (Map) bodyMap.get("resource");
- //数据密文
- String ciphertext = resourceMap.get("ciphertext");
- //随机串
- String nonce = resourceMap.get("nonce");
- //附加数据
- String associatedData = resourceMap.get("associated_data");
-
- logger.info("密文 ===> {}", ciphertext);
- AesUtil aesUtil = new AesUtil(wxPayConfig.getApiV3Key().getBytes(StandardCharsets.UTF_8));
- String plainText = aesUtil.decryptToString(associatedData.getBytes(StandardCharsets.UTF_8),
- nonce.getBytes(StandardCharsets.UTF_8),
- ciphertext);
-
- logger.info("明文 ===> {}", plainText);
-
- return plainText;
- }
-
- @Override
- public String nativeNotify(HttpServletRequest request, HttpServletResponse response) {
- Gson gson = new Gson();
- Map<String, String> map = new HashMap<>();//应答对象
-
- try {
-
- //处理通知参数
- String body = HttpUtils.readData(request);
- Map<String, Object> bodyMap = gson.fromJson(body, HashMap.class);
- String requestId = (String) bodyMap.get("id");
- logger.info("支付通知的id ===> {}", requestId);
- logger.info("支付通知的完整数据 ===> {}", body);
- //int a = 9 / 0;
-
- //签名的验证
- WechatPay2ValidatorForRequest wechatPay2ValidatorForRequest
- = new WechatPay2ValidatorForRequest(wxPayConfig.getVerifier(), requestId, body);
- if (!wechatPay2ValidatorForRequest.validate(request)) {
-
- logger.error("通知验签失败");
- //失败应答
- response.setStatus(500);
- map.put("code", "ERROR");
- map.put("message", "通知验签失败");
- return gson.toJson(map);
- }
- logger.info("通知验签成功");
-
- //处理订单
- processOrder(bodyMap);
-
- //成功应答
- response.setStatus(200);
- map.put("code", "SUCCESS");
- map.put("message", "成功");
- return gson.toJson(map);
-
- } catch (Exception e) {
- e.printStackTrace();
- //失败应答
- response.setStatus(500);
- map.put("code", "ERROR");
- map.put("message", "失败");
- return gson.toJson(map);
- }
- }
-
- @Override
- public String refundsNotify(HttpServletRequest request, HttpServletResponse response) {
- Gson gson = new Gson();
- Map<String, String> map = new HashMap<>();//应答对象
-
- try {
- //处理通知参数
- String body = HttpUtils.readData(request);
- Map<String, Object> bodyMap = gson.fromJson(body, HashMap.class);
- String requestId = (String) bodyMap.get("id");
- logger.info("支付通知的id ===> {}", requestId);
-
- //签名的验证
- WechatPay2ValidatorForRequest wechatPay2ValidatorForRequest
- = new WechatPay2ValidatorForRequest(wxPayConfig.getVerifier(), requestId, body);
- if (!wechatPay2ValidatorForRequest.validate(request)) {
-
- logger.error("通知验签失败");
- //失败应答
- response.setStatus(500);
- map.put("code", "ERROR");
- map.put("message", "通知验签失败");
- return gson.toJson(map);
- }
- logger.info("通知验签成功");
-
- //处理退款单
- processRefund(bodyMap);
-
- //成功应答
- response.setStatus(200);
- map.put("code", "SUCCESS");
- map.put("message", "成功");
- return gson.toJson(map);
-
- } catch (Exception e) {
- e.printStackTrace();
- //失败应答
- response.setStatus(500);
- map.put("code", "ERROR");
- map.put("message", "失败");
- return gson.toJson(map);
- }
- }
-
-
- //创建签名所需要的参数xml格式
-// public static String createXML(Map<String, Object> map) {
-// String xml = "<xml>";
-// Set<String> set = map.keySet();
-// Iterator<String> i = set.iterator();
-// while (i.hasNext()) {
-// String str = i.next();
-// xml += "<" + str + ">" + "<![CDATA[" + map.get(str) + "]]>" + "</" + str + ">";
-// }
-// xml += "</xml>";
-// return xml;
-// }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/vo/OrderInfoVO.java b/src/main/java/org/springblade/modules/pay/vo/OrderInfoVO.java
deleted file mode 100644
index 7a1129c..0000000
--- a/src/main/java/org/springblade/modules/pay/vo/OrderInfoVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.vo;
-
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 订单信息 视图实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OrderInfoVO extends OrderInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/vo/PaymentInfoVO.java b/src/main/java/org/springblade/modules/pay/vo/PaymentInfoVO.java
deleted file mode 100644
index f137d6d..0000000
--- a/src/main/java/org/springblade/modules/pay/vo/PaymentInfoVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.vo;
-
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 支付信息 视图实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PaymentInfoVO extends PaymentInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/vo/RefundInfoVO.java b/src/main/java/org/springblade/modules/pay/vo/RefundInfoVO.java
deleted file mode 100644
index d519c32..0000000
--- a/src/main/java/org/springblade/modules/pay/vo/RefundInfoVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.vo;
-
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 退款信息 视图实体类
- *
- * @author BladeX
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class RefundInfoVO extends RefundInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/wrapper/OrderInfoWrapper.java b/src/main/java/org/springblade/modules/pay/wrapper/OrderInfoWrapper.java
deleted file mode 100644
index 962a6f3..0000000
--- a/src/main/java/org/springblade/modules/pay/wrapper/OrderInfoWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.pay.entity.OrderInfoEntity;
-import org.springblade.modules.pay.vo.OrderInfoVO;
-
-import java.util.Objects;
-
-/**
- * 订单信息 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public class OrderInfoWrapper extends BaseEntityWrapper<OrderInfoEntity, OrderInfoVO> {
-
- public static OrderInfoWrapper build() {
- return new OrderInfoWrapper();
- }
-
- @Override
- public OrderInfoVO entityVO(OrderInfoEntity orderInfo) {
- OrderInfoVO orderInfoVO = Objects.requireNonNull(BeanUtil.copy(orderInfo, OrderInfoVO.class));
-
- //User createUser = UserCache.getUser(orderInfo.getCreateUser());
- //User updateUser = UserCache.getUser(orderInfo.getUpdateUser());
- //orderInfoVO.setCreateUserName(createUser.getName());
- //orderInfoVO.setUpdateUserName(updateUser.getName());
-
- return orderInfoVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/wrapper/PaymentInfoWrapper.java b/src/main/java/org/springblade/modules/pay/wrapper/PaymentInfoWrapper.java
deleted file mode 100644
index 0cc7cfb..0000000
--- a/src/main/java/org/springblade/modules/pay/wrapper/PaymentInfoWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.pay.entity.PaymentInfoEntity;
-import org.springblade.modules.pay.vo.PaymentInfoVO;
-
-import java.util.Objects;
-
-/**
- * 支付信息 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public class PaymentInfoWrapper extends BaseEntityWrapper<PaymentInfoEntity, PaymentInfoVO> {
-
- public static PaymentInfoWrapper build() {
- return new PaymentInfoWrapper();
- }
-
- @Override
- public PaymentInfoVO entityVO(PaymentInfoEntity paymentInfo) {
- PaymentInfoVO paymentInfoVO = Objects.requireNonNull(BeanUtil.copy(paymentInfo, PaymentInfoVO.class));
-
- //User createUser = UserCache.getUser(paymentInfo.getCreateUser());
- //User updateUser = UserCache.getUser(paymentInfo.getUpdateUser());
- //paymentInfoVO.setCreateUserName(createUser.getName());
- //paymentInfoVO.setUpdateUserName(updateUser.getName());
-
- return paymentInfoVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/pay/wrapper/RefundInfoWrapper.java b/src/main/java/org/springblade/modules/pay/wrapper/RefundInfoWrapper.java
deleted file mode 100644
index 2ef166e..0000000
--- a/src/main/java/org/springblade/modules/pay/wrapper/RefundInfoWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.pay.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.pay.entity.RefundInfoEntity;
-import org.springblade.modules.pay.vo.RefundInfoVO;
-
-import java.util.Objects;
-
-/**
- * 退款信息 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-07
- */
-public class RefundInfoWrapper extends BaseEntityWrapper<RefundInfoEntity, RefundInfoVO> {
-
- public static RefundInfoWrapper build() {
- return new RefundInfoWrapper();
- }
-
- @Override
- public RefundInfoVO entityVO(RefundInfoEntity refundInfo) {
- RefundInfoVO refundInfoVO = Objects.requireNonNull(BeanUtil.copy(refundInfo, RefundInfoVO.class));
-
- //User createUser = UserCache.getUser(refundInfo.getCreateUser());
- //User updateUser = UserCache.getUser(refundInfo.getUpdateUser());
- //refundInfoVO.setCreateUserName(createUser.getName());
- //refundInfoVO.setUpdateUserName(updateUser.getName());
-
- return refundInfoVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java b/src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java
deleted file mode 100644
index 145cbe4..0000000
--- a/src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.place.dto.PlaceCheckDTO;
-import org.springblade.modules.place.excel.NinePlaceExcel;
-import org.springblade.modules.place.excel.PlaceCheckExcel;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import org.springblade.modules.place.wrapper.PlaceCheckWrapper;
-import org.springblade.modules.place.service.IPlaceCheckService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.List;
-
-/**
- * 场所检查表 控制器
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-placeCheck/placeCheck")
-@Api(value = "场所检查表", tags = "场所检查表接口")
-public class PlaceCheckController{
-
- private final IPlaceCheckService placeCheckService;
- private final BladeLogger bladeLogger;
-
- /**
- * 场所检查表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入placeCheck")
- public R<PlaceCheckVO> detail(PlaceCheckEntity placeCheck) {
- PlaceCheckVO detail = placeCheckService.selectPlaceCheckById(placeCheck.getId());
- return R.data(detail);
- }
- /**
- * 场所检查表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入placeCheck")
- public R<IPage<PlaceCheckVO>> list(PlaceCheckEntity placeCheck, Query query) {
- IPage<PlaceCheckEntity> pages = placeCheckService.page(Condition.getPage(query), Condition.getQueryWrapper(placeCheck));
- return R.data(PlaceCheckWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所检查表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("场所检查表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入placeCheck")
- public R<IPage<PlaceCheckVO>> page(PlaceCheckVO placeCheck, Query query) {
- bladeLogger.info("场所检查表 自定义分页", JsonUtil.toJson(placeCheck));
- IPage<PlaceCheckVO> pages = placeCheckService.selectPlaceCheckPage(Condition.getPage(query), placeCheck);
- return R.data(pages);
- }
-
- /**
- * 场所检查表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入placeCheck")
- public R save(@Valid @RequestBody PlaceCheckVO placeCheck){
- return R.status(placeCheckService.save(placeCheck));
- }
-
- /**
- * 场所检查表 新增
- */
- @PostMapping("/saveTwo")
- @ApiOperationSupport(order = 4)
- @ApiLog("场所检查表 新增")
- @ApiOperation(value = "新增", notes = "传入placeCheck")
- public R saveTwo(@Valid @RequestBody PlaceCheckVO placeCheck) throws Exception {
- bladeLogger.info("场所检查表 新增", JsonUtil.toJson(placeCheck));
- return R.status(placeCheckService.savePlace(placeCheck));
- }
-
- /**
- * 场所检查表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入placeCheck")
- public R update(@Valid @RequestBody PlaceCheckEntity placeCheck) {
- return R.status(placeCheckService.updateById(placeCheck));
- }
-
- /**
- * 场所检查表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入placeCheck")
- public R submit(@Valid @RequestBody PlaceCheckVO placeCheck) {
- return R.status(placeCheckService.saveOrUpdate(placeCheck));
- }
-
- /**
- * 场所检查表 删除
- */
- @PostMapping("/remove")
- @ApiLog("场所检查表 删除")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("场所检查表 删除", JsonUtil.toJson(ids));
- return R.status(placeCheckService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 导出场所检查信息
- * @param placeCheck
- */
- @GetMapping("export-placeCheck")
- @ApiLog("导出场所检查信息")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "导出场所检查", notes = "传入placeCheck")
- public void exportPlaceCheck(PlaceCheckVO placeCheck, HttpServletResponse response) {
- bladeLogger.info("导出场所检查信息", JsonUtil.toJson(placeCheck));
- List<PlaceCheckExcel> list = placeCheckService.exportPlaceCheck(placeCheck);
- ExcelUtil.export(response, "场所检查" + DateUtil.time(), "场所检查记录表", list, PlaceCheckExcel.class);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlaceController.java b/src/main/java/org/springblade/modules/place/controller/PlaceController.java
deleted file mode 100644
index e2ffbf0..0000000
--- a/src/main/java/org/springblade/modules/place/controller/PlaceController.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.place.excel.*;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.place.wrapper.PlaceWrapper;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-/**
- * 场所表 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-place/place")
-@Api(value = "场所表", tags = "场所表接口")
-public class PlaceController extends BladeController{
-
- private final IPlaceService placeService;
- private final BladeLogger bladeLogger;
-
- /**
- * 场所表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入place")
- public R<PlaceVO> detail(PlaceEntity place) {
- PlaceEntity detail = placeService.getOne(Condition.getQueryWrapper(place));
- return R.data(PlaceWrapper.build().entityVO(detail));
- }
- /**
- * 场所表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页LIST", notes = "传入place")
- public R<IPage<PlaceVO>> list(PlaceEntity place, Query query) {
- IPage<PlaceEntity> pages = placeService.page(Condition.getPage(query), Condition.getQueryWrapper(place));
- return R.data(PlaceWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所表 自定义分页
- */
- @ApiLog("场所列表查询")
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页page", notes = "传入place")
- public R<IPage<PlaceVO>> page(PlaceVO place, Query query) {
- bladeLogger.info("blade-place_page", JsonUtil.toJson(place));
- IPage<PlaceVO> pages = placeService.selectPlacePage(Condition.getPage(query), place);
- return R.data(pages);
- }
-
- /**
- * 九小场所档案
- */
- @ApiLog("九小场所档案列表查询")
- @GetMapping("/ninePage")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "九小场所档案", notes = "传入place")
- public R<IPage<PlaceVO>> ninePage(PlaceVO place, Query query) {
- bladeLogger.info("blade-place_ninePage", JsonUtil.toJson(place));
- IPage<PlaceVO> pages = placeService.selectNinePlacePage(Condition.getPage(query), place);
- return R.data(pages);
- }
-
- /**
- * 企业商超列表查询
- */
- @ApiLog("企业商超列表查询")
- @GetMapping("/mallPage")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "企业商超列表查询", notes = "传入place")
- public R<IPage<PlaceVO>> mallPage(PlaceVO place, Query query) {
- bladeLogger.info("blade-place_mallPage", JsonUtil.toJson(place));
- IPage<PlaceVO> pages = placeService.selectMallPage(Condition.getPage(query), place);
- return R.data(pages);
- }
-
- /**
- * 场所表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入place")
- public R save(@Valid @RequestBody PlaceEntity place) {
- return R.status(placeService.save(place));
- }
-
- /**
- * 自定义新增
- * @param placeVO
- * @return
- */
- @PostMapping("/add")
- @ApiLog("场所自定义新增")
- @ApiOperation(value = "自定义新增", notes = "传入place")
- public R add(@RequestBody PlaceVO placeVO){
- bladeLogger.info("场所自定义新增", JsonUtil.toJson(placeVO));
- return R.status(placeService.addOrUpdate(placeVO));
- }
-
-
- /**
- * 自定义新增/修改
- * @param placeVO
- * @return
- */
- @PostMapping("/addOrUpdate")
- @ApiLog("场所自定义新增/修改")
- @ApiOperation(value = "自定义新增/修改", notes = "传入place")
- public R addOrUpdate(@RequestBody PlaceVO placeVO){
- bladeLogger.info("场所自定义新增/修改", JsonUtil.toJson(placeVO));
- return R.status(placeService.addOrUpdate(placeVO));
- }
-
- /**
- * 场所表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入place")
- public R update(@Valid @RequestBody PlaceEntity place) {
- return R.status(placeService.updateById(place));
- }
-
-
- /**
- * 自定义修改
- * @param placeVO
- * @return
- */
- @PostMapping("/updatePlace")
- @ApiOperation(value = "自定义修改", notes = "传入place")
- public R updatePlace(@RequestBody PlaceVO placeVO){
- return R.status(placeService.updatePlace(placeVO));
- }
-
- /**
- * 场所表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入place")
- public R submit(@Valid @RequestBody PlaceEntity place) {
- return R.status(placeService.saveOrUpdate(place));
- }
-
- /**
- * 场所表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("场所数据删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("场所数据删除", JsonUtil.toJson(ids));
- List<Long> longs = Func.toLongList(ids);
- // 返回
- return R.status(placeService.removePlace(longs));
- }
-
- /**
- * 历史场所挂接处理-临时
- * @param place
- * @return
- */
- @GetMapping("/historyPlaceHandle")
- public R historyPlaceHandle(PlaceVO place) {
- return R.data(placeService.historyPlaceHandle(place));
- }
-
- /**
- * 历史场所标签挂接处理-场所标签-临时
- * @param place
- * @return
- */
- @GetMapping("/historyPlaceLabelHandle")
- public R historyPlaceLabelHandle(PlaceVO place) {
- return R.data(placeService.historyPlaceLabelHandle(place));
- }
-
- /**
- * 历史场所详情数据处理
- * @param place
- * @return
- */
- @GetMapping("/historyPlaceExtHandle")
- public R historyPlaceExtHandle(PlaceVO place) {
- return R.data(placeService.historyPlaceExtHandle(place));
- }
-
-
- /**
- * 场所表 自定义详情查询
- * @param place
- * @return
- */
- @GetMapping("/getDetail")
- @ApiLog("场所表 自定义详情查询")
- @ApiOperation(value = "场所表 自定义详情查询", notes = "传入ids")
- public R<PlaceVO> getDetail(PlaceVO place) {
- bladeLogger.info("场所表 自定义详情查询", JsonUtil.toJson(place));
- return R.data(placeService.getDetail(place));
- }
-
-
- /**
- * 导入场所数据
- */
- @PostMapping("/import-place")
- public R importPlace(MultipartFile file, Integer isCovered) {
- PlaceImporter placeImporter = new PlaceImporter(placeService, isCovered == 1);
- ExcelUtil.save(file, placeImporter, PlaceExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 导入场所(商超)数据
- */
- @PostMapping("/import-placeAndRel")
- public R importPlaceAndRel(MultipartFile file, Integer isCovered) {
- PlaceAndRelImporter placeImporter = new PlaceAndRelImporter(placeService, isCovered == 1);
- ExcelUtil.save(file, placeImporter, PlaceAndRelExcel.class);
- return R.success("操作成功");
- }
-
- /**
- * 商超数据处理
- * @return
- */
- @GetMapping("/placeAndRelHandle")
- public R placeAndRelHandle() {
- return R.data(placeService.placeAndRelHandle());
- }
-
- /**
- * 场所数据处理-用户信息(场所负责人信息写入到场所表)
- */
- @GetMapping("/placeUserHandle")
- public R placeUserHandle() {
- return R.data(placeService.placeUserHandle());
- }
-
- /**
- * 场所标签数据处理
- */
- @GetMapping("/placeLabelHandle")
- public R placeLabelHandle() {
- return R.data(placeService.placeLabelHandle());
- }
-
- /**
- * 导出九小统计
- */
- @GetMapping("exportNineType")
- @ApiOperationSupport(order = 13)
- @ApiLog("导出九小统计")
- @ApiOperation(value = "导出九小统计", notes = "传入place")
- public void exportNineType(PlaceVO place, HttpServletResponse response) {
- List<NinePlaceExcel> list = placeService.export(place);
- ExcelUtil.export(response, "档案管理" + DateUtil.time(), "场所数据表", list, NinePlaceExcel.class);
- }
-
-
- /**
- * 场所警务网格处理
- */
- @GetMapping("/placeJwGridCodeHandle")
- public R placeJwGridCodeHandle() {
- return R.data(placeService.placeJwGridCodeHandle());
- }
-
- /**
- * 场所综治网格处理
- */
- @GetMapping("/placeGridCodeHandle")
- public R placeGridCodeHandle() {
- return R.data(placeService.placeGridCodeHandle());
- }
-
- /**
- * 场所二维码绑定处理
- */
- @GetMapping("/placeDoorBindHandle")
- public R placeDoorBindHandle() {
- return R.data(placeService.placeDoorBindHandle());
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlaceDoorController.java b/src/main/java/org/springblade/modules/place/controller/PlaceDoorController.java
deleted file mode 100644
index f3b2e07..0000000
--- a/src/main/java/org/springblade/modules/place/controller/PlaceDoorController.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.springblade.modules.place.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import org.springblade.modules.place.vo.PlaceDoorVO;
-import org.springblade.modules.place.wrapper.PlaceDoorWrapper;
-import org.springblade.modules.place.service.IPlaceDoorService;
-
-/**
- * 场所门牌关联表 控制器
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-placeDoor/placeDoor")
-@Api(value = "场所门牌关联表", tags = "场所门牌关联表接口")
-public class PlaceDoorController{
-
- private final IPlaceDoorService placeDoorService;
-
- /**
- * 场所门牌关联表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入placeDoor")
- public R<PlaceDoorEntity> detail(PlaceDoorEntity placeDoor) {
- PlaceDoorEntity detail = placeDoorService.getOne(Condition.getQueryWrapper(placeDoor));
- return R.data(detail);
- }
- /**
- * 场所门牌关联表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入placeDoor")
- public R<IPage<PlaceDoorVO>> list(PlaceDoorEntity placeDoor, Query query) {
- IPage<PlaceDoorEntity> pages = placeDoorService.page(Condition.getPage(query), Condition.getQueryWrapper(placeDoor));
- return R.data(PlaceDoorWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所门牌关联表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入placeDoor")
- public R<IPage<PlaceDoorVO>> page(PlaceDoorVO placeDoor, Query query) {
- IPage<PlaceDoorVO> pages = placeDoorService.selectPlaceDoorPage(Condition.getPage(query), placeDoor);
- return R.data(pages);
- }
-
- /**
- * 场所门牌关联表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入placeDoor")
- public R save(@Valid @RequestBody PlaceDoorEntity placeDoor) {
- return R.status(placeDoorService.save(placeDoor));
- }
-
- /**
- * 场所门牌关联表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入placeDoor")
- public R update(@Valid @RequestBody PlaceDoorEntity placeDoor) {
- return R.status(placeDoorService.updateById(placeDoor));
- }
-
- /**
- * 场所门牌关联表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入placeDoor")
- public R submit(@Valid @RequestBody PlaceDoorEntity placeDoor) {
- return R.status(placeDoorService.saveOrUpdate(placeDoor));
- }
-
- /**
- * 场所门牌关联表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(placeDoorService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlaceExtController.java b/src/main/java/org/springblade/modules/place/controller/PlaceExtController.java
deleted file mode 100644
index f4b3012..0000000
--- a/src/main/java/org/springblade/modules/place/controller/PlaceExtController.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.vo.PlaceExtVO;
-import org.springblade.modules.place.wrapper.PlaceExtWrapper;
-import org.springblade.modules.place.service.IPlaceExtService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 场所详情表 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-placeExt/placeExt")
-@Api(value = "场所详情表", tags = "场所详情表接口")
-public class PlaceExtController{
-
- private final IPlaceExtService placeExtService;
- private final BladeLogger bladeLogger;
-
- /**
- * 场所详情表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入placeExt")
- public R<PlaceExtVO> detail(PlaceExtEntity placeExt) {
- PlaceExtEntity detail = placeExtService.getOne(Condition.getQueryWrapper(placeExt));
- return R.data(PlaceExtWrapper.build().entityVO(detail));
- }
-
-
- /**
- * 场所详情表 自定义详情
- * @param placeExt
- * @return
- */
- @GetMapping("/getDetail")
- @ApiOperation(value = "自定义详情", notes = "传入placeExt")
- @ApiLog("场所详情表 自定义详情")
- public R<PlaceExtVO> getDetail(PlaceExtVO placeExt) {
- bladeLogger.info("场所详情表 自定义详情", JsonUtil.toJson(placeExt));
- return R.data(placeExtService.getDetail(placeExt));
- }
-
- /**
- * 场所详情表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入placeExt")
- public R<IPage<PlaceExtVO>> list(PlaceExtEntity placeExt, Query query) {
- IPage<PlaceExtEntity> pages = placeExtService.page(Condition.getPage(query), Condition.getQueryWrapper(placeExt));
- return R.data(PlaceExtWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所详情表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("场所详情表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入placeExt")
- public R<IPage<PlaceExtVO>> page(PlaceExtVO placeExt, Query query) {
- bladeLogger.info("场所详情表 自定义分页", JsonUtil.toJson(placeExt));
- IPage<PlaceExtVO> pages = placeExtService.selectPlaceExtPage(Condition.getPage(query), placeExt);
- return R.data(pages);
- }
-
- /**
- * 场所详情表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入placeExt")
- public R save(@Valid @RequestBody PlaceExtEntity placeExt) {
- return R.status(placeExtService.save(placeExt));
- }
-
- /**
- * 场所详情表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入placeExt")
- public R update(@Valid @RequestBody PlaceExtEntity placeExt) {
- return R.status(placeExtService.updateById(placeExt));
- }
-
- /**
- * 场所详情表 自定义更新
- * @param placeExt
- * @return
- */
- @PostMapping("/updatePlaceExt")
- @ApiLog("场所详情表 自定义更新")
- @ApiOperation(value = "自定义更新", notes = "传入placeExt")
- public R updatePlaceExt(@RequestBody PlaceExtVO placeExt) {
- bladeLogger.info("场所详情表 自定义更新", JsonUtil.toJson(placeExt));
- return R.status(placeExtService.updatePlaceExt(placeExt));
- }
-
- /**
- * 场所详情表 审核
- * @param placeExt
- * @return
- */
- @PostMapping("/checkPlaceExt")
- @ApiLog("场所详情表 审核")
- @ApiOperation(value = "审核", notes = "传入placeExt")
- public R checkPlaceExt(@RequestBody PlaceExtEntity placeExt) {
- bladeLogger.info("场所详情表 审核", JsonUtil.toJson(placeExt));
- return R.status(placeExtService.checkPlaceExt(placeExt));
- }
-
- /**
- * 场所详情表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入placeExt")
- public R submit(@Valid @RequestBody PlaceExtEntity placeExt) {
- return R.status(placeExtService.saveOrUpdate(placeExt));
- }
-
- /**
- * 场所详情表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("场所详情表 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("场所详情表 删除", JsonUtil.toJson(ids));
- return R.status(placeExtService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlacePractitionerController.java b/src/main/java/org/springblade/modules/place/controller/PlacePractitionerController.java
deleted file mode 100644
index 4ac200c..0000000
--- a/src/main/java/org/springblade/modules/place/controller/PlacePractitionerController.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.validation.Valid;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.vo.PlacePractitionerVO;
-import org.springblade.modules.place.wrapper.PlacePractitionerWrapper;
-import org.springblade.modules.place.service.IPlacePractitionerService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.Date;
-
-/**
- * 场所从业人员 控制器
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-placePractitioner/placePractitioner")
-@Api(value = "场所从业人员", tags = "场所从业人员接口")
-public class PlacePractitionerController {
-
- private final IPlacePractitionerService placePractitionerService;
- private final BladeLogger bladeLogger;
-
- /**
- * 场所从业人员 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入placePractitioner")
- public R<PlacePractitionerVO> detail(PlacePractitionerEntity placePractitioner) {
- PlacePractitionerEntity detail = placePractitionerService.getOne(Condition.getQueryWrapper(placePractitioner));
- return R.data(PlacePractitionerWrapper.build().entityVO(detail));
- }
-
- /**
- * 场所从业人员 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入placePractitioner")
- public R<IPage<PlacePractitionerVO>> list(PlacePractitionerEntity placePractitioner, Query query) {
- IPage<PlacePractitionerEntity> pages = placePractitionerService.page(Condition.getPage(query), Condition.getQueryWrapper(placePractitioner));
- return R.data(PlacePractitionerWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所从业人员 自定义分页
- */
- @GetMapping("/page")
- @ApiLog("场所从业人员 自定义分页")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入placePractitioner")
- public R<IPage<PlacePractitionerVO>> page(PlacePractitionerVO placePractitioner, Query query) {
- bladeLogger.info("场所从业人员 自定义分页", JsonUtil.toJson(placePractitioner));
- IPage<PlacePractitionerVO> pages = placePractitionerService.selectPlacePractitionerPage(Condition.getPage(query), placePractitioner);
- return R.data(pages);
- }
-
- /**
- * 场所从业人员 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入placePractitioner")
- public R save(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
- return R.status(placePractitionerService.save(placePractitioner));
- }
-
- /**
- * 场所从业人员 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入placePractitioner")
- public R update(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
- return R.status(placePractitionerService.updateById(placePractitioner));
- }
-
- /**
- * 场所从业人员 修改
- */
- @PostMapping("/auditing")
- @ApiOperationSupport(order = 5)
- @ApiLog("场所从业人员 修改")
- @ApiOperation(value = "修改", notes = "传入placePractitioner")
- public R auditing(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
- bladeLogger.info("场所从业人员 修改", JsonUtil.toJson(placePractitioner));
- return R.status(placePractitionerService.auditing(placePractitioner));
- }
-
- /**
- * 场所从业人员 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入placePractitioner")
- public R submit(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
- return R.status(placePractitionerService.saveOrUpdate(placePractitioner));
- }
-
- /**
- * 场所从业人员 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("场所从业人员 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("场所从业人员 删除", JsonUtil.toJson(ids));
- return R.status(placePractitionerService.removeBatchByIds(Func.toLongList(ids)));
- }
-
- /**
- * 统计少数民族和未成年数量
- */
- @GetMapping("/countByType")
- @ApiOperationSupport(order = 8)
- @ApiLog("统计少数民族和未成年数量")
- @ApiOperation(value = "统计少数民族和未成年数量", notes = "")
- public R countByType(PlacePractitionerVO placePractitioner) {
- bladeLogger.info("统计少数民族和未成年数量", JsonUtil.toJson(placePractitioner));
- return R.data(placePractitionerService.countByType(placePractitioner));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlaceRelController.java b/src/main/java/org/springblade/modules/place/controller/PlaceRelController.java
deleted file mode 100644
index d81fd10..0000000
--- a/src/main/java/org/springblade/modules/place/controller/PlaceRelController.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import org.springblade.modules.place.vo.PlaceRelVO;
-import org.springblade.modules.place.wrapper.PlaceRelWrapper;
-import org.springblade.modules.place.service.IPlaceRelService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 场所区域关联信息表(商超) 控制器
- *
- * @author BladeX
- * @since 2023-11-20
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-placeRel/placeRel")
-@Api(value = "场所区域关联信息表(商超)", tags = "场所区域关联信息表(商超)接口")
-public class PlaceRelController {
-
- private final IPlaceRelService placeRelService;
-
- /**
- * 场所区域关联信息表(商超) 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入placeRel")
- public R<PlaceRelVO> detail(PlaceRelEntity placeRel) {
- PlaceRelEntity detail = placeRelService.getOne(Condition.getQueryWrapper(placeRel));
- return R.data(PlaceRelWrapper.build().entityVO(detail));
- }
- /**
- * 场所区域关联信息表(商超) 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入placeRel")
- public R<IPage<PlaceRelVO>> list(PlaceRelEntity placeRel, Query query) {
- IPage<PlaceRelEntity> pages = placeRelService.page(Condition.getPage(query), Condition.getQueryWrapper(placeRel));
- return R.data(PlaceRelWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所区域关联信息表(商超) 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入placeRel")
- public R<IPage<PlaceRelVO>> page(PlaceRelVO placeRel, Query query) {
- IPage<PlaceRelVO> pages = placeRelService.selectPlaceRelPage(Condition.getPage(query), placeRel);
- return R.data(pages);
- }
-
- /**
- * 场所区域关联信息表(商超) 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入placeRel")
- public R save(@Valid @RequestBody PlaceRelEntity placeRel) {
- return R.status(placeRelService.save(placeRel));
- }
-
- /**
- * 场所区域关联信息表(商超) 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入placeRel")
- public R update(@Valid @RequestBody PlaceRelEntity placeRel) {
- return R.status(placeRelService.updateById(placeRel));
- }
-
- /**
- * 场所区域关联信息表(商超) 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入placeRel")
- public R submit(@Valid @RequestBody PlaceRelEntity placeRel) {
- return R.status(placeRelService.saveOrUpdate(placeRel));
- }
-
- /**
- * 场所区域关联信息表(商超) 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(placeRelService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 商超数据处理
- */
- @GetMapping("/mallDataHandle")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "商超数据处理", notes = "")
- public R mallDataHandle() {
- return R.status(placeRelService.mallDataHandle());
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java b/src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java
deleted file mode 100644
index db914aa..0000000
--- a/src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 场所检查表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceCheckDTO extends PlaceCheckEntity {
- private static final long serialVersionUID = 1L;
-
- private List<PatrolRecord> patrolRecordVOList;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlaceDTO.java b/src/main/java/org/springblade/modules/place/dto/PlaceDTO.java
deleted file mode 100644
index 0004b27..0000000
--- a/src/main/java/org/springblade/modules/place/dto/PlaceDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.dto;
-
-import org.springblade.modules.place.entity.PlaceEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceDTO extends PlaceEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlaceDoorDTO.java b/src/main/java/org/springblade/modules/place/dto/PlaceDoorDTO.java
deleted file mode 100644
index d4b8890..0000000
--- a/src/main/java/org/springblade/modules/place/dto/PlaceDoorDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.dto;
-
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所门牌关联表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceDoorDTO extends PlaceDoorEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlaceExtDTO.java b/src/main/java/org/springblade/modules/place/dto/PlaceExtDTO.java
deleted file mode 100644
index 7c00461..0000000
--- a/src/main/java/org/springblade/modules/place/dto/PlaceExtDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.dto;
-
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所详情表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceExtDTO extends PlaceExtEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlacePractitionerDTO.java b/src/main/java/org/springblade/modules/place/dto/PlacePractitionerDTO.java
deleted file mode 100644
index 9a7a5fb..0000000
--- a/src/main/java/org/springblade/modules/place/dto/PlacePractitionerDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.dto;
-
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所从业人员 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlacePractitionerDTO extends PlacePractitionerEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlaceRelDTO.java b/src/main/java/org/springblade/modules/place/dto/PlaceRelDTO.java
deleted file mode 100644
index 26d6911..0000000
--- a/src/main/java/org/springblade/modules/place/dto/PlaceRelDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.dto;
-
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所区域关联信息表(商超) 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-20
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceRelDTO extends PlaceRelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java b/src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java
deleted file mode 100644
index 2dc2623..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 场所检查表 实体类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Data
-@TableName("jczz_place_check")
-@ApiModel(value = "PlaceCheck对象", description = "场所检查表")
-public class PlaceCheckEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 门牌地址编码 */
- @ApiModelProperty(value = "门牌地址编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 备注 */
- @ApiModelProperty(value = "备注", example = "")
- @TableField("remark")
- private String remark;
-
- /** 照片 */
- @ApiModelProperty(value = "照片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 签名路径 */
- @ApiModelProperty(value = "签名路径", example = "")
- @TableField("signature_path")
- private String signaturePath;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 是否下发整改通知: 0:否 1 :是 */
- @ApiModelProperty(value = "是否下发整改通知: 0:否 1 :是 ", example = "")
- @TableField("rectification_notice_flag")
- private Integer rectificationNoticeFlag;
-
- /** 是否处罚:0:否 1 :是 */
- @ApiModelProperty(value = "是否处罚:0:否 1 :是", example = "")
- @TableField("punish_flag")
- private Integer punishFlag;
-
- /** 整改截止时间 */
- @ApiModelProperty(value = "整改截止时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_end_time")
- private Date rectificationEndTime;
-
- /** 处罚说明 */
- @ApiModelProperty(value = "处罚说明", example = "")
- @TableField("punish_remark")
- private String punishRemark;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- @TableField("hidden_danger_number")
- private Integer hiddenDangerNumber;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlaceDoorEntity.java b/src/main/java/org/springblade/modules/place/entity/PlaceDoorEntity.java
deleted file mode 100644
index 71bdc18..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlaceDoorEntity.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 场所门牌关联表 实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@TableName("jczz_place_door")
-@ApiModel(value = "PlaceDoor对象", description = "场所门牌关联表")
-public class PlaceDoorEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 场所ID
- */
- @ApiModelProperty(value = "场所ID")
- private Long placeId;
- /**
- * 门牌地址编号
- */
- @ApiModelProperty(value = "门牌地址编号")
- private String houseCode;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlaceEntity.java b/src/main/java/org/springblade/modules/place/entity/PlaceEntity.java
deleted file mode 100644
index 745b895..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlaceEntity.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 场所表 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_place")
-@ApiModel(value = "Place对象", description = "场所表")
-public class PlaceEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 门牌地址编码 */
- @ApiModelProperty(value = "门牌地址编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 门牌地址编号绑定 */
- @ApiModelProperty(value = "门牌地址编号绑定", example = "")
- @TableField("house_code_binds")
- private String houseCodeBinds;
-
- /** 楼栋编码 */
- @ApiModelProperty(value = "楼栋编码", example = "")
- @TableField("building_code")
- private String buildingCode;
-
- /** 场所负责人(关联用户表信息) */
- @ApiModelProperty(value = "场所负责人(关联用户表信息)", example = "")
- @TableField("principal_user_id")
- private Long principalUserId;
-
- /** 场所负责人姓名 */
- @ApiModelProperty(value = "场所负责人姓名", example = "")
- @TableField("principal")
- private String principal;
-
- /** 场所负责人联系方式 */
- @ApiModelProperty(value = "场所负责人联系方式", example = "")
- @TableField("principal_phone")
- private String principalPhone;
-
- /** 场所负责人身份证号 */
- @ApiModelProperty(value = "场所负责人身份证号", example = "")
- @TableField("principal_id_card")
- private String principalIdCard;
-
- /** 场所名称 */
- @ApiModelProperty(value = "场所名称", example = "")
- @TableField("place_name")
- private String placeName;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("lng")
- private String lng;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("lat")
- private String lat;
-
- /** 位置 */
- @ApiModelProperty(value = "位置", example = "")
- @TableField("location")
- private String location;
-
- /** 场所照片 */
- @ApiModelProperty(value = "场所照片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 网格id */
- @ApiModelProperty(value = "网格id", example = "")
- @TableField("grid_id")
- private Integer gridId;
-
- /** 网格编号 */
- @ApiModelProperty(value = "网格编号", example = "")
- @TableField("grid_code")
- private String gridCode;
-
- /** 警务网格编号 */
- @ApiModelProperty(value = "警务网格编号", example = "")
- @TableField("jw_grid_code")
- private String jwGridCode;
-
- /** 来源 1:地址总表 2:国控采集 3:商超 */
- @ApiModelProperty(value = "来源 1:地址总表 2:国控采集 3:商超", example = "")
- @TableField("source")
- private Integer source;
-
- /** 状态 1:待完善 2:已完善 */
- @ApiModelProperty(value = "状态 1:待完善 2:已完善", example = "")
- @TableField("status")
- private Integer status;
-
- /** 是否现场采集 1:是 2:否 */
- @ApiModelProperty(value = "是否现场采集 1:是 2:否", example = "")
- @TableField("is_scene")
- private Integer isScene;
-
- /** 是否九小场所 1:是 2:否 */
- @ApiModelProperty(value = "是否九小场所 1:是 2:否", example = "")
- @TableField("is_nine")
- private Integer isNine;
-
- /** 九小场所类型 业务字典:nineType */
- @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
- @TableField("nine_type")
- private Integer nineType;
-
- /** 是否阵地 1:是 2:否 */
- @ApiModelProperty(value = "是否阵地 1:是 2:否", example = "")
- @TableField("is_front")
- private Integer isFront;
-
- /** 阵地类型 业务字典:frontType */
- @ApiModelProperty(value = "阵地类型 业务字典:frontType", example = "")
- @TableField("front_type")
- private Integer frontType;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField(value = "create_user",fill = FieldFill.INSERT)
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField(value = "update_user",fill = FieldFill.UPDATE)
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 备注 */
- @ApiModelProperty(value = "备注", example = "")
- @TableField("remark")
- private String remark;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 小区编码 */
- @ApiModelProperty(value = "小区编码", example = "")
- @TableField("aoi_code")
- private String aoiCode;
-
- /** 1:是 2:否 三级消防单位 */
- @ApiModelProperty(value = "1:是 2:否 三级消防单位", example = "")
- @TableField("three_fire_protection")
- private Integer threeFireProtection;
-
- /** 无炸类别 */
- @ApiModelProperty(value = "无炸类别", example = "")
- @TableField("no_explosion_category")
- private Integer noExplosionCategory;
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlaceExtEntity.java b/src/main/java/org/springblade/modules/place/entity/PlaceExtEntity.java
deleted file mode 100644
index 7ca0e81..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlaceExtEntity.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 场所详情表 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_place_ext")
-@ApiModel(value = "PlaceExt对象", description = "场所详情表")
-public class PlaceExtEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 场所ID */
- @ApiModelProperty(value = "场所ID", example = "")
- @TableField("place_id")
- private Long placeId;
-
- /** 营业执照图片URLS */
- @ApiModelProperty(value = "营业执照图片URLS", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 法人信息 */
- @ApiModelProperty(value = "法人信息", example = "")
- @TableField("legal_person")
- private String legalPerson;
-
- /** 法人电话 */
- @ApiModelProperty(value = "法人电话", example = "")
- @TableField("legal_tel")
- private String legalTel;
-
- /** 场所平面图URLS */
- @ApiModelProperty(value = "场所平面图URLS", example = "")
- @TableField("plan_image_urls")
- private String planImageUrls;
-
- /** 审核确认人用户id */
- @ApiModelProperty(value = "审核确认人用户id", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认标记 1:待审核 2:审核通过 3:审核不通过 4:待完善 */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 4:待完善", example = "")
- @TableField("confirm_flag")
- private Integer confirmFlag;
-
- /** 审核确认时间 */
- @ApiModelProperty(value = "审核确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 审核意见 */
- @ApiModelProperty(value = "审核意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
- @ApiModelProperty(value = "法人身份证", example = "")
- @TableField("legal_id_card")
- private String legalIdCard;
-
- /** 房东名字 */
- @ApiModelProperty(value = "房东名字", example = "")
- @TableField("landlord_name")
- private String landlordName;
-
- /** 房东手机号 */
- @ApiModelProperty(value = "房东手机号", example = "")
- @TableField("landlord_phone")
- private String landlordPhone;
-
- /** 房东微信号 */
- @ApiModelProperty(value = "房东微信号", example = "")
- @TableField("landlord_wx_account")
- private String landlordWxAccount;
-
- /** 房东身份证号 */
- @ApiModelProperty(value = "房东身份证号", example = "")
- @TableField("landlord_id_card")
- private String landlordIdCard;
-
-
- /** 学生人数 */
- @ApiModelProperty(value = "学生人数", example = "")
- @TableField("student_number")
- private Integer studentNumber;
-
- /** 教职工人数 */
- @ApiModelProperty(value = "教职工人数", example = "")
- @TableField("workers_number")
- private Integer workersNumber;
-
- /** 专职保安 */
- @ApiModelProperty(value = "专职保安", example = "")
- @TableField("security_number")
- private Integer securityNumber;
-
- /** 专职门卫 */
- @ApiModelProperty(value = "专职门卫", example = "")
- @TableField("guard_number")
- private Integer guardNumber;
-
- /** 专兼职保卫人员 */
- @ApiModelProperty(value = "专兼职保卫人员", example = "")
- @TableField("temporary_security_number")
- private Integer temporarySecurityNumber;
-
- /** 走读/寄宿 */
- @ApiModelProperty(value = "走读/寄宿", example = "")
- @TableField("day_students_number")
- private Integer dayStudentsNumber;
-
- /** 住校生人员 */
- @ApiModelProperty(value = "住校生人员", example = "")
- @TableField("residential_students_number")
- private Integer residentialStudentsNumber;
-
- /** 宿舍管理人员 */
- @ApiModelProperty(value = "宿舍管理人员", example = "")
- @TableField("housemaster_number")
- private Integer housemasterNumber;
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlacePoiLabel.java b/src/main/java/org/springblade/modules/place/entity/PlacePoiLabel.java
deleted file mode 100644
index 4146536..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlacePoiLabel.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * 场所标签中间表
- */
-@Data
-@TableName("jczz_place_poi_label")
-public class PlacePoiLabel implements Serializable {
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- private Long placeId;
-
- private Integer poiCode;
-
- /**
- * 类型 1:大类 2:中类 3:小类
- */
- private Integer type;
-
- /**
- * 颜色
- */
- private String color;
-
- /**
- * 备注
- */
- private String remark;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlacePractitionerEntity.java b/src/main/java/org/springblade/modules/place/entity/PlacePractitionerEntity.java
deleted file mode 100644
index 93f4aa6..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlacePractitionerEntity.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 场所从业人员 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_place_practitioner")
-@ApiModel(value = "PlacePractitioner对象", description = "场所从业人员")
-public class PlacePractitionerEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 场所ID */
- @ApiModelProperty(value = "场所ID", example = "")
- @TableField("place_id")
- private Long placeId;
-
- /** 姓名 */
- @ApiModelProperty(value = "姓名", example = "")
- @TableField("name")
- private String name;
-
- /** 电话 */
- @ApiModelProperty(value = "电话", example = "")
- @TableField("telephone")
- private String telephone;
-
- /** 暂住地 */
- @ApiModelProperty(value = "暂住地", example = "")
- @TableField("temp_address")
- private String tempAddress;
-
- /** 年龄 */
- @ApiModelProperty(value = "年龄", example = "")
- @TableField("age")
- private Integer age;
-
- /** 性别 */
- @ApiModelProperty(value = "性别", example = "")
- @TableField("gender")
- private Integer gender;
-
- /** 身份证 */
- @ApiModelProperty(value = "身份证", example = "")
- @TableField("id_card")
- private String idCard;
-
- /** 岗位 */
- @ApiModelProperty(value = "岗位", example = "")
- @TableField("job_nature")
- private String jobNature;
-
- /** 从业人员的照片 */
- @ApiModelProperty(value = "从业人员的照片", example = "")
- @TableField("employer_img")
- private String employerImg;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 民族 */
- @ApiModelProperty(value = "民族", example = "")
- @TableField("ethnicity")
- private Integer ethnicity;
-
- /** 0:否1:是 */
- @ApiModelProperty(value = "0:否1:是", example = "")
- @TableField("is_deleted")
- @TableLogic(value = "0", delval = "1")
- private Integer isDeleted;
-
- /** 0:否 1:是 前科 */
- @ApiModelProperty(value = "0:否 1:是 前科", example = "")
- @TableField("criminal_record_flag")
- private Integer criminalRecordFlag;
-
- /** 0:否 1:是 假身份证 */
- @ApiModelProperty(value = "0:否 1:是 假身份证", example = "")
- @TableField("fake_id_card")
- private Integer fakeIdCard;
-
- /** 审查异常分类 */
- @ApiModelProperty(value = "审查异常分类", example = "")
- @TableField("ano_type_name")
- private String anoTypeName;
-
- /** 入职时间 */
- @ApiModelProperty(value = "入职时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField(value = "employment_time")
- private Date employmentTime;
-
- /** 离职时间 */
- @ApiModelProperty(value = "离职时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @TableField("resignation_time")
- private Date resignationTime;
-
- /** 是离职 1:否 2:是 */
- @ApiModelProperty(value = "是离职 1:否 2:是", example = "")
- @TableField("resignation_flag")
- private Integer resignationFlag;
-
- /** 审核确认人用户id */
- @ApiModelProperty(value = "审核确认人用户id", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认标记 1:待审核 2:审核通过 3:审核不通过 4:待完善 */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 4:待完善", example = "")
- @TableField("confirm_flag")
- private Integer confirmFlag;
-
- /** 审核确认时间 */
- @ApiModelProperty(value = "审核确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 审核意见 */
- @ApiModelProperty(value = "审核意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlaceRelEntity.java b/src/main/java/org/springblade/modules/place/entity/PlaceRelEntity.java
deleted file mode 100644
index c6ad241..0000000
--- a/src/main/java/org/springblade/modules/place/entity/PlaceRelEntity.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 场所区域关联信息表(商超) 实体类
- *
- * @author BladeX
- * @since 2023-11-20
- */
-@Data
-@TableName("jczz_place_rel")
-@ApiModel(value = "PlaceRel对象", description = "场所区域关联信息表(商超)")
-public class PlaceRelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
- /**
- * 场所id
- */
- @ApiModelProperty(value = "场所id")
- private Long placeId;
- /**
- * 街道名称
- */
- @ApiModelProperty(value = "街道名称")
- private String streetName;
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称")
- private String communityName;
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String communityCode;
- /**
- * 网格名称
- */
- @ApiModelProperty(value = "网格名称")
- private String gridName;
- /**
- * 写字楼名称
- */
- @ApiModelProperty(value = "写字楼名称")
- private String buildingName;
- /**
- * 门牌号
- */
- @ApiModelProperty(value = "门牌号")
- private String doorplateNum;
- /**
- * 楼层
- */
- @ApiModelProperty(value = "楼层")
- private String floor;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- private Date updateTime;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/excel/NinePlaceExcel.java b/src/main/java/org/springblade/modules/place/excel/NinePlaceExcel.java
deleted file mode 100644
index 9859708..0000000
--- a/src/main/java/org/springblade/modules/place/excel/NinePlaceExcel.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.springblade.modules.place.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItemLabel;
-
-import java.io.Serializable;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class NinePlaceExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 街道名称 */
- @ExcelProperty( "地区")
- private String townStreetName;
-
- @ExcelProperty(value = "场所名称")
- private String placeName;
-
- @ExcelProperty(value = "地址")
- private String addressName;
-
- @ExcelProperty( value = "场所类别")
- private String nineType;
-
- @ExcelProperty(value = "场所负责人")
- private String principal;
-
- @ExcelProperty(value = "身份证信息")
- private String principalIdCard;
-
- @ExcelProperty(value = "联系方式")
- private String principalPhone;
-
- @ExcelProperty(value = "辖区派出所")
- private String deptName;
-
-
- @ExcelProperty(value = "责任民警")
- private String policeName;
-
- @ExcelProperty(value = "责任民警联系方式")
- private String policePhone;
-
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/place/excel/PlaceAndRelExcel.java b/src/main/java/org/springblade/modules/place/excel/PlaceAndRelExcel.java
deleted file mode 100644
index a1f7c30..0000000
--- a/src/main/java/org/springblade/modules/place/excel/PlaceAndRelExcel.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.springblade.modules.place.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class PlaceAndRelExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 序号 */
- @ExcelProperty( "序号")
- private String idx;
-
- /** 街道名称 */
- @ExcelProperty( "街道名称")
- private String streetName;
-
- /** 社区名称 */
- @ExcelProperty( "社区名称")
- private String communityName;
-
- /** 所属网格 */
- @ExcelProperty( "网格名称")
- private String gridName;
-
- /** 写字楼名称 */
- @ExcelProperty( "写字楼名称")
- private String buildingName;
-
- /** 门牌号 */
- @ExcelProperty( "门牌号")
- private String doorplateNum;
-
- /** 楼层 */
- @ExcelProperty( "楼层")
- private String floor;
-
- /** 经营者 */
- @ColumnWidth(15)
- @ExcelProperty( "经营者")
- private String name;
-
- /** 联系电话 */
- @ColumnWidth(15)
- @ExcelProperty( "联系电话")
- private String phoneNumber;
-
- /** 企业(店铺)名称 */
- @ColumnWidth(25)
- @ExcelProperty( "企业(店铺)名称")
- private String placeName;
-
- /** 经营地址 */
- @ExcelProperty( "经营地址")
- private String address;
-
- /** 标签分类代码 */
- @ExcelProperty( "标签分类代码")
- private String labelCode;
-
- /** 备注 */
- @ExcelProperty( "备注")
- private String remark;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/place/excel/PlaceAndRelImporter.java b/src/main/java/org/springblade/modules/place/excel/PlaceAndRelImporter.java
deleted file mode 100644
index add5b38..0000000
--- a/src/main/java/org/springblade/modules/place/excel/PlaceAndRelImporter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.modules.place.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.place.service.IPlaceService;
-
-import java.util.List;
-
-/**
- * 场所(商超)导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class PlaceAndRelImporter implements ExcelImporter<PlaceAndRelExcel> {
-
- private final IPlaceService placeService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<PlaceAndRelExcel> data) {
- placeService.importAndRelPlace(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/excel/PlaceCheckExcel.java b/src/main/java/org/springblade/modules/place/excel/PlaceCheckExcel.java
deleted file mode 100644
index 3518683..0000000
--- a/src/main/java/org/springblade/modules/place/excel/PlaceCheckExcel.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.springblade.modules.place.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-
-import java.io.Serializable;
-
-/**
- * 场所检查
- *
- * @author zhongrj
- * @date 2024/02/19
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class PlaceCheckExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty( value = "场所名称")
- private String placeName;
-
- @ExcelProperty(value = "场所地址")
- private String location;
-
- @ExcelProperty( value = "场所类别")
- private String nineType;
-
- @ExcelProperty( "所属街道")
- private String streetName;
-
- @ExcelProperty(value = "所属社区")
- private String communityName;
-
- @ExcelProperty(value = "所属网格")
- private String gridName;
-
- @ExcelProperty( value = "场所隐患")
- private String remark;
-
- @ExcelProperty(value = "场所负责人")
- private String principal;
-
- @ExcelProperty(value = "场所负责人电话")
- private String principalPhone;
-
- @ExcelProperty(value = "创建时间")
- private String createTime;
-
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/place/excel/PlaceExcel.java b/src/main/java/org/springblade/modules/place/excel/PlaceExcel.java
deleted file mode 100644
index 0215ef1..0000000
--- a/src/main/java/org/springblade/modules/place/excel/PlaceExcel.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.springblade.modules.place.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItemLabel;
-
-import java.io.Serializable;
-
-/**
- * HouseExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class PlaceExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- /** 门牌地址编码 */
- @ExcelProperty( "门牌地址编码")
- private String houseCode;
-
- /** 街道名称 */
- @ExcelProperty( "街道名称")
- private String streetName;
-
- /** 社区名称 */
- @ExcelProperty( "社区名称")
- private String communityName;
-
- /** 网格名称 */
- @ExcelProperty( "网格名称")
- private String gridName;
-
- /** 经营者 */
- @ColumnWidth(15)
- @ExcelProperty( "经营者")
- private String name;
-
- /** 联系电话 */
- @ColumnWidth(15)
- @ExcelProperty( "联系电话")
- private String phoneNumber;
-
- /** 企业(店铺)名称 */
- @ColumnWidth(25)
- @ExcelProperty( "企业(店铺)名称")
- private String placeName;
-
- /** 九小场所类型 */
- @ExcelProperty( value = "九小场所类型",converter = ExcelDictConverter.class)
- @ExcelDictItemLabel(type = "nineType")
- private String nineType;
-
- /** 标签分类代码 */
- @ExcelProperty( "标签分类代码")
- private String labelCode;
-
- /** 备注 */
- @ExcelProperty( "备注")
- private String remark;
-
-}
-
diff --git a/src/main/java/org/springblade/modules/place/excel/PlaceImporter.java b/src/main/java/org/springblade/modules/place/excel/PlaceImporter.java
deleted file mode 100644
index a59cc2b..0000000
--- a/src/main/java/org/springblade/modules/place/excel/PlaceImporter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.modules.place.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.place.service.IPlaceService;
-
-import java.util.List;
-
-/**
- * 场所导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class PlaceImporter implements ExcelImporter<PlaceExcel> {
-
- private final IPlaceService placeService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<PlaceExcel> data) {
- placeService.importPlace(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java
deleted file mode 100644
index 41698a6..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.place.dto.PlaceCheckDTO;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import org.springblade.modules.place.excel.PlaceCheckExcel;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 场所检查表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-27
- */
-public interface PlaceCheckMapper extends BaseMapper<PlaceCheckEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeCheck
- * @return
- */
- List<PlaceCheckVO> selectPlaceCheckPage(IPage page,
- @Param("placeCheck") PlaceCheckVO placeCheck,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("nineTypeList") List<String> nineTypeList);
-
- /**
- * 查询场所检查表
- *
- * @param id 场所检查表ID
- * @return 场所检查表
- */
- public PlaceCheckVO selectPlaceCheckById(Long id);
-
- /**
- * 查询场所检查表列表
- *
- * @param placeCheckDTO 场所检查表
- * @return 场所检查表集合
- */
- public List<PlaceCheckDTO> selectPlaceCheckList(PlaceCheckDTO placeCheckDTO);
-
- /**
- * 查询列表数据导出
- *
- * @param placeCheck
- * @param isAdministrator
- * @param regionChildCodesList
- * @param gridCodeList
- * @return
- */
- List<PlaceCheckExcel> selectPlaceCheckListExcel(@Param("placeCheck") PlaceCheckVO placeCheck,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("nineTypeList") List<String> nineTypeList);
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml
deleted file mode 100644
index 8777b93..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml
+++ /dev/null
@@ -1,389 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlaceCheckMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="placeCheckResultMap" type="org.springblade.modules.place.vo.PlaceCheckVO">
- <result column="id" property="id"/>
- <result column="house_code" property="houseCode"/>
- <result column="remark" property="remark"/>
- <result column="signature_path" property="signaturePath"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="image_urls" property="imageUrls"/>
- <result column="place_name" property="placeName"/>
- <result column="location" property="location"/>
- <result column="grid_name" property="gridName"/>
- <result column="principal" property="principal"/>
- <result column="principal_phone" property="principalPhone"/>
- <result column="town_name" property="streetName"/>
- <result column="village_name" property="communityName"/>
- <result property="rectificationNoticeFlag" column="rectification_notice_flag" />
- <result property="punishFlag" column="punish_flag" />
- <result property="rectificationEndTime" column="rectification_end_time" />
- <result property="punishRemark" column="punish_remark" />
-
- <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List" select="selectPlacePoiLabelList"
- ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
- autoMapping="true">
- </collection>
-
- <collection property="patrolRecordVOList" column="id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.patrol.entity.PatrolRecord"
- autoMapping="true">
- </collection>
- </resultMap>
-
- <select id="selectPlacePoiLabelList" parameterType="Long"
- resultType="org.springblade.modules.place.vo.PlacePoiLabelVO">
- SELECT
- jppl.id,
- jppl.place_id,
- jppl.poi_code,
- jppl.type,
- jppl.color,
- jppl.remark,
- jc.category_name labelName
- FROM
- jczz_place_poi_label jppl
- LEFT JOIN jczz_category jc ON jppl.poi_code = jc.category_no
- WHERE
- jppl.type = '3'
- and place_id = #{jpid}
- </select>
-
-
- <select id="selectPatrolRecordList" parameterType="Long"
- resultType="org.springblade.modules.patrol.entity.PatrolRecord">
- select
- id,
- item_id,
- place_check_id,
- state,
- remark,
- image_urls,
- create_user,
- create_time,
- is_deleted,
- rectification_image_urls,
- rectification_remark,
- rectification_time
- from
- jczz_patrol_record where place_check_id = #{id}
- </select>
-
-
- <!--自定义分页查询-->
- <select id="selectPlaceCheckPage" resultMap="placeCheckResultMap">
- SELECT
- jpc.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type,
- jp.is_nine,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person
- FROM
- jczz_place_check jpc
- LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- where jpc.is_deleted = 0
- <if test="placeCheck.houseCode!=null and placeCheck.houseCode!=''">
- and jpc.house_code = #{placeCheck.houseCode}
- </if>
-
- <if test="placeCheck.streetName!=null and placeCheck.streetName!=''">
- and br.town_name like concat('%', #{placeCheck.streetName},'%')
- </if>
-
- <if test="placeCheck.communityName!=null and placeCheck.communityName!=''">
- and br.village_name like concat('%', #{placeCheck.communityName},'%')
- </if>
-
- <if test="placeCheck.gridName!=null and placeCheck.gridName!=''">
- and jg.grid_name like concat('%', #{placeCheck.gridName},'%')
- </if>
-
- <if test="placeCheck.placeName!=null and placeCheck.placeName!=''">
- and jp.place_name like concat('%', #{placeCheck.placeName},'%')
- </if>
-
- <if test="placeCheck.principal!=null and placeCheck.principal!=''">
- and jp.principal like concat('%', #{placeCheck.principal},'%')
- </if>
-
- <if test="placeCheck.principalPhone!=null and placeCheck.principalPhone!=''">
- and jp.principal_phone like concat('%', #{placeCheck.principalPhone},'%')
- </if>
-
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
-
- <if test="placeCheck.startTime!=null and placeCheck.startTime!=''">
- and date_format(jpc.create_time,'%Y-%m-%d') >= #{placeCheck.startTime}
- </if>
- <if test="placeCheck.endTime!=null and placeCheck.endTime!=''">
- and date_format(jpc.create_time,'%Y-%m-%d') <= #{placeCheck.endTime}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="placeCheck.roleName != null and placeCheck.roleName != ''">
- <if test="placeCheck.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="placeCheck.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jpc.create_time desc
- </select>
-
-
- <sql id="selectPlaceCheck">
- select
- id,
- house_code,
- remark,
- image_urls,
- signature_path,
- create_user,
- create_time,
- rectification_notice_flag,
- punish_flag,
- rectification_end_time,
- punish_remark,
- is_deleted
- from
- jczz_place_check
- </sql>
-
- <select id="selectPlaceCheckById" parameterType="long" resultMap="placeCheckResultMap">
- SELECT
- jpc.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person
- FROM
- jczz_place_check jpc
- LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jpc.create_user
- where
- jpc.is_deleted = 0
- and jpc.id = #{id}
- </select>
-
- <select id="selectPlaceCheckList" parameterType="org.springblade.modules.place.dto.PlaceCheckDTO"
- resultMap="placeCheckResultMap">
- <include refid="selectPlaceCheck"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="houseCode != null and houseCode != ''">and house_code = #{houseCode}</if>
- <if test="remark != null and remark != ''">and remark = #{remark}</if>
- <if test="signaturePath != null and signaturePath != ''">and signature_path = #{signaturePath}</if>
- <if test="createUser != null ">and create_user = #{createUser}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="isDeleted != null ">and is_deleted = #{isDeleted}</if>
- </where>
- </select>
-
- <!--查询列表数据导出-->
- <select id="selectPlaceCheckListExcel" resultType="org.springblade.modules.place.excel.PlaceCheckExcel">
- SELECT
- jpc.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type,
- jp.is_nine,
- br.town_name as streetName,
- br.village_name as communityName,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person
- FROM
- jczz_place_check jpc
- LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- where jpc.is_deleted = 0
- <if test="placeCheck.houseCode!=null and placeCheck.houseCode!=''">
- and jpc.house_code = #{placeCheck.houseCode}
- </if>
-
- <if test="placeCheck.streetName!=null and placeCheck.streetName!=''">
- and br.town_name like concat('%', #{placeCheck.streetName},'%')
- </if>
-
- <if test="placeCheck.communityName!=null and placeCheck.communityName!=''">
- and br.village_name like concat('%', #{placeCheck.communityName},'%')
- </if>
-
- <if test="placeCheck.gridName!=null and placeCheck.gridName!=''">
- and jg.grid_name like concat('%', #{placeCheck.gridName},'%')
- </if>
-
- <if test="placeCheck.placeName!=null and placeCheck.placeName!=''">
- and jp.place_name like concat('%', #{placeCheck.placeName},'%')
- </if>
-
- <if test="placeCheck.principal!=null and placeCheck.principal!=''">
- and jp.principal like concat('%', #{placeCheck.principal},'%')
- </if>
-
- <if test="placeCheck.principalPhone!=null and placeCheck.principalPhone!=''">
- and jp.principal_phone like concat('%', #{placeCheck.principalPhone},'%')
- </if>
-
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
-
- <if test="placeCheck.startTime!=null and placeCheck.startTime!=''">
- and date_format(jpc.create_time,'%Y-%m-%d') >= #{placeCheck.startTime}
- </if>
- <if test="placeCheck.endTime!=null and placeCheck.endTime!=''">
- and date_format(jpc.create_time,'%Y-%m-%d') <= #{placeCheck.endTime}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="placeCheck.roleName != null and placeCheck.roleName != ''">
- <if test="placeCheck.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="placeCheck.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jpc.create_time desc
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceDoorMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlaceDoorMapper.java
deleted file mode 100644
index c4da52a..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceDoorMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.mapper;
-
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import org.springblade.modules.place.vo.PlaceDoorVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 场所门牌关联表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public interface PlaceDoorMapper extends BaseMapper<PlaceDoorEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeDoor
- * @return
- */
- List<PlaceDoorVO> selectPlaceDoorPage(IPage page, PlaceDoorVO placeDoor);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceDoorMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceDoorMapper.xml
deleted file mode 100644
index c2b1822..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceDoorMapper.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlaceDoorMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="placeDoorResultMap" type="org.springblade.modules.place.entity.PlaceDoorEntity">
- <result column="id" property="id"/>
- <result column="place_id" property="placeId"/>
- <result column="house_code" property="houseCode"/>
- </resultMap>
-
-
- <select id="selectPlaceDoorPage" resultMap="placeDoorResultMap">
- select * from jczz_place_door where 1=1
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.java
deleted file mode 100644
index 04bef51..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.vo.PlaceExtVO;
-
-import java.util.List;
-
-/**
- * 场所详情表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface PlaceExtMapper extends BaseMapper<PlaceExtEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeExt
- * @return
- */
- List<PlaceExtVO> selectPlaceExtPage(IPage page,
- @Param("placeExt") PlaceExtVO placeExt,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
- /**
- * 场所详情表 自定义详情
- *
- * @param placeExt
- * @return
- */
- PlaceExtVO getDetail(@Param("placeExt") PlaceExtVO placeExt);
-
-
- Integer selectCount(@Param("placeExt") PlaceExtVO placeExt,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
deleted file mode 100644
index dda83fe..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
+++ /dev/null
@@ -1,238 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlaceExtMapper">
-
- <resultMap id="detailMap" type="org.springblade.modules.place.vo.PlaceExtVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="placePractitioner" javaType="java.util.List"
- ofType="org.springblade.modules.place.vo.PlacePractitionerVO" autoMapping="true">
- <id property="id" column="cid"/>
- </collection>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectPlaceExtPage" resultType="org.springblade.modules.place.vo.PlaceExtVO">
- SELECT
- jpe.*,
- jp.place_name AS placeName
- FROM
- jczz_place_ext jpe
- LEFT JOIN jczz_place jp ON jpe.place_id = jp.id AND jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jp.grid_code = jg.grid_code AND jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag ON jp.jw_grid_code = jpag.jw_grid_code AND jpag.is_deleted = 0
- WHERE jpe.is_deleted = 0
- and jp.place_name != ''
- <if test="isAdministrator==2">
- <choose>
- <when test="placeExt.roleName != null and placeExt.roleName != ''">
- <if test="placeExt.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="placeExt.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- <if test="placeExt.placeName != null and placeExt.placeName != ''">
- and jp.place_name like concat('%',#{placeExt.placeName},'%')
- </if>
- <if test="placeExt.communityCode != null and placeExt.communityCode != ''">
- and jpag.community_code like concat('%',#{placeExt.communityCode},'%')
- </if>
- <if test="placeExt.placeId != null">
- and jp.id = #{placeExt.placeId}
- </if>
- <if test="placeExt.isApp != null">
- and jpe.confirm_flag != 4
- </if>
- <if test="placeExt.houseCode != null and placeExt.houseCode != ''">
- and jp.house_code like concat('%',#{placeExt.houseCode},'%')
- </if>
- <if test="placeExt.confirmFlag != null">
- and jpe.confirm_flag = #{placeExt.confirmFlag}
- </if>
- <if test="placeExt.startTime != null and placeExt.startTime != '' and placeExt.endTime != null and placeExt.endTime != '' ">
- AND jpe.create_time BETWEEN #{placeExt.startTime} and #{placeExt.endTime}
- </if>
- order by jpe.create_time desc,jpe.id desc
- </select>
-
- <!--场所审核统计-->
- <select id="selectCount" resultType="java.lang.Integer">
- SELECT
- count( 1 )
- FROM
- jczz_place_ext jpe
- LEFT JOIN jczz_place jp ON jpe.place_id = jp.id AND jp.is_deleted = 0 and jp.place_name != ''
- LEFT JOIN jczz_grid jg ON jp.grid_code = jg.grid_code AND jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag ON jp.jw_grid_code = jpag.jw_grid_code AND jpag.is_deleted = 0
- LEFT JOIN jczz_doorplate_address jda ON jp.house_code = jda.address_code
- <where>
- <if test="placeExt.neiCode != null and placeExt.neiCode != ''">
- and jpag.community_code like concat('%',#{placeExt.neiCode},'%')
- </if>
-
- <if test="placeExt.confirmFlag != null">
- and jpe.confirm_flag = #{placeExt.confirmFlag}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="placeExt.roleName != null and placeExt.roleName != ''">
- <if test="placeExt.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="placeExt.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- and jpe.is_deleted = 0
- </where>
-
-
- </select>
-
- <select id="getDetail" resultType="org.springblade.modules.place.vo.PlaceExtVO">
- select jpe.*,
- jp.place_name as placeName,
- jp.lng,
- jp.lat,
- jp.location
- from jczz_place_ext jpe
- left join jczz_place jp on jpe.place_id = jp.id and jp.is_deleted = 0
- where jpe.is_deleted = 0
- and jpe.place_id = #{placeExt.placeId}
- </select>
-
- <resultMap type="org.springblade.modules.place.dto.PlaceExtDTO" id="JczzPlaceExtDTOResult">
- <result property="id" column="id" />
- <result property="placeId" column="place_id" />
- <result property="imageUrls" column="image_urls" />
- <result property="legalPerson" column="legal_person" />
- <result property="legalTel" column="legal_tel" />
- <result property="planImageUrls" column="plan_image_urls" />
- <result property="confirmUserId" column="confirm_user_id" />
- <result property="confirmFlag" column="confirm_flag" />
- <result property="confirmTime" column="confirm_time" />
- <result property="confirmNotion" column="confirm_notion" />
- <result property="createUser" column="create_user" />
- <result property="createTime" column="create_time" />
- <result property="updateUser" column="update_user" />
- <result property="updateTime" column="update_time" />
- <result property="isDeleted" column="is_deleted" />
- </resultMap>
-
- <sql id="selectJczzPlaceExt">
- select
- id,
- place_id,
- image_urls,
- legal_person,
- legal_tel,
- plan_image_urls,
- confirm_user_id,
- confirm_flag,
- confirm_time,
- confirm_notion,
- create_user,
- create_time,
- update_user,
- update_time,
- is_deleted
- from
- jczz_place_ext
- </sql>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.java
deleted file mode 100644
index 0a00735..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.excel.NinePlaceExcel;
-import org.springblade.modules.place.excel.PlaceAndRelExcel;
-import org.springblade.modules.place.vo.PlaceVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 场所表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface PlaceMapper extends BaseMapper<PlaceEntity> {
-
-
- /**
- * 自定义分页
- *
- * @param page
- * @param place
- * @param houseCodeList
- * @param regionChildCodesList
- * @param isAdministrator
- * @return
- */
- List<PlaceVO> selectPlacePage(IPage page,
- @Param("place") PlaceVO place,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 九小场所档案
- *
- * @param page
- * @param place
- * @param gridCodeList
- * @param regionChildCodesList
- * @param isAdministrator
- * @param isAdministrator
- * @return
- */
- List<PlaceVO> selectNinePlacePage(IPage page,
- @Param("place") PlaceVO place,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("nineTypeList") List<String> nineTypeList);
-
-
- /**
- * 查询场所集合信息
- *
- * @param userId
- * @return
- */
- List<TreeStringNode> selectPlaceNodeList(@Param("userId") String userId);
-
- /**
- * 插入用户标签
- *
- * @param userId
- * @param labelId
- */
- int saveUserLabel(@Param("userId") Long userId, @Param("labelId") int labelId);
-
- /**
- * 查询所有的场所(手机号不为空)
- *
- * @return
- */
- List<PlaceVO> getPlaceNotNullPhone();
-
- /**
- * 查询所有的场所
- *
- * @return
- */
- List<PlaceVO> getAllHistoryPlace();
-
- /**
- * 更新场所信息
- *
- * @param place
- */
- int updatePlaceEntity(@Param("place") PlaceVO place);
-
- /**
- * 查询场所详情数据
- *
- * @param place
- * @return
- */
- PlaceVO getDetail(@Param("place") PlaceEntity place);
-
- /**
- * 判断商超是否导入
- *
- * @param placeExcel
- * @return
- */
- PlaceEntity getPlaceAndRelInfo(@Param("place") PlaceAndRelExcel placeExcel);
-
- /**
- * 查询出有用户id 的场所
- *
- * @return
- */
- List<PlaceEntity> getHasUserIdPlaceList();
-
- /**
- * 查询所有的场所数据(除去详情表已有的)
- *
- * @return
- */
- List<PlaceEntity> getPlaceListByNoExt();
-
- /**
- * 商超数据处理
- *
- * @return
- */
- List<PlaceEntity> placeAndRelHandle();
-
- /**
- * 根据编号集合查询对应的场所(按颜色区分近多少天没有发过任务的场所)4部分数据(三种颜色对应的+从来没有发过的)
- *
- * @param stringList
- * @param tableName
- * @return
- */
- List<PlaceVO> getPlaceListByParam(@Param("list") List<String> stringList,
- @Param("tableName") String tableName);
-
- List<NinePlaceExcel> export(@Param("place") PlaceVO place,
- @Param("houseCodeList") List<String> houseCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("nineTypeList") List<String> nineTypeList);
-
- /**
- * 查询 警务网格为空的数据
- *
- * @return
- */
- List<PlaceEntity> getPlaceNotJwGridCode();
-
- /**
- * 比对两点间的距离是否在1km 范围内(和地址总表位置对比)
- *
- * @param placeVO
- * @return
- */
- Integer comparisonPosition(@Param("place") PlaceVO placeVO);
-
- /**
- * 比对两点间的距离是否在1km 范围内 (和采集的位置对比)
- *
- * @param placeVO
- * @return
- */
- Boolean comparisonPositionNotHouseCode(@Param("place") PlaceVO placeVO);
-
- /**
- * 查询 综治网格为空的数据
- *
- * @return
- */
- List<PlaceEntity> getPlaceNotGridCode();
-
- /**
- * 查询对应未的场所 house_code_binds 为空,source = 1 的
- *
- * @return
- */
- List<PlaceEntity> selectPlaceNotDoorBindList();
-
- /**
- * 查询绑定的房屋
- *
- * @param houseCodeBinds
- * @return
- */
- List<Map<String, Object>> getHouseBindMap(@Param("houseCodeBinds") String houseCodeBinds);
-
- /**
- * 企业商超列表查询
- */
- List<PlaceVO> selectMallPage(IPage page,
- @Param("place") PlaceVO place,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 查询所有场所数据
- * @return
- */
- List<PlaceVO> getAllList(@Param("i") int i,@Param("size") int size);
-
- /**
- * 查询所有场所数据总数
- * @return
- */
- int getAllListTotal();
-
- /**
- * 查询对应的社区编号
- * @param id
- * @return
- */
- String getCommunityCode(@Param("id") Long id);
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
deleted file mode 100644
index d09d944..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
+++ /dev/null
@@ -1,945 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlaceMapper">
-
- <!--详情map-->
- <resultMap id="detailMap" type="org.springblade.modules.place.vo.PlaceVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="placePoiLabelVOList" javaType="java.util.List" ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
- autoMapping="true">
- <id property="id" column="plid"/>
- <result property="remark" column="cremark"/>
- </collection>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectPlacePage" resultType="org.springblade.modules.place.vo.PlaceVO">
- select
- jp.*,
- jpe.id as placeExtId,
- bu.real_name as username,
- bu.phone as phone,
- br.town_name as townStreetName,
- br.name as neiName,
- jg.grid_name as gridName,
- bus.`name` AS policeName,
- bus.phone AS policePhone,
- jpe.confirm_flag confirmFlag
- from jczz_place jp
- left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
- left join jczz_place_ext jpe on jpe.place_id=jp.id and jpe.is_deleted = 0
- left join jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- left join blade_region br on br.code = jpag.community_code
- LEFT JOIN blade_user bus on bus.id = jpag.police_user_id
- left join (
- select a.* from jczz_place_poi_label a inner join
- (
- select place_id,max(id) as id from jczz_place_poi_label b group by place_id
- ) b on a.id = b.id
- ) jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jp.source!=3
- and jp.place_name != ''
- <if test="place.placeName!=null and place.placeName!=''">
- and jp.place_name like concat('%',#{place.placeName},'%')
- </if>
- <if test="place.principal!=null and place.principal!=''">
- and jp.principal like concat('%',#{place.principal},'%')
- </if>
- <if test="place.principalPhone!=null and place.principalPhone!=''">
- and jp.principal_phone like concat('%',#{place.principalPhone},'%')
- </if>
- <if test="place.houseCode!=null and place.houseCode!=''">
- and jp.house_code like concat('%',#{place.houseCode},'%')
- </if>
- <if test="place.townStreetName!=null and place.townStreetName!=''">
- and br.town_name like concat('%',#{place.townStreetName},'%')
- </if>
- <if test="place.neiName!=null and place.neiName!=''">
- and br.name like concat('%',#{place.neiName},'%')
- </if>
- <if test="place.id!=null">
- and jp.id = #{place.id}
- </if>
-
- <if test="place.isNine!=null">
- and jp.is_nine = #{place.isNine}
- </if>
-
- <if test="place.source!=null">
- and jp.source = #{place.source}
- </if>
- <if test="place.isPerfect==1">
- and jp.status = 1
- </if>
- <if test="place.isPerfect==2">
- and jp.status = 2
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jp.create_time desc,jp.id desc
- </select>
-
- <!--自定义分页查询-->
- <select id="selectNinePlacePage" resultType="org.springblade.modules.place.vo.PlaceVO">
- select
- jp.*,
- jpe.id as placeExtId,
- bu.real_name as username,bu.phone as phone,
- br.town_name as townStreetName,br.name as neiName,
- jpe.confirm_flag confirmFlag,
- bus.`name` AS policeName,
- bus.phone AS policePhone,
- jp.location as addressName,
- jpag.pcs_name deptName
- from jczz_place jp
- left join jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
- left join jczz_place_ext jpe on jpe.place_id=jp.id and jpe.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code
- left join blade_region br on br.code = jpag.community_code
- LEFT JOIN blade_user bus on bus.id = jpag.police_user_id
- left join (
- select a.* from jczz_place_poi_label a inner join
- (
- select place_id,max(id) as id from jczz_place_poi_label b group by place_id
- ) b on a.id = b.id
- ) jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jp.source!=3
- and jp.place_name != ''
- <if test="place.placeName!=null and place.placeName!=''">
- and jp.place_name like concat('%',#{place.placeName},'%')
- </if>
- <if test="place.principal!=null and place.principal!=''">
- and jp.principal like concat('%',#{place.principal},'%')
- </if>
- <if test="place.principalPhone!=null and place.principalPhone!=''">
- and jp.principal_phone like concat('%',#{place.principalPhone},'%')
- </if>
- <if test="place.houseCode!=null and place.houseCode!=''">
- and jp.house_code like concat('%',#{place.houseCode},'%')
- </if>
- <if test="place.townStreetName!=null and place.townStreetName!=''">
- and br.town_name like concat('%',#{place.townStreetName},'%')
- </if>
- <if test="place.deptName!=null and place.deptName!=''">
- and jpag.pcs_name like concat('%',#{place.deptName},'%')
- </if>
-
- <if test="place.policeName!=null and place.policeName!=''">
- and bus.name like concat('%',#{place.policeName},'%')
- </if>
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
- <if test="place.isFront!=null and place.isFront!=''">
- and jp.is_front = #{place.isFront}
- </if>
-
- <if test="place.frontType!=null and place.frontType!=''">
- and jp.front_type = #{place.frontType}
- </if>
-
- <if test="place.neiName!=null and place.neiName!=''">
- and br.name like concat('%',#{place.neiName},'%')
- </if>
- <if test="place.id!=null">
- and jp.id = #{place.id}
- </if>
-
- <if test="place.isNine!=null">
- and jp.is_nine = #{place.isNine}
- </if>
-
- <if test="place.source!=null">
- and jp.source = #{place.source}
- </if>
- <if test="place.isPerfect==1">
- and jp.status = 1
- </if>
- <if test="place.isPerfect==2">
- and jp.status = 2
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jp.create_time desc,jp.id desc
- </select>
-
- <!--查询场所集合信息-->
- <select id="selectPlaceNodeList" resultType="org.springblade.common.node.TreeStringNode" >
- SELECT jp.id,
- jp.house_code houseCode,
- jp.place_name AS NAME,
- jp.is_nine AS isNine,
- jp.is_front AS isFront,
- jp.no_explosion_category AS noExplosionCategory,
- br.name neiName,
- jg.community_code neiCode,
- FALSE AS hasChildren
- FROM jczz_place jp
- LEFT JOIN jczz_grid jg on jp.grid_code = jg.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jg.community_code
- where 1 = 1
- and jp.is_deleted = 0
- and jp.principal_user_id = #{userId}
- </select>
-
-
- <!--插入用户标签-->
- <insert id="saveUserLabel">
- insert into jczz_user_house_label(user_id,label_id,lable_type)
- values(#{userId},#{labelId},1)
- </insert>
-
- <!--查询所有的场所(手机号不为空)-->
- <select id="getPlaceNotNullPhone" resultType="org.springblade.modules.place.vo.PlaceVO">
- select link_person as username,link_tel as phone,std_id as houseCode from wgccp_place
- WHERE link_person !='' and link_tel!=''
- </select>
-
- <!--查询所有的场所-->
- <select id="getAllHistoryPlace" resultType="org.springblade.modules.place.vo.PlaceVO">
- select place_id as id,third_level_id as label,std_id as houseCode from wgccp_place
- </select>
-
- <!--更新场所信息-->
- <update id="updatePlaceEntity">
- update jczz_place set principal_user_id = #{place.principalUserId}
- WHERE house_code = #{place.houseCode}
- </update>
-
- <!--查询场所详情数据-->
- <!--查询场所详情数据-->
- <select id="getDetail" resultMap="detailMap">
- select
- jp.id,
- jp.house_code,
- jp.house_code_binds,
- jp.building_code,
- jp.principal_user_id,
- jp.principal,
- jp.principal_phone,
- jp.principal_id_card,
- jp.place_name,
- if(jp.source=1,jda.x,jp.lng) as lng,
- if(jp.source=1,jda.y,jp.lat) as lat,
- if(jp.source=1,jda.address_name,jp.location) as location,
- jp.image_urls,
- jp.grid_code,
- jp.jw_grid_code,
- jp.source,
- jp.status,
- jp.is_scene,
- jp.is_nine,
- jp.nine_type,
- jp.is_front,
- jp.front_type,
- jp.remark,
- jp.no_explosion_category,
- jp.three_fire_protection,
- bu.real_name as username,bu.phone as phone,
- jppl.id as plid,
- jppl.place_id,
- jppl.poi_code,
- jppl.type,
- jppl.color,
- jppl.remark as cremark,
- jc.category_name as labelName,
- br.code as neiCode
- from jczz_place jp
- left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
- left join jczz_place_poi_label jppl on jppl.place_id = jp.id
- left join jczz_category jc on jc.category_no = jppl.poi_code
- left join jczz_grid jg on jp.grid_code = jg.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- left join jczz_doorplate_address jda on jda.address_code = jp.house_code
- where jp.is_deleted = 0
- <if test="place.houseCode!=null and place.houseCode!=''">
- and
- (
- jp.house_code = #{place.houseCode}
- or
- jp.house_code_binds like concat('%',#{place.houseCode},'%')
- )
- </if>
- <if test="place.id!=null">
- and jp.id = #{place.id}
- </if>
- </select>
-
- <!--判断商超是否导入-->
- <select id="getPlaceAndRelInfo" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select
- jp.*
- from jczz_place jp
- left join jczz_place_rel jpr on jpr.place_id = jp.id and jpr.is_deleted = 0
- where jp.is_deleted = 0
- <if test="place.buildingName!=null and place.buildingName!=''">
- and jpr.building_name = #{place.buildingName}
- </if>
- <if test="place.doorplateNum!=null and place.doorplateNum!=''">
- and jpr.doorplate_num = #{place.doorplateNum}
- </if>
- limit 1
- </select>
-
- <!--查询出有用户id 的场所-->
- <select id="getHasUserIdPlaceList" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select
- jp.*
- from jczz_place jp
- left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
- where jp.is_deleted = 0 and jp.principal_user_id is not null
- </select>
-
- <!--查询所有的场所数据(除去详情表已有的)-->
- <select id="getPlaceListByNoExt" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select
- jp.*
- from jczz_place jp
- LEFT JOIN jczz_place_ext jpe on jpe.place_id=jp.id and jpe.is_deleted = 0
- where jp.is_deleted = 0 and jpe.id is null
- </select>
-
- <!--商超数据处理-->
- <select id="placeAndRelHandle" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select jp.* from jczz_place jp
- left join jczz_place_rel jpr on jp.id = jpr.place_id and jpr.is_deleted =0
- where jpr.id is not null
- and jp.is_deleted = 0
- and jp.source !=3
- </select>
-
- <!--根据标签编号集合查询对应的场所-->
- <select id="getPlaceListByParam" resultType="org.springblade.modules.place.vo.PlaceVO">
- select jp.*,jppl.poi_code as label from jczz_place jp
- left join jczz_place_poi_label jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jppl.type = 3
- and jppl.color = 'green'
- and jp.principal_user_id is not null
- and jp.house_code != ''
- and jp.id in (
- select place_id from ${tableName} where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(), create_time )=30
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and jppl.poi_code in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and jppl.poi_code in ('')
- </otherwise>
- </choose>
- union all
- (
- select jp.*,jppl.poi_code as label from jczz_place jp
- left join jczz_place_poi_label jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jppl.type = 3
- and jppl.color = 'yellow'
- and jp.principal_user_id is not null
- and jp.house_code != ''
- and jp.id in (
- select place_id from ${tableName} where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(), create_time )=14
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and jppl.poi_code in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and jppl.poi_code in ('')
- </otherwise>
- </choose>
- )
- union all
- (
- select jp.*,jppl.poi_code as label from jczz_place jp
- left join jczz_place_poi_label jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jppl.type = 3
- and jppl.color = 'red'
- and jp.principal_user_id is not null
- and jp.house_code != ''
- and jp.id in (
- select place_id from ${tableName} where is_deleted = 0 and source = 2 and TIMESTAMPDIFF( day, now(), create_time )=7
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and jppl.poi_code in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and jppl.poi_code in ('')
- </otherwise>
- </choose>
- )
- union all
- (
- select jp.*,jppl.poi_code as label from jczz_place jp
- left join jczz_place_poi_label jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jppl.type = 3
- and jp.principal_user_id is not null
- and jp.house_code != ''
- and (jppl.color = 'green' or jppl.color = 'yellow' or jppl.color = 'red')
- and jp.id not in (
- select place_id from ${tableName} where is_deleted = 0 and source = 2 and place_id is not null group by place_id
- )
- <choose>
- <when test="list!=null and list.size()>0">
- and jppl.poi_code in
- <foreach collection="list" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and jppl.poi_code in ('')
- </otherwise>
- </choose>
- )
- </select>
-
-
-
- <select id="export" resultType="org.springblade.modules.place.excel.NinePlaceExcel">
- select
- jp.*,
- jpe.id as placeExtId,
- bu.real_name as username,bu.phone as phone,
- br.town_name as townStreetName,br.name as neiName,
- jpe.confirm_flag confirmFlag,
- bus.`name` AS policeName,
- bus.phone AS policePhone,
- jp.location as addressName,
- jpag.pcs_name deptName
- from jczz_place jp
- left join jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
- left join jczz_place_ext jpe on jpe.place_id=jp.id and jpe.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code
- left join blade_region br on br.code = jpag.community_code
- LEFT JOIN blade_user bus on bus.id = jpag.police_user_id
- left join (
- select a.* from jczz_place_poi_label a inner join
- (
- select place_id,max(id) as id from jczz_place_poi_label b group by place_id
- ) b on a.id = b.id
- ) jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jp.source!=3
- and jp.place_name != ''
- <if test="place.placeName!=null and place.placeName!=''">
- and jp.place_name like concat('%',#{place.placeName},'%')
- </if>
- <if test="place.principal!=null and place.principal!=''">
- and jp.principal like concat('%',#{place.principal},'%')
- </if>
- <if test="place.principalPhone!=null and place.principalPhone!=''">
- and jp.principal_phone like concat('%',#{place.principalPhone},'%')
- </if>
- <if test="place.houseCode!=null and place.houseCode!=''">
- and jp.house_code like concat('%',#{place.houseCode},'%')
- </if>
- <if test="place.townStreetName!=null and place.townStreetName!=''">
- and br.town_name like concat('%',#{place.townStreetName},'%')
- </if>
- <if test="place.deptName!=null and place.deptName!=''">
- and jpag.pcs_name like concat('%',#{place.deptName},'%')
- </if>
-
- <if test="place.policeName!=null and place.policeName!=''">
- and bus.name like concat('%',#{place.policeName},'%')
- </if>
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
- <if test="place.isFront!=null and place.isFront!=''">
- and jp.is_front = #{place.isFront}
- </if>
-
- <if test="place.frontType!=null and place.frontType!=''">
- and jp.front_type = #{place.frontType}
- </if>
-
- <if test="place.neiName!=null and place.neiName!=''">
- and br.name like concat('%',#{place.neiName},'%')
- </if>
- <if test="place.id!=null">
- and jp.id = #{place.id}
- </if>
-
- <if test="place.isNine!=null">
- and jp.is_nine = #{place.isNine}
- </if>
-
- <if test="place.source!=null">
- and jp.source = #{place.source}
- </if>
- <if test="place.isPerfect==1">
- and jp.status = 1
- </if>
- <if test="place.isPerfect==2">
- and jp.status = 2
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jp.create_time desc,jp.id desc
-
- </select>
-
- <resultMap type="org.springblade.modules.place.dto.PlaceDTO" id="PlaceDTOResult">
- <result property="id" column="id" />
- <result property="houseCode" column="house_code" />
- <result property="houseCodeBinds" column="house_code_binds" />
- <result property="buildingCode" column="building_code" />
- <result property="principalUserId" column="principal_user_id" />
- <result property="principal" column="principal" />
- <result property="principalPhone" column="principal_phone" />
- <result property="principalIdCard" column="principal_id_card" />
- <result property="placeName" column="place_name" />
- <result property="lng" column="lng" />
- <result property="lat" column="lat" />
- <result property="location" column="location" />
- <result property="imageUrls" column="image_urls" />
- <result property="gridId" column="grid_id" />
- <result property="gridCode" column="grid_code" />
- <result property="jwGridCode" column="jw_grid_code" />
- <result property="source" column="source" />
- <result property="status" column="status" />
- <result property="isScene" column="is_scene" />
- <result property="isNine" column="is_nine" />
- <result property="nineType" column="nine_type" />
- <result property="isFront" column="is_front" />
- <result property="frontType" column="front_type" />
- <result property="createUser" column="create_user" />
- <result property="createTime" column="create_time" />
- <result property="updateUser" column="update_user" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- <result property="isDeleted" column="is_deleted" />
- <result property="aoiCode" column="aoi_code" />
- <result property="threeFireProtection" column="three_fire_protection" />
- </resultMap>
-
- <sql id="selectPlace">
- select
- id,
- house_code,
- house_code_binds,
- building_code,
- principal_user_id,
- principal,
- principal_phone,
- principal_id_card,
- place_name,
- lng,
- lat,
- location,
- image_urls,
- grid_id,
- grid_code,
- jw_grid_code,
- source,
- status,
- is_scene,
- is_nine,
- nine_type,
- is_front,
- front_type,
- create_user,
- create_time,
- update_user,
- update_time,
- remark,
- is_deleted,
- aoi_code,
- three_fire_protection
- from
- jczz_place
- </sql>
-
-
- <!--查询 警务网格为空的数据-->
- <select id="getPlaceNotJwGridCode" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select id,lng,lat from jczz_place where is_deleted = 0
- and source != 3
- and jw_grid_code is null
- and lng != ''
- </select>
-
- <!--比对两点间的距离是否在1km 范围内(和地址总表位置对比)-->
- <select id="comparisonPosition" resultType="java.lang.Integer">
- select count(1) from jczz_doorplate_address where 1=1
- and IFNULL((
- ACOS(
- SIN(
- ( #{place.y} * 3.1415 )/ 180 ) * SIN(( y * 3.1415 )/ 180 )
- + COS(( #{place.y} * 3.1415 )/ 180 ) * COS(( y * 3.1415 )/ 180 ) * COS(( #{place.x} * 3.1415 )/ 180
- - ( x * 3.1415 )/ 180 ))* 6370.996
- ),2) <= 1
- and address_code = #{place.houseCode}
- </select>
-
-
- <!--比对两点间的距离是否在1km 范围内 (和采集的位置对比)-->
- <select id="comparisonPositionNotHouseCode" resultType="java.lang.Boolean">
- select IFNULL((
- ACOS(
- SIN(
- ( #{place.y} * 3.1415 )/ 180 ) * SIN(( #{place.lat} * 3.1415 )/ 180 )
- + COS(( #{place.y} * 3.1415 )/ 180 ) * COS(( #{place.lat} * 3.1415 )/ 180 ) * COS(( #{place.x} * 3.1415 )/ 180
- - ( #{place.lng} * 3.1415 )/ 180 ))* 6370.996
- ),2) <= 1
- </select>
-
-
- <!--查询 综治网格为空的数据-->
- <select id="getPlaceNotGridCode" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select id,lng,lat from jczz_place where is_deleted = 0
- and source != 3
- and grid_code is null
- and lng != ''
- </select>
-
- <!--查询对应未的场所 house_code_binds 为空,source = 1 的-->
- <select id="selectPlaceNotDoorBindList" resultType="org.springblade.modules.place.entity.PlaceEntity">
- select * from jczz_place where is_deleted = 0
- and source = 1 and house_code_binds is null
- </select>
-
- <!--查询绑定的房屋-->
- <select id="getHouseBindMap" resultType="java.util.Map">
- select address_code as addressCode,address_name addressName from jczz_doorplate_address
- where
- <choose>
- <when test="houseCodeBinds!=null and houseCodeBinds!=''">
- address_code in
- <foreach collection="houseCodeBinds.split(',')" item="houseCode" separator="," open="(" close=")">
- #{houseCode}
- </foreach>
- </when>
- <otherwise>
- address_code in ('')
- </otherwise>
- </choose>
- </select>
-
- <!--企业商超列表分页查询-->
- <select id="selectMallPage" resultType="org.springblade.modules.place.vo.PlaceVO">
- select
- jp.*,
- jpe.id as placeExtId,
- br.town_name as townStreetName,
- br.name as neiName,
- jg.grid_name as gridName,
- jpe.confirm_flag confirmFlag
- from jczz_place jp
- left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
- left join jczz_place_ext jpe on jpe.place_id=jp.id and jpe.is_deleted = 0
- left join jczz_place_rel jpr on jpr.place_id=jp.id and jpe.is_deleted = 0
- left join jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jpr.community_code= jpag.jw_grid_code
- left join blade_region br on br.code = jpr.community_code
- left join (
- select a.* from jczz_place_poi_label a inner join
- (
- select place_id,max(id) as id from jczz_place_poi_label b group by place_id
- ) b on a.id = b.id
- ) jppl on jppl.place_id = jp.id
- where jp.is_deleted = 0 and jp.source=3
- and jp.place_name != ''
- <if test="place.placeName!=null and place.placeName!=''">
- and jp.place_name like concat('%',#{place.placeName},'%')
- </if>
- <if test="place.principal!=null and place.principal!=''">
- and jp.principal like concat('%',#{place.principal},'%')
- </if>
- <if test="place.principalPhone!=null and place.principalPhone!=''">
- and jp.principal_phone like concat('%',#{place.principalPhone},'%')
- </if>
- <if test="place.houseCode!=null and place.houseCode!=''">
- and jp.house_code like concat('%',#{place.houseCode},'%')
- </if>
- <if test="place.townStreetName!=null and place.townStreetName!=''">
- and br.town_name like concat('%',#{place.townStreetName},'%')
- </if>
- <if test="place.neiName!=null and place.neiName!=''">
- and br.name like concat('%',#{place.neiName},'%')
- </if>
- <if test="place.id!=null">
- and jp.id = #{place.id}
- </if>
-
- <if test="place.isNine!=null">
- and jp.is_nine = #{place.isNine}
- </if>
-
- <if test="place.source!=null">
- and jp.source = #{place.source}
- </if>
- <if test="place.isPerfect==1">
- and jp.status = 1
- </if>
- <if test="place.isPerfect==2">
- and jp.status = 2
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpr.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- order by jp.create_time desc,jp.id desc
- </select>
-
- <!--查询所有场所数据-->
- <select id="getAllList" resultType="org.springblade.modules.place.vo.PlaceVO">
- select
- jp.*,
- jpag.community_code
- from jczz_place jp
- left join jczz_police_affairs_grid jpag on jp.jw_grid_code = jpag.jw_grid_code and jpag.is_deleted =0
- where jp.is_deleted = 0
- limit #{i},#{size}
- </select>
-
- <!--查询所有场所数据-->
- <select id="getAllListTotal" resultType="java.lang.Integer">
- select
- count(*)
- from jczz_place jp
- where jp.is_deleted = 0
- </select>
-
- <!--查询对应的社区编号-->
- <select id="getCommunityCode" resultType="java.lang.String">
- select
- jpag.community_code
- from jczz_place jp
- left join jczz_police_affairs_grid jpag on jp.jw_grid_code = jpag.jw_grid_code and jpag.is_deleted =0
- where jp.is_deleted = 0
- and jp.id = #{id}
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlacePoiLabelMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlacePoiLabelMapper.java
deleted file mode 100644
index 95afc06..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlacePoiLabelMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.springblade.modules.place.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.place.entity.PlacePoiLabel;
-
-import java.util.List;
-
-public interface PlacePoiLabelMapper extends BaseMapper<PlacePoiLabel> {
-
- /**
- * 查询第三级数据
- * @return
- */
- List<PlacePoiLabel> getPlacePoiLabelList();
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlacePoiLabelMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlacePoiLabelMapper.xml
deleted file mode 100644
index 377241e..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlacePoiLabelMapper.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlacePoiLabelMapper">
-
- <!--查询第三级数据-->
- <select id="getPlacePoiLabelList" resultType="org.springblade.modules.place.entity.PlacePoiLabel">
- select * from jczz_place_poi_label where length(poi_code)=6
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.java
deleted file mode 100644
index b8a3505..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.mapper;
-
-import liquibase.pro.packaged.S;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.vo.PlacePractitionerVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 场所从业人员 Mapper 接口
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface PlacePractitionerMapper extends BaseMapper<PlacePractitionerEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placePractitioner
- * @return
- */
- List<PlacePractitionerVO> selectPlacePractitionerPage(IPage page,@Param("placePractitioner") PlacePractitionerVO placePractitioner);
-
- /**
- * 统计数据
- * @param placePractitioner
- * @return
- */
- Integer selectPlaceCountByType(@Param("placePractitioner") PlacePractitionerVO placePractitioner);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml
deleted file mode 100644
index db7a0ef..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlacePractitionerMapper">
-
- <!--自定义分页查询-->
- <select id="selectPlacePractitionerPage" resultType="org.springblade.modules.place.vo.PlacePractitionerVO">
- SELECT
- jpp.id,
- jpp.place_id,
- jpp.name,
- jpp.telephone,
- jpp.temp_address,
- TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) as age,
- jpp.gender,
- jpp.id_card,
- jp.place_name employer,
- jpp.employer_img,
- jpp.create_time,
- jpp.ethnicity,
- jpp.is_deleted,
- jpp.criminal_record_flag,
- jpp.fake_id_card,
- jpp.employment_time,
- jpp.resignation_time,
- jpp.resignation_flag,
- jpp.confirm_user_id,
- jpp.confirm_flag,
- jpp.confirm_time,
- jpp.confirm_notion,
- jc.category_name
- FROM
- jczz_place_practitioner jpp
- LEFT JOIN jczz_place jp ON jp.id = jpp.place_id
- LEFT JOIN jczz_place_poi_label jppl on jppl.place_id = jp.id and type = 3
- LEFT JOIN jczz_category jc on jc.category_no = jppl.poi_code
- <where>
- <if test="placePractitioner.id != null ">and jpp.id = #{placePractitioner.id}</if>
- <if test="placePractitioner.placeId != null ">and jpp.place_id = #{placePractitioner.placeId}</if>
- <if test="placePractitioner.name != null and placePractitioner.name != ''">and jpp.name like concat('%',
- #{placePractitioner.name},'%')
-
- </if>
- <if test="placePractitioner.telephone != null and placePractitioner.telephone != ''">and jpp.telephone like
- concat('%', #{placePractitioner.telephone},'%')
-
- </if>
- <if test="placePractitioner.tempAddress != null and placePractitioner.tempAddress != ''">and
- jpp.temp_address =
- #{placePractitioner.tempAddress}
- </if>
- <if test="placePractitioner.age != null ">and jpp.age = #{placePractitioner.age}</if>
- <if test="placePractitioner.gender != null ">and jpp.gender = #{placePractitioner.gender}</if>
- <if test="placePractitioner.idCard != null and placePractitioner.idCard != ''">and jpp.id_card =
- #{placePractitioner.idCard}
- </if>
- <if test="placePractitioner.resignationFlag != null and placePractitioner.resignationFlag !='' ">
- and jpp.resignation_flag = #{placePractitioner.resignationFlag}
- </if>
-
- <if test="placePractitioner.employerImg != null and placePractitioner.employerImg != ''">and
- jpp.employer_img =
- #{placePractitioner.employerImg}
- </if>
-
- <if test="placePractitioner.createTime != null ">and jpp.create_time = #{placePractitioner.createTime}</if>
- <if test="placePractitioner.ethnicity != null ">and jpp.ethnicity = #{placePractitioner.ethnicity}</if>
-
- <if test="placePractitioner.confirmUserId != null "> and confirm_user_id = #{placePractitioner.confirmUserId}</if>
- <if test="placePractitioner.confirmFlag != null "> and confirm_flag = #{placePractitioner.confirmFlag}</if>
- <if test="placePractitioner.confirmTime != null "> and confirm_time = #{placePractitioner.confirmTime}</if>
- <if test="placePractitioner.confirmNotion != null and placePractitioner.confirmNotion != ''"> and confirm_notion = #{placePractitioner.confirmNotion}</if>
-
- <if test="placePractitioner.type == 1">
- and TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) < 18
- and jc.category_no in (180202,180201,180200)
- </if>
- <if test="placePractitioner.type == 2">
- and jpp.ethnicity != 1
- and jc.category_no in (180202,180201,180200)
- </if>
- <if test="placePractitioner.type == 3">
- and (TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) < 18 or jpp.ethnicity != 1)
- and jc.category_no in (180202,180201,180200)
- </if>
- and jpp.is_deleted = 0
- order by jpp.id desc
- </where>
- </select>
-
-
- <resultMap type="org.springblade.modules.place.dto.PlacePractitionerDTO" id="JczzPlacePractitionerDTOResult">
- <result property="id" column="id"/>
- <result property="placeId" column="place_id"/>
- <result property="name" column="name"/>
- <result property="telephone" column="telephone"/>
- <result property="tempAddress" column="temp_address"/>
- <result property="age" column="age"/>
- <result property="gender" column="gender"/>
- <result property="idCard" column="id_card"/>
- <result property="jobNature" column="job_nature"/>
- <result property="employerImg" column="employer_img"/>
- <result property="createTime" column="create_time"/>
- <result property="ethnicity" column="ethnicity"/>
- <result property="isDeleted" column="is_deleted"/>
- <result property="criminalRecordFlag" column="criminal_record_flag"/>
- <result property="fakeIdCard" column="fake_id_card"/>
- <result property="anoTypeName" column="ano_type_name"/>
- <result property="employmentTime" column="employment_time"/>
- <result property="resignationTime" column="resignation_time"/>
- </resultMap>
-
- <sql id="selectJczzPlacePractitioner">
- select id,
- place_id,
- name,
- telephone,
- temp_address,
- age,
- gender,
- id_card,
- job_nature,
- employer_img,
- create_time,
- ethnicity,
- is_deleted,
- criminal_record_flag,
- fake_id_card,
- ano_type_name,
- employment_time,
- resignation_time
- from jczz_place_practitioner
- </sql>
-
- <select id="selectPlaceCountByType" parameterType="long" resultType="integer">
- select
- count(1)
- from
- jczz_place_practitioner jpp
- LEFT JOIN jczz_place jp ON jp.id = jpp.place_id
- LEFT JOIN jczz_place_poi_label jppl on jppl.place_id = jp.id and type = 3
- LEFT JOIN jczz_category jc on jc.category_no = jppl.poi_code
- <where>
- <if test="placePractitioner.type == 1">
- and TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) < 18
- and jc.category_no in (180202,180201,180200)
- </if>
- <if test="placePractitioner.type == 2">
- and jpp.ethnicity != 1
- and jc.category_no in (180202,180201,180200)
- </if>
- <if test="placePractitioner.id != null ">and jpp.id = #{placePractitioner.id}</if>
- <if test="placePractitioner.placeId != null ">and jpp.place_id = #{placePractitioner.placeId}</if>
- <if test="placePractitioner.name != null and placePractitioner.name != ''">and jpp.name like concat('%',
- #{placePractitioner.name},'%')
- </if>
- <if test="placePractitioner.telephone != null and placePractitioner.telephone != ''">and jpp.telephone like
- concat('%', #{placePractitioner.telephone},'%')
-
- </if>
- <if test="placePractitioner.tempAddress != null and placePractitioner.tempAddress != ''">and
- jpp.temp_address =
- #{placePractitioner.tempAddress}
- </if>
- <if test="placePractitioner.age != null ">and jpp.age = #{placePractitioner.age}</if>
- <if test="placePractitioner.gender != null ">and jpp.gender = #{placePractitioner.gender}</if>
- <if test="placePractitioner.idCard != null and placePractitioner.idCard != ''">and jpp.id_card =
- #{placePractitioner.idCard}
- </if>
- <if test="placePractitioner.resignationFlag != null and placePractitioner.resignationFlag !='' ">
- and jpp.resignation_flag = #{placePractitioner.resignationFlag}
- </if>
- and jpp.is_deleted = 0
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.java
deleted file mode 100644
index 1d6d93f..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import org.springblade.modules.place.vo.PlaceRelVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.vo.PlaceVO;
-
-import java.util.List;
-
-/**
- * 场所区域关联信息表(商超) Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-20
- */
-public interface PlaceRelMapper extends BaseMapper<PlaceRelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeRel
- * @return
- */
- List<PlaceRelVO> selectPlaceRelPage(IPage page, PlaceRelVO placeRel);
-
- /**
- * 查询地址编码信息(社区派出所相关信息)
- * @param place
- * @return
- */
- DoorplateAddressEntity getDoorplateAddressEntity(@Param("place") PlaceVO place);
-
- /**
- * 查询未处理的商超数据
- * @return
- */
- List<PlaceRelEntity> getMallList();
-}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.xml
deleted file mode 100644
index 0a62aa2..0000000
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.place.mapper.PlaceRelMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="placeRelResultMap" type="org.springblade.modules.place.entity.PlaceRelEntity">
- <result column="id" property="id"/>
- <result column="place_id" property="placeId"/>
- <result column="street_name" property="streetName"/>
- <result column="community_name" property="communityName"/>
- <result column="grid_name" property="gridName"/>
- <result column="building_name" property="buildingName"/>
- <result column="doorplate_num" property="doorplateNum"/>
- <result column="floor" property="floor"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
-
- <select id="selectPlaceRelPage" resultMap="placeRelResultMap">
- select * from jczz_place_rel where is_deleted = 0
- </select>
-
- <!--查询地址编码信息(社区派出所相关信息)-->
- <select id="getDoorplateAddressEntity" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select
- street_name as townStreetName,
- community_name as neiName,
- jda.branch_name,
- jda.local_police_station_name,
- jda.policeman,
- jda.policeman_phone
- from jczz_place_rel jpr
- left join jczz_doorplate_address jda on locate(jpr.community_name,jda.nei_name)>0
- where is_deleted = 0
- and place_id = #{place.id}
- limit 1
- </select>
-
- <!--查询未处理的商超数据-->
- <select id="getMallList" resultType="org.springblade.modules.place.entity.PlaceRelEntity">
- select
- jpr.*
- from jczz_place_rel jpr
- left join jczz_place jp on jp.id = jpr.place_id and jp.is_deleted = 0
- where jpr.is_deleted = 0 and jp.grid_code is null
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java b/src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java
deleted file mode 100644
index 10b4eef..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.place.dto.PlaceCheckDTO;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import org.springblade.modules.place.excel.NinePlaceExcel;
-import org.springblade.modules.place.excel.PlaceCheckExcel;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 场所检查表 服务类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-public interface IPlaceCheckService extends IService<PlaceCheckEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeCheck
- * @return
- */
- IPage<PlaceCheckVO> selectPlaceCheckPage(IPage<PlaceCheckVO> page, PlaceCheckVO placeCheck);
-
-
- Boolean savePlace(PlaceCheckVO placeCheck) throws Exception;
-
- /**
- * 查询场所检查表
- *
- * @param id 场所检查表ID
- * @return 场所检查表
- */
- PlaceCheckVO selectPlaceCheckById(Long id);
-
- /**
- * 查询场所检查表列表
- *
- * @param placeCheckDTO 场所检查表
- * @return 场所检查表集合
- */
- List<PlaceCheckDTO> selectPlaceCheckList(PlaceCheckDTO placeCheckDTO);
-
- /**
- * 导出场所检查信息
- * @param placeCheck
- */
- List<PlaceCheckExcel> exportPlaceCheck(PlaceCheckVO placeCheck);
-}
diff --git a/src/main/java/org/springblade/modules/place/service/IPlaceDoorService.java b/src/main/java/org/springblade/modules/place/service/IPlaceDoorService.java
deleted file mode 100644
index 2f17e62..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlaceDoorService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import org.springblade.modules.place.vo.PlaceDoorVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 场所门牌关联表 服务类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public interface IPlaceDoorService extends IService<PlaceDoorEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeDoor
- * @return
- */
- IPage<PlaceDoorVO> selectPlaceDoorPage(IPage<PlaceDoorVO> page, PlaceDoorVO placeDoor);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/service/IPlaceExtService.java b/src/main/java/org/springblade/modules/place/service/IPlaceExtService.java
deleted file mode 100644
index 9e3268f..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlaceExtService.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.vo.PlaceExtVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 场所详情表 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IPlaceExtService extends IService<PlaceExtEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeExt
- * @return
- */
- IPage<PlaceExtVO> selectPlaceExtPage(IPage<PlaceExtVO> page, PlaceExtVO placeExt);
-
- /**
- * 场所详情表 自定义更新
- * @param placeExt
- * @return
- */
- boolean updatePlaceExt(PlaceExtVO placeExt);
-
- /**
- * 场所详情表 审核
- * @param placeExt
- * @return
- */
- boolean checkPlaceExt(PlaceExtEntity placeExt);
-
- /**
- * 场所详情表 新增
- * @param placeExt
- * @return
- */
- boolean savePlaceExt(PlaceExtEntity placeExt);
-
- /**
- * 场所详情表 自定义详情
- * @param placeExt
- * @return
- */
- PlaceExtVO getDetail(PlaceExtVO placeExt);
-
- Integer selectCount(@Param("userId") Long userId, @Param("neiCode") String neiCode, @Param("confirmFlag") Integer confirmFlag);
-}
diff --git a/src/main/java/org/springblade/modules/place/service/IPlacePoiLabelService.java b/src/main/java/org/springblade/modules/place/service/IPlacePoiLabelService.java
deleted file mode 100644
index 3eb6cbf..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlacePoiLabelService.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.entity.PlacePoiLabel;
-
-import java.util.List;
-
-public interface IPlacePoiLabelService extends IService<PlacePoiLabel> {
- /**
- * 查询第三级数据
- * @return
- */
- List<PlacePoiLabel> getPlacePoiLabelList();
-}
diff --git a/src/main/java/org/springblade/modules/place/service/IPlacePractitionerService.java b/src/main/java/org/springblade/modules/place/service/IPlacePractitionerService.java
deleted file mode 100644
index 3944100..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlacePractitionerService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.vo.PlacePractitionerVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 场所从业人员 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IPlacePractitionerService extends IService<PlacePractitionerEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placePractitioner
- * @return
- */
- IPage<PlacePractitionerVO> selectPlacePractitionerPage(IPage<PlacePractitionerVO> page, PlacePractitionerVO placePractitioner);
-
-
- Object countByType(PlacePractitionerVO placePractitioner);
-
- /**
- * 审核
- * @param placePractitioner
- * @return
- */
- Boolean auditing(PlacePractitionerEntity placePractitioner);
-}
diff --git a/src/main/java/org/springblade/modules/place/service/IPlaceRelService.java b/src/main/java/org/springblade/modules/place/service/IPlaceRelService.java
deleted file mode 100644
index 4ee7677..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlaceRelService.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import org.springblade.modules.place.vo.PlaceRelVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.place.vo.PlaceVO;
-
-/**
- * 场所区域关联信息表(商超) 服务类
- *
- * @author BladeX
- * @since 2023-11-20
- */
-public interface IPlaceRelService extends IService<PlaceRelEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param placeRel
- * @return
- */
- IPage<PlaceRelVO> selectPlaceRelPage(IPage<PlaceRelVO> page, PlaceRelVO placeRel);
-
-
- /**
- * 查询地址编码信息(社区派出所相关信息)
- * @param place
- * @return
- */
- DoorplateAddressEntity getDoorplateAddressEntity(PlaceVO place);
-
- /**
- * 商超数据处理
- */
- boolean mallDataHandle();
-}
diff --git a/src/main/java/org/springblade/modules/place/service/IPlaceService.java b/src/main/java/org/springblade/modules/place/service/IPlaceService.java
deleted file mode 100644
index f603fff..0000000
--- a/src/main/java/org/springblade/modules/place/service/IPlaceService.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.excel.NinePlaceExcel;
-import org.springblade.modules.place.excel.PlaceAndRelExcel;
-import org.springblade.modules.place.excel.PlaceExcel;
-import org.springblade.modules.place.vo.PlaceVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 场所表 服务类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public interface IPlaceService extends IService<PlaceEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param place
- * @return
- */
- IPage<PlaceVO> selectPlacePage(IPage<PlaceVO> page, PlaceVO place);
-
- /**
- * 查询场所集合信息
- *
- * @param userId
- * @return
- */
- List<TreeStringNode> selectPlaceNodeList(Long userId);
-
- /**
- * 场所信息自定义新增/修改
- *
- * @param placeVO
- * @return
- */
- Boolean addOrUpdate(PlaceVO placeVO);
-
- /**
- * 历史场所挂接处理-临时
- *
- * @param place
- * @return
- */
- Object historyPlaceHandle(PlaceVO place);
-
- /**
- * 历史场所标签挂接处理-临时
- *
- * @param place
- * @return
- */
- Object historyPlaceLabelHandle(PlaceVO place);
-
- /**
- * 场所表 自定义详情查询
- *
- * @param place
- * @return
- */
- PlaceVO getDetail(PlaceVO place);
-
- /**
- * 场所数据到导入
- *
- * @param data
- * @param isCovered
- */
- void importPlace(List<PlaceExcel> data, Boolean isCovered);
-
- /**
- * 场所(商超)导入
- *
- * @param data
- * @param isCovered
- */
- void importAndRelPlace(List<PlaceAndRelExcel> data, Boolean isCovered);
-
- /**
- * 场所数据处理-用户信息(场所负责人信息写入到场所表)
- */
- Object placeUserHandle();
-
- /**
- * 自定义修改
- *
- * @param placeVO
- * @return
- */
- boolean updatePlace(PlaceVO placeVO);
-
- /**
- * 场所标签数据处理
- */
- Object placeLabelHandle();
-
- /**
- * 历史场所详情数据处理
- *
- * @param place
- * @return
- */
- Object historyPlaceExtHandle(PlaceVO place);
-
- /**
- * 商超数据处理
- *
- * @return
- */
- Object placeAndRelHandle();
-
- /**
- * 根据编号集合查询对应的场所(按颜色区分近多少天没有发过任务的场所)
- *
- * @param stringList
- * @param tableName
- * @return
- */
- List<PlaceVO> getPlaceListByParam(List<String> stringList, String tableName);
-
- /**
- * 删除
- *
- * @param longs
- * @return
- */
- boolean removePlace(List<Long> longs);
-
- /**
- * 九小场所档案
- * @param page
- * @param place
- * @return
- */
- IPage<PlaceVO> selectNinePlacePage(IPage<PlaceVO> page, PlaceVO place);
-
- List<NinePlaceExcel> export(PlaceVO place);
-
- /**
- * 场所警务网格处理
- */
- Object placeJwGridCodeHandle();
-
- /**
- * 场所综治网格处理
- */
- Object placeGridCodeHandle();
-
- /**
- * 场所二维码绑定处理
- */
- Object placeDoorBindHandle();
-
- /**
- * 企业商超列表查询
- */
- IPage<PlaceVO> selectMallPage(IPage<PlaceVO> page, PlaceVO place);
-
- /**
- * 位置绑定
- * @param place
- */
- void policePositionHandle(PlaceVO place);
-
- /**
- * 警格绑定
- * @param place
- */
- void jwGridCodeBind(PlaceVO place);
-
- /**
- * 查询所有场所数据
- * @return
- */
- List<PlaceVO> getAllList(int i,int size);
- /**
- * 查询所有场所数据总数
- * @return
- */
- int getAllListTotal();
-
- /**
- * 查询对应的社区编号
- * @param id
- * @return
- */
- String getCommunityCode(Long id);
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java
deleted file mode 100644
index b546be7..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.service.IPatrolRecordService;
-import org.springblade.modules.place.dto.PlaceCheckDTO;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import org.springblade.modules.place.excel.PlaceCheckExcel;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import org.springblade.modules.place.mapper.PlaceCheckMapper;
-import org.springblade.modules.place.service.IPlaceCheckService;
-import org.springblade.modules.system.entity.DictBiz;
-import org.springblade.modules.system.service.IDictBizService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import org.springblade.modules.task.service.ITaskPlaceRectificationService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.stream.Collectors;
-
-/**
- * 场所检查表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Service
-public class PlaceCheckServiceImpl extends ServiceImpl<PlaceCheckMapper, PlaceCheckEntity> implements IPlaceCheckService {
-
- private static Logger logger = LoggerFactory.getLogger(PlaceCheckServiceImpl.class);
-
- @Autowired
- private IDictBizService dictBizService;
-
- @Override
- public IPage<PlaceCheckVO> selectPlaceCheckPage(IPage<PlaceCheckVO> page, PlaceCheckVO placeCheck) {
- List<String> strings = new ArrayList<>();
- if (null!=placeCheck.getNineType()){
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).eq("dict_key",placeCheck.getNineType()).eq("code","nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size()==0){
- strings.add(placeCheck.getNineType().toString());
- }else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(PlaceCheckVO.class,placeCheck);
- List<PlaceCheckVO> placeCheckVOS = baseMapper.selectPlaceCheckPage(page,
- placeCheck,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList(),
- strings);
- List<DictBiz> nineType = dictBizService.list(Wrappers.<DictBiz>lambdaQuery().eq(DictBiz::getCode, "nineType").eq(DictBiz::getIsDeleted, 0));
- for (PlaceCheckVO placeCheckVO : placeCheckVOS) {
- int number = 0;
- for (PatrolRecord patrolRecord : placeCheckVO.getPatrolRecordVOList()) {
- if (patrolRecord.getState().equals(0)) {
- number++;
- }
- }
- placeCheckVO.setNumber(number);
- for (DictBiz dictBiz : nineType) {
- if (StringUtils.isNotBlank(placeCheckVO.getNineType()) && placeCheckVO.getNineType().equals(dictBiz.getDictKey())) {
- if (placeCheckVO.getNineType().contains("10,11,12")) {
- placeCheckVO.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue());
- } else if (placeCheckVO.getNineType().contains("13,14,15")) {
- placeCheckVO.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue());
- } else {
- placeCheckVO.setNineType(dictBiz.getDictValue());
- }
- }
- }
- }
- return page.setRecords(placeCheckVOS);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean savePlace(PlaceCheckVO placeCheck) throws Exception {
- placeCheck.setCreateUser(AuthUtil.getUserId());
- List<PatrolRecord> patrolRecordVOList = placeCheck.getPatrolRecordVOList();
- AtomicReference<Integer> number = new AtomicReference<>(0);
- patrolRecordVOList.stream().forEach(item -> {
- if (item.getState().equals(0)) {
- number.getAndSet(number.get() + 1);
- }
- });
- placeCheck.setHiddenDangerNumber(number.get());
- boolean save = save(placeCheck);
- if (save) {
- IPatrolRecordService bean = SpringUtil.getBean(IPatrolRecordService.class);
- patrolRecordVOList.stream().forEach(item -> {
- item.setPlaceCheckId(placeCheck.getId());
- item.setCreateUser(AuthUtil.getUserId());
- });
- // List<PatrolRecord> collect = patrolRecordVOList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList());
- if (patrolRecordVOList != null && patrolRecordVOList.size() > 0) {
- boolean b = bean.saveBatch(patrolRecordVOList);
- if (b) {
- // 隐患问题大于0 则创建任务
- try {
- Integer integer = number.get();
- if (integer > 0) {
- // 保存任务表
- ITaskService bean2 = SpringUtils.getBean(ITaskService.class);
- Long aLong = bean2.saveTask(CommonConstant.NUMBER_FOUR, DictConstant.FIRE_RECTIFICATION_NOTICE, 1,
- "", AuthUtil.getUserId(), placeCheck.getHouseCode(), CommonConstant.NUMBER_EIGHT, 4);
- if (aLong > 0) {
- // 保存任务详情表
- ITaskPlaceRectificationService bean1 = SpringUtil.getBean(ITaskPlaceRectificationService.class);
- TaskPlaceRectificationEntity copy = BeanUtil.copy(placeCheck, TaskPlaceRectificationEntity.class);
- copy.setTaskId(aLong);
- copy.setPlaceCheckId(placeCheck.getId());
- copy.setId(null);
- copy.setStatus(4);
- bean1.save(copy);
- }
- }
- } catch (Exception e) {
- logger.error("任务保存失败!", e);
- }
- return b;
- }
- }
- return save;
- }
- return false;
- }
-
- /**
- * 查询场所检查表
- *
- * @param id 场所检查表ID
- * @return 场所检查表
- */
- @Override
- public PlaceCheckVO selectPlaceCheckById(Long id) {
- return this.baseMapper.selectPlaceCheckById(id);
- }
-
- /**
- * 查询场所检查表列表
- *
- * @param placeCheckDTO 场所检查表
- * @return 场所检查表集合
- */
- @Override
- public List<PlaceCheckDTO> selectPlaceCheckList(PlaceCheckDTO placeCheckDTO) {
- return this.baseMapper.selectPlaceCheckList(placeCheckDTO);
- }
-
- /**
- * 导出场所检查信息
- * @param placeCheck
- */
- @Override
- public List<PlaceCheckExcel> exportPlaceCheck(PlaceCheckVO placeCheck) {
- List<String> strings = new ArrayList<>();
- if (null!=placeCheck.getNineType()){
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).eq("dict_key",placeCheck.getNineType()).eq("code","nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size()==0){
- strings.add(placeCheck.getNineType());
- }else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(PlaceCheckVO.class,placeCheck);
- List<PlaceCheckExcel> placeCheckVOS = baseMapper.selectPlaceCheckListExcel(placeCheck,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList(),
- strings);
- List<DictBiz> nineType = dictBizService.list(Wrappers.<DictBiz>lambdaQuery().eq(DictBiz::getCode, "nineType").eq(DictBiz::getIsDeleted, 0));
- for (PlaceCheckExcel placeCheckVO : placeCheckVOS) {
- for (DictBiz dictBiz : nineType) {
- if (StringUtils.isNotBlank(placeCheckVO.getNineType()) && placeCheckVO.getNineType().equals(dictBiz.getDictKey())) {
- if (placeCheckVO.getNineType().contains("10,11,12")) {
- placeCheckVO.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue());
- } else if (placeCheckVO.getNineType().contains("13,14,15")) {
- placeCheckVO.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue());
- } else {
- placeCheckVO.setNineType(dictBiz.getDictValue());
- }
- }
- }
- }
- // 返回
- return placeCheckVOS;
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlaceDoorServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlaceDoorServiceImpl.java
deleted file mode 100644
index c935639..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlaceDoorServiceImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import org.springblade.modules.place.vo.PlaceDoorVO;
-import org.springblade.modules.place.mapper.PlaceDoorMapper;
-import org.springblade.modules.place.service.IPlaceDoorService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 场所门牌关联表 服务实现类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Service
-public class PlaceDoorServiceImpl extends ServiceImpl<PlaceDoorMapper, PlaceDoorEntity> implements IPlaceDoorService {
-
- @Override
- public IPage<PlaceDoorVO> selectPlaceDoorPage(IPage<PlaceDoorVO> page, PlaceDoorVO placeDoor) {
- return page.setRecords(baseMapper.selectPlaceDoorPage(page, placeDoor));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlaceExtServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlaceExtServiceImpl.java
deleted file mode 100644
index ffdeb5b..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlaceExtServiceImpl.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.mapper.PlaceExtMapper;
-import org.springblade.modules.place.service.IPlaceExtService;
-import org.springblade.modules.place.service.IPlacePractitionerService;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.place.vo.PlaceExtVO;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.system.service.IDeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 场所详情表 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class PlaceExtServiceImpl extends ServiceImpl<PlaceExtMapper, PlaceExtEntity> implements IPlaceExtService {
-
- @Autowired
- private IPlaceService placeService;
-
- @Autowired
- private IPlacePractitionerService placePractitionerService;
-
-// @Autowired
-// private IGridService gridService;
-//
-// @Autowired
-// private IDeptService deptService;
-
- /**
- * 自定义查询
- *
- * @param page
- * @param placeExt
- * @return
- */
- @Override
- public IPage<PlaceExtVO> selectPlaceExtPage(IPage<PlaceExtVO> page, PlaceExtVO placeExt) {
-// List<String> list = new ArrayList<>();
-// String roleName = SpringUtils.getRequestParam("roleName");
-// String communityCode = SpringUtils.getRequestParam("communityCode");
-// if (!Strings.isBlank(communityCode)){
-// // 校验社区编号是否合规
-// if(null!=SpringUtils.getBean(IRegionService.class).getById(communityCode)) {
-// placeExt.setCommunityCode(communityCode);
-// }
-// }
-// List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
-// Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2;
-// // 网格编号集合
-// List<String> gridCodeList = new ArrayList<>();
-// // 民警角色
-// if (!Strings.isBlank(roleName)){
-// placeExt.setRoleName(roleName);
-// if(roleName.equals("mj")) {
-// regionChildCodesList = SpringUtil.getBean(IPoliceAffairsGridService.class).getCommunityCodeListByUserId(AuthUtil.getUserId());
-// }
-// if (roleName.equals("wgy")) {
-// gridCodeList = SpringUtil.getBean(IGridService.class).getGridListByUserId(AuthUtil.getUserId());
-// }
-// }
-// if (AuthUtil.getUserAccount().equals("18879306957")) {
-// placeExt.setCommunityCode("361102003027");
-// placeExt.setCreateUser(null);
-// }
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(PlaceExtVO.class, placeExt);
-
-
- return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList()));
- }
-
- /**
- * 场所详情表 自定义更新
- *
- * @param placeExt
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean updatePlaceExt(PlaceExtVO placeExt) {
- // 设置参数
- placeExt.setUpdateTime(new Date());
- placeExt.setUpdateUser(AuthUtil.getUserId());
- // 更新从业人员信息
- boolean addFlag = true;
- boolean updateFlag = true;
- boolean removeFlag = true;
- //更新自身
- boolean update = updateById(placeExt);
- // 更新场所place 表信息
- updatePlaceInfo(placeExt);
- // 查询对应已存在的从业人员
- QueryWrapper<PlacePractitionerEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", placeExt.getPlaceId()).eq("is_deleted", 0);
- List<PlacePractitionerEntity> oldList = placePractitionerService.list(wrapper);
- List<PlacePractitionerEntity> list = placeExt.getPlacePractitioner();
- // 申明新增,修改,删除集合
- List<PlacePractitionerEntity> newList = new ArrayList<>();
- List<PlacePractitionerEntity> addList = new ArrayList<>();
- List<PlacePractitionerEntity> updateList = new ArrayList<>();
- List<PlacePractitionerEntity> removeList = new ArrayList<>();
- // 找出需要新增的,否则组成新集合进行比对
- for (PlacePractitionerEntity practitionerEntity : list) {
- if (practitionerEntity.getResignationTime() != null) {
- practitionerEntity.setResignationFlag(2);
- }
- practitionerEntity.setPlaceId(placeExt.getPlaceId());
- if (null == practitionerEntity.getId()) {
- // 新增
- practitionerEntity.setPlaceId(placeExt.getPlaceId());
- addList.add(practitionerEntity);
- } else {
- newList.add(practitionerEntity);
- }
- }
- // 遍历去差集,判断是新增还是删除还是更新
- // 取旧数据和新提交数据差集--删除
- removeList = oldList.stream().filter(vo -> !newList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
- // 取旧数据和新提交数据交集--更新
- updateList = newList.stream().filter(vo -> oldList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
-
- // 批量新增
- if (addList.size() > 0) {
- addFlag = placePractitionerService.saveBatch(addList);
- }
- // 批量修改
- if (updateList.size() > 0) {
- updateFlag = placePractitionerService.updateBatchById(updateList);
- }
- // 批量删除
- if (removeList.size() > 0) {
- removeFlag = placePractitionerService.removeBatchByIds(removeList);
- }
- // 返回
- return update && addFlag && updateFlag && removeFlag;
- }
-
- /**
- * 更新场所表信息
- *
- * @param placeExt
- */
- public void updatePlaceInfo(PlaceExtVO placeExt) {
- PlaceEntity placeEntity = new PlaceEntity();
- placeEntity.setId(placeExt.getPlaceId());
- placeEntity.setPlaceName(placeExt.getPlaceName());
- if (!Strings.isBlank(placeExt.getLng())) {
- placeEntity.setLng(placeExt.getLng());
- }
- if (!Strings.isBlank(placeExt.getLat())) {
- placeEntity.setLat(placeExt.getLat());
- }
- if (!Strings.isBlank(placeExt.getLocation())) {
- placeEntity.setLocation(placeExt.getLocation());
- }
- // 更新
- placeService.updateById(placeEntity);
- // 警格网格绑定修改
- if (!Strings.isBlank(placeEntity.getHouseCode()) && !Strings.isBlank(placeEntity.getLng())) {
- PlaceVO placeVO = new PlaceVO();
- placeVO.setHouseCode(placeEntity.getHouseCode());
- placeVO.setLng(placeEntity.getLng());
- placeVO.setLat(placeEntity.getLat());
- // 网格绑定
- placeService.policePositionHandle(placeVO);
- // 警务网格绑定
- placeService.jwGridCodeBind(placeVO);
- }
- }
-
- /**
- * 场所详情表 审核
- *
- * @param placeExt
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean checkPlaceExt(PlaceExtEntity placeExt) {
- boolean flag = false;
- // 设置更新时间
- placeExt.setConfirmTime(new Date());
- placeExt.setConfirmUserId(AuthUtil.getUserId());
- // 更新数据
- flag = updateById(placeExt);
-// if (b) {
-// PlaceExtEntity entity = getById(placeExt.getId());
-// // 更新任务表状态
-// TaskEntity taskEntity = new TaskEntity();
-// taskEntity.setId(entity.getTaskId());
-// taskEntity.setStatus(placeExt.getConfirmFlag());
-// flag = taskService.updateById(taskEntity);
-// }
- // 返回
- return flag;
- }
-
- /**
- * 场所详情表 新增
- *
- * @param placeExt
- * @return
- */
- @Override
- public boolean savePlaceExt(PlaceExtEntity placeExt) {
-// PlaceEntity placeEntity = placeService.getById(placeExt.getPlaceId());
-// TaskEntity taskEntity = new TaskEntity();
-// taskEntity.setId(placeExt.getTaskId());
-// taskEntity.setStatus(placeExt.getConfirmFlag());
-// taskEntity.setType(1);
-// taskEntity.setFrequency(1);
-// taskEntity.setName(placeEntity.getPlaceName() + "信息完善");
-// // 新增任务
-// boolean save = taskService.save(taskEntity);
-// if (save){
-// placeExt.setTaskId(taskEntity.getId());
- placeExt.setConfirmFlag(1);
- placeExt.setCreateTime(new Date());
- placeExt.setUpdateTime(new Date());
- placeExt.setCreateUser(AuthUtil.getUserId());
- placeExt.setUpdateUser(AuthUtil.getUserId());
- // 新增场所详情
- boolean save = save(placeExt);
-// }
- return save;
- }
-
- /**
- * 场所详情表 自定义详情
- *
- * @param placeExt
- * @return
- */
- @Override
- public PlaceExtVO getDetail(PlaceExtVO placeExt) {
- PlaceExtVO detail = baseMapper.getDetail(placeExt);
- if (null != detail) {
- // 查询从业人员信息
- QueryWrapper<PlacePractitionerEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("place_id", placeExt.getPlaceId());
- queryWrapper.eq("resignation_flag",1);
- detail.setPlacePractitioner(placePractitionerService.list(queryWrapper));
- }
- // 返回
- return detail;
- }
-
- @Override
- public Integer selectCount(Long userId, String neiCode, Integer confirmFlag) {
- PlaceExtVO placeExt = new PlaceExtVO();
- placeExt.setConfirmFlag(confirmFlag);
- placeExt.setNeiCode(neiCode);
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(PlaceExtVO.class, placeExt);
- return baseMapper.selectCount(placeExt, commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlacePoiLabelServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlacePoiLabelServiceImpl.java
deleted file mode 100644
index 61febad..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlacePoiLabelServiceImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.place.entity.PlacePoiLabel;
-import org.springblade.modules.place.mapper.PlacePoiLabelMapper;
-import org.springblade.modules.place.service.IPlacePoiLabelService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class PlacePoiLabelServiceImpl extends ServiceImpl<PlacePoiLabelMapper, PlacePoiLabel> implements IPlacePoiLabelService {
-
- /**
- * 查询第三级数据
- * @return
- */
- @Override
- public List<PlacePoiLabel> getPlacePoiLabelList() {
- return baseMapper.getPlacePoiLabelList();
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlacePractitionerServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlacePractitionerServiceImpl.java
deleted file mode 100644
index 520d013..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlacePractitionerServiceImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.vo.PlacePractitionerVO;
-import org.springblade.modules.place.mapper.PlacePractitionerMapper;
-import org.springblade.modules.place.service.IPlacePractitionerService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 场所从业人员 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class PlacePractitionerServiceImpl extends ServiceImpl<PlacePractitionerMapper, PlacePractitionerEntity> implements IPlacePractitionerService {
-
- @Override
- public IPage<PlacePractitionerVO> selectPlacePractitionerPage(IPage<PlacePractitionerVO> page, PlacePractitionerVO placePractitioner) {
- return page.setRecords(baseMapper.selectPlacePractitionerPage(page, placePractitioner));
- }
-
-
- /**
- * 统计少数民族和未成年数量
- *
- * @return
- */
- @Override
- public Object countByType(PlacePractitionerVO placePractitioner) {
- // 未成年数量
- placePractitioner.setType(CommonConstant.NUMBER_ONE);
- Integer minors = baseMapper.selectPlaceCountByType(placePractitioner);
- // 少数民族
- placePractitioner.setType(CommonConstant.NUMBER_TWO);
- Integer nationalMinority = baseMapper.selectPlaceCountByType(placePractitioner);
- Map<String, Integer> resultMap = new HashMap<>();
- resultMap.put("minors", minors);
- resultMap.put("nationalMinority", nationalMinority);
- return resultMap;
- }
-
- @Override
- public Boolean auditing(PlacePractitionerEntity placePractitioner) {
- placePractitioner.setConfirmUserId(AuthUtil.getUserId());
- placePractitioner.setConfirmTime(new Date());
- boolean update = update(Wrappers.<PlacePractitionerEntity>lambdaUpdate()
- .set(PlacePractitionerEntity::getConfirmFlag, placePractitioner.getConfirmFlag())
- .set(PlacePractitionerEntity::getConfirmNotion, placePractitioner.getConfirmNotion())
- .set(PlacePractitionerEntity::getConfirmUserId, placePractitioner.getConfirmUserId())
- .eq(PlacePractitionerEntity::getPlaceId, placePractitioner.getPlaceId())
- .eq(PlacePractitionerEntity::getResignationFlag, 1)
- .eq(PlacePractitionerEntity::getIsDeleted,0));
- return update;
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlaceRelServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlaceRelServiceImpl.java
deleted file mode 100644
index 7afba39..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlaceRelServiceImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.place.vo.PlaceRelVO;
-import org.springblade.modules.place.mapper.PlaceRelMapper;
-import org.springblade.modules.place.service.IPlaceRelService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 场所区域关联信息表(商超) 服务实现类
- *
- * @author BladeX
- * @since 2023-11-20
- */
-@Service
-public class PlaceRelServiceImpl extends ServiceImpl<PlaceRelMapper, PlaceRelEntity> implements IPlaceRelService {
-
- @Override
- public IPage<PlaceRelVO> selectPlaceRelPage(IPage<PlaceRelVO> page, PlaceRelVO placeRel) {
- return page.setRecords(baseMapper.selectPlaceRelPage(page, placeRel));
- }
-
- /**
- * 查询地址编码信息(社区派出所相关信息)
- * @param place
- * @return
- */
- @Override
- public DoorplateAddressEntity getDoorplateAddressEntity(PlaceVO place) {
- return baseMapper.getDoorplateAddressEntity(place);
- }
-
- /**
- * 商超数据处理
- */
- @Override
- public boolean mallDataHandle() {
- // 查询未处理的商超数据,将网格数据插入导入场所表
- List<PlaceRelEntity> list = baseMapper.getMallList();
- // 遍历
- for (PlaceRelEntity placeRelEntity : list) {
- // 查询对应的网格编号
- QueryWrapper<GridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("community_code",placeRelEntity.getCommunityCode())
- .eq("grid_name",placeRelEntity.getGridName())
- .eq("is_deleted",0);
- GridEntity gridEntity = SpringUtils.getBean(IGridService.class).getOne(queryWrapper);
- if (null!=gridEntity){
- PlaceEntity placeEntity = new PlaceEntity();
- placeEntity.setId(placeRelEntity.getPlaceId());
- placeEntity.setGridCode(gridEntity.getGridCode());
- placeEntity.setGridId(gridEntity.getId());
- // 更新
- SpringUtils.getBean(IPlaceService.class).updateById(placeEntity);
- }
- }
- return true;
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
deleted file mode 100644
index d1cb6cf..0000000
--- a/src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
+++ /dev/null
@@ -1,1745 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.pro.packaged.P;
-import liquibase.pro.packaged.W;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.node.TreeStringNode;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.IdUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.service.ICategoryService;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridRangeEntity;
-import org.springblade.modules.grid.mapper.GridMapper;
-import org.springblade.modules.grid.service.IGridRangeService;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.service.IGridmanService;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.entity.UserHouseLabelEntity;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.label.entity.LabelEntity;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-import org.springblade.modules.place.entity.*;
-import org.springblade.modules.place.excel.NinePlaceExcel;
-import org.springblade.modules.place.excel.PlaceAndRelExcel;
-import org.springblade.modules.place.excel.PlaceExcel;
-import org.springblade.modules.place.service.*;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import org.springblade.modules.place.vo.PlacePoiLabelVO;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.place.mapper.PlaceMapper;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.entity.DictBiz;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IDeptService;
-import org.springblade.modules.system.service.IDictBizService;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.system.service.IUserService;
-import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 场所表 服务实现类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Service
-public class PlaceServiceImpl extends ServiceImpl<PlaceMapper, PlaceEntity> implements IPlaceService {
- @Autowired
- private IUserService userService;
-
- @Autowired
- private IPlacePoiLabelService placePoiLabelService;
-
- @Autowired
- private IPlaceExtService placeExtService;
-
- @Autowired
- private IPlaceRelService placeRelService;
-
- @Autowired
- private IPlaceDoorService placeDoorService;
-
- @Autowired
- private IDoorplateAddressService doorplateAddressService;
-
- @Autowired
- private IGridService gridService;
-
- @Autowired
- private IGridRangeService gridRangeService;
-
- @Autowired
- private GridMapper gridMapper;
-
- @Autowired
- private IHouseholdService householdService;
-
- @Autowired
- private IDictBizService dictBizService;
-
- /**
- * 自定义列表查询
- *
- * @param page
- * @param place
- * @return
- */
- @Override
- public IPage<PlaceVO> selectPlacePage(IPage<PlaceVO> page, PlaceVO place) {
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(PlaceVO.class, place);
- List<PlaceVO> placeVOS = baseMapper.selectPlacePage(page,
- place,
- commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator());
- // 返回
- return page.setRecords(placeVOS);
- }
-
- /**
- * 查询场所集合信息
- *
- * @param userId
- * @return
- */
- @Override
- public List<TreeStringNode> selectPlaceNodeList(Long userId) {
- return baseMapper.selectPlaceNodeList(userId.toString());
- }
-
- /**
- * 场所信息自定义新增/修改
- *
- * @param placeVO
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean addOrUpdate(PlaceVO placeVO) {
- boolean flag = false;
- placeVO.setUpdateUser(AuthUtil.getUserId());
- placeVO.setUpdateTime(new Date());
- // 查看是否包含houseCode,如果有,则更新
- if (!Strings.isBlank(placeVO.getHouseCode())) {
- setSource(placeVO);
- // 比对是否1km 范围内(现场)采集
- setIsScene(placeVO);
- // 更新,先查询场所信息
- QueryWrapper<PlaceEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("house_code", placeVO.getHouseCode());
- PlaceEntity one = getOne(wrapper);
- if (null != one) {
- placeVO.setId(one.getId());
- } else {
- // 扫码来的默认绑定本身
- placeVO.setHouseCodeBinds(placeVO.getHouseCode());
- // 新增,地址表中没有或者地址表中有场所表中没有的(是房屋的),扫码进来的
- save(placeVO);
- }
- // 绑定用户信息
- bindUserHandle(placeVO);
- // 设置完善状态
- setPlaceStatus(placeVO);
- // 房屋编号绑定处理
- houseCodeBindHandle(placeVO);
- // 更新场所信息
- flag = updateById(placeVO);
- } else {
- // 设置基础数据
- placeVO.setCreateUser(AuthUtil.getUserId());
- placeVO.setCreateTime(new Date());
- // 比对是否1km 范围内(现场)采集
- setIsSceneNotHouseCode(placeVO);
- // 设置来源( 1:地址总表 2:国控采集)
- placeVO.setSource(2);
- // 并生成36位的houseCode
- placeVO.setHouseCode(IdUtils.getIdBy36());
- // 绑定用户信息
- bindUserHandle(placeVO);
- // 设置完善状态
- setPlaceStatus(placeVO);
- // 新增场所信息
- flag = save(placeVO);
- }
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- placeVO.setRoleName(roleName);
- // 保存场所详情及任务信息
- savePlaceExtAndTaskInfo(placeVO);
- // 场所标签信息绑定(更新,调整)
- placeLabelBind(placeVO);
- // 网格绑定
- gridBind(placeVO);
- // 警务网格绑定
- jwGridCodeBind(placeVO);
- // 保存从业人员
- savePlacePractitioner(placeVO);
- // 判断是否校园
- if (placeVO.getLabel().startsWith("1601")) {
- // 校园的新增一个主体用户和一个通用用户
- addSchoolUser(placeVO);
- }
- // 返回结果
- return flag;
- }
-
-
- /**
- * 保存从业人员
- *
- * @param placeVO
- */
- private void savePlacePractitioner(PlaceVO placeVO) {
- if (placeVO.getPlacePractitioner() != null) {
- IPlacePractitionerService practitionerService = SpringUtil.getBean(IPlacePractitionerService.class);
- // 查询对应已存在的租户
- QueryWrapper<PlacePractitionerEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", placeVO.getId()).eq("is_deleted", 0);
- List<PlacePractitionerEntity> oldList = practitionerService.list(wrapper);
- // 取出从业人员信息
- List<PlacePractitionerEntity> placePractitionerList = placeVO.getPlacePractitioner();
- for (PlacePractitionerEntity placePractitionerEntity : placePractitionerList) {
- placePractitionerEntity.setPlaceId(placeVO.getId());
- }
- // 申明新增,修改,删除集合
- List<PlacePractitionerEntity> newList = new ArrayList<>();
- List<PlacePractitionerEntity> addList = new ArrayList<>();
- List<PlacePractitionerEntity> updateList = new ArrayList<>();
- List<PlacePractitionerEntity> removeList = new ArrayList<>();
- // 遍历设置数据
- for (PlacePractitionerEntity placePractitionerEntity : placePractitionerList) {
- if (null == placePractitionerEntity.getId()) {
- // 新增
- addList.add(placePractitionerEntity);
- } else {
- newList.add(placePractitionerEntity);
- }
- }
- // 遍历去差集,判断是新增还是删除还是更新
- // 取旧数据和新提交数据差集--删除
- removeList = oldList.stream().filter(vo -> !newList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
- // 取旧数据和新提交数据交集--更新
- updateList = newList.stream().filter(vo -> oldList.stream().map(e ->
- e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
-
- // 批量新增
- if (addList.size() > 0) {
- practitionerService.saveBatch(addList);
- }
- // 批量修改
- if (updateList.size() > 0) {
- practitionerService.updateBatchById(updateList);
- }
- // 批量删除
- if (removeList.size() > 0) {
- practitionerService.removeBatchByIds(removeList);
- }
- }
- }
-
- /**
- * 设置场所的source 来源
- *
- * @param placeVO
- */
- public void setSource(PlaceVO placeVO) {
- if (null != placeVO.getSource()) {
- placeVO.setSource(placeVO.getSource());
- } else {
- // 查询该houseCode 是否存在地址总表,如果是,赋值 1,否则2
- QueryWrapper<DoorplateAddressEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("address_code", placeVO.getHouseCode());
- DoorplateAddressEntity one = doorplateAddressService.getOne(wrapper);
- if (null != one) {
- placeVO.setSource(1);
- } else {
- placeVO.setSource(2);
- }
- }
- }
-
- /**
- * 警务网格绑定
- *
- * @param placeVO
- */
- @Override
- public void jwGridCodeBind(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getLng())) {
- String point = "'POINT(" + placeVO.getLng() + " " + placeVO.getLat() + ")'";
- // 点落面警务网格
- List<PoliceAffairsGridEntity> policeAffairsGridEntities
- = SpringUtil.getBean(IPoliceAffairsGridService.class).spatialAnalysis(point);
- if (policeAffairsGridEntities.size() > 0) {
- // 设置警务网格并更新
- placeVO.setJwGridCode(policeAffairsGridEntities.get(0).getJwGridCode());
- // 更新
- updateById(placeVO);
- }
- }
- }
-
- /**
- * 设置是否现场采集(1km 范围内)
- *
- * @param placeVO
- */
- public void setIsScene(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getX()) && !Strings.isBlank(placeVO.getLng())) {
- Integer placeEntity = baseMapper.comparisonPosition(placeVO);
- if (placeEntity == 1) {
- placeVO.setIsScene(1);
- } else {
- placeVO.setIsScene(2);
- }
- }
- }
-
- /**
- * 设置是否现场采集(1km 范围内),非地址总表数据
- *
- * @param placeVO
- */
- public void setIsSceneNotHouseCode(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getX()) && !Strings.isBlank(placeVO.getLng())) {
- boolean flag = baseMapper.comparisonPositionNotHouseCode(placeVO);
- if (flag) {
- placeVO.setIsScene(1);
- } else {
- placeVO.setIsScene(2);
- }
- }
- }
-
- /**
- * 房屋绑定处理
- *
- * @param placeVO
- */
- public void houseCodeBindHandle(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getHouseCodeBinds())) {
- List<String> list = Arrays.asList(placeVO.getHouseCodeBinds().split(","));
- // 先删除原有的绑定
- QueryWrapper<PlaceDoorEntity> removeQw = new QueryWrapper<>();
- removeQw.eq("place_id", placeVO.getId());
- // 删除
- placeDoorService.remove(removeQw);
- // 遍历更新
- for (String houseCode : list) {
- // 查询是否已存在关联关系
- QueryWrapper<PlaceDoorEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", houseCode);
- // 查询
- List<PlaceDoorEntity> placeDoorEntityList = placeDoorService.list(wrapper);
- if (placeDoorEntityList.size() > 0) {
- // 该houseCode 已被绑定
-// errorList.add(houseCode);
- for (PlaceDoorEntity placeDoorEntity : placeDoorEntityList) {
- placeDoorEntity.setPlaceId(placeVO.getId());
- // 更新
- placeDoorService.updateById(placeDoorEntity);
- }
- } else {
- PlaceDoorEntity placeDoorEntity = new PlaceDoorEntity();
- placeDoorEntity.setHouseCode(houseCode);
- placeDoorEntity.setPlaceId(placeVO.getId());
- // 对应插入到关联关系表中
- placeDoorService.save(placeDoorEntity);
- }
- }
- // 处理原场所表houseCode 绑定数据-- 暂不处理原数据的删除
-// handlePlaceOne(list,placeVO);
- }
- }
-
- /**
- * 处理对应的绑定房屋数据
- *
- * @param list
- */
- public void handlePlaceOne(List<String> list, PlaceVO place) {
- // 处理对应的绑定房屋数据
- List<Long> longs = new ArrayList<>();
- // 把其他单个的场所数据删除
- for (String code : list) {
- if (!code.equals(place.getHouseCode())) {
- // 先查询对应的场所id
- QueryWrapper<PlaceEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", code).eq("is_deleted", 0);
- PlaceEntity one = getOne(wrapper);
- if (null != one) {
- longs.add(one.getId());
- // 删除对应的单个编号的场所
- removeById(one.getId());
- }
- }
- }
- if (longs.size() > 0) {
- // 删除对应的详情
- removePlaceExt(longs);
- // 删除对应的标签绑定信息
- removePlaceLabel(longs);
- // 删除对应的场所门牌绑定关系信息
- removePlaceDoor(longs);
- }
- }
-
- /**
- * 设置场所完善状态
- *
- * @param placeVO
- */
- private void setPlaceStatus(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getPrincipal())
- && !Strings.isBlank(placeVO.getPrincipalPhone())
- && !Strings.isBlank(placeVO.getLocation())
- && !Strings.isBlank(placeVO.getPlaceName())
- && !Strings.isBlank(placeVO.getImageUrls())
- && !Strings.isBlank(placeVO.getPrincipalIdCard())
- ) {
- // 已完善
- placeVO.setStatus(2);
- } else {
- // 未完善
- placeVO.setStatus(1);
- }
- }
-
- /**
- * 网格绑定
- *
- * @param placeVO
- */
- public void gridBind(PlaceVO placeVO) {
- // 判断角色,如果是网格员则直接使用网格员的网格id,如果是民警则采用点落面的方式进行获取网格的id
-// if (!Strings.isBlank(placeVO.getRoleName()) && placeVO.getRoleName().equals("wgy")) {
-// // 网格员角色位置绑定
-// gridmanPositionHandle(placeVO);
-// }
- // 都是通过点落面方式,不区分角色
- policePositionHandle(placeVO);
- }
-
- /**
- * 网格编号绑定
- *
- * @param placeVO
- */
- public void gridCodeBind(PlaceVO placeVO) {
- // 判断角色,如果是网格员则直接使用网格员的网格id,如果是民警则采用点落面的方式进行获取网格的id
- if (!Strings.isBlank(placeVO.getRoleName())) {
- // 网格员场所网格编号绑定-新
- gridmanGridCodePositionHandle(placeVO);
- }
- // 民警角色时通过位置绑定网格-新
- policeGridCodePositionHandle(placeVO);
- }
-
- /**
- * 网格员角色位置绑定-grid_id
- *
- * @param placeVO
- */
- public void gridmanPositionHandle(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getRoleName()) && placeVO.getRoleName().equals("wgy")) {
- // 判断网格员,查询对应网格人对应的网格id
- GridEntity grid = gridService.getGridByUserId(AuthUtil.getUserId());
- if (null != grid) {
- // 场所编号绑定
- placeVO.setGridCode(grid.getGridCode());
- placeVO.setGridId(grid.getId());
- // 更新场所网格绑定信息
- updateById(placeVO);
- // 判断关联关系表是否存在
- QueryWrapper<GridRangeEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", placeVO.getHouseCode());
- GridRangeEntity one = gridRangeService.getOne(wrapper);
- if (null == one) {
- // 新增
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setHouseCode(placeVO.getHouseCode());
- gridRangeEntity.setGridId(grid.getId());
- gridRangeEntity.setGridCode(grid.getGridCode());
- // 插入
- gridRangeService.save(gridRangeEntity);
- } else {
- // 修改绑定
- one.setGridId(grid.getId());
- one.setGridCode(grid.getGridCode());
- // 修改
- gridRangeService.updateById(one);
- }
- }
- }
- }
-
- /**
- * 网格员角色位置绑定-grid_code
- *
- * @param placeVO
- */
- public void gridmanGridCodePositionHandle(PlaceVO placeVO) {
- if (placeVO.getRoleName().equals("网格员")) {
- // 判断网格员,查询对应网格人对应的网格
- GridEntity grid = gridService.getGridByUserId(AuthUtil.getUserId());
- if (null != grid && !Strings.isBlank(grid.getGridCode())) {
- // 场所编号绑定
- placeVO.setGridCode(grid.getGridCode());
- placeVO.setGridId(grid.getId());
- // 更新场所信息
- updateById(placeVO);
- }
- }
- }
-
- /**
- * 其他角色时位置绑定
- *
- * @param placeVO
- */
- @Override
- public void policePositionHandle(PlaceVO placeVO) {
- // 是民警且位置信息存在
- if (!Strings.isBlank(placeVO.getLng())) {
- //点坐标解析
- String point = "'POINT(" + placeVO.getLng() + " " + placeVO.getLat() + ")'";
-// String point = "'POINT(" + villageInfoExcel.getLatitude() + " " + villageInfoExcel.getLongitude() +")'";
- List<GridEntity> gridEntityList = gridMapper.spatialAnalysis(point);
- if (gridEntityList.size() > 0) {
- GridEntity gridEntity = gridEntityList.get(0);
- // 场所编号绑定
- placeVO.setGridCode(gridEntity.getGridCode());
- placeVO.setGridId(gridEntity.getId());
- // 更新场所信息
- updateById(placeVO);
- // 判断关联关系表是否存在
- QueryWrapper<GridRangeEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", placeVO.getHouseCode());
- GridRangeEntity one = gridRangeService.getOne(wrapper);
- if (null == one) {
- // 新增
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setHouseCode(placeVO.getHouseCode());
- gridRangeEntity.setGridId(gridEntity.getId());
- gridRangeEntity.setGridCode(gridEntity.getGridCode());
- // 插入
- gridRangeService.save(gridRangeEntity);
- } else {
- // 修改绑定
- one.setGridId(gridEntity.getId());
- one.setGridCode(gridEntity.getGridCode());
- // 修改
- gridRangeService.updateById(one);
- }
- }
- }
- }
-
- /**
- * 民警角色时通过位置绑定网格
- *
- * @param placeVO
- */
- private void policeGridCodePositionHandle(PlaceVO placeVO) {
- // 是民警且位置信息存在
- if (placeVO.getRoleName().equals("民警") && !Strings.isBlank(placeVO.getLng())) {
- //点坐标解析
- String point = "'POINT(" + placeVO.getLng() + " " + placeVO.getLat() + ")'";
-// String point = "'POINT(" + villageInfoExcel.getLatitude() + " " + villageInfoExcel.getLongitude() +")'";
- List<GridEntity> gridEntityList = gridMapper.spatialAnalysis(point);
- if (gridEntityList.size() > 0) {
- GridEntity gridEntity = gridEntityList.get(0);
- if (null != gridEntity && !Strings.isBlank(gridEntity.getGridCode())) {
- // 场所编号绑定
- placeVO.setGridCode(gridEntity.getGridCode());
- placeVO.setGridId(gridEntity.getId());
- // 更新场所信息
- updateById(placeVO);
- }
- }
- }
- }
-
- /**
- * 场所标签信息绑定入库
- *
- * @param placeVO
- */
- @Transactional(rollbackFor = Exception.class)
- public void placeLabelBind(PlaceVO placeVO) {
- // 先查询对于的场所是否已有标签信息
- // 查询对应已存在的从业人员
- QueryWrapper<PlacePoiLabel> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", placeVO.getId());
- List<PlacePoiLabel> oldList = placePoiLabelService.list(wrapper);
- if (oldList.size() > 0) {
- // 先将老的全部删除,然后批量插入
- QueryWrapper<PlacePoiLabel> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("place_id", placeVO.getId());
- boolean remove = placePoiLabelService.remove(queryWrapper);
- if (remove) {
- // 批量新增
- savePlaceLabel(placeVO);
- }
- } else {
- savePlaceLabel(placeVO);
- }
- }
-
- /**
- * 插入场所标签信息
- *
- * @param placeVO
- */
- public void savePlaceLabel(PlaceVO placeVO) {
- if (!Strings.isBlank(placeVO.getLabel())) {
- // 批量新增
- List<String> labelList = Arrays.asList(placeVO.getLabel().split(","));
- if (labelList.size() > 1) {
- // 只处理小类
- // 遍历
- labelList.forEach(labelId -> {
- // 处理小类
- if (labelId.length() > 4) {
- // 切割成三个,分别是大类,中类,小类
- String bigString = labelId.substring(0, 2);
- String midString = labelId.substring(0, 4);
- // 大类
- PlacePoiLabel big = new PlacePoiLabel();
- big.setPlaceId(placeVO.getId());
- big.setPoiCode(Integer.parseInt(bigString));
- big.setType(1);
- if (!Strings.isBlank(placeVO.getColor())) {
- big.setColor(placeVO.getColor());
- }
- placePoiLabelService.save(big);
- // 中类
- PlacePoiLabel mid = new PlacePoiLabel();
- mid.setPlaceId(placeVO.getId());
- mid.setPoiCode(Integer.parseInt(midString));
- mid.setType(2);
- if (!Strings.isBlank(placeVO.getColor())) {
- mid.setColor(placeVO.getColor());
- }
- placePoiLabelService.save(mid);
- // 小类
- PlacePoiLabel min = new PlacePoiLabel();
- min.setPlaceId(placeVO.getId());
- min.setPoiCode(Integer.parseInt(labelId));
- min.setType(3);
- if (!Strings.isBlank(placeVO.getColor())) {
- min.setColor(placeVO.getColor());
- }
- placePoiLabelService.save(min);
- }
- });
- } else {
- // 处理单个
- String labelCode = labelList.get(0);
- // 切割成三个,分别是大类,中类,小类
- String bigString = labelCode.substring(0, 2);
- String midString = labelCode.substring(0, 4);
- // 大类
- PlacePoiLabel big = new PlacePoiLabel();
- big.setPlaceId(placeVO.getId());
- big.setPoiCode(Integer.parseInt(bigString));
- big.setType(1);
- if (!Strings.isBlank(placeVO.getColor())) {
- big.setColor(placeVO.getColor());
- }
- placePoiLabelService.save(big);
- // 中类
- PlacePoiLabel mid = new PlacePoiLabel();
- mid.setPlaceId(placeVO.getId());
- mid.setPoiCode(Integer.parseInt(midString));
- mid.setType(2);
- if (!Strings.isBlank(placeVO.getColor())) {
- mid.setColor(placeVO.getColor());
- }
- placePoiLabelService.save(mid);
- // 处理小类
- if (labelCode.length() > 4) {
- // 小类
- PlacePoiLabel min = new PlacePoiLabel();
- min.setPlaceId(placeVO.getId());
- min.setPoiCode(Integer.parseInt(labelCode));
- min.setType(3);
- if (!Strings.isBlank(placeVO.getColor())) {
- min.setColor(placeVO.getColor());
- }
- placePoiLabelService.save(min);
- }
- }
- }
- }
-
- /**
- * 新增校方主体账号和通用账号
- *
- * @param placeVO
- * @return
- */
- @Transactional(rollbackFor = Exception.class)
- public User addSchoolUser(PlaceVO placeVO) {
- User newUser = new User();
- if (StringUtils.isNotBlank(placeVO.getPlaceName())) {
-// placeVO.setPrincipal(placeVO.getPrincipal());
-// placeVO.setPrincipalPhone(placeVO.getPrincipalPhone());
- //如果用户不存在,则新增一个用户
- newUser.setAccount(placeVO.getPlaceName() + "主体");
- newUser.setName(placeVO.getPlaceName() + "-主体");
- newUser.setRealName(placeVO.getPlaceName() + "-主体");
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 校园主体,
- newUser.setRoleId("1780786647371706370");
-
- //默认密码为 123456
- newUser.setPassword("123456");
- // 设置机构
- // 用户新增
- newUser.setId(null);
- boolean submit = userService.submit(newUser);
- // 校园通用
- newUser.setId(null);
- newUser.setRoleId("1780786746076262402");
- newUser.setAccount(placeVO.getPlaceName() + "通用");
- newUser.setName(placeVO.getPlaceName() + "-通用");
- newUser.setRealName(placeVO.getPlaceName() + "-通用");
- boolean submit2 = userService.submit(newUser);
- //绑定id
-// placeVO.setPrincipalUserId(newUser.getId());
- //给人员打上场所负责人的标签
-// baseMapper.saveUserLabel(newUser.getId(), 1002);
- }
- return newUser;
- }
-
- /**
- * 场所负责人和用户绑定
- *
- * @param placeVO
- */
- @Transactional(rollbackFor = Exception.class)
- public User bindUserHandle(PlaceVO placeVO) {
- User newUser = new User();
- if (null != placeVO.getPrincipalPhone() && !placeVO.getPrincipalPhone().equals("")) {
- placeVO.setPrincipal(placeVO.getPrincipal());
- placeVO.setPrincipalPhone(placeVO.getPrincipalPhone());
- //根据手机号查询库里的数据
- List<User> list = userService.getUserListByPhoneOrAccount(placeVO.getPrincipalPhone());
- if (list.size() > 0) {
- User user = list.get(0);
- //如果用户存在,则该用户id绑定场所
- placeVO.setPrincipalUserId(user.getId());
- newUser = user;
- // 判断用户是否包含了居民角色,不包含则需更新
- if (!user.getRoleId().contains("1717429059648606209")) {
- user.setRoleId(user.getRoleId() + ",1717429059648606209");
- //更新
- userService.updateById(user);
- }
- } else {
- //如果用户不存在,则新增一个用户
- newUser.setAccount(placeVO.getPrincipalPhone());
- newUser.setPhone(placeVO.getPrincipalPhone());
- newUser.setName(placeVO.getPrincipal());
- newUser.setRealName(placeVO.getPrincipal());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 设置机构
- // 用户新增
- boolean submit = userService.submit(newUser);
- //绑定id
- placeVO.setPrincipalUserId(newUser.getId());
- //给人员打上场所负责人的标签
- baseMapper.saveUserLabel(newUser.getId(), 1002);
- }
- }
- return newUser;
- }
-
- /**
- * 保存场所详情及任务信息
- *
- * @param placeVO
- */
- @Transactional(rollbackFor = Exception.class)
- public void savePlaceExtAndTaskInfo(PlaceVO placeVO) {
- PlaceExtEntity placeExtEntity = new PlaceExtEntity();
- // 判断是否已存在,已存在则不新增
- QueryWrapper<PlaceExtEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0)
- .eq("place_id", placeVO.getId());
- PlaceExtEntity extServiceOne = placeExtService.getOne(wrapper);
- if (null == extServiceOne) {
- // 判断是否有传
- if (placeVO.getPlaceExtEntity() != null) {
- placeExtEntity = placeVO.getPlaceExtEntity();
- }
- placeExtEntity.setPlaceId(placeVO.getId());
- // 默认给待完善状态
- placeExtEntity.setConfirmFlag(4);
- placeExtEntity.setCreateTime(new Date());
- placeExtEntity.setUpdateTime(new Date());
- placeExtEntity.setCreateUser(AuthUtil.getUserId());
- placeExtEntity.setUpdateUser(AuthUtil.getUserId());
- // 新增场所详情
- placeExtService.save(placeExtEntity);
- } else {
- if (placeVO.getPlaceExtEntity() != null) {
- placeExtService.updateById(placeVO.getPlaceExtEntity());
- }
- }
- }
-
- /**
- * 保存场所详情信息
- *
- * @param placeEntity
- */
- @Transactional(rollbackFor = Exception.class)
- public void savePlaceExtInfo(PlaceEntity placeEntity) {
- PlaceExtEntity placeExtEntity = new PlaceExtEntity();
- placeExtEntity.setPlaceId(placeEntity.getId());
- // 判断是否已存在,已存在则不新增
- QueryWrapper<PlaceExtEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0)
- .eq("place_id", placeEntity.getId());
- PlaceExtEntity one = placeExtService.getOne(wrapper);
- if (null == one) {
- placeExtEntity.setPlaceId(placeEntity.getId());
- // 默认给待完善状态
- placeExtEntity.setConfirmFlag(4);
- placeExtEntity.setCreateTime(new Date());
- placeExtEntity.setUpdateTime(new Date());
- placeExtEntity.setCreateUser(AuthUtil.getUserId());
- placeExtEntity.setUpdateUser(AuthUtil.getUserId());
- // 新增场所详情
- placeExtService.save(placeExtEntity);
- }
- }
-
- /**
- * 历史场所挂接处理-临时
- *
- * @param place
- * @return
- */
- @Override
- public Object historyPlaceHandle(PlaceVO place) {
- // 查询所有的场所(手机号不为空)
- List<PlaceVO> list = baseMapper.getPlaceNotNullPhone();
- // 遍历
- for (PlaceVO placeVO : list) {
- User user = bindUserHandle(placeVO);
- if (null != user) {
- placeVO.setPrincipalUserId(user.getId());
- //更新场所用户id绑定
- baseMapper.updatePlaceEntity(placeVO);
- }
- }
- return null;
- }
-
- /**
- * 历史场所标签挂接处理-临时
- *
- * @param place
- * @return
- */
- @Override
- @Transactional
- public Object historyPlaceLabelHandle(PlaceVO place) {
- // 查询所有的场所
- List<PlaceVO> list = baseMapper.getAllHistoryPlace();
- // 遍历
- for (PlaceVO placeVO : list) {
- if (null != placeVO.getLabel()) {
- String[] split = placeVO.getLabel().split(",");
- for (String s : split) {
- PlacePoiLabel placePoiLabel = new PlacePoiLabel();
- placePoiLabel.setPlaceId(placeVO.getId());
- placePoiLabel.setPoiCode(Integer.parseInt(s));
- placePoiLabelService.save(placePoiLabel);
- }
- }
- }
- return null;
- }
-
- /**
- * 场所表 自定义详情查询
- *
- * @param place
- * @return
- */
- @Override
- public PlaceVO getDetail(PlaceVO place) {
- // 查询场所信息
- PlaceVO placeVO = baseMapper.getDetail(place);
- // 门牌信息
- if (null != placeVO) {
- if (null != place.getAddressType() && place.getAddressType() == 4) {
- // 查询地址编码信息(社区派出所相关信息)
- DoorplateAddressEntity addressEntity = placeRelService.getDoorplateAddressEntity(placeVO);
- placeVO.setDoorplateAddressEntity(addressEntity);
- // 查询网格信息--商超
- placeVO.setGrid(gridService.getGridDetailByParam(placeVO));
- } else {
- // 管理后台查询赋值颜色
- if (placeVO.getPlacePoiLabelVOList().size() > 0) {
- PlacePoiLabelVO placePoiLabelVO = placeVO.getPlacePoiLabelVOList().get(0);
- if (!Strings.isBlank(placePoiLabelVO.getColor())) {
- placeVO.setColor(placePoiLabelVO.getColor());
- }
- }
- // 查询地址门牌信息
- QueryWrapper<DoorplateAddressEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("address_code", placeVO.getHouseCode());
- List<DoorplateAddressEntity> list = doorplateAddressService.list(wrapper);
- if (list.size() > 0) {
- placeVO.setDoorplateAddressEntity(list.get(0));
- placeVO.setNeiCode(list.get(0).getNeiCode());
- }
- // 查询场所对应的网格数据
- placeVO.setGrid(gridService.getPlaceGridDetailByHouseCode(placeVO.getHouseCode()));
- // 设置详情信息
- QueryWrapper<PlaceExtEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("place_id", placeVO.getId());
- placeVO.setPlaceExtEntity(placeExtService.getOne(queryWrapper));
- // 查询从业人员
- IPlacePractitionerService placePractitionerService = SpringUtils.getBean(IPlacePractitionerService.class);
- List<PlacePractitionerEntity> entityList = placePractitionerService.list(Wrappers.<PlacePractitionerEntity>lambdaQuery()
- .eq(PlacePractitionerEntity::getPlaceId, placeVO.getId()));
- placeVO.setPlacePractitioner(entityList);
- // 查询绑定的房屋
- placeVO.setHouseBindList(baseMapper.getHouseBindMap(placeVO.getHouseCodeBinds()));
- }
- } else {
- // 查询地址编码信息(社区派出所相关信息)
- if (!Strings.isBlank(place.getHouseCode())) {
- QueryWrapper<DoorplateAddressEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("address_code", place.getHouseCode());
- DoorplateAddressEntity addressEntity = doorplateAddressService.getOne(queryWrapper);
- if (null != addressEntity) {
- placeVO = new PlaceVO();
- placeVO.setDoorplateAddressEntity(addressEntity);
- placeVO.setHouseCode(addressEntity.getAddressCode());
- placeVO.setLng(addressEntity.getX());
- placeVO.setLat(addressEntity.getY());
- placeVO.setLocation(addressEntity.getAddressName());
- }
- }
- }
- // 返回
- return placeVO;
- }
-
- /**
- * 场所数据到导入
- *
- * @param data
- * @param isCovered
- */
- @Override
- public void importPlace(List<PlaceExcel> data, Boolean isCovered) {
- for (PlaceExcel placeExcel : data) {
- // 判断是否存在,不存在则插入,否则不操作
- QueryWrapper<PlaceEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0)
- .eq("house_code", placeExcel.getHouseCode());
- PlaceEntity one = getOne(wrapper);
- if (null == one) {
- Long userId = updateUser(placeExcel);
- // 插入场所
- PlaceVO placeEntity = new PlaceVO();
- String[] split = placeExcel.getHouseCode().split(",");
- placeEntity.setHouseCode(split[0]);
- placeEntity.setHouseCodeBinds(placeExcel.getHouseCode());
- placeEntity.setPrincipalUserId(userId);
- placeEntity.setPrincipal(placeExcel.getName());
- placeEntity.setPrincipalPhone(placeExcel.getPhoneNumber());
- placeEntity.setCreateTime(new Date());
- placeEntity.setCreateUser(AuthUtil.getUserId());
- placeEntity.setUpdateTime(new Date());
- placeEntity.setUpdateUser(AuthUtil.getUserId());
- // 默认为未完善
- placeEntity.setStatus(1);
- // 是否现场采集 1:是 2:否
- placeEntity.setIsScene(1);
- // 来源 1:地址总表 2:国控采集 3:商超
- if (!Strings.isBlank(placeExcel.getHouseCode())) {
- placeEntity.setSource(1);
- } else {
- placeEntity.setSource(2);
- // 并生成36位的houseCode
- placeEntity.setHouseCode(IdUtils.getIdBy36());
- }
- // 九小场所类型处理
- if (!Strings.isBlank(placeExcel.getNineType())) {
- placeEntity.setIsNine(1);
- placeEntity.setNineType(Integer.parseInt(placeExcel.getNineType()));
- }
- // 网格绑定处理
- importGridHandle(placeExcel, placeEntity);
- // 新增
- save(placeEntity);
- // 保存详情
- savePlaceExtAndTaskInfo(placeEntity);
- // 场所标签信息处理
- if (!Strings.isBlank(placeExcel.getLabelCode())) {
- PlaceVO placeVO = new PlaceVO();
- placeVO.setId(placeEntity.getId());
- placeVO.setLabel(placeExcel.getLabelCode());
- // 处理
- placeLabelBind(placeVO);
- }
- // 房屋编号绑定处理
- houseCodeBindHandle(placeEntity);
- } else {
- // 更新
- Long userId = updateUser(placeExcel);
- // 插入场所
- PlaceVO placeEntity = new PlaceVO();
- placeEntity.setId(one.getId());
- placeEntity.setHouseCode(placeExcel.getHouseCode());
- placeEntity.setHouseCodeBinds(placeExcel.getHouseCode());
- placeEntity.setPrincipalUserId(userId);
- placeEntity.setPrincipal(placeExcel.getName());
- placeEntity.setPrincipalPhone(placeExcel.getPhoneNumber());
- placeEntity.setCreateTime(new Date());
- placeEntity.setCreateUser(AuthUtil.getUserId());
- placeEntity.setUpdateTime(new Date());
- placeEntity.setUpdateUser(AuthUtil.getUserId());
- // 默认为未完善
- placeEntity.setStatus(1);
- // 是否现场采集 1:是 2:否
- placeEntity.setIsScene(1);
- // 来源 1:地址总表 2:国控采集 3:商超
- placeEntity.setSource(1);
- // 九小场所类型处理
- if (!Strings.isBlank(placeExcel.getNineType())) {
- placeEntity.setIsNine(1);
- placeEntity.setNineType(Integer.parseInt(placeExcel.getNineType()));
- }
- // 网格绑定处理
- importGridHandle(placeExcel, placeEntity);
- // 更新
- updateById(placeEntity);
- // 场所标签信息处理
- if (!Strings.isBlank(placeExcel.getLabelCode())) {
- PlaceVO placeVO = new PlaceVO();
- placeVO.setId(placeEntity.getId());
- placeVO.setLabel(placeExcel.getLabelCode());
- // 处理
- placeLabelBind(placeVO);
- }
- }
- }
- }
-
- /**
- * 导入是网格数据绑定处理
- *
- * @param placeExcel
- * @param placeEntity
- */
- private void importGridHandle(PlaceExcel placeExcel, PlaceVO placeEntity) {
- if (!Strings.isBlank(placeExcel.getCommunityName()) &&
- !Strings.isBlank(placeExcel.getGridName())) {
- // 查询对应的网格信息
- GridEntity gridEntity = gridService.getGridInfoByParam(placeExcel.getCommunityName(), placeExcel.getGridName());
- if (null != gridEntity) {
- // 设置场所范围
- placeEntity.setGridId(gridEntity.getId());
- placeEntity.setGridCode(gridEntity.getGridCode());
- // 更新网格范围绑定
- GridRangeEntity gridRangeEntity = new GridRangeEntity();
- gridRangeEntity.setGridId(gridEntity.getId());
- gridRangeEntity.setGridCode(gridEntity.getGridCode());
- gridRangeEntity.setHouseCode(placeEntity.getHouseCode());
- UpdateWrapper<GridRangeEntity> updateWrapper = new UpdateWrapper<>();
- updateWrapper.eq("house_code", placeEntity.getHouseCode());
- gridRangeService.update(gridRangeEntity, updateWrapper);
- }
- }
- }
-
- /**
- * 更新用户信息
- *
- * @param placeExcel
- * @return
- */
- public Long updateUser(PlaceExcel placeExcel) {
- if (!Strings.isBlank(placeExcel.getPhoneNumber()) &&
- !Strings.isBlank(placeExcel.getName())) {
- PlaceVO placeVO = new PlaceVO();
- placeVO.setPrincipal(placeExcel.getPhoneNumber());
- placeVO.setPrincipalPhone(placeExcel.getName());
- // 更新场所负责人
- User user = bindUserHandle(placeVO);
- // 返回
- return user.getId();
- }
- return null;
- }
-
- /**
- * 更新用户信息
- *
- * @param placeExcel
- * @return
- */
- public Long updateUser(PlaceAndRelExcel placeExcel) {
- if (!Strings.isBlank(placeExcel.getPhoneNumber()) &&
- !Strings.isBlank(placeExcel.getName())) {
- PlaceVO placeVO = new PlaceVO();
- placeVO.setPrincipalPhone(placeExcel.getPhoneNumber());
- placeVO.setPrincipal(placeExcel.getName());
- // 更新场所负责人
- User user = bindUserHandle(placeVO);
- // 返回
- return user.getId();
- }
- return null;
- }
-
- /**
- * 场所(商超)导入
- *
- * @param data
- * @param isCovered
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void importAndRelPlace(List<PlaceAndRelExcel> data, Boolean isCovered) {
- for (PlaceAndRelExcel placeExcel : data) {
- // 判断是否存在,不存在则插入,否则不操作
- PlaceEntity one = baseMapper.getPlaceAndRelInfo(placeExcel);
- if (null == one) {
- Long userId = updateUser(placeExcel);
- // 插入场所
- PlaceEntity placeEntity = new PlaceEntity();
- placeEntity.setPlaceName(placeExcel.getPlaceName());
- placeEntity.setLocation(placeExcel.getAddress());
- placeEntity.setPrincipalUserId(userId);
- placeEntity.setPrincipal(placeExcel.getName());
- placeEntity.setPrincipalPhone(placeExcel.getPhoneNumber());
- placeEntity.setPrincipalUserId(userId);
- placeEntity.setCreateTime(new Date());
- placeEntity.setCreateUser(AuthUtil.getUserId());
- placeEntity.setUpdateTime(new Date());
- placeEntity.setUpdateUser(AuthUtil.getUserId());
- // 并生成36位的houseCode
- placeEntity.setHouseCode(IdUtils.getIdBy36());
- // 商超数据
- placeEntity.setSource(3);
- //一个一个插入,防止同一个表中有相同的数据
- save(placeEntity);
- // 插入详情
- savePlaceExtInfo(placeEntity);
- // 插入标签关系表
- savPlaceLabelBind(placeExcel, placeEntity);
- // 插入关联数据表
- PlaceRelEntity placeRelEntity = new PlaceRelEntity();
- placeRelEntity.setPlaceId(placeEntity.getId());
- placeRelEntity.setStreetName(placeExcel.getStreetName());
- QueryWrapper<Region> wrapper = new QueryWrapper<>();
- wrapper.eq("name", placeExcel.getCommunityName());
- Region region = SpringUtils.getBean(IRegionService.class).getOne(wrapper);
- if (null != region) {
- placeRelEntity.setCommunityCode(region.getCode());
- }
- placeRelEntity.setCommunityName(placeExcel.getCommunityName());
- placeRelEntity.setGridName(placeExcel.getGridName());
- placeRelEntity.setBuildingName(placeExcel.getBuildingName());
- placeRelEntity.setDoorplateNum(placeExcel.getDoorplateNum());
- placeRelEntity.setFloor(placeExcel.getFloor());
- placeRelEntity.setCreateTime(new Date());
- placeRelEntity.setCreateUser(AuthUtil.getUserId());
- placeRelEntity.setUpdateTime(new Date());
- placeRelEntity.setUpdateUser(AuthUtil.getUserId());
- // 新增
- placeRelService.save(placeRelEntity);
- } else {
- // 只更新商铺信息
- Long userId = updateUser(placeExcel);
- // 插入场所
- PlaceEntity placeEntity = new PlaceEntity();
- placeEntity.setId(one.getId());
- placeEntity.setPlaceName(placeExcel.getPlaceName());
- placeEntity.setLocation(placeExcel.getAddress());
- placeEntity.setPrincipalUserId(userId);
- placeEntity.setCreateTime(new Date());
- placeEntity.setCreateUser(AuthUtil.getUserId());
- placeEntity.setUpdateTime(new Date());
- placeEntity.setUpdateUser(AuthUtil.getUserId());
- //一个一个插入,防止同一个表中有相同的数据
- updateById(placeEntity);
- // 插入详情
- savePlaceExtInfo(placeEntity);
- }
- }
- }
-
- /**
- * 插入标签关系表
- *
- * @param placeExcel
- */
- public void savPlaceLabelBind(PlaceAndRelExcel placeExcel, PlaceEntity placeEntity) {
- if (!Strings.isBlank(placeExcel.getLabelCode())) {
- // 匹配标签
- QueryWrapper<CategoryEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("level", 3).eq("category_name", placeExcel.getLabelCode()).eq("is_deleted", 0);
- // 查询
- List<CategoryEntity> list = SpringUtils.getBean(ICategoryService.class).list(wrapper);
- if (list.size() > 0) {
- PlaceVO placeVO = new PlaceVO();
- CategoryEntity categoryEntity = list.get(0);
- placeVO.setLabel(categoryEntity.getCategoryNo());
- placeVO.setId(placeEntity.getId());
- // 插入标签
- placeLabelBind(placeVO);
- }
- }
- }
-
- /**
- * 场所数据处理-用户信息(场所负责人信息写入到场所表)
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Object placeUserHandle() {
- // 查询出有用户id 的场所
- List<PlaceEntity> list = baseMapper.getHasUserIdPlaceList();
- // 遍历
- for (PlaceEntity placeEntity : list) {
- // 查询对应的用户信息
- User user = userService.getById(placeEntity.getPrincipalUserId());
- if (null != user) {
- // 设置场所负责人,手机号
- if (null != user.getRealName() && !user.getRealName().equals("")) {
- placeEntity.setPrincipal(user.getRealName());
- }
- if (null != user.getPhone() && !user.getPhone().equals("")) {
- placeEntity.setPrincipalPhone(user.getPhone());
- }
- // 更新场所信息
- updateById(placeEntity);
- }
- }
- return null;
- }
-
- /**
- * 自定义修改
- *
- * @param placeVO
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean updatePlace(PlaceVO placeVO) {
- boolean flag = false;
- // 修改场所信息
- flag = updateById(placeVO);
- // 修改标签绑定信息
- // 返回
- return flag;
- }
-
- /**
- * 场所标签数据处理
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Object placeLabelHandle() {
- // 查询所有的标签绑定
- List<PlacePoiLabel> list = placePoiLabelService.getPlacePoiLabelList();
- // 遍历
- for (PlacePoiLabel placePoiLabel : list) {
- // 处理单个
- String labelCode = placePoiLabel.getPoiCode().toString();
- // 切割成三个,分别是大类,中类,小类
- String bigString = labelCode.substring(0, 2);
- String midString = labelCode.substring(0, 4);
- // 大类
- PlacePoiLabel big = new PlacePoiLabel();
- big.setPlaceId(placePoiLabel.getPlaceId());
- big.setPoiCode(Integer.parseInt(bigString));
- big.setType(1);
- // 保存前先判断
- QueryWrapper<PlacePoiLabel> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("place_id", placePoiLabel.getPlaceId()).eq("poi_code", Integer.parseInt(bigString));
- PlacePoiLabel one = placePoiLabelService.getOne(queryWrapper);
- if (null == one) {
- placePoiLabelService.save(big);
- }
- // 中类
- PlacePoiLabel mid = new PlacePoiLabel();
- mid.setPlaceId(placePoiLabel.getPlaceId());
- mid.setPoiCode(Integer.parseInt(midString));
- mid.setType(2);
- // 保存前先判断
- QueryWrapper<PlacePoiLabel> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", placePoiLabel.getPlaceId()).eq("poi_code", Integer.parseInt(midString));
- PlacePoiLabel two = placePoiLabelService.getOne(wrapper);
- if (null == two) {
- placePoiLabelService.save(mid);
- }
- }
- return null;
- }
-
- /**
- * 历史场所详情数据处理
- *
- * @param place
- * @return
- */
- @Override
- public Object historyPlaceExtHandle(PlaceVO place) {
- // 查询所有的场所数据(除去详情表已有的)
- List<PlaceEntity> list = baseMapper.getPlaceListByNoExt();
- // 遍历更新
- for (PlaceEntity placeEntity : list) {
- QueryWrapper<PlaceExtEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("place_id", placeEntity.getId()).eq("is_deleted", 0);
- PlaceExtEntity one = placeExtService.getOne(queryWrapper);
- if (null == one) {
- // 新增
- PlaceExtEntity placeExtEntity = new PlaceExtEntity();
- if (null != placeEntity.getPrincipalUserId()) {
- // 待审核
- placeExtEntity.setConfirmFlag(1);
- } else {
- // 待完善
- placeExtEntity.setConfirmFlag(4);
- }
- placeExtEntity.setPlaceId(placeEntity.getId());
- // 插入
- placeExtService.save(placeExtEntity);
- }
- }
- return null;
- }
-
- /**
- * 商超数据处理
- *
- * @return
- */
- @Override
- public Object placeAndRelHandle() {
- // 查询未处理的商超数据
- List<PlaceEntity> placeEntityList = baseMapper.placeAndRelHandle();
- // 处理
- for (PlaceEntity placeEntity : placeEntityList) {
- if (Strings.isBlank(placeEntity.getHouseCode())) {
- // 并生成36位的houseCode
- placeEntity.setHouseCode(IdUtils.getIdBy36());
- // 商超数据
- placeEntity.setSource(3);
- // 更新
- updateById(placeEntity);
- }
- }
- return null;
- }
-
- /**
- * 根据编号集合查询对应的场所(按颜色区分近多少天没有发过任务的场所)
- *
- * @param stringList
- * @param tableName
- * @return
- */
- @Override
- public List<PlaceVO> getPlaceListByParam(List<String> stringList, String tableName) {
- return baseMapper.getPlaceListByParam(stringList, tableName);
- }
-
- /**
- * 删除
- *
- * @param longs
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean removePlace(List<Long> longs) {
- // 删除场所负责人对应的用户
- removeUser(longs);
- // 删除
- boolean removeByIds = removeByIds(longs);
- // 删除对应的详情
- removePlaceExt(longs);
- // 删除对应的标签绑定信息
- removePlaceLabel(longs);
- // 删除对应的门牌绑定信息
- removePlaceDoor(longs);
- // 返回
- return removeByIds;
- }
-
- /**
- * 删除场所负责人对应的用户
- *
- * @param longs
- */
- public void removeUser(List<Long> longs) {
- // 遍历
- for (Long id : longs) {
- PlaceEntity placeEntity = getById(id);
- if (null != placeEntity.getPrincipalUserId()) {
- User user = userService.getById(placeEntity.getPrincipalUserId());
- // 查询场所判断是否还绑定有其他的场所
- QueryWrapper<PlaceEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("principal_user_id", user.getId());
- List<PlaceEntity> placeEntityList = list(queryWrapper);
- // 如果没有(1个 当前的还没有删除)
- if (placeEntityList.size() == 1) {
- // 判断角色
- if (!Strings.isBlank(user.getRoleId())) {
- // 判断是否还绑定其他的房屋,如果有,则不操作用户
- QueryWrapper<HouseholdEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("associated_user_id", user.getId());
- List<HouseholdEntity> householdEntityList = householdService.list(wrapper);
- // 即没有房屋和场所了就删除对应的居民角色
- if (householdEntityList.size() == 0) {
- List<String> stringList = Arrays.asList(user.getRoleId().split(","));
- // 查看当前用户的角色是否只有一个
- if (stringList.size() > 1) {
- // 查询是否对应有场所负责人,如果有则不删除,如果没有则删除对应的角色
- List<String> arrayList = new ArrayList<>();
- for (String roleId : stringList) {
- if (!roleId.equals("1717429059648606209")) {
- arrayList.add(roleId);
- }
- }
- user.setRoleId(StringUtils.join(arrayList, ","));
- // 更新用户
- userService.updateById(user);
- } else {
- // 删除当前用户
- userService.removeById(user.getId());
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * 删除场所对应的详情
- *
- * @param longs
- */
- public void removePlaceExt(List<Long> longs) {
- for (Long id : longs) {
- QueryWrapper<PlaceExtEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", id);
- placeExtService.remove(wrapper);
- }
- }
-
- /**
- * 删除对应的标签绑定信息
- *
- * @param longs
- */
- public void removePlaceLabel(List<Long> longs) {
- for (Long id : longs) {
- QueryWrapper<PlacePoiLabel> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", id);
- placePoiLabelService.remove(wrapper);
- }
- }
-
- /**
- * 删除对应的门牌绑定信息
- *
- * @param longs
- */
- public void removePlaceDoor(List<Long> longs) {
- for (Long id : longs) {
- QueryWrapper<PlaceDoorEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("place_id", id);
- placeDoorService.remove(wrapper);
- }
- }
-
- /**
- * 九小场所档案
- *
- * @param page
- * @param place
- * @return
- */
- @Override
- public IPage<PlaceVO> selectNinePlacePage(IPage<PlaceVO> page, PlaceVO place) {
-// String roleName = SpringUtils.getRequestParam("roleName");
-// String communityCode = SpringUtils.getRequestParam("communityCode");
-// if (!Strings.isBlank(communityCode)){
-// // 校验社区编号是否合规
-// if(null!=SpringUtils.getBean(IRegionService.class).getById(communityCode)) {
-// place.setCommunityCode(communityCode);
-// }
-// }
-// List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
-// Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2;
-// // 网格编号集合
-// List<String> gridCodeList = new ArrayList<>();
-// // 民警角色
-// if (!Strings.isBlank(roleName)){
-// place.setRoleName(roleName);
-// if(roleName.equals("mj")) {
-// regionChildCodesList = SpringUtil.getBean(IPoliceAffairsGridService.class).getCommunityCodeListByUserId(AuthUtil.getUserId());
-// }
-// if (roleName.equals("wgy")) {
-// gridCodeList = SpringUtil.getBean(IGridService.class).getGridListByUserId(AuthUtil.getUserId());
-// }
-// }
- CommonParamSet commonParamSet = new CommonParamSet().invoke(PlaceVO.class, place);
-
- List<String> strings = new ArrayList<>();
- if (null != place.getNineType()) {
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("dict_key", place.getNineType()).eq("code", "nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size() == 0) {
- strings.add(place.getNineType().toString());
- } else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- List<PlaceVO> placeVOS = baseMapper.selectNinePlacePage(page, place, commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator(), strings);
- // 返回
- return page.setRecords(placeVOS);
- }
-
- @Override
- public List<NinePlaceExcel> export(PlaceVO place) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(PlaceVO.class, place);
- List<String> strings = new ArrayList<>();
- if (null != place.getNineType()) {
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("dict_key", place.getNineType()).eq("code", "nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size() == 0) {
- strings.add(place.getNineType().toString());
- } else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- List<NinePlaceExcel> aa = baseMapper.export(place,
- commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(),
- strings);
- IDictBizService bean = SpringUtils.getBean(IDictBizService.class);
- List<DictBiz> nineType = bean.list(Wrappers.<DictBiz>lambdaQuery().eq(DictBiz::getCode, "nineType").eq(DictBiz::getIsDeleted, 0));
- for (NinePlaceExcel ninePlaceExcel : aa) {
- for (DictBiz dictBiz : nineType) {
- if (StringUtils.isNotBlank(ninePlaceExcel.getNineType()) && ninePlaceExcel.getNineType().equals(dictBiz.getDictKey())) {
- if (ninePlaceExcel.getNineType().contains("10,11,12")) {
- ninePlaceExcel.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue());
- } else if (ninePlaceExcel.getNineType().contains("13,14,15")) {
- ninePlaceExcel.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue());
- } else {
- ninePlaceExcel.setNineType(dictBiz.getDictValue());
- }
- }
- }
- }
- return aa;
- }
-
- /**
- * 场所警务网格处理
- */
- @Override
- public Object placeJwGridCodeHandle() {
- // 查询 警务网格为空的数据
- List<PlaceEntity> list = baseMapper.getPlaceNotJwGridCode();
- // 遍历
- for (PlaceEntity placeEntity : list) {
- if (!Strings.isBlank(placeEntity.getLng())) {
- // 空间分析
- //点坐标解析
- String point = "'POINT(" + placeEntity.getLng() + " " + placeEntity.getLat() + ")'";
- //String point = "'POINT(" + villageInfoExcel.getLatitude() + " " + villageInfoExcel.getLongitude() +")'";
- List<PoliceAffairsGridEntity> policeAffairsGridEntities
- = SpringUtil.getBean(IPoliceAffairsGridService.class).spatialAnalysis(point);
- if (policeAffairsGridEntities.size() > 0) {
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntities.get(0);
- placeEntity.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
- // 更新
- updateById(placeEntity);
- }
- }
- }
- return null;
- }
-
- /**
- * 场所综治网格处理
- */
- @Override
- public Object placeGridCodeHandle() {
- // 查询 综治网格为空的数据
- List<PlaceEntity> list = baseMapper.getPlaceNotGridCode();
- // 遍历
- for (PlaceEntity placeEntity : list) {
- if (!Strings.isBlank(placeEntity.getLng())) {
- // 空间分析
- //点坐标解析
- String point = "'POINT(" + placeEntity.getLng() + " " + placeEntity.getLat() + ")'";
- //String point = "'POINT(" + villageInfoExcel.getLatitude() + " " + villageInfoExcel.getLongitude() +")'";
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size() > 0) {
- GridEntity gridEntity = gridEntityList.get(0);
- placeEntity.setGridCode(gridEntity.getGridCode());
- // 更新
- updateById(placeEntity);
- }
- }
- }
- return null;
- }
-
- /**
- * 场所二维码绑定处理
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Object placeDoorBindHandle() {
- // 查询对应未的场所 house_code_binds 为空,source = 1 的
- List<PlaceEntity> list = baseMapper.selectPlaceNotDoorBindList();
- // 遍历
- for (PlaceEntity placeEntity : list) {
- // 更新
- placeEntity.setHouseCodeBinds(placeEntity.getHouseCode());
- updateById(placeEntity);
- // 查询绑定关系是否已存在
- QueryWrapper<PlaceDoorEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("house_code", placeEntity.getHouseCode()).eq("place_id", placeEntity.getId());
- // 查询
- PlaceDoorEntity one = placeDoorService.getOne(wrapper);
- if (null == one) {
- // 新增
- PlaceDoorEntity placeDoorEntity = new PlaceDoorEntity();
- placeDoorEntity.setPlaceId(placeEntity.getId());
- placeDoorEntity.setHouseCode(placeEntity.getHouseCode());
- placeDoorService.save(placeDoorEntity);
- }
- }
- return null;
- }
-
- /**
- * 企业商超列表查询
- */
- @Override
- public IPage<PlaceVO> selectMallPage(IPage<PlaceVO> page, PlaceVO place) {
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(PlaceVO.class, place);
- List<PlaceVO> placeVOS = baseMapper.selectMallPage(page,
- place,
- commonParamSet.getGridCodeList(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator());
- // 返回
- return page.setRecords(placeVOS);
- }
-
- /**
- * 查询所有场所数据
- *
- * @return
- */
- @Override
- public List<PlaceVO> getAllList(int i, int size) {
- return baseMapper.getAllList(i, size);
- }
-
- /**
- * 查询所有场所数据总数
- *
- * @return
- */
- @Override
- public int getAllListTotal() {
- return baseMapper.getAllListTotal();
- }
-
- /**
- * 查询对应的社区编号
- *
- * @param id
- * @return
- */
- @Override
- public String getCommunityCode(Long id) {
- return baseMapper.getCommunityCode(id);
- }
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java b/src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java
deleted file mode 100644
index 813d4b2..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import liquibase.pro.packaged.P;
-import liquibase.pro.packaged.S;
-import org.springblade.modules.grid.entity.GridPatrolRecordEntity;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.place.entity.PlacePoiLabel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 场所检查表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-27
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceCheckVO extends PlaceCheckEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 开始时间
- */
- private String startTime;
-
- /**
- * 结束时间
- */
- private String endTime;
-
-
- private List<PatrolRecord> patrolRecordVOList;
-
- private List<PlacePoiLabelVO> placePoiLabelVOList ;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "九小类型", example = "")
- private String nineType;
-
- @ApiModelProperty(value = "是否九小", example = "")
- private Integer isNine;
-
- private Long jpid;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlaceDoorVO.java b/src/main/java/org/springblade/modules/place/vo/PlaceDoorVO.java
deleted file mode 100644
index 655c1b4..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlaceDoorVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.vo;
-
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所门牌关联表 视图实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceDoorVO extends PlaceDoorEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java b/src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java
deleted file mode 100644
index c341269..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 场所详情表 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceExtVO extends PlaceExtEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 场所名称
- */
- private String placeName;
-
- /**
- * 场所位置
- */
- @ApiModelProperty(value = "场所位置")
- private String location;
-
- /**
- * 经度
- */
- private String lng;
-
- /**
- * 纬度
- */
- private String lat;
-
- /**
- * 地址编码
- */
- private String houseCode;
-
- /**
- * 角色名称
- */
- private String neiCode;
-
- /**
- * 从业人员
- */
- private List<PlacePractitionerEntity> placePractitioner = new ArrayList<>();
-
- @ApiModelProperty("开始时间")
- private String startTime;
-
- @ApiModelProperty("结束时间")
- private String endTime;
-
-// private String communityCode;
-
- /**
- * isApp
- */
- private Integer isApp;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlacePoiLabelVO.java b/src/main/java/org/springblade/modules/place/vo/PlacePoiLabelVO.java
deleted file mode 100644
index 9e78322..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlacePoiLabelVO.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.springblade.modules.place.vo;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.modules.place.entity.PlacePoiLabel;
-
-import java.io.Serializable;
-
-/**
- * 场所标签中间表
- */
-@Data
-public class PlacePoiLabelVO extends PlacePoiLabel {
- private static final long serialVersionUID = 1L;
-
- /**
- * 标签名称
- */
- private String labelName;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java b/src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java
deleted file mode 100644
index 450c211..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import liquibase.pro.packaged.S;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所从业人员 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlacePractitionerVO extends PlacePractitionerEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "类型1:未成年 2:少数民族 3:包含1和2", example = "")
- private Integer type;
-
- @ApiModelProperty(value = "标签类型", example = "")
- private String categoryName;
-
- /**
- * 工作单位
- */
- private String employer;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlaceRelVO.java b/src/main/java/org/springblade/modules/place/vo/PlaceRelVO.java
deleted file mode 100644
index 2080487..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlaceRelVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.vo;
-
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 场所区域关联信息表(商超) 视图实体类
- *
- * @author BladeX
- * @since 2023-11-20
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceRelVO extends PlaceRelEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlaceVO.java b/src/main/java/org/springblade/modules/place/vo/PlaceVO.java
deleted file mode 100644
index edd5fa0..0000000
--- a/src/main/java/org/springblade/modules/place/vo/PlaceVO.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
-import org.springblade.modules.grid.vo.GridVO;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.entity.PlacePoiLabel;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 场所表 视图实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PlaceVO extends PlaceEntity {
- private static final long serialVersionUID = 1L;
-
-
- private String label;
-
- private String username;
-
- private String phone;
-
-
- /**
- * 类型 2:非小区(能关联地址表) 3:商超
- */
- private Integer addressType;
-
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过")
- private Integer confirmFlag;
-
- /**
- * 采集人姓名
- */
- private String createUserName;
-
- /**
- * 1: 待完善 2:已完善
- */
- private Integer isPerfect;
-
- /**
- * 门牌地址信息
- */
- private DoorplateAddressEntity doorplateAddressEntity;
-
- /**
- * 网格数据
- */
- private GridVO grid;
-
- /**
- * 场所标签关联表
- */
- private List<PlacePoiLabelVO> placePoiLabelVOList = new ArrayList<>();
-
- /**
- * 街道名称
- */
- private String townStreetName;
- /**
- * 社区名称
- */
- private String neiName;
-
- /**
- * 社区编号
- */
- private String neiCode;
-
- /**
- * 网格名称
- */
- private String gridName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 详情id(维护)
- */
- private Long placeExtId;
-
- /**
- * 门牌地址信息
- */
- private PlaceExtEntity placeExtEntity;
-
- /**
- * 颜色
- */
- private String color;
-
- /**
- * 网格id
- */
- private Integer gridId;
-
- /**
- * 采集人实时经度
- */
- private String x;
-
- /**
- * 采集人实时纬度
- */
- private String y;
-
- @ApiModelProperty(value = "警察名称")
- private String policeName;
-
- @ApiModelProperty(value = "警察电话")
- private String policePhone;
-
- @ApiModelProperty(value = "机构名称")
- private String deptName;
- @ApiModelProperty(value = "地址")
- private String addressName;
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 房屋绑定
- */
- private List<Map<String,Object>> houseBindList = new ArrayList<>();
-
- /**
- * 从业人员
- */
- private List<PlacePractitionerEntity> placePractitioner = new ArrayList<>();
-
-}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java
deleted file mode 100644
index 4d3c32d..0000000
--- a/src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.place.entity.PlaceCheckEntity;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import java.util.Objects;
-
-/**
- * 场所检查表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-27
- */
-public class PlaceCheckWrapper extends BaseEntityWrapper<PlaceCheckEntity, PlaceCheckVO> {
-
- public static PlaceCheckWrapper build() {
- return new PlaceCheckWrapper();
- }
-
- @Override
- public PlaceCheckVO entityVO(PlaceCheckEntity placeCheck) {
- PlaceCheckVO placeCheckVO = Objects.requireNonNull(BeanUtil.copy(placeCheck, PlaceCheckVO.class));
-
- //User createUser = UserCache.getUser(placeCheck.getCreateUser());
- //User updateUser = UserCache.getUser(placeCheck.getUpdateUser());
- //placeCheckVO.setCreateUserName(createUser.getName());
- //placeCheckVO.setUpdateUserName(updateUser.getName());
-
- return placeCheckVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlaceDoorWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlaceDoorWrapper.java
deleted file mode 100644
index 0c58dad..0000000
--- a/src/main/java/org/springblade/modules/place/wrapper/PlaceDoorWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.place.entity.PlaceDoorEntity;
-import org.springblade.modules.place.vo.PlaceDoorVO;
-import java.util.Objects;
-
-/**
- * 场所门牌关联表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public class PlaceDoorWrapper extends BaseEntityWrapper<PlaceDoorEntity, PlaceDoorVO> {
-
- public static PlaceDoorWrapper build() {
- return new PlaceDoorWrapper();
- }
-
- @Override
- public PlaceDoorVO entityVO(PlaceDoorEntity placeDoor) {
- PlaceDoorVO placeDoorVO = Objects.requireNonNull(BeanUtil.copy(placeDoor, PlaceDoorVO.class));
-
- //User createUser = UserCache.getUser(placeDoor.getCreateUser());
- //User updateUser = UserCache.getUser(placeDoor.getUpdateUser());
- //placeDoorVO.setCreateUserName(createUser.getName());
- //placeDoorVO.setUpdateUserName(updateUser.getName());
-
- return placeDoorVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlaceExtWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlaceExtWrapper.java
deleted file mode 100644
index d904fe9..0000000
--- a/src/main/java/org/springblade/modules/place/wrapper/PlaceExtWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.place.entity.PlaceExtEntity;
-import org.springblade.modules.place.vo.PlaceExtVO;
-import java.util.Objects;
-
-/**
- * 场所详情表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class PlaceExtWrapper extends BaseEntityWrapper<PlaceExtEntity, PlaceExtVO> {
-
- public static PlaceExtWrapper build() {
- return new PlaceExtWrapper();
- }
-
- @Override
- public PlaceExtVO entityVO(PlaceExtEntity placeExt) {
- PlaceExtVO placeExtVO = Objects.requireNonNull(BeanUtil.copy(placeExt, PlaceExtVO.class));
-
- //User createUser = UserCache.getUser(placeExt.getCreateUser());
- //User updateUser = UserCache.getUser(placeExt.getUpdateUser());
- //placeExtVO.setCreateUserName(createUser.getName());
- //placeExtVO.setUpdateUserName(updateUser.getName());
-
- return placeExtVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlacePractitionerWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlacePractitionerWrapper.java
deleted file mode 100644
index 5a8a489..0000000
--- a/src/main/java/org/springblade/modules/place/wrapper/PlacePractitionerWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.place.entity.PlacePractitionerEntity;
-import org.springblade.modules.place.vo.PlacePractitionerVO;
-import java.util.Objects;
-
-/**
- * 场所从业人员 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class PlacePractitionerWrapper extends BaseEntityWrapper<PlacePractitionerEntity, PlacePractitionerVO> {
-
- public static PlacePractitionerWrapper build() {
- return new PlacePractitionerWrapper();
- }
-
- @Override
- public PlacePractitionerVO entityVO(PlacePractitionerEntity placePractitioner) {
- PlacePractitionerVO placePractitionerVO = Objects.requireNonNull(BeanUtil.copy(placePractitioner, PlacePractitionerVO.class));
-
- //User createUser = UserCache.getUser(placePractitioner.getCreateUser());
- //User updateUser = UserCache.getUser(placePractitioner.getUpdateUser());
- //placePractitionerVO.setCreateUserName(createUser.getName());
- //placePractitionerVO.setUpdateUserName(updateUser.getName());
-
- return placePractitionerVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlaceRelWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlaceRelWrapper.java
deleted file mode 100644
index 4b73ec0..0000000
--- a/src/main/java/org/springblade/modules/place/wrapper/PlaceRelWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.place.entity.PlaceRelEntity;
-import org.springblade.modules.place.vo.PlaceRelVO;
-import java.util.Objects;
-
-/**
- * 场所区域关联信息表(商超) 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-20
- */
-public class PlaceRelWrapper extends BaseEntityWrapper<PlaceRelEntity, PlaceRelVO> {
-
- public static PlaceRelWrapper build() {
- return new PlaceRelWrapper();
- }
-
- @Override
- public PlaceRelVO entityVO(PlaceRelEntity placeRel) {
- PlaceRelVO placeRelVO = Objects.requireNonNull(BeanUtil.copy(placeRel, PlaceRelVO.class));
-
- //User createUser = UserCache.getUser(placeRel.getCreateUser());
- //User updateUser = UserCache.getUser(placeRel.getUpdateUser());
- //placeRelVO.setCreateUserName(createUser.getName());
- //placeRelVO.setUpdateUserName(updateUser.getName());
-
- return placeRelVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlaceWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlaceWrapper.java
deleted file mode 100644
index eb58925..0000000
--- a/src/main/java/org/springblade/modules/place/wrapper/PlaceWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.place.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.vo.PlaceVO;
-import java.util.Objects;
-
-/**
- * 场所表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-10-28
- */
-public class PlaceWrapper extends BaseEntityWrapper<PlaceEntity, PlaceVO> {
-
- public static PlaceWrapper build() {
- return new PlaceWrapper();
- }
-
- @Override
- public PlaceVO entityVO(PlaceEntity place) {
- PlaceVO placeVO = Objects.requireNonNull(BeanUtil.copy(place, PlaceVO.class));
-
- //User createUser = UserCache.getUser(place.getCreateUser());
- //User updateUser = UserCache.getUser(place.getUpdateUser());
- //placeVO.setCreateUserName(createUser.getName());
- //placeVO.setUpdateUserName(updateUser.getName());
-
- return placeVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/controller/PolicTrajectoryPointController.java b/src/main/java/org/springblade/modules/police/controller/PolicTrajectoryPointController.java
deleted file mode 100644
index a6013d2..0000000
--- a/src/main/java/org/springblade/modules/police/controller/PolicTrajectoryPointController.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import org.springblade.modules.police.vo.PolicTrajectoryPointVO;
-import org.springblade.modules.police.wrapper.PolicTrajectoryPointWrapper;
-import org.springblade.modules.police.service.IPolicTrajectoryPointService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 用户轨迹记录 控制器
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-policTrajectoryPoint/policTrajectoryPoint")
-@Api(value = "用户轨迹记录", tags = "用户轨迹记录接口")
-public class PolicTrajectoryPointController extends BladeController {
-
- private final IPolicTrajectoryPointService policTrajectoryPointService;
-
- /**
- * 用户轨迹记录 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入policTrajectoryPoint")
- public R<PolicTrajectoryPointVO> detail(PolicTrajectoryPointEntity policTrajectoryPoint) {
- PolicTrajectoryPointEntity detail = policTrajectoryPointService.getOne(Condition.getQueryWrapper(policTrajectoryPoint));
- return R.data(PolicTrajectoryPointWrapper.build().entityVO(detail));
- }
- /**
- * 用户轨迹记录 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入policTrajectoryPoint")
- public R<IPage<PolicTrajectoryPointVO>> list(PolicTrajectoryPointEntity policTrajectoryPoint, Query query) {
- IPage<PolicTrajectoryPointEntity> pages = policTrajectoryPointService.page(Condition.getPage(query), Condition.getQueryWrapper(policTrajectoryPoint));
- return R.data(PolicTrajectoryPointWrapper.build().pageVO(pages));
- }
-
- /**
- * 用户轨迹记录 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入policTrajectoryPoint")
- public R<IPage<PolicTrajectoryPointVO>> page(PolicTrajectoryPointVO policTrajectoryPoint, Query query) {
- IPage<PolicTrajectoryPointVO> pages = policTrajectoryPointService.selectPolicTrajectoryPointPage(Condition.getPage(query), policTrajectoryPoint);
- return R.data(pages);
- }
-
- /**
- * 用户轨迹记录 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入policTrajectoryPoint")
- public R save(@Valid @RequestBody PolicTrajectoryPointEntity policTrajectoryPoint) {
- return R.status(policTrajectoryPointService.save(policTrajectoryPoint));
- }
-
- /**
- * 用户轨迹记录 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入policTrajectoryPoint")
- public R update(@Valid @RequestBody PolicTrajectoryPointEntity policTrajectoryPoint) {
- return R.status(policTrajectoryPointService.updateById(policTrajectoryPoint));
- }
-
- /**
- * 用户轨迹记录 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入policTrajectoryPoint")
- public R submit(@Valid @RequestBody PolicTrajectoryPointEntity policTrajectoryPoint) {
- return R.status(policTrajectoryPointService.saveOrUpdate(policTrajectoryPoint));
- }
-
- /**
- * 用户轨迹记录 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(policTrajectoryPointService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/controller/PoliceAffairsGridController.java b/src/main/java/org/springblade/modules/police/controller/PoliceAffairsGridController.java
deleted file mode 100644
index 1932858..0000000
--- a/src/main/java/org/springblade/modules/police/controller/PoliceAffairsGridController.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.police.excel.PoliceAffairsGridExcel;
-import org.springblade.modules.police.excel.PoliceAffairsGridImporter;
-import org.springblade.modules.police.excel.PoliceStationExcel;
-import org.springblade.modules.police.excel.PoliceStationImporter;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.vo.PoliceAffairsGridVO;
-import org.springblade.modules.police.wrapper.PoliceAffairsGridWrapper;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 警务网格(辖区)表 控制器
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-policeAffairsGrid/policeAffairsGrid")
-@Api(value = "警务网格(辖区)表", tags = "警务网格(辖区)表接口")
-public class PoliceAffairsGridController {
-
- private final IPoliceAffairsGridService policeAffairsGridService;
-
- /**
- * 警务网格(辖区)表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入policeAffairsGrid")
- public R<PoliceAffairsGridEntity> detail(PoliceAffairsGridEntity policeAffairsGrid) {
- PoliceAffairsGridEntity detail = policeAffairsGridService.getOne(Condition.getQueryWrapper(policeAffairsGrid));
- return R.data(detail);
- }
- /**
- * 警务网格(辖区)表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入policeAffairsGrid")
- public R<IPage<PoliceAffairsGridVO>> list(PoliceAffairsGridEntity policeAffairsGrid, Query query) {
- IPage<PoliceAffairsGridEntity> pages = policeAffairsGridService.page(Condition.getPage(query), Condition.getQueryWrapper(policeAffairsGrid));
- return R.data(PoliceAffairsGridWrapper.build().pageVO(pages));
- }
-
- /**
- * 警务网格(辖区)表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入policeAffairsGrid")
- public R<IPage<PoliceAffairsGridVO>> page(PoliceAffairsGridVO policeAffairsGrid, Query query) {
- IPage<PoliceAffairsGridVO> pages = policeAffairsGridService.selectPoliceAffairsGridPage(Condition.getPage(query), policeAffairsGrid);
- return R.data(pages);
- }
-
- /**
- * 警务网格(辖区)表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入policeAffairsGrid")
- public R save(@Valid @RequestBody PoliceAffairsGridEntity policeAffairsGrid) {
- return R.status(policeAffairsGridService.save(policeAffairsGrid));
- }
-
- /**
- * 警务网格(辖区)表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入policeAffairsGrid")
- public R update(@Valid @RequestBody PoliceAffairsGridEntity policeAffairsGrid) {
- return R.status(policeAffairsGridService.updateById(policeAffairsGrid));
- }
-
- /**
- * 警务网格(辖区)表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入policeAffairsGrid")
- public R submit(@Valid @RequestBody PoliceAffairsGridEntity policeAffairsGrid) {
- return R.status(policeAffairsGridService.saveOrUpdate(policeAffairsGrid));
- }
-
- /**
- * 警务网格(辖区)表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(policeAffairsGridService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 导入警务辖区数据
- */
- @PostMapping("/import-policeAffairsGrid")
- public R importPoliceAffairsGrid(MultipartFile file, Integer isCovered) {
- PoliceAffairsGridImporter policeAffairsGridImporter = new PoliceAffairsGridImporter(policeAffairsGridService, isCovered == 1);
- ExcelUtil.save(file, policeAffairsGridImporter, PoliceAffairsGridExcel.class);
- return R.success("操作成功");
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/controller/PoliceAlarmRecordsController.java b/src/main/java/org/springblade/modules/police/controller/PoliceAlarmRecordsController.java
deleted file mode 100644
index 57ab702..0000000
--- a/src/main/java/org/springblade/modules/police/controller/PoliceAlarmRecordsController.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-import org.springblade.modules.police.vo.PoliceAlarmRecordsVO;
-import org.springblade.modules.police.wrapper.PoliceAlarmRecordsWrapper;
-import org.springblade.modules.police.service.IPoliceAlarmRecordsService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 报警记录 控制器
- *
- * @author BladeX
- * @since 2024-03-13
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-policeAlarmRecords/policeAlarmRecords")
-@Api(value = "报警记录", tags = "报警记录接口")
-public class PoliceAlarmRecordsController extends BladeController {
-
- private final IPoliceAlarmRecordsService policeAlarmRecordsService;
- private final BladeLogger bladeLogger;
-
- /**
- * 报警记录 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入policeAlarmRecords")
- public R detail(PoliceAlarmRecordsEntity policeAlarmRecords) {
- PoliceAlarmRecordsEntity detail = policeAlarmRecordsService.getOne(Condition.getQueryWrapper(policeAlarmRecords));
- return R.data(detail);
- }
- /**
- * 报警记录 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入policeAlarmRecords")
- public R<IPage<PoliceAlarmRecordsVO>> list(PoliceAlarmRecordsEntity policeAlarmRecords, Query query) {
- IPage<PoliceAlarmRecordsEntity> pages = policeAlarmRecordsService.page(Condition.getPage(query), Condition.getQueryWrapper(policeAlarmRecords));
- return R.data(PoliceAlarmRecordsWrapper.build().pageVO(pages));
- }
-
- /**
- * 报警记录 自定义分页
- */
- @GetMapping("/page")
- @ApiLog("报警记录 自定义分页")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入policeAlarmRecords")
- public R<IPage<PoliceAlarmRecordsVO>> page(PoliceAlarmRecordsVO policeAlarmRecords, Query query) {
- bladeLogger.info("报警记录 自定义分页", JsonUtil.toJson(policeAlarmRecords));
- IPage<PoliceAlarmRecordsVO> pages = policeAlarmRecordsService.selectPoliceAlarmRecordsPage(Condition.getPage(query), policeAlarmRecords);
- return R.data(pages);
- }
-
- /**
- * 报警记录 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("报警记录 新增")
- @ApiOperation(value = "新增", notes = "传入policeAlarmRecords")
- public R save(@Valid @RequestBody PoliceAlarmRecordsEntity policeAlarmRecords) {
- bladeLogger.info("报警记录 新增", JsonUtil.toJson(policeAlarmRecords));
- return R.status(policeAlarmRecordsService.savePoliceAlarmRecordsEntity(policeAlarmRecords));
- }
-
- /**
- * 报警记录 修改
- */
- @PostMapping("/update")
- @ApiLog("报警记录 修改")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入policeAlarmRecords")
- public R update(@Valid @RequestBody PoliceAlarmRecordsEntity policeAlarmRecords) {
- bladeLogger.info("报警记录 修改", JsonUtil.toJson(policeAlarmRecords));
- return R.status(policeAlarmRecordsService.updateById(policeAlarmRecords));
- }
-
- /**
- * 报警记录 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入policeAlarmRecords")
- public R submit(@Valid @RequestBody PoliceAlarmRecordsEntity policeAlarmRecords) {
- return R.status(policeAlarmRecordsService.saveOrUpdate(policeAlarmRecords));
- }
-
- /**
- * 报警记录 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("报警记录 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("报警记录 删除", JsonUtil.toJson(ids));
- return R.status(policeAlarmRecordsService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/controller/PoliceStationController.java b/src/main/java/org/springblade/modules/police/controller/PoliceStationController.java
deleted file mode 100644
index 3dc9460..0000000
--- a/src/main/java/org/springblade/modules/police/controller/PoliceStationController.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.springblade.modules.police.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.police.excel.PoliceStationExcel;
-import org.springblade.modules.police.excel.PoliceStationImporter;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.modules.police.vo.PoliceStationVO;
-import org.springblade.modules.police.wrapper.PoliceStationWrapper;
-import org.springblade.modules.police.service.IPoliceStationService;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 派出所信息表 控制器
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-policeStation/policeStation")
-@Api(value = "派出所信息表", tags = "派出所信息表接口")
-public class PoliceStationController{
-
- private final IPoliceStationService policeStationService;
-
- /**
- * 派出所信息表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入policeStation")
- public R<PoliceStationVO> detail(PoliceStationEntity policeStation) {
- PoliceStationEntity detail = policeStationService.getOne(Condition.getQueryWrapper(policeStation));
- return R.data(PoliceStationWrapper.build().entityVO(detail));
- }
- /**
- * 派出所信息表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入policeStation")
- public R<IPage<PoliceStationVO>> list(PoliceStationEntity policeStation, Query query) {
- IPage<PoliceStationEntity> pages = policeStationService.page(Condition.getPage(query), Condition.getQueryWrapper(policeStation));
- return R.data(PoliceStationWrapper.build().pageVO(pages));
- }
-
- /**
- * 派出所信息表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入policeStation")
- public R<IPage<PoliceStationVO>> page(PoliceStationVO policeStation, Query query) {
- IPage<PoliceStationVO> pages = policeStationService.selectPoliceStationPage(Condition.getPage(query), policeStation);
- return R.data(pages);
- }
-
- /**
- * 派出所信息表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入policeStation")
- public R save(@Valid @RequestBody PoliceStationEntity policeStation) {
- return R.status(policeStationService.save(policeStation));
- }
-
- /**
- * 派出所信息表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入policeStation")
- public R update(@Valid @RequestBody PoliceStationEntity policeStation) {
- return R.status(policeStationService.updateById(policeStation));
- }
-
- /**
- * 派出所信息表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入policeStation")
- public R submit(@Valid @RequestBody PoliceStationEntity policeStation) {
- return R.status(policeStationService.saveOrUpdate(policeStation));
- }
-
- /**
- * 派出所信息表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(policeStationService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 导入派出所数据
- */
- @PostMapping("/import-policeStation")
- public R importPoliceStation(MultipartFile file, Integer isCovered) {
- PoliceStationImporter policeStationImporter = new PoliceStationImporter(policeStationService, isCovered == 1);
- ExcelUtil.save(file, policeStationImporter, PoliceStationExcel.class);
- return R.success("操作成功");
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/dto/PolicTrajectoryPointDTO.java b/src/main/java/org/springblade/modules/police/dto/PolicTrajectoryPointDTO.java
deleted file mode 100644
index 517c79b..0000000
--- a/src/main/java/org/springblade/modules/police/dto/PolicTrajectoryPointDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.dto;
-
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 用户轨迹记录 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PolicTrajectoryPointDTO extends PolicTrajectoryPointEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/dto/PoliceAffairsGridDTO.java b/src/main/java/org/springblade/modules/police/dto/PoliceAffairsGridDTO.java
deleted file mode 100644
index 15fa2c1..0000000
--- a/src/main/java/org/springblade/modules/police/dto/PoliceAffairsGridDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.dto;
-
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 警务网格(辖区)表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PoliceAffairsGridDTO extends PoliceAffairsGridEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/dto/PoliceAlarmRecordsDTO.java b/src/main/java/org/springblade/modules/police/dto/PoliceAlarmRecordsDTO.java
deleted file mode 100644
index 03dbbf9..0000000
--- a/src/main/java/org/springblade/modules/police/dto/PoliceAlarmRecordsDTO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.police.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-
-/**
- * 报警记录 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-13
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PoliceAlarmRecordsDTO extends PoliceAlarmRecordsEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/dto/PoliceStationDTO.java b/src/main/java/org/springblade/modules/police/dto/PoliceStationDTO.java
deleted file mode 100644
index 734a269..0000000
--- a/src/main/java/org/springblade/modules/police/dto/PoliceStationDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.dto;
-
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 派出所信息表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PoliceStationDTO extends PoliceStationEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/entity/PolicTrajectoryPointEntity.java b/src/main/java/org/springblade/modules/police/entity/PolicTrajectoryPointEntity.java
deleted file mode 100644
index 3eeba29..0000000
--- a/src/main/java/org/springblade/modules/police/entity/PolicTrajectoryPointEntity.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 用户轨迹记录 实体类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Data
-@TableName("jczz_polic_trajectory_point")
-@ApiModel(value = "PolicTrajectoryPoint对象", description = "用户轨迹记录")
-
-public class PolicTrajectoryPointEntity {
-
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 用户id */
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("latitude")
- private Double latitude;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("longitude")
- private Double longitude;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 速度,单位 m/s */
- @ApiModelProperty(value = "速度,单位 m/s", example = "")
- @TableField("speed")
- private Double speed;
-
- /** 位置的精确度 */
- @ApiModelProperty(value = "位置的精确度", example = "")
- @TableField("accuracy")
- private Double accuracy;
-
- /** 高度,单位 m */
- @ApiModelProperty(value = "高度,单位 m", example = "")
- @TableField("altitude")
- private Double altitude;
-
- /** 垂直精度,单位 m(Android 无法获取,返回 0) */
- @ApiModelProperty(value = "垂直精度,单位 m(Android 无法获取,返回 0)", example = "")
- @TableField("verticalAccuracy")
- private Double verticalAccuracy;
-
- /** 水平精度,单位 m */
- @ApiModelProperty(value = "水平精度,单位 m", example = "")
- @TableField("horizontalAccuracy")
- private Double horizontalAccuracy;
-}
diff --git a/src/main/java/org/springblade/modules/police/entity/PoliceAffairsGridEntity.java b/src/main/java/org/springblade/modules/police/entity/PoliceAffairsGridEntity.java
deleted file mode 100644
index bd39c48..0000000
--- a/src/main/java/org/springblade/modules/police/entity/PoliceAffairsGridEntity.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.springblade.modules.police.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.io.Serializable;
-import java.util.Date;
-
-import org.springblade.modules.grid.handle.GeometryTypeHandler;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 警务网格(辖区)表 实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@TableName("jczz_police_affairs_grid")
-@ApiModel(value = "PoliceAffairsGrid对象", description = "警务网格(辖区)表")
-public class PoliceAffairsGridEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
- /**
- * 警务网格编号
- */
- @ApiModelProperty(value = "警务网格编号")
- private String jwGridCode;
- /**
- * 派出所编号
- */
- @ApiModelProperty(value = "派出所编号")
- private String pcsCode;
- /**
- * 派出所名称
- */
- @ApiModelProperty(value = "派出所名称")
- private String pcsName;
-
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String communityCode;
- /**
- * 社区名称
- */
- @ApiModelProperty(value = "社区名称")
- private String communityName;
- /**
- * 民警用户id
- */
- @ApiModelProperty(value = "民警用户id")
- private String policeUserId;
-
- /*
- * 警务网格面数据
- * @TableField(typeHandler = GeometryTypeHandler.class) 操作面的时候用,平时注释掉
- */
- @ApiModelProperty(value = "警务网格面数据")
-// @TableField(typeHandler = GeometryTypeHandler.class)
- private String geom;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.UPDATE)
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/entity/PoliceAlarmRecordsEntity.java b/src/main/java/org/springblade/modules/police/entity/PoliceAlarmRecordsEntity.java
deleted file mode 100644
index caaa120..0000000
--- a/src/main/java/org/springblade/modules/police/entity/PoliceAlarmRecordsEntity.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 报警记录 实体类
- *
- * @author BladeX
- * @since 2024-03-13
- */
-@Data
-@TableName("jczz_police_alarm_records")
-@ApiModel(value = "PoliceAlarmRecords对象", description = "报警记录")
-public class PoliceAlarmRecordsEntity {
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 房屋编码 */
- @ApiModelProperty(value = "房屋编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 地址 */
- @ApiModelProperty(value = "地址", example = "")
- @TableField("address")
- private String address;
-
- /** 报警人名称 */
- @ApiModelProperty(value = "报警人名称", example = "")
- @TableField("name")
- private String name;
-
- /** 报警人电话 */
- @ApiModelProperty(value = "报警人电话", example = "")
- @TableField("phone")
- private String phone;
-
- /** (刑事案件、治安案件、纠纷、救助、举报) */
- @ApiModelProperty(value = "(刑事案件、治安案件、纠纷、救助、举报)", example = "")
- @TableField("alarm_type")
- private String alarmType;
-
- /** 0:否 1:是 是否受伤 */
- @ApiModelProperty(value = "0:否 1:是 是否受伤 ", example = "")
- @TableField("injury_flag")
- private Integer injuryFlag;
-
- /** 网格编码 */
- @ApiModelProperty(value = "网格编码", example = "")
- @TableField("grid_code")
- private String gridCode;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 接警人id */
- @ApiModelProperty(value = "接警人id", example = "")
- @TableField("police_id")
- private Long policeId;
-
- /** 接警人名称 */
- @ApiModelProperty(value = "接警人名称", example = "")
- @TableField("police_name")
- private String policeName;
-
- /** 接警人电话 */
- @ApiModelProperty(value = "接警人电话", example = "")
- @TableField("police_phone")
- private String policePhone;
-
- /** 0:否 1:是 */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 性别 */
- @ApiModelProperty(value = "性别", example = "")
- @TableField("gender")
- private Integer gender;
-
- /** 警务网格编码 */
- @ApiModelProperty(value = "警务网格编码", example = "")
- @TableField("jw_grid_code")
- private String jwGridCode;
-
- /** 接警时间 */
- @ApiModelProperty(value = "接警时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("alarm_response_time")
- private Date alarmResponseTime;
-
- /** 报警内容 */
- @ApiModelProperty(value = "报警内容", example = "")
- @TableField("alarm_describe")
- private String alarmDescribe;
-
- /** 公安事件:1:否 2:是 */
- @ApiModelProperty(value = "公安事件:1:否 2:是", example = "")
- @TableField("public_incidents")
- private Integer publicIncidents;
-
- /** 1:待处置 2:已处置 */
- @ApiModelProperty(value = "1:待处置 2:已处置", example = "")
- @TableField("status")
- private Integer status;
-
- /** 经度 */
- @ApiModelProperty(value = "经度", example = "")
- @TableField("longitude")
- private String longitude;
-
- /** 纬度 */
- @ApiModelProperty(value = "纬度", example = "")
- @TableField("latitude")
- private String latitude;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/entity/PoliceStationEntity.java b/src/main/java/org/springblade/modules/police/entity/PoliceStationEntity.java
deleted file mode 100644
index d41f523..0000000
--- a/src/main/java/org/springblade/modules/police/entity/PoliceStationEntity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.springblade.modules.police.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.io.Serializable;
-import java.util.Date;
-
-import org.springblade.modules.grid.handle.GeometryTypeHandler;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 派出所信息表 实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@TableName("jczz_police_station")
-@ApiModel(value = "PoliceStation对象", description = "派出所信息表")
-public class PoliceStationEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 编号
- */
- @ApiModelProperty(value = "编号")
- private String code;
- /**
- * 名称
- */
- @ApiModelProperty(value = "名称")
- private String name;
- /**
- * 父级编号
- */
- @ApiModelProperty(value = "父级编号")
- private String parentCode;
- /*
- * 辖区面数据
- * @TableField(typeHandler = GeometryTypeHandler.class) 操作面的时候用,平时注释掉
- */
- @ApiModelProperty(value = "辖区面数据")
-// @TableField(typeHandler = GeometryTypeHandler.class)
- private String geom;
- /**
- * 排序
- */
- @ApiModelProperty(value = "排序")
- private Integer sort;
-
- /**
- * 层级
- */
- @ApiModelProperty(value = "层级")
- private Integer level;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.UPDATE)
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/excel/PoliceAffairsGridExcel.java b/src/main/java/org/springblade/modules/police/excel/PoliceAffairsGridExcel.java
deleted file mode 100644
index 879944b..0000000
--- a/src/main/java/org/springblade/modules/police/excel/PoliceAffairsGridExcel.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.springblade.modules.police.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import java.io.Serializable;
-
-/**
- * GridExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class PoliceAffairsGridExcel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @ColumnWidth(15)
- @ExcelProperty("社区名称")
- private String communityName;
-
- @ColumnWidth(15)
- @ExcelProperty("社区编号")
- private String communityCode;
-
- @ColumnWidth(15)
- @ExcelProperty("派出所名称")
- private String pcsName;
-
- @ColumnWidth(15)
- @ExcelProperty("民警姓名")
- private String policeman;
-
- @ColumnWidth(15)
- @ExcelProperty("民警联系方式")
- private String policemanPhone;
-
- @ColumnWidth(15)
- @ExcelProperty("警务室代码")
- private String jwGridCode;
-
- @ColumnWidth(100)
- @ExcelProperty("区域")
- private String geom;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/excel/PoliceAffairsGridImporter.java b/src/main/java/org/springblade/modules/police/excel/PoliceAffairsGridImporter.java
deleted file mode 100644
index 2283643..0000000
--- a/src/main/java/org/springblade/modules/police/excel/PoliceAffairsGridImporter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.modules.police.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-
-import java.util.List;
-
-/**
- * 警务辖区导入类
- *
- * @author zhongrj
- */
-@RequiredArgsConstructor
-public class PoliceAffairsGridImporter implements ExcelImporter<PoliceAffairsGridExcel> {
-
- private final IPoliceAffairsGridService policeAffairsGridService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<PoliceAffairsGridExcel> data) {
- policeAffairsGridService.importPoliceAffairsGrid(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/police/excel/PoliceStationExcel.java b/src/main/java/org/springblade/modules/police/excel/PoliceStationExcel.java
deleted file mode 100644
index 5ed293b..0000000
--- a/src/main/java/org/springblade/modules/police/excel/PoliceStationExcel.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.springblade.modules.police.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import java.io.Serializable;
-
-/**
- * GridExcel
- *
- * @author Chill
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class PoliceStationExcel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @ColumnWidth(15)
- @ExcelProperty("派出所名称")
- private String name;
-
- @ColumnWidth(15)
- @ExcelProperty("派出所编号")
- private String code;
-
- @ColumnWidth(100)
- @ExcelProperty("区域")
- private String geom;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/excel/PoliceStationImporter.java b/src/main/java/org/springblade/modules/police/excel/PoliceStationImporter.java
deleted file mode 100644
index 7a5e8f4..0000000
--- a/src/main/java/org/springblade/modules/police/excel/PoliceStationImporter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.modules.police.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.police.service.IPoliceStationService;
-
-import java.util.List;
-
-/**
- * 派出所数据导入类
- *
- * @author zhongrj
- */
-@RequiredArgsConstructor
-public class PoliceStationImporter implements ExcelImporter<PoliceStationExcel> {
-
- private final IPoliceStationService policeStationService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<PoliceStationExcel> data) {
- policeStationService.importPoliceStation(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.java b/src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.java
deleted file mode 100644
index b9a1773..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.mapper;
-
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.police.dto.PolicTrajectoryPointDTO;
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import org.springblade.modules.police.vo.PolicTrajectoryPointVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 用户轨迹记录 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-02
- */
-public interface PolicTrajectoryPointMapper extends BaseMapper<PolicTrajectoryPointEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policTrajectoryPoint
- * @return
- */
- List<PolicTrajectoryPointVO> selectPolicTrajectoryPointPage(IPage page, @Param("policTrajectoryPoint") PolicTrajectoryPointVO policTrajectoryPoint);
- /**
- * 查询用户轨迹记录
- *
- * @param id 用户轨迹记录ID
- * @return 用户轨迹记录
- */
- public PolicTrajectoryPointDTO selectPolicTrajectoryPointById(Long id);
-
- /**
- * 查询用户轨迹记录列表
- *
- * @param policTrajectoryPointDTO 用户轨迹记录
- * @return 用户轨迹记录集合
- */
- public List<PolicTrajectoryPointDTO> selectPolicTrajectoryPointList(PolicTrajectoryPointDTO policTrajectoryPointDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.xml b/src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.xml
deleted file mode 100644
index d5aa79d..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.police.mapper.PolicTrajectoryPointMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="policTrajectoryPointResultMap" type="org.springblade.modules.police.entity.PolicTrajectoryPointEntity">
- </resultMap>
-
-
- <select id="selectPolicTrajectoryPointPage" resultMap="policTrajectoryPointResultMap">
- select * from jczz_polic_trajectory_point
- <where>
- <if test="policTrajectoryPoint.id != null "> and id = #{policTrajectoryPoint.id}</if>
- <if test="policTrajectoryPoint.userId != null "> and user_id = #{policTrajectoryPoint.userId}</if>
- <if test="policTrajectoryPoint.latitude != null "> and latitude = #{policTrajectoryPoint.latitude}</if>
- <if test="policTrajectoryPoint.longitude != null "> and longitude = #{policTrajectoryPoint.longitude}</if>
- <if test="policTrajectoryPoint.createTimeStr != null and policTrajectoryPoint.createTimeStr != '' "> and DATE(create_time) = #{policTrajectoryPoint.createTimeStr}</if>
- <if test="policTrajectoryPoint.speed != null "> and speed = #{policTrajectoryPoint.speed}</if>
- <if test="policTrajectoryPoint.accuracy != null "> and accuracy = #{policTrajectoryPoint.accuracy}</if>
- <if test="policTrajectoryPoint.altitude != null "> and altitude = #{policTrajectoryPoint.altitude}</if>
- <if test="policTrajectoryPoint.verticalAccuracy != null "> and verticalAccuracy = #{policTrajectoryPoint.verticalAccuracy}</if>
- <if test="policTrajectoryPoint.horizontalAccuracy != null "> and horizontalAccuracy = #{policTrajectoryPoint.horizontalAccuracy}</if>
- </where>
- </select>
- <resultMap type="org.springblade.modules.police.dto.PolicTrajectoryPointDTO" id="PolicTrajectoryPointDTOResult">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="latitude" column="latitude" />
- <result property="longitude" column="longitude" />
- <result property="createTime" column="create_time" />
- <result property="speed" column="speed" />
- <result property="accuracy" column="accuracy" />
- <result property="altitude" column="altitude" />
- <result property="verticalAccuracy" column="verticalAccuracy" />
- <result property="horizontalAccuracy" column="horizontalAccuracy" />
- </resultMap>
-
- <sql id="selectPolicTrajectoryPoint">
- select
- id,
- user_id,
- latitude,
- longitude,
- create_time,
- speed,
- accuracy,
- altitude,
- verticalAccuracy,
- horizontalAccuracy
- from
- jczz_polic_trajectory_point
- </sql>
-
- <select id="selectPolicTrajectoryPointById" parameterType="long" resultMap="PolicTrajectoryPointDTOResult">
- <include refid="selectPolicTrajectoryPoint"/>
- where
- id = #{id}
- </select>
-
- <select id="selectPolicTrajectoryPointList" parameterType="org.springblade.modules.police.dto.PolicTrajectoryPointDTO" resultMap="PolicTrajectoryPointDTOResult">
- <include refid="selectPolicTrajectoryPoint"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="latitude != null "> and latitude = #{latitude}</if>
- <if test="longitude != null "> and longitude = #{longitude}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="speed != null "> and speed = #{speed}</if>
- <if test="accuracy != null "> and accuracy = #{accuracy}</if>
- <if test="altitude != null "> and altitude = #{altitude}</if>
- <if test="verticalAccuracy != null "> and verticalAccuracy = #{verticalAccuracy}</if>
- <if test="horizontalAccuracy != null "> and horizontalAccuracy = #{horizontalAccuracy}</if>
- </where>
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.java b/src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.java
deleted file mode 100644
index d747c31..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.vo.PoliceAffairsGridVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 警务网格(辖区)表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public interface PoliceAffairsGridMapper extends BaseMapper<PoliceAffairsGridEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policeAffairsGrid
- * @return
- */
- List<PoliceAffairsGridVO> selectPoliceAffairsGridPage(IPage page, PoliceAffairsGridVO policeAffairsGrid);
-
- /**
- * 空间分析
- * @param point
- * @return
- */
- List<PoliceAffairsGridEntity> spatialAnalysis(@Param("point") String point);
-
- /**
- * 查询对应的社区编号
- * @param userId
- * @return
- */
- List<String> getCommunityCodeListByUserId(@Param("userId") String userId);
-}
diff --git a/src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.xml b/src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.xml
deleted file mode 100644
index 39fe5ae..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.police.mapper.PoliceAffairsGridMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="policeAffairsGridResultMap" type="org.springblade.modules.police.entity.PoliceAffairsGridEntity">
- <result column="id" property="id"/>
- <result column="object_id" property="objectId"/>
- <result column="jws_code" property="jwsCode"/>
- <result column="user_id" property="userId"/>
- <result column="policeman" property="policeman"/>
- <result column="policeman_phone" property="policemanPhone"/>
- <result column="community_code" property="communityCode"/>
- <result column="community_name" property="communityName"/>
- <result column="police_station_code" property="policeStationCode"/>
- <result column="police_station_name" property="policeStationName"/>
- <result column="geom" property="geom"/>
- <result column="sort" property="sort"/>
- <result column="create_time" property="createTime"/>
- <result column="create_user" property="createUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
-
- <select id="selectPoliceAffairsGridPage" resultMap="policeAffairsGridResultMap">
- select * from jczz_police_affairs_grid where is_deleted = 0
- </select>
-
- <!--判断该点在哪个警务网格-->
- <select id="spatialAnalysis" resultType="org.springblade.modules.police.entity.PoliceAffairsGridEntity">
- SELECT * FROM jczz_police_affairs_grid
- WHERE is_deleted = 0
- and ST_Intersects(geom, ST_GeomFromText(${point},0))
- </select>
-
- <!--查询对应的社区编号-->
- <select id="getCommunityCodeListByUserId" resultType="java.lang.String">
- SELECT community_code FROM jczz_police_affairs_grid
- WHERE is_deleted = 0
- and police_user_id like concat('%',#{userId},'%')
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.java b/src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.java
deleted file mode 100644
index 5de2215..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-import org.springblade.modules.police.vo.PoliceAlarmRecordsVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 报警记录 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-13
- */
-public interface PoliceAlarmRecordsMapper extends BaseMapper<PoliceAlarmRecordsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policeAlarmRecords
- * @param isAdministrator
- * @param regionChildCodesList
- * @param gridCodeList
- * @return
- */
- List<PoliceAlarmRecordsVO> selectPoliceAlarmRecordsPage(IPage page,
- @Param("vo") PoliceAlarmRecordsVO policeAlarmRecords,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml b/src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml
deleted file mode 100644
index 87d00da..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.police.mapper.PoliceAlarmRecordsMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="policeAlarmRecordsResultMap" type="org.springblade.modules.police.vo.PoliceAlarmRecordsVO">
- </resultMap>
-
-
- <select id="selectPoliceAlarmRecordsPage" resultMap="policeAlarmRecordsResultMap">
- select
- jpar.*,
- bdb.dict_value as alarmTypeName
- from jczz_police_alarm_records jpar
- LEFT JOIN jczz_grid jg on jg.grid_code = jpar.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jpar.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- LEFT JOIN blade_dict_biz bdb ON bdb.dict_key = jpar.alarm_type and bdb.is_deleted = 0 and bdb.code = 'applyAlarmType'
- <where>
- <if test="vo.status != null">
- and jpar.status = #{vo.status}
- </if>
- <if test="vo.alarmDescribe != null and vo.alarmDescribe != ''">
- and jpar.alarm_describe like concat('%',#{vo.alarmDescribe},'%')
- </if>
- <if test="vo.policeName != null and vo.policeName != ''">
- and jpar.police_name like concat('%',#{vo.policeName},'%')
- </if>
- <if test="vo.startTime != null and vo.startTime != ''">
- and date_format(jpar.create_time,'%Y-%m-%d') >= #{vo.startTime}
- </if>
- <if test="vo.endTime != null and vo.endTime != ''">
- and date_format(jpar.create_time,'%Y-%m-%d') <= #{vo.endTime}
- </if>
- <if test="vo.searchKey!=null and vo.searchKey!=''">
- and CONCAT(
- ifnull(jpar.name,''),
- ifnull(jpar.phone,''),
- ifnull(jpar.address,''),
- ifnull(jpar.alarm_describe,''),
- ifnull(jpar.police_name,'')
- ) like CONCAT ('%', #{vo.searchKey},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="vo.roleName != null and vo.roleName != ''">
- <if test="vo.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="vo.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- and jpar.is_deleted = 0
- </where>
- order by jpar.id desc,jpar.create_time desc
- </select>
-
- <resultMap type="org.springblade.modules.police.dto.PoliceAlarmRecordsDTO" id="PoliceAlarmRecordsDTOResult">
- <result property="id" column="id" />
- <result property="houseCode" column="house_code" />
- <result property="address" column="address" />
- <result property="name" column="name" />
- <result property="phone" column="phone" />
- <result property="alarmType" column="alarm_type" />
- <result property="injuryFlag" column="injury_flag" />
- <result property="gridCode" column="grid_code" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="policeId" column="police_id" />
- <result property="policeName" column="police_name" />
- <result property="policePhone" column="police_phone" />
- <result property="isDeleted" column="is_deleted" />
- <result property="gender" column="gender" />
- <result property="jwGridCode" column="jw_grid_code" />
- <result property="alarmResponseTime" column="alarm_response_time" />
- <result property="alarmDescribe" column="alarm_describe" />
- <result property="publicIncidents" column="public_incidents" />
- <result property="status" column="status" />
- <result property="longitude" column="longitude" />
- <result property="latitude" column="latitude" />
- </resultMap>
-
- <sql id="selectPoliceAlarmRecords">
- select
- id,
- house_code,
- address,
- name,
- phone,
- alarm_type,
- injury_flag,
- grid_code,
- create_time,
- update_time,
- police_id,
- police_name,
- police_phone,
- is_deleted,
- gender,
- jw_grid_code,
- alarm_response_time,
- alarm_describe,
- public_incidents,
- status,
- longitude,
- latitude
- from
- jczz_police_alarm_records
- </sql>
-
-<!-- <select id="selectPoliceAlarmRecordsById" parameterType="long" resultMap="PoliceAlarmRecordsDTOResult">-->
-<!-- <include refid="selectPoliceAlarmRecords"/>-->
-<!-- where-->
-<!-- id = #{id}-->
-<!-- </select>-->
-
-<!-- <select id="selectPoliceAlarmRecordsList" parameterType="rg.springblade.modules.dto.PoliceAlarmRecordsDTO" resultMap="PoliceAlarmRecordsDTOResult">-->
-<!-- <include refid="selectPoliceAlarmRecords"/>-->
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>
- <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if>
- <if test="address != null and address != ''"> and address = #{address}</if>
- <if test="name != null and name != ''"> and name = #{name}</if>
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
- <if test="alarmType != null and alarmType != ''"> and alarm_type = #{alarmType}</if>
- <if test="injuryFlag != null "> and injury_flag = #{injuryFlag}</if>
- <if test="gridCode != null and gridCode != ''"> and grid_code = #{gridCode}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="policeId != null "> and police_id = #{policeId}</if>
- <if test="policeName != null and policeName != ''"> and police_name = #{policeName}</if>
- <if test="policePhone != null and policePhone != ''"> and police_phone = #{policePhone}</if>
- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
- <if test="gender != null "> and gender = #{gender}</if>
- <if test="jwGridCode != null and jwGridCode != ''"> and jw_grid_code = #{jwGridCode}</if>
- <if test="alarmResponseTime != null "> and alarm_response_time = #{alarmResponseTime}</if>
- <if test="alarmDescribe != null and alarmDescribe != ''"> and alarm_describe = #{alarmDescribe}</if>
- <if test="publicIncidents != null "> and public_incidents = #{publicIncidents}</if>
- <if test="status != null "> and status = #{status}</if>-->
-<!-- </where>-->
-<!-- </select>-->
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.java b/src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.java
deleted file mode 100644
index cc4ea53..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.mapper;
-
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.modules.police.vo.PoliceStationVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 派出所信息表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public interface PoliceStationMapper extends BaseMapper<PoliceStationEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policeStation
- * @return
- */
- List<PoliceStationVO> selectPoliceStationPage(IPage page, PoliceStationVO policeStation);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.xml b/src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.xml
deleted file mode 100644
index 2a01801..0000000
--- a/src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.police.mapper.PoliceStationMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="policeStationResultMap" type="org.springblade.modules.police.entity.PoliceStationEntity">
- <result column="id" property="id"/>
- <result column="code" property="code"/>
- <result column="name" property="name"/>
- <result column="geom" property="geom"/>
- <result column="sort" property="sort"/>
- <result column="create_time" property="createTime"/>
- <result column="create_user" property="createUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="remark" property="remark"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
-
- <select id="selectPoliceStationPage" resultMap="policeStationResultMap">
- select * from jczz_police_station where is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/police/service/IPolicTrajectoryPointService.java b/src/main/java/org/springblade/modules/police/service/IPolicTrajectoryPointService.java
deleted file mode 100644
index f248ad4..0000000
--- a/src/main/java/org/springblade/modules/police/service/IPolicTrajectoryPointService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import org.springblade.modules.police.vo.PolicTrajectoryPointVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 用户轨迹记录 服务类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-public interface IPolicTrajectoryPointService extends IService<PolicTrajectoryPointEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policTrajectoryPoint
- * @return
- */
- IPage<PolicTrajectoryPointVO> selectPolicTrajectoryPointPage(IPage<PolicTrajectoryPointVO> page, PolicTrajectoryPointVO policTrajectoryPoint);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/service/IPoliceAffairsGridService.java b/src/main/java/org/springblade/modules/police/service/IPoliceAffairsGridService.java
deleted file mode 100644
index 682bdbd..0000000
--- a/src/main/java/org/springblade/modules/police/service/IPoliceAffairsGridService.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.springblade.modules.police.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.excel.PoliceAffairsGridExcel;
-import org.springblade.modules.police.vo.PoliceAffairsGridVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 警务网格(辖区)表 服务类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public interface IPoliceAffairsGridService extends IService<PoliceAffairsGridEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policeAffairsGrid
- * @return
- */
- IPage<PoliceAffairsGridVO> selectPoliceAffairsGridPage(IPage<PoliceAffairsGridVO> page, PoliceAffairsGridVO policeAffairsGrid);
-
-
- /**
- * 导入警务辖区数据
- * @param data
- * @param isCovered
- */
- void importPoliceAffairsGrid(List<PoliceAffairsGridExcel> data, Boolean isCovered);
-
- /**
- * 空间分析
- * @param point
- * @return
- */
- List<PoliceAffairsGridEntity> spatialAnalysis(String point);
-
- /**
- * 查询对应的社区编号
- * @param userId
- * @return
- */
- List<String> getCommunityCodeListByUserId(Long userId);
-}
diff --git a/src/main/java/org/springblade/modules/police/service/IPoliceAlarmRecordsService.java b/src/main/java/org/springblade/modules/police/service/IPoliceAlarmRecordsService.java
deleted file mode 100644
index 96fd003..0000000
--- a/src/main/java/org/springblade/modules/police/service/IPoliceAlarmRecordsService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-import org.springblade.modules.police.vo.PoliceAlarmRecordsVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 报警记录 服务类
- *
- * @author BladeX
- * @since 2024-03-13
- */
-public interface IPoliceAlarmRecordsService extends IService<PoliceAlarmRecordsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policeAlarmRecords
- * @return
- */
- IPage<PoliceAlarmRecordsVO> selectPoliceAlarmRecordsPage(IPage<PoliceAlarmRecordsVO> page, PoliceAlarmRecordsVO policeAlarmRecords);
-
- /**
- * 报警记录 新增
- */
- boolean savePoliceAlarmRecordsEntity(PoliceAlarmRecordsEntity policeAlarmRecords);
-}
diff --git a/src/main/java/org/springblade/modules/police/service/IPoliceStationService.java b/src/main/java/org/springblade/modules/police/service/IPoliceStationService.java
deleted file mode 100644
index f1ce932..0000000
--- a/src/main/java/org/springblade/modules/police/service/IPoliceStationService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.springblade.modules.police.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.modules.police.excel.PoliceStationExcel;
-import org.springblade.modules.police.vo.PoliceStationVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 派出所信息表 服务类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public interface IPoliceStationService extends IService<PoliceStationEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param policeStation
- * @return
- */
- IPage<PoliceStationVO> selectPoliceStationPage(IPage<PoliceStationVO> page, PoliceStationVO policeStation);
-
-
- /**
- * 导入派出所数据
- * @param data
- * @param isCovered
- */
- void importPoliceStation(List<PoliceStationExcel> data, Boolean isCovered);
-}
diff --git a/src/main/java/org/springblade/modules/police/service/impl/PolicTrajectoryPointServiceImpl.java b/src/main/java/org/springblade/modules/police/service/impl/PolicTrajectoryPointServiceImpl.java
deleted file mode 100644
index 4be9e54..0000000
--- a/src/main/java/org/springblade/modules/police/service/impl/PolicTrajectoryPointServiceImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import org.springblade.modules.police.vo.PolicTrajectoryPointVO;
-import org.springblade.modules.police.mapper.PolicTrajectoryPointMapper;
-import org.springblade.modules.police.service.IPolicTrajectoryPointService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 用户轨迹记录 服务实现类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Service
-public class PolicTrajectoryPointServiceImpl extends ServiceImpl<PolicTrajectoryPointMapper, PolicTrajectoryPointEntity> implements IPolicTrajectoryPointService {
-
- @Override
- public IPage<PolicTrajectoryPointVO> selectPolicTrajectoryPointPage(IPage<PolicTrajectoryPointVO> page, PolicTrajectoryPointVO policTrajectoryPoint) {
- return page.setRecords(baseMapper.selectPolicTrajectoryPointPage(page, policTrajectoryPoint));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/service/impl/PoliceAffairsGridServiceImpl.java b/src/main/java/org/springblade/modules/police/service/impl/PoliceAffairsGridServiceImpl.java
deleted file mode 100644
index 6774fad..0000000
--- a/src/main/java/org/springblade/modules/police/service/impl/PoliceAffairsGridServiceImpl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.springblade.modules.police.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.modules.police.excel.PoliceAffairsGridExcel;
-import org.springblade.modules.police.excel.PoliceStationExcel;
-import org.springblade.modules.police.service.IPoliceStationService;
-import org.springblade.modules.police.vo.PoliceAffairsGridVO;
-import org.springblade.modules.police.mapper.PoliceAffairsGridMapper;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.User;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * 警务网格(辖区)表 服务实现类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Service
-public class PoliceAffairsGridServiceImpl extends ServiceImpl<PoliceAffairsGridMapper, PoliceAffairsGridEntity> implements IPoliceAffairsGridService {
-
- @Override
- public IPage<PoliceAffairsGridVO> selectPoliceAffairsGridPage(IPage<PoliceAffairsGridVO> page, PoliceAffairsGridVO policeAffairsGrid) {
- return page.setRecords(baseMapper.selectPoliceAffairsGridPage(page, policeAffairsGrid));
- }
-
- /**
- * 导入警务辖区数据
- * @param data
- * @param isCovered
- */
- @Override
- public void importPoliceAffairsGrid(List<PoliceAffairsGridExcel> data, Boolean isCovered) {
- for (PoliceAffairsGridExcel policeAffairsGridExcel : data) {
- PoliceAffairsGridEntity policeAffairsGridEntity
- = Objects.requireNonNull(BeanUtil.copy(policeAffairsGridExcel, PoliceAffairsGridEntity.class));
- // 查询派出所对应的编号
- QueryWrapper<PoliceStationEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).eq("name",policeAffairsGridExcel.getPcsName());
- PoliceStationEntity stationEntity = SpringUtil.getBean(IPoliceStationService.class).getOne(queryWrapper);
- if (null!=stationEntity){
- policeAffairsGridEntity.setPcsCode(stationEntity.getCode());
- }
- policeAffairsGridEntity.setCreateUser(AuthUtil.getUserId());
- policeAffairsGridEntity.setCreateTime(new Date());
- policeAffairsGridEntity.setUpdateUser(AuthUtil.getUserId());
- policeAffairsGridEntity.setUpdateTime(new Date());
- // 新增
- save(policeAffairsGridEntity);
- }
- }
-
- /**
- * 空间分析
- * @param point
- * @return
- */
- @Override
- public List<PoliceAffairsGridEntity> spatialAnalysis(String point) {
- return baseMapper.spatialAnalysis(point);
- }
-
- /**
- * 查询对应的社区编号
- * @param userId
- * @return
- */
- @Override
- public List<String> getCommunityCodeListByUserId(Long userId) {
- return baseMapper.getCommunityCodeListByUserId(userId.toString());
- }
-}
diff --git a/src/main/java/org/springblade/modules/police/service/impl/PoliceAlarmRecordsServiceImpl.java b/src/main/java/org/springblade/modules/police/service/impl/PoliceAlarmRecordsServiceImpl.java
deleted file mode 100644
index e32d663..0000000
--- a/src/main/java/org/springblade/modules/police/service/impl/PoliceAlarmRecordsServiceImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.police.vo.PoliceAlarmRecordsVO;
-import org.springblade.modules.police.mapper.PoliceAlarmRecordsMapper;
-import org.springblade.modules.police.service.IPoliceAlarmRecordsService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 报警记录 服务实现类
- *
- * @author BladeX
- * @since 2024-03-13
- */
-@Service
-public class PoliceAlarmRecordsServiceImpl extends ServiceImpl<PoliceAlarmRecordsMapper, PoliceAlarmRecordsEntity> implements IPoliceAlarmRecordsService {
-
- @Override
- public IPage<PoliceAlarmRecordsVO> selectPoliceAlarmRecordsPage(IPage<PoliceAlarmRecordsVO> page, PoliceAlarmRecordsVO policeAlarmRecords) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(PoliceAlarmRecordsVO.class, policeAlarmRecords);
- return page.setRecords(baseMapper.selectPoliceAlarmRecordsPage(page, policeAlarmRecords,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList()
- ));
- }
-
- /**
- * 报警记录 新增
- */
- @Override
- public boolean savePoliceAlarmRecordsEntity(PoliceAlarmRecordsEntity policeAlarmRecords) {
- // 根据位置设置网格,警格编号
- IGridService gridService = SpringUtils.getBean(IGridService.class);
- IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
- String point = "'POINT(" + policeAlarmRecords.getLongitude() + " " + policeAlarmRecords.getLatitude() + ")'";
- //点坐标解析网格
- List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
- if (gridEntityList.size()>0){
- GridEntity gridEntity = gridEntityList.get(0);
- policeAlarmRecords.setGridCode(gridEntity.getGridCode());
- }
- //点坐标解析警格
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
- if (policeAffairsGridEntityList.size()>0){
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
- policeAlarmRecords.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
- }
- // 插入
- return save(policeAlarmRecords);
- }
-}
diff --git a/src/main/java/org/springblade/modules/police/service/impl/PoliceStationServiceImpl.java b/src/main/java/org/springblade/modules/police/service/impl/PoliceStationServiceImpl.java
deleted file mode 100644
index b4978ee..0000000
--- a/src/main/java/org/springblade/modules/police/service/impl/PoliceStationServiceImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.springblade.modules.police.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.modules.police.excel.PoliceStationExcel;
-import org.springblade.modules.police.vo.PoliceStationVO;
-import org.springblade.modules.police.mapper.PoliceStationMapper;
-import org.springblade.modules.police.service.IPoliceStationService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 派出所信息表 服务实现类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Service
-public class PoliceStationServiceImpl extends ServiceImpl<PoliceStationMapper, PoliceStationEntity> implements IPoliceStationService {
-
- @Override
- public IPage<PoliceStationVO> selectPoliceStationPage(IPage<PoliceStationVO> page, PoliceStationVO policeStation) {
- return page.setRecords(baseMapper.selectPoliceStationPage(page, policeStation));
- }
-
- /**
- * 导入派出所数据
- * @param data
- * @param isCovered
- */
- @Override
- public void importPoliceStation(List<PoliceStationExcel> data, Boolean isCovered) {
- for (PoliceStationExcel policeStationExcel : data) {
- PoliceStationEntity policeStationEntity = new PoliceStationEntity();
- policeStationEntity.setCode(policeStationExcel.getCode());
- policeStationEntity.setName(policeStationExcel.getName());
- // 数据异常,无法导入
-// policeStationEntity.setGeom(policeStationExcel.getGeom());
- // 判断是否已录入
- QueryWrapper<PoliceStationEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).eq("code",policeStationExcel.getCode());
- PoliceStationEntity one = getOne(queryWrapper);
- if (null!=one){
- // 更新
- policeStationEntity.setId(one.getId());
- updateById(policeStationEntity);
- }else {
- // 新增
- policeStationEntity.setCreateUser(AuthUtil.getUserId());
- policeStationEntity.setCreateTime(new Date());
- policeStationEntity.setUpdateUser(AuthUtil.getUserId());
- policeStationEntity.setUpdateTime(new Date());
- save(policeStationEntity);
- }
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/police/vo/PolicTrajectoryPointVO.java b/src/main/java/org/springblade/modules/police/vo/PolicTrajectoryPointVO.java
deleted file mode 100644
index bcd0cd9..0000000
--- a/src/main/java/org/springblade/modules/police/vo/PolicTrajectoryPointVO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.vo;
-
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 用户轨迹记录 视图实体类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PolicTrajectoryPointVO extends PolicTrajectoryPointEntity {
- private static final long serialVersionUID = 1L;
-
- private String createTimeStr;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/vo/PoliceAffairsGridVO.java b/src/main/java/org/springblade/modules/police/vo/PoliceAffairsGridVO.java
deleted file mode 100644
index a1ccc26..0000000
--- a/src/main/java/org/springblade/modules/police/vo/PoliceAffairsGridVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.vo;
-
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 警务网格(辖区)表 视图实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PoliceAffairsGridVO extends PoliceAffairsGridEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java b/src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java
deleted file mode 100644
index 5892f07..0000000
--- a/src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.vo;
-
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 报警记录 视图实体类
- *
- * @author BladeX
- * @since 2024-03-13
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PoliceAlarmRecordsVO extends PoliceAlarmRecordsEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 搜索关键字
- */
- private String searchKey;
-
- /**
- * 报警类型名称
- */
- private String alarmTypeName;
-
- /**
- * 开始时间
- */
- private String startTime;
-
- /**
- * 结束时间
- */
- private String endTime;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/vo/PoliceStationVO.java b/src/main/java/org/springblade/modules/police/vo/PoliceStationVO.java
deleted file mode 100644
index c2a9c3e..0000000
--- a/src/main/java/org/springblade/modules/police/vo/PoliceStationVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.vo;
-
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 派出所信息表 视图实体类
- *
- * @author BladeX
- * @since 2024-02-01
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PoliceStationVO extends PoliceStationEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/police/wrapper/PolicTrajectoryPointWrapper.java b/src/main/java/org/springblade/modules/police/wrapper/PolicTrajectoryPointWrapper.java
deleted file mode 100644
index befae75..0000000
--- a/src/main/java/org/springblade/modules/police/wrapper/PolicTrajectoryPointWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.police.entity.PolicTrajectoryPointEntity;
-import org.springblade.modules.police.vo.PolicTrajectoryPointVO;
-import java.util.Objects;
-
-/**
- * 用户轨迹记录 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-02
- */
-public class PolicTrajectoryPointWrapper extends BaseEntityWrapper<PolicTrajectoryPointEntity, PolicTrajectoryPointVO> {
-
- public static PolicTrajectoryPointWrapper build() {
- return new PolicTrajectoryPointWrapper();
- }
-
- @Override
- public PolicTrajectoryPointVO entityVO(PolicTrajectoryPointEntity policTrajectoryPoint) {
- PolicTrajectoryPointVO policTrajectoryPointVO = Objects.requireNonNull(BeanUtil.copy(policTrajectoryPoint, PolicTrajectoryPointVO.class));
-
- //User createUser = UserCache.getUser(policTrajectoryPoint.getCreateUser());
- //User updateUser = UserCache.getUser(policTrajectoryPoint.getUpdateUser());
- //policTrajectoryPointVO.setCreateUserName(createUser.getName());
- //policTrajectoryPointVO.setUpdateUserName(updateUser.getName());
-
- return policTrajectoryPointVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/wrapper/PoliceAffairsGridWrapper.java b/src/main/java/org/springblade/modules/police/wrapper/PoliceAffairsGridWrapper.java
deleted file mode 100644
index 81dab76..0000000
--- a/src/main/java/org/springblade/modules/police/wrapper/PoliceAffairsGridWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.vo.PoliceAffairsGridVO;
-import java.util.Objects;
-
-/**
- * 警务网格(辖区)表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public class PoliceAffairsGridWrapper extends BaseEntityWrapper<PoliceAffairsGridEntity, PoliceAffairsGridVO> {
-
- public static PoliceAffairsGridWrapper build() {
- return new PoliceAffairsGridWrapper();
- }
-
- @Override
- public PoliceAffairsGridVO entityVO(PoliceAffairsGridEntity policeAffairsGrid) {
- PoliceAffairsGridVO policeAffairsGridVO = Objects.requireNonNull(BeanUtil.copy(policeAffairsGrid, PoliceAffairsGridVO.class));
-
- //User createUser = UserCache.getUser(policeAffairsGrid.getCreateUser());
- //User updateUser = UserCache.getUser(policeAffairsGrid.getUpdateUser());
- //policeAffairsGridVO.setCreateUserName(createUser.getName());
- //policeAffairsGridVO.setUpdateUserName(updateUser.getName());
-
- return policeAffairsGridVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/wrapper/PoliceAlarmRecordsWrapper.java b/src/main/java/org/springblade/modules/police/wrapper/PoliceAlarmRecordsWrapper.java
deleted file mode 100644
index 3d6bc6d..0000000
--- a/src/main/java/org/springblade/modules/police/wrapper/PoliceAlarmRecordsWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.police.entity.PoliceAlarmRecordsEntity;
-import org.springblade.modules.police.vo.PoliceAlarmRecordsVO;
-import java.util.Objects;
-
-/**
- * 报警记录 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-13
- */
-public class PoliceAlarmRecordsWrapper extends BaseEntityWrapper<PoliceAlarmRecordsEntity, PoliceAlarmRecordsVO> {
-
- public static PoliceAlarmRecordsWrapper build() {
- return new PoliceAlarmRecordsWrapper();
- }
-
- @Override
- public PoliceAlarmRecordsVO entityVO(PoliceAlarmRecordsEntity policeAlarmRecords) {
- PoliceAlarmRecordsVO policeAlarmRecordsVO = Objects.requireNonNull(BeanUtil.copy(policeAlarmRecords, PoliceAlarmRecordsVO.class));
-
- //User createUser = UserCache.getUser(policeAlarmRecords.getCreateUser());
- //User updateUser = UserCache.getUser(policeAlarmRecords.getUpdateUser());
- //policeAlarmRecordsVO.setCreateUserName(createUser.getName());
- //policeAlarmRecordsVO.setUpdateUserName(updateUser.getName());
-
- return policeAlarmRecordsVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/police/wrapper/PoliceStationWrapper.java b/src/main/java/org/springblade/modules/police/wrapper/PoliceStationWrapper.java
deleted file mode 100644
index d57caa3..0000000
--- a/src/main/java/org/springblade/modules/police/wrapper/PoliceStationWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.police.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.police.entity.PoliceStationEntity;
-import org.springblade.modules.police.vo.PoliceStationVO;
-import java.util.Objects;
-
-/**
- * 派出所信息表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-02-01
- */
-public class PoliceStationWrapper extends BaseEntityWrapper<PoliceStationEntity, PoliceStationVO> {
-
- public static PoliceStationWrapper build() {
- return new PoliceStationWrapper();
- }
-
- @Override
- public PoliceStationVO entityVO(PoliceStationEntity policeStation) {
- PoliceStationVO policeStationVO = Objects.requireNonNull(BeanUtil.copy(policeStation, PoliceStationVO.class));
-
- //User createUser = UserCache.getUser(policeStation.getCreateUser());
- //User updateUser = UserCache.getUser(policeStation.getUpdateUser());
- //policeStationVO.setCreateUserName(createUser.getName());
- //policeStationVO.setUpdateUserName(updateUser.getName());
-
- return policeStationVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCapitalApplyController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCapitalApplyController.java
deleted file mode 100644
index c0180e8..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyCapitalApplyController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.vo.PropertyCapitalApplyVO;
-import org.springblade.modules.property.wrapper.PropertyCapitalApplyWrapper;
-import org.springblade.modules.property.service.IPropertyCapitalApplyService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 物业维修资金申请表 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-propertyCapitalApply/propertyCapitalApply")
-@Api(value = "物业维修资金申请表", tags = "物业维修资金申请表接口")
-public class PropertyCapitalApplyController{
-
- private final IPropertyCapitalApplyService propertyCapitalApplyService;
-
- /**
- * 物业维修资金申请表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCapitalApply")
- public R<PropertyCapitalApplyVO> detail(PropertyCapitalApplyEntity propertyCapitalApply) {
- PropertyCapitalApplyEntity detail = propertyCapitalApplyService.getOne(Condition.getQueryWrapper(propertyCapitalApply));
- return R.data(PropertyCapitalApplyWrapper.build().entityVO(detail));
- }
- /**
- * 物业维修资金申请表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入propertyCapitalApply")
- public R<IPage<PropertyCapitalApplyVO>> list(PropertyCapitalApplyEntity propertyCapitalApply, Query query) {
- IPage<PropertyCapitalApplyEntity> pages = propertyCapitalApplyService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCapitalApply));
- return R.data(PropertyCapitalApplyWrapper.build().pageVO(pages));
- }
-
- /**
- * 物业维修资金申请表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCapitalApply")
- public R<IPage<PropertyCapitalApplyVO>> page(PropertyCapitalApplyVO propertyCapitalApply, Query query) {
- IPage<PropertyCapitalApplyVO> pages = propertyCapitalApplyService.selectPropertyCapitalApplyPage(Condition.getPage(query), propertyCapitalApply);
- return R.data(pages);
- }
-
- /**
- * 物业维修资金申请表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCapitalApply")
- public R save(@Valid @RequestBody PropertyCapitalApplyVO propertyCapitalApplyVO) {
- return R.status(propertyCapitalApplyService.save(propertyCapitalApplyVO));
- }
-
- /**
- * 物业维修资金申请表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCapitalApply")
- public R update(@Valid @RequestBody PropertyCapitalApplyEntity propertyCapitalApply) {
- return R.status(propertyCapitalApplyService.updateById(propertyCapitalApply));
- }
-
- /**
- * 物业维修资金申请表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCapitalApply")
- public R submit(@Valid @RequestBody PropertyCapitalApplyVO propertyCapitalApplyVO) {
- return R.status(propertyCapitalApplyService.startProcess(propertyCapitalApplyVO));
- }
-
- /**
- * 物业维修资金申请表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(propertyCapitalApplyService.removeByIds(Func.toIntList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyChargeController.java b/src/main/java/org/springblade/modules/property/controller/PropertyChargeController.java
deleted file mode 100644
index f3fa3f0..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyChargeController.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.service.IPropertyChargeService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-import org.springblade.modules.property.vo.PropertyCompanyDetailVO;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-import org.springblade.modules.property.wrapper.PropertyCompanyWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 物业公司 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("propertyCharge/propertyCharge")
-@Api(value = "物业收费项", tags = "物业收费项接口")
-public class PropertyChargeController {
-
- private final IPropertyChargeService propertyChargeService;
-
- /**
- * 物业公司 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCompany")
- public R<PropertyCharge> detail(PropertyCharge propertyCompany) {
- PropertyCharge detail = propertyChargeService.getOne(Condition.getQueryWrapper(propertyCompany));
- return R.data(detail);
- }
-
-
- /**
- * 物业公司 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCompany")
- public R<IPage<PropertyChargeVO>> page(PropertyChargeVO propertyChargeVO, Query query) {
- IPage<PropertyChargeVO> pages = propertyChargeService.getPage(Condition.getPage(query), propertyChargeVO);
- return R.data(pages);
- }
-
- /**
- * 物业公司 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCompany")
- public R save(@Valid @RequestBody PropertyCharge propertyCompany) {
- return R.status(propertyChargeService.save(propertyCompany));
- }
-
- /**
- * 物业公司 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCompany")
- public R update(@Valid @RequestBody PropertyCharge propertyCompany) {
- return R.status(propertyChargeService.updateById(propertyCompany));
- }
-
- /**
- * 物业公司 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCompany")
- public R submit(@Valid @RequestBody PropertyCharge propertyCompany) {
- return R.status(propertyChargeService.saveOrUpdate(propertyCompany));
- }
-
-
- /**
- * 物业公司 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(propertyChargeService.removeByIds(Func.toLongList(ids)));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyChargeRecordController.java b/src/main/java/org/springblade/modules/property/controller/PropertyChargeRecordController.java
deleted file mode 100644
index 7298985..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyChargeRecordController.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-import org.springblade.modules.property.service.IPropertyChargeRecordService;
-import org.springblade.modules.property.service.IPropertyChargeService;
-import org.springblade.modules.property.vo.PropertyChargeRecordVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 物业公司 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("propertyChargeRecord/propertyChargeRecord")
-@Api(value = "物业收费项", tags = "物业收费项接口")
-public class PropertyChargeRecordController {
-
- private final IPropertyChargeRecordService propertyChargeRecordService;
-
- /**
- * 物业公司 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCompany")
- public R<PropertyChargeRecord> detail(PropertyChargeRecord propertyCompany) {
- PropertyChargeRecord detail = propertyChargeRecordService.getOne(Condition.getQueryWrapper(propertyCompany));
- return R.data(detail);
- }
-
-
- /**
- * 物业公司 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCompany")
- public R<IPage<PropertyChargeRecordVO>> page(PropertyChargeRecordVO vo, Query query) {
- IPage<PropertyChargeRecordVO> pages = propertyChargeRecordService.getPage(Condition.getPage(query), vo);
- return R.data(pages);
- }
-
- /**
- * 物业公司 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCompany")
- public R save(@Valid @RequestBody PropertyChargeRecord propertyCompany) {
- return R.status(propertyChargeRecordService.save(propertyCompany));
- }
-
- /**
- * 物业公司 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCompany")
- public R update(@Valid @RequestBody PropertyChargeRecord propertyCompany) {
- return R.status(propertyChargeRecordService.updateById(propertyCompany));
- }
-
- /**
- * 物业公司 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCompany")
- public R submit(@Valid @RequestBody PropertyChargeRecord propertyCompany) {
- return R.status(propertyChargeRecordService.saveOrUpdate(propertyCompany));
- }
-
-
- /**
- * 物业公司 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- List<Integer> toIntList = Func.toIntList(ids);
- return R.status(propertyChargeRecordService.removeBatchByIds(toIntList));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java
deleted file mode 100644
index f43d3fb..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.springblade.modules.property.controller;
-
-import com.qiniu.util.Auth;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
-import org.springblade.modules.property.wrapper.PropertyCompanyCommentWrapper;
-import org.springblade.modules.property.service.IPropertyCompanyCommentService;
-
-/**
- * 物业公司评论表 控制器
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-propertyCompanyComment/propertyCompanyComment")
-@Api(value = "物业公司评论表", tags = "物业公司评论表接口")
-public class PropertyCompanyCommentController {
-
- private final IPropertyCompanyCommentService propertyCompanyCommentService;
-
- /**
- * 物业公司评论表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCompanyComment")
- public R<PropertyCompanyCommentVO> detail(PropertyCompanyCommentEntity propertyCompanyComment) {
- PropertyCompanyCommentEntity detail = propertyCompanyCommentService.getOne(Condition.getQueryWrapper(propertyCompanyComment));
- return R.data(PropertyCompanyCommentWrapper.build().entityVO(detail));
- }
- /**
- * 物业公司评论表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入propertyCompanyComment")
- public R<IPage<PropertyCompanyCommentVO>> list(PropertyCompanyCommentEntity propertyCompanyComment, Query query) {
- IPage<PropertyCompanyCommentEntity> pages = propertyCompanyCommentService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCompanyComment));
- return R.data(PropertyCompanyCommentWrapper.build().pageVO(pages));
- }
-
- /**
- * 物业公司评论表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCompanyComment")
- public R<IPage<PropertyCompanyCommentVO>> page(PropertyCompanyCommentVO propertyCompanyComment, Query query) {
- IPage<PropertyCompanyCommentVO> pages = propertyCompanyCommentService.selectPropertyCompanyCommentPage(Condition.getPage(query), propertyCompanyComment);
- return R.data(pages);
- }
-
- /**
- * 物业公司评论表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCompanyComment")
- public R save(@Valid @RequestBody PropertyCompanyCommentEntity propertyCompanyComment) {
- propertyCompanyComment.setCreateUser(AuthUtil.getUserId());
- return R.status(propertyCompanyCommentService.save(propertyCompanyComment));
- }
-
- /**
- * 物业公司评论表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCompanyComment")
- public R update(@Valid @RequestBody PropertyCompanyCommentEntity propertyCompanyComment) {
- return R.status(propertyCompanyCommentService.updateById(propertyCompanyComment));
- }
-
-
- /**
- * 物业公司评论表 自定义新增或修改
- */
- @PostMapping("/saveOrUpdate")
- @ApiOperation(value = "新增", notes = "传入propertyCompanyComment")
- public R saveOrUpdate(@Valid @RequestBody PropertyCompanyCommentVO propertyCompanyComment) {
- propertyCompanyComment.setCreateUser(AuthUtil.getUserId());
- String msg = propertyCompanyCommentService.saveOrUpdatePropertyCompanyComment(propertyCompanyComment);
- if (!Strings.isBlank(msg)&& msg.equals("操作成功")){
- return R.data(200,"",msg);
- }
- return R.data(201,"",msg);
- }
-
- /**
- * 物业公司评论表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCompanyComment")
- public R submit(@Valid @RequestBody PropertyCompanyCommentEntity propertyCompanyComment) {
- return R.status(propertyCompanyCommentService.saveOrUpdate(propertyCompanyComment));
- }
-
- /**
- * 物业公司评论表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(propertyCompanyCommentService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java
deleted file mode 100644
index d19c399..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDetailVO;
-import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
-import org.springblade.modules.property.wrapper.PropertyCompanyDistrictWrapper;
-import org.springblade.modules.system.service.IDeptService;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-import org.springblade.modules.property.wrapper.PropertyCompanyWrapper;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.List;
-
-/**
- * 物业公司 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-propertyCompany/propertyCompany")
-@Api(value = "物业公司", tags = "物业公司接口")
-public class PropertyCompanyController {
-
- private final IPropertyCompanyService propertyCompanyService;
-
- /**
- * 物业公司 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCompany")
- public R<PropertyCompanyVO> detail(PropertyCompanyEntity propertyCompany) {
- PropertyCompanyEntity detail = propertyCompanyService.getOne(Condition.getQueryWrapper(propertyCompany));
- return R.data(PropertyCompanyWrapper.build().entityVO(detail));
- }
- /**
- * 物业公司 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入propertyCompany")
- public R<IPage<PropertyCompanyVO>> list(PropertyCompanyEntity propertyCompany, Query query) {
- IPage<PropertyCompanyEntity> pages = propertyCompanyService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCompany));
- return R.data(PropertyCompanyWrapper.build().pageVO(pages));
- }
-
- /**
- * 物业公司 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCompany")
- public R<IPage<PropertyCompanyVO>> page(PropertyCompanyVO propertyCompany, Query query) {
- IPage<PropertyCompanyVO> pages = propertyCompanyService.selectPropertyCompanyPage(Condition.getPage(query), propertyCompany);
- return R.data(pages);
- }
-
- /**
- * 物业公司列表查询(不分页)
- */
- @GetMapping("/getPropertyCompanyList")
- public R getPropertyCompanyList(PropertyCompanyVO propertyCompany) {
- return R.data(propertyCompanyService.getPropertyCompanyList(propertyCompany));
- }
-
- /**
- * 物业公司 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCompany")
- public R save(@Valid @RequestBody PropertyCompanyEntity propertyCompany) {
- return R.status(propertyCompanyService.save(propertyCompany));
- }
-
- /**
- * 物业公司 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCompany")
- public R update(@Valid @RequestBody PropertyCompanyEntity propertyCompany) {
- return R.status(propertyCompanyService.updateById(propertyCompany));
- }
-
- /**
- * 物业公司 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCompany")
- public R submit(@Valid @RequestBody PropertyCompanyEntity propertyCompany) {
- return R.status(propertyCompanyService.saveOrUpdate(propertyCompany));
- }
-
- /**
- * 物业公司 自定义新增或修改
- */
- @PostMapping("/saveOrUpdate")
- public R saveOrUpdate(@Valid @RequestBody PropertyCompanyEntity propertyCompany) {
- return R.status(propertyCompanyService.saveOrUpdatePropertyCompany(propertyCompany));
- }
-
- /**
- * 物业公司 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- List<Integer> toIntList = Func.toIntList(ids);
- return R.status(propertyCompanyService.deleteByIds(toIntList));
- }
-
- /**
- * 物业公司查询对应的用户信息
- */
- @GetMapping("/getUserByPropertyCompany")
- public R getUserByPropertyCompany(PropertyCompanyVO propertyCompany) {
- return R.data(propertyCompanyService.getUserByPropertyCompany(propertyCompany));
- }
-
- /**
- * 物业派驻小区表 详情
- */
- @GetMapping("/getUserCompayDistrict")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "获取用户小区物业信息", notes = "")
- public R<PropertyCompanyVO> getUserCompayDistrict(@RequestParam("houseCode") String houseCode) {
- PropertyCompanyVO detail = propertyCompanyService.getUserCompayDistrict(houseCode);
- return R.data(detail);
- }
-
-
- /**
- * 物业公司 自定义详情查询
- * @param propertyCompany
- * @return
- */
- @GetMapping("/getDetail")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "详情", notes = "传入propertyCompany")
- public R<PropertyCompanyDetailVO> getDetail(PropertyCompanyVO propertyCompany) {
- return R.data(propertyCompanyService.getDetail(propertyCompany));
- }
-
- /**
- * 物业公司 商户配置
- * @return
- */
- @GetMapping("/getPayConfig")
- @ApiOperation(value = "商户配置")
- public R getPayConfig(PropertyCompanyVO propertyCompany) {
- return R.data(propertyCompanyService.getPayConfig(propertyCompany));
- }
-
- /**
- * 物业公司 自定义详情查询
- * @return
- */
- @GetMapping("/getDetailByDeptId")
- @ApiOperationSupport(order = 10)
- @ApiOperation(value = "通过用户id查询物业详情", notes = "传入propertyCompany")
- public R<PropertyCompanyDetailVO> getDetailByUserId() {
- return R.data(propertyCompanyService.getDetailByDeptId());
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyDistrictController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyDistrictController.java
deleted file mode 100644
index bbbb242..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyDistrictController.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
-import org.springblade.modules.property.wrapper.PropertyCompanyDistrictWrapper;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 物业派驻小区表 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-propertyCompanyDistrict/propertyCompanyDistrict")
-@Api(value = "物业派驻小区表", tags = "物业派驻小区表接口")
-public class PropertyCompanyDistrictController {
-
- private final IPropertyCompanyDistrictService propertyCompanyDistrictService;
-
- /**
- * 物业派驻小区表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCompanyDistrict")
- public R<PropertyCompanyDistrictVO> detail(PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- PropertyCompanyDistrictEntity detail = propertyCompanyDistrictService.getOne(Condition.getQueryWrapper(propertyCompanyDistrict));
- return R.data(PropertyCompanyDistrictWrapper.build().entityVO(detail));
- }
- /**
- * 物业派驻小区表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入propertyCompanyDistrict")
- public R<IPage<PropertyCompanyDistrictVO>> list(PropertyCompanyDistrictEntity propertyCompanyDistrict, Query query) {
- IPage<PropertyCompanyDistrictEntity> pages = propertyCompanyDistrictService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCompanyDistrict));
- return R.data(PropertyCompanyDistrictWrapper.build().pageVO(pages));
- }
-
- /**
- * 物业派驻小区表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCompanyDistrict")
- public R<IPage<PropertyCompanyDistrictVO>> page(PropertyCompanyDistrictVO propertyCompanyDistrict, Query query) {
- IPage<PropertyCompanyDistrictVO> pages = propertyCompanyDistrictService.selectPropertyCompanyDistrictPage(Condition.getPage(query), propertyCompanyDistrict);
- return R.data(pages);
- }
-
- /**
- * 物业派驻小区表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCompanyDistrict")
- public R save(@Valid @RequestBody PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- return R.status(propertyCompanyDistrictService.save(propertyCompanyDistrict));
- }
-
- /**
- * 物业派驻小区表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCompanyDistrict")
- public R update(@Valid @RequestBody PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- return R.status(propertyCompanyDistrictService.updateById(propertyCompanyDistrict));
- }
-
- /**
- * 物业派驻小区表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCompanyDistrict")
- public R submit(@Valid @RequestBody PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- return R.status(propertyCompanyDistrictService.saveOrUpdate(propertyCompanyDistrict));
- }
-
- /**
- * 物业派驻小区表 自定义新增或修改
- * @param propertyCompanyDistrict
- * @return
- */
- @PostMapping("/saveOrUpdate")
- public R saveOrUpdate(@Valid @RequestBody PropertyCompanyDistrictEntity propertyCompanyDistrict) throws Exception {
- return R.status(propertyCompanyDistrictService.saveOrUpdatePropertyCompanyDistrict(propertyCompanyDistrict));
- }
-
- /**
- * 物业派驻小区表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(propertyCompanyDistrictService.removeByIds(Func.toIntList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java
deleted file mode 100644
index 73f9019..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.springblade.modules.property.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
-import org.springblade.modules.property.wrapper.PropertyCompanyScoreWrapper;
-import org.springblade.modules.property.service.IPropertyCompanyScoreService;
-
-/**
- * 物业公司评分表 控制器
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-propertyCompanyScore/propertyCompanyScore")
-@Api(value = "物业公司评分表", tags = "物业公司评分表接口")
-public class PropertyCompanyScoreController{
-
- private final IPropertyCompanyScoreService propertyCompanyScoreService;
-
- /**
- * 物业公司评分表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyCompanyScore")
- public R<PropertyCompanyScoreEntity> detail(PropertyCompanyScoreEntity propertyCompanyScore) {
- PropertyCompanyScoreEntity detail = propertyCompanyScoreService.getOne(Condition.getQueryWrapper(propertyCompanyScore));
- return R.data(detail);
- }
- /**
- * 物业公司评分表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入propertyCompanyScore")
- public R<IPage<PropertyCompanyScoreVO>> list(PropertyCompanyScoreEntity propertyCompanyScore, Query query) {
- IPage<PropertyCompanyScoreEntity> pages = propertyCompanyScoreService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCompanyScore));
- return R.data(PropertyCompanyScoreWrapper.build().pageVO(pages));
- }
-
- /**
- * 物业公司评分表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyCompanyScore")
- public R<IPage<PropertyCompanyScoreVO>> page(PropertyCompanyScoreVO propertyCompanyScore, Query query) {
- IPage<PropertyCompanyScoreVO> pages = propertyCompanyScoreService.selectPropertyCompanyScorePage(Condition.getPage(query), propertyCompanyScore);
- return R.data(pages);
- }
-
- /**
- * 物业公司评分表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyCompanyScore")
- public R save(@Valid @RequestBody PropertyCompanyScoreEntity propertyCompanyScore) {
- return R.status(propertyCompanyScoreService.save(propertyCompanyScore));
- }
-
- /**
- * 物业公司评分表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyCompanyScore")
- public R update(@Valid @RequestBody PropertyCompanyScoreEntity propertyCompanyScore) {
- return R.status(propertyCompanyScoreService.updateById(propertyCompanyScore));
- }
-
- /**
- * 物业公司评分表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyCompanyScore")
- public R submit(@Valid @RequestBody PropertyCompanyScoreEntity propertyCompanyScore) {
- return R.status(propertyCompanyScoreService.saveOrUpdate(propertyCompanyScore));
- }
-
- /**
- * 物业公司评分表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(propertyCompanyScoreService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyDistrictUserController.java b/src/main/java/org/springblade/modules/property/controller/PropertyDistrictUserController.java
deleted file mode 100644
index f26843e..0000000
--- a/src/main/java/org/springblade/modules/property/controller/PropertyDistrictUserController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.modules.property.vo.PropertyDistrictUserVO;
-import org.springblade.modules.property.wrapper.PropertyDistrictUserWrapper;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 物业公司人员派驻小区关联表 控制器
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-propertyDistrictUser/propertyDistrictUser")
-@Api(value = "物业公司人员派驻小区关联表", tags = "物业公司人员派驻小区关联表接口")
-public class PropertyDistrictUserController {
-
- private final IPropertyDistrictUserService propertyDistrictUserService;
-
- /**
- * 物业公司人员派驻小区关联表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入propertyDistrictUser")
- public R<PropertyDistrictUserVO> detail(PropertyDistrictUserEntity propertyDistrictUser) {
- PropertyDistrictUserEntity detail = propertyDistrictUserService.getOne(Condition.getQueryWrapper(propertyDistrictUser));
- return R.data(PropertyDistrictUserWrapper.build().entityVO(detail));
- }
- /**
- * 物业公司人员派驻小区关联表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入propertyDistrictUser")
- public R<IPage<PropertyDistrictUserVO>> list(PropertyDistrictUserEntity propertyDistrictUser, Query query) {
- IPage<PropertyDistrictUserEntity> pages = propertyDistrictUserService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyDistrictUser));
- return R.data(PropertyDistrictUserWrapper.build().pageVO(pages));
- }
-
- /**
- * 物业公司人员派驻小区关联表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入propertyDistrictUser")
- public R<IPage<PropertyDistrictUserVO>> page(PropertyDistrictUserVO propertyDistrictUser, Query query) {
- IPage<PropertyDistrictUserVO> pages = propertyDistrictUserService.selectPropertyDistrictUserPage(Condition.getPage(query), propertyDistrictUser);
- return R.data(pages);
- }
-
- /**
- * 物业公司人员派驻小区关联表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入propertyDistrictUser")
- public R save(@Valid @RequestBody PropertyDistrictUserEntity propertyDistrictUser) {
- return R.status(propertyDistrictUserService.save(propertyDistrictUser));
- }
-
- /**
- * 物业公司人员派驻小区关联表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入propertyDistrictUser")
- public R update(@Valid @RequestBody PropertyDistrictUserEntity propertyDistrictUser) {
- return R.status(propertyDistrictUserService.updateById(propertyDistrictUser));
- }
-
- /**
- * 物业公司人员派驻小区关联表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入propertyDistrictUser")
- public R submit(@Valid @RequestBody PropertyDistrictUserEntity propertyDistrictUser) {
- return R.status(propertyDistrictUserService.saveOrUpdate(propertyDistrictUser));
- }
-
- /**
- * 物业公司人员派驻小区关联表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(propertyDistrictUserService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCapitalApplyDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCapitalApplyDTO.java
deleted file mode 100644
index bd544ab..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyCapitalApplyDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.dto;
-
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业维修资金申请表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCapitalApplyDTO extends PropertyCapitalApplyEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyChargeRecordDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyChargeRecordDTO.java
deleted file mode 100644
index 7762b9a..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyChargeRecordDTO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.property.dto;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-
-/**
- * 缴费记录表对象 jczz_property_charge_record
- *
- * @author ${context.author}
- * @date 2024-04-07 15:44:09
- */
-@ApiModel(value = "PropertyChargeRecordDTO对象")
-@Data
-public class PropertyChargeRecordDTO extends PropertyChargeRecord
-{
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.java
deleted file mode 100644
index ee6ccb1..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.dto;
-
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业公司评论表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyCommentDTO extends PropertyCompanyCommentEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyDTO.java
deleted file mode 100644
index db0e826..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.dto;
-
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业公司 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyDTO extends PropertyCompanyEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyDistrictDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyDistrictDTO.java
deleted file mode 100644
index fb5415e..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyDistrictDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.dto;
-
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业派驻小区表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyDistrictDTO extends PropertyCompanyDistrictEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.java
deleted file mode 100644
index a555dd0..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.dto;
-
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业公司评分表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyScoreDTO extends PropertyCompanyScoreEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyDistrictUserDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyDistrictUserDTO.java
deleted file mode 100644
index 0c89fc8..0000000
--- a/src/main/java/org/springblade/modules/property/dto/PropertyDistrictUserDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.dto;
-
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业公司人员派驻小区关联表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyDistrictUserDTO extends PropertyDistrictUserEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java
deleted file mode 100644
index f1c7ec1..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 物业维修资金申请表 实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@TableName("jczz_property_capital_apply")
-@ApiModel(value = "PropertyCapitalApply对象", description = "物业维修资金申请表")
-public class PropertyCapitalApplyEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
- /**
- * 物业公司id
- */
- @ApiModelProperty(value = "物业公司id")
- private Integer propertyCompanyId;
- /**
- * 小区id
- */
- @ApiModelProperty(value = "小区id")
- private String districtId;
- /**
- * 资金申请项目名称
- */
- @ApiModelProperty(value = "资金申请项目名称")
- private String name;
- /**
- * 联系人姓名
- */
- @ApiModelProperty(value = "联系人姓名")
- private String linkman;
- /**
- * 联系人电话
- */
- @ApiModelProperty(value = "联系人电话")
- private String linkPhone;
- /**
- * 分摊方式
- */
- @ApiModelProperty(value = "分摊方式")
- private String allocationWay;
- /**
- * 预算总金额
- */
- @ApiModelProperty(value = "预算总金额")
- private BigDecimal budgetAmount;
- /**
- * 实际总金额
- */
- @ApiModelProperty(value = "实际总金额")
- private BigDecimal actualAmount;
- /**
- * 自筹金额
- */
- @ApiModelProperty(value = "自筹金额")
- private BigDecimal selfAmount;
- /**
- * 预算应拨付金额
- */
- @ApiModelProperty(value = "预算应拨付金额")
- private BigDecimal budgetAppropriateAmount;
- /**
- * 预计开工时间
- */
- @ApiModelProperty(value = "预计开工时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date runTime;
- /**
- * 预计竣工时间
- */
- @ApiModelProperty(value = "预计竣工时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date completedTime;
- /**
- * 项目摘要
- */
- @ApiModelProperty(value = "项目摘要")
- private String projectDigest;
- /**
- * 项目描述
- */
- @ApiModelProperty(value = "项目描述")
- private String projectDescribe;
- /**
- * 施工方案附件urls
- */
- @ApiModelProperty(value = "施工方案附件urls")
- private String constructionSchemeUrls;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private String createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @TableField(fill = FieldFill.INSERT)
- @ApiModelProperty("创建时间")
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- @ApiModelProperty("更新时间")
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
- /**
- * 流程定义id
- */
- @ApiModelProperty("流程定义id")
- private String processDefinitionId;
-
- /**
- * 流程实例id
- */
- @ApiModelProperty("流程实例id")
- private String processInstanceId;
-
-
- /**
- * 流程定义ke
- */
- @ApiModelProperty("流程定义ke")
- private String processDefinitionKey;
-
- /**
- * 流程申请时间
- */
- @ApiModelProperty("流程申请时间")
- private Date applyTime;
-
- /**
- * 申请状态
- */
- @ApiModelProperty("申请状态 0:待审核 1:业委会审核 2:街道审核 3:住建局审核 4:调整申请 5:审核通过 6:审核不通过 7:上饶住建局")
- private Integer applyStatus;
-
- private String taskId;
-
- private Integer articleId;
-
- @ApiModelProperty(value = "附件")
- private String attachment;
-
- /**
- * 楼栋编码
- */
- @ApiModelProperty(value = "楼栋编码")
- private String buildingCode;
- /**
- * 楼栋号(名称)
- */
- @ApiModelProperty(value = "楼栋号(名称)")
- private String buildingName;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCharge.java b/src/main/java/org/springblade/modules/property/entity/PropertyCharge.java
deleted file mode 100644
index c2c8ab9..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCharge.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import org.springblade.core.mp.base.BaseEntity;
-
-import javax.print.DocFlavor;
-
-@Data
-@TableName("jczz_property_charge")
-@ApiModel(value = "PropertyCompanyComment对象", description = "物业收费项")
-public class PropertyCharge extends BaseEntity {
-
-
- //物业公司的deptId
- private String propertyId;
-
- //缴费项名称
- private String name;
-
- //缴费类型
- private String payType;
-
- //单价
- private Double unitPrice;
-
- //缴费周期(几月一缴)
- private String payPeriod;
-
- //计算公式
- private String calculationFormula;
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyChargeRecord.java b/src/main/java/org/springblade/modules/property/entity/PropertyChargeRecord.java
deleted file mode 100644
index bb97fac..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyChargeRecord.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-@TableName("jczz_property_charge_record")
-@ApiModel(value = "PropertyChargeRecord", description = "物业缴费记录")
-public class PropertyChargeRecord {
-
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 物业公司id */
- @ApiModelProperty(value = "物业公司id", example = "")
- @TableField("property_id")
- private String propertyId;
-
- /** 订单号 */
- @ApiModelProperty(value = "订单号", example = "")
- @TableField("order_no")
- private String orderNo;
-
- /** 缴费项id */
- @ApiModelProperty(value = "缴费项id", example = "")
- @TableField("charge_id")
- private String chargeId;
-
- /** 缴费单号 */
- @ApiModelProperty(value = "缴费单号", example = "")
- @TableField("no")
- private String no;
-
- /** 付款人id */
- @ApiModelProperty(value = "付款人id", example = "")
- @TableField("pay_user")
- private String payUser;
-
- /** 付费时间 */
- @ApiModelProperty(value = "付费时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("pay_time")
- private Date payTime;
-
- /** 付款方式 */
- @ApiModelProperty(value = "付款方式", example = "")
- @TableField("pay_func")
- private String payFunc;
-
- /** 付款金额 */
- @ApiModelProperty(value = "付款金额(分)", example = "")
- @TableField("pay_price")
- private BigDecimal payPrice;
-
- /** 房屋编码 */
- @ApiModelProperty(value = "房屋编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 缴费内容 */
- @ApiModelProperty(value = "缴费内容", example = "")
- @TableField("pay_content")
- private String payContent;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建部门 */
- @ApiModelProperty(value = "创建部门", example = "")
- @TableField("create_dept")
- private Long createDept;
-
- /** 修改人 */
- @ApiModelProperty(value = "修改人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 修改时间 */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 状态(1、待支付;2、已支付;99取消支付) */
- @ApiModelProperty(value = "状态(1、待支付;2、已支付;99取消支付)", example = "")
- @TableField("status")
- private Integer status;
-
- /** 是否已删除 */
- @ApiModelProperty(value = "是否已删除", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 开始时间 */
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("start_time")
- private Date startTime;
-
- /** 到期时间 */
- @ApiModelProperty(value = "到期时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("end_time")
- private Date endTime;
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java
deleted file mode 100644
index 92f1605..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 物业公司评论表 实体类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Data
-@TableName("jczz_property_company_comment")
-@ApiModel(value = "PropertyCompanyComment对象", description = "物业公司评论表")
-public class PropertyCompanyCommentEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 物业公司id
- */
- @ApiModelProperty(value = "物业公司id")
- private Integer propertyCompanyId;
- /**
- * 父级id
- */
- @ApiModelProperty(value = "父级id")
- private Long parentId;
- /**
- * 评论内容
- */
- @ApiModelProperty(value = "评论内容")
- private String content;
-
- /**
- * 评论图片
- */
- @ApiModelProperty(value = "评论图片")
- private String imageUrls;
- /**
- * 审核人
- */
- @ApiModelProperty(value = "审核人")
- private Long checkUser;
- /**
- * 审核时间
- */
- @ApiModelProperty(value = "审核时间")
- private Date checkTime;
- /**
- * 审核状态 1:待审核 2:审核通过 3:审核不通过
- */
- @ApiModelProperty(value = "审核状态 1:待审核 2:审核通过 3:审核不通过")
- private Integer checkStatus;
- /**
- * 审核备注
- */
- @ApiModelProperty(value = "审核备注")
- private String checkRemark;
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @TableField(fill = FieldFill.INSERT)
- @ApiModelProperty("创建时间")
- private Date createTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyDistrictEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyDistrictEntity.java
deleted file mode 100644
index 4d7c71e..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyDistrictEntity.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 物业派驻小区表 实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@TableName("jczz_property_company_district")
-@ApiModel(value = "PropertyCompanyDistrict对象", description = "物业派驻小区表")
-public class PropertyCompanyDistrictEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 物业公司id
- */
- @ApiModelProperty(value = "物业公司id")
- private Integer propertyCompanyId;
- /**
- * 小区id
- */
- @ApiModelProperty(value = "小区id")
- private String districtId;
- /**
- * 负责人id
- */
- @ApiModelProperty(value = "负责人id")
- private String principal;
- /**
- * 负责人电话
- */
- @ApiModelProperty(value = "负责人电话")
- private String principalPhone;
- /**
- * 服务人数
- */
- @ApiModelProperty(value = "服务人数")
- private Integer serverNum;
- /**
- * 管家数量
- */
- @ApiModelProperty(value = "管家数量")
- private Integer butlerNum;
- /**
- * 满意度
- */
- @ApiModelProperty(value = "满意度")
- private Integer satisfaction;
- /**
- * 物业阶段
- */
- @ApiModelProperty(value = "物业阶段")
- private Integer propertyStage;
- /**
- * 合同开始时间
- */
- @ApiModelProperty(value = "合同开始时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date startTime;
- /**
- * 合同结束时间
- */
- @ApiModelProperty(value = "合同结束时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date endTime;
- /**
- * 简介
- */
- @ApiModelProperty(value = "简介")
- private String remark;
-
- /**
- * 用户id
- */
- @ApiModelProperty(value = "用户id")
- private String userId;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private String createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
- @ApiModelProperty("电子合同")
- private String electronicContract;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyEntity.java
deleted file mode 100644
index 0e2ee73..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyEntity.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 物业公司 实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@TableName("jczz_property_company")
-@ApiModel(value = "PropertyCompany对象", description = "物业公司")
-public class PropertyCompanyEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /**
- * 组织机构id
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty(value = "组织机构id")
- private Long deptId;
-
- /**
- * 物业公司名称
- */
- @ApiModelProperty(value = "物业公司名称")
- private String name;
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
- /**
- * 社会信用代码
- */
- @ApiModelProperty(value = "社会信用代码")
- private String socialCreditCode;
- /**
- * 省编号
- */
- @ApiModelProperty(value = "省编号")
- private String province;
- /**
- * 市编号
- */
- @ApiModelProperty(value = "市编号")
- private String city;
- /**
- * 区县编号
- */
- @ApiModelProperty(value = "区县编号")
- private String area;
- /**
- * 简介
- */
- @ApiModelProperty(value = "简介")
- private String remark;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private String createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
- /**
- * 基础信息分
- */
- @ApiModelProperty(value = "基础信息分", example = "")
- @TableField("base_info_score")
- private BigDecimal baseInfoScore;
-
- /**
- * 经营信息分
- */
- @ApiModelProperty(value = "经营信息分", example = "")
- @TableField("operateInfo_score")
- private BigDecimal operateinfoScore;
-
- /**
- * 纳税信息分
- */
- @ApiModelProperty(value = "纳税信息分", example = "")
- @TableField("tax_info_score")
- private BigDecimal taxInfoScore;
-
- /**
- * 党建信息分
- */
- @ApiModelProperty(value = "党建信息分", example = "")
- @TableField("party_building_info_score")
- private BigDecimal partyBuildingInfoScore;
-
- /**
- * 企业良好信息分
- */
- @ApiModelProperty(value = "企业良好信息分", example = "")
- @TableField("good_corporate_score")
- private BigDecimal goodCorporateScore;
-
- /**
- * 项目良好信息分
- */
- @ApiModelProperty(value = "项目良好信息分", example = "")
- @TableField("good_project_score")
- private BigDecimal goodProjectScore;
-
- /**
- * 违法违规行为分
- */
- @ApiModelProperty(value = "违法违规行为分", example = "")
- @TableField("lllegal_and_irregular_score")
- private BigDecimal lllegalAndIrregularScore;
-
- /**
- * 评价平均分
- */
- @ApiModelProperty(value = "评价平均分", example = "")
- @TableField("evaluate_score")
- private BigDecimal evaluateScore;
-
- /**
- * 街道社区分
- */
- @ApiModelProperty(value = "街道社区分", example = "")
- @TableField("street_score")
- private BigDecimal streetScore;
-
- /**
- * 总分
- */
- @ApiModelProperty(value = "总分", example = "")
- @TableField("all_score")
- private BigDecimal allScore;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java
deleted file mode 100644
index eb168c4..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 物业公司评分表 实体类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Data
-@TableName("jczz_property_company_score")
-@ApiModel(value = "PropertyCompanyScore对象", description = "物业公司评分表")
-public class PropertyCompanyScoreEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 物业公司id
- */
- @ApiModelProperty(value = "物业公司id")
- private Integer propertyCompanyId;
- /**
- * 评分
- */
- @ApiModelProperty(value = "评分")
- private Integer score;
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @TableField(fill = FieldFill.INSERT)
- @ApiModelProperty("创建时间")
- private Date createTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyDistrictUserEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyDistrictUserEntity.java
deleted file mode 100644
index 4185f5a..0000000
--- a/src/main/java/org/springblade/modules/property/entity/PropertyDistrictUserEntity.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-
-/**
- * 物业公司人员派驻小区关联表 实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@TableName("jczz_property_district_user")
-@ApiModel(value = "PropertyDistrictUser对象", description = "物业公司人员派驻小区关联表")
-public class PropertyDistrictUserEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 物业小区关联表id
- */
- @ApiModelProperty(value = "物业小区关联表id")
- private Integer propertyCompanyDistrictId;
- /**
- * 用户id
- */
- @ApiModelProperty(value = "用户id")
- @JsonSerialize(using = ToStringSerializer.class)
- private Long userId;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.java
deleted file mode 100644
index dc74444..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.vo.PropertyCapitalApplyVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 物业维修资金申请表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface PropertyCapitalApplyMapper extends BaseMapper<PropertyCapitalApplyEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCapitalApply
- * @return
- */
- List<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage page,
- @Param("propertyCapitalApply") PropertyCapitalApplyVO propertyCapitalApply,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml
deleted file mode 100644
index 5621d0f..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyCapitalApplyMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="propertyCapitalApplyResultMap"
- type="org.springblade.modules.property.entity.PropertyCapitalApplyEntity">
- <result column="id" property="id"/>
- <result column="property_company_id" property="propertyCompanyId"/>
- <result column="district_id" property="districtId"/>
- <result column="name" property="name"/>
- <result column="linkman" property="linkman"/>
- <result column="link_phone" property="linkPhone"/>
- <result column="allocation_way" property="allocationWay"/>
- <result column="budget_amount" property="budgetAmount"/>
- <result column="actual_amount" property="actualAmount"/>
- <result column="self_amount" property="selfAmount"/>
- <result column="budget_appropriate_amount" property="budgetAppropriateAmount"/>
- <result column="run_time" property="runTime"/>
- <result column="completed_time" property="completedTime"/>
- <result column="project_digest" property="projectDigest"/>
- <result column="project_describe" property="projectDescribe"/>
- <result column="construction_scheme_urls" property="constructionSchemeUrls"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="article_id" property="articleId"/>
- <result column="attachment" property="attachment"/>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectPropertyCapitalApplyPage" resultType="org.springblade.modules.property.vo.PropertyCapitalApplyVO">
- select
- jpca.*,
- jd.name as districtName
- from jczz_property_capital_apply jpca
- left join jczz_district jd on jd.id = jpca.district_id and jd.is_deleted = 0
- where jpca.is_deleted = 0
- <if test="propertyCapitalApply.districtId!=null">
- and jpca.district_id = #{propertyCapitalApply.districtId}
- </if>
- <if test="propertyCapitalApply.name!=null and propertyCapitalApply.name!=''">
- and jpca.name like concat('%',#{propertyCapitalApply.name},'%')
- </if>
- <if test="propertyCapitalApply.linkman!=null and propertyCapitalApply.linkman!=''">
- and jpca.linkman like concat('%',#{propertyCapitalApply.linkman},'%')
- </if>
- <if test="propertyCapitalApply.districtName!=null and propertyCapitalApply.districtName!=''">
- and jd.name like concat('%',#{propertyCapitalApply.districtName},'%')
- </if>
- <if test="propertyCapitalApply.districtIdList!=null and propertyCapitalApply.districtIdList.size()>0">
- and jpca.district_id in
- <foreach collection="propertyCapitalApply.districtIdList" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jd.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- </choose>
- </if>
- order by jpca.create_time desc
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.java
deleted file mode 100644
index d19e95f..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import liquibase.pro.packaged.P;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-import org.springblade.modules.property.vo.PropertyCompanyDetailVO;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 物业缴费项 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface PropertyChargeMapper extends BaseMapper<PropertyCharge> {
-
-
- List<PropertyChargeVO> getPage(IPage<PropertyChargeVO> page, @Param("vo") PropertyChargeVO propertyChargeVO);
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.xml
deleted file mode 100644
index 928703d..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyChargeMapper">
-
-
- <select id="getPage" resultType="org.springblade.modules.property.vo.PropertyChargeVO">
- SELECT
- DISTINCT jpch.*
- FROM
- jczz_property_charge jpch
- LEFT JOIN jczz_property_company jpco ON jpco.dept_id = jpch.property_id and jpco.is_deleted = 0
- where jpch.is_deleted = 0
- <if test="vo.propertyId != null and vo.propertyId != ''">
- AND jpch.property_id = #{vo.propertyId}
- </if>
- <if test="vo.name != null and vo.name != ''">
- AND jpch.name LIKE CONCAT('%',#{vo.name},'%')
- </if>
- <if test="vo.payType != null and vo.payType != ''">
- AND jpch.pay_type = #{vo.payType}
- </if>
- <if test="vo.payPeriod != null and vo.payPeriod != ''">
- AND jpch.pay_period = #{vo.payPeriod}
- </if>
- order by jpch.id desc,jpch.create_time desc
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.java
deleted file mode 100644
index bda5a80..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.property.dto.PropertyChargeRecordDTO;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-import org.springblade.modules.property.vo.PropertyChargeRecordVO;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-
-import java.util.List;
-
-/**
- * 物业缴费项 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface PropertyChargeRecordMapper extends BaseMapper<PropertyChargeRecord> {
-
-
- List<PropertyChargeRecordVO> getPage(IPage<PropertyChargeRecordVO> page, @Param("vo") PropertyChargeRecordVO vo);
-
-
- /**
- * 查询缴费记录表
- *
- * @param id 缴费记录表ID
- * @return 缴费记录表
- */
- public PropertyChargeRecordDTO selectPropertyChargeRecordById(Long id);
-
- /**
- * 查询缴费记录表列表
- *
- * @param propertyChargeRecordDTO 缴费记录表
- * @return 缴费记录表集合
- */
- public List<PropertyChargeRecordDTO> selectPropertyChargeRecordList(PropertyChargeRecordDTO propertyChargeRecordDTO);
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.xml
deleted file mode 100644
index ae8081d..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyChargeRecordMapper">
-
-
- <select id="getPage" resultType="org.springblade.modules.property.vo.PropertyChargeRecordVO">
- SELECT * FROM jczz_property_charge_record where is_deleted = 0
- </select>
-
-
- <resultMap type="org.springblade.modules.property.dto.PropertyChargeRecordDTO" id="PropertyChargeRecordDTOResult">
- <result property="id" column="id" />
- <result property="propertyId" column="property_id" />
- <result property="chargeId" column="charge_id" />
- <result property="no" column="no" />
- <result property="payUser" column="pay_user" />
- <result property="payTime" column="pay_time" />
- <result property="payFunc" column="pay_func" />
- <result property="payPrice" column="pay_price" />
- <result property="houseCode" column="house_code" />
- <result property="payContent" column="pay_content" />
- <result property="createTime" column="create_time" />
- <result property="createUser" column="create_user" />
- <result property="createDept" column="create_dept" />
- <result property="updateUser" column="update_user" />
- <result property="updateTime" column="update_time" />
- <result property="status" column="status" />
- <result property="isDeleted" column="is_deleted" />
- <result property="startTime" column="start_time" />
- <result property="endTime" column="end_time" />
- </resultMap>
-
- <sql id="selectPropertyChargeRecord">
- select
- id,
- property_id,
- charge_id,
- no,
- pay_user,
- pay_time,
- pay_func,
- pay_price,
- house_code,
- pay_content,
- create_time,
- create_user,
- create_dept,
- update_user,
- update_time,
- status,
- is_deleted,
- start_time,
- end_time
- from
- jczz_property_charge_record
- </sql>
-
- <select id="selectPropertyChargeRecordById" parameterType="long" resultMap="PropertyChargeRecordDTOResult">
- <include refid="selectPropertyChargeRecord"/>
- where
- id = #{id}
- </select>
-
- <select id="selectPropertyChargeRecordList" parameterType="org.springblade.modules.property.dto.PropertyChargeRecordDTO" resultMap="PropertyChargeRecordDTOResult">
- <include refid="selectPropertyChargeRecord"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="propertyId != null and propertyId != ''"> and property_id = #{propertyId}</if>
- <if test="chargeId != null and chargeId != ''"> and charge_id = #{chargeId}</if>
- <if test="no != null and no != ''"> and no = #{no}</if>
- <if test="payUser != null and payUser != ''"> and pay_user = #{payUser}</if>
- <if test="payTime != null "> and pay_time = #{payTime}</if>
- <if test="payFunc != null and payFunc != ''"> and pay_func = #{payFunc}</if>
- <if test="payPrice != null "> and pay_price = #{payPrice}</if>
- <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if>
- <if test="payContent != null and payContent != ''"> and pay_content = #{payContent}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="createUser != null "> and create_user = #{createUser}</if>
- <if test="createDept != null "> and create_dept = #{createDept}</if>
- <if test="updateUser != null "> and update_user = #{updateUser}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
- <if test="startTime != null "> and start_time = #{startTime}</if>
- <if test="endTime != null "> and end_time = #{endTime}</if>
- </where>
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java
deleted file mode 100644
index 12e6640..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 物业公司评论表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-05
- */
-public interface PropertyCompanyCommentMapper extends BaseMapper<PropertyCompanyCommentEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompanyComment
- * @return
- */
- List<PropertyCompanyCommentVO> selectPropertyCompanyCommentPage(IPage page,
- @Param("propertyCompanyComment") PropertyCompanyCommentVO propertyCompanyComment);
-
-
- /**
- * 递归分页查询
- * @param page
- * @param propertyCompanyComment
- * @return
- */
- List<PropertyCompanyCommentVO> selectPropertyCompanyCommentPageRec(IPage<PropertyCompanyCommentVO> page,
- @Param("propertyCompanyComment") PropertyCompanyCommentVO propertyCompanyComment);
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml
deleted file mode 100644
index a1346c4..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyCompanyCommentMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="propertyCompanyCommentResultMap" type="org.springblade.modules.property.vo.PropertyCompanyCommentVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="children" column="id" javaType="java.util.List"
- ofType="org.springblade.modules.property.vo.PropertyCompanyCommentVO"
- autoMapping="true"
- select="selectPropertyCompanyCommentByParentId">
- </collection>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectPropertyCompanyCommentPage" resultType="org.springblade.modules.property.vo.PropertyCompanyCommentVO">
- select
- jpcc.*,
- bu.real_name as realName,bu.avatar
- from jczz_property_company_comment jpcc
- left join blade_user bu on bu.id = jpcc.create_user
- where jpcc.is_deleted = 0
- and jpcc.parent_id = 0
- <if test="propertyCompanyComment.propertyCompanyId!=null">
- and jpcc.property_company_id = #{propertyCompanyComment.propertyCompanyId}
- </if>
- <if test="propertyCompanyComment.checkStatus!=null">
- and jpcc.check_status = #{propertyCompanyComment.checkStatus}
- </if>
-
- <if test="propertyCompanyComment.createUser!=null">
- and jpcc.create_user = #{propertyCompanyComment.createUser}
- </if>
- </select>
-
- <!--自定义分页查询(递归)-->
- <select id="selectPropertyCompanyCommentPageRec" parameterType="long"
- resultMap="propertyCompanyCommentResultMap">
- select
- jpcc.*,
- bu.real_name as realName,bu.avatar
- from jczz_property_company_comment jpcc
- left join blade_user bu on bu.id = jpcc.create_user
- where jpcc.is_deleted = 0
- and jpcc.parent_id = 0
- <if test="propertyCompanyComment.propertyCompanyId!=null">
- and jpcc.property_company_id = #{propertyCompanyComment.propertyCompanyId}
- </if>
- <if test="propertyCompanyComment.checkStatus!=null">
- and jpcc.check_status = #{propertyCompanyComment.checkStatus}
- </if>
-
- <if test="propertyCompanyComment.createUser!=null">
- and jpcc.create_user = #{propertyCompanyComment.createUser}
- </if>
- </select>
-
- <!--递归查询-->
- <select id="selectPropertyCompanyCommentByParentId"
- resultType="org.springblade.modules.property.vo.PropertyCompanyCommentVO">
- select
- jpcc.*,
- bu.real_name as realName,bu.avatar
- from jczz_property_company_comment jpcc
- left join blade_user bu on bu.id = jpcc.create_user
- where jpcc.is_deleted = 0
- and jpcc.parent_id = #{id}
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.java
deleted file mode 100644
index 7e9a915..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 物业派驻小区表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface PropertyCompanyDistrictMapper extends BaseMapper<PropertyCompanyDistrictEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompanyDistrict
- * @return
- */
- List<PropertyCompanyDistrictVO> selectPropertyCompanyDistrictPage(IPage page,
- @Param("propertyCompanyDistrict") PropertyCompanyDistrictVO propertyCompanyDistrict);
-
-
- List<UserEntity> getDistictUserByCode(String houseCode);
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
deleted file mode 100644
index 0ee126f..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyCompanyDistrictMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="propertyCompanyDistrictResultMap"
- type="org.springblade.modules.property.entity.PropertyCompanyDistrictEntity">
- <result column="id" property="id"/>
- <result column="property_company_id" property="propertyCompanyId"/>
- <result column="district_id" property="districtId"/>
- <result column="principal" property="principal"/>
- <result column="principal_phone" property="principalPhone"/>
- <result column="server_num" property="serverNum"/>
- <result column="butler_num" property="butlerNum"/>
- <result column="satisfaction" property="satisfaction"/>
- <result column="property_stage" property="propertyStage"/>
- <result column="start_time" property="startTime"/>
- <result column="end_time" property="endTime"/>
- <result column="remark" property="remark"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectPropertyCompanyDistrictPage"
- resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO">
- select
- jpcd.*,
- jd.name as districtName,
- jpc.name as propertyCompanyName,
- br.name communityName,
- br.name streetName,
- jg.grid_name,
- bu.name principalName
- FROM
- jczz_property_company_district jpcd
- LEFT JOIN jczz_district jd ON jd.id = jpcd.district_id AND jd.is_deleted = 0
- LEFT JOIN jczz_property_company jpc ON jpc.id = jpcd.property_company_id AND jpc.is_deleted = 0
- LEFT JOIN blade_region br on br.code= jd.community_code
- LEFT JOIN jczz_grid_range jgr on jgr.district_code=jd.id
- LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id
- LEFT JOIN blade_user bu on bu.id = jpcd.principal
- where jpcd.is_deleted = 0
- <if test="propertyCompanyDistrict.communityName!=null and propertyCompanyDistrict.communityName!=''">
- and br.name like concat('%', #{propertyCompanyDistrict.communityName},'%')
- </if>
-
- <if test="propertyCompanyDistrict.streetName!=null and propertyCompanyDistrict.streetName!=''">
- and br.name like concat('%', #{propertyCompanyDistrict.streetName},'%')
- </if>
-
- <if test="propertyCompanyDistrict.gridName!=null and propertyCompanyDistrict.gridName!=''">
- and jg.grid_name like concat('%', #{propertyCompanyDistrict.gridName},'%')
- </if>
-
- <if test="propertyCompanyDistrict.propertyCompanyId!=null">
- and jpcd.property_company_id = #{propertyCompanyDistrict.propertyCompanyId}
- </if>
-
- <if test="propertyCompanyDistrict.districtId!=null">
- and jpcd.district_id = #{propertyCompanyDistrict.districtId}
- </if>
- <if test="propertyCompanyDistrict.propertyStage!=null">
- and jpcd.property_stage = #{propertyCompanyDistrict.propertyStage}
- </if>
- <if test="propertyCompanyDistrict.deptId!=null and propertyCompanyDistrict.deptId != ''">
- and jpc.dept_id = #{propertyCompanyDistrict.deptId}
- </if>
- <if test="propertyCompanyDistrict.principal!=null and propertyCompanyDistrict.principal!=''">
- and jpcd.principal like concat('%',#{propertyCompanyDistrict.principal},'%')
- </if>
- <if test="propertyCompanyDistrict.districtName!=null and propertyCompanyDistrict.districtName!=''">
- and jd.name like concat('%',#{propertyCompanyDistrict.districtName},'%')
- </if>
- <if test="propertyCompanyDistrict.propertyCompanyName!=null and propertyCompanyDistrict.propertyCompanyName!=''">
- and jpc.name like concat('%',#{propertyCompanyDistrict.propertyCompanyName},'%')
- </if>
- <if test="propertyCompanyDistrict.districtIds != null and propertyCompanyDistrict.districtIds.size()>0">
- and jpcd.district_id in
- <foreach collection="propertyCompanyDistrict.districtIds" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </if>
- </select>
-
- <select id="getDistictUserByCode" resultType="org.springblade.modules.system.vo.UserVO">
- SELECT bu.*,
- jpc.name distictName
- FROM blade_user bu
- LEFT JOIN jczz_property_district_user jpdu ON bu.id = jpdu.user_id and bu.is_deleted = 0
- LEFT JOIN jczz_property_company_district jpcd ON jpdu.property_company_district_id = jpcd.id
- LEFT JOIN jczz_property_company jpc on jpc.id = jpcd.property_company_id
- LEFT JOIN jczz_district jd ON jd.id = jpcd.district_id
- LEFT JOIN jczz_doorplate_address jda ON jda.aoi_code = jd.aoi_code
- WHERE jda.address_code = #{houseCode}
- and bu.is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java
deleted file mode 100644
index 342be1d..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDetailVO;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.vo.PropertyDistrictInfo;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 物业公司 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface PropertyCompanyMapper extends BaseMapper<PropertyCompanyEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompany
- * @return
- */
- List<PropertyCompanyVO> selectPropertyCompanyPage(IPage page,
- @Param("propertyCompany") PropertyCompanyVO propertyCompany);
-
- /**
- * 物业公司列表查询(不分页)
- * @param propertyCompany
- * @return
- */
- List<PropertyCompanyVO> getPropertyCompanyList(@Param("propertyCompany") PropertyCompanyVO propertyCompany);
-
- /**
- * 物业公司查询对应的用户信息
- * @param propertyCompany
- * @return
- */
- List<Map<Long,String>> getUserByPropertyCompany(@Param("propertyCompany") PropertyCompanyVO propertyCompany);
-
- /**
- * 查询对应的机构id集合
- * @param toIntList
- * @return
- */
- List<Long> getDeptListByCompanyId(@Param("list") List<Integer> toIntList);
-
- PropertyCompanyVO getUserCompayDistrict(String houseCode);
-
- /**
- * 物业公司 自定义详情查询
- * @param propertyCompany
- * @return
- */
- PropertyCompanyDetailVO getDetail(@Param("propertyCompany") PropertyCompanyVO propertyCompany);
-
- PropertyDistrictInfo getPropertyDistrictInfo(@Param("info") PropertyDistrictInfo propertyDistrictInfo);
-
- PropertyCompanyDetailVO getDetailVO(@Param("propertyCompany")PropertyCompanyVO propertyCompany);
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
deleted file mode 100644
index 46eced3..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
+++ /dev/null
@@ -1,241 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyCompanyMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="propertyCompanyResultMap" type="org.springblade.modules.property.vo.PropertyCompanyVO">
- <result property="id" column="id" />
- <result property="deptId" column="dept_id" />
- <result property="name" column="name" />
- <result property="address" column="address" />
- <result property="socialCreditCode" column="social_credit_code" />
- <result property="province" column="province" />
- <result property="city" column="city" />
- <result property="area" column="area" />
- <result property="remark" column="remark" />
- <result property="createUser" column="create_user" />
- <result property="createTime" column="create_time" />
- <result property="updateUser" column="update_user" />
- <result property="updateTime" column="update_time" />
- <result property="isDeleted" column="is_deleted" />
- <result property="baseInfoScore" column="base_info_score" />
- <result property="operateinfoScore" column="operateInfo_score" />
- <result property="taxInfoScore" column="tax_info_score" />
- <result property="partyBuildingInfoScore" column="party_building_info_score" />
- <result property="goodCorporateScore" column="good_corporate_score" />
- <result property="goodProjectScore" column="good_project_score" />
- <result property="lllegalAndIrregularScore" column="lllegal_and_irregular_score" />
- <result property="evaluateScore" column="evaluate_score" />
- <result property="streetScore" column="street_score" />
- <result property="allScore" column="all_score" />
- </resultMap>
-
-
-
- <sql id="selectPropertyCompany">
- select
- id,
- name,
- address,
- social_credit_code,
- province_code,
- city_code,
- county_code,
- remark,
- create_user,
- create_time,
- update_user,
- update_time,
- is_deleted
- from
- jczz_property_company
- </sql>
-
-
- <!--自定义分页查询-->
- <select id="selectPropertyCompanyPage" resultMap="propertyCompanyResultMap">
- SELECT
- jpc.id,
- jpc.dept_id,
- jpc.NAME,
- jpc.address,
- jpc.social_credit_code,
- jpc.province,
- jpc.city,
- jpc.area,
- jpc.remark,
- jpc.create_user,
- jpc.create_time,
- jpc.update_user,
- jpc.update_time,
- jpc.is_deleted,
- jpc.base_info_score,
- jpc.operateInfo_score,
- jpc.tax_info_score,
- jpc.party_building_info_score,
- jpc.good_corporate_score,
- jpc.good_project_score,
- jpc.lllegal_and_irregular_score,
- jpc.evaluate_score,
- jpc.street_score,
- jpc.all_score,
- (
- SELECT
- GROUP_CONCAT( jd.`name` )
- FROM
- jczz_property_company_district jpcd
- LEFT JOIN jczz_district jd ON jpcd.district_id = jd.id
- WHERE
- jpcd.property_company_id = jpc.id
- ) districtNames
- FROM
- jczz_property_company jpc
- WHERE
- jpc.is_deleted = 0
- <if test="propertyCompany.name!=null and propertyCompany.name!=''">
- and jpc.name like concat('%',#{propertyCompany.name},'%')
- </if>
- </select>
-
- <!--物业公司列表查询(不分页)-->
- <select id="getPropertyCompanyList" resultType="org.springblade.modules.property.vo.PropertyCompanyVO">
- select * from jczz_property_company where is_deleted = 0
- <if test="propertyCompany.name!=null and propertyCompany.name!=''">
- and name like concat('%',#{propertyCompany.name},'%')
- </if>
- </select>
-
- <!--物业公司列表查询(不分页)-->
- <select id="getUserByPropertyCompany" resultType="java.util.Map">
- select
- bu.id,bu.real_name as name
- from blade_user bu
- left join blade_dept bd on bd.id = bu.dept_id and bd.is_deleted = 0
- left join jczz_property_company jpc on jpc.dept_id = bd.id and jpc.is_deleted = 0
- where bu.is_deleted = 0 and bu.real_name is not null
- and jpc.id = #{propertyCompany.id}
- </select>
-
- <!--查询对应的机构id集合-->
- <select id="getDeptListByCompanyId" resultType="java.lang.Long">
- select dept_id from jczz_property_company
- jpc where is_deleted = 0
- <choose>
- <when test="list != null and list.size()>0">
- and id in
- <foreach collection="list" item="id" separator ="," open="(" close=")">
- #{id}
- </foreach>
- </when>
- <otherwise>
- and id in ('')
- </otherwise>
- </choose>
- </select>
-
-
-
- <select id="getUserCompayDistrict" resultType="org.springblade.modules.property.vo.PropertyCompanyVO">
-
- select
- jpc.id,
- jpc.name,
- jpc.address,
- jpc.social_credit_code,
- jpc.province_code,
- jpc.city_code,
- jpc.county_code,
- jpc.remark,
- jpc.create_user,
- jpc.create_time,
- jpc.update_user,
- jpc.update_time,
- jpc.is_deleted,
- jpcd.principal_phone,
- jpcd.principal
- from
- jczz_property_company jpc LEFT JOIN jczz_property_company_district jpcd on jpc.id=jpcd.property_company_id
- LEFT JOIN jczz_doorplate_address jda on jpcd.district_id=jda.aoi_code
- where jda.address_code=#{houseCode}
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>-->
-<!-- <if test="name != null and name != ''"> and name = #{name}</if>-->
-<!-- <if test="address != null and address != ''"> and address = #{address}</if>-->
-<!-- <if test="socialCreditCode != null and socialCreditCode != ''"> and social_credit_code = #{socialCreditCode}</if>-->
-<!-- <if test="provinceCode != null and provinceCode != ''"> and province_code = #{provinceCode}</if>-->
-<!-- <if test="cityCode != null and cityCode != ''"> and city_code = #{cityCode}</if>-->
-<!-- <if test="countyCode != null and countyCode != ''"> and county_code = #{countyCode}</if>-->
-<!-- <if test="remark != null and remark != ''"> and remark = #{remark}</if>-->
-<!-- <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if>-->
-<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
-<!-- <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if>-->
-<!-- <if test="updateTime != null "> and update_time = #{updateTime}</if>-->
-<!-- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>-->
-<!-- </where>-->
- </select>
-
- <!--物业公司详情map-->
- <resultMap id="propertyCompanyDetailMap" type="org.springblade.modules.property.vo.PropertyCompanyDetailVO" autoMapping="true">
- <id property="id" column="id"/>
- <collection property="districtUserVOS" javaType="java.util.List"
- ofType="org.springblade.modules.property.vo.PropertyDistrictUserVO" autoMapping="true">
- <id property="id" column="cid"/>
- <result property="name" column="real_name"/>
- <result property="phone" column="companyPersonPhone"/>
- </collection>
- </resultMap>
-
- <!--自定义详情查询-->
- <select id="getDetail" resultMap="propertyCompanyDetailMap">
- SELECT DISTINCT jpc.*,
- jpcd.principal,
- jpcd.principal_phone AS principalPhone,
- bu.real_name,
- bu.phone AS companyPersonPhone
- FROM jczz_property_company jpc
- LEFT JOIN jczz_property_company_district jpcd
- ON jpcd.property_company_id = jpc.id and jpcd.is_deleted = 0
- LEFT JOIN jczz_property_district_user jpdu ON jpcd.id = jpdu.property_company_district_id
- LEFT JOIN blade_user bu ON locate(jpdu.user_id, bu.id) > 0 and bu.is_deleted = 0
- WHERE jpc.is_deleted = 0
- and bu.real_name is not null
- and jpc.id = #{propertyCompany.id}
- </select>
-
- <select id="getDetailVO" resultType="org.springblade.modules.property.vo.PropertyCompanyDetailVO">
- SELECT
- jpc.*
- FROM
- jczz_property_company jpc
- WHERE jpc.is_deleted = 0
- and jpc.id = #{propertyCompany.id}
- </select>
-
- <select id="getPropertyDistrictInfo" resultType="org.springblade.modules.property.vo.PropertyDistrictInfo">
-
- SELECT
- house.house_code as houseId,
- house.house_name as houseName,
- house.area as houseArea,
- district.name as districtName,
- district.id as districtId,
- company.id as id,
- company.dept_id as deptId,
- company.name as propertyCompanyName,
- charge.unit_price as unitPrice,
- charge.calculation_formula as payCalculationFormula,
- bdb.dict_value as payCalculationFormulaName
- FROM jczz_house house
- LEFT JOIN jczz_district district ON district.aoi_code = house.district_code
- LEFT JOIN jczz_property_charge charge ON charge.district_id = district.id
- LEFT JOIN jczz_property_company company ON company.dept_id = charge.property_id
- LEFT JOIN blade_dict_biz bdb ON bdb.dict_key = charge.pay_type
-
- WHERE house.is_deleted = 0 and bdb.code = 'payCalculationFormula'
- <if test="info.houseId != null and info.houseId !=''">
- AND house.house_code = #{info.houseId}
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java
deleted file mode 100644
index 9e5c4ab..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 物业公司评分表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-05
- */
-public interface PropertyCompanyScoreMapper extends BaseMapper<PropertyCompanyScoreEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompanyScore
- * @return
- */
- List<PropertyCompanyScoreVO> selectPropertyCompanyScorePage(IPage page, PropertyCompanyScoreVO propertyCompanyScore);
-
-
- Integer getScore(Integer propertyCompanyId);
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml
deleted file mode 100644
index 479ed50..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyCompanyScoreMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="propertyCompanyScoreResultMap"
- type="org.springblade.modules.property.entity.PropertyCompanyScoreEntity">
- <result column="id" property="id"/>
- <result column="property_company_id" property="propertyCompanyId"/>
- <result column="score" property="score"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
-
- <select id="selectPropertyCompanyScorePage" resultMap="propertyCompanyScoreResultMap">
- select *
- from jczz_property_company_score
- where is_deleted = 0
- </select>
-
-
- <select id="getScore" resultType="java.lang.Integer">
- select sum(score)
- from jczz_property_company_score
- where is_deleted = 0
- and property_company_id = #{propertyCompanyId}
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyDistrictUserMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyDistrictUserMapper.java
deleted file mode 100644
index 0ee9723..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyDistrictUserMapper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.modules.property.vo.PropertyDistrictUserVO;
-
-import java.util.List;
-
-/**
- * 物业公司人员派驻小区关联表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface PropertyDistrictUserMapper extends BaseMapper<PropertyDistrictUserEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyDistrictUser
- * @return
- */
- List<PropertyDistrictUserVO> selectPropertyDistrictUserPage(IPage page, PropertyDistrictUserVO propertyDistrictUser);
-
-
- List<String> selectPropertyDistrictByUserId(Long userId);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyDistrictUserMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyDistrictUserMapper.xml
deleted file mode 100644
index a444a2d..0000000
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyDistrictUserMapper.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.property.mapper.PropertyDistrictUserMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="propertyDistrictUserResultMap" type="org.springblade.modules.property.entity.PropertyDistrictUserEntity">
- <result column="id" property="id"/>
- <result column="property_company_id" property="propertyCompanyId"/>
- <result column="district_id" property="districtId"/>
- <result column="user_id" property="userId"/>
- </resultMap>
-
-
- <select id="selectPropertyDistrictUserPage" resultMap="propertyDistrictUserResultMap">
- select *
- from jczz_property_district_user
- where is_deleted = 0
- </select>
-
-
- <select id="selectPropertyDistrictByUserId" resultType="java.lang.String">
- SELECT distinct pcd.district_id
- FROM jczz_property_company_district pcd
- LEFT JOIN jczz_property_district_user pdu ON pcd.id = pdu.property_company_district_id
- where pdu.user_id = #{userId}
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCapitalApplyService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCapitalApplyService.java
deleted file mode 100644
index 5dbb5df..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyCapitalApplyService.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.vo.PropertyCapitalApplyVO;
-
-/**
- * 物业维修资金申请表 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IPropertyCapitalApplyService extends IService<PropertyCapitalApplyEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCapitalApply
- * @return
- */
- IPage<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage<PropertyCapitalApplyVO> page, PropertyCapitalApplyVO propertyCapitalApply);
-
-
- /**
- * 开启流程
- *
- * @param propertyCapitalApplyVO
- * @return boolean
- */
- boolean startProcess(PropertyCapitalApplyVO propertyCapitalApplyVO);
-
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyChargeRecordService.java b/src/main/java/org/springblade/modules/property/service/IPropertyChargeRecordService.java
deleted file mode 100644
index 6dffd84..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyChargeRecordService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-import org.springblade.modules.property.vo.PropertyChargeRecordVO;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-
-/**
- * 物业公司 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IPropertyChargeRecordService extends IService<PropertyChargeRecord> {
-
-
- IPage<PropertyChargeRecordVO> getPage(IPage<PropertyChargeRecordVO> page, PropertyChargeRecordVO vo);
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyChargeService.java b/src/main/java/org/springblade/modules/property/service/IPropertyChargeService.java
deleted file mode 100644
index 4c7c879..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyChargeService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-
-/**
- * 物业公司 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IPropertyChargeService extends BaseService<PropertyCharge> {
-
-
- IPage<PropertyChargeVO> getPage(IPage<PropertyChargeVO> page, PropertyChargeVO propertyChargeVO);
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java
deleted file mode 100644
index fd38e90..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 物业公司评论表 服务类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-public interface IPropertyCompanyCommentService extends IService<PropertyCompanyCommentEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompanyComment
- * @return
- */
- IPage<PropertyCompanyCommentVO> selectPropertyCompanyCommentPage(IPage<PropertyCompanyCommentVO> page, PropertyCompanyCommentVO propertyCompanyComment);
-
-
- /**
- * 物业公司评论表 自定义新增或修改
- */
- String saveOrUpdatePropertyCompanyComment(PropertyCompanyCommentVO propertyCompanyComment);
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyDistrictService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyDistrictService.java
deleted file mode 100644
index b5ca1f4..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyDistrictService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 物业派驻小区表 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IPropertyCompanyDistrictService extends IService<PropertyCompanyDistrictEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompanyDistrict
- * @return
- */
- IPage<PropertyCompanyDistrictVO> selectPropertyCompanyDistrictPage(IPage<PropertyCompanyDistrictVO> page, PropertyCompanyDistrictVO propertyCompanyDistrict);
-
-
- /**
- * 物业派驻小区表 自定义新增或修改
- * @param propertyCompanyDistrict
- * @return
- */
- boolean saveOrUpdatePropertyCompanyDistrict(PropertyCompanyDistrictEntity propertyCompanyDistrict);
-
- List<UserEntity> getDistictUserByCode(String houseCode);
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java
deleted file mode 100644
index 4f30e50..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 物业公司评分表 服务类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-public interface IPropertyCompanyScoreService extends IService<PropertyCompanyScoreEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompanyScore
- * @return
- */
- IPage<PropertyCompanyScoreVO> selectPropertyCompanyScorePage(IPage<PropertyCompanyScoreVO> page, PropertyCompanyScoreVO propertyCompanyScore);
-
-
- Integer getScore(Integer propertyCompanyId);
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java
deleted file mode 100644
index 9754fc0..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDetailVO;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.property.vo.PropertyDistrictInfo;
-
-import java.util.List;
-
-/**
- * 物业公司 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IPropertyCompanyService extends IService<PropertyCompanyEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompany
- * @return
- */
- IPage<PropertyCompanyVO> selectPropertyCompanyPage(IPage<PropertyCompanyVO> page, PropertyCompanyVO propertyCompany);
-
-
- /**
- * 物业公司列表查询(不分页)
- * @param propertyCompany
- * @return
- */
- Object getPropertyCompanyList(PropertyCompanyVO propertyCompany);
-
- /**
- * 物业公司查询对应的用户信息
- */
- Object getUserByPropertyCompany(PropertyCompanyVO propertyCompany);
-
- /**
- * 物业公司 自定义新增或修改
- */
- boolean saveOrUpdatePropertyCompany(PropertyCompanyEntity propertyCompany);
-
- /**
- * 物业公司 删除
- */
- boolean deleteByIds(List<Integer> toIntList);
-
- PropertyCompanyVO getUserCompayDistrict(String houseCode);
-
- /**
- * 物业公司 自定义详情查询
- * @param propertyCompany
- * @return
- */
- PropertyCompanyDetailVO getDetail(PropertyCompanyVO propertyCompany);
-
- Boolean payConfig(WxPayInfo wxPayInfo, AliPayInfo aliPayInfo);
-
- PropertyCompanyDetailVO getPayConfig(PropertyCompanyVO propertyCompany);
-
- PropertyCompanyDetailVO getDetailByDeptId();
-
- PropertyDistrictInfo getPropertyDistrictInfo(PropertyDistrictInfo propertyDistrictInfo);
-}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyDistrictUserService.java b/src/main/java/org/springblade/modules/property/service/IPropertyDistrictUserService.java
deleted file mode 100644
index 58a0c55..0000000
--- a/src/main/java/org/springblade/modules/property/service/IPropertyDistrictUserService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.modules.property.vo.PropertyDistrictUserVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 物业公司人员派驻小区关联表 服务类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public interface IPropertyDistrictUserService extends IService<PropertyDistrictUserEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyDistrictUser
- * @return
- */
- IPage<PropertyDistrictUserVO> selectPropertyDistrictUserPage(IPage<PropertyDistrictUserVO> page, PropertyDistrictUserVO propertyDistrictUser);
-
- List<String> selectPropertyDistrictByUserId(Long userId);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCapitalApplyServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCapitalApplyServiceImpl.java
deleted file mode 100644
index 53a1f1e..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyCapitalApplyServiceImpl.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.core.util.NetUtil;
-import org.flowable.engine.RepositoryService;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.flowable.engine.repository.ProcessDefinitionQuery;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.RoleUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.support.Kv;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.flow.business.service.IFlowService;
-import org.springblade.flow.core.constant.ProcessConstant;
-import org.springblade.flow.core.entity.BladeFlow;
-import org.springblade.flow.core.utils.FlowUtil;
-import org.springblade.flow.core.utils.TaskUtil;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
-import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeService;
-import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.mapper.PropertyCapitalApplyMapper;
-import org.springblade.modules.property.service.IPropertyCapitalApplyService;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.modules.property.vo.PropertyCapitalApplyVO;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IDeptService;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 物业维修资金申请表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Service
-public class PropertyCapitalApplyServiceImpl extends ServiceImpl<PropertyCapitalApplyMapper, PropertyCapitalApplyEntity> implements IPropertyCapitalApplyService {
- private static Logger logger = LoggerFactory.getLogger(NetUtil.class);
-
- @Autowired
- private IDeptService deptService;
-
- @Override
- public IPage<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage<PropertyCapitalApplyVO> page, PropertyCapitalApplyVO propertyCapitalApply) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(PropertyCapitalApplyVO.class, propertyCapitalApply);
- // 判断角色,物业角色只能查询当前小区的
- String userRole = AuthUtil.getUserRole();
- if (RoleUtil.isProperty(userRole)) {
- // 查询小区id
- IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
- List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()));
- if (one != null) {
- IPropertyCompanyDistrictService bean2 = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // 通过物业公司,查询小区
- List<PropertyCompanyDistrictEntity> list = bean2.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, one.getId()));
- if (list.size() > 0) {
- List<String> collect = list.stream().map(i -> i.getDistrictId()).collect(Collectors.toList());
- districtIds.addAll(collect);
- }
- }
- propertyCapitalApply.setDistrictIdList(districtIds);
- if (districtIds.size() == 0) {
- return page.setRecords(new ArrayList<>());
- }
- }
- return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply,
- commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator()));
- }
-
- @Autowired
- private IFlowService flowService;
- // private final IFlowService flowService;
- @Autowired
- private RepositoryService repositoryService;
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean startProcess(PropertyCapitalApplyVO applyVO) {
- String businessTable = FlowUtil.getBusinessTable(ProcessConstant.LEAVE_KEY);
- if (Func.isEmpty(applyVO.getId())) {
- // 保存leave
- applyVO.setApplyTime(DateUtil.now());
- save(applyVO);
- // 判断是否有业委会,查询业委会负责人
- IOwnersCommitteeService bean = SpringUtils.getBean(IOwnersCommitteeService.class);
- OwnersCommitteeEntity ywhInfo = bean.getOne(Wrappers.<OwnersCommitteeEntity>lambdaQuery()
- .eq(OwnersCommitteeEntity::getAreaId, applyVO.getDistrictId())
- .eq(OwnersCommitteeEntity::getDeleteFlag, 0)
- .eq(OwnersCommitteeEntity::getStatus, 0)
- .last("limit 1"));
- Integer ownersCommitteeFlag = CommonConstant.NUMBER_TWO;
- if (ywhInfo != null && ywhInfo.getPrincipalId() != null) {
- // 有业委会
- ownersCommitteeFlag = CommonConstant.NUMBER_ONE;
- }
- // 查询街道负责人 通过小区id 查询街道编码
- // 通过街道编码查询街道名称,
- // 通过街道名称查询 人的部门是街道名称的
- IUserService userService = SpringUtils.getBean(IUserService.class);
- IDistrictService districtService = SpringUtils.getBean(IDistrictService.class);
- IRegionService regionService = SpringUtils.getBean(IRegionService.class);
- IDeptService deptService = SpringUtils.getBean(IDeptService.class);
- DistrictEntity districtEntity = districtService.getOne(Wrappers.<DistrictEntity>lambdaQuery()
- .eq(DistrictEntity::getId, applyVO.getDistrictId()));
- User jdUserInfo = null;
- // 查询街道责人
- try {
- Region regionServiceOne = regionService.getOne(Wrappers.<Region>lambdaQuery()
- .eq(Region::getCode, districtEntity.getCommunityCode().substring(0, 9)));
-
- Dept deptServiceOne = deptService.getOne(Wrappers.<Dept>lambdaQuery()
- .eq(Dept::getDeptName, regionServiceOne.getName()));
-
- jdUserInfo = userService.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, deptServiceOne.getId())
- .like(User::getRoleId, "1729814500990304258").eq(User::getIsDeleted, 0).last("limit 1"));
- if (jdUserInfo == null) {
- logger.error("街道信息不存在***");
- throw new ServiceException("街道信息不存在");
- }
- } catch (Exception e) {
- logger.error("街道信息不存在", e);
- throw new ServiceException("街道信息不存在");
- }
- // 查询信州区住建局负责人
- User xzUserInfo = null;
- try {
-// Region region2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 6)));
- Dept dept3 = deptService.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, "信州区" + "住建局").last("limit 1"));
- xzUserInfo = userService.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, dept3.getId())
- .like(User::getRoleId, "1738072768615333890").eq(User::getIsDeleted, 0).last("limit 1"));
- if (xzUserInfo == null) {
- logger.error("信州区住建局信息不存在***");
- throw new ServiceException("信州区住建局信息不存在");
- }
- } catch (Exception e) {
- logger.error("信州区住建局信息不存在", e);
- throw new ServiceException("信州区住建局信息不存在");
- }
-
- // 查询上饶市住建局负责人
- User srUserInfo = null;
- try {
-// Region region2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 6)));
- Dept dept3 = deptService.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, "上饶市" + "住建局").last("limit 1"));
- srUserInfo = userService.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, dept3.getId())
- .like(User::getRoleId, "1738072768615333890").eq(User::getIsDeleted, 0).last("limit 1"));
- if (srUserInfo == null) {
- logger.error("上饶市住建局信息不存在***");
- throw new ServiceException("上饶市住建局信息不存在");
- }
- } catch (Exception e) {
- logger.error("上饶市住建局信息不存在", e);
- throw new ServiceException("上饶市住建局信息不存在");
- }
- Kv variables = null;
- ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery().latestVersion().orderByProcessDefinitionKey().asc();
- // 启动流程
- if (CommonConstant.NUMBER_ONE.equals(ownersCommitteeFlag) && CommonConstant.NUMBER_ONE.equals(applyVO.getPropertyFlag())) {
- applyVO.setApplyStatus(CommonConstant.NUMBER_ONE);
- ProcessDefinition processDefinition = processDefinitionQuery.processDefinitionKey("haveMaintenanceFundApply").singleResult();
- applyVO.setProcessDefinitionId(processDefinition.getId());
- // 有物业和有业委会
- variables = Kv.create()
- .set(ProcessConstant.TASK_VARIABLE_CREATE_USER, AuthUtil.getUserName())
- .set("ownersCommitteeUser", TaskUtil.getTaskUser(ywhInfo.getPrincipalId().toString()))
- .set("streetUser", TaskUtil.getTaskUser(jdUserInfo.getId().toString()))
- .set("constructionUser", TaskUtil.getTaskUser(xzUserInfo.getId().toString()))
- .set("srConstructionUser", TaskUtil.getTaskUser(srUserInfo.getId().toString()))
- .set("applyUser", TaskUtil.getTaskUser(AuthUtil.getUserId().toString()))
- .set("ownersCommitteeFlag", ownersCommitteeFlag);
- } else {
- if (CommonConstant.NUMBER_TWO.equals(ownersCommitteeFlag) && CommonConstant.NUMBER_ONE.equals(applyVO.getPropertyFlag())) {
- // 有物业和无业委会
- ProcessDefinition processDefinition = processDefinitionQuery.processDefinitionKey("haveMaintenanceFundApply").singleResult();
- applyVO.setProcessDefinitionId(processDefinition.getId());
- } else {
- // 无物业和无业委会
- ProcessDefinition processDefinition = processDefinitionQuery.processDefinitionKey("notMaintenanceFundApply").singleResult();
- applyVO.setProcessDefinitionId(processDefinition.getId());
- }
- applyVO.setApplyStatus(CommonConstant.NUMBER_TWO);
- variables = Kv.create()
- .set(ProcessConstant.TASK_VARIABLE_CREATE_USER, AuthUtil.getUserName())
- .set("streetUser", TaskUtil.getTaskUser(jdUserInfo.getId().toString()))
- .set("constructionUser", TaskUtil.getTaskUser(xzUserInfo.getId().toString()))
- .set("srConstructionUser", TaskUtil.getTaskUser(srUserInfo.getId().toString()))
- .set("applyUser", TaskUtil.getTaskUser(AuthUtil.getUserId().toString()))
- .set("ownersCommitteeFlag", ownersCommitteeFlag);
- }
- BladeFlow flow = flowService.startProcessInstanceById(applyVO.getProcessDefinitionId(),
- FlowUtil.getBusinessKey(businessTable, String.valueOf(applyVO.getId())), variables);
- if (Func.isNotEmpty(flow)) {
- log.debug("流程已启动,流程ID:" + flow.getProcessInstanceId());
- // 返回流程id写入leave
- applyVO.setProcessInstanceId(flow.getProcessInstanceId());
- updateById(applyVO);
- } else {
- throw new ServiceException("开启流程失败");
- }
- } else {
- updateById(applyVO);
- }
- return true;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyChargeRecordServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyChargeRecordServiceImpl.java
deleted file mode 100644
index 5aedd34..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyChargeRecordServiceImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-import org.springblade.modules.property.mapper.PropertyChargeMapper;
-import org.springblade.modules.property.mapper.PropertyChargeRecordMapper;
-import org.springblade.modules.property.service.IPropertyChargeRecordService;
-import org.springblade.modules.property.service.IPropertyChargeService;
-import org.springblade.modules.property.vo.PropertyChargeRecordVO;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-import org.springframework.stereotype.Service;
-
-@Service
-public class PropertyChargeRecordServiceImpl extends ServiceImpl<PropertyChargeRecordMapper, PropertyChargeRecord> implements IPropertyChargeRecordService {
- @Override
- public IPage<PropertyChargeRecordVO> getPage(IPage<PropertyChargeRecordVO> page, PropertyChargeRecordVO vo) {
- return page.setRecords(baseMapper.getPage(page, vo));
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyChargeServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyChargeServiceImpl.java
deleted file mode 100644
index ebf32ed..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyChargeServiceImpl.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.property.entity.PropertyCharge;
-import org.springblade.modules.property.mapper.PropertyChargeMapper;
-import org.springblade.modules.property.service.IPropertyChargeService;
-import org.springblade.modules.property.vo.PropertyChargeVO;
-import org.springframework.stereotype.Service;
-
-@Service
-public class PropertyChargeServiceImpl extends BaseServiceImpl<PropertyChargeMapper, PropertyCharge> implements IPropertyChargeService {
- @Override
- public IPage<PropertyChargeVO> getPage(IPage<PropertyChargeVO> page, PropertyChargeVO propertyChargeVO) {
- return page.setRecords(baseMapper.getPage(page, propertyChargeVO));
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java
deleted file mode 100644
index ca94ee8..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.modules.property.service.IPropertyCompanyScoreService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
-import org.springblade.modules.property.mapper.PropertyCompanyCommentMapper;
-import org.springblade.modules.property.service.IPropertyCompanyCommentService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.words.WorksService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.Map;
-
-/**
- * 物业公司评论表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Service
-public class PropertyCompanyCommentServiceImpl extends ServiceImpl<PropertyCompanyCommentMapper, PropertyCompanyCommentEntity> implements IPropertyCompanyCommentService {
-
- @Autowired
- private IPropertyCompanyScoreService propertyCompanyScoreService;
-
- @Autowired
- private WorksService worksService;
-
- @Override
- public IPage<PropertyCompanyCommentVO> selectPropertyCompanyCommentPage(IPage<PropertyCompanyCommentVO> page, PropertyCompanyCommentVO propertyCompanyComment) {
- if (null!=propertyCompanyComment.getIsRec()){
- // 递归查询
- return page.setRecords(baseMapper.selectPropertyCompanyCommentPageRec(page, propertyCompanyComment));
- }
- return page.setRecords(baseMapper.selectPropertyCompanyCommentPage(page, propertyCompanyComment));
- }
-
- /**
- * 物业公司评论表 自定义新增或修改
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public String saveOrUpdatePropertyCompanyComment(PropertyCompanyCommentVO propertyCompanyComment) {
- boolean flag = false;
- // 先进行敏感词过滤
- Map<String, Object> map = worksService.interceptWords(propertyCompanyComment.getContent());
- // 获取敏感词校验结果
- String iswords = map.get("iswords").toString();
- if (iswords.equals("false")){
- // 审核通过
- propertyCompanyComment.setCheckStatus(2);
- flag = save(propertyCompanyComment);
- // 更新评分
- if(flag) {
- updatePropertyCompanyScore(propertyCompanyComment);
- }
- // 返回
- return "操作成功";
- }else {
- // 审核不通过
- propertyCompanyComment.setCheckStatus(3);
- // 设置审核不通过的说明
- propertyCompanyComment.setCheckRemark(map.get("words").toString());
- // 保存
- save(propertyCompanyComment);
- // 返回
- return "当前评论内容中带有敏感词,当前评论无法生效!";
- }
- }
-
- /**
- * 更新评分
- * @param propertyCompanyComment
- */
- public void updatePropertyCompanyScore(PropertyCompanyCommentVO propertyCompanyComment) {
- // 查询当前的物业公司,当前人是否已经评分,如果已经评分,则更新,否则新增
- if (null!=propertyCompanyComment.getScore()){
- QueryWrapper<PropertyCompanyScoreEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).eq("create_user", AuthUtil.getUserId())
- .eq("property_company_id",propertyCompanyComment.getPropertyCompanyId());
- PropertyCompanyScoreEntity one = propertyCompanyScoreService.getOne(queryWrapper);
- if (null!=one){
- one.setScore(propertyCompanyComment.getScore());
- // 更新
- propertyCompanyScoreService.updateById(one);
- }else {
- PropertyCompanyScoreEntity propertyCompanyScoreEntity = new PropertyCompanyScoreEntity();
- propertyCompanyScoreEntity.setScore(propertyCompanyComment.getScore());
- propertyCompanyScoreEntity.setPropertyCompanyId(propertyCompanyComment.getPropertyCompanyId());
- propertyCompanyScoreEntity.setCreateUser(AuthUtil.getUserId());
- // 新增
- propertyCompanyScoreService.save(propertyCompanyScoreEntity);
- }
- // t 计算物业公司评价平均分
-
- QueryWrapper<PropertyCompanyScoreEntity> queryWrapperTwo = new QueryWrapper<>();
- queryWrapperTwo.eq("is_deleted",0).eq("property_company_id",propertyCompanyComment.getPropertyCompanyId());
- // t统计物业公司总评价数
- long count = propertyCompanyScoreService.count(queryWrapperTwo);
- // 统计物业公司总评价分
- Integer score = propertyCompanyScoreService.getScore(propertyCompanyComment.getPropertyCompanyId());
- // 计算评价分
- BigDecimal divide = BigDecimal.valueOf(score).divide(BigDecimal.valueOf(count));
- // 更新物业评价平均分
- PropertyCompanyEntity propertyCompanyEntity = new PropertyCompanyEntity();
- propertyCompanyEntity.setId(propertyCompanyComment.getPropertyCompanyId());
- propertyCompanyEntity.setEvaluateScore(divide);
- IPropertyCompanyService bean = SpringUtils.getBean(IPropertyCompanyService.class);
- bean.updateById(propertyCompanyEntity);
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyDistrictServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyDistrictServiceImpl.java
deleted file mode 100644
index ebe61f2..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyDistrictServiceImpl.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.common.exception.CustomException;
-import org.springblade.common.utils.RoleUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.modules.property.mapper.PropertyCompanyDistrictMapper;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 物业派驻小区表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Service
-public class PropertyCompanyDistrictServiceImpl extends ServiceImpl<PropertyCompanyDistrictMapper, PropertyCompanyDistrictEntity> implements IPropertyCompanyDistrictService {
-
- @Autowired
- private IPropertyDistrictUserService propertyDistrictUserService;
-
- /**
- * 自定义分页查询
- *
- * @param page
- * @param propertyCompanyDistrict
- * @return
- */
- @Override
- public IPage<PropertyCompanyDistrictVO> selectPropertyCompanyDistrictPage(IPage<PropertyCompanyDistrictVO> page, PropertyCompanyDistrictVO propertyCompanyDistrict) {
- // 物业 查询用户管理的小区
- String userRole = AuthUtil.getUserRole();
- if (RoleUtil.isProperty(userRole)) {
- propertyCompanyDistrict.setDeptId(AuthUtil.getDeptId());
- // 查询小区id
- IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
- List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()));
- if (one != null) {
- IPropertyCompanyDistrictService bean2 = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // 通过物业公司,查询小区
- List<PropertyCompanyDistrictEntity> list = bean2.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, one.getId()));
- if (list.size() > 0) {
- List<String> collect = list.stream().map(i -> i.getDistrictId()).collect(Collectors.toList());
- districtIds.addAll(collect);
- }
- }
- propertyCompanyDistrict.setDistrictIds(districtIds);
- if (districtIds.size() == 0) {
- return page.setRecords(new ArrayList<>());
- }
- }
- // 街道
- List<PropertyCompanyDistrictVO> propertyCompanyDistrictVOS = baseMapper.selectPropertyCompanyDistrictPage(page, propertyCompanyDistrict);
- return page.setRecords(propertyCompanyDistrictVOS);
- }
-
- /**
- * 物业派驻小区表 自定义新增或修改
- *
- * @param propertyCompanyDistrict
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean saveOrUpdatePropertyCompanyDistrict(PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- // IUserService bean = SpringUtil.getBean(IUserService.class);
- // User user = bean.getOne(Wrappers.<User>lambdaQuery().eq(User::getId, propertyCompanyDistrict.getPrincipal()));
- // if (StringUtils.isNotBlank(user.getRoleId())) {
- // if (!user.getRoleId().contains("1747504028253229058")) {
- // user.setRoleId(user.getRoleId() + ",1747504028253229058");
- // }
- // } else {
- // user.setRoleId("1747504028253229058");
- // }
- if (null != propertyCompanyDistrict.getId()) {
- // bean.updateById(user);
- return updateById(propertyCompanyDistrict) && submitPropertyDistrictUser(propertyCompanyDistrict);
- } else {
- long count = count(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getDistrictId, propertyCompanyDistrict.getDistrictId())
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, propertyCompanyDistrict.getPropertyCompanyId())
- .eq(PropertyCompanyDistrictEntity::getIsDeleted, 0));
- if (count > 0) {
- throw new CustomException("您已有该小区的合同,请勿重复添加!");
- }
- // bean.updateById(user);
- return save(propertyCompanyDistrict) && submitPropertyDistrictUser(propertyCompanyDistrict);
- }
- }
-
- /**
- * 关联关系维护
- *
- * @param propertyCompanyDistrict
- * @return
- */
- private boolean submitPropertyDistrictUser(PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- List<Long> userIdList = Func.toLongList(propertyCompanyDistrict.getUserId());
- List<Long> arrayList = new ArrayList<Long>(userIdList);
- // 把项目经理也加到物业用户关联表
- arrayList.add(Long.valueOf(propertyCompanyDistrict.getPrincipal()));
- List<PropertyDistrictUserEntity> propertyDistrictUserEntityList = new ArrayList<>();
- arrayList.forEach(userId -> {
- PropertyDistrictUserEntity propertyDistrictUserEntity = new PropertyDistrictUserEntity();
- propertyDistrictUserEntity.setUserId(userId);
- propertyDistrictUserEntity.setPropertyCompanyDistrictId(propertyCompanyDistrict.getId());
- propertyDistrictUserEntityList.add(propertyDistrictUserEntity);
- });
- // 先删除
- propertyDistrictUserService.remove(Wrappers.<PropertyDistrictUserEntity>update().lambda().eq(PropertyDistrictUserEntity::getPropertyCompanyDistrictId, propertyCompanyDistrict.getId()));
- // 再新增
- return propertyDistrictUserService.saveBatch(propertyDistrictUserEntityList);
- }
-
- @Override
- public List<UserEntity> getDistictUserByCode(String houseCode) {
- return baseMapper.getDistictUserByCode(houseCode);
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java
deleted file mode 100644
index 26b3052..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
-import org.springblade.modules.property.mapper.PropertyCompanyScoreMapper;
-import org.springblade.modules.property.service.IPropertyCompanyScoreService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 物业公司评分表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Service
-public class PropertyCompanyScoreServiceImpl extends ServiceImpl<PropertyCompanyScoreMapper, PropertyCompanyScoreEntity> implements IPropertyCompanyScoreService {
-
- @Override
- public IPage<PropertyCompanyScoreVO> selectPropertyCompanyScorePage(IPage<PropertyCompanyScoreVO> page, PropertyCompanyScoreVO propertyCompanyScore) {
- return page.setRecords(baseMapper.selectPropertyCompanyScorePage(page, propertyCompanyScore));
- }
-
- @Override
- public Integer getScore(Integer propertyCompanyId) {
- return baseMapper.getScore(propertyCompanyId);
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
deleted file mode 100644
index b0f6810..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.RoleUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.DigestUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.pay.service.IAliPayService;
-import org.springblade.modules.pay.service.IWxPayService;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.mapper.PropertyCompanyMapper;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.modules.property.vo.PropertyCompanyDetailVO;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.property.vo.PropertyDistrictInfo;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.entity.UserDept;
-import org.springblade.modules.system.service.IDeptService;
-import org.springblade.modules.system.service.IUserDeptService;
-import org.springblade.modules.system.service.IUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 物业公司 服务实现类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Service
-public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMapper, PropertyCompanyEntity> implements IPropertyCompanyService {
-
- @Autowired
- private IDeptService deptService;
-
- @Autowired
- private IWxPayService wxPayService;
-
- @Autowired
- private IAliPayService aliPayService;
-
- /**
- * 自定义分页
- *
- * @param page
- * @param propertyCompany
- * @return
- */
- @Override
- public IPage<PropertyCompanyVO> selectPropertyCompanyPage(IPage<PropertyCompanyVO> page, PropertyCompanyVO propertyCompany) {
- return page.setRecords(baseMapper.selectPropertyCompanyPage(page, propertyCompany));
- }
-
- /**
- * 物业公司列表查询(不分页)
- *
- * @param propertyCompany
- * @return
- */
- @Override
- public List<PropertyCompanyVO> getPropertyCompanyList(PropertyCompanyVO propertyCompany) {
- String userRole = AuthUtil.getUserRole();
- if (!AuthUtil.isAdministrator() && userRole.contains("wygly")) {
- Long deptId = Func.firstLong(AuthUtil.getDeptId());
- Dept dept = SysCache.getDept(deptId);
- propertyCompany.setName(dept.getDeptName());
- }
- return baseMapper.getPropertyCompanyList(propertyCompany);
- }
-
- /**
- * 物业公司查询对应的用户信息
- *
- * @param propertyCompany
- * @return
- */
- @Override
- public Object getUserByPropertyCompany(PropertyCompanyVO propertyCompany) {
- return baseMapper.getUserByPropertyCompany(propertyCompany);
- }
-
- /**
- * 物业公司 自定义新增或修改
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean saveOrUpdatePropertyCompany(PropertyCompanyEntity propertyCompany) {
- boolean flag = false;
- Dept dept = new Dept();
- dept.setDeptName(propertyCompany.getName());
- dept.setFullName(propertyCompany.getName());
- // 判断新增还是修改
- if (null != propertyCompany.getId()) {
- // 修改
- updateById(propertyCompany);
- // 修改住址机构信息
- dept.setId(propertyCompany.getDeptId());
- flag = deptService.updateById(dept);
- } else {
- // 查询父级id
- QueryWrapper<Dept> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("dept_name", "物业公司");
- Dept parentDept = deptService.getOne(wrapper);
- dept.setParentId(parentDept.getId());
- dept.setDeptCategory(1);
- dept.setSort(1);
- // 新增机构
- flag = deptService.save(dept);
- // 新增物业公司
- propertyCompany.setDeptId(dept.getId());
- // 新增用户
- User user = new User();
- user.setAccount(propertyCompany.getName());
- user.setUserType(1);
- user.setRealName(propertyCompany.getName());
- user.setName(propertyCompany.getName());
- user.setPassword(DigestUtil.encrypt(CommonConstant.DEFAULT_PASSWORD));
- user.setRoleId("1727864473262817281");
- user.setDeptId(dept.getId().toString());
- IUserService bean = SpringUtils.getBean(IUserService.class);
- boolean save = bean.save(user);
- // 新增用户和机构关联关系
- if (save) {
- UserDept userDept = new UserDept();
- userDept.setUserId(user.getId());
- userDept.setDeptId(dept.getId());
- IUserDeptService bean1 = SpringUtils.getBean(IUserDeptService.class);
- bean1.save(userDept);
- }
-
- System.out.println("保存用户结果:" + save);
- flag = save(propertyCompany);
- }
- return flag;
- }
-
- /**
- * 物业公司 删除
- */
- @Transactional(rollbackFor = Exception.class)
- @Override
- public boolean deleteByIds(List<Integer> toIntList) {
- // 先查询对应的机构id集合
- List<Long> deptIds = baseMapper.getDeptListByCompanyId(toIntList);
- // 删除机构,删除物业公司
- return removeByIds(toIntList) && deptService.removeByIds(deptIds);
- }
-
- @Override
- public PropertyCompanyVO getUserCompayDistrict(String houseCode) {
- return baseMapper.getUserCompayDistrict(houseCode);
- }
-
- /**
- * 物业公司 自定义详情查询
- *
- * @param propertyCompany
- * @return
- */
- @Override
- public PropertyCompanyDetailVO getDetail(PropertyCompanyVO propertyCompany) {
- return baseMapper.getDetail(propertyCompany);
- }
-
- @Override
- public Boolean payConfig(WxPayInfo wxPayInfo, AliPayInfo aliPayInfo) {
- boolean wx = wxPayService.saveOrUpdate(wxPayInfo);
- boolean ali = aliPayService.saveOrUpdate(aliPayInfo);
- return wx && ali;
- }
-
- @Override
- public PropertyCompanyDetailVO getPayConfig(PropertyCompanyVO propertyCompany) {
-
-
-// PropertyCompanyDetailVO detail = this.getDetail(propertyCompany);
- PropertyCompanyDetailVO detail = baseMapper.getDetailVO(propertyCompany);
-
-
- AliPayInfo pA = new AliPayInfo();
- pA.setPropertyCompanyId(detail.getId().toString());
- detail.setAliPayInfo(aliPayService.getOne(Condition.getQueryWrapper(pA)));
-
- WxPayInfo pW = new WxPayInfo();
- pW.setPropertyCompanyId(detail.getId().toString());
- detail.setWxPayInfo(wxPayService.getOne(Condition.getQueryWrapper(pW)));
-
- return detail;
- }
-
- /**
- * 通过用户机构查询
- *
- * @return
- */
- @Override
- public PropertyCompanyDetailVO getDetailByDeptId() {
- String userRole = AuthUtil.getUserRole();
- if (RoleUtil.isProperty(userRole)) {
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity propertyCompanyEntity = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()));
- if (propertyCompanyEntity != null) {
- return baseMapper.getDetailVO(BeanUtil.copyProperties(propertyCompanyEntity, PropertyCompanyVO.class));
- }
- }
- return null;
- }
-
- @Override
- public PropertyDistrictInfo getPropertyDistrictInfo(PropertyDistrictInfo propertyDistrictInfo) {
- return baseMapper.getPropertyDistrictInfo(propertyDistrictInfo);
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyDistrictUserServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyDistrictUserServiceImpl.java
deleted file mode 100644
index de73c4c..0000000
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyDistrictUserServiceImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.modules.property.vo.PropertyDistrictUserVO;
-import org.springblade.modules.property.mapper.PropertyDistrictUserMapper;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 物业公司人员派驻小区关联表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Service
-public class PropertyDistrictUserServiceImpl extends ServiceImpl<PropertyDistrictUserMapper, PropertyDistrictUserEntity> implements IPropertyDistrictUserService {
-
- @Override
- public IPage<PropertyDistrictUserVO> selectPropertyDistrictUserPage(IPage<PropertyDistrictUserVO> page, PropertyDistrictUserVO propertyDistrictUser) {
- return page.setRecords(baseMapper.selectPropertyDistrictUserPage(page, propertyDistrictUser));
- }
-
- @Override
- public List<String> selectPropertyDistrictByUserId(Long userId) {
- return baseMapper.selectPropertyDistrictByUserId(userId);
- }
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCapitalApplyVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCapitalApplyVO.java
deleted file mode 100644
index a757c22..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCapitalApplyVO.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 物业维修资金申请表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCapitalApplyVO extends PropertyCapitalApplyEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty("物业:0无 1有")
- private Integer propertyFlag;
-
- @ApiModelProperty("批复意见")
- private String comment;
-
- private List<String> districtIdList;
-
- /**
- * 小区名称
- */
- private String districtName;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 区域编号
- */
- private String communityCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyChargeRecordVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyChargeRecordVO.java
deleted file mode 100644
index a110f03..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyChargeRecordVO.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.springblade.modules.property.vo;
-
-import lombok.Data;
-import org.springblade.modules.property.entity.PropertyChargeRecord;
-
-@Data
-public class PropertyChargeRecordVO extends PropertyChargeRecord {
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyChargeVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyChargeVO.java
deleted file mode 100644
index b902c9c..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyChargeVO.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.springblade.modules.property.vo;
-
-import lombok.Data;
-import org.springblade.modules.property.entity.PropertyCharge;
-
-@Data
-public class PropertyChargeVO extends PropertyCharge {
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java
deleted file mode 100644
index 7ec28e5..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.circle.vo.CircleCommentVO;
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 物业公司评论表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyCommentVO extends PropertyCompanyCommentEntity {
- private static final long serialVersionUID = 1L;
-
- private List<CircleCommentVO> children;
-
- /**
- * 姓名
- */
- @ApiModelProperty("姓名")
- private String realName;
-
- /**
- * 头像
- */
- @ApiModelProperty("头像")
- private String avatar;
-
- /**
- * 是否递归查询 1:是 2:否
- */
- @ApiModelProperty("是否递归查询 1:是 2:否")
- private Integer isRec;
-
- /**
- * 评分
- */
- @ApiModelProperty("评分")
- private Integer score;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyDetailVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyDetailVO.java
deleted file mode 100644
index 090974f..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyDetailVO.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 物业公司 视图实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyDetailVO extends PropertyCompanyEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 负责人姓名
- */
- @ApiModelProperty(value = "负责人姓名")
- private String principal;
- /**
- * 负责人电话
- */
- @ApiModelProperty(value = "负责人电话")
- private String principalPhone;
-
- /**
- * 物业公司人员信息
- */
- private List<PropertyDistrictUserVO> districtUserVOS = new ArrayList<>();
-
-
- //微信商户
- private WxPayInfo wxPayInfo;
-
- //支付宝商户
- private AliPayInfo aliPayInfo;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyDistrictVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyDistrictVO.java
deleted file mode 100644
index db2581d..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyDistrictVO.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-
-import java.util.List;
-
-/**
- * 物业派驻小区表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyDistrictVO extends PropertyCompanyDistrictEntity {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 小区名称
- */
- private String districtName;
-
- /**
- * 物业公司名称
- */
- private String propertyCompanyName;
-
- // 物业id
- private List<String> districtIds;
-
-
- private String streetName;
- private String communityName;
-
- private String gridName;
-
- // 机构
- private String deptId;
-
- /**
- * 负责人名称
- */
- @ApiModelProperty(value = "负责人名称")
- private String principalName;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.java
deleted file mode 100644
index 0cf54a2..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业公司评分表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-05
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyScoreVO extends PropertyCompanyScoreEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
deleted file mode 100644
index 1705632..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.pay.entity.AliPayInfo;
-import org.springblade.modules.pay.entity.WxPayInfo;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 物业公司 视图实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyCompanyVO extends PropertyCompanyEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 负责人姓名
- */
- @ApiModelProperty(value = "负责人姓名")
- private String principal;
- /**
- * 负责人电话
- */
- @ApiModelProperty(value = "负责人电话")
- private String principalPhone;
- /**
- * 小区名称多个
- */
- @ApiModelProperty(value = "小区名称多个")
- private String districtNames;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyDistrictInfo.java b/src/main/java/org/springblade/modules/property/vo/PropertyDistrictInfo.java
deleted file mode 100644
index bff46b6..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyDistrictInfo.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.springblade.modules.property.vo;
-
-import lombok.Data;
-
-/**
- * 物业公司和房屋小区
- */
-@Data
-public class PropertyDistrictInfo {
-
- //物业公司id
- private String id;
-
- //物业公司关联机构id
- private String deptId;
-
- //物业公司名称
- private String propertyCompanyName;
-
- //小区id
- private String districtId;
- private String districtName;
-
- private String houseName;
- private String houseId;
-
- //房屋面积
- private Double houseArea;
-
- //缴费类型(1、物业费)
- private String payCalculationFormula;
- private String payCalculationFormulaName;
-
- //单价
- private Double unitPrice;
-
- //服务到期时间
- private String serviceEndTime;
-
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyDistrictUserVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyDistrictUserVO.java
deleted file mode 100644
index c19a74e..0000000
--- a/src/main/java/org/springblade/modules/property/vo/PropertyDistrictUserVO.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.vo;
-
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 物业公司人员派驻小区关联表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-23
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PropertyDistrictUserVO extends PropertyDistrictUserEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 姓名
- */
- private String name;
-
- /**
- * 电话
- */
- private String phone;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCapitalApplyWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCapitalApplyWrapper.java
deleted file mode 100644
index c7d9728..0000000
--- a/src/main/java/org/springblade/modules/property/wrapper/PropertyCapitalApplyWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
-import org.springblade.modules.property.vo.PropertyCapitalApplyVO;
-import java.util.Objects;
-
-/**
- * 物业维修资金申请表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public class PropertyCapitalApplyWrapper extends BaseEntityWrapper<PropertyCapitalApplyEntity, PropertyCapitalApplyVO> {
-
- public static PropertyCapitalApplyWrapper build() {
- return new PropertyCapitalApplyWrapper();
- }
-
- @Override
- public PropertyCapitalApplyVO entityVO(PropertyCapitalApplyEntity propertyCapitalApply) {
- PropertyCapitalApplyVO propertyCapitalApplyVO = Objects.requireNonNull(BeanUtil.copy(propertyCapitalApply, PropertyCapitalApplyVO.class));
-
- //User createUser = UserCache.getUser(propertyCapitalApply.getCreateUser());
- //User updateUser = UserCache.getUser(propertyCapitalApply.getUpdateUser());
- //propertyCapitalApplyVO.setCreateUserName(createUser.getName());
- //propertyCapitalApplyVO.setUpdateUserName(updateUser.getName());
-
- return propertyCapitalApplyVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.java
deleted file mode 100644
index 2803458..0000000
--- a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
-import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
-import java.util.Objects;
-
-/**
- * 物业公司评论表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-05
- */
-public class PropertyCompanyCommentWrapper extends BaseEntityWrapper<PropertyCompanyCommentEntity, PropertyCompanyCommentVO> {
-
- public static PropertyCompanyCommentWrapper build() {
- return new PropertyCompanyCommentWrapper();
- }
-
- @Override
- public PropertyCompanyCommentVO entityVO(PropertyCompanyCommentEntity propertyCompanyComment) {
- PropertyCompanyCommentVO propertyCompanyCommentVO = Objects.requireNonNull(BeanUtil.copy(propertyCompanyComment, PropertyCompanyCommentVO.class));
-
- //User createUser = UserCache.getUser(propertyCompanyComment.getCreateUser());
- //User updateUser = UserCache.getUser(propertyCompanyComment.getUpdateUser());
- //propertyCompanyCommentVO.setCreateUserName(createUser.getName());
- //propertyCompanyCommentVO.setUpdateUserName(updateUser.getName());
-
- return propertyCompanyCommentVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyDistrictWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyDistrictWrapper.java
deleted file mode 100644
index d821be8..0000000
--- a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyDistrictWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
-import java.util.Objects;
-
-/**
- * 物业派驻小区表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public class PropertyCompanyDistrictWrapper extends BaseEntityWrapper<PropertyCompanyDistrictEntity, PropertyCompanyDistrictVO> {
-
- public static PropertyCompanyDistrictWrapper build() {
- return new PropertyCompanyDistrictWrapper();
- }
-
- @Override
- public PropertyCompanyDistrictVO entityVO(PropertyCompanyDistrictEntity propertyCompanyDistrict) {
- PropertyCompanyDistrictVO propertyCompanyDistrictVO = Objects.requireNonNull(BeanUtil.copy(propertyCompanyDistrict, PropertyCompanyDistrictVO.class));
-
- //User createUser = UserCache.getUser(propertyCompanyDistrict.getCreateUser());
- //User updateUser = UserCache.getUser(propertyCompanyDistrict.getUpdateUser());
- //propertyCompanyDistrictVO.setCreateUserName(createUser.getName());
- //propertyCompanyDistrictVO.setUpdateUserName(updateUser.getName());
-
- return propertyCompanyDistrictVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.java
deleted file mode 100644
index fe582c5..0000000
--- a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
-import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
-import java.util.Objects;
-
-/**
- * 物业公司评分表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-05
- */
-public class PropertyCompanyScoreWrapper extends BaseEntityWrapper<PropertyCompanyScoreEntity, PropertyCompanyScoreVO> {
-
- public static PropertyCompanyScoreWrapper build() {
- return new PropertyCompanyScoreWrapper();
- }
-
- @Override
- public PropertyCompanyScoreVO entityVO(PropertyCompanyScoreEntity propertyCompanyScore) {
- PropertyCompanyScoreVO propertyCompanyScoreVO = Objects.requireNonNull(BeanUtil.copy(propertyCompanyScore, PropertyCompanyScoreVO.class));
-
- //User createUser = UserCache.getUser(propertyCompanyScore.getCreateUser());
- //User updateUser = UserCache.getUser(propertyCompanyScore.getUpdateUser());
- //propertyCompanyScoreVO.setCreateUserName(createUser.getName());
- //propertyCompanyScoreVO.setUpdateUserName(updateUser.getName());
-
- return propertyCompanyScoreVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyWrapper.java
deleted file mode 100644
index 8019f25..0000000
--- a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.vo.PropertyCompanyVO;
-import java.util.Objects;
-
-/**
- * 物业公司 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public class PropertyCompanyWrapper extends BaseEntityWrapper<PropertyCompanyEntity, PropertyCompanyVO> {
-
- public static PropertyCompanyWrapper build() {
- return new PropertyCompanyWrapper();
- }
-
- @Override
- public PropertyCompanyVO entityVO(PropertyCompanyEntity propertyCompany) {
- PropertyCompanyVO propertyCompanyVO = Objects.requireNonNull(BeanUtil.copy(propertyCompany, PropertyCompanyVO.class));
-
- //User createUser = UserCache.getUser(propertyCompany.getCreateUser());
- //User updateUser = UserCache.getUser(propertyCompany.getUpdateUser());
- //propertyCompanyVO.setCreateUserName(createUser.getName());
- //propertyCompanyVO.setUpdateUserName(updateUser.getName());
-
- return propertyCompanyVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyDistrictUserWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyDistrictUserWrapper.java
deleted file mode 100644
index 1eaaa71..0000000
--- a/src/main/java/org/springblade/modules/property/wrapper/PropertyDistrictUserWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.property.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.property.entity.PropertyDistrictUserEntity;
-import org.springblade.modules.property.vo.PropertyDistrictUserVO;
-import java.util.Objects;
-
-/**
- * 物业公司人员派驻小区关联表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-23
- */
-public class PropertyDistrictUserWrapper extends BaseEntityWrapper<PropertyDistrictUserEntity, PropertyDistrictUserVO> {
-
- public static PropertyDistrictUserWrapper build() {
- return new PropertyDistrictUserWrapper();
- }
-
- @Override
- public PropertyDistrictUserVO entityVO(PropertyDistrictUserEntity propertyDistrictUser) {
- PropertyDistrictUserVO propertyDistrictUserVO = Objects.requireNonNull(BeanUtil.copy(propertyDistrictUser, PropertyDistrictUserVO.class));
-
- //User createUser = UserCache.getUser(propertyDistrictUser.getCreateUser());
- //User updateUser = UserCache.getUser(propertyDistrictUser.getUpdateUser());
- //propertyDistrictUserVO.setCreateUserName(createUser.getName());
- //propertyDistrictUserVO.setUpdateUserName(updateUser.getName());
-
- return propertyDistrictUserVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/oss/AliOssBuilder.java b/src/main/java/org/springblade/modules/resource/builder/oss/AliOssBuilder.java
deleted file mode 100644
index a6a1e24..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/oss/AliOssBuilder.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.oss;
-
-import com.aliyun.oss.ClientConfiguration;
-import com.aliyun.oss.OSSClient;
-import com.aliyun.oss.common.auth.CredentialsProvider;
-import com.aliyun.oss.common.auth.DefaultCredentialProvider;
-import lombok.SneakyThrows;
-import org.springblade.core.oss.OssTemplate;
-import org.springblade.core.oss.AliossTemplate;
-import org.springblade.core.oss.props.OssProperties;
-import org.springblade.core.oss.rule.OssRule;
-import org.springblade.modules.resource.entity.Oss;
-
-/**
- * 阿里云存储构建类
- *
- * @author Chill
- */
-public class AliOssBuilder {
-
- @SneakyThrows
- public static OssTemplate template(Oss oss, OssRule ossRule) {
- // 创建配置类
- OssProperties ossProperties = new OssProperties();
- ossProperties.setEndpoint(oss.getEndpoint());
- ossProperties.setAccessKey(oss.getAccessKey());
- ossProperties.setSecretKey(oss.getSecretKey());
- ossProperties.setBucketName(oss.getBucketName());
- // 创建ClientConfiguration。ClientConfiguration是OSSClient的配置类,可配置代理、连接超时、最大连接数等参数。
- ClientConfiguration conf = new ClientConfiguration();
- // 设置OSSClient允许打开的最大HTTP连接数,默认为1024个。
- conf.setMaxConnections(1024);
- // 设置Socket层传输数据的超时时间,默认为50000毫秒。
- conf.setSocketTimeout(50000);
- // 设置建立连接的超时时间,默认为50000毫秒。
- conf.setConnectionTimeout(50000);
- // 设置从连接池中获取连接的超时时间(单位:毫秒),默认不超时。
- conf.setConnectionRequestTimeout(1000);
- // 设置连接空闲超时时间。超时则关闭连接,默认为60000毫秒。
- conf.setIdleConnectionTime(60000);
- // 设置失败请求重试次数,默认为3次。
- conf.setMaxErrorRetry(5);
- CredentialsProvider credentialsProvider = new DefaultCredentialProvider(ossProperties.getAccessKey(), ossProperties.getSecretKey());
- // 创建客户端
- OSSClient ossClient = new OSSClient(ossProperties.getEndpoint(), credentialsProvider, conf);
- return new AliossTemplate(ossClient, ossProperties, ossRule);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/oss/MinioOssBuilder.java b/src/main/java/org/springblade/modules/resource/builder/oss/MinioOssBuilder.java
deleted file mode 100644
index 6c3b45a..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/oss/MinioOssBuilder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.oss;
-
-import io.minio.MinioClient;
-import lombok.SneakyThrows;
-import org.springblade.core.oss.OssTemplate;
-import org.springblade.core.oss.MinioTemplate;
-import org.springblade.core.oss.props.OssProperties;
-import org.springblade.core.oss.rule.OssRule;
-import org.springblade.modules.resource.entity.Oss;
-
-/**
- * Minio云存储构建类
- *
- * @author Chill
- */
-public class MinioOssBuilder {
-
- @SneakyThrows
- public static OssTemplate template(Oss oss, OssRule ossRule) {
- // 创建配置类
- OssProperties ossProperties = new OssProperties();
- ossProperties.setEndpoint(oss.getEndpoint());
- ossProperties.setAccessKey(oss.getAccessKey());
- ossProperties.setSecretKey(oss.getSecretKey());
- ossProperties.setBucketName(oss.getBucketName());
- // 创建客户端
- MinioClient minioClient = MinioClient.builder()
- .endpoint(oss.getEndpoint())
- .credentials(oss.getAccessKey(), oss.getSecretKey())
- .build();
- return new MinioTemplate(minioClient, ossRule, ossProperties);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java b/src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java
deleted file mode 100644
index 53099d4..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.oss;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.oss.OssTemplate;
-import org.springblade.core.oss.enums.OssEnum;
-import org.springblade.core.oss.enums.OssStatusEnum;
-import org.springblade.core.oss.props.OssProperties;
-import org.springblade.core.oss.rule.BladeOssRule;
-import org.springblade.core.oss.rule.OssRule;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.core.tool.utils.WebUtil;
-import org.springblade.modules.resource.endpoint.OssEndpoint;
-import org.springblade.modules.resource.entity.Oss;
-import org.springblade.modules.resource.rule.MyOssRule;
-import org.springblade.modules.resource.service.IOssService;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
-
-/**
- * Oss云存储统一构建类
- *
- * @author Chill
- */
-public class OssBuilder {
-
- public static final String OSS_CODE = "oss:code:";
- public static final String OSS_PARAM_KEY = "code";
-
- private final OssProperties ossProperties;
- private final IOssService ossService;
-
- public OssBuilder(OssProperties ossProperties, IOssService ossService) {
- this.ossProperties = ossProperties;
- this.ossService = ossService;
- }
-
- /**
- * OssTemplate配置缓存池
- */
- private final Map<String, OssTemplate> templatePool = new ConcurrentHashMap<>();
-
- /**
- * oss配置缓存池
- */
- private final Map<String, Oss> ossPool = new ConcurrentHashMap<>();
-
- /**
- * 获取template
- *
- * @return OssProperties
- */
- public OssProperties ossProperties() {
- return ossProperties;
- }
-
- /**
- * 获取template
- *
- * @return OssTemplate
- */
- public OssTemplate template() {
- return template(StringPool.EMPTY);
- }
-
- /**
- * 获取template
- *
- * @param code 资源编号
- * @return OssTemplate
- */
- public OssTemplate template(String code) {
- String tenantId = AuthUtil.getTenantId();
- if (Strings.isBlank(tenantId)){
- tenantId = "000000";
- }
- Oss oss = getOss(tenantId, code);
- Oss ossCached = ossPool.get(tenantId);
- OssTemplate template = templatePool.get(tenantId);
- // 若为空或者不一致,则重新加载
- if (Func.hasEmpty(template, ossCached) || !oss.getEndpoint().equals(ossCached.getEndpoint()) || !oss.getAccessKey().equals(ossCached.getAccessKey())) {
- synchronized (OssBuilder.class) {
- template = templatePool.get(tenantId);
- if (Func.hasEmpty(template, ossCached) || !oss.getEndpoint().equals(ossCached.getEndpoint()) || !oss.getAccessKey().equals(ossCached.getAccessKey())) {
- OssRule ossRule;
- // 若采用默认设置则开启多租户模式, 若是用户自定义oss则不开启
- if (oss.getEndpoint().equals(ossProperties.getEndpoint()) && oss.getAccessKey().equals(ossProperties.getAccessKey()) && ossProperties.getTenantMode()) {
- ossRule = new BladeOssRule(Boolean.TRUE);
- } else {
- ossRule = new BladeOssRule(Boolean.FALSE);
- }
- if (oss.getCategory() == OssEnum.MINIO.getCategory()) {
- template = MinioOssBuilder.template(oss, ossRule);
- } else if (oss.getCategory() == OssEnum.QINIU.getCategory()) {
- template = QiniuOssBuilder.template(oss, ossRule);
- } else if (oss.getCategory() == OssEnum.ALI.getCategory()) {
- template = AliOssBuilder.template(oss, ossRule);
- } else if (oss.getCategory() == OssEnum.TENCENT.getCategory()) {
- template = TencentOssBuilder.template(oss, ossRule);
- }
- templatePool.put(tenantId, template);
- ossPool.put(tenantId, oss);
- }
- }
- }
- return template;
- }
-
- /**
- * 获取对象存储实体
- *
- * @param tenantId 租户ID
- * @return Oss
- */
- public Oss getOss(String tenantId, String code) {
- String key = tenantId;
- LambdaQueryWrapper<Oss> lqw = Wrappers.<Oss>query().lambda().eq(Oss::getTenantId, tenantId);
- // 获取传参的资源编号并查询,若有则返回,若没有则调启用的配置
- String ossCode = StringUtil.isBlank(code) ? WebUtil.getParameter(OSS_PARAM_KEY) : code;
- if (StringUtil.isNotBlank(ossCode)) {
- key = key.concat(StringPool.DASH).concat(ossCode);
- lqw.eq(Oss::getOssCode, ossCode);
- } else {
- lqw.eq(Oss::getStatus, OssStatusEnum.ENABLE.getNum());
- }
- Oss oss = CacheUtil.get(RESOURCE_CACHE, OSS_CODE, key, () -> {
- Oss o = ossService.getOne(lqw);
- // 若为空则调用默认配置
- if ((Func.isEmpty(o))) {
- Oss defaultOss = new Oss();
- defaultOss.setId(0L);
- defaultOss.setCategory(OssEnum.of(ossProperties.getName()).getCategory());
- defaultOss.setEndpoint(ossProperties.getEndpoint());
- defaultOss.setBucketName(ossProperties.getBucketName());
- defaultOss.setAccessKey(ossProperties.getAccessKey());
- defaultOss.setSecretKey(ossProperties.getSecretKey());
- return defaultOss;
- } else {
- return o;
- }
- });
- if (oss == null || oss.getId() == null) {
- throw new ServiceException("未获取到对应的对象存储配置");
- } else {
- return oss;
- }
- }
-
- /**
- * 获取template
- * @param prefixPath 上传文件前缀路径
- * @return OssTemplate
- */
- public OssTemplate templateByPrefixPath(String prefixPath) {
- return templateByPath(StringPool.EMPTY,prefixPath);
- }
-
- /**
- * 自定义路径前缀获取template
- *
- * @param code 资源编号
- * @param prefixPath 上传文件前缀路径
- * @return OssTemplate
- */
- public OssTemplate templateByPath(String code,String prefixPath) {
- String tenantId = AuthUtil.getTenantId();
- if (Strings.isBlank(tenantId)){
- tenantId = "000000";
- }
- Oss oss = getOss(tenantId, code);
- OssTemplate template = templatePool.get(tenantId);
- template = templatePool.get(tenantId);
- OssRule ossRule = new MyOssRule(Boolean.FALSE,prefixPath);
- if (oss.getCategory() == OssEnum.MINIO.getCategory()) {
- template = MinioOssBuilder.template(oss, ossRule);
- } else if (oss.getCategory() == OssEnum.QINIU.getCategory()) {
- template = QiniuOssBuilder.template(oss, ossRule);
- } else if (oss.getCategory() == OssEnum.ALI.getCategory()) {
- template = AliOssBuilder.template(oss, ossRule);
- } else if (oss.getCategory() == OssEnum.TENCENT.getCategory()) {
- template = TencentOssBuilder.template(oss, ossRule);
- }
- templatePool.put(tenantId, template);
- ossPool.put(tenantId, oss);
- return template;
- }
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/oss/QiniuOssBuilder.java b/src/main/java/org/springblade/modules/resource/builder/oss/QiniuOssBuilder.java
deleted file mode 100644
index 4e62287..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/oss/QiniuOssBuilder.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.oss;
-
-import com.qiniu.storage.BucketManager;
-import com.qiniu.storage.Configuration;
-import com.qiniu.storage.Region;
-import com.qiniu.storage.UploadManager;
-import com.qiniu.util.Auth;
-import lombok.SneakyThrows;
-import org.springblade.core.oss.OssTemplate;
-import org.springblade.core.oss.QiniuTemplate;
-import org.springblade.core.oss.props.OssProperties;
-import org.springblade.core.oss.rule.OssRule;
-import org.springblade.modules.resource.entity.Oss;
-
-/**
- * 七牛云存储构建类
- *
- * @author Chill
- */
-public class QiniuOssBuilder {
-
- @SneakyThrows
- public static OssTemplate template(Oss oss, OssRule ossRule) {
- OssProperties ossProperties = new OssProperties();
- ossProperties.setEndpoint(oss.getEndpoint());
- ossProperties.setAccessKey(oss.getAccessKey());
- ossProperties.setSecretKey(oss.getSecretKey());
- ossProperties.setBucketName(oss.getBucketName());
- Configuration cfg = new Configuration(Region.autoRegion());
- Auth auth = Auth.create(oss.getAccessKey(), oss.getSecretKey());
- UploadManager uploadManager = new UploadManager(cfg);
- BucketManager bucketManager = new BucketManager(auth, cfg);
- return new QiniuTemplate(auth, uploadManager, bucketManager, ossProperties, ossRule);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/oss/TencentOssBuilder.java b/src/main/java/org/springblade/modules/resource/builder/oss/TencentOssBuilder.java
deleted file mode 100644
index 041998c..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/oss/TencentOssBuilder.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.oss;
-
-import com.qcloud.cos.COSClient;
-import com.qcloud.cos.ClientConfig;
-import com.qcloud.cos.auth.BasicCOSCredentials;
-import com.qcloud.cos.auth.COSCredentials;
-import com.qcloud.cos.region.Region;
-import lombok.SneakyThrows;
-import org.springblade.core.oss.OssTemplate;
-import org.springblade.core.oss.props.OssProperties;
-import org.springblade.core.oss.rule.OssRule;
-import org.springblade.core.oss.TencentCosTemplate;
-import org.springblade.modules.resource.entity.Oss;
-
-/**
- * 腾讯云存储构建类
- *
- * @author Chill
- */
-public class TencentOssBuilder {
-
- @SneakyThrows
- public static OssTemplate template(Oss oss, OssRule ossRule) {
- // 创建配置类
- OssProperties ossProperties = new OssProperties();
- ossProperties.setEndpoint(oss.getEndpoint());
- ossProperties.setAccessKey(oss.getAccessKey());
- ossProperties.setSecretKey(oss.getSecretKey());
- ossProperties.setBucketName(oss.getBucketName());
- ossProperties.setAppId(oss.getAppId());
- ossProperties.setRegion(oss.getRegion());
- // 初始化用户身份信息(secretId, secretKey)
- COSCredentials credentials = new BasicCOSCredentials(ossProperties.getAccessKey(), ossProperties.getSecretKey());
- // 设置 bucket 的区域, COS 地域的简称请参照 https://cloud.tencent.com/document/product/436/6224
- Region region = new Region(ossProperties.getRegion());
- // clientConfig 中包含了设置 region, https(默认 http), 超时, 代理等 set 方法, 使用可参见源码或者常见问题 Java SDK 部分。
- ClientConfig clientConfig = new ClientConfig(region);
- // 设置OSSClient允许打开的最大HTTP连接数,默认为1024个。
- clientConfig.setMaxConnectionsCount(1024);
- // 设置Socket层传输数据的超时时间,默认为50000毫秒。
- clientConfig.setSocketTimeout(50000);
- // 设置建立连接的超时时间,默认为50000毫秒。
- clientConfig.setConnectionTimeout(50000);
- // 设置从连接池中获取连接的超时时间(单位:毫秒),默认不超时。
- clientConfig.setConnectionRequestTimeout(1000);
- COSClient cosClient = new COSClient(credentials, clientConfig);
- return new TencentCosTemplate(cosClient, ossProperties, ossRule);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/sms/AliSmsBuilder.java b/src/main/java/org/springblade/modules/resource/builder/sms/AliSmsBuilder.java
deleted file mode 100644
index b33312c..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/sms/AliSmsBuilder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.sms;
-
-import com.aliyuncs.DefaultAcsClient;
-import com.aliyuncs.IAcsClient;
-import com.aliyuncs.profile.DefaultProfile;
-import com.aliyuncs.profile.IClientProfile;
-import lombok.SneakyThrows;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.AliSmsTemplate;
-import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.modules.resource.entity.Sms;
-
-/**
- * 阿里云短信构建类
- *
- * @author Chill
- */
-public class AliSmsBuilder {
-
- @SneakyThrows
- public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
- SmsProperties smsProperties = new SmsProperties();
- smsProperties.setTemplateId(sms.getTemplateId());
- smsProperties.setAccessKey(sms.getAccessKey());
- smsProperties.setSecretKey(sms.getSecretKey());
- smsProperties.setRegionId(sms.getRegionId());
- smsProperties.setSignName(sms.getSignName());
- IClientProfile profile = DefaultProfile.getProfile(smsProperties.getRegionId(), smsProperties.getAccessKey(), smsProperties.getSecretKey());
- IAcsClient acsClient = new DefaultAcsClient(profile);
- return new AliSmsTemplate(smsProperties, acsClient, bladeRedis);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/sms/QiniuSmsBuilder.java b/src/main/java/org/springblade/modules/resource/builder/sms/QiniuSmsBuilder.java
deleted file mode 100644
index e104e9c..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/sms/QiniuSmsBuilder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.sms;
-
-import com.qiniu.sms.SmsManager;
-import com.qiniu.util.Auth;
-import lombok.SneakyThrows;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.core.sms.QiniuSmsTemplate;
-import org.springblade.modules.resource.entity.Sms;
-
-/**
- * 七牛云短信构建类
- *
- * @author Chill
- */
-public class QiniuSmsBuilder {
-
- @SneakyThrows
- public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
- SmsProperties smsProperties = new SmsProperties();
- smsProperties.setTemplateId(sms.getTemplateId());
- smsProperties.setAccessKey(sms.getAccessKey());
- smsProperties.setSecretKey(sms.getSecretKey());
- smsProperties.setSignName(sms.getSignName());
- Auth auth = Auth.create(smsProperties.getAccessKey(), smsProperties.getSecretKey());
- SmsManager smsManager = new SmsManager(auth);
- return new QiniuSmsTemplate(smsProperties, smsManager, bladeRedis);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/sms/SmsBuilder.java b/src/main/java/org/springblade/modules/resource/builder/sms/SmsBuilder.java
deleted file mode 100644
index 0080099..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/sms/SmsBuilder.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.sms;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.enums.SmsEnum;
-import org.springblade.core.sms.enums.SmsStatusEnum;
-import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.core.tool.utils.WebUtil;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.service.ISmsService;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
-
-/**
- * Sms短信服务统一构建类
- *
- * @author Chill
- */
-public class SmsBuilder {
-
- public static final String SMS_CODE = "sms:code:";
- public static final String SMS_PARAM_KEY = "code";
-
- private final SmsProperties smsProperties;
- private final ISmsService smsService;
- private final BladeRedis bladeRedis;
-
-
- public SmsBuilder(SmsProperties smsProperties, ISmsService smsService, BladeRedis bladeRedis) {
- this.smsProperties = smsProperties;
- this.smsService = smsService;
- this.bladeRedis = bladeRedis;
- }
-
- /**
- * SmsTemplate配置缓存池
- */
- private final Map<String, SmsTemplate> templatePool = new ConcurrentHashMap<>();
-
- /**
- * Sms配置缓存池
- */
- private final Map<String, Sms> smsPool = new ConcurrentHashMap<>();
-
-
- /**
- * 获取template
- *
- * @return SmsTemplate
- */
- public SmsTemplate template() {
- return template(StringPool.EMPTY);
- }
-
- /**
- * 获取template
- *
- * @param code 资源编号
- * @return SmsTemplate
- */
- public SmsTemplate template(String code) {
- String tenantId = AuthUtil.getTenantId();
- Sms sms = getSms(tenantId, code);
- Sms smsCached = smsPool.get(tenantId);
- SmsTemplate template = templatePool.get(tenantId);
- // 若为空或者不一致,则重新加载
- if (Func.hasEmpty(template, smsCached) || !sms.getTemplateId().equals(smsCached.getTemplateId()) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
- synchronized (SmsBuilder.class) {
- template = templatePool.get(tenantId);
- if (Func.hasEmpty(template, smsCached) || !sms.getTemplateId().equals(smsCached.getTemplateId()) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
- if (sms.getCategory() == SmsEnum.YUNPIAN.getCategory()) {
- template = YunpianSmsBuilder.template(sms, bladeRedis);
- } else if (sms.getCategory() == SmsEnum.QINIU.getCategory()) {
- template = QiniuSmsBuilder.template(sms, bladeRedis);
- } else if (sms.getCategory() == SmsEnum.ALI.getCategory()) {
- template = AliSmsBuilder.template(sms, bladeRedis);
- } else if (sms.getCategory() == SmsEnum.TENCENT.getCategory()) {
- template = TencentSmsBuilder.template(sms, bladeRedis);
- }
- templatePool.put(tenantId, template);
- smsPool.put(tenantId, sms);
- }
- }
- }
- return template;
- }
-
-
- /**
- * 获取短信实体
- *
- * @param tenantId 租户ID
- * @return Sms
- */
- public Sms getSms(String tenantId, String code) {
- String key = tenantId;
- LambdaQueryWrapper<Sms> lqw = Wrappers.<Sms>query().lambda().eq(Sms::getTenantId, tenantId);
- // 获取传参的资源编号并查询,若有则返回,若没有则调启用的配置
- String smsCode = StringUtil.isBlank(code) ? WebUtil.getParameter(SMS_PARAM_KEY) : code;
- if (StringUtil.isNotBlank(smsCode)) {
- key = key.concat(StringPool.DASH).concat(smsCode);
- lqw.eq(Sms::getSmsCode, smsCode);
- } else {
- lqw.eq(Sms::getStatus, SmsStatusEnum.ENABLE.getNum());
- }
- Sms sms = CacheUtil.get(RESOURCE_CACHE, SMS_CODE, key, () -> {
- Sms s = smsService.getOne(lqw);
- // 若为空则调用默认配置
- if ((Func.isEmpty(s))) {
- Sms defaultSms = new Sms();
- defaultSms.setId(0L);
- defaultSms.setTemplateId(smsProperties.getTemplateId());
- defaultSms.setRegionId(smsProperties.getRegionId());
- defaultSms.setCategory(SmsEnum.of(smsProperties.getName()).getCategory());
- defaultSms.setAccessKey(smsProperties.getAccessKey());
- defaultSms.setSecretKey(smsProperties.getSecretKey());
- defaultSms.setSignName(smsProperties.getSignName());
- return defaultSms;
- } else {
- return s;
- }
- });
- if (sms == null || sms.getId() == null) {
- throw new ServiceException("未获取到对应的短信配置");
- } else {
- return sms;
- }
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/sms/TencentSmsBuilder.java b/src/main/java/org/springblade/modules/resource/builder/sms/TencentSmsBuilder.java
deleted file mode 100644
index 293e651..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/sms/TencentSmsBuilder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.sms;
-
-import com.github.qcloudsms.SmsMultiSender;
-import lombok.SneakyThrows;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.core.sms.TencentSmsTemplate;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.entity.Sms;
-
-/**
- * 腾讯云短信构建类
- *
- * @author Chill
- */
-public class TencentSmsBuilder {
-
- @SneakyThrows
- public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
- SmsProperties smsProperties = new SmsProperties();
- smsProperties.setTemplateId(sms.getTemplateId());
- smsProperties.setAccessKey(sms.getAccessKey());
- smsProperties.setSecretKey(sms.getSecretKey());
- smsProperties.setSignName(sms.getSignName());
- SmsMultiSender smsSender = new SmsMultiSender(Func.toInt(smsProperties.getAccessKey()), sms.getSecretKey());
- return new TencentSmsTemplate(smsProperties, smsSender, bladeRedis);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/builder/sms/YunpianSmsBuilder.java b/src/main/java/org/springblade/modules/resource/builder/sms/YunpianSmsBuilder.java
deleted file mode 100644
index 7860077..0000000
--- a/src/main/java/org/springblade/modules/resource/builder/sms/YunpianSmsBuilder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.builder.sms;
-
-import com.yunpian.sdk.YunpianClient;
-import lombok.SneakyThrows;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.core.sms.YunpianSmsTemplate;
-import org.springblade.modules.resource.entity.Sms;
-
-/**
- * 云片短信构建类
- *
- * @author Chill
- */
-public class YunpianSmsBuilder {
-
- @SneakyThrows
- public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
- SmsProperties smsProperties = new SmsProperties();
- smsProperties.setTemplateId(sms.getTemplateId());
- smsProperties.setAccessKey(sms.getAccessKey());
- smsProperties.setSignName(sms.getSignName());
- YunpianClient client = new YunpianClient(smsProperties.getAccessKey()).init();
- return new YunpianSmsTemplate(smsProperties, client, bladeRedis);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/config/BladeOssConfiguration.java b/src/main/java/org/springblade/modules/resource/config/BladeOssConfiguration.java
deleted file mode 100644
index fc4e1d4..0000000
--- a/src/main/java/org/springblade/modules/resource/config/BladeOssConfiguration.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.config;
-
-import lombok.AllArgsConstructor;
-import org.springblade.core.oss.props.OssProperties;
-import org.springblade.modules.resource.builder.oss.OssBuilder;
-import org.springblade.modules.resource.service.IOssService;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Oss配置类
- *
- * @author Chill
- */
-@Configuration(proxyBeanMethods = false)
-@AllArgsConstructor
-public class BladeOssConfiguration {
-
- private final OssProperties ossProperties;
-
- private final IOssService ossService;
-
- @Bean
- public OssBuilder ossBuilder() {
- return new OssBuilder(ossProperties, ossService);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/config/BladeSmsConfiguration.java b/src/main/java/org/springblade/modules/resource/config/BladeSmsConfiguration.java
deleted file mode 100644
index 510bbba..0000000
--- a/src/main/java/org/springblade/modules/resource/config/BladeSmsConfiguration.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.config;
-
-import lombok.AllArgsConstructor;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.modules.resource.builder.sms.SmsBuilder;
-import org.springblade.modules.resource.service.ISmsService;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Sms配置类
- *
- * @author Chill
- */
-@Configuration(proxyBeanMethods = false)
-@AllArgsConstructor
-public class BladeSmsConfiguration {
-
- private final SmsProperties smsProperties;
-
- private final ISmsService smsService;
-
- private final BladeRedis bladeRedis;
-
- @Bean
- public SmsBuilder smsBuilder() {
- return new SmsBuilder(smsProperties, smsService, bladeRedis);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/controller/AttachController.java b/src/main/java/org/springblade/modules/resource/controller/AttachController.java
deleted file mode 100644
index 90eeffc..0000000
--- a/src/main/java/org/springblade/modules/resource/controller/AttachController.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.entity.Attach;
-import org.springblade.modules.resource.service.IAttachService;
-import org.springblade.modules.resource.vo.AttachVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 附件表 控制器
- *
- * @author Chill
- */
-@NonDS
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_RESOURCE_NAME + "/attach")
-@Api(value = "附件", tags = "附件")
-public class AttachController extends BladeController {
-
- private final IAttachService attachService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入attach")
- public R<Attach> detail(Attach attach) {
- Attach detail = attachService.getOne(Condition.getQueryWrapper(attach));
- return R.data(detail);
- }
-
- /**
- * 分页 附件表
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入attach")
- public R<IPage<Attach>> list(Attach attach, Query query) {
- IPage<Attach> pages = attachService.page(Condition.getPage(query), Condition.getQueryWrapper(attach));
- return R.data(pages);
- }
-
- /**
- * 自定义分页 附件表
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入attach")
- public R<IPage<AttachVO>> page(AttachVO attach, Query query) {
- IPage<AttachVO> pages = attachService.selectAttachPage(Condition.getPage(query), attach);
- return R.data(pages);
- }
-
- /**
- * 新增 附件表
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入attach")
- public R save(@Valid @RequestBody Attach attach) {
- return R.status(attachService.save(attach));
- }
-
- /**
- * 修改 附件表
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入attach")
- public R update(@Valid @RequestBody Attach attach) {
- return R.status(attachService.updateById(attach));
- }
-
- /**
- * 新增或修改 附件表
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入attach")
- public R submit(@Valid @RequestBody Attach attach) {
- return R.status(attachService.saveOrUpdate(attach));
- }
-
-
- /**
- * 删除 附件表
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(attachService.deleteLogic(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/controller/OssController.java b/src/main/java/org/springblade/modules/resource/controller/OssController.java
deleted file mode 100644
index 9a97103..0000000
--- a/src/main/java/org/springblade/modules/resource/controller/OssController.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.entity.Oss;
-import org.springblade.modules.resource.service.IOssService;
-import org.springblade.modules.resource.vo.OssVO;
-import org.springblade.modules.resource.wrapper.OssWrapper;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.validation.Valid;
-
-import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
-
-/**
- * 控制器
- *
- * @author BladeX
- */
-@NonDS
-@ApiIgnore
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_RESOURCE_NAME + "/oss")
-@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
-@Api(value = "对象存储接口", tags = "对象存储接口")
-public class OssController extends BladeController {
-
- private final IOssService ossService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入oss")
- public R<OssVO> detail(Oss oss) {
- Oss detail = ossService.getOne(Condition.getQueryWrapper(oss));
- return R.data(OssWrapper.build().entityVO(detail));
- }
-
- /**
- * 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入oss")
- public R<IPage<OssVO>> list(Oss oss, Query query) {
- IPage<Oss> pages = ossService.page(Condition.getPage(query), Condition.getQueryWrapper(oss));
- return R.data(OssWrapper.build().pageVO(pages));
- }
-
- /**
- * 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入oss")
- public R<IPage<OssVO>> page(OssVO oss, Query query) {
- IPage<OssVO> pages = ossService.selectOssPage(Condition.getPage(query), oss);
- return R.data(pages);
- }
-
- /**
- * 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入oss")
- public R save(@Valid @RequestBody Oss oss) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(ossService.save(oss));
- }
-
- /**
- * 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入oss")
- public R update(@Valid @RequestBody Oss oss) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(ossService.updateById(oss));
- }
-
- /**
- * 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入oss")
- public R submit(@Valid @RequestBody Oss oss) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(ossService.submit(oss));
- }
-
-
- /**
- * 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(ossService.deleteLogic(Func.toLongList(ids)));
- }
-
-
- /**
- * 启用
- */
- @PostMapping("/enable")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "配置启用", notes = "传入id")
- public R enable(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(ossService.enable(id));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/controller/SmsController.java b/src/main/java/org/springblade/modules/resource/controller/SmsController.java
deleted file mode 100644
index f9d6c45..0000000
--- a/src/main/java/org/springblade/modules/resource/controller/SmsController.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.service.ISmsService;
-import org.springblade.modules.resource.vo.SmsVO;
-import org.springblade.modules.resource.wrapper.SmsWrapper;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.validation.Valid;
-
-import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
-
-/**
- * 短信配置表 控制器
- *
- * @author BladeX
- */
-@NonDS
-//@ApiIgnore
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_RESOURCE_NAME + "/sms")
-@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
-@Api(value = "短信配置表", tags = "短信配置表接口")
-public class SmsController extends BladeController {
-
- private final ISmsService smsService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入sms")
- public R<SmsVO> detail(Sms sms) {
- Sms detail = smsService.getOne(Condition.getQueryWrapper(sms));
- return R.data(SmsWrapper.build().entityVO(detail));
- }
-
- /**
- * 分页 短信配置表
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入sms")
- public R<IPage<SmsVO>> list(Sms sms, Query query) {
- IPage<Sms> pages = smsService.page(Condition.getPage(query), Condition.getQueryWrapper(sms));
- return R.data(SmsWrapper.build().pageVO(pages));
- }
-
-
- /**
- * 自定义分页 短信配置表
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入sms")
- public R<IPage<SmsVO>> page(SmsVO sms, Query query) {
- IPage<SmsVO> pages = smsService.selectSmsPage(Condition.getPage(query), sms);
- return R.data(pages);
- }
-
- /**
- * 新增 短信配置表
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入sms")
- public R save(@Valid @RequestBody Sms sms) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(smsService.save(sms));
- }
-
- /**
- * 修改 短信配置表
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入sms")
- public R update(@Valid @RequestBody Sms sms) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(smsService.updateById(sms));
- }
-
- /**
- * 新增或修改 短信配置表
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入sms")
- public R submit(@Valid @RequestBody Sms sms) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(smsService.submit(sms));
- }
-
-
- /**
- * 删除 短信配置表
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(smsService.deleteLogic(Func.toLongList(ids)));
- }
-
- /**
- * 启用
- */
- @PostMapping("/enable")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "配置启用", notes = "传入id")
- public R enable(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
- CacheUtil.clear(RESOURCE_CACHE);
- return R.status(smsService.enable(id));
- }
-
-
- /**
- * 发送短信验证码
- */
- @PostMapping("/smsSend")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "发送短信验证码", notes = "")
- public R smsSend( @RequestParam(value = "phone",required = false) String phone,@RequestParam(value = "type",required = false)String type) {
-
- return R.status(smsService.smsSend(phone,type));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
deleted file mode 100644
index 5aab59f..0000000
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.endpoint;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.JSONPObject;
-import io.swagger.annotations.Api;
-import lombok.AllArgsConstructor;
-import lombok.SneakyThrows;
-import org.springblade.common.utils.ImageUtils;
-import org.springblade.common.utils.WeiXinSecurityUtil;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.oss.model.BladeFile;
-import org.springblade.core.oss.model.OssFile;
-import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.utils.FileUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.ImageUtil;
-import org.springblade.modules.resource.builder.oss.OssBuilder;
-import org.springblade.modules.resource.entity.Attach;
-import org.springblade.modules.resource.entity.AttachData;
-import org.springblade.modules.resource.service.IAttachDataService;
-import org.springblade.modules.resource.service.IAttachService;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-/**
- * 对象存储端点
- *
- * @author Chill
- */
-@NonDS
-@RestController
-@AllArgsConstructor
-@Api(value = "对象存储端点", tags = "对象存储端点")
-@RequestMapping(AppConstant.APPLICATION_RESOURCE_NAME + "/oss/endpoint")
-public class OssEndpoint {
-
- /**
- * 对象存储构建类
- */
- private final OssBuilder ossBuilder;
-
- /**
- * 附件表服务
- */
- private final IAttachService attachService;
-
- /**
- * 附件数据表服务
- */
- private final IAttachDataService attachDataService;
-
- /**
- * 创建存储桶
- *
- * @param bucketName 存储桶名称
- * @return Bucket
- */
- @SneakyThrows
- @PostMapping("/make-bucket")
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
- public R makeBucket(@RequestParam String bucketName) {
- ossBuilder.template().makeBucket(bucketName);
- return R.success("创建成功");
- }
-
- /**
- * 创建存储桶
- *
- * @param bucketName 存储桶名称
- * @return R
- */
- @SneakyThrows
- @PostMapping("/remove-bucket")
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
- public R removeBucket(@RequestParam String bucketName) {
- ossBuilder.template().removeBucket(bucketName);
- return R.success("删除成功");
- }
-
- /**
- * 拷贝文件
- *
- * @param fileName 存储桶对象名称
- * @param destBucketName 目标存储桶名称
- * @param destFileName 目标存储桶对象名称
- * @return R
- */
- @SneakyThrows
- @PostMapping("/copy-file")
- public R copyFile(@RequestParam String fileName, @RequestParam String destBucketName, String destFileName) {
- ossBuilder.template().copyFile(fileName, destBucketName, destFileName);
- return R.success("操作成功");
- }
-
- /**
- * 获取文件信息
- *
- * @param fileName 存储桶对象名称
- * @return InputStream
- */
- @SneakyThrows
- @GetMapping("/stat-file")
- public R<OssFile> statFile(@RequestParam String fileName) {
- return R.data(ossBuilder.template().statFile(fileName));
- }
-
- /**
- * 获取文件相对路径
- *
- * @param fileName 存储桶对象名称
- * @return String
- */
- @SneakyThrows
- @GetMapping("/file-path")
- public R<String> filePath(@RequestParam String fileName) {
- return R.data(ossBuilder.template().filePath(fileName));
- }
-
-
- /**
- * 获取文件外链
- *
- * @param fileName 存储桶对象名称
- * @return String
- */
- @SneakyThrows
- @GetMapping("/file-link")
- public R<String> fileLink(@RequestParam String fileName) {
- return R.data(ossBuilder.template().fileLink(fileName));
- }
-
- /**
- * 上传文件
- *
- * @param file 文件
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-file")
- public R<BladeFile> putFile(@RequestParam MultipartFile file) {
- BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
- // 修改link
- changeLink(bladeFile);
- // 返回
- return R.data(200, bladeFile, "");
- }
-
- /**
- * 上传文件
- *
- * @param file 文件
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-pdfFile")
- public R<BladeFile> putPdfFile(@RequestParam MultipartFile file) {
- String originalFilename = file.getOriginalFilename();
- String fileExtension = originalFilename.substring(originalFilename.lastIndexOf(".") + 1);
- if (fileExtension.equalsIgnoreCase("pdf")) {
- BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
- // 修改link
- changeLink(bladeFile);
- // 返回
- return R.data(200, bladeFile, "");
- } else {
- return R.fail("上传的附件必须是pdf格式!");
- }
-
- }
-
- /**
- * 修改link
- *
- * @param bladeFile
- */
- private void changeLink(BladeFile bladeFile) {
- if (null != bladeFile) {
- // 替换url link 前缀
- String newLink = ossBuilder.ossProperties().getEndpoint() + bladeFile.getName();
- bladeFile.setLink(newLink);
- }
- }
-
- /**
- * 上传文件
- *
- * @param fileName 存储桶对象名称
- * @param file 文件
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-file-by-name")
- public R<BladeFile> putFile(@RequestParam String fileName, @RequestParam MultipartFile file) {
- BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream());
- return R.data(bladeFile);
- }
-
- /**
- * 上传文件并保存至附件表
- *
- * @param file 文件
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-file-attach")
- public R<BladeFile> putFileAttach(@RequestParam MultipartFile file) {
- String fileName = file.getOriginalFilename();
- BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream());
- Long attachId = buildAttach(fileName, file.getSize(), bladeFile);
- bladeFile.setAttachId(attachId);
- // 修改link
- changeLink(bladeFile);
- // 返回
- return R.data(bladeFile);
- }
-
- /**
- * 上传文件并保存至附件表
- *
- * @param fileName 存储桶对象名称
- * @param file 文件
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-file-attach-by-name")
- public R<BladeFile> putFileAttach(@RequestParam(required = false) String fileName, @RequestParam MultipartFile file) {
- BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream());
- Long attachId = buildAttach(fileName, file.getSize(), bladeFile);
- bladeFile.setAttachId(attachId);
- return R.data(bladeFile);
- }
-
- /**
- * 自定义前缀上传文件
- *
- * @param file 文件
- * @param prefixPath 文件
- * @param isCheck 是否校验
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-file-by-prefix-path")
- public R<BladeFile> putFileByPrefixPath(@RequestParam MultipartFile file,
- @RequestParam(required = false) String prefixPath,
- @RequestParam(required = false) Integer isCheck) {
- // 不传默认不检验
- if (null != isCheck) {
- String checkResult = WeiXinSecurityUtil.checkImg(file);
- JSONObject jsonObject = JSONObject.parseObject(checkResult);
- Integer errorCode = Integer.parseInt(jsonObject.getString("errcode"));
- if (errorCode != 0) {
- return R.data(201, null, "图片存在敏感内容,请更换其他图片!");
- }
- }
- BladeFile bladeFile = ossBuilder.templateByPrefixPath(prefixPath).putFile(file.getOriginalFilename(), file.getInputStream());
- // 修改link
- changeLink(bladeFile);
- return R.data(200, bladeFile, "");
- }
-
- /**
- * 自定义前缀上传文件并保存至附件表
- *
- * @param file 文件
- * @param prefixPath 文件
- * @param isCheck 是否校验
- * @return ObjectStat
- */
- @SneakyThrows
- @PostMapping("/put-file-attach-by-prefix-path")
- public R<BladeFile> putFileAttachByPrefixPath(@RequestParam MultipartFile file,
- @RequestParam(required = false) String prefixPath,
- @RequestParam(required = false) Integer isCheck) {
- // 不传默认不检验
- if (null != isCheck) {
- String checkResult = WeiXinSecurityUtil.checkImg(file);
- JSONObject jsonObject = JSONObject.parseObject(checkResult);
- Integer errorCode = Integer.parseInt(jsonObject.getString("errcode"));
- if (errorCode != 0) {
- return R.data(201, null, "图片存在敏感内容,请更换其他图片!");
- }
- }
- String fileName = file.getOriginalFilename();
- BladeFile bladeFile = ossBuilder.templateByPrefixPath(prefixPath).putFile(file.getOriginalFilename(), file.getInputStream());
- Long attachId = buildAttach(fileName, file.getSize(), bladeFile);
- buildAttachData(attachId, fileName, file.getSize(), bladeFile, file);
- bladeFile.setAttachId(attachId);
- // 修改link
- changeLink(bladeFile);
- return R.data(200, bladeFile, "");
- }
-
- /**
- * 构建附件表
- *
- * @param fileName 文件名
- * @param fileSize 文件大小
- * @param bladeFile 对象存储文件
- * @return attachId
- */
- private Long buildAttach(String fileName, Long fileSize, BladeFile bladeFile) {
- String fileExtension = FileUtil.getFileExtension(fileName);
- Attach attach = new Attach();
- attach.setDomainUrl(bladeFile.getDomain());
- attach.setLink(bladeFile.getLink());
- attach.setName(bladeFile.getName());
- attach.setOriginalName(bladeFile.getOriginalName());
- attach.setAttachSize(fileSize);
- attach.setExtension(fileExtension);
- attachService.save(attach);
- return attach.getId();
- }
-
- /**
- * 构建附件数据表
- *
- * @param attachId 附件id
- * @param fileName 文件名
- * @param fileSize 文件大小
- * @param bladeFile 对象存储文件
- * @return attachId
- */
- private Long buildAttachData(Long attachId, String fileName, Long fileSize, BladeFile bladeFile, MultipartFile file) {
- String fileExtension = FileUtil.getFileExtension(fileName);
- AttachData attach = new AttachData();
- attach.setAttachId(attachId);
- attach.setName(bladeFile.getName());
- attach.setOriginalName(bladeFile.getOriginalName());
- attach.setSize(fileSize);
- attach.setExtension(fileExtension);
- attach.setData(ImageUtils.mulToBase64(file));
- attachDataService.save(attach);
- return attach.getId();
- }
-
- /**
- * 删除文件
- *
- * @param fileName 存储桶对象名称
- * @return R
- */
- @SneakyThrows
- @PostMapping("/remove-file")
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
- public R removeFile(@RequestParam String fileName) {
- ossBuilder.template().removeFile(fileName);
- return R.success("操作成功");
- }
-
- /**
- * 批量删除文件
- *
- * @param fileNames 存储桶对象名称集合
- * @return R
- */
- @SneakyThrows
- @PostMapping("/remove-files")
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
- public R removeFiles(@RequestParam String fileNames) {
- ossBuilder.template().removeFiles(Func.toStrList(fileNames));
- return R.success("操作成功");
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/endpoint/SmsEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/SmsEndpoint.java
deleted file mode 100644
index 70f7fc3..0000000
--- a/src/main/java/org/springblade/modules/resource/endpoint/SmsEndpoint.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.endpoint;
-
-import io.swagger.annotations.Api;
-import lombok.AllArgsConstructor;
-import lombok.SneakyThrows;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.sms.model.SmsCode;
-import org.springblade.core.sms.model.SmsData;
-import org.springblade.core.sms.model.SmsResponse;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.builder.sms.SmsBuilder;
-import org.springblade.modules.resource.utils.SmsUtil;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.springblade.modules.resource.utils.SmsUtil.*;
-
-/**
- * 短信服务端点
- *
- * @author Chill
- */
-@NonDS
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_RESOURCE_NAME + "/sms/endpoint")
-@Api(value = "短信服务端点", tags = "短信服务端点")
-public class SmsEndpoint {
-
- /**
- * 短信服务构建类
- */
- private final SmsBuilder smsBuilder;
-
- //================================= 短信服务校验 =================================
-
- /**
- * 短信验证码发送
- *
- * @param phone 手机号
- */
- @SneakyThrows
- @PostMapping("/send-validate")
- public R sendValidate(@RequestParam String phone) {
- Map<String, String> params = SmsUtil.getValidateParams();
- SmsCode smsCode = smsBuilder.template().sendValidate(new SmsData(params).setKey(PARAM_KEY), phone);
- return smsCode.isSuccess() ? R.data(smsCode, SEND_SUCCESS) : R.fail(SEND_FAIL);
- }
-
- /**
- * 校验短信
- *
- * @param smsCode 短信校验信息
- */
- @SneakyThrows
- @PostMapping("/validate-message")
- public R validateMessage(SmsCode smsCode) {
- boolean validate = smsBuilder.template().validateMessage(smsCode);
- return validate ? R.success(VALIDATE_SUCCESS) : R.fail(VALIDATE_FAIL);
- }
-
- //========== 通用短信自定义发送(支持自定义params参数传递, 推荐用于测试, 不推荐用于生产环境) ==========
-
- /**
- * 发送信息
- *
- * @param code 资源编号
- * @param params 自定义短信参数
- * @param phones 手机号集合
- */
- @SneakyThrows
- @PostMapping("/send-message")
- public R sendMessage(@RequestParam String code, @RequestParam String params, @RequestParam String phones) {
- SmsData smsData = new SmsData(JsonUtil.readMap(params, String.class, String.class));
- return send(code, smsData, phones);
- }
-
- //========== 指定短信服务发送(可根据各种场景自定拓展定制, 损失灵活性增加安全性, 推荐用于生产环境) ==========
-
- /**
- * 短信通知
- *
- * @param phones 手机号集合
- */
- @SneakyThrows
- @PostMapping("/send-notice")
- public R sendNotice(@RequestParam String phones) {
- Map<String, String> params = new HashMap<>(3);
- params.put("title", "通知标题");
- params.put("content", "通知内容");
- params.put("date", "通知时间");
- SmsData smsData = new SmsData(params);
- return send(smsData, phones);
- }
-
- /**
- * 订单通知
- *
- * @param phones 手机号集合
- */
- @SneakyThrows
- @PostMapping("/send-order")
- public R sendOrder(@RequestParam String phones) {
- Map<String, String> params = new HashMap<>(3);
- params.put("orderNo", "订单编号");
- params.put("packageNo", "快递单号");
- params.put("user", "收件人");
- SmsData smsData = new SmsData(params);
- return send(smsData, phones);
- }
-
- /**
- * 会议通知
- *
- * @param phones 手机号集合
- */
- @SneakyThrows
- @PostMapping("/send-meeting")
- public R sendMeeting(@RequestParam String phones) {
- Map<String, String> params = new HashMap<>(2);
- params.put("roomId", "会议室");
- params.put("topic", "会议主题");
- params.put("date", "会议时间");
- SmsData smsData = new SmsData(params);
- return send(smsData, phones);
- }
-
- //================================= 通用短信发送接口 =================================
-
- /**
- * 通用短信发送接口
- *
- * @param smsData 短信内容
- * @param phones 手机号列表
- * @return 是否发送成功
- */
- private R send(SmsData smsData, String phones) {
- SmsResponse response = smsBuilder.template().sendMessage(smsData, Func.toStrList(phones));
- return response.isSuccess() ? R.success(SEND_SUCCESS) : R.fail(SEND_FAIL);
- }
-
- /**
- * 通用短信发送接口
- *
- * @param code 资源编号
- * @param smsData 短信内容
- * @param phones 手机号列表
- * @return 是否发送成功
- */
- private R send(String code, SmsData smsData, String phones) {
- SmsResponse response = smsBuilder.template(code).sendMessage(smsData, Func.toStrList(phones));
- return response.isSuccess() ? R.success(SEND_SUCCESS) : R.fail(SEND_FAIL);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/entity/Attach.java b/src/main/java/org/springblade/modules/resource/entity/Attach.java
deleted file mode 100644
index 099fbc3..0000000
--- a/src/main/java/org/springblade/modules/resource/entity/Attach.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-/**
- * 附件表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_attach")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "Attach对象", description = "附件表")
-public class Attach extends TenantEntity {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 附件地址
- */
- @ApiModelProperty(value = "附件地址")
- private String link;
- /**
- * 附件域名
- */
- @ApiModelProperty(value = "附件域名")
- private String domainUrl;
- /**
- * 附件名称
- */
- @ApiModelProperty(value = "附件名称")
- private String name;
- /**
- * 附件原名
- */
- @ApiModelProperty(value = "附件原名")
- private String originalName;
- /**
- * 附件拓展名
- */
- @ApiModelProperty(value = "附件拓展名")
- private String extension;
- /**
- * 附件大小
- */
- @ApiModelProperty(value = "附件大小")
- private Long attachSize;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/entity/AttachData.java b/src/main/java/org/springblade/modules/resource/entity/AttachData.java
deleted file mode 100644
index 6312fcb..0000000
--- a/src/main/java/org/springblade/modules/resource/entity/AttachData.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.springblade.modules.resource.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 附件数据表实体类
- *
- * @author zhongrj
- */
-@Data
-@TableName("blade_attach_data")
-@ApiModel(value = "Attach对象", description = "附件表")
-public class AttachData implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键id
- */
- @ApiModelProperty(value = "主键id")
- @TableId(value = "id",type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 附件id
- */
- @ApiModelProperty(value = "附件id")
- private Long attachId;
- /**
- * 附件名称
- */
- @ApiModelProperty(value = "附件名称")
- private String name;
- /**
- * 附件原名
- */
- @ApiModelProperty(value = "附件原名")
- private String originalName;
- /**
- * 附件拓展名
- */
- @ApiModelProperty(value = "附件拓展名")
- private String extension;
- /**
- * 附件大小
- */
- @ApiModelProperty(value = "附件大小")
- private Long size;
-
- /**
- * 附件数据 base64
- */
- @ApiModelProperty(value = "附件数据 base64")
- private String data;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/entity/Oss.java b/src/main/java/org/springblade/modules/resource/entity/Oss.java
deleted file mode 100644
index cb5209c..0000000
--- a/src/main/java/org/springblade/modules/resource/entity/Oss.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-/**
- * 实体类
- *
- * @author BladeX
- */
-@Data
-@TableName("blade_oss")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "Oss对象", description = "Oss对象")
-public class Oss extends TenantEntity {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 所属分类
- */
- @ApiModelProperty(value = "所属分类")
- private Integer category;
-
- /**
- * 资源编号
- */
- @ApiModelProperty(value = "资源编号")
- private String ossCode;
-
- /**
- * oss地址
- */
- @ApiModelProperty(value = "资源地址")
- private String endpoint;
- /**
- * accessKey
- */
- @ApiModelProperty(value = "accessKey")
- private String accessKey;
- /**
- * secretKey
- */
- @ApiModelProperty(value = "secretKey")
- private String secretKey;
- /**
- * 空间名
- */
- @ApiModelProperty(value = "空间名")
- private String bucketName;
- /**
- * 应用ID TencentCOS需要
- */
- @ApiModelProperty(value = "应用ID")
- private String appId;
- /**
- * 地域简称 TencentCOS需要
- */
- @ApiModelProperty(value = "地域简称")
- private String region;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/entity/Sms.java b/src/main/java/org/springblade/modules/resource/entity/Sms.java
deleted file mode 100644
index 22985dc..0000000
--- a/src/main/java/org/springblade/modules/resource/entity/Sms.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-/**
- * 短信配置表实体类
- *
- * @author BladeX
- */
-@Data
-@TableName("blade_sms")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "Sms对象", description = "短信配置表")
-public class Sms extends TenantEntity {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 资源编号
- */
- @ApiModelProperty(value = "资源编号")
- private String smsCode;
-
- /**
- * 模板ID
- */
- @ApiModelProperty(value = "模板ID")
- private String templateId;
- /**
- * 分类
- */
- @ApiModelProperty(value = "分类")
- private Integer category;
- /**
- * accessKey
- */
- @ApiModelProperty(value = "accessKey")
- private String accessKey;
- /**
- * secretKey
- */
- @ApiModelProperty(value = "secretKey")
- private String secretKey;
- /**
- * regionId
- */
- @ApiModelProperty(value = "regionId")
- private String regionId;
- /**
- * 短信签名
- */
- @ApiModelProperty(value = "短信签名")
- private String signName;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/enums/SmsCodeEnum.java b/src/main/java/org/springblade/modules/resource/enums/SmsCodeEnum.java
deleted file mode 100644
index 1c46e27..0000000
--- a/src/main/java/org/springblade/modules/resource/enums/SmsCodeEnum.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.enums;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import org.springblade.core.tool.utils.StringPool;
-
-/**
- * Sms资源编码枚举类
- *
- * @author Chill
- * @apiNote 该枚举类对应短信配置模块的资源编码,可根据业务需求自行拓展
- */
-@Getter
-@AllArgsConstructor
-public enum SmsCodeEnum {
-
- /**
- * 默认编号
- */
- DEFAULT(StringPool.EMPTY, 1),
-
- /**
- * 验证码编号
- */
- VALIDATE("qiniu-validate", 2),
-
- /**
- * 通知公告编号
- */
- NOTICE("notice", 3),
-
- /**
- * 下单通知编号
- */
- ORDER("order", 4),
-
- /**
- * 会议通知编号
- */
- MEETING("meeting", 5),
- ;
-
- final String name;
- final int category;
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.java b/src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.java
deleted file mode 100644
index 6e6c6ec..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.springblade.modules.resource.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.resource.entity.AttachData;
-import org.springblade.modules.resource.vo.AttachDataVO;
-import java.util.List;
-
-/**
- * 附件数据表 Mapper 接口
- *
- * @author zhongrj
- */
-public interface AttachDataMapper extends BaseMapper<AttachData> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param attachData
- * @return
- */
- List<AttachDataVO> selectAttachDataPage(IPage page, AttachDataVO attachData);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.xml b/src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.xml
deleted file mode 100644
index fde1851..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.resource.mapper.AttachDataMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="attachDataResultMap" type="org.springblade.modules.resource.entity.AttachData">
- <result column="id" property="id"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="name" property="name"/>
- <result column="original_name" property="originalName"/>
- <result column="extension" property="extension"/>
- <result column="size" property="size"/>
- <result column="data" property="data"/>
- </resultMap>
-
-
- <select id="selectAttachDataPage" resultMap="attachDataResultMap">
- select * from blade_attach_data where 1=1
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/resource/mapper/AttachMapper.java b/src/main/java/org/springblade/modules/resource/mapper/AttachMapper.java
deleted file mode 100644
index 7f5bf02..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/AttachMapper.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.mapper;
-
-import org.springblade.modules.resource.entity.Attach;
-import org.springblade.modules.resource.vo.AttachVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 附件表 Mapper 接口
- *
- * @author Chill
- */
-public interface AttachMapper extends BaseMapper<Attach> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param attach
- * @return
- */
- List<AttachVO> selectAttachPage(IPage page, AttachVO attach);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/mapper/AttachMapper.xml b/src/main/java/org/springblade/modules/resource/mapper/AttachMapper.xml
deleted file mode 100644
index 305d38b..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/AttachMapper.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.resource.mapper.AttachMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="attachResultMap" type="org.springblade.modules.resource.entity.Attach">
- <result column="id" property="id"/>
- <result column="create_user" property="createUser"/>
- <result column="create_dept" property="createDept"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="status" property="status"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="link" property="link"/>
- <result column="domain_url" property="domainUrl"/>
- <result column="name" property="name"/>
- <result column="original_name" property="originalName"/>
- <result column="extension" property="extension"/>
- <result column="attach_size" property="attachSize"/>
- </resultMap>
-
-
- <select id="selectAttachPage" resultMap="attachResultMap">
- select * from blade_attach where is_deleted = 0
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/resource/mapper/OssMapper.java b/src/main/java/org/springblade/modules/resource/mapper/OssMapper.java
deleted file mode 100644
index 9094150..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/OssMapper.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.resource.entity.Oss;
-import org.springblade.modules.resource.vo.OssVO;
-
-import java.util.List;
-
-/**
- * Mapper 接口
- *
- * @author BladeX
- */
-public interface OssMapper extends BaseMapper<Oss> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param oss
- * @return
- */
- List<OssVO> selectOssPage(IPage page, OssVO oss);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/mapper/OssMapper.xml b/src/main/java/org/springblade/modules/resource/mapper/OssMapper.xml
deleted file mode 100644
index 7c06a3b..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/OssMapper.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.resource.mapper.OssMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="ossResultMap" type="org.springblade.modules.resource.entity.Oss">
- <result column="id" property="id"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="status" property="status"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="oss_code" property="ossCode"/>
- <result column="category" property="category"/>
- <result column="endpoint" property="endpoint"/>
- <result column="access_key" property="accessKey"/>
- <result column="secret_key" property="secretKey"/>
- <result column="bucket_name" property="bucketName"/>
- <result column="app_id" property="appId"/>
- <result column="region" property="region"/>
- <result column="remark" property="remark"/>
- </resultMap>
-
-
- <select id="selectOssPage" resultMap="ossResultMap">
- select * from blade_oss where is_deleted = 0
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/resource/mapper/SmsMapper.java b/src/main/java/org/springblade/modules/resource/mapper/SmsMapper.java
deleted file mode 100644
index 6103d2d..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/SmsMapper.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.vo.SmsVO;
-
-import java.util.List;
-
-/**
- * 短信配置表 Mapper 接口
- *
- * @author BladeX
- */
-public interface SmsMapper extends BaseMapper<Sms> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param sms
- * @return
- */
- List<SmsVO> selectSmsPage(IPage page, SmsVO sms);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/mapper/SmsMapper.xml b/src/main/java/org/springblade/modules/resource/mapper/SmsMapper.xml
deleted file mode 100644
index 3c88437..0000000
--- a/src/main/java/org/springblade/modules/resource/mapper/SmsMapper.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.resource.mapper.SmsMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="smsResultMap" type="org.springblade.modules.resource.entity.Sms">
- <result column="id" property="id"/>
- <result column="create_user" property="createUser"/>
- <result column="create_dept" property="createDept"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="status" property="status"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="sms_code" property="smsCode"/>
- <result column="template_id" property="templateId"/>
- <result column="category" property="category"/>
- <result column="access_key" property="accessKey"/>
- <result column="secret_key" property="secretKey"/>
- <result column="region_id" property="regionId"/>
- <result column="sign_name" property="signName"/>
- <result column="remark" property="remark"/>
- </resultMap>
-
-
- <select id="selectSmsPage" resultMap="smsResultMap">
- select * from blade_sms where is_deleted = 0
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/resource/rule/MyOssRule.java b/src/main/java/org/springblade/modules/resource/rule/MyOssRule.java
deleted file mode 100644
index cc292c8..0000000
--- a/src/main/java/org/springblade/modules/resource/rule/MyOssRule.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.springblade.modules.resource.rule;
-
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.core.oss.rule.BladeOssRule;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.FileUtil;
-import org.springblade.core.tool.utils.StringUtil;
-
-public class MyOssRule extends BladeOssRule {
-
- private String prefixPath;
-
- @Override
- public String bucketName(String bucketName) {
- return super.bucketName(bucketName);
- }
-
- public MyOssRule(Boolean tenantMode) {
- super(tenantMode);
- }
-
- public MyOssRule(Boolean tenantMode, String prefixPath) {
- super(tenantMode);
- if (!Strings.isBlank(prefixPath)) {
- this.prefixPath = prefixPath;
- }else {
- this.prefixPath = "upload";
- }
- }
-
- @Override
- public String fileName(String originalFilename) {
- return this.prefixPath + "/" + DateUtil.today() + "/" + StringUtil.randomUUID() + "." + FileUtil.getFileExtension(originalFilename);
- }
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/IAttachDataService.java b/src/main/java/org/springblade/modules/resource/service/IAttachDataService.java
deleted file mode 100644
index db8337e..0000000
--- a/src/main/java/org/springblade/modules/resource/service/IAttachDataService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.springblade.modules.resource.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.resource.entity.AttachData;
-import org.springblade.modules.resource.vo.AttachDataVO;
-import org.springblade.modules.resource.vo.AttachVO;
-
-/**
- * 附件数据表 服务类
- *
- * @author zhongrj
- */
-public interface IAttachDataService extends IService<AttachData> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param attachData
- * @return
- */
- IPage<AttachDataVO> selectAttachDataPage(IPage<AttachDataVO> page, AttachDataVO attachData);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/IAttachService.java b/src/main/java/org/springblade/modules/resource/service/IAttachService.java
deleted file mode 100644
index 347442d..0000000
--- a/src/main/java/org/springblade/modules/resource/service/IAttachService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.service;
-
-import org.springblade.modules.resource.entity.Attach;
-import org.springblade.modules.resource.vo.AttachVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 附件表 服务类
- *
- * @author Chill
- */
-public interface IAttachService extends BaseService<Attach> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param attach
- * @return
- */
- IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/IOssService.java b/src/main/java/org/springblade/modules/resource/service/IOssService.java
deleted file mode 100644
index de1a7dc..0000000
--- a/src/main/java/org/springblade/modules/resource/service/IOssService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.resource.entity.Oss;
-import org.springblade.modules.resource.vo.OssVO;
-
-/**
- * 服务类
- *
- * @author BladeX
- */
-public interface IOssService extends BaseService<Oss> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param oss
- * @return
- */
- IPage<OssVO> selectOssPage(IPage<OssVO> page, OssVO oss);
-
- /**
- * 提交oss信息
- *
- * @param oss
- * @return
- */
- boolean submit(Oss oss);
-
- /**
- * 启动配置
- *
- * @param id
- * @return
- */
- boolean enable(Long id);
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/ISmsService.java b/src/main/java/org/springblade/modules/resource/service/ISmsService.java
deleted file mode 100644
index 2837e24..0000000
--- a/src/main/java/org/springblade/modules/resource/service/ISmsService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.vo.SmsVO;
-
-/**
- * 短信配置表 服务类
- *
- * @author BladeX
- */
-public interface ISmsService extends BaseService<Sms> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param sms
- * @return
- */
- IPage<SmsVO> selectSmsPage(IPage<SmsVO> page, SmsVO sms);
-
- /**
- * 提交oss信息
- *
- * @param oss
- * @return
- */
- boolean submit(Sms oss);
-
- /**
- * 启动配置
- *
- * @param id
- * @return
- */
- boolean enable(Long id);
-
- /**
- * 发送验证码
- * @param phone
- * @param type
- * @return
- */
- boolean smsSend(String phone, String type);
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/impl/AttachDataServiceImpl.java b/src/main/java/org/springblade/modules/resource/service/impl/AttachDataServiceImpl.java
deleted file mode 100644
index c94f954..0000000
--- a/src/main/java/org/springblade/modules/resource/service/impl/AttachDataServiceImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.springblade.modules.resource.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.resource.entity.AttachData;
-import org.springblade.modules.resource.mapper.AttachDataMapper;
-import org.springblade.modules.resource.service.IAttachDataService;
-import org.springblade.modules.resource.vo.AttachDataVO;
-import org.springframework.stereotype.Service;
-
-/**
- * 附件数据表 服务实现类
- *
- * @author zhongrj
- */
-@Service
-public class AttachDataServiceImpl extends ServiceImpl<AttachDataMapper, AttachData> implements IAttachDataService {
-
- @Override
- public IPage<AttachDataVO> selectAttachDataPage(IPage<AttachDataVO> page, AttachDataVO attachData) {
- return page.setRecords(baseMapper.selectAttachDataPage(page, attachData));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/impl/AttachServiceImpl.java b/src/main/java/org/springblade/modules/resource/service/impl/AttachServiceImpl.java
deleted file mode 100644
index 46bd0ce..0000000
--- a/src/main/java/org/springblade/modules/resource/service/impl/AttachServiceImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.service.impl;
-
-import org.springblade.modules.resource.entity.Attach;
-import org.springblade.modules.resource.vo.AttachVO;
-import org.springblade.modules.resource.mapper.AttachMapper;
-import org.springblade.modules.resource.service.IAttachService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 附件表 服务实现类
- *
- * @author Chill
- */
-@Service
-public class AttachServiceImpl extends BaseServiceImpl<AttachMapper, Attach> implements IAttachService {
-
- @Override
- public IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach) {
- return page.setRecords(baseMapper.selectAttachPage(page, attach));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/impl/OssServiceImpl.java b/src/main/java/org/springblade/modules/resource/service/impl/OssServiceImpl.java
deleted file mode 100644
index 91b8b03..0000000
--- a/src/main/java/org/springblade/modules/resource/service/impl/OssServiceImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.entity.Oss;
-import org.springblade.modules.resource.vo.OssVO;
-import org.springblade.modules.resource.mapper.OssMapper;
-import org.springblade.modules.resource.service.IOssService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * 服务实现类
- *
- * @author BladeX
- */
-@Service
-public class OssServiceImpl extends BaseServiceImpl<OssMapper, Oss> implements IOssService {
-
- @Override
- public IPage<OssVO> selectOssPage(IPage<OssVO> page, OssVO oss) {
- return page.setRecords(baseMapper.selectOssPage(page, oss));
- }
-
- @Override
- public boolean submit(Oss oss) {
- LambdaQueryWrapper<Oss> lqw = Wrappers.<Oss>query().lambda()
- .eq(Oss::getOssCode, oss.getOssCode()).eq(Oss::getTenantId, AuthUtil.getTenantId());
- Long cnt = baseMapper.selectCount(Func.isEmpty(oss.getId()) ? lqw : lqw.notIn(Oss::getId, oss.getId()));
- if (cnt > 0L) {
- throw new ServiceException("当前资源编号已存在!");
- }
- return this.saveOrUpdate(oss);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean enable(Long id) {
- // 先禁用
- boolean temp1 = this.update(Wrappers.<Oss>update().lambda().set(Oss::getStatus, 1));
- // 在启用
- boolean temp2 = this.update(Wrappers.<Oss>update().lambda().set(Oss::getStatus, 2).eq(Oss::getId, id));
- return temp1 && temp2;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/service/impl/SmsServiceImpl.java b/src/main/java/org/springblade/modules/resource/service/impl/SmsServiceImpl.java
deleted file mode 100644
index 863a87a..0000000
--- a/src/main/java/org/springblade/modules/resource/service/impl/SmsServiceImpl.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.springblade.common.utils.SmsUtils;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.mapper.SmsMapper;
-import org.springblade.modules.resource.service.ISmsService;
-import org.springblade.modules.resource.utils.SmsUtil;
-import org.springblade.modules.resource.vo.SmsVO;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Map;
-
-/**
- * 短信配置表 服务实现类
- *
- * @author BladeX
- */
-@Service
-public class SmsServiceImpl extends BaseServiceImpl<SmsMapper, Sms> implements ISmsService {
-
- @Override
- public IPage<SmsVO> selectSmsPage(IPage<SmsVO> page, SmsVO sms) {
- return page.setRecords(baseMapper.selectSmsPage(page, sms));
- }
-
- @Override
- public boolean submit(Sms sms) {
- LambdaQueryWrapper<Sms> lqw = Wrappers.<Sms>query().lambda()
- .eq(Sms::getSmsCode, sms.getSmsCode()).eq(Sms::getTenantId, AuthUtil.getTenantId());
- Long cnt = baseMapper.selectCount(Func.isEmpty(sms.getId()) ? lqw : lqw.notIn(Sms::getId, sms.getId()));
- if (cnt > 0L) {
- throw new ServiceException("当前资源编号已存在!");
- }
- return this.saveOrUpdate(sms);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean enable(Long id) {
- // 先禁用
- boolean temp1 = this.update(Wrappers.<Sms>update().lambda().set(Sms::getStatus, 1));
- // 在启用
- boolean temp2 = this.update(Wrappers.<Sms>update().lambda().set(Sms::getStatus, 2).eq(Sms::getId, id));
- return temp1 && temp2;
- }
-
- @Override
- public boolean smsSend(String phone, String type) {
- Map<String, String> params = SmsUtil.getValidateParams();
- SmsUtils.send(phone, params);
- return true;
- }
-}
diff --git a/src/main/java/org/springblade/modules/resource/utils/ImageUtil.java b/src/main/java/org/springblade/modules/resource/utils/ImageUtil.java
deleted file mode 100644
index 797cb32..0000000
--- a/src/main/java/org/springblade/modules/resource/utils/ImageUtil.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package org.springblade.modules.resource.utils;
-import lombok.extern.slf4j.Slf4j;
-import javax.imageio.ImageIO;
-import javax.swing.*;
-import java.awt.*;
-import java.awt.geom.AffineTransform;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.net.URL;
-
-/**
- * @author arsn
- * @className ImageUtil
- * @Description 图片缩放
- **/
-@Slf4j
-public class ImageUtil {
- /**
- * 缩放比例系数
- */
- private static double SCALING = 0.56;
- /**
- * 符合base64的宽
- */
- private static int MAX_WIDTH = 560;
- /**
- * 最大高
- */
- private static int MAX_HEIGHT = 1000;
-
- /**
- * @Author 小帅丶
- * @Description 根据图片公网地址转BufferedImage
- * @Date 2020/9/29 10:52
- * @param url 图片公网地址
- * @return java.awt.image.BufferedImage
- **/
- public static BufferedImage imgUrlConvertBufferedImage(String url) throws Exception {
- URL urls = new URL(url);
- Image image = Toolkit.getDefaultToolkit().getImage(urls);
- BufferedImage bufferedImage = toBufferedImage(image);
- return bufferedImage;
- }
- /**
- * @Author 小帅丶
- * @Description 根据BufferedImage处理图片并返回byte[]
- * @Date 2020/9/29 10:55
- * @param bufferedImage
- * @return byte[]
- **/
- public static byte[] zoomImageByte(BufferedImage bufferedImage) throws Exception {
- ByteArrayOutputStream outputStreamZoom = new ByteArrayOutputStream();
- ByteArrayOutputStream outputStreamSource = new ByteArrayOutputStream();
- ImageIO.write(bufferedImage, "jpg", outputStreamSource);
- BufferedImage bufferedImageZoom = zoomImage(outputStreamSource.toByteArray());
- //写入缩减后的图片
- ImageIO.write(bufferedImageZoom, "jpg", outputStreamZoom);
- return outputStreamZoom.toByteArray();
- }
-
- /**
- * @Author 小帅丶
- * @Description 根据byte[]处理图片并返回byte[]
- * @Date 2020/9/29 10:55
- * @param src
- * @return byte[]
- **/
- public static byte[] zoomImageByte(byte[] src) throws Exception {
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- BufferedImage bufferedImage = zoomImage(src);
- //写入缩减后的图片
- ImageIO.write(bufferedImage, "jpg", outputStream);
- return outputStream.toByteArray();
- }
-
- /**
- * 图片缩放 仅适用于微信内容图片安全检测使用
- *
- * @param src 为源文件byte
- */
- public static BufferedImage zoomImage(byte[] src) throws Exception {
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- ByteArrayInputStream in = new ByteArrayInputStream(src);
- double wr = 0, hr = 0;
- BufferedImage bufferedImage = null;
- //读取图片
- BufferedImage bufImg = ImageIO.read(in);
- int height = bufImg.getHeight();
- int width = bufImg.getWidth();
- int cHeight = height;
- int cWidth = width;
- double Scaling = width / height;
- if (Scaling < SCALING) {
- if (height > MAX_HEIGHT) {
- cHeight = MAX_HEIGHT;
- cWidth = (width * MAX_HEIGHT) / height;
- }
- //以宽为缩放比例
- } else {
- if (width > MAX_WIDTH) {
- cWidth = MAX_WIDTH;
- cHeight = (height * MAX_WIDTH) / width;
- }
- }
- //获取缩放后的宽高
- log.info("宽{},高{}", cWidth, cHeight);
- //设置缩放目标图片模板
- Image Itemp = bufImg.getScaledInstance(width, cHeight, BufferedImage.SCALE_SMOOTH);
- //获取缩放比例
- wr = cWidth * 1.0 / width;
- hr = cHeight * 1.0 / height;
- log.info("宽比例{},高比例{}", wr, hr);
- AffineTransformOp ato = new AffineTransformOp(AffineTransform.getScaleInstance(wr, hr), null);
- Itemp = ato.filter(bufImg, null);
- try {
- //写入缩减后的图片
- ImageIO.write((BufferedImage) Itemp, "jpg", outputStream);
- ByteArrayInputStream inNew = new ByteArrayInputStream(outputStream.toByteArray());
- bufferedImage = ImageIO.read(inNew);
- } catch (Exception ex) {
- log.info("缩放图片异常{}", ex.getMessage());
- } finally {
- if (null != outputStream) {
- outputStream.close();
- }
- if (null != in) {
- in.close();
- }
- }
- return bufferedImage;
- }
-
- /**
- * @Description Image转BufferedImage
- * @param image 通过url获取的image对象
- * @return java.awt.image.BufferedImage
- **/
- public static BufferedImage toBufferedImage(Image image) {
- if (image instanceof BufferedImage) {
- return (BufferedImage) image;
- }
- // This code ensures that all the pixels in the image are loaded
- image = new ImageIcon(image).getImage();
- BufferedImage bimage = null;
- GraphicsEnvironment ge = GraphicsEnvironment
- .getLocalGraphicsEnvironment();
- try {
- int transparency = Transparency.OPAQUE;
- GraphicsDevice gs = ge.getDefaultScreenDevice();
- GraphicsConfiguration gc = gs.getDefaultConfiguration();
- bimage = gc.createCompatibleImage(image.getWidth(null),
- image.getHeight(null), transparency);
- } catch (HeadlessException e) {
- // The system does not have a screen
- }
- if (bimage == null) {
- // Create a buffered image using the default color model
- int type = BufferedImage.TYPE_INT_RGB;
- bimage = new BufferedImage(image.getWidth(null),
- image.getHeight(null), type);
- }
- // Copy image to buffered image
- Graphics g = bimage.createGraphics();
- // Paint the image onto the buffered image
- g.drawImage(image, 0, 0, null);
- g.dispose();
- return bimage;
- }
-}
diff --git a/src/main/java/org/springblade/modules/resource/utils/SmsUtil.java b/src/main/java/org/springblade/modules/resource/utils/SmsUtil.java
deleted file mode 100644
index 4ed8c15..0000000
--- a/src/main/java/org/springblade/modules/resource/utils/SmsUtil.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.utils;
-
-import org.springblade.core.sms.model.SmsCode;
-import org.springblade.core.sms.model.SmsData;
-import org.springblade.core.sms.model.SmsResponse;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.RandomType;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.resource.builder.sms.SmsBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 短信服务工具类
- *
- * @author Chill
- */
-public class SmsUtil {
-
- public static final String PARAM_KEY = "code";
- public static final String SEND_SUCCESS = "短信发送成功";
- public static final String SEND_FAIL = "短信发送失败";
- public static final String VALIDATE_SUCCESS = "短信校验成功";
- public static final String VALIDATE_FAIL = "短信校验失败";
-
-
- private static SmsBuilder smsBuilder;
-
- /**
- * 获取短信服务构建类
- *
- * @return SmsBuilder
- */
- public static SmsBuilder getBuilder() {
- if (smsBuilder == null) {
- smsBuilder = SpringUtil.getBean(SmsBuilder.class);
- }
- return smsBuilder;
- }
-
- /**
- * 获取短信验证码参数
- *
- * @return 验证码参数
- */
- public static Map<String, String> getValidateParams() {
- Map<String, String> params = new HashMap<>(1);
- params.put(PARAM_KEY, StringUtil.random(6, RandomType.INT));
- return params;
- }
-
- /**
- * 发送短信
- *
- * @param code 资源编号
- * @param params 模板参数
- * @param phones 手机号集合
- * @return 发送结果
- */
- public static SmsResponse sendMessage(String code, Map<String, String> params, String phones) {
- SmsData smsData = new SmsData(params);
- return getBuilder().template(code).sendMessage(smsData, Func.toStrList(phones));
- }
-
- /**
- * 发送验证码
- *
- * @param code 资源编号
- * @param phone 手机号
- * @return 发送结果
- */
- public static SmsCode sendValidate(String code, String phone) {
- Map<String, String> params = SmsUtil.getValidateParams();
- return getBuilder().template(code).sendValidate(new SmsData(params).setKey(PARAM_KEY), phone);
- }
-
- /**
- * 校验短信
- *
- * @param code 资源编号
- * @param id 校验id
- * @param value 校验值
- * @param phone 手机号
- * @return 发送结果
- */
- public static boolean validateMessage(String code, String id, String value, String phone) {
- SmsCode smsCode = new SmsCode().setId(id).setValue(value).setPhone(phone);
- return getBuilder().template(code).validateMessage(smsCode);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/vo/AttachDataVO.java b/src/main/java/org/springblade/modules/resource/vo/AttachDataVO.java
deleted file mode 100644
index b6937b0..0000000
--- a/src/main/java/org/springblade/modules/resource/vo/AttachDataVO.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.springblade.modules.resource.vo;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import org.springblade.modules.resource.entity.AttachData;
-
-/**
- * 附件表视图实体类
- *
- * @author zhongrj
- */
-@Data
-@ApiModel(value = "AttachDataVO对象", description = "附件数据表")
-public class AttachDataVO extends AttachData {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/vo/AttachVO.java b/src/main/java/org/springblade/modules/resource/vo/AttachVO.java
deleted file mode 100644
index ebd7f81..0000000
--- a/src/main/java/org/springblade/modules/resource/vo/AttachVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.vo;
-
-import org.springblade.modules.resource.entity.Attach;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import io.swagger.annotations.ApiModel;
-
-/**
- * 附件表视图实体类
- *
- * @author Chill
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "AttachVO对象", description = "附件表")
-public class AttachVO extends Attach {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/vo/OssVO.java b/src/main/java/org/springblade/modules/resource/vo/OssVO.java
deleted file mode 100644
index 6c8ff8a..0000000
--- a/src/main/java/org/springblade/modules/resource/vo/OssVO.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.springblade.modules.resource.vo;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.resource.entity.Oss;
-
-/**
- * OssVO
- *
- * @author Chill
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "OssVO对象", description = "对象存储表")
-public class OssVO extends Oss {
- private static final long serialVersionUID = 1L;
-
- /**
- * 分类名
- */
- private String categoryName;
-
- /**
- * 是否启用
- */
- private String statusName;
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/vo/SmsVO.java b/src/main/java/org/springblade/modules/resource/vo/SmsVO.java
deleted file mode 100644
index 72365bb..0000000
--- a/src/main/java/org/springblade/modules/resource/vo/SmsVO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.vo;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.resource.entity.Sms;
-
-/**
- * 短信配置表视图实体类
- *
- * @author BladeX
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "SmsVO对象", description = "短信配置表")
-public class SmsVO extends Sms {
- private static final long serialVersionUID = 1L;
-
- /**
- * 分类名
- */
- private String categoryName;
-
- /**
- * 是否启用
- */
- private String statusName;
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/wrapper/OssWrapper.java b/src/main/java/org/springblade/modules/resource/wrapper/OssWrapper.java
deleted file mode 100644
index 4736573..0000000
--- a/src/main/java/org/springblade/modules/resource/wrapper/OssWrapper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.wrapper;
-
-import org.springblade.common.cache.DictCache;
-import org.springblade.common.enums.DictEnum;
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.resource.entity.Oss;
-import org.springblade.modules.resource.vo.OssVO;
-
-import java.util.Objects;
-
-/**
- * 包装类,返回视图层所需的字段
- *
- * @author BladeX
- */
-public class OssWrapper extends BaseEntityWrapper<Oss, OssVO> {
-
- public static OssWrapper build() {
- return new OssWrapper();
- }
-
- @Override
- public OssVO entityVO(Oss oss) {
- OssVO ossVO = Objects.requireNonNull(BeanUtil.copy(oss, OssVO.class));
- String categoryName = DictCache.getValue(DictEnum.OSS, oss.getCategory());
- String statusName = DictCache.getValue(DictEnum.YES_NO, oss.getStatus());
- ossVO.setCategoryName(categoryName);
- ossVO.setStatusName(statusName);
- return ossVO;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/resource/wrapper/SmsWrapper.java b/src/main/java/org/springblade/modules/resource/wrapper/SmsWrapper.java
deleted file mode 100644
index 15b94c8..0000000
--- a/src/main/java/org/springblade/modules/resource/wrapper/SmsWrapper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.resource.wrapper;
-
-import org.springblade.common.cache.DictCache;
-import org.springblade.common.enums.DictEnum;
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.vo.SmsVO;
-
-import java.util.Objects;
-
-/**
- * 短信配置表包装类,返回视图层所需的字段
- *
- * @author BladeX
- */
-public class SmsWrapper extends BaseEntityWrapper<Sms, SmsVO> {
-
- public static SmsWrapper build() {
- return new SmsWrapper();
- }
-
- @Override
- public SmsVO entityVO(Sms sms) {
- SmsVO smsVO = Objects.requireNonNull(BeanUtil.copy(sms, SmsVO.class));
- String categoryName = DictCache.getValue(DictEnum.SMS, sms.getCategory());
- String statusName = DictCache.getValue(DictEnum.YES_NO, sms.getStatus());
- smsVO.setCategoryName(categoryName);
- smsVO.setStatusName(statusName);
- return smsVO;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/controller/RotationController.java b/src/main/java/org/springblade/modules/rotation/controller/RotationController.java
deleted file mode 100644
index c8b1a3b..0000000
--- a/src/main/java/org/springblade/modules/rotation/controller/RotationController.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.rotation.entity.RotationEntity;
-import org.springblade.modules.rotation.vo.RotationVO;
-import org.springblade.modules.rotation.wrapper.RotationWrapper;
-import org.springblade.modules.rotation.service.IRotationService;
-
-import java.util.Date;
-
-/**
- * 轮播图 控制器
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-rotation/rotation")
-@Api(value = "轮播图", tags = "轮播图接口")
-public class RotationController{
-
- private final IRotationService rotationService;
-
- /**
- * 轮播图 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入rotation")
- public R<RotationVO> detail(RotationEntity rotation) {
- RotationEntity detail = rotationService.getOne(Condition.getQueryWrapper(rotation));
- return R.data(RotationWrapper.build().entityVO(detail));
- }
- /**
- * 轮播图 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入rotation")
- public R<IPage<RotationVO>> list(RotationEntity rotation, Query query) {
- IPage<RotationEntity> pages = rotationService.page(Condition.getPage(query), Condition.getQueryWrapper(rotation));
- return R.data(RotationWrapper.build().pageVO(pages));
- }
-
- /**
- * 轮播图 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入rotation")
- public R<IPage<RotationVO>> page(RotationVO rotation, Query query) {
- IPage<RotationVO> pages = rotationService.selectRotationPage(Condition.getPage(query), rotation);
- return R.data(pages);
- }
-
- /**
- * 轮播图 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入rotation")
- public R save(@Valid @RequestBody RotationEntity rotation) {
- rotation.setCreateTime(new Date());
- rotation.setCreateUser(AuthUtil.getUserId());
- return R.status(rotationService.save(rotation));
- }
-
- /**
- * 轮播图 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入rotation")
- public R update(@Valid @RequestBody RotationEntity rotation) {
- return R.status(rotationService.updateById(rotation));
- }
-
- /**
- * 轮播图 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入rotation")
- public R submit(@Valid @RequestBody RotationEntity rotation) {
- return R.status(rotationService.saveOrUpdate(rotation));
- }
-
- /**
- * 轮播图 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(rotationService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/dto/RotationDTO.java b/src/main/java/org/springblade/modules/rotation/dto/RotationDTO.java
deleted file mode 100644
index 0e92475..0000000
--- a/src/main/java/org/springblade/modules/rotation/dto/RotationDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.dto;
-
-import org.springblade.modules.rotation.entity.RotationEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 轮播图 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class RotationDTO extends RotationEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/entity/RotationEntity.java b/src/main/java/org/springblade/modules/rotation/entity/RotationEntity.java
deleted file mode 100644
index 1412c10..0000000
--- a/src/main/java/org/springblade/modules/rotation/entity/RotationEntity.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 轮播图 实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@TableName("jczz_rotation")
-@ApiModel(value = "Rotation对象", description = "轮播图")
-public class RotationEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 名称 */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /** 类型 1:系统 2:社区 */
- @ApiModelProperty(value = "类型 3:系统 2:综治 1:公安", example = "")
- @TableField("type")
- private Integer type;
-
- /** 内容 */
- @ApiModelProperty(value = "内容", example = "")
- @TableField("context")
- private String context;
-
- /** 图片地址 */
- @ApiModelProperty(value = "图片地址", example = "")
- @TableField("url")
- private String url;
-
- /** 跳转地址 */
- @ApiModelProperty(value = "跳转地址", example = "")
- @TableField("junp_url")
- private String junpUrl;
-
- /** 所属社区编号 */
- @ApiModelProperty(value = "所属社区编号", example = "")
- @TableField("community_code")
- private String communityCode;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 是否删除 0:否 1:是 */
- @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 范围 */
- @ApiModelProperty(value = "范围", example = "")
- @TableField("rotation_range")
- private String rotationRange;
-
- /** 文章id */
- @ApiModelProperty(value = "文章id", example = "")
- @TableField("article_id")
- private Integer articleId;
-
- /** 是否公开:1:否 2:是 */
- @ApiModelProperty(value = "是否公开:1:否 2:是", example = "")
- @TableField("public_flag")
- private Integer publicFlag;
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.java b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.java
deleted file mode 100644
index 460705f..0000000
--- a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.rotation.entity.RotationEntity;
-import org.springblade.modules.rotation.vo.RotationVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 轮播图 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public interface RotationMapper extends BaseMapper<RotationEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param rotation
- * @param isAdministrator
- * @return
- */
- List<RotationVO> selectRotationPage(IPage page,
- @Param("rotation") RotationVO rotation,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") String regionChildCodesList,
- @Param("gridCodeList") String gridCodeList);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
deleted file mode 100644
index 8aeaf17..0000000
--- a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.rotation.mapper.RotationMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="rotationResultMap" type="org.springblade.modules.rotation.entity.RotationEntity">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="type" column="type" />
- <result property="context" column="context" />
- <result property="url" column="url" />
- <result property="junpUrl" column="junp_url" />
- <result property="communityCode" column="community_code" />
- <result property="createTime" column="create_time" />
- <result property="createUser" column="create_user" />
- <result property="isDeleted" column="is_deleted" />
- <result property="rotationRange" column="rotation_range" />
- <result property="articleId" column="article_id" />
- <result property="publicFlag" column="public_flag" />
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectRotationPage" resultType="org.springblade.modules.rotation.vo.RotationVO">
- select
- jr.*,br.name as communityName
- from jczz_rotation jr
- left join blade_region br on br.code = jr.community_code
- where jr.is_deleted = 0
- <if test="rotation.name!=null and rotation.name!=''">
- and jr.name like concat('%',#{rotation.name},'%')
- </if>
- <if test="rotation.type!=null">
- and jr.type = #{rotation.type}
- </if>
- <if test="rotation.communityName!=null and rotation.communityName!=''">
- and br.name like concat('%',#{rotation.communityName},'%')
- </if>
- <if test="rotation.regionCode!=null and rotation.regionCode!=''">
- and jr.community_code like concat('%',#{rotation.regionCode},'%')
- </if>
-
- <if test="rotation.rotationRange != null and rotation.rotationRange != ''">and jr.rotation_range =
- #{rotation.rotationRange}
- </if>
- <if test="rotation.articleId != null ">and jr.article_id = #{rotation.articleId}</if>
- <if test="rotation.publicFlag != null ">and jr.public_flag = #{rotation.publicFlag}</if>
-
- <if test="rotation.districtIdList != null and rotation.districtIdList.size() > 0 ">
- and (jr.rotation_range like
- <foreach collection="rotation.districtIdList" separator=" or jr.rotation_range like" item="id">'%${id}%'
- </foreach>
- ) or jr.rotation_range is null
- </if>
-
- <if test="isAdministrator==2">
- <choose>
- <when test="rotation.roleName != null and rotation.roleName != ''">
- <if test="rotation.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList !=''">
- and jr.type = 2
- and jr.community_code REGEXP #{gridCodeList}
- </when>
- <otherwise>
- and jr.type = 2
- and jr.community_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="rotation.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList!=''">
- and jr.type = 1
- and jr.community_code REGEXP #{regionChildCodesList}
- </when>
- <otherwise>
- and jr.type = 1
- and jr.community_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="rotation.roleName=='inhabitant'">
- and jr.type = 3
- <if test="rotation.districtIdList == null ">
- and jr.rotation_range is null
- </if>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList!=''">
- and jr.community_code REGEXP #{regionChildCodesList}
- </when>
- <otherwise>
- and jr.community_code in ('')
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/rotation/service/IRotationService.java b/src/main/java/org/springblade/modules/rotation/service/IRotationService.java
deleted file mode 100644
index 09284b8..0000000
--- a/src/main/java/org/springblade/modules/rotation/service/IRotationService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.rotation.entity.RotationEntity;
-import org.springblade.modules.rotation.vo.RotationVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 轮播图 服务类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public interface IRotationService extends IService<RotationEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param rotation
- * @return
- */
- IPage<RotationVO> selectRotationPage(IPage<RotationVO> page, RotationVO rotation);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/service/impl/RotationServiceImpl.java b/src/main/java/org/springblade/modules/rotation/service/impl/RotationServiceImpl.java
deleted file mode 100644
index 5cc5f09..0000000
--- a/src/main/java/org/springblade/modules/rotation/service/impl/RotationServiceImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.common.utils.RoleUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.modules.rotation.entity.RotationEntity;
-import org.springblade.modules.rotation.mapper.RotationMapper;
-import org.springblade.modules.rotation.service.IRotationService;
-import org.springblade.modules.rotation.vo.RotationVO;
-import org.springblade.modules.system.service.IDeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 轮播图 服务实现类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Service
-public class RotationServiceImpl extends ServiceImpl<RotationMapper, RotationEntity> implements IRotationService {
-
-
- @Autowired
- private IDeptService deptService;
-
- /**
- * 自定义分页
- *
- * @param page
- * @param rotation
- * @return
- */
- @Override
- public IPage<RotationVO> selectRotationPage(IPage<RotationVO> page, RotationVO rotation) {
- CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(RotationVO.class, rotation);
- String userRole = AuthUtil.getUserRole();
- if (RoleUtil.isProperty(userRole)) {
- // 查询小区id
- IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
- List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity companyEntity = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery()
- .eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()).last("limit 1"));
- if (companyEntity != null) {
- IPropertyCompanyDistrictService bean2 = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // 通过物业公司,查询小区
- List<PropertyCompanyDistrictEntity> propertyCompanyDistrictEntityList = bean2.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, companyEntity.getId()));
- if (propertyCompanyDistrictEntityList.size() > 0) {
- List<String> collect = propertyCompanyDistrictEntityList.stream().map(i -> i.getDistrictId()).collect(Collectors.toList());
- districtIds.addAll(collect);
- }
- }
- rotation.setDistrictIdList(districtIds);
- if (districtIds.size() == 0) {
- return page.setRecords(new ArrayList<>());
- }
- rotation.setPropertyFlag(1);
- }
- if(AuthUtils.isMj(userRole)){
- rotation.setType(1);
- }
- if(AuthUtils.isJd(userRole)){
- rotation.setType(2);
- }
- if(AuthUtils.isAdministratorOrAdmin(userRole)){
- rotation.setType(null);
- }
- if (StringUtils.isNotBlank(rotation.getAoiCode())) {
- // 查询房屋的小区
- IDistrictService bean = SpringUtils.getBean(IDistrictService.class);
- DistrictEntity one = bean.getOne(Wrappers.<DistrictEntity>lambdaQuery().eq(DistrictEntity::getAoiCode, rotation.getAoiCode()));
- List<String> districtIds = new ArrayList<>();
- districtIds.add(one.getId());
- rotation.setDistrictIdList(districtIds);
- }
- List<RotationVO> rotationVOList = baseMapper.selectRotationPage(page, rotation,
- commonParamSet.getIsAdministrator(),
- null == commonParamSet.getRegionChildCodesList() ? null : String.join("|", commonParamSet.getRegionChildCodesList()),
- null == commonParamSet.getGridCodeList() ? null : String.join("|", commonParamSet.getGridCodeList()));
- if (rotationVOList.size() == 0) {
- // 如果没有对应的轮播图,则采用系统默认的
- rotation.setType(3);
- rotation.setPublicFlag(2);
- rotation.setDistrictIdList(null);
- rotationVOList = baseMapper.selectRotationPage(page,
- rotation,
- 1,
- null == commonParamSet.getRegionChildCodesList() ? null : String.join("|", commonParamSet.getRegionChildCodesList()),
- null == commonParamSet.getGridCodeList() ? null : String.join("|", commonParamSet.getGridCodeList()));
- }
- return page.setRecords(rotationVOList);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/vo/RotationVO.java b/src/main/java/org/springblade/modules/rotation/vo/RotationVO.java
deleted file mode 100644
index a8d31f8..0000000
--- a/src/main/java/org/springblade/modules/rotation/vo/RotationVO.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.vo;
-
-import org.springblade.modules.rotation.entity.RotationEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 轮播图 视图实体类
- *
- * @author BladeX
- * @since 2023-11-16
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class RotationVO extends RotationEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 社区名称
- */
- private String communityName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 小区编码
- */
- private String aoiCode;
-
- /**
- * 角色别名
- */
- private String roleName;
-
- private List<String> districtIdList;
-
- // 物业标记
- private Integer propertyFlag;
-
-}
diff --git a/src/main/java/org/springblade/modules/rotation/wrapper/RotationWrapper.java b/src/main/java/org/springblade/modules/rotation/wrapper/RotationWrapper.java
deleted file mode 100644
index ef40bd9..0000000
--- a/src/main/java/org/springblade/modules/rotation/wrapper/RotationWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.rotation.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.rotation.entity.RotationEntity;
-import org.springblade.modules.rotation.vo.RotationVO;
-import java.util.Objects;
-
-/**
- * 轮播图 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-16
- */
-public class RotationWrapper extends BaseEntityWrapper<RotationEntity, RotationVO> {
-
- public static RotationWrapper build() {
- return new RotationWrapper();
- }
-
- @Override
- public RotationVO entityVO(RotationEntity rotation) {
- RotationVO rotationVO = Objects.requireNonNull(BeanUtil.copy(rotation, RotationVO.class));
-
- //User createUser = UserCache.getUser(rotation.getCreateUser());
- //User updateUser = UserCache.getUser(rotation.getUpdateUser());
- //rotationVO.setCreateUserName(createUser.getName());
- //rotationVO.setUpdateUserName(updateUser.getName());
-
- return rotationVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/controller/SmsRecordController.java b/src/main/java/org/springblade/modules/sms/controller/SmsRecordController.java
deleted file mode 100644
index 21bd2f3..0000000
--- a/src/main/java/org/springblade/modules/sms/controller/SmsRecordController.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import org.springblade.modules.sms.vo.SmsRecordVO;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.sms.wrapper.SmsRecordWrapper;
-import org.springblade.modules.sms.service.ISmsRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 短信记录表 控制器
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-smsRecord/smsRecord")
-@Api(value = "短信记录表", tags = "短信记录表接口")
-public class SmsRecordController extends BladeController {
-
- private final ISmsRecordService smsRecordService;
-
- /**
- * 短信记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入smsRecord")
- public R<SmsRecordVO> detail(SmsRecordEntity smsRecord) {
- SmsRecordEntity detail = smsRecordService.getOne(Condition.getQueryWrapper(smsRecord));
- return R.data(SmsRecordWrapper.build().entityVO(detail));
- }
- /**
- * 短信记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入smsRecord")
- public R<IPage<SmsRecordVO>> list(SmsRecordEntity smsRecord, Query query) {
- IPage<SmsRecordEntity> pages = smsRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(smsRecord));
- return R.data(SmsRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 短信记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入smsRecord")
- public R<IPage<SmsRecordVO>> page(SmsRecordVO smsRecord, Query query) {
- IPage<SmsRecordVO> pages = smsRecordService.selectSmsRecordPage(Condition.getPage(query), smsRecord);
- return R.data(pages);
- }
-
- /**
- * 短信记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入smsRecord")
- public R save(@Valid @RequestBody SmsRecordEntity smsRecord) {
- return R.status(smsRecordService.save(smsRecord));
- }
-
- /**
- * 短信记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入smsRecord")
- public R update(@Valid @RequestBody SmsRecordEntity smsRecord) {
- return R.status(smsRecordService.updateById(smsRecord));
- }
-
- /**
- * 短信记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入smsRecord")
- public R submit(@Valid @RequestBody SmsRecordEntity smsRecord) {
- return R.status(smsRecordService.saveOrUpdate(smsRecord));
- }
-
- /**
- * 短信记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(smsRecordService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/controller/SmsSendController.java b/src/main/java/org/springblade/modules/sms/controller/SmsSendController.java
deleted file mode 100644
index 37f0288..0000000
--- a/src/main/java/org/springblade/modules/sms/controller/SmsSendController.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.controller;
-
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.sms.service.ISmsSendService;
-import org.springblade.modules.sms.vo.SmsTemplateVO;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 短信模版表 控制器
- *
- * @author BladeX
- * @since 2024-03-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-smsSend/smsSend")
-@Api(value = "发送短信验证码", tags = "发送短信验证码")
-public class SmsSendController extends BladeController {
-
- private final ISmsSendService iSmsSendService;
-
- /**
- * 短信模版表 详情
- */
- @GetMapping("/send")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "发送短信验证码")
- public R<SmsTemplateVO> detail(@RequestParam String phone) {
- Boolean aBoolean = iSmsSendService.sendVerificationCode(phone);
- return R.status(aBoolean);
- }
-
- /**
- * 发送居住申请通知
- * @param templateId 模版id
- * @param residenceId 居住证申请记录id
- * @return
- */
- @GetMapping("/sendNotice")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "发送居住申请通知")
- public R<SmsTemplateVO> sendNotice(@RequestParam("templateId") Long templateId,
- @RequestParam(value = "residenceId",required = false) Long residenceId) {
- Boolean aBoolean = iSmsSendService.sendNotice(templateId,residenceId);
- return R.status(aBoolean);
- }
-
- /**
- *
- * @param templateId
- * @param placeSelfCheckId
- * @return
- */
- @GetMapping("/sendRectificationNotice")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "发送整改完成通知")
- public R<SmsTemplateVO> sendRectificationNotice(@RequestParam("templateId") Long templateId,
- @RequestParam(value = "placeSelfCheckId",required = false) Long placeSelfCheckId) {
- Boolean aBoolean = iSmsSendService.sendRectificationNotice(templateId,placeSelfCheckId);
- return R.status(aBoolean);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/controller/SmsTemplateController.java b/src/main/java/org/springblade/modules/sms/controller/SmsTemplateController.java
deleted file mode 100644
index c1a31bf..0000000
--- a/src/main/java/org/springblade/modules/sms/controller/SmsTemplateController.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import org.springblade.modules.sms.vo.SmsTemplateVO;
-import org.springblade.modules.sms.wrapper.SmsTemplateWrapper;
-import org.springblade.modules.sms.service.ISmsTemplateService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 短信模版表 控制器
- *
- * @author BladeX
- * @since 2024-03-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-smsTemplate/smsTemplate")
-@Api(value = "短信模版表", tags = "短信模版表接口")
-public class SmsTemplateController extends BladeController {
-
- private final ISmsTemplateService smsTemplateService;
-
- /**
- * 短信模版表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入smsTemplate")
- public R<SmsTemplateVO> detail(SmsTemplateEntity smsTemplate) {
- SmsTemplateEntity detail = smsTemplateService.getOne(Condition.getQueryWrapper(smsTemplate));
- return R.data(SmsTemplateWrapper.build().entityVO(detail));
- }
- /**
- * 短信模版表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入smsTemplate")
- public R<IPage<SmsTemplateVO>> list(SmsTemplateEntity smsTemplate, Query query) {
- IPage<SmsTemplateEntity> pages = smsTemplateService.page(Condition.getPage(query), Condition.getQueryWrapper(smsTemplate));
- return R.data(SmsTemplateWrapper.build().pageVO(pages));
- }
-
- /**
- * 短信模版表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入smsTemplate")
- public R<IPage<SmsTemplateVO>> page(SmsTemplateVO smsTemplate, Query query) {
- IPage<SmsTemplateVO> pages = smsTemplateService.selectSmsTemplatePage(Condition.getPage(query), smsTemplate);
- return R.data(pages);
- }
-
- /**
- * 短信模版表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入smsTemplate")
- public R save(@Valid @RequestBody SmsTemplateEntity smsTemplate) {
- return R.status(smsTemplateService.save(smsTemplate));
- }
-
- /**
- * 短信模版表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入smsTemplate")
- public R update(@Valid @RequestBody SmsTemplateEntity smsTemplate) {
- return R.status(smsTemplateService.updateById(smsTemplate));
- }
-
- /**
- * 短信模版表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入smsTemplate")
- public R submit(@Valid @RequestBody SmsTemplateEntity smsTemplate) {
- return R.status(smsTemplateService.saveOrUpdate(smsTemplate));
- }
-
- /**
- * 短信模版表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(smsTemplateService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/dto/SmsRecordDTO.java b/src/main/java/org/springblade/modules/sms/dto/SmsRecordDTO.java
deleted file mode 100644
index 01b28df..0000000
--- a/src/main/java/org/springblade/modules/sms/dto/SmsRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.dto;
-
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 短信记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SmsRecordDTO extends SmsRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/dto/SmsTemplateDTO.java b/src/main/java/org/springblade/modules/sms/dto/SmsTemplateDTO.java
deleted file mode 100644
index 9be2b2d..0000000
--- a/src/main/java/org/springblade/modules/sms/dto/SmsTemplateDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.dto;
-
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 短信模版表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SmsTemplateDTO extends SmsTemplateEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/entity/SmsRecordEntity.java b/src/main/java/org/springblade/modules/sms/entity/SmsRecordEntity.java
deleted file mode 100644
index 8ccaa5d..0000000
--- a/src/main/java/org/springblade/modules/sms/entity/SmsRecordEntity.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 短信记录表 实体类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Data
-@TableName("blade_sms_record")
-@ApiModel(value = "SmsRecord对象", description = "短信记录表")
-public class SmsRecordEntity {
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 模板id */
- @ApiModelProperty(value = "模板id", example = "")
- @TableField("template_id")
- private Long templateId;
-
- /** 接收手机号 */
- @ApiModelProperty(value = "接收手机号", example = "")
- @TableField("phone")
- private String phone;
-
- /** 短信内容 */
- @ApiModelProperty(value = "短信内容", example = "")
- @TableField("content")
- private String content;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 创建部门 */
- @ApiModelProperty(value = "创建部门", example = "")
- @TableField("create_dept")
- private Long createDept;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 修改时间 */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.DEFAULT)
- private Date updateTime;
-
- /** 状态 1:否 2:是 */
- @ApiModelProperty(value = "状态 1:否 2:是", example = "")
- @TableField("status")
- private Integer status;
-
- /** 是否已删除 */
- @ApiModelProperty(value = "是否已删除", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/entity/SmsTemplateEntity.java b/src/main/java/org/springblade/modules/sms/entity/SmsTemplateEntity.java
deleted file mode 100644
index 88d4a52..0000000
--- a/src/main/java/org/springblade/modules/sms/entity/SmsTemplateEntity.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 短信模版表对象 blade_sms_template
- *
- * @author ${context.author}
- * @date 2024-03-06 14:25:48
- */
-@ApiModel(value = "BladeSmsTemplate对象", description = "短信模版表")
-@Data
-@TableName("blade_sms_template")
-public class SmsTemplateEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- /**
- * id
- */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 机构id
- */
- @ApiModelProperty(value = "机构id", example = "")
- @TableField("dept_id")
- private Integer deptId;
-
- /**
- * 模板内容
- */
- @ApiModelProperty(value = "模板内容", example = "")
- @TableField("content")
- private String content;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /**
- * 创建人
- */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_by")
- private Long createBy;
-
- /**
- * 0:否 1:是
- */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("is_deleted")
- private String isDeleted;
-
- /**
- * 1:否 2:是
- */
- @ApiModelProperty(value = "1:否 2:是", example = "")
- @TableField("status")
- private String status;
-
- /**
- * 标题
- */
- @ApiModelProperty(value = "标题", example = "")
- @TableField("title")
- private String title;
-
-
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注", example = "")
- @TableField("remark")
- private String remark;
-}
diff --git a/src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.java b/src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.java
deleted file mode 100644
index 1c6c1b8..0000000
--- a/src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.mapper;
-
-import org.springblade.modules.sms.dto.SmsRecordDTO;
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import org.springblade.modules.sms.vo.SmsRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 短信记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-02
- */
-public interface SmsRecordMapper extends BaseMapper<SmsRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param smsRecord
- * @return
- */
- List<SmsRecordVO> selectSmsRecordPage(IPage page, SmsRecordVO smsRecord);
-
- /**
- * 查询短信记录表
- *
- * @param id 短信记录表ID
- * @return 短信记录表
- */
- public SmsRecordDTO selectBladeSmsRecordById(Long id);
-
- /**
- * 查询短信记录表列表
- *
- * @param bladeSmsRecordDTO 短信记录表
- * @return 短信记录表集合
- */
- public List<SmsRecordDTO> selectBladeSmsRecordList(SmsRecordDTO bladeSmsRecordDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.xml b/src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.xml
deleted file mode 100644
index 4d0d185..0000000
--- a/src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.sms.mapper.SmsRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="smsRecordResultMap" type="org.springblade.modules.sms.entity.SmsRecordEntity">
- </resultMap>
-
-
- <select id="selectSmsRecordPage" resultMap="smsRecordResultMap">
- select * from blade_sms_record
- <where>
- <if test="smsRecord.id != null ">and id = #{smsRecord.id}</if>
- <if test="smsRecord.templateId != null ">and template_id = #{smsRecord.templateId}</if>
- <if test="smsRecord.phone != null and smsRecord.phone != ''">and phone like concat('%',#{smsRecord.phone},'%') </if>
- <if test="smsRecord.content != null and smsRecord.content != ''">and content like concat('%',#{smsRecord.content},'%') </if>
- <if test="smsRecord.createUser != null ">and create_user = #{smsRecord.createUser}</if>
- <if test="smsRecord.createDept != null ">and create_dept = #{smsRecord.createDept}</if>
- <if test="smsRecord.createTime != null ">and create_time = #{smsRecord.createTime}</if>
- <if test="smsRecord.updateTime != null ">and update_time = #{smsRecord.updateTime}</if>
- <if test="smsRecord.status != null ">and status = #{smsRecord.status}</if>
- <if test="smsRecord.isDeleted != null ">and is_deleted = #{smsRecord.isDeleted}</if>
- order by create_time desc
- </where>
- </select>
-
- <resultMap type="org.springblade.modules.sms.dto.SmsRecordDTO" id="BladeSmsRecordDTOResult">
- <result property="id" column="id" />
- <result property="templateId" column="template_id" />
- <result property="phone" column="phone" />
- <result property="content" column="content" />
- <result property="createUser" column="create_user" />
- <result property="createDept" column="create_dept" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="status" column="status" />
- <result property="isDeleted" column="is_deleted" />
- </resultMap>
-
- <sql id="selectBladeSmsRecord">
- select
- id,
- template_id,
- phone,
- content,
- create_user,
- create_dept,
- create_time,
- update_time,
- status,
- is_deleted
- from
- blade_sms_record
- </sql>
-
- <select id="selectBladeSmsRecordById" parameterType="long" resultMap="BladeSmsRecordDTOResult">
- <include refid="selectBladeSmsRecord"/>
- where
- id = #{id}
- </select>
-
- <select id="selectBladeSmsRecordList" parameterType="org.springblade.modules.sms.dto.SmsRecordDTO" resultMap="BladeSmsRecordDTOResult">
- <include refid="selectBladeSmsRecord"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="templateId != null "> and template_id = #{templateId}</if>
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="createUser != null "> and create_user = #{createUser}</if>
- <if test="createDept != null "> and create_dept = #{createDept}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.java b/src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.java
deleted file mode 100644
index 43b910b..0000000
--- a/src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.mapper;
-
-import org.springblade.modules.sms.dto.SmsTemplateDTO;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import org.springblade.modules.sms.vo.SmsTemplateVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 短信模版表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-06
- */
-public interface SmsTemplateMapper extends BaseMapper<SmsTemplateEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param smsTemplate
- * @return
- */
- List<SmsTemplateVO> selectSmsTemplatePage(IPage page, SmsTemplateVO smsTemplate);
-
-
-
- /**
- * 查询短信模版表
- *
- * @param id 短信模版表ID
- * @return 短信模版表
- */
- public SmsTemplateDTO selectBladeSmsTemplateById(Integer id);
-
- /**
- * 查询短信模版表列表
- *
- * @param bladeSmsTemplateDTO 短信模版表
- * @return 短信模版表集合
- */
- public List<SmsTemplateDTO> selectBladeSmsTemplateList(SmsTemplateDTO bladeSmsTemplateDTO);
-}
diff --git a/src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.xml b/src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.xml
deleted file mode 100644
index beafbbf..0000000
--- a/src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.sms.mapper.SmsTemplateMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="smsTemplateResultMap" type="org.springblade.modules.sms.entity.SmsTemplateEntity">
- </resultMap>
-
-
- <select id="selectSmsTemplatePage" resultMap="smsTemplateResultMap">
- select * from blade_sms_template
- <where>
- <if test="smsTemplate.id != null "> and id = #{smsTemplate.id}</if>
- <if test="smsTemplate.deptId != null "> and dept_id = #{smsTemplate.deptId}</if>
- <if test="smsTemplate.content != null and smsTemplate.content != ''"> and content like concat('%', #{smsTemplate.content},'%')</if>
- <if test="smsTemplate.createTime != null "> and create_time = #{smsTemplate.createTime}</if>
- <if test="smsTemplate.updateTime != null "> and update_time = #{smsTemplate.updateTime}</if>
- <if test="smsTemplate.createBy != null "> and create_by = #{smsTemplate.createBy}</if>
- <if test="smsTemplate.isDeleted != null and smsTemplate.isDeleted != ''"> and is_deleted = #{smsTemplate.isDeleted}</if>
- </where>
- </select>
-
-
-
- <resultMap type="org.springblade.modules.sms.dto.SmsTemplateDTO" id="BladeSmsTemplateDTOResult">
- <result property="id" column="id" />
- <result property="deptId" column="dept_id" />
- <result property="content" column="content" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="createBy" column="create_by" />
- <result property="isDeleted" column="is_deleted" />
- </resultMap>
-
- <sql id="selectBladeSmsTemplate">
- select
- id,
- dept_id,
- content,
- create_time,
- update_time,
- create_by,
- is_deleted
- from
- blade_sms_template
- </sql>
-
- <select id="selectBladeSmsTemplateById" parameterType="int" resultMap="BladeSmsTemplateDTOResult">
- <include refid="selectBladeSmsTemplate"/>
- where
- id = #{id}
- </select>
-
- <select id="selectBladeSmsTemplateList" parameterType="org.springblade.modules.sms.dto.SmsTemplateDTO" resultMap="BladeSmsTemplateDTOResult">
- <include refid="selectBladeSmsTemplate"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="createBy != null "> and create_by = #{createBy}</if>
- <if test="isDeleted != null and isDeleted != ''"> and is_deleted = #{isDeleted}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/sms/service/ISmsRecordService.java b/src/main/java/org/springblade/modules/sms/service/ISmsRecordService.java
deleted file mode 100644
index 3b22475..0000000
--- a/src/main/java/org/springblade/modules/sms/service/ISmsRecordService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import org.springblade.modules.sms.vo.SmsRecordVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 短信记录表 服务类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-public interface ISmsRecordService extends IService<SmsRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param smsRecord
- * @return
- */
- IPage<SmsRecordVO> selectSmsRecordPage(IPage<SmsRecordVO> page, SmsRecordVO smsRecord);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/service/ISmsSendService.java b/src/main/java/org/springblade/modules/sms/service/ISmsSendService.java
deleted file mode 100644
index a4792a9..0000000
--- a/src/main/java/org/springblade/modules/sms/service/ISmsSendService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-
-/**
- * 短信模版表 服务类
- *
- * @author BladeX
- * @since 2024-03-06
- */
-public interface ISmsSendService extends IService<SmsTemplateEntity> {
-
- /**
- *
- *
- * @return
- */
- Boolean sendVerificationCode(String phone);
-
-
- Boolean sendNotice(Long templateId,Long residenceId);
-
- Boolean sendRectificationNotice(Long templateId,Long placeSelfCheckId);
-}
diff --git a/src/main/java/org/springblade/modules/sms/service/ISmsTemplateService.java b/src/main/java/org/springblade/modules/sms/service/ISmsTemplateService.java
deleted file mode 100644
index 26a692f..0000000
--- a/src/main/java/org/springblade/modules/sms/service/ISmsTemplateService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.sms.dto.SmsTemplateDTO;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import org.springblade.modules.sms.vo.SmsTemplateVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 短信模版表 服务类
- *
- * @author BladeX
- * @since 2024-03-06
- */
-public interface ISmsTemplateService extends IService<SmsTemplateEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param smsTemplate
- * @return
- */
- IPage<SmsTemplateVO> selectSmsTemplatePage(IPage<SmsTemplateVO> page, SmsTemplateVO smsTemplate);
- /**
- * 查询短信模版表
- *
- * @param id 短信模版表ID
- * @return 短信模版表
- */
- public SmsTemplateDTO selectBladeSmsTemplateById(Integer id);
-
- /**
- * 查询短信模版表列表
- *
- * @param SmsTemplateDTO 短信模版表
- * @return 短信模版表集合
- */
- public List<SmsTemplateDTO> selectBladeSmsTemplateList(SmsTemplateDTO SmsTemplateDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/service/impl/SmsRecordServiceImpl.java b/src/main/java/org/springblade/modules/sms/service/impl/SmsRecordServiceImpl.java
deleted file mode 100644
index 9a68423..0000000
--- a/src/main/java/org/springblade/modules/sms/service/impl/SmsRecordServiceImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import org.springblade.modules.sms.vo.SmsRecordVO;
-import org.springblade.modules.sms.mapper.SmsRecordMapper;
-import org.springblade.modules.sms.service.ISmsRecordService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 短信记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Service
-public class SmsRecordServiceImpl extends ServiceImpl<SmsRecordMapper, SmsRecordEntity> implements ISmsRecordService {
-
- /**
- * 分页查询短信记录。
- *
- * @param page 分页对象,包含当前页码和每页记录数等信息。
- * @param smsRecord 短信记录查询条件对象,用于筛选特定的短信记录。
- * @return 返回经过分页处理的短信记录列表。
- */
- @Override
- public IPage<SmsRecordVO> selectSmsRecordPage(IPage<SmsRecordVO> page, SmsRecordVO smsRecord) {
- // 调用底层Mapper,查询指定条件的短信记录,并将结果设置到分页对象中
- return page.setRecords(baseMapper.selectSmsRecordPage(page, smsRecord));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/service/impl/SmsSendServiceImpl.java b/src/main/java/org/springblade/modules/sms/service/impl/SmsSendServiceImpl.java
deleted file mode 100644
index a887043..0000000
--- a/src/main/java/org/springblade/modules/sms/service/impl/SmsSendServiceImpl.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.jetbrains.annotations.NotNull;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.utils.HttpClientUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.common.utils.UtilRandom;
-import org.springblade.common.utils.sms.AlipaySignature;
-import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.resource.entity.Sms;
-import org.springblade.modules.resource.service.ISmsService;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import org.springblade.modules.sms.mapper.SmsTemplateMapper;
-import org.springblade.modules.sms.service.ISmsSendService;
-import org.springblade.modules.sms.service.ISmsTemplateService;
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import org.springblade.modules.sms.service.ISmsRecordService;
-import org.springblade.modules.system.service.IUserService;
-import org.springblade.modules.system.vo.UserVO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import org.springblade.modules.task.service.ITaskPlaceSelfCheckService;
-import org.springblade.modules.task.service.ITaskResidencePermitApplyService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-
-/**
- * 短信模版表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-06
- */
-@Service
-public class SmsSendServiceImpl extends ServiceImpl<SmsTemplateMapper, SmsTemplateEntity> implements ISmsSendService {
- @Autowired
- private BladeRedis redisTemplate;
- private static Logger logger = LoggerFactory.getLogger(SmsSendServiceImpl.class);
- // 确保这些字符串被适当地定义和管理
- public static final String SMS_VALIDATE_PHONE = "sms:validate:code:";
- public static final String SMS_VALIDATE_PHONE_NUM = "sms:validate:phone:";
- private static final String SMS_SEND_FAILED = "短信发送失败!";
- private static final String MESSAGE_SOP_EQUALS_MES_RESPONSE_CODE = "message_sop_equalsMes_response";
- private static final DateTimeFormatter SECOND_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-
-
- @Autowired
- private ISmsService iSmsService;
-
- @Autowired
- private ISmsTemplateService iSmsTemplateService;
-
- @Override
- public Boolean sendVerificationCode(String phone) {
- if (phone == null || phone.length() != 11) {
- logger.error("手机号格式错误");
- return false;
- }
-
- if (redisTemplate.exists(SMS_VALIDATE_PHONE_NUM + phone)) {
- logger.error("同一个手机号一分钟内只能发送一条记录");
- return false;
- }
-
- Sms serviceOne = iSmsService.getOne(Wrappers.<Sms>lambdaQuery().eq(Sms::getStatus, 2));
- if (serviceOne == null) {
- logger.error("未找到状态为2的Sms服务");
- return false;
- }
- SmsTemplateEntity smsTemplateEntity = iSmsTemplateService.getOne(Wrappers.<SmsTemplateEntity>lambdaQuery()
- .eq(SmsTemplateEntity::getId, serviceOne.getTemplateId()));
- if (smsTemplateEntity == null) {
- logger.error("未找到对应的短信模板");
- return false;
- }
-
- //发送的手机号
- List<Map> phonesList = new ArrayList<>();
- Map phoneMap = new HashMap();
- phoneMap.put("phone", phone);
- List<String> varList = new ArrayList<>();
- Integer code = UtilRandom.randomCount(111111, 999999);
- varList.add(code.toString());
- phoneMap.put("varList", varList);
- phonesList.add(phoneMap);
- //短信内容
- String content = smsTemplateEntity.getContent();
- //发送时间
- LocalDateTime nowDateTime = LocalDateTime.now();
- String send_time = nowDateTime.format(SECOND_FORMATTER);
- Map params = new HashMap();
- params.put("phones", phonesList);
- //短信主题
- params.put("subject", "对外接口不同内容发送-动态模板");
- params.put("content", content);
- //短信模板
- params.put("template_id", null);
- // 发送时间
- params.put("send_time", send_time);
- //优先级,高级=5,中级=3,低级=1
- params.put("priority", "1");
- //不同内容发送类型,1=动态模板发送,2=文件内容发送
- params.put("type", "1");
- //创建人主键
- params.put("sop_create_by", serviceOne.getSmsCode());
- //短信发送记录
- saveSmsRecord(phone, serviceOne, code.toString(), content);
- Boolean aBoolean = sendSmsGet(serviceOne, params);
- if (aBoolean) {
- // 将验证码存入redis,其中phone为手机号,code为验证码
- // SMS_VALIDATE_PHONE 为前缀,通过phone和code在redis中设置一个过期的键值对
- redisTemplate.setEx(SMS_VALIDATE_PHONE + phone, code, 300L);
- // 同时,为了记录该手机短时间内已接收的验证码次数,使用另一个键值对进行计数
- // SMS_VALIDATE_PHONE_NUM 为计数器的前缀,过期时间为60秒
- redisTemplate.setEx(SMS_VALIDATE_PHONE_NUM + phone, 1, 60L);
- }
- return aBoolean;
- }
-
-
- /**
- * @param templateId
- * @param residenceId
- * @return
- */
- @Override
- public Boolean sendNotice(Long templateId, Long residenceId) {
-
- Sms serviceOne = iSmsService.getOne(Wrappers.<Sms>lambdaQuery().eq(Sms::getStatus, 2));
- if (serviceOne == null) {
- logger.error("未找到状态为2的Sms服务");
- return false;
- }
- SmsTemplateEntity smsTemplateEntity = iSmsTemplateService.getOne(Wrappers.<SmsTemplateEntity>lambdaQuery()
- .eq(SmsTemplateEntity::getId, templateId));
- if (smsTemplateEntity == null) {
- logger.error("未找到对应的短信模板");
- return false;
- }
- ITaskResidencePermitApplyService bean = SpringUtils.getBean(ITaskResidencePermitApplyService.class);
- TaskResidencePermitApplyEntity residencePermitApplyEntity = bean.getById(residenceId);
- String phone = residencePermitApplyEntity.getPhone();
- //发送的手机号
- List<Map> phonesList = new ArrayList<>();
- Map phoneMap = new HashMap();
- phoneMap.put("phone", phone);
- List<String> varList = new ArrayList<>();
- // 设置参数
-
- varList.add(residencePermitApplyEntity.getName());
- phoneMap.put("varList", varList);
- phonesList.add(phoneMap);
- //短信内容
- String content = smsTemplateEntity.getContent();
- //发送时间
- LocalDateTime nowDateTime = LocalDateTime.now();
- String send_time = nowDateTime.format(SECOND_FORMATTER);
- Map params = new HashMap();
- params.put("phones", phonesList);
- //短信主题
- params.put("subject", "对外接口不同内容发送-动态模板");
- params.put("content", content);
- //短信模板
- params.put("template_id", null);
- // 发送时间
- params.put("send_time", send_time);
- //优先级,高级=5,中级=3,低级=1
- params.put("priority", "1");
- //不同内容发送类型,1=动态模板发送,2=文件内容发送
- params.put("type", "1");
- //创建人主键
- params.put("sop_create_by", serviceOne.getSmsCode());
- //短信发送记录
- saveSmsRecord(phone, serviceOne, residencePermitApplyEntity.getName(), content);
- Boolean aBoolean = sendSmsGet(serviceOne, params);
- return aBoolean;
- }
-
- /**
- * @param templateId
- * @param placeSelfCheckId
- * @return
- */
- @Override
- public Boolean sendRectificationNotice(Long templateId, Long placeSelfCheckId) {
-
- Sms serviceOne = iSmsService.getOne(Wrappers.<Sms>lambdaQuery().eq(Sms::getStatus, 2));
- if (serviceOne == null) {
- logger.error("未找到状态为2的Sms服务");
- return false;
- }
- SmsTemplateEntity smsTemplateEntity = iSmsTemplateService.getOne(Wrappers.<SmsTemplateEntity>lambdaQuery()
- .eq(SmsTemplateEntity::getId, templateId));
- if (smsTemplateEntity == null) {
- logger.error("未找到对应的短信模板");
- return false;
- }
- ITaskPlaceSelfCheckService bean = SpringUtils.getBean(ITaskPlaceSelfCheckService.class);
- TaskPlaceSelfCheckEntity placeSelfCheckEntity = bean.getById(placeSelfCheckId);
- IUserService userService = SpringUtils.getBean(IUserService.class);
- UserVO userVO = userService.getuserById(placeSelfCheckEntity.getId());
- String phone = userVO.getPhone();
- //发送的手机号
- List<Map> phonesList = new ArrayList<>();
- Map phoneMap = new HashMap();
- phoneMap.put("phone", phone);
- List<String> varList = new ArrayList<>();
- // 设置参数
-
- varList.add(userVO.getName());
- varList.add(placeSelfCheckEntity.getPlaceName());
- phoneMap.put("varList", varList);
- phonesList.add(phoneMap);
- //短信内容
- String content = smsTemplateEntity.getContent();
- //发送时间
- LocalDateTime nowDateTime = LocalDateTime.now();
- String send_time = nowDateTime.format(SECOND_FORMATTER);
- Map params = new HashMap();
- params.put("phones", phonesList);
- //短信主题
- params.put("subject", "对外接口不同内容发送-动态模板");
- params.put("content", content);
- //短信模板
- params.put("template_id", null);
- // 发送时间
- params.put("send_time", send_time);
- //优先级,高级=5,中级=3,低级=1
- params.put("priority", "1");
- //不同内容发送类型,1=动态模板发送,2=文件内容发送
- params.put("type", "1");
- //创建人主键
- params.put("sop_create_by", serviceOne.getSmsCode());
- //短信发送记录
- saveSmsRecord(phone, serviceOne, placeSelfCheckEntity.getPlaceName(), content);
- Boolean aBoolean = sendSmsGet(serviceOne, params);
- return aBoolean;
- }
-
- /**
- * 发送短信并获取发送结果。
- *
- * @param serviceOne 用于发送短信的服务对象
- * @param params 发送短信所需的参数映射
- * @return 如果短信发送成功,则返回true;否则返回false。
- */
- @NotNull
- private Boolean sendSmsGet(Sms serviceOne, Map params) {
- try {
- // 尝试发送短信并解析响应结果
- String result = sendSms(params, "message.sop.differentMes", serviceOne);
- JSONObject jsonObject = JSON.parseObject(result);
- JSONObject messageSopEqualsMesResponse = (JSONObject) jsonObject.get(MESSAGE_SOP_EQUALS_MES_RESPONSE_CODE);
- if (messageSopEqualsMesResponse.get("code").equals(200)) {
- // 如果响应代码为200,表示短信发送成功
- return true;
- } else {
- // 记录短信发送失败的日志
- logger.error("短信发送失败!");
- }
- } catch (Exception e) {
- // 记录发送短信过程中出现的异常
- logger.error(SMS_SEND_FAILED, e);
- throw new RuntimeException(e);
- }
- // 如果执行到这里,表示短信发送失败或出现异常
- return false;
- }
-
- /**
- * 保存短信发送记录
- *
- * @param phone 接收短信的手机号码
- * @param serviceOne 发送短信所使用的服务
- * @param code 短信中的验证码
- * @param content 短信内容,其中可能包含占位符"#P_1#"用于被验证码替换
- */
- private static void saveSmsRecord(String phone, Sms serviceOne, String code, String content) {
- // 通过Spring工具类获取短信记录服务的实例
- ISmsRecordService smsRecordService = SpringUtils.getBean(ISmsRecordService.class);
- // 创建一个新的短信记录实体
- SmsRecordEntity smsRecordEntity = new SmsRecordEntity();
- // 设置短信内容,将占位符"#P_1#"替换为验证码
- smsRecordEntity.setContent(content.replace("#P_1#", code));
- // 设置手机号码
- smsRecordEntity.setPhone(phone);
- // 设置短信模板ID
- smsRecordEntity.setTemplateId(Long.valueOf(serviceOne.getTemplateId()));
- // 设置创建用户ID,来自认证工具类
- smsRecordEntity.setCreateUser(AuthUtil.getUserId());
- // 保存短信记录实体
- smsRecordService.save(smsRecordEntity);
- }
-
- public String sendSms(Object bizContent, String method, Sms serviceOne) throws Exception {
-
- // 公共请求参数
- Map<String, String> params = new HashMap<String, String>();
- params.put("app_id", serviceOne.getAccessKey());
- params.put("method", method);
- params.put("format", "json");
- params.put("charset", "utf-8");
- params.put("sign_type", "RSA2");
- params.put("timestamp", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
- params.put("version", "1.0");
-
- // 业务参数
- params.put("biz_content", JSON.toJSONString(bizContent));
- String content = AlipaySignature.getSignContent(params);
- String sign = AlipaySignature.rsa256Sign(content, serviceOne.getSecretKey(), "utf-8");
- params.put("sign", sign);
- logger.info("短信请求参数:" + buildParamQuery(params));
- String responseData = HttpClientUtils.doGet(serviceOne.getRemark(), params);// 发送请求
- logger.info("短信响应结果:" + responseData);
- return responseData;
- }
-
- protected static String buildParamQuery(Map<String, String> params) {
- StringBuilder sb = new StringBuilder();
- for (Map.Entry<String, String> entry : params.entrySet()) {
- sb.append("&").append(entry.getKey()).append("=").append(entry.getValue());
- }
- return sb.toString().substring(1);
- }
-
- protected static String buildUrlQuery(Map<String, String> params) {
- StringBuilder sb = new StringBuilder();
- for (Map.Entry<String, String> entry : params.entrySet()) {
- try {
- sb.append("&").append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue(), "UTF-8"));
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- }
- }
- return sb.toString().substring(1);
- }
-}
diff --git a/src/main/java/org/springblade/modules/sms/service/impl/SmsTemplateServiceImpl.java b/src/main/java/org/springblade/modules/sms/service/impl/SmsTemplateServiceImpl.java
deleted file mode 100644
index f86d03b..0000000
--- a/src/main/java/org/springblade/modules/sms/service/impl/SmsTemplateServiceImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.sms.dto.SmsTemplateDTO;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import org.springblade.modules.sms.vo.SmsTemplateVO;
-import org.springblade.modules.sms.mapper.SmsTemplateMapper;
-import org.springblade.modules.sms.service.ISmsTemplateService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 短信模版表 服务实现类
- *
- * @author BladeX
- * @since 2024-03-06
- */
-@Service
-public class SmsTemplateServiceImpl extends ServiceImpl<SmsTemplateMapper, SmsTemplateEntity> implements ISmsTemplateService {
-
- @Override
- public IPage<SmsTemplateVO> selectSmsTemplatePage(IPage<SmsTemplateVO> page, SmsTemplateVO smsTemplate) {
- List<SmsTemplateVO> smsTemplateVOS = baseMapper.selectSmsTemplatePage(page, smsTemplate);
- return page.setRecords(smsTemplateVOS);
- }
-
- /**
- * 查询短信模版表
- *
- * @param id 短信模版表ID
- * @return 短信模版表
- */
- @Override
- public SmsTemplateDTO selectBladeSmsTemplateById(Integer id)
- {
- return this.baseMapper.selectBladeSmsTemplateById(id);
- }
-
- /**
- * 查询短信模版表列表
- *
- * @param SmsTemplateDTO 短信模版表
- * @return 短信模版表集合
- */
- @Override
- public List<SmsTemplateDTO> selectBladeSmsTemplateList(SmsTemplateDTO SmsTemplateDTO)
- {
- return this.baseMapper.selectBladeSmsTemplateList(SmsTemplateDTO);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/vo/SmsRecordVO.java b/src/main/java/org/springblade/modules/sms/vo/SmsRecordVO.java
deleted file mode 100644
index a3876d9..0000000
--- a/src/main/java/org/springblade/modules/sms/vo/SmsRecordVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.vo;
-
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 短信记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-04-02
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SmsRecordVO extends SmsRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/vo/SmsTemplateVO.java b/src/main/java/org/springblade/modules/sms/vo/SmsTemplateVO.java
deleted file mode 100644
index d6851dd..0000000
--- a/src/main/java/org/springblade/modules/sms/vo/SmsTemplateVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.vo;
-
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 短信模版表 视图实体类
- *
- * @author BladeX
- * @since 2024-03-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SmsTemplateVO extends SmsTemplateEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/wrapper/SmsRecordWrapper.java b/src/main/java/org/springblade/modules/sms/wrapper/SmsRecordWrapper.java
deleted file mode 100644
index f9c25d6..0000000
--- a/src/main/java/org/springblade/modules/sms/wrapper/SmsRecordWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.sms.entity.SmsRecordEntity;
-import org.springblade.modules.sms.vo.SmsRecordVO;
-
-import java.util.Objects;
-
-/**
- * 短信记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-02
- */
-public class SmsRecordWrapper extends BaseEntityWrapper<SmsRecordEntity, SmsRecordVO> {
-
- public static SmsRecordWrapper build() {
- return new SmsRecordWrapper();
- }
-
- @Override
- public SmsRecordVO entityVO(SmsRecordEntity smsRecord) {
- SmsRecordVO smsRecordVO = Objects.requireNonNull(BeanUtil.copy(smsRecord, SmsRecordVO.class));
-
- //User createUser = UserCache.getUser(smsRecord.getCreateUser());
- //User updateUser = UserCache.getUser(smsRecord.getUpdateUser());
- //smsRecordVO.setCreateUserName(createUser.getName());
- //smsRecordVO.setUpdateUserName(updateUser.getName());
-
- return smsRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sms/wrapper/SmsTemplateWrapper.java b/src/main/java/org/springblade/modules/sms/wrapper/SmsTemplateWrapper.java
deleted file mode 100644
index 512e0aa..0000000
--- a/src/main/java/org/springblade/modules/sms/wrapper/SmsTemplateWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.sms.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.sms.entity.SmsTemplateEntity;
-import org.springblade.modules.sms.vo.SmsTemplateVO;
-import java.util.Objects;
-
-/**
- * 短信模版表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-06
- */
-public class SmsTemplateWrapper extends BaseEntityWrapper<SmsTemplateEntity, SmsTemplateVO> {
-
- public static SmsTemplateWrapper build() {
- return new SmsTemplateWrapper();
- }
-
- @Override
- public SmsTemplateVO entityVO(SmsTemplateEntity smsTemplate) {
- SmsTemplateVO smsTemplateVO = Objects.requireNonNull(BeanUtil.copy(smsTemplate, SmsTemplateVO.class));
-
- //User createUser = UserCache.getUser(smsTemplate.getCreateUser());
- //User updateUser = UserCache.getUser(smsTemplate.getUpdateUser());
- //smsTemplateVO.setCreateUserName(createUser.getName());
- //smsTemplateVO.setUpdateUserName(updateUser.getName());
-
- return smsTemplateVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/sse/controller/SSEController.java b/src/main/java/org/springblade/modules/sse/controller/SSEController.java
deleted file mode 100644
index aacf0fd..0000000
--- a/src/main/java/org/springblade/modules/sse/controller/SSEController.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.springblade.modules.sse.controller;
-
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.modules.sse.server.SSEServer;
-import org.springblade.modules.sse.vo.SseVO;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
-
-@Slf4j
-@RestController
-@CrossOrigin
-@RequestMapping("/sse/sse")
-@AllArgsConstructor
-public class SSEController {
-
- /**
- * 建立连接
- * @param sse
- * @return
- */
- @GetMapping("/connect")
- public SseEmitter connect(SseVO sse){
- String userId = sse.getType() + ":" + sse.getUserId();
- return SSEServer.connect(userId);
- }
-
- /**
- * 断开连接
- * @param sse
- * @return
- */
- @GetMapping("/disconnect")
- public void disconnect(SseVO sse){
- String userId = sse.getType() + ":" + sse.getUserId();
- SSEServer.removeUser(userId);
- }
-}
diff --git a/src/main/java/org/springblade/modules/sse/server/SSEServer.java b/src/main/java/org/springblade/modules/sse/server/SSEServer.java
deleted file mode 100644
index 62404fc..0000000
--- a/src/main/java/org/springblade/modules/sse/server/SSEServer.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package org.springblade.modules.sse.server;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.MediaType;
-import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.Consumer;
-
-@Slf4j
-public class SSEServer {
-
- /**
- * 当前连接数
- */
- private static AtomicInteger count = new AtomicInteger(0);
-
- private static Map<String, SseEmitter> sseEmitterMap = new ConcurrentHashMap<>();
-
- public static SseEmitter connect(String userId){
- //设置超时时间,0表示不过期,默认是30秒,超过时间未完成会抛出异常
- SseEmitter sseEmitter = new SseEmitter(0L);
- //注册回调
- sseEmitter.onCompletion(completionCallBack(userId));
- sseEmitter.onError(errorCallBack(userId));
- sseEmitter.onTimeout(timeOutCallBack(userId));
- sseEmitterMap.put(userId,sseEmitter);
- //数量+1
- count.getAndIncrement();
- log.info("create new sse connect ,current user:{}",userId);
- log.info("count",count.getAndIncrement());
- return sseEmitter;
- }
- /**
- * 给指定用户发消息
- */
- public static void sendMessage(String userId, String message){
- if(sseEmitterMap.containsKey(userId)){
- try{
- sseEmitterMap.get(userId).send(message);
- }catch (IOException e){
- log.error("user id:{}, send message error:{}",userId,e.getMessage());
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 想多人发送消息,组播
- */
- public static void groupSendMessage(String groupId, String message){
- if(sseEmitterMap!=null&&!sseEmitterMap.isEmpty()){
- sseEmitterMap.forEach((k,v) -> {
- try{
- if(k.startsWith(groupId)){
- v.send(message, MediaType.APPLICATION_JSON);
- }
- }catch (IOException e){
- log.error("user id:{}, send message error:{}",groupId,message);
- removeUser(k);
- }
- });
- }
- }
-
- /**
- * 批量发送消息
- * @param message
- */
- public static void batchSendMessage(String message) {
- sseEmitterMap.forEach((k,v)->{
- try{
- v.send(message,MediaType.APPLICATION_JSON);
- }catch (IOException e){
- log.error("user id:{}, send message error:{}",k,e.getMessage());
- removeUser(k);
- }
- });
- }
-
- /**
- * 群发消息
- */
- public static void batchSendMessage(String message, Set<String> userIds){
- userIds.forEach(userId->sendMessage(userId,message));
- }
-
- /**
- * 用户离线删除用户
- * @param userId
- */
- public static void removeUser(String userId){
- sseEmitterMap.remove(userId);
- //数量-1
- count.getAndDecrement();
- log.info("remove user id:{}",userId);
- }
-
-
- public static List<String> getIds(){
- return new ArrayList<>(sseEmitterMap.keySet());
- }
-
- public static int getUserCount(){
- return count.intValue();
- }
-
- /**
- * 结束回调
- * @param userId
- * @return
- */
- private static Runnable completionCallBack(String userId) {
- return () -> {
- log.info("结束连接,{}",userId);
- removeUser(userId);
- };
- }
-
- /**
- * 超时回调
- * @param userId
- * @return
- */
- private static Runnable timeOutCallBack(String userId){
- return ()->{
- log.info("连接超时,{}",userId);
- removeUser(userId);
- };
- }
-
- /**
- * 错误回调
- * @param userId
- * @return
- */
- private static Consumer<Throwable> errorCallBack(String userId){
- return throwable -> {
- log.error("连接异常,{}",userId);
- removeUser(userId);
- };
- }
-}
diff --git a/src/main/java/org/springblade/modules/sse/vo/SseVO.java b/src/main/java/org/springblade/modules/sse/vo/SseVO.java
deleted file mode 100644
index 2673fc8..0000000
--- a/src/main/java/org/springblade/modules/sse/vo/SseVO.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.springblade.modules.sse.vo;
-
-import lombok.Data;
-
-@Data
-public class SseVO {
-
- /**
- * 类型 web,app,小程序
- */
- private String type;
-
- /**
- * 用户唯一值
- */
- private String userId;
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/controller/SubjectChoicesController.java b/src/main/java/org/springblade/modules/subjectChoices/controller/SubjectChoicesController.java
deleted file mode 100644
index df256c8..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/controller/SubjectChoicesController.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-import org.springblade.modules.subjectChoices.service.ISubjectChoicesService;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-import org.springblade.modules.subjectChoices.wrapper.SubjectChoicesWrapper;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-import org.springblade.modules.subjectOption.service.ISubjectOptionService;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 题目表 控制器
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-subjectChoices/subjectChoices")
-@Api(value = "题目表", tags = "题目表接口")
-public class SubjectChoicesController extends BladeController {
-
- private final ISubjectChoicesService subjectChoicesService;
-
- /**
- * 题目表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入subjectChoices")
- public R<SubjectChoicesVO> detail(SubjectChoicesEntity subjectChoices) {
- SubjectChoicesEntity detail = subjectChoicesService.getOne(Condition.getQueryWrapper(subjectChoices));
- return R.data(SubjectChoicesWrapper.build().entityVO(detail));
- }
-
- /**
- * 题目表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入subjectChoices")
- public R<IPage<SubjectChoicesVO>> list(SubjectChoicesEntity subjectChoices, Query query) {
- IPage<SubjectChoicesEntity> pages = subjectChoicesService.page(Condition.getPage(query), Condition.getQueryWrapper(subjectChoices));
- return R.data(SubjectChoicesWrapper.build().pageVO(pages));
- }
-
- /**
- * 题目表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入subjectChoices")
- public R<IPage<SubjectChoicesVO>> page(SubjectChoicesVO subjectChoices, Query query) {
- IPage<SubjectChoicesVO> pages = subjectChoicesService.selectSubjectChoicesPage(Condition.getPage(query), subjectChoices);
- return R.data(pages);
- }
-
- /**
- * 题目表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入subjectChoices")
- public R save(@Valid @RequestBody SubjectChoicesVO subjectChoices) {
- boolean save = subjectChoicesService.save(subjectChoices);
- if (save) {
- List<SubjectOptionVO> children = subjectChoices.getSubjectOptionList();
- for (SubjectOptionEntity child : children) {
- child.setSubjectChoicesId(subjectChoices.getId());
- }
- List<SubjectOptionEntity> copy = BeanUtil.copy(children, SubjectOptionEntity.class);
- ISubjectOptionService bean = SpringUtils.getBean(ISubjectOptionService.class);
- bean.saveOrUpdateBatch(copy);
- }
- return R.status(save);
- }
-
- /**
- * 题目表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入subjectChoices")
- public R update(@Valid @RequestBody SubjectChoicesEntity subjectChoices) {
- return R.status(subjectChoicesService.updateById(subjectChoices));
- }
-
- /**
- * 题目表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入subjectChoices")
- public R submit(@Valid @RequestBody SubjectChoicesVO subjectChoices) {
- boolean save = subjectChoicesService.saveOrUpdate(subjectChoices);
- if (save) {
- List<SubjectOptionVO> children = subjectChoices.getSubjectOptionList();
- for (SubjectOptionEntity child : children) {
- child.setSubjectChoicesId(subjectChoices.getId());
- }
- List<SubjectOptionEntity> copy = BeanUtil.copy(children, SubjectOptionEntity.class);
- ISubjectOptionService bean = SpringUtils.getBean(ISubjectOptionService.class);
- bean.saveOrUpdateBatch(copy);
- }
- return R.status(save);
- }
-
- /**
- * 题目表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(subjectChoicesService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/dto/SubjectChoicesDTO.java b/src/main/java/org/springblade/modules/subjectChoices/dto/SubjectChoicesDTO.java
deleted file mode 100644
index b2447b7..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/dto/SubjectChoicesDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-
-/**
- * 题目表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SubjectChoicesDTO extends SubjectChoicesEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/entity/SubjectChoicesEntity.java b/src/main/java/org/springblade/modules/subjectChoices/entity/SubjectChoicesEntity.java
deleted file mode 100644
index 1759e67..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/entity/SubjectChoicesEntity.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 题目表 实体类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-
-/**
- * 题目表对象 jczz_subject_choices
- *
- * @author ${context.author}
- * @date 2024-01-15 16:53:02
- */
-@ApiModel(value = "SubjectChoices对象", description = "题目表")
-@Data
-@TableName("jczz_subject_choices")
-public class SubjectChoicesEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- /**
- * 主键
- */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 父级id
- */
- @ApiModelProperty(value = "父级id", example = "")
- @TableField("parent_id")
- private Long parentId;
-
- /**
- * 大类名称
- */
- @ApiModelProperty(value = "大类名称", example = "")
- @TableField("category_name")
- private String categoryName;
-
- /**
- * 细类名称
- */
- @ApiModelProperty(value = "细类名称", example = "")
- @TableField("subclass_name")
- private String subclassName;
-
- /**
- * 题目名称
- */
- @ApiModelProperty(value = "题目名称", example = "")
- @TableField("subject_name")
- private String subjectName;
-
- /**
- * 类型 0:单选题 1:多选题 2:填空题
- */
- @ApiModelProperty(value = "类型 0:单选题 1:多选题 2:填空题", example = "")
- @TableField("choices_type")
- private Byte choicesType;
-
- /**
- * 分值
- */
- @ApiModelProperty(value = "分值", example = "")
- @TableField("score")
- private BigDecimal score;
-
- /**
- * 创建人
- */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("creator")
- private String creator;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_date")
- private Date createDate;
-
- /**
- * 修改人
- */
- @ApiModelProperty(value = "修改人", example = "")
- @TableField("modifier")
- private String modifier;
-
- /**
- * 修改时间
- */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("modify_date")
- private Date modifyDate;
-
- /**
- * 删除标记 0:正常;1:删除
- */
- @ApiModelProperty(value = "删除标记 0:正常;1:删除", example = "")
- @TableField("del_flag")
- private Byte delFlag;
-
- /**
- * 层级
- */
- @ApiModelProperty(value = "层级", example = "")
- @TableField("level")
- private Integer level;
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.java b/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.java
deleted file mode 100644
index db9760f..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.subjectChoices.dto.SubjectChoicesDTO;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-
-import java.util.List;
-
-/**
- * 题目表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-15
- */
-public interface SubjectChoicesMapper extends BaseMapper<SubjectChoicesEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param subjectChoices
- * @return
- */
- List<SubjectChoicesVO> selectSubjectChoicesPage(IPage page, @Param("subjectChoices") SubjectChoicesVO subjectChoices);
-
- /**
- * 查询题目表
- *
- * @param id 题目表ID
- * @return 题目表
- */
- SubjectChoicesDTO selectSubjectChoicesById(Long id);
-
- /**
- * 查询题目表列表
- *
- * @param subjectChoicesDTO 题目表
- * @return 题目表集合
- */
- List<SubjectChoicesDTO> selectSubjectChoicesList(SubjectChoicesDTO subjectChoicesDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml b/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml
deleted file mode 100644
index 8330fac..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.subjectChoices.mapper.SubjectChoicesMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="subjectChoicesResultMap" type="org.springblade.modules.subjectChoices.vo.SubjectChoicesVO">
- <result property="id" column="id"/>
- <result property="parentId" column="parent_id"/>
- <result property="categoryName" column="category_name"/>
- <result property="subclassName" column="subclass_name"/>
- <result property="subjectName" column="subject_name"/>
- <result property="choicesType" column="choices_type"/>
- <result property="score" column="score"/>
- <result property="creator" column="creator"/>
- <result property="createDate" column="create_date"/>
- <result property="modifier" column="modifier"/>
- <result property="modifyDate" column="modify_date"/>
- <result property="delFlag" column="del_flag"/>
- <result property="level" column="level"/>
- <!-- <collection property="subjectOptionList" javaType="java.util.List"-->
- <!-- ofType="org.springblade.modules.subjectOption.entity.SubjectOptionEntity" autoMapping="true">-->
- <!-- <id property="subjectChoicesId" column="id"/>-->
- <!-- </collection>-->
-
- <collection property="subjectOptionList" column="id" javaType="java.util.List"
- ofType="org.springblade.modules.subjectOption.entity.SubjectOptionEntity"
- autoMapping="true"
- select="selectCircleCommentByParentId"></collection>
-
- </resultMap>
-
- <select id="selectCircleCommentByParentId" parameterType="long"
- resultType="org.springblade.modules.subjectOption.vo.SubjectOptionVO">
- SELECT
- jso.*
- FROM
- jczz_subject_option jso
- WHERE
- jso.subject_choices_id = #{id}
- </select>
-
-
- <select id="selectSubjectChoicesPage" resultMap="subjectChoicesResultMap">
- select
- id,
- parent_id,
- category_name,
- subclass_name,
- subject_name,
- choices_type,
- score,
- creator,
- create_date,
- modifier,
- modify_date,
- del_flag,
- level
- from
- jczz_subject_choices
- <where>
- <if test="subjectChoices.id != null ">and id = #{subjectChoices.id}</if>
- <if test="subjectChoices.parentId != null ">and parent_id = #{subjectChoices.parentId}</if>
- <if test="subjectChoices.categoryName != null and subjectChoices.categoryName != ''">and category_name =
- #{subjectChoices.categoryName}
- </if>
- <if test="subjectChoices.subclassName != null and subjectChoices.subclassName != ''">and subclass_name =
- #{subjectChoices.subclassName}
- </if>
- <if test="subjectChoices.subjectName != null and subjectChoices.subjectName != ''">and subject_name =
- #{subjectChoices.subjectName}
- </if>
- <if test="subjectChoices.choicesType != null ">and choices_type = #{subjectChoices.choicesType}</if>
- <if test="subjectChoices.score != null ">and score = #{subjectChoices.score}</if>
- <if test="subjectChoices.creator != null and subjectChoices.creator != ''">and creator =
- #{subjectChoices.creator}
- </if>
- <if test="subjectChoices.createDate != null ">and create_date = #{subjectChoices.createDate}</if>
- <if test="subjectChoices.modifier != null and subjectChoices.modifier != ''">and modifier =
- #{subjectChoices.modifier}
- </if>
- <if test="subjectChoices.modifyDate != null ">and modify_date = #{subjectChoices.modifyDate}</if>
- <if test="subjectChoices.delFlag != null ">and del_flag = #{subjectChoices.delFlag}</if>
- <if test="subjectChoices.level != null ">and level = #{subjectChoices.level}</if>
-
- </where>
- order by level desc
-
- </select>
-
-
- <resultMap type="org.springblade.modules.subjectChoices.dto.SubjectChoicesDTO" id="SubjectChoicesDTOResult">
- <result property="id" column="id"/>
- <result property="parentId" column="parent_id"/>
- <result property="categoryName" column="category_name"/>
- <result property="subclassName" column="subclass_name"/>
- <result property="subjectName" column="subject_name"/>
- <result property="choicesType" column="choices_type"/>
- <result property="score" column="score"/>
- <result property="creator" column="creator"/>
- <result property="createDate" column="create_date"/>
- <result property="modifier" column="modifier"/>
- <result property="modifyDate" column="modify_date"/>
- <result property="delFlag" column="del_flag"/>
- <result property="level" column="level"/>
- </resultMap>
-
- <sql id="selectSubjectChoices">
- select
- id,
- parent_id,
- category_name,
- subclass_name,
- subject_name,
- choices_type,
- score,
- creator,
- create_date,
- modifier,
- modify_date,
- del_flag,
- level
- from
- jczz_subject_choices
- </sql>
-
- <select id="selectSubjectChoicesById" parameterType="long" resultMap="SubjectChoicesDTOResult">
- <include refid="selectSubjectChoices"/>
- where
- id = #{id}
- </select>
-
- <select id="selectSubjectChoicesList" parameterType="org.springblade.modules.subjectChoices.dto.SubjectChoicesDTO"
- resultMap="SubjectChoicesDTOResult">
- <include refid="selectSubjectChoices"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="parentId != null ">and parent_id = #{parentId}</if>
- <if test="categoryName != null and categoryName != ''">and category_name = #{categoryName}</if>
- <if test="subclassName != null and subclassName != ''">and subclass_name = #{subclassName}</if>
- <if test="subjectName != null and subjectName != ''">and subject_name = #{subjectName}</if>
- <if test="choicesType != null ">and choices_type = #{choicesType}</if>
- <if test="score != null ">and score = #{score}</if>
- <if test="creator != null and creator != ''">and creator = #{creator}</if>
- <if test="createDate != null ">and create_date = #{createDate}</if>
- <if test="modifier != null and modifier != ''">and modifier = #{modifier}</if>
- <if test="modifyDate != null ">and modify_date = #{modifyDate}</if>
- <if test="delFlag != null ">and del_flag = #{delFlag}</if>
- <if test="level != null ">and level = #{level}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/subjectChoices/service/ISubjectChoicesService.java b/src/main/java/org/springblade/modules/subjectChoices/service/ISubjectChoicesService.java
deleted file mode 100644
index 2def5bb..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/service/ISubjectChoicesService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.subjectChoices.dto.SubjectChoicesDTO;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-
-import java.util.List;
-
-/**
- * 题目表 服务类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-public interface ISubjectChoicesService extends IService<SubjectChoicesEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param subjectChoices
- * @return
- */
- IPage<SubjectChoicesVO> selectSubjectChoicesPage(IPage<SubjectChoicesVO> page, SubjectChoicesVO subjectChoices);
-
- /**
- * 查询题目表
- *
- * @param id 题目表ID
- * @return 题目表
- */
- SubjectChoicesDTO selectSubjectChoicesById(Long id);
-
- /**
- * 查询题目表列表
- *
- * @param subjectChoicesDTO 题目表
- * @return 题目表集合
- */
- List<SubjectChoicesDTO> selectSubjectChoicesList(SubjectChoicesDTO subjectChoicesDTO);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/service/impl/SubjectChoicesServiceImpl.java b/src/main/java/org/springblade/modules/subjectChoices/service/impl/SubjectChoicesServiceImpl.java
deleted file mode 100644
index b7fcea5..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/service/impl/SubjectChoicesServiceImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
-import org.springblade.modules.answerRecord.service.IAnswerRecordService;
-import org.springblade.modules.subjectChoices.dto.SubjectChoicesDTO;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-import org.springblade.modules.subjectChoices.mapper.SubjectChoicesMapper;
-import org.springblade.modules.subjectChoices.service.ISubjectChoicesService;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 题目表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@Service
-public class SubjectChoicesServiceImpl extends ServiceImpl<SubjectChoicesMapper, SubjectChoicesEntity> implements ISubjectChoicesService {
-
- @Override
- public IPage<SubjectChoicesVO> selectSubjectChoicesPage(IPage<SubjectChoicesVO> page, SubjectChoicesVO subjectChoices) {
- List<SubjectChoicesVO> subjectChoicesVOS = baseMapper.selectSubjectChoicesPage(page, subjectChoices);
- IAnswerRecordService bean = SpringUtils.getBean(IAnswerRecordService.class);
- for (SubjectChoicesVO subjectChoicesVO : subjectChoicesVOS) {
- List<SubjectOptionVO> subjectOptionList = subjectChoicesVO.getSubjectOptionList();
- for (SubjectOptionVO subjectOptionVO : subjectOptionList) {
- AnswerRecordEntity one = bean.getOne(Wrappers.<AnswerRecordEntity>lambdaQuery().
- eq(AnswerRecordEntity::getAnswerOption, subjectOptionVO.getId())
- .eq(AnswerRecordEntity::getPropertyId,subjectChoices.getPropertyId()));
- if (one == null) {
- continue;
- }
- if (one.getSubjectChoicesType().equals(3)) {
- subjectOptionVO.setNumbers(one.getAnswer());
- } else {
- subjectChoicesVO.setChooseId(one.getAnswerOption());
- break;
- }
- }
- }
- return page.setRecords(subjectChoicesVOS);
- }
-
- /**
- * 查询题目表
- *
- * @param id 题目表ID
- * @return 题目表
- */
- @Override
- public SubjectChoicesDTO selectSubjectChoicesById(Long id) {
- return this.baseMapper.selectSubjectChoicesById(id);
- }
-
- /**
- * 查询题目表列表
- *
- * @param subjectChoicesDTO 题目表
- * @return 题目表集合
- */
- @Override
- public List<SubjectChoicesDTO> selectSubjectChoicesList(SubjectChoicesDTO subjectChoicesDTO) {
- return this.baseMapper.selectSubjectChoicesList(subjectChoicesDTO);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/vo/SubjectChoicesVO.java b/src/main/java/org/springblade/modules/subjectChoices/vo/SubjectChoicesVO.java
deleted file mode 100644
index 2857dec..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/vo/SubjectChoicesVO.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-
-import java.util.List;
-
-/**
- * 题目表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SubjectChoicesVO extends SubjectChoicesEntity {
- private static final long serialVersionUID = 1L;
-
- private Long propertyId;
-
- private Long chooseId;
-
-// private List<SubjectOptionEntity> subjectOptionList;
-
- private List<SubjectOptionVO> subjectOptionList;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectChoices/wrapper/SubjectChoicesWrapper.java b/src/main/java/org/springblade/modules/subjectChoices/wrapper/SubjectChoicesWrapper.java
deleted file mode 100644
index fb34139..0000000
--- a/src/main/java/org/springblade/modules/subjectChoices/wrapper/SubjectChoicesWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectChoices.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.subjectChoices.entity.SubjectChoicesEntity;
-import org.springblade.modules.subjectChoices.vo.SubjectChoicesVO;
-
-import java.util.Objects;
-
-/**
- * 题目表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-15
- */
-public class SubjectChoicesWrapper extends BaseEntityWrapper<SubjectChoicesEntity, SubjectChoicesVO> {
-
- public static SubjectChoicesWrapper build() {
- return new SubjectChoicesWrapper();
- }
-
- @Override
- public SubjectChoicesVO entityVO(SubjectChoicesEntity subjectChoices) {
- SubjectChoicesVO subjectChoicesVO = Objects.requireNonNull(BeanUtil.copy(subjectChoices, SubjectChoicesVO.class));
-
- //User createUser = UserCache.getUser(subjectChoices.getCreateUser());
- //User updateUser = UserCache.getUser(subjectChoices.getUpdateUser());
- //subjectChoicesVO.setCreateUserName(createUser.getName());
- //subjectChoicesVO.setUpdateUserName(updateUser.getName());
-
- return subjectChoicesVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/controller/SubjectOptionController.java b/src/main/java/org/springblade/modules/subjectOption/controller/SubjectOptionController.java
deleted file mode 100644
index 8adbf9d..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/controller/SubjectOptionController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-import org.springblade.modules.subjectOption.service.ISubjectOptionService;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-import org.springblade.modules.subjectOption.wrapper.SubjectOptionWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 题目选项表 控制器
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-subjectOption/subjectOption")
-@Api(value = "题目选项表", tags = "题目选项表接口")
-public class SubjectOptionController extends BladeController {
-
- private final ISubjectOptionService subjectOptionService;
-
- /**
- * 题目选项表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入subjectOption")
- public R<SubjectOptionVO> detail(SubjectOptionEntity subjectOption) {
- SubjectOptionEntity detail = subjectOptionService.getOne(Condition.getQueryWrapper(subjectOption));
- return R.data(SubjectOptionWrapper.build().entityVO(detail));
- }
-
- /**
- * 题目选项表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入subjectOption")
- public R<IPage<SubjectOptionVO>> list(SubjectOptionEntity subjectOption, Query query) {
- IPage<SubjectOptionEntity> pages = subjectOptionService.page(Condition.getPage(query), Condition.getQueryWrapper(subjectOption));
- return R.data(SubjectOptionWrapper.build().pageVO(pages));
- }
-
- /**
- * 题目选项表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入subjectOption")
- public R<IPage<SubjectOptionVO>> page(SubjectOptionVO subjectOption, Query query) {
- IPage<SubjectOptionVO> pages = subjectOptionService.selectSubjectOptionPage(Condition.getPage(query), subjectOption);
- return R.data(pages);
- }
-
- /**
- * 题目选项表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入subjectOption")
- public R save(@Valid @RequestBody SubjectOptionEntity subjectOption) {
- return R.status(subjectOptionService.save(subjectOption));
- }
-
- /**
- * 题目选项表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入subjectOption")
- public R update(@Valid @RequestBody SubjectOptionEntity subjectOption) {
- return R.status(subjectOptionService.updateById(subjectOption));
- }
-
- /**
- * 题目选项表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入subjectOption")
- public R submit(@Valid @RequestBody SubjectOptionEntity subjectOption) {
- return R.status(subjectOptionService.saveOrUpdate(subjectOption));
- }
-
- /**
- * 题目选项表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(subjectOptionService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/dto/SubjectOptionDTO.java b/src/main/java/org/springblade/modules/subjectOption/dto/SubjectOptionDTO.java
deleted file mode 100644
index dd82183..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/dto/SubjectOptionDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-
-/**
- * 题目选项表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SubjectOptionDTO extends SubjectOptionEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/entity/SubjectOptionEntity.java b/src/main/java/org/springblade/modules/subjectOption/entity/SubjectOptionEntity.java
deleted file mode 100644
index 7aac9ce..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/entity/SubjectOptionEntity.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.entity;
-
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 题目选项表对象 jczz_subject_option
- *
- * @author ${context.author}
- * @date 2024-01-15 16:53:02
- */
-@ApiModel(value = "SubjectOption对象", description = "题目选项表")
-@Data
-@TableName("jczz_subject_option")
-public class SubjectOptionEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- /**
- * 主键
- */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 选择题ID
- */
- @ApiModelProperty(value = "选择题ID", example = "")
- @TableField("subject_choices_id")
- private Long subjectChoicesId;
-
- /**
- * 选项名称
- */
- @ApiModelProperty(value = "选项名称", example = "")
- @TableField("option_name")
- private String optionName;
-
- /**
- * 选项内容
- */
- @ApiModelProperty(value = "选项内容", example = "")
- @TableField("option_content")
- private String optionContent;
-
- /**
- * 创建人
- */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("creator")
- private String creator;
-
- /**
- * 创建时间
- */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_date")
- private Date createDate;
-
- /**
- * 修改人
- */
- @ApiModelProperty(value = "修改人", example = "")
- @TableField("modifier")
- private String modifier;
-
- /**
- * 修改时间
- */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("modify_date")
- private Date modifyDate;
-
- /**
- * 删除标记 0:正常;1:删除
- */
- @ApiModelProperty(value = "删除标记 0:正常;1:删除", example = "")
- @TableField("del_flag")
- private Byte delFlag;
-
- /**
- * 分数
- */
- @ApiModelProperty(value = "分数", example = "")
- @TableField("score")
- private BigDecimal score;
-
- /**
- * 计算公式
- */
- @ApiModelProperty(value = "计算公式", example = "")
- @TableField("formula")
- private String formula;
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/mapper/SubjectOptionMapper.java b/src/main/java/org/springblade/modules/subjectOption/mapper/SubjectOptionMapper.java
deleted file mode 100644
index 8b6104d..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/mapper/SubjectOptionMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-
-import java.util.List;
-
-/**
- * 题目选项表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-15
- */
-public interface SubjectOptionMapper extends BaseMapper<SubjectOptionEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param subjectOption
- * @return
- */
- List<SubjectOptionVO> selectSubjectOptionPage(IPage page, SubjectOptionVO subjectOption);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/mapper/SubjectOptionMapper.xml b/src/main/java/org/springblade/modules/subjectOption/mapper/SubjectOptionMapper.xml
deleted file mode 100644
index a5fe234..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/mapper/SubjectOptionMapper.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.subjectOption.mapper.SubjectOptionMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="subjectOptionResultMap" type="org.springblade.modules.subjectOption.entity.SubjectOptionEntity">
- </resultMap>
-
-
- <select id="selectSubjectOptionPage" resultMap="subjectOptionResultMap">
- select * from jczz_subject_option where is_deleted = 0
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/subjectOption/service/ISubjectOptionService.java b/src/main/java/org/springblade/modules/subjectOption/service/ISubjectOptionService.java
deleted file mode 100644
index 45d618e..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/service/ISubjectOptionService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-
-/**
- * 题目选项表 服务类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-public interface ISubjectOptionService extends IService<SubjectOptionEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param subjectOption
- * @return
- */
- IPage<SubjectOptionVO> selectSubjectOptionPage(IPage<SubjectOptionVO> page, SubjectOptionVO subjectOption);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/service/impl/SubjectOptionServiceImpl.java b/src/main/java/org/springblade/modules/subjectOption/service/impl/SubjectOptionServiceImpl.java
deleted file mode 100644
index c472fb2..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/service/impl/SubjectOptionServiceImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-import org.springblade.modules.subjectOption.mapper.SubjectOptionMapper;
-import org.springblade.modules.subjectOption.service.ISubjectOptionService;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-import org.springframework.stereotype.Service;
-
-/**
- * 题目选项表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@Service
-public class SubjectOptionServiceImpl extends ServiceImpl<SubjectOptionMapper, SubjectOptionEntity> implements ISubjectOptionService {
-
- @Override
- public IPage<SubjectOptionVO> selectSubjectOptionPage(IPage<SubjectOptionVO> page, SubjectOptionVO subjectOption) {
- return page.setRecords(baseMapper.selectSubjectOptionPage(page, subjectOption));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/vo/SubjectOptionVO.java b/src/main/java/org/springblade/modules/subjectOption/vo/SubjectOptionVO.java
deleted file mode 100644
index e7c4ff4..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/vo/SubjectOptionVO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-
-/**
- * 题目选项表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-15
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SubjectOptionVO extends SubjectOptionEntity {
- private static final long serialVersionUID = 1L;
-
- // 选择的id
- private Long ids;
- // 填写的数字
- private Integer numbers;
-
-}
diff --git a/src/main/java/org/springblade/modules/subjectOption/wrapper/SubjectOptionWrapper.java b/src/main/java/org/springblade/modules/subjectOption/wrapper/SubjectOptionWrapper.java
deleted file mode 100644
index 36d6fa4..0000000
--- a/src/main/java/org/springblade/modules/subjectOption/wrapper/SubjectOptionWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.subjectOption.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.subjectOption.entity.SubjectOptionEntity;
-import org.springblade.modules.subjectOption.vo.SubjectOptionVO;
-
-import java.util.Objects;
-
-/**
- * 题目选项表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-15
- */
-public class SubjectOptionWrapper extends BaseEntityWrapper<SubjectOptionEntity, SubjectOptionVO> {
-
- public static SubjectOptionWrapper build() {
- return new SubjectOptionWrapper();
- }
-
- @Override
- public SubjectOptionVO entityVO(SubjectOptionEntity subjectOption) {
- SubjectOptionVO subjectOptionVO = Objects.requireNonNull(BeanUtil.copy(subjectOption, SubjectOptionVO.class));
-
- //User createUser = UserCache.getUser(subjectOption.getCreateUser());
- //User updateUser = UserCache.getUser(subjectOption.getUpdateUser());
- //subjectOptionVO.setCreateUserName(createUser.getName());
- //subjectOptionVO.setUpdateUserName(updateUser.getName());
-
- return subjectOptionVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.java b/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
index af293dc..26ac020 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
@@ -21,7 +21,6 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
-import org.springblade.modules.house.vo.HouseholdVO;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.excel.UserExcel;
import org.springblade.modules.system.vo.UserDetailVO;
diff --git a/src/main/java/org/springblade/modules/system/service/IUserService.java b/src/main/java/org/springblade/modules/system/service/IUserService.java
index 7f61797..b81bb7c 100644
--- a/src/main/java/org/springblade/modules/system/service/IUserService.java
+++ b/src/main/java/org/springblade/modules/system/service/IUserService.java
@@ -23,7 +23,6 @@
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
import org.springblade.modules.auth.enums.UserEnum;
-import org.springblade.modules.house.vo.HouseholdVO;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.entity.UserInfo;
import org.springblade.modules.system.entity.UserOauth;
diff --git a/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
index 945d82e..9e81272 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
@@ -1,19 +1,3 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
package org.springblade.modules.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -23,23 +7,13 @@
import org.springblade.common.cache.SysCache;
import org.springblade.common.utils.AuthUtils;
import org.springblade.common.utils.NodeTreeUtil;
-import org.springblade.common.utils.SpringUtils;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.core.tool.utils.StringPool;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.service.ICommunityService;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyService;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.entity.Region;
import org.springblade.modules.system.mapper.DeptMapper;
@@ -65,9 +39,6 @@
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements IDeptService {
private static final String TENANT_ID = "tenantId";
private static final String PARENT_ID = "parentId";
-
- @Autowired
- private IPropertyCompanyService propertyCompanyService;
@Autowired
private IRegionService regionService;
@@ -183,16 +154,6 @@
throw new ServiceException("请先删除子节点!");
}
List<Long> longs = Func.toLongList(ids);
- // 遍历
- for (Long id : longs) {
- // 查询当前机构信息
- DeptVO dept = baseMapper.getDeptById(id);
- // 如果父机构为物业公司
- if (dept.getParentName().equals("物业公司")) {
- // 删除
- propertyCompanyService.remove(Wrappers.<PropertyCompanyEntity>update().lambda().eq(PropertyCompanyEntity::getDeptId, id));
- }
- }
return removeByIds(longs);
}
@@ -274,25 +235,6 @@
*/
@Transactional(rollbackFor = Exception.class)
public void savePropertyCompany(Dept dept) {
- // 查询物业公司是否存在
- QueryWrapper<PropertyCompanyEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0)
- .eq("dept_id", dept.getId());
- PropertyCompanyEntity propertyCompanyEntity = propertyCompanyService.getOne(wrapper);
- if (null != propertyCompanyEntity) {
- // 修改
- propertyCompanyEntity.setDeptId(dept.getId());
- propertyCompanyEntity.setName(dept.getDeptName());
- // 往物业公司表中插入一条数据
- propertyCompanyService.updateById(propertyCompanyEntity);
- } else {
- // 新增
- PropertyCompanyEntity companyEntity = new PropertyCompanyEntity();
- companyEntity.setDeptId(dept.getId());
- companyEntity.setName(dept.getDeptName());
- // 往物业公司表中插入一条数据
- propertyCompanyService.save(companyEntity);
- }
}
@Override
@@ -359,26 +301,6 @@
@Override
@Transactional(rollbackFor = Exception.class)
public Object dataHandleCommunity() {
- // 查询所有的社区
- QueryWrapper<Region> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("district_code", "361102").eq("region_level", 5);
- List<Region> list = regionService.list(queryWrapper);
- // 遍历
- for (Region region : list) {
- // 查询是否已创建
- QueryWrapper<CommunityEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("name", region.getName());
- CommunityEntity one = SpringUtil.getBean(ICommunityService.class).getOne(wrapper);
- if (null == one) {
- // 新增
- CommunityEntity communityEntity = new CommunityEntity();
- communityEntity.setStreetCode(region.getTownCode());
- communityEntity.setName(region.getName());
- communityEntity.setCode(region.getCode());
- // 新增
- SpringUtil.getBean(ICommunityService.class).save(communityEntity);
- }
- }
return null;
}
@@ -388,17 +310,6 @@
@Override
@Transactional(rollbackFor = Exception.class)
public Object dataRegionGridCodeBindHandle() {
- // 查询网格对应的机构信息(包含父级机构名称)
- List<DeptVO> deptVOS = baseMapper.getGridDeptAndParentList();
- //遍历处理
- for (DeptVO deptVO : deptVOS) {
- GridEntity gridEntity = SpringUtils.getBean(IGridService.class).getGridByNames(deptVO.getDeptName(), deptVO.getParentName());
- if (null != gridEntity) {
- deptVO.setRegionCode(gridEntity.getGridCode());
- // 更新
- updateById(deptVO);
- }
- }
return null;
}
@@ -448,25 +359,6 @@
List<Dept> list = list(wrapper);
// 遍历
for (Dept dept : list) {
- // 通过派出所名称查询对应的警务网格信息
- QueryWrapper<PoliceAffairsGridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("pcs_name", dept.getDeptName());
- List<PoliceAffairsGridEntity> policeAffairsGridEntityList
- = SpringUtil.getBean(IPoliceAffairsGridService.class).list(queryWrapper);
- // 遍历
- for (PoliceAffairsGridEntity policeAffairsGridEntity : policeAffairsGridEntityList) {
- Dept deptInfo = new Dept();
- deptInfo.setTenantId("000000");
- deptInfo.setDeptName(policeAffairsGridEntity.getCommunityName());
- deptInfo.setFullName(policeAffairsGridEntity.getCommunityName());
- deptInfo.setDeptCategory(1);
- deptInfo.setDeptNature(1);
- deptInfo.setParentId(dept.getId());
- deptInfo.setAncestors(dept.getAncestors() + "," + dept.getId());
- deptInfo.setRegionCode(policeAffairsGridEntity.getJwGridCode());
- // 保存
- save(deptInfo);
- }
}
return null;
}
diff --git a/src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java
index 0d3c539..83d1ea7 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java
@@ -35,8 +35,6 @@
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.house.dto.UserHouseLabelDTO;
-import org.springblade.modules.house.service.IUserHouseLabelService;
import org.springblade.modules.system.dto.MenuDTO;
import org.springblade.modules.system.entity.*;
import org.springblade.modules.system.mapper.MenuMapper;
@@ -72,9 +70,6 @@
private final ITopMenuSettingService topMenuSettingService;
private final static String PARENT_ID = "parentId";
private final static Integer MENU_CATEGORY = 1;
-
- @Resource
- private final IUserHouseLabelService iUserHouseLabelService;
@Override
public List<MenuVO> lazyList(Long parentId, Map<String, Object> param) {
@@ -124,10 +119,6 @@
// 非超级管理员并且不是顶部菜单请求则返回对应角色权限菜单
else if (!AuthUtil.isAdministrator() && Func.isEmpty(topMenuId)) {
roleMenus = tenantPackageMenu(baseMapper.roleMenuByRoleId(Func.toLongList(roleId), menuType));
- // 1:居民,居民需要通过人的标签来显示取保候审
- if (CommonConstant.RESIDENT.equals(roleName)) {
- extracted(labelType, roleMenus,houseCode);
- }
}
// 顶部菜单请求返回对应角色权限菜单
else {
@@ -154,34 +145,9 @@
* @param labelType
*/
private void extracted(Integer labelType, List<Menu> roleMenus,String houseCode) {
- UserHouseLabelDTO userHouseLabelDTO = new UserHouseLabelDTO();
- userHouseLabelDTO.setUserId(AuthUtil.getUserId());
- userHouseLabelDTO.setLableType(labelType);
- userHouseLabelDTO.setHouseCode(houseCode);
- List<Integer> integers = iUserHouseLabelService.selectUserLabelList(userHouseLabelDTO);
Iterator<Menu> iterator = roleMenus.iterator();
while (iterator.hasNext()) {
Menu next = iterator.next();
- if (!next.getParentId().equals(0)) {
- if (StringUtils.isNotBlank(next.getLabelId())) {
- String[] split = next.getLabelId().split(",");
- List<Integer> integerList = Arrays.stream(split).map(Integer::valueOf).collect(Collectors.toList());
- Collection<? extends Serializable> union = CollectionUtils.intersection(integerList, integers);
- if (union.size() == 0) {
- iterator.remove();
-
- // 场所的时候,删除取保候审
- } else if (CommonConstant.NUMBER_TWO.equals(labelType)) {
- if (next.getName().trim().equals("取保监居")) {
- iterator.remove();
- }
- }
- } else {
- if (next.getName().trim().equals("取保监居")) {
- iterator.remove();
- }
- }
- }
}
}
diff --git a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
index 871e434..d36709e 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -46,17 +46,6 @@
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.*;
import org.springblade.modules.auth.enums.UserEnum;
-import org.springblade.modules.community.entity.CommunityEntity;
-import org.springblade.modules.community.service.ICommunityService;
-import org.springblade.modules.grid.service.IGridmanService;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
import org.springblade.modules.system.entity.*;
import org.springblade.modules.system.excel.PoliceUserExcel;
import org.springblade.modules.system.excel.UserExcel;
@@ -67,9 +56,7 @@
import org.springblade.modules.system.wrapper.UserWrapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-
import java.util.*;
-
import static org.springblade.common.constant.CommonConstant.DEFAULT_PARAM_PASSWORD;
/**
@@ -86,7 +73,6 @@
private final IUserOauthService userOauthService;
private final IRoleService roleService;
private final BladeTenantProperties tenantProperties;
- private final IPoliceAffairsGridService policeAffairsGridService;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -153,53 +139,6 @@
* @param user
*/
public void updateGridBind(User user) {
- // 先删除原有区域的绑定
- QueryWrapper<PoliceAffairsGridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).like("police_user_id", user.getId());
- // 删除掉之前已绑定的
- List<PoliceAffairsGridEntity> list = SpringUtil.getBean(IPoliceAffairsGridService.class).list(queryWrapper);
- // 遍历
- for (PoliceAffairsGridEntity policeAffairsGridEntity : list) {
- List<String> arrayList = new ArrayList<>(Arrays.asList(policeAffairsGridEntity.getPoliceUserId().split(",")));
- arrayList.remove(user.getId().toString());
- // 更新
- policeAffairsGridEntity.setPoliceUserId(String.join(",", arrayList));
- // 解决更新报错
- policeAffairsGridEntity.setGeom(null);
- SpringUtil.getBean(IPoliceAffairsGridService.class).updateById(policeAffairsGridEntity);
- }
- // 判断机构类型
- List<String> deptIds = new ArrayList<>(Arrays.asList(user.getDeptId().split(",")));
- for (String deptId : deptIds) {
- // 查询对应的机构
- Dept dept = SpringUtil.getBean(IDeptService.class).getById(deptId);
- if (null != dept.getDeptNature()
- && !Strings.isBlank(dept.getRegionCode())
- && dept.getDeptNature() == 1
- ) {
- QueryWrapper<PoliceAffairsGridEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("jw_grid_code", dept.getRegionCode());
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridService.getOne(wrapper);
- // 更新
- if (null != policeAffairsGridEntity) {
- if (!Strings.isBlank(policeAffairsGridEntity.getPoliceUserId())) {
- if (!policeAffairsGridEntity.getPoliceUserId().contains(user.getId().toString())) {
- policeAffairsGridEntity.setPoliceUserId(policeAffairsGridEntity.getPoliceUserId() + "," + user.getId());
- // 解决更新报错
- policeAffairsGridEntity.setGeom(null);
- // 更新
- SpringUtil.getBean(IPoliceAffairsGridService.class).updateById(policeAffairsGridEntity);
- }
- } else {
- policeAffairsGridEntity.setPoliceUserId(user.getId().toString());
- // 解决更新报错
- policeAffairsGridEntity.setGeom(null);
- // 更新
- SpringUtil.getBean(IPoliceAffairsGridService.class).updateById(policeAffairsGridEntity);
- }
- }
- }
- }
}
private boolean submitUserDept(User user) {
@@ -390,26 +329,6 @@
* @param userIds
*/
public void removePoliceGridBind(String userIds) {
- List<String> userIdList = new ArrayList<>(Arrays.asList(userIds.split(",")));
- for (String userId : userIdList) {
- // 先删除原有区域的绑定
- QueryWrapper<PoliceAffairsGridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).like("police_user_id", userId);
- // 删除掉之前已绑定的
- List<PoliceAffairsGridEntity> list = SpringUtil.getBean(IPoliceAffairsGridService.class).list(queryWrapper);
- if (list.size() > 0) {
- // 遍历
- for (PoliceAffairsGridEntity policeAffairsGridEntity : list) {
- List<String> arrayList = new ArrayList<>(Arrays.asList(policeAffairsGridEntity.getPoliceUserId().split(",")));
- arrayList.remove(userId);
- // 更新
- policeAffairsGridEntity.setPoliceUserId(String.join(",", arrayList));
- // 解决更新报错
- policeAffairsGridEntity.setGeom(null);
- SpringUtil.getBean(IPoliceAffairsGridService.class).updateById(policeAffairsGridEntity);
- }
- }
- }
}
@Override
@@ -605,17 +524,7 @@
@Override
public List<UserEntity> getUserInfoByCode(String houseCode, String type) {
- if (type.equals("0")) {
- IGridmanService bean = SpringUtil.getBean(IGridmanService.class);
- return bean.getGridManByCode(houseCode);
- } else {
- IPropertyCompanyDistrictService bean1 = SpringUtil.getBean(IPropertyCompanyDistrictService.class);
- return bean1.getDistictUserByCode(houseCode);
- // 通过huosecode 查询物业工作人员
-// String deptId = AuthUtil.getDeptId();
-// List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
-// return baseMapper.selectUserByDept(deptIdList);
- }
+ return null;
}
/**
@@ -652,32 +561,11 @@
@Override
public List<User> getUserInfoByPropertyId(String propertyCompanyId, String roleId) {
- // 查询物业公司,获取物业公司的机构
- if (StringUtils.isBlank(propertyCompanyId)) {
- return new ArrayList<>();
- }
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getId, propertyCompanyId));
- return baseMapper.getUserInfoByPropertyId(one.getDeptId().toString(), roleId);
+ return null;
}
@Override
public Object handleUser() {
- List<User> list = list(Wrappers.<User>lambdaQuery()
- .eq(User::getDeptId, "1727979636479037441")
- .eq(User::getRoleId, "1717429059648606209"));
- IHouseholdService bean = SpringUtil.getBean(IHouseholdService.class);
- int a = 0;
- for (User user : list) {
- System.out.println("查詢處理啊的人:" + user.getId());
- HouseholdEntity one = bean.getOne(Wrappers.<HouseholdEntity>lambdaQuery()
- .eq(HouseholdEntity::getAssociatedUserId, user.getId())
- .eq(HouseholdEntity::getIsDeleted, 0));
- if (one != null) {
- a++;
- }
- System.out.println("查詢處理啊的人:" + a);
- }
return null;
}
@@ -734,27 +622,6 @@
* 设置机构
*/
public void setDeptId(User user, PoliceUserExcel userExcel) {
- // 查询机构
- QueryWrapper<PoliceAffairsGridEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0)
- .eq("community_code", userExcel.getCommunityCode())
- .eq("pcs_name", userExcel.getPoliceStationName());
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridService.getOne(queryWrapper);
- if (null != policeAffairsGridEntity) {
- // 查询对应绑定的机构
- QueryWrapper<Dept> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0)
- .eq("dept_nature", 1)
- .eq("region_code", policeAffairsGridEntity.getJwGridCode());
- Dept dept = SpringUtil.getBean(IDeptService.class).getOne(wrapper);
- if (null != dept) {
- if (null != user.getId()) {
- DeptNotHandle(user, dept);
- } else {
- user.setDeptId(dept.getId().toString());
- }
- }
- }
}
/**
@@ -800,24 +667,7 @@
* @param user
*/
public void updateCommunityInfo(PoliceUserExcel userExcel, User user) {
- QueryWrapper<CommunityEntity> wrapper = new QueryWrapper<>();
- System.out.println("wrapper = " + userExcel.getCommunityCode());
- wrapper.eq("is_deleted", 0).eq("code", userExcel.getCommunityCode());
- CommunityEntity one = SpringUtil.getBean(ICommunityService.class).getOne(wrapper);
- if (null != one) {
- String userId = user.getId().toString();
- if (!Strings.isBlank(one.getResPoliceUserId())) {
- if (!one.getResPoliceUserId().contains(userId)) {
- one.setResPoliceUserId(one.getResPoliceUserId() + "," + userId);
- // 更新
- SpringUtil.getBean(ICommunityService.class).updateById(one);
- }
- } else {
- one.setResPoliceUserId(userId);
- // 更新
- SpringUtil.getBean(ICommunityService.class).updateById(one);
- }
- }
+
}
@Override
diff --git a/src/main/java/org/springblade/modules/task/controller/ECallEventController.java b/src/main/java/org/springblade/modules/task/controller/ECallEventController.java
deleted file mode 100644
index 93dec03..0000000
--- a/src/main/java/org/springblade/modules/task/controller/ECallEventController.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.ECallEventEntity;
-import org.springblade.modules.task.vo.ECallEventVO;
-import org.springblade.modules.task.wrapper.ECallEventWrapper;
-import org.springblade.modules.task.service.IECallEventService;
-
-/**
- * e呼即办表 控制器
- *
- * @author BladeX
- * @since 2023-12-07
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-eCallEvent/eCallEvent")
-@Api(value = "e呼即办表", tags = "e呼即办表接口")
-public class ECallEventController {
-
- private final IECallEventService eCallEventService;
- private final BladeLogger bladeLogger;
-
- /**
- * e呼即办表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入eCallEvent")
- @ApiLog("e呼即办表 详情")
- public R<ECallEventVO> detail(ECallEventEntity eCallEvent) {
- bladeLogger.info("e呼即办表 详情", JsonUtil.toJson(eCallEvent));
- ECallEventEntity detail = eCallEventService.getOne(Condition.getQueryWrapper(eCallEvent));
- return R.data(ECallEventWrapper.build().entityVO(detail));
- }
- /**
- * e呼即办表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入eCallEvent")
- public R<IPage<ECallEventVO>> list(ECallEventEntity eCallEvent, Query query) {
- IPage<ECallEventEntity> pages = eCallEventService.page(Condition.getPage(query), Condition.getQueryWrapper(eCallEvent));
- return R.data(ECallEventWrapper.build().pageVO(pages));
- }
-
- /**
- * e呼即办表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("e呼即办表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入eCallEvent")
- public R<IPage<ECallEventVO>> page(ECallEventVO eCallEvent, Query query) {
- bladeLogger.info("e呼即办表 自定义分页", JsonUtil.toJson(eCallEvent));
- IPage<ECallEventVO> pages = eCallEventService.selectECallEventPage(Condition.getPage(query), eCallEvent);
- return R.data(pages);
- }
-
- /**
- * e呼即办表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("e呼即办表 新增")
- @ApiOperation(value = "新增", notes = "传入eCallEvent")
- public R save(@Valid @RequestBody ECallEventEntity eCallEvent) {
- bladeLogger.info("e呼即办表 新增", JsonUtil.toJson(eCallEvent));
- return R.status(eCallEventService.save(eCallEvent));
- }
-
- /**
- * e呼即办表 修改
- */
- @PostMapping("/update")
- @ApiLog("e呼即办表 修改")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入eCallEvent")
- public R update(@Valid @RequestBody ECallEventEntity eCallEvent) {
- bladeLogger.info("e呼即办表 修改", JsonUtil.toJson(eCallEvent));
- return R.status(eCallEventService.updateById(eCallEvent));
- }
-
- /**
- * e呼即办表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入eCallEvent")
- public R submit(@Valid @RequestBody ECallEventEntity eCallEvent) {
- return R.status(eCallEventService.saveOrUpdate(eCallEvent));
- }
-
- /**
- * e呼即办表 删除
- */
- @PostMapping("/remove")
- @ApiLog("e呼即办表 删除")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("e呼即办表 删除", JsonUtil.toJson(ids));
- return R.status(eCallEventService.removeByIds(Func.toLongList(ids)));
- }
-
-
- /**
- * e呼即办数据处理
- */
- @GetMapping("/dataHandle")
- public R dataHandle() {
- return R.data(eCallEventService.dataHandle());
- }
-
- /**
- * e呼即办数据批量分享到圈子
- * @param type
- * @return
- */
- @GetMapping("/batchShareCircle")
- public R batchShareCircle(Integer type) {
- return R.status(eCallEventService.batchShareCircle(type));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java b/src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java
deleted file mode 100644
index 62df29c..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.apache.commons.beanutils.BeanUtils;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.dto.TaskBailReportingEventDTO;
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import org.springblade.modules.task.service.ITaskBailReportingEventService;
-import org.springblade.modules.task.vo.TaskBailReportingEventVO;
-import org.springblade.modules.task.wrapper.TaskBailReportingEventWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 取保候审任务 控制器
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskBailReportingEvent/taskBailReportingEvent")
-@Api(value = "取保候审任务", tags = "取保候审任务接口")
-public class TaskBailReportingEventController extends BladeController {
-
- private final ITaskBailReportingEventService taskBailReportingEventService;
- private final BladeLogger bladeLogger;
-
- /**
- * 取保候审任务 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("取保候审任务 详情")
- @ApiOperation(value = "详情", notes = "传入taskBailReportingEvent")
- public R<TaskBailReportingEventVO> detail(TaskBailReportingEventEntity taskBailReportingEvent) {
- bladeLogger.info("取保候审任务 详情", JsonUtil.toJson(taskBailReportingEvent));
- TaskBailReportingEventEntity detail = taskBailReportingEventService.getOne(Condition.getQueryWrapper(taskBailReportingEvent));
- TaskBailReportingEventVO copy = BeanUtil.copy(detail, TaskBailReportingEventVO.class);
- return R.data(copy);
- }
- /**
- * 取保候审任务 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskBailReportingEvent")
- public R<IPage<TaskBailReportingEventVO>> list(TaskBailReportingEventEntity taskBailReportingEvent, Query query) {
- IPage<TaskBailReportingEventEntity> pages = taskBailReportingEventService.page(Condition.getPage(query), Condition.getQueryWrapper(taskBailReportingEvent));
- return R.data(TaskBailReportingEventWrapper.build().pageVO(pages));
- }
-
- /**
- * 取保候审任务 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("取保候审任务 自定义分页")
- @ApiOperation(value = "分页", notes = "传入taskBailReportingEvent")
- public R<IPage<TaskBailReportingEventVO>> page(TaskBailReportingEventVO taskBailReportingEvent, Query query) {
- bladeLogger.info("取保候审任务 自定义分页", JsonUtil.toJson(taskBailReportingEvent));
- IPage<TaskBailReportingEventVO> pages = taskBailReportingEventService.selectTaskBailReportingEventPage(Condition.getPage(query), taskBailReportingEvent);
- return R.data(pages);
- }
-
- /**
- * 取保候审任务 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("取保候审任务 新增")
- @ApiOperation(value = "新增", notes = "传入taskBailReportingEvent")
- public R save(@Valid @RequestBody TaskBailReportingEventDTO taskBailReportingEvent) {
- bladeLogger.info("取保候审任务 新增", JsonUtil.toJson(taskBailReportingEvent));
- return R.status(taskBailReportingEventService.saveBailReporting(taskBailReportingEvent));
- }
-
- /**
- * 取保候审任务 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiLog("取保候审任务 修改")
- @ApiOperation(value = "修改", notes = "传入taskBailReportingEvent")
- public R update(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) throws Exception {
- bladeLogger.info("取保候审任务 修改", JsonUtil.toJson(taskBailReportingEvent));
- return R.status(taskBailReportingEventService.updateBailReporting(taskBailReportingEvent));
- }
-
- /**
- * 取保候审任务 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiLog("取保候审任务 新增或修改")
- @ApiOperation(value = "新增或修改", notes = "传入taskBailReportingEvent")
- public R submit(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) {
- bladeLogger.info("取保候审任务 新增或修改", JsonUtil.toJson(taskBailReportingEvent));
- return R.status(taskBailReportingEventService.saveOrUpdate(taskBailReportingEvent));
- }
-
- /**
- * 取保候审任务 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("取保候审任务 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("取保候审任务 删除", JsonUtil.toJson(ids));
- return R.status(taskBailReportingEventService.deleteLogic(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java b/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java
deleted file mode 100644
index ff06ea4..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.dto.TaskCampusReportingEventDTO;
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-import org.springblade.modules.task.service.ITaskCampusReportingEventService;
-import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
-import org.springblade.modules.task.wrapper.TaskCampusReportingEventWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 校园安全检查任务表 控制器
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskCampusReportingEvent/taskCampusReportingEvent")
-@Api(value = "校园安全检查任务表", tags = "校园安全检查任务表接口")
-public class TaskCampusReportingEventController{
-
- private final ITaskCampusReportingEventService taskCampusReportingEventService;
-
- /**
- * 校园安全检查任务表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入taskCampusReportingEvent")
- public R<TaskCampusReportingEventEntity> detail(TaskCampusReportingEventEntity taskCampusReportingEvent) {
- TaskCampusReportingEventEntity detail = taskCampusReportingEventService.getOne(Condition.getQueryWrapper(taskCampusReportingEvent));
- return R.data(detail);
- }
- /**
- * 校园安全检查任务表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskCampusReportingEvent")
- public R<IPage<TaskCampusReportingEventVO>> list(TaskCampusReportingEventEntity taskCampusReportingEvent, Query query) {
- IPage<TaskCampusReportingEventEntity> pages = taskCampusReportingEventService.page(Condition.getPage(query), Condition.getQueryWrapper(taskCampusReportingEvent));
- return R.data(TaskCampusReportingEventWrapper.build().pageVO(pages));
- }
-
- /**
- * 校园安全检查任务表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskCampusReportingEvent")
- public R<IPage<TaskCampusReportingEventVO>> page(TaskCampusReportingEventVO taskCampusReportingEvent, Query query) {
- IPage<TaskCampusReportingEventVO> pages = taskCampusReportingEventService.selectTaskCampusReportingEventPage(Condition.getPage(query), taskCampusReportingEvent);
- return R.data(pages);
- }
-
- /**
- * 校园安全检查任务表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskCampusReportingEvent")
- public R save(@Valid @RequestBody TaskCampusReportingEventDTO taskCampusReportingEvent) {
- return R.status(taskCampusReportingEventService.saveCampusReporting(taskCampusReportingEvent));
- }
-
- /**
- * 校园安全检查任务表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskCampusReportingEvent")
- public R update(@Valid @RequestBody TaskCampusReportingEventDTO taskCampusReportingEvent) throws Exception {
- return R.status(taskCampusReportingEventService.updateCampusReporting(taskCampusReportingEvent));
- }
-
- /**
- * 校园安全检查任务表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入taskCampusReportingEvent")
- public R submit(@Valid @RequestBody TaskCampusReportingEventEntity taskCampusReportingEvent) {
- return R.status(taskCampusReportingEventService.saveOrUpdate(taskCampusReportingEvent));
- }
-
- /**
- * 校园安全检查任务表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskCampusReportingEventService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskController.java b/src/main/java/org/springblade/modules/task/controller/TaskController.java
deleted file mode 100644
index b6c8f98..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskController.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package org.springblade.modules.task.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskVO;
-import org.springblade.modules.task.wrapper.TaskWrapper;
-import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
-
-/**
- * 任务表 控制器
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-task/task")
-@Api(value = "任务表", tags = "任务表接口")
-public class TaskController{
-
- private final ITaskService taskService;
-
- /**
- * 任务表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入task")
- public R<TaskVO> detail(TaskEntity task) {
- TaskEntity detail = taskService.getOne(Condition.getQueryWrapper(task));
- return R.data(TaskWrapper.build().entityVO(detail));
- }
- /**
- * 任务表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskVO>> list(TaskEntity task, Query query) {
- IPage<TaskEntity> pages = taskService.page(Condition.getPage(query), Condition.getQueryWrapper(task));
- return R.data(TaskWrapper.build().pageVO(pages));
- }
-
- /**
- * 任务表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskVO>> page(TaskVO task, Query query) {
- IPage<TaskVO> pages = taskService.selectTaskPage(Condition.getPage(query), task);
- return R.data(pages);
- }
-
- /**
- * 任务表 自定义分页
- */
- @GetMapping("/getBailReportingPage")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskVO>> getBailReportingPage(TaskVO task, Query query) {
- IPage<TaskVO> pages = taskService.getBailReportingPage(Condition.getPage(query), task);
- return R.data(pages);
- }
-
- /**
- * 任务表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入task")
- public R save(@Valid @RequestBody TaskEntity task) {
- return R.status(taskService.save(task));
- }
-
- /**
- * 任务表 修改
- */
- @PostMapping("/removeTask")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入task")
- public R update(@Valid @RequestBody TaskEntity task) {
- return R.status(taskService.removeTask(task));
- }
-
- /**
- * 任务表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入task")
- public R submit(@Valid @RequestBody TaskEntity task) {
- return R.status(taskService.saveOrUpdate(task));
- }
-
- /**
- * 任务表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskService.removeByIds(Func.toLongList(ids)));
- }
-
- @GetMapping("/countNumber")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "统计用户标签报事数量")
- public R countNumber(@RequestParam(value = "houseCode", required = false) String houseCode, @RequestParam(value = "status", required = false) Integer status) {
- return R.data(taskService.countNumber(houseCode, status));
- }
-
-
- @GetMapping("/countTypeNumber")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "统计类型数量")
- public R countTypeNumber(@RequestParam(value = "neiCode", required = false) String neiCode, @RequestParam(value = "roleType", defaultValue = "0") Integer roleType) {
- return R.data(taskService.countTypeNumber(roleType, neiCode));
- }
-
- /**
- * 任务表 新增或修改
- */
- @PostMapping("/examine")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "任务审核", notes = "传入task")
- public R examine(@Valid @RequestBody TaskEntity task) {
- return R.status(taskService.examine(task));
- }
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java b/src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java
deleted file mode 100644
index 8b107ed..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.dto.TaskHotelReportingDTO;
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import org.springblade.modules.task.service.ITaskHotelReportingService;
-import org.springblade.modules.task.vo.TaskHotelReportingVO;
-import org.springblade.modules.task.wrapper.TaskHotelReportingWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 旅馆安全自查任务 控制器
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskHotelReporting/taskHotelReporting")
-@Api(value = "旅馆安全自查任务", tags = "旅馆安全自查任务接口")
-public class TaskHotelReportingController{
-
- private final ITaskHotelReportingService taskHotelReportingService;
-
- /**
- * 旅馆安全自查任务 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入taskHotelReporting")
- public R<TaskHotelReportingEntity> detail(TaskHotelReportingEntity taskHotelReporting) {
- TaskHotelReportingEntity detail = taskHotelReportingService.getOne(Condition.getQueryWrapper(taskHotelReporting));
- return R.data(detail);
- }
- /**
- * 旅馆安全自查任务 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskHotelReporting")
- public R<IPage<TaskHotelReportingVO>> list(TaskHotelReportingEntity taskHotelReporting, Query query) {
- IPage<TaskHotelReportingEntity> pages = taskHotelReportingService.page(Condition.getPage(query), Condition.getQueryWrapper(taskHotelReporting));
- return R.data(TaskHotelReportingWrapper.build().pageVO(pages));
- }
-
- /**
- * 旅馆安全自查任务 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskHotelReporting")
- public R<IPage<TaskHotelReportingVO>> page(TaskHotelReportingVO taskHotelReporting, Query query) {
- IPage<TaskHotelReportingVO> pages = taskHotelReportingService.selectTaskHotelReportingPage(Condition.getPage(query), taskHotelReporting);
- return R.data(pages);
- }
-
- /**
- * 旅馆安全自查任务 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskHotelReporting")
- public R save(@Valid @RequestBody TaskHotelReportingDTO taskHotelReporting) {
- return R.status(taskHotelReportingService.saveHotelReporting(taskHotelReporting));
- }
-
- /**
- * 旅馆安全自查任务 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskHotelReporting")
- public R update(@Valid @RequestBody TaskHotelReportingVO taskHotelReporting) throws Exception {
- return R.status(taskHotelReportingService.updateHotelReporting(taskHotelReporting));
- }
-
- /**
- * 旅馆安全自查任务 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入taskHotelReporting")
- public R submit(@Valid @RequestBody TaskHotelReportingEntity taskHotelReporting) {
- return R.status(taskHotelReportingService.saveOrUpdate(taskHotelReporting));
- }
-
- /**
- * 旅馆安全自查任务 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskHotelReportingService.removeByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java b/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
deleted file mode 100644
index 7302bcc..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.place.excel.PlaceCheckExcel;
-import org.springblade.modules.place.vo.PlaceCheckVO;
-import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import org.springblade.modules.task.excel.TaskLabelReportingEventExcel;
-import org.springblade.modules.task.service.ITaskLabelReportingEventService;
-import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
-import org.springblade.modules.task.wrapper.TaskLabelReportingEventWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 打金店报事 控制器
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskLabelReportingEvent/taskLabelReportingEvent")
-@Api(value = "打金店报事", tags = "打金店报事接口")
-public class TaskLabelReportingEventController extends BladeController {
-
- private final ITaskLabelReportingEventService taskLabelReportingEventService;
- private final BladeLogger bladeLogger;
-
- /**
- * 二手交易报事 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("二手交易报事 详情")
- @ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent")
- public R detail(TaskLabelReportingEventEntity taskLabelReportingEvent) {
- bladeLogger.info("二手交易报事 详情", JsonUtil.toJson(taskLabelReportingEvent));
- TaskLabelReportingEventEntity detail = taskLabelReportingEventService.getOne(Condition.getQueryWrapper(taskLabelReportingEvent));
- return R.data(detail);
- }
- /**
- * 打金店报事 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskLabelReportingEvent")
- public R<IPage<TaskLabelReportingEventVO>> list(TaskLabelReportingEventEntity taskLabelReportingEvent, Query query) {
- IPage<TaskLabelReportingEventEntity> pages = taskLabelReportingEventService.page(Condition.getPage(query), Condition.getQueryWrapper(taskLabelReportingEvent));
- return R.data(TaskLabelReportingEventWrapper.build().pageVO(pages));
- }
-
- /**
- * 打金店报事 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("二手交易报事 自定义分页")
- @ApiOperation(value = "分页", notes = "传入taskLabelReportingEvent")
- public R<IPage<TaskLabelReportingEventVO>> page(TaskLabelReportingEventVO taskLabelReportingEvent, Query query) {
- bladeLogger.info("二手交易报事 自定义分页", JsonUtil.toJson(taskLabelReportingEvent));
- IPage<TaskLabelReportingEventVO> pages = taskLabelReportingEventService.selectTaskLabelReportingEventPage(Condition.getPage(query), taskLabelReportingEvent);
- return R.data(pages);
- }
-
- /**
- * 打金店报事 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("二手交易报事 新增")
- @ApiOperation(value = "新增", notes = "传入taskLabelReportingEvent")
- public R save(@Valid @RequestBody TaskLabelReportingEventDTO taskLabelReportingEvent) {
- bladeLogger.info("二手交易报事 新增", JsonUtil.toJson(taskLabelReportingEvent));
- return R.status(taskLabelReportingEventService.saveReportingEven(taskLabelReportingEvent));
- }
-
- /**
- * 打金店报事 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiLog("二手交易报事 修改")
- @ApiOperation(value = "修改", notes = "传入taskLabelReportingEvent")
- public R update(@Valid @RequestBody TaskLabelReportingEventVO taskLabelReportingEvent) throws Exception {
- bladeLogger.info("二手交易报事 修改", JsonUtil.toJson(taskLabelReportingEvent));
- return R.status(taskLabelReportingEventService.updateLabelReporting(taskLabelReportingEvent));
- }
-
- /**
- * 打金店报事 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiLog("二手交易报事 新增或修改")
- @ApiOperation(value = "新增或修改", notes = "传入taskLabelReportingEvent")
- public R submit(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) {
- bladeLogger.info("二手交易报事 新增或修改", JsonUtil.toJson(taskLabelReportingEvent));
- return R.status(taskLabelReportingEventService.saveOrUpdate(taskLabelReportingEvent));
- }
-
- /**
- * 打金店报事 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("二手交易报事 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("二手交易报事 删除", JsonUtil.toJson(ids));
- return R.status(taskLabelReportingEventService.removeTaskByIds(Func.toLongList(ids)));
- }
-
- /**
- * 导出二手交易信息
- * @param taskLabelReportingEvent
- */
- @GetMapping("export-taskLabelReportingEvent")
- @ApiLog("导出二手交易信息")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "导出交易登记信息", notes = "传入taskLabelReportingEvent")
- public void exportTaskLabelReportingEvent(TaskLabelReportingEventVO taskLabelReportingEvent, HttpServletResponse response) {
- bladeLogger.info("导出二手交易信息", JsonUtil.toJson(taskLabelReportingEvent));
- List<TaskLabelReportingEventExcel> list = taskLabelReportingEventService.exportTaskLabelReportingEvent(taskLabelReportingEvent);
- ExcelUtil.export(response, "交易登记" + DateUtil.time(), "交易登记表", list, TaskLabelReportingEventExcel.class);
- }
-
-
- /**
- * 二手交易报事 详情
- */
- @GetMapping("/getDetail")
- @ApiLog("二手交易报事 详情")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent")
- public R getDetail(TaskLabelReportingEventVO taskLabelReportingEvent) {
- bladeLogger.info("二手交易报事 详情", JsonUtil.toJson(taskLabelReportingEvent));
- TaskLabelReportingEventVO detail = taskLabelReportingEventService.getDetail(taskLabelReportingEvent);
- return R.data(detail);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskNoFraudReportingController.java b/src/main/java/org/springblade/modules/task/controller/TaskNoFraudReportingController.java
deleted file mode 100644
index d165122..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskNoFraudReportingController.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.dto.TaskNoFraudReportingDTO;
-import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.excel.TaskNoExplosionExcel;
-import org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel;
-import org.springblade.modules.task.service.ITaskNoFraudReportingService;
-import org.springblade.modules.task.vo.TaskPlaceSelfCheckVO;
-import org.springblade.modules.task.wrapper.TaskNoFraudReportingWrapper;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.List;
-
-/**
- * 无炸上报任务表 控制器
- *
- * @author BladeX
- * @since 2024-04-10
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskNoFraudReporting/taskNoFraudReporting")
-@Api(value = "无炸上报任务表", tags = "无炸上报任务表接口")
-public class TaskNoFraudReportingController extends BladeController {
-
- private final ITaskNoFraudReportingService taskNoFraudReportingService;
-
- private final BladeLogger bladeLogger;
-
-
- /**
- * 无炸上报任务表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入taskNoFraudReporting")
- public R<TaskNoFraudReportingVO> detail(TaskNoFraudReportingEntity taskNoFraudReporting) {
- TaskNoFraudReportingEntity detail = taskNoFraudReportingService.getOne(Condition.getQueryWrapper(taskNoFraudReporting));
- return R.data(TaskNoFraudReportingWrapper.build().entityVO(detail));
- }
-
- @ApiOperation("无诈详细信息")
- @ApiLog("无诈详细信息")
- @GetMapping(value = "/getInfo")
- public R<TaskNoFraudReportingVO> getInfo(TaskNoFraudReportingEntity taskNoFraudReporting){
- bladeLogger.info("无诈表详细信息", JsonUtil.toJson(taskNoFraudReporting));
- TaskNoFraudReportingVO taskNoFraudReportingVo = taskNoFraudReportingService.selectTaskNoFraudReportingById(taskNoFraudReporting);
- return R.data(taskNoFraudReportingVo);
- }
- /**
- * 无炸上报任务表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskNoFraudReporting")
- public R<IPage<TaskNoFraudReportingVO>> list(TaskNoFraudReportingEntity taskNoFraudReporting, Query query) {
- IPage<TaskNoFraudReportingEntity> pages = taskNoFraudReportingService.page(Condition.getPage(query), Condition.getQueryWrapper(taskNoFraudReporting));
- return R.data(TaskNoFraudReportingWrapper.build().pageVO(pages));
- }
-
- /**
- * 无炸上报任务表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskNoFraudReporting")
- public R<IPage<TaskNoFraudReportingVO>> page(TaskNoFraudReportingVO taskNoFraudReporting, Query query) {
- IPage<TaskNoFraudReportingVO> pages = taskNoFraudReportingService.selectTaskNoFraudReportingPage(Condition.getPage(query), taskNoFraudReporting);
- return R.data(pages);
- }
-
- /**
- * 无炸上报任务表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskNoFraudReporting")
- public R save(@Valid @RequestBody TaskNoFraudReportingEntity taskNoFraudReporting) {
- return R.status(taskNoFraudReportingService.save(taskNoFraudReporting));
- }
-
- /**
- * 新增
- */
- @PostMapping("/saveTwo")
- @ApiLog(" 新增")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "无诈自定义新增", notes = "传入taskPlaceSelfCheck")
- public R saveTwo(@Valid @RequestBody TaskNoFraudReportingVO taskNoFraudReporting) throws Exception {
- bladeLogger.info("无诈 新增", JsonUtil.toJson(taskNoFraudReporting));
- return R.status(taskNoFraudReportingService.saveNoFraudReporting(taskNoFraudReporting));
- }
-
- /**
- * 无炸上报任务表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskNoFraudReporting")
- public R update(@Valid @RequestBody TaskNoFraudReportingEntity taskNoFraudReporting) {
- return R.status(taskNoFraudReportingService.updateById(taskNoFraudReporting));
- }
-
- /**
- * 无炸上报任务表 修改
- */
- @PostMapping("/updateTwo")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskNoFraudReporting")
- public R updateTwo(@Valid @RequestBody TaskNoFraudReportingVO taskNoFraudReporting) {
- return R.status(taskNoFraudReportingService.updateTaskNoFraudReporting(taskNoFraudReporting));
- }
-
- /**
- * 无炸上报任务表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入taskNoFraudReporting")
- public R submit(@Valid @RequestBody TaskNoFraudReportingEntity taskNoFraudReporting) {
- return R.status(taskNoFraudReportingService.saveOrUpdate(taskNoFraudReporting));
- }
-
- /**
- * 无炸上报任务表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskNoFraudReportingService.removeBatchByIds(Func.toLongList(ids)));
- }
-
- /**
- * 无诈导出
- * @param taskNoFraudReportingVO
- */
- @GetMapping("export-taskNoFraudReporting")
- @ApiLog("无诈导出")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "无诈导出", notes = "")
- public void exportTaskPlaceSelfCheck(TaskNoFraudReportingVO taskNoFraudReportingVO, HttpServletResponse response) {
- bladeLogger.info("无诈导出", JsonUtil.toJson(taskNoFraudReportingVO));
- List<TaskNoExplosionExcel> list = taskNoFraudReportingService.exportTaskNoFraudReporting(taskNoFraudReportingVO);
- ExcelUtil.export(response, "无诈导出" + DateUtil.time(), "记录表", list, TaskNoExplosionExcel.class);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskPlaceRecordController.java b/src/main/java/org/springblade/modules/task/controller/TaskPlaceRecordController.java
deleted file mode 100644
index 8efd164..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskPlaceRecordController.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springblade.modules.task.wrapper.TaskPlaceRecordWrapper;
-import org.springblade.modules.task.service.ITaskPlaceRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 消防自查详情记录表 控制器
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskPlaceRecord/taskPlaceRecord")
-@Api(value = "消防自查详情记录表", tags = "消防自查详情记录表接口")
-public class TaskPlaceRecordController extends BladeController {
-
- private final ITaskPlaceRecordService taskPlaceRecordService;
- private final BladeLogger bladeLogger;
-
- /**
- * 消防自查详情记录表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("消防自查详情记录表 详情")
- @ApiOperation(value = "详情", notes = "传入taskPlaceRecord")
- public R<TaskPlaceRecordVO> detail(TaskPlaceRecordEntity taskPlaceRecord) {
- bladeLogger.info("消防自查详情记录表 详情", JsonUtil.toJson(taskPlaceRecord));
- TaskPlaceRecordEntity detail = taskPlaceRecordService.getOne(Condition.getQueryWrapper(taskPlaceRecord));
- return R.data(TaskPlaceRecordWrapper.build().entityVO(detail));
- }
- /**
- * 消防自查详情记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskPlaceRecord")
- public R<IPage<TaskPlaceRecordVO>> list(TaskPlaceRecordEntity taskPlaceRecord, Query query) {
- IPage<TaskPlaceRecordEntity> pages = taskPlaceRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(taskPlaceRecord));
- return R.data(TaskPlaceRecordWrapper.build().pageVO(pages));
- }
-
- /**
- * 消防自查详情记录表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("消防自查详情记录表 自定义分页")
- @ApiOperation(value = "分页", notes = "传入taskPlaceRecord")
- public R<IPage<TaskPlaceRecordVO>> page(TaskPlaceRecordVO taskPlaceRecord, Query query) {
- bladeLogger.info("消防自查详情记录表 自定义分页", JsonUtil.toJson(taskPlaceRecord));
- IPage<TaskPlaceRecordVO> pages = taskPlaceRecordService.selectTaskPlaceRecordPage(Condition.getPage(query), taskPlaceRecord);
- return R.data(pages);
- }
-
- /**
- * 消防自查详情记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("消防自查详情记录表 新增")
- @ApiOperation(value = "新增", notes = "传入taskPlaceRecord")
- public R save(@Valid @RequestBody TaskPlaceRecordEntity taskPlaceRecord) {
- bladeLogger.info("消防自查详情记录表 新增", JsonUtil.toJson(taskPlaceRecord));
- return R.status(taskPlaceRecordService.save(taskPlaceRecord));
- }
-
- /**
- * 消防自查详情记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiLog("消防自查详情记录表 修改")
- @ApiOperation(value = "修改", notes = "传入taskPlaceRecord")
- public R update(@Valid @RequestBody TaskPlaceRecordEntity taskPlaceRecord) {
- bladeLogger.info("消防自查详情记录表 修改", JsonUtil.toJson(taskPlaceRecord));
- return R.status(taskPlaceRecordService.updateById(taskPlaceRecord));
- }
-
- /**
- * 消防自查详情记录表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiLog("消防自查详情记录表 新增或修改")
- @ApiOperation(value = "新增或修改", notes = "传入taskPlaceRecord")
- public R submit(@Valid @RequestBody TaskPlaceRecordEntity taskPlaceRecord) {
- bladeLogger.info("消防自查详情记录表 新增或修改", JsonUtil.toJson(taskPlaceRecord));
- return R.status(taskPlaceRecordService.saveOrUpdate(taskPlaceRecord));
- }
-
- /**
- * 消防自查详情记录表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("消防自查详情记录表 删除")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("消防自查详情记录表 删除", JsonUtil.toJson(ids));
- return R.status(taskPlaceRecordService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskPlaceRectificationController.java b/src/main/java/org/springblade/modules/task/controller/TaskPlaceRectificationController.java
deleted file mode 100644
index 930d8de..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskPlaceRectificationController.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.dto.TaskPlaceRectificationDTO;
-import org.springblade.modules.task.excel.PlaceRectificationsExcel;
-import org.springblade.modules.task.excel.PlaceRectificationsImporter;
-import org.springblade.modules.task.excel.TaskPlaceRectificationExcel;
-import org.springblade.modules.task.vo.TaskPlaceRectificationsVO;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import org.springblade.modules.task.vo.TaskPlaceRectificationVO;
-import org.springblade.modules.task.wrapper.TaskPlaceRectificationWrapper;
-import org.springblade.modules.task.service.ITaskPlaceRectificationService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-/**
- * 场所整改任务表 控制器
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskPlaceRectification/taskPlaceRectification")
-@Api(value = "场所整改任务表", tags = "场所整改任务表接口")
-public class TaskPlaceRectificationController extends BladeController {
-
- private final ITaskPlaceRectificationService taskPlaceRectificationService;
- private final BladeLogger bladeLogger;
-
- /**
- * 场所整改任务表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("场所整改任务表 详情")
- @ApiOperation(value = "详情", notes = "传入taskPlaceRectification")
- public R<TaskPlaceRectificationVO> detail(TaskPlaceRectificationEntity taskPlaceRectification) {
- bladeLogger.info("场所整改任务表 详情", JsonUtil.toJson(taskPlaceRectification));
- TaskPlaceRectificationEntity detail = taskPlaceRectificationService.getOne(Condition.getQueryWrapper(taskPlaceRectification));
- return R.data(TaskPlaceRectificationWrapper.build().entityVO(detail));
- }
-
- /**
- * 场所整改任务表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskPlaceRectification")
- public R<IPage<TaskPlaceRectificationVO>> list(TaskPlaceRectificationEntity taskPlaceRectification, Query query) {
- IPage<TaskPlaceRectificationEntity> pages = taskPlaceRectificationService.page(Condition.getPage(query), Condition.getQueryWrapper(taskPlaceRectification));
- return R.data(TaskPlaceRectificationWrapper.build().pageVO(pages));
- }
-
- /**
- * 场所整改任务表 自定义分页
- */
- @GetMapping("/page")
- @ApiLog("场所整改任务表 自定义分页")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskPlaceRectification")
- public R<IPage<TaskPlaceRectificationVO>> page(TaskPlaceRectificationVO taskPlaceRectification, Query query) {
- bladeLogger.info("场所整改任务表 自定义分页", JsonUtil.toJson(taskPlaceRectification));
- IPage<TaskPlaceRectificationVO> pages = taskPlaceRectificationService.selectTaskPlaceRectificationPage(Condition.getPage(query), taskPlaceRectification);
- return R.data(pages);
- }
-
- /**
- * 场所整改任务表 新增
- */
- @PostMapping("/save")
- @ApiLog("场所整改任务表 新增")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskPlaceRectification")
- public R save(@Valid @RequestBody TaskPlaceRectificationEntity taskPlaceRectification) {
- bladeLogger.info("场所整改任务表 新增", JsonUtil.toJson(taskPlaceRectification));
- return R.status(taskPlaceRectificationService.save(taskPlaceRectification));
- }
-
- /**
- * 场所整改任务表 修改
- */
- @PostMapping("/update")
- @ApiLog("场所整改任务表 修改")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskPlaceRectification")
- public R update(@Valid @RequestBody TaskPlaceRectificationEntity taskPlaceRectification) {
- bladeLogger.info("场所整改任务表 修改", JsonUtil.toJson(taskPlaceRectification));
- return R.status(taskPlaceRectificationService.updateById(taskPlaceRectification));
- }
-
- /**
- * 场所整改任务表 新增或修改
- */
- @PostMapping("/submit")
- @ApiLog("场所整改任务表 新增或修改")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入taskPlaceRectification")
- public R submit(@Valid @RequestBody TaskPlaceRectificationEntity taskPlaceRectification) {
- bladeLogger.info("场所整改任务表 新增或修改", JsonUtil.toJson(taskPlaceRectification));
- return R.status(taskPlaceRectificationService.saveOrUpdate(taskPlaceRectification));
- }
-
- /**
- * 场所整改任务表 删除
- */
- @PostMapping("/remove")
- @ApiLog("场所整改任务表 详情")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("场所整改任务表 删除", JsonUtil.toJson(ids));
- return R.status(taskPlaceRectificationService.removeBatchByIds(Func.toLongList(ids)));
- }
-
- /**
- * 场所整改任务表 详情
- */
- @GetMapping("/detailByTaskId")
- @ApiLog("场所整改任务表 详情")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入taskPlaceRectification")
- public R<TaskPlaceRectificationVO> detailById(TaskPlaceRectificationEntity taskPlaceRectification) {
- bladeLogger.info("场所整改任务表 详情", JsonUtil.toJson(taskPlaceRectification));
- TaskPlaceRectificationEntity detail = taskPlaceRectificationService.selectTaskPlaceRectificationById(taskPlaceRectification.getTaskId());
- return R.data(TaskPlaceRectificationWrapper.build().entityVO(detail));
- }
-
-
- /**
- * 场所整改任务表 详情
- */
- @GetMapping("/getTaskPlaceRectificationList")
- @ApiLog("场所整改任务表 详情")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "场所整改任务表 详情", notes = "传入taskPlaceRectification")
- public R<IPage<TaskPlaceRectificationVO>> getTaskPlaceRectificationList(TaskPlaceRectificationDTO taskPlaceRectification, Query query) {
- bladeLogger.info("场所整改任务表 详情", JsonUtil.toJson(taskPlaceRectification));
- IPage<TaskPlaceRectificationVO> taskPlaceRectificationDTOS = taskPlaceRectificationService.selectTaskPlaceRectificationList(Condition.getPage(query), taskPlaceRectification);
- return R.data(taskPlaceRectificationDTOS);
- }
-
-
- /**
- * 场所整改任务表 修改
- */
- @PostMapping("/updateRectification")
- @ApiLog("场所整改任务表 修改")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "场所负责人整改", notes = "传入taskPlaceRectification")
- public R updateRectification(@Valid @RequestBody TaskPlaceRectificationVO taskPlaceRectification) {
- bladeLogger.info("场所整改任务表 修改", JsonUtil.toJson(taskPlaceRectification));
- return R.status(taskPlaceRectificationService.updateRectification(taskPlaceRectification));
- }
-
- /**
- * 民警审核
- */
- @PostMapping("/applyRectification")
- @ApiLog("民警审核")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "民警审核", notes = "传入taskPlaceRectification")
- public R applyRectification(@Valid @RequestBody TaskPlaceRectificationVO taskPlaceRectification) {
- bladeLogger.info("民警审核", JsonUtil.toJson(taskPlaceRectification));
- return R.status(taskPlaceRectificationService.applyRectification(taskPlaceRectification));
- }
-
-
- /**
- * 民警审核
- */
- @PostMapping("/rectificationStatistics")
- @ApiLog("民警审核")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "九小场所类型隐患数量统计", notes = "传入taskPlaceRectification")
- public R rectificationStatistics(@Valid @RequestBody TaskPlaceRectificationVO taskPlaceRectification) {
- bladeLogger.info("民警审核", JsonUtil.toJson(taskPlaceRectification));
- return R.data(taskPlaceRectificationService.rectificationStatistics(taskPlaceRectification));
- }
-
- /**
- * 导出场所整改任务
- */
- @GetMapping("exportRectificationStatistics")
- @ApiLog("导出场所整改任务")
- @ApiOperationSupport(order = 13)
- @ApiOperation(value = "导出整改统计", notes = "传入user")
- public void exportHouse(TaskPlaceRectificationsVO taskPlaceRectificationVO, HttpServletResponse response) {
- bladeLogger.info("导出场所整改任务", JsonUtil.toJson(taskPlaceRectificationVO));
- List<TaskPlaceRectificationExcel> list = taskPlaceRectificationService.export(taskPlaceRectificationVO);
- ExcelUtil.export(response, "整改数据" + DateUtil.time(), "场所数据表", list, TaskPlaceRectificationExcel.class);
- }
-
- /**
- * 导入房屋及住户/租户人员数据
- */
- @PostMapping("import-placeRectifications")
- public R importPlaceRectifications(MultipartFile file, Integer isCovered) {
- PlaceRectificationsImporter placeRectificationsImporter = new PlaceRectificationsImporter(taskPlaceRectificationService, isCovered == 1);
- ExcelUtil.save(file, placeRectificationsImporter, PlaceRectificationsExcel.class);
- return R.success("操作成功");
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskPlaceSelfCheckController.java b/src/main/java/org/springblade/modules/task/controller/TaskPlaceSelfCheckController.java
deleted file mode 100644
index 0d21532..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskPlaceSelfCheckController.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
-import org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.vo.TaskPlaceSelfCheckVO;
-import org.springblade.modules.task.wrapper.TaskPlaceSelfCheckWrapper;
-import org.springblade.modules.task.service.ITaskPlaceSelfCheckService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.List;
-
-/**
- * 消防自查记任务表 控制器
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskPlaceSelfCheck/taskPlaceSelfCheck")
-@Api(value = "消防自查记任务表", tags = "消防自查记任务表接口")
-public class TaskPlaceSelfCheckController extends BladeController {
-
- private final ITaskPlaceSelfCheckService taskPlaceSelfCheckService;
- private final BladeLogger bladeLogger;
-
-
- /**
- * 获取消防自查记任务表详细信息
- */
- @ApiOperation("获取消防自查记任务表详细信息")
- @ApiLog("获取消防自查记任务表详细信息")
- @GetMapping(value = "/getInfo")
- public R<TaskPlaceSelfCheckVO> getInfo(TaskPlaceSelfCheckEntity taskPlaceSelfCheck){
- bladeLogger.info("获取消防自查记任务表详细信息", JsonUtil.toJson(taskPlaceSelfCheck));
- TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO = taskPlaceSelfCheckService.selectTaskPlaceSelfCheckById(taskPlaceSelfCheck);
- TaskPlaceSelfCheckVO taskPlaceSelfCheckDetailVO = BeanUtil.copy(taskPlaceSelfCheckDTO, TaskPlaceSelfCheckVO.class);
- return R.data(taskPlaceSelfCheckDetailVO);
- }
-
- /**
- * 消防自查记任务表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入taskPlaceSelfCheck")
- public R<TaskPlaceSelfCheckVO> detail(TaskPlaceSelfCheckEntity taskPlaceSelfCheck) {
- TaskPlaceSelfCheckEntity detail = taskPlaceSelfCheckService.getOne(Condition.getQueryWrapper(taskPlaceSelfCheck));
- return R.data(TaskPlaceSelfCheckWrapper.build().entityVO(detail));
- }
-
- /**
- * 获取消防自查记任务表详细信息
- */
- @GetMapping("/detailByTaskId")
- @ApiLog("获取消防自查记任务表详细信息")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "自定义详情", notes = "传入taskPlaceSelfCheck")
- public R<TaskPlaceSelfCheckVO> detailByTaskId(Long taskId) {
- bladeLogger.info("获取消防自查记任务表详细信息", JsonUtil.toJson(taskId));
- TaskPlaceSelfCheckEntity detail = taskPlaceSelfCheckService.getDetailByTaskId( taskId);
- return R.data(TaskPlaceSelfCheckWrapper.build().entityVO(detail));
- }
- /**
- * 消防自查记任务表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskPlaceSelfCheck")
- public R<IPage<TaskPlaceSelfCheckVO>> list(TaskPlaceSelfCheckEntity taskPlaceSelfCheck, Query query) {
- IPage<TaskPlaceSelfCheckEntity> pages = taskPlaceSelfCheckService.page(Condition.getPage(query), Condition.getQueryWrapper(taskPlaceSelfCheck));
- return R.data(TaskPlaceSelfCheckWrapper.build().pageVO(pages));
- }
-
- /**
- * 消防自查记任务表 自定义分页
- */
- @GetMapping("/page")
- @ApiLog("消防自查记任务表 自定义分页")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskPlaceSelfCheck")
- public R<IPage<TaskPlaceSelfCheckVO>> page(TaskPlaceSelfCheckVO taskPlaceSelfCheck, Query query) {
- bladeLogger.info("消防自查记任务表 自定义分页", JsonUtil.toJson(taskPlaceSelfCheck));
- IPage<TaskPlaceSelfCheckVO> pages = taskPlaceSelfCheckService.selectTaskPlaceSelfCheckPage(Condition.getPage(query), taskPlaceSelfCheck);
- return R.data(pages);
- }
-
- /**
- * 消防自查记任务表 新增
- */
- @PostMapping("/save")
- @ApiLog("消防自查记任务表 新增")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskPlaceSelfCheck")
- public R save(@Valid @RequestBody TaskPlaceSelfCheckEntity taskPlaceSelfCheck) {
- bladeLogger.info("消防自查记任务表 新增", JsonUtil.toJson(taskPlaceSelfCheck));
- return R.status(taskPlaceSelfCheckService.save(taskPlaceSelfCheck));
- }
- /**
- * 消防自查记任务表 新增
- */
- @PostMapping("/saveTwo")
- @ApiLog("消防自查记任务表 新增")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskPlaceSelfCheck")
- public R saveTwo(@Valid @RequestBody TaskPlaceSelfCheckVO taskPlaceSelfCheck) throws Exception {
- bladeLogger.info("消防自查记任务表 新增", JsonUtil.toJson(taskPlaceSelfCheck));
- return R.status(taskPlaceSelfCheckService.savePlace(taskPlaceSelfCheck));
- }
-
- /**
- * 消防自查记任务表 修改
- */
- @PostMapping("/update")
- @ApiLog("消防自查记任务表 修改")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskPlaceSelfCheck")
- public R update(@Valid @RequestBody TaskPlaceSelfCheckEntity taskPlaceSelfCheck) {
- bladeLogger.info("消防自查记任务表 修改", JsonUtil.toJson(taskPlaceSelfCheck));
- return R.status(taskPlaceSelfCheckService.updateById(taskPlaceSelfCheck));
- }
-
- /**
- * 消防自查记任务表 新增或修改
- */
- @PostMapping("/submit")
- @ApiLog("消防自查记任务表 新增或修改")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入taskPlaceSelfCheck")
- public R submit(@Valid @RequestBody TaskPlaceSelfCheckEntity taskPlaceSelfCheck) {
- bladeLogger.info("消防自查记任务表 新增或修改", JsonUtil.toJson(taskPlaceSelfCheck));
- return R.status(taskPlaceSelfCheckService.saveOrUpdate(taskPlaceSelfCheck));
- }
-
- /**
- * 消防自查记任务表 删除
- */
- @PostMapping("/remove")
- @ApiLog("消防自查记任务表 删除")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("消防自查记任务表 删除", JsonUtil.toJson(ids));
- return R.status(taskPlaceSelfCheckService.removeBatchByIds(Func.toLongList(ids)));
- }
-
- /**
- * 消防自查记任务表 修改
- */
- @PostMapping("/updateTaskPlaceSelfCheck")
- @ApiLog("消防自查记任务表 修改")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "更新自查详情接口", notes = "传入taskPlaceSelfCheck")
- public R updateTaskPlaceSelfCheck(@Valid @RequestBody TaskPlaceSelfCheckVO taskPlaceSelfCheck) throws Exception {
- bladeLogger.info("消防自查记任务表 修改", JsonUtil.toJson(taskPlaceSelfCheck));
- return R.status(taskPlaceSelfCheckService.updateTaskPlaceSelfCheck(taskPlaceSelfCheck));
- }
-
-
- /**
- * 导出消防自查信息
- * @param taskPlaceSelfCheck
- */
- @GetMapping("export-taskPlaceSelfCheck")
- @ApiLog("获取消防自查记任务表详细信息")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "导出消防自查", notes = "传入taskPlaceSelfCheck")
- public void exportTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck, HttpServletResponse response) {
- bladeLogger.info("导出消防自查信息", JsonUtil.toJson(taskPlaceSelfCheck));
- List<TaskPlaceSelfCheckExcel> list = taskPlaceSelfCheckService.exportTaskPlaceSelfCheck(taskPlaceSelfCheck);
- ExcelUtil.export(response, "消防自查" + DateUtil.time(), "消防自查记录表", list, TaskPlaceSelfCheckExcel.class);
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskRepairAppraiseController.java b/src/main/java/org/springblade/modules/task/controller/TaskRepairAppraiseController.java
deleted file mode 100644
index 4cfd534..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskRepairAppraiseController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.modules.task.vo.TaskRepairAppraiseVO;
-import org.springblade.modules.task.wrapper.TaskRepairAppraiseWrapper;
-import org.springblade.modules.task.service.ITaskRepairAppraiseService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 报事报修评分表 控制器
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-task/taskRepairAppraise")
-@Api(value = "报事报修评分表", tags = "报事报修评分表接口")
-public class TaskRepairAppraiseController extends BladeController {
-
- private final ITaskRepairAppraiseService taskService;
-
- /**
- * 报事报修评分表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入task")
- public R<TaskRepairAppraiseVO> detail(TaskRepairAppraiseEntity task) {
- TaskRepairAppraiseEntity detail = taskService.getOne(Condition.getQueryWrapper(task));
- return R.data(TaskRepairAppraiseWrapper.build().entityVO(detail));
- }
- /**
- * 报事报修评分表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskRepairAppraiseVO>> list(TaskRepairAppraiseEntity task, Query query) {
- IPage<TaskRepairAppraiseEntity> pages = taskService.page(Condition.getPage(query), Condition.getQueryWrapper(task));
- return R.data(TaskRepairAppraiseWrapper.build().pageVO(pages));
- }
-
- /**
- * 报事报修评分表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskRepairAppraiseVO>> page(TaskRepairAppraiseVO task, Query query) {
- IPage<TaskRepairAppraiseVO> pages = taskService.selectTaskRepairAppraisePage(Condition.getPage(query), task);
- return R.data(pages);
- }
-
- /**
- * 报事报修评分表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入task")
- public R save(@Valid @RequestBody TaskRepairAppraiseEntity task) {
- return R.status(taskService.save(task));
- }
-
- /**
- * 报事报修评分表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入task")
- public R update(@Valid @RequestBody TaskRepairAppraiseEntity task) {
- return R.status(taskService.updateById(task));
- }
-
- /**
- * 报事报修评分表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入task")
- public R submit(@Valid @RequestBody TaskRepairAppraiseEntity task) {
- return R.status(taskService.saveOrUpdate(task));
- }
-
- /**
- * 报事报修评分表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskRepairStepController.java b/src/main/java/org/springblade/modules/task/controller/TaskRepairStepController.java
deleted file mode 100644
index 727f47e..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskRepairStepController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.modules.task.vo.TaskRepairStepVO;
-import org.springblade.modules.task.wrapper.TaskRepairStepWrapper;
-import org.springblade.modules.task.service.ITaskRepairStepService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 报事报修事件步骤表 控制器
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-task/taskRepairStep")
-@Api(value = "报事报修事件步骤表", tags = "报事报修事件步骤表接口")
-public class TaskRepairStepController extends BladeController {
-
- private final ITaskRepairStepService taskService;
-
- /**
- * 报事报修事件步骤表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入task")
- public R<TaskRepairStepVO> detail(TaskRepairStepEntity task) {
- TaskRepairStepEntity detail = taskService.getOne(Condition.getQueryWrapper(task));
- return R.data(TaskRepairStepWrapper.build().entityVO(detail));
- }
- /**
- * 报事报修事件步骤表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskRepairStepVO>> list(TaskRepairStepEntity task, Query query) {
- IPage<TaskRepairStepEntity> pages = taskService.page(Condition.getPage(query), Condition.getQueryWrapper(task));
- return R.data(TaskRepairStepWrapper.build().pageVO(pages));
- }
-
- /**
- * 报事报修事件步骤表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入task")
- public R<IPage<TaskRepairStepVO>> page(TaskRepairStepVO task, Query query) {
- IPage<TaskRepairStepVO> pages = taskService.selectTaskRepairStepPage(Condition.getPage(query), task);
- return R.data(pages);
- }
-
- /**
- * 回复事件/移交时间接口
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "回复事件/移交时间接口", notes = "传入task")
- public R save(@Valid @RequestBody TaskRepairStepVO task) {
- return R.status(taskService.saveTaskRepairStep(task));
- }
-
- /**
- * 报事报修事件步骤表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入task")
- public R update(@Valid @RequestBody TaskRepairStepEntity task) {
- return R.status(taskService.updateById(task));
- }
-
- /**
- * 报事报修事件步骤表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入task")
- public R submit(@Valid @RequestBody TaskRepairStepEntity task) {
- return R.status(taskService.saveOrUpdate(task));
- }
-
- /**
- * 报事报修事件步骤表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskReportForRepairsController.java b/src/main/java/org/springblade/modules/task/controller/TaskReportForRepairsController.java
deleted file mode 100644
index 70ab90e..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskReportForRepairsController.java
+++ /dev/null
@@ -1,198 +0,0 @@
-package org.springblade.modules.task.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.service.ITaskReportForRepairsService;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springblade.modules.task.wrapper.TaskReportForRepairsWrapper;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.Date;
-
-/**
- * 报事报修任务表 控制器
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskReportForRepairs/taskReportForRepairs")
-@Api(value = "报事报修任务表", tags = "报事报修任务表接口")
-public class TaskReportForRepairsController extends BladeController {
-
- private final ITaskReportForRepairsService taskReportForRepairsService;
- private final BladeLogger bladeLogger;
-
- /**
- * 报事报修任务表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("报事报修任务表 详情")
- @ApiOperation(value = "详情", notes = "传入taskReportForRepairs")
- public R detail(TaskReportForRepairsEntity taskReportForRepairs) {
- bladeLogger.info("报事报修任务表 详情", JsonUtil.toJson(taskReportForRepairs));
- TaskReportForRepairsEntity detail = taskReportForRepairsService.getOne(Condition.getQueryWrapper(taskReportForRepairs));
- return R.data(detail);
- }
- /**
- * 报事报修任务表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskReportForRepairs")
- public R<IPage<TaskReportForRepairsVO>> list(TaskReportForRepairsEntity taskReportForRepairs, Query query) {
- IPage<TaskReportForRepairsEntity> pages = taskReportForRepairsService.page(Condition.getPage(query), Condition.getQueryWrapper(taskReportForRepairs));
- return R.data(TaskReportForRepairsWrapper.build().pageVO(pages));
- }
-
- /**
- * 报事报修任务表 自定义分页
- */
- @GetMapping("/page")
- @ApiLog("报事报修任务表 自定义分页")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskReportForRepairs")
- public R<IPage<TaskReportForRepairsVO>> page(TaskReportForRepairsVO taskReportForRepairs, Query query) {
- bladeLogger.info("报事报修任务表 自定义分页", JsonUtil.toJson(taskReportForRepairs));
- IPage<TaskReportForRepairsVO> pages = taskReportForRepairsService.selectTaskReportForRepairsPage(Condition.getPage(query), taskReportForRepairs);
- return R.data(pages);
- }
-
- /**
- * 报事报修任务表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("报事报修任务表 新增")
- @ApiOperation(value = "新增", notes = "传入taskReportForRepairs")
- public R save(@Valid @RequestBody TaskReportForRepairsEntity taskReportForRepairs) {
- bladeLogger.info("报事报修任务表 新增", JsonUtil.toJson(taskReportForRepairs));
- return R.status(taskReportForRepairsService.saveTaskReportForRepairs(taskReportForRepairs));
- }
-
- /**
- * 报事报修任务表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiLog("报事报修任务表 修改")
- @ApiOperation(value = "修改", notes = "传入taskReportForRepairs")
- public R update(@Valid @RequestBody TaskReportForRepairsEntity taskReportForRepairs) {
- bladeLogger.info("报事报修任务表 修改", JsonUtil.toJson(taskReportForRepairs));
- taskReportForRepairs.setConfirmTime(new Date());
- return R.status(taskReportForRepairsService.updateById(taskReportForRepairs));
- }
-
- /**
- * 报事报修任务表 自定义修改
- */
- @PostMapping("/updateTaskReportForRepairs")
- @ApiLog("报事报修任务表 自定义修改")
- @ApiOperation(value = "自定义修改", notes = "传入taskReportForRepairs")
- public R updateTaskReportForRepairs(@RequestBody TaskReportForRepairsEntity taskReportForRepairs) {
- bladeLogger.info("报事报修任务表 自定义修改", JsonUtil.toJson(taskReportForRepairs));
- return R.status(taskReportForRepairsService.updateTaskReportForRepairs(taskReportForRepairs));
- }
-
- /**
- * 报事报修任务表 审核
- */
- @PostMapping("/checkReportForRepairs")
- @ApiOperationSupport(order = 5)
- @ApiLog("报事报修任务表 审核")
- @ApiOperation(value = "审核", notes = "传入taskReportForRepairs")
- public R checkReportForRepairs(@RequestBody TaskReportForRepairsEntity taskReportForRepairs) {
- bladeLogger.info("报事报修任务表 审核", JsonUtil.toJson(taskReportForRepairs));
- return R.status(taskReportForRepairsService.checkReportForRepairs(taskReportForRepairs));
- }
-
- /**
- * 报事报修任务表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiLog("报事报修任务表 新增或修改")
- @ApiOperation(value = "新增或修改", notes = "传入taskReportForRepairs")
- public R submit(@Valid @RequestBody TaskReportForRepairsEntity taskReportForRepairs) {
- bladeLogger.info("报事报修任务表 新增或修改", JsonUtil.toJson(taskReportForRepairs));
- return R.status(taskReportForRepairsService.saveOrUpdate(taskReportForRepairs));
- }
-
- /**
- * 报事报修任务表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("报事报修任务表 详情")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("报事报修任务表 删除", JsonUtil.toJson(ids));
- return R.status(taskReportForRepairsService.deleteLogic(Func.toLongList(ids)));
- }
-
- /**
- * 查询报事报修统计
- *
- * @return
- */
- @GetMapping("/getStatisticsCount")
- @ApiLog("查询报事报修统计")
- public R statisticsCount(@RequestParam(value = "houseCode",required = false) String houseCode) {
- bladeLogger.info("查询报事报修统计", JsonUtil.toJson(houseCode));
- return R.data(taskReportForRepairsService.getStatisticsCount(houseCode));
- }
-
- /**
- * w网格员查询报事报修统计
- *
- * @return
- */
- @GetMapping("/getStatistics")
- @ApiLog("w网格员查询报事报修统计")
- @ApiOperation(value = "w网格员查询报事报修统计" )
- public R getStatistics() {
- return R.data(null);
- }
-
- /**
- * w网格员查询报事报修统计
- *
- * @return
- */
- @GetMapping("/getReportForStatistics")
- @ApiLog("报事报修任务表 详情")
- @ApiOperation(value = "查询报事报修统计" )
- public R getReportForStatistics(@RequestParam("code") String code, @RequestParam("roleType") String roleType) {
- bladeLogger.info("w网格员查询报事报修统计", JsonUtil.toJson(roleType));
- return R.data(taskReportForRepairsService.getReportForStatistics(code, roleType));
- }
-
- /**
- * 更新状态--临时接口
- * @param gridman
- * @return
- */
- @PostMapping("/updateView")
- public R updateView(@Valid @RequestBody GridmanEntity gridman) {
- return R.status(taskReportForRepairsService.updateView(gridman));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java b/src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java
deleted file mode 100644
index 56684aa..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-
-import javax.validation.Valid;
-
-import org.springblade.core.log.annotation.ApiLog;
-import org.springblade.core.log.logger.BladeLogger;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import org.springblade.modules.task.vo.TaskResidencePermitApplyVO;
-import org.springblade.modules.task.wrapper.TaskResidencePermitApplyWrapper;
-import org.springblade.modules.task.service.ITaskResidencePermitApplyService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-import java.util.Date;
-
-/**
- * 居住证申请 控制器
- *
- * @author BladeX
- * @since 2024-03-14
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskResidencePermitApply/taskResidencePermitApply")
-@Api(value = "居住证申请", tags = "居住证申请接口")
-public class TaskResidencePermitApplyController extends BladeController {
-
- private final ITaskResidencePermitApplyService taskResidencePermitApplyService;
- private final BladeLogger bladeLogger;
-
- /**
- * 居住证申请 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiLog("居住证申请 详情")
- @ApiOperation(value = "详情", notes = "传入taskResidencePermitApply")
- public R<TaskResidencePermitApplyVO> detail(TaskResidencePermitApplyEntity taskResidencePermitApply) {
- bladeLogger.info("居住证申请 详情", JsonUtil.toJson(taskResidencePermitApply));
- TaskResidencePermitApplyEntity detail = taskResidencePermitApplyService.getOne(Condition.getQueryWrapper(taskResidencePermitApply));
- return R.data(TaskResidencePermitApplyWrapper.build().entityVO(detail));
- }
-
- /**
- * 居住证申请 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskResidencePermitApply")
- public R<IPage<TaskResidencePermitApplyVO>> list(TaskResidencePermitApplyEntity taskResidencePermitApply, Query query) {
- // 查询自己的记录
- taskResidencePermitApply.setCreateUser(AuthUtil.getUserId());
- IPage<TaskResidencePermitApplyEntity> pages = taskResidencePermitApplyService.page(Condition.getPage(query), Condition.getQueryWrapper(taskResidencePermitApply).orderByDesc("create_time"));
- return R.data(TaskResidencePermitApplyWrapper.build().pageVO(pages));
- }
-
- /**
- * 居住证申请 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiLog("居住证申请 自定义分页")
- @ApiOperation(value = "分页", notes = "传入taskResidencePermitApply")
- public R<IPage<TaskResidencePermitApplyVO>> page(TaskResidencePermitApplyVO taskResidencePermitApply, Query query) {
- bladeLogger.info("居住证申请 自定义分页", JsonUtil.toJson(taskResidencePermitApply));
- IPage<TaskResidencePermitApplyVO> pages = taskResidencePermitApplyService.selectTaskResidencePermitApplyPage(Condition.getPage(query), taskResidencePermitApply);
- return R.data(pages);
- }
-
- /**
- * 居住证申请 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiLog("居住证申请 新增")
- @ApiOperation(value = "新增", notes = "传入taskResidencePermitApply")
- public R save(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) {
- bladeLogger.info("居住证申请 新增", JsonUtil.toJson(taskResidencePermitApply));
- return R.status(taskResidencePermitApplyService.saveResidencePermitApplyEntity(taskResidencePermitApply));
- }
-
- /**
- * 居住证申请 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiLog("居住证申请 修改")
- @ApiOperation(value = "修改", notes = "传入taskResidencePermitApply")
- public R update(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) {
- bladeLogger.info("居住证申请 修改", JsonUtil.toJson(taskResidencePermitApply));
- return R.status(taskResidencePermitApplyService.updateById(taskResidencePermitApply));
- }
- /**
- * 居住证申请 审核
- */
- @PostMapping("/auditing")
- @ApiOperationSupport(order = 5)
- @ApiLog("居住证申请 审核")
- @ApiOperation(value = "审核", notes = "传入taskResidencePermitApply")
- public R updateResidencePermitApply(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) {
- bladeLogger.info("居住证申请 审核", JsonUtil.toJson(taskResidencePermitApply));
- return R.status(taskResidencePermitApplyService.updateResidencePermitApplyEntity(taskResidencePermitApply));
- }
-
- /**
- * 居住证申请 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiLog("居住证申请 新增或修改")
- @ApiOperation(value = "新增或修改", notes = "传入taskResidencePermitApply")
- public R submit(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) {
- bladeLogger.info("居住证申请 新增或修改", JsonUtil.toJson(taskResidencePermitApply));
- return R.status(taskResidencePermitApplyService.saveOrUpdate(taskResidencePermitApply));
- }
-
- /**
- * 居住证申请 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiLog("居住证申请 详情")
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- bladeLogger.info("居住证申请 删除", JsonUtil.toJson(ids));
- return R.status(taskResidencePermitApplyService.removeTaskResidencePermitApplyBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskSchoolEvenController.java b/src/main/java/org/springblade/modules/task/controller/TaskSchoolEvenController.java
deleted file mode 100644
index f350aa0..0000000
--- a/src/main/java/org/springblade/modules/task/controller/TaskSchoolEvenController.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.task.service.ITaskSchoolEvenService;
-import org.springblade.modules.task.vo.TaskSchoolEvenVO;
-import org.springblade.modules.task.wrapper.TaskSchoolEvenWrapper;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 校园事件 控制器
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-taskSchoolEven/taskSchoolEven")
-@Api(value = "校园事件", tags = "校园事件接口")
-public class TaskSchoolEvenController extends BladeController {
-
- private final ITaskSchoolEvenService taskSchoolEvenService;
-
- /**
- * 校园事件 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入taskSchoolEven")
- public R<TaskSchoolEvenVO> detail(TaskSchoolEvenEntity taskSchoolEven) {
- TaskSchoolEvenEntity detail = taskSchoolEvenService.getOne(Condition.getQueryWrapper(taskSchoolEven));
- return R.data(TaskSchoolEvenWrapper.build().entityVO(detail));
- }
- /**
- * 校园事件 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入taskSchoolEven")
- public R<IPage<TaskSchoolEvenVO>> list(TaskSchoolEvenEntity taskSchoolEven, Query query) {
- IPage<TaskSchoolEvenEntity> pages = taskSchoolEvenService.page(Condition.getPage(query), Condition.getQueryWrapper(taskSchoolEven));
- return R.data(TaskSchoolEvenWrapper.build().pageVO(pages));
- }
-
- /**
- * 校园事件 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入taskSchoolEven")
- public R<IPage<TaskSchoolEvenVO>> page(TaskSchoolEvenVO taskSchoolEven, Query query) {
- IPage<TaskSchoolEvenVO> pages = taskSchoolEvenService.selectTaskSchoolEvenPage(Condition.getPage(query), taskSchoolEven);
- return R.data(pages);
- }
-
- /**
- * 校园事件 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入taskSchoolEven")
- public R save(@Valid @RequestBody TaskSchoolEvenEntity taskSchoolEven) {
- return R.status(taskSchoolEvenService.save(taskSchoolEven));
- }
-
- /**
- * 校园事件 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入taskSchoolEven")
- public R update(@Valid @RequestBody TaskSchoolEvenEntity taskSchoolEven) {
- return R.status(taskSchoolEvenService.updateById(taskSchoolEven));
- }
-
- /**
- * 校园事件 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入taskSchoolEven")
- public R submit(@Valid @RequestBody TaskSchoolEvenEntity taskSchoolEven) {
- return R.status(taskSchoolEvenService.saveOrUpdate(taskSchoolEven));
- }
-
- /**
- * 校园事件 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(taskSchoolEvenService.removeBatchByIds(Func.toLongList(ids)));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskBailReportingEventDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskBailReportingEventDTO.java
deleted file mode 100644
index 3d5d405..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskBailReportingEventDTO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 取保候审任务 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskBailReportingEventDTO extends TaskBailReportingEventEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
- private Integer reportType;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java
deleted file mode 100644
index c89b700..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-
-/**
- * 校园安全检查任务表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskCampusReportingEventDTO extends TaskCampusReportingEventEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
- private Integer reportType;
-
- /**
- * 中转的状态
- */
- private Integer status;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskDTO.java
deleted file mode 100644
index 19df605..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 任务表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskDTO extends TaskEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskHotelReportingDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskHotelReportingDTO.java
deleted file mode 100644
index d7b46cc..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskHotelReportingDTO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 旅馆安全自查任务 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskHotelReportingDTO extends TaskHotelReportingEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
- private Integer reportType;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskLabelReportingEventDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskLabelReportingEventDTO.java
deleted file mode 100644
index dcd4811..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskLabelReportingEventDTO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 打金店报事 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskLabelReportingEventDTO extends TaskLabelReportingEventEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
- private Integer reportType;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskNoFraudReportingDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskNoFraudReportingDTO.java
deleted file mode 100644
index c55117f..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskNoFraudReportingDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 无炸上报任务表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-10
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskNoFraudReportingDTO extends TaskNoFraudReportingEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskPlaceRecordDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskPlaceRecordDTO.java
deleted file mode 100644
index 1786ee5..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskPlaceRecordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 消防自查详情记录表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceRecordDTO extends TaskPlaceRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskPlaceRectificationDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskPlaceRectificationDTO.java
deleted file mode 100644
index 01b1569..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskPlaceRectificationDTO.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springblade.modules.place.vo.PlacePoiLabelVO;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 场所整改任务表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceRectificationDTO extends TaskPlaceRectificationEntity {
- private static final long serialVersionUID = 1L;
-
-
- @ApiModelProperty(value = "隐患项目", example = "")
- private List<PatrolRecordVO> patrolRecordVOList;
-
- @ApiModelProperty(value = "场所标签", example = "")
- private List<PlacePoiLabelVO> placePoiLabelVOList ;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "机构名称", example = "")
- private String deptName;
-
- @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
- private String nineType;
-
- @ApiModelProperty(value = "隐患问题", example = "")
- private String hiddenDanger;
-
- @ApiModelProperty(value = "不通过原因", example = "")
- private String reasonFailure;
-
- @ApiModelProperty(value = "地址编码", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "开始时间", example = "")
- private String startTime;
-
- @ApiModelProperty(value = "结束时间", example = "")
- private String endTime;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskPlaceSelfCheckDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskPlaceSelfCheckDTO.java
deleted file mode 100644
index 4ba1b21..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskPlaceSelfCheckDTO.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.place.vo.PlacePoiLabelVO;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 消防自查记任务表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceSelfCheckDTO extends TaskPlaceSelfCheckEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "隐患项目", example = "")
- private List<TaskPlaceRecordVO> taskPlaceRecordVOList;
-
- @ApiModelProperty(value = "场所标签", example = "")
- private List<PlacePoiLabelVO> placePoiLabelVOList ;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "机构名称", example = "")
- private String deptName;
-
- @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
- private String nineType;
-
- @ApiModelProperty(value = "隐患问题", example = "")
- private String hiddenDanger;
-
- @ApiModelProperty(value = "不通过原因", example = "")
- private String reasonFailure;
-
- @ApiModelProperty(value = "地址编码", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String startTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "结束时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String endTime;
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskRepairAppraiseDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskRepairAppraiseDTO.java
deleted file mode 100644
index 9de6158..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskRepairAppraiseDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 报事报修评分表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskRepairAppraiseDTO extends TaskRepairAppraiseEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskRepairStepDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskRepairStepDTO.java
deleted file mode 100644
index a2b555b..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskRepairStepDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 报事报修事件步骤表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskRepairStepDTO extends TaskRepairStepEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskReportForRepairsDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskReportForRepairsDTO.java
deleted file mode 100644
index 0c9c14e..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskReportForRepairsDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 报事报修任务表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskReportForRepairsDTO extends TaskReportForRepairsEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskResidencePermitApplyDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskResidencePermitApplyDTO.java
deleted file mode 100644
index 81d4b28..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskResidencePermitApplyDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 居住证申请 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-03-14
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskResidencePermitApplyDTO extends TaskResidencePermitApplyEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskSchoolEvenDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskSchoolEvenDTO.java
deleted file mode 100644
index a26449d..0000000
--- a/src/main/java/org/springblade/modules/task/dto/TaskSchoolEvenDTO.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.dto;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Date;
-
-/**
- * 校园事件 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskSchoolEvenDTO extends TaskSchoolEvenEntity {
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("images")
- private String images;
-
- /** 描述 */
- @ApiModelProperty(value = "描述", example = "")
- @TableField("describe")
- private String describe;
-
- /** 隐患类型 */
- @ApiModelProperty(value = "隐患类型", example = "")
- @TableField("hidden_danger_type")
- private String hiddenDangerType;
-
- /** 类型 1:隐患 2:矛盾 */
- @ApiModelProperty(value = "类型 1:隐患 2:矛盾", example = "")
- @TableField("type")
- private String type;
-
- /** 是否问题 1:是 2:否 */
- @ApiModelProperty(value = "是否问题 1:是 2:否", example = "")
- @TableField("is_problem")
- private String isProblem;
-
- /** 是否处理 1:是 2:否 */
- @ApiModelProperty(value = "是否处理 1:是 2:否", example = "")
- @TableField("is_handle")
- private String isHandle;
-
- /** 是否上报 1:是 2:否 */
- @ApiModelProperty(value = "是否上报 1:是 2:否", example = "")
- @TableField("is_reporting")
- private String isReporting;
-
- /** 工作照片 */
- @ApiModelProperty(value = "工作照片", example = "")
- @TableField("work_image")
- private String workImage;
-
- /** 确认标记 1:待审核 2:审核通过 3:审核不通过 */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 ", example = "")
- @TableField("confirm_flag")
- private String confirmFlag;
-
- /** 确认时间 */
- @ApiModelProperty(value = "确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 确认用户ID */
- @ApiModelProperty(value = "确认用户ID", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认用户ID */
- @ApiModelProperty(value = "确认用户ID", example = "")
- @TableField("confirm_user_name")
- private String confirmUserName;
-
- /** 确认意见 */
- @ApiModelProperty(value = "确认意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/ECallEventEntity.java b/src/main/java/org/springblade/modules/task/entity/ECallEventEntity.java
deleted file mode 100644
index 79ef383..0000000
--- a/src/main/java/org/springblade/modules/task/entity/ECallEventEntity.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * e呼即办表 实体类
- *
- * @author BladeX
- * @since 2023-12-07
- */
-@Data
-@TableName("jczz_e_call_event")
-@ApiModel(value = "ECallEvent对象", description = "e呼即办表")
-public class ECallEventEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String addressCode;
-
- /**
- * 事件类型
- */
- @ApiModelProperty(value = "事件类型")
- private Integer type;
- /**
- * 事件名称
- */
- @ApiModelProperty(value = "事件名称")
- private String name;
- /**
- * 社区编号
- */
- @ApiModelProperty(value = "社区编号")
- private String communityCode;
- /**
- * 发生地点
- */
- @ApiModelProperty(value = "发生地点")
- private String scene;
- /**
- * 事发位置
- */
- @ApiModelProperty(value = "事发位置")
- private String location;
- /**
- * 事发地经度
- */
- @ApiModelProperty(value = "事发地经度")
- private String lng;
-
- /**
- * 事发地纬度
- */
- @ApiModelProperty(value = "事发地纬度")
- private String lat;
-
- /**
- * 事发位置地址
- */
- @ApiModelProperty(value = "事发位置地址")
- private String address;
-
- /**
- * 发生时间
- */
- @ApiModelProperty(value = "发生时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date occurrenceTime;
- /**
- * 姓名
- */
- @ApiModelProperty(value = "姓名")
- private String realName;
- /**
- * 联系电话
- */
- @ApiModelProperty(value = "联系电话")
- private String phone;
- /**
- * 事件简述
- */
- @ApiModelProperty(value = "事件简述")
- private String remark;
- /**
- * 回访情况
- */
- @ApiModelProperty(value = "回访情况")
- private String retVis;
- /**
- * 处理结果
- */
- @ApiModelProperty(value = "处理结果")
- private String disRes;
- /**
- * 数据来源
- */
- @ApiModelProperty(value = "数据来源")
- private String source;
- /**
- * 现场图片urls
- */
- @ApiModelProperty(value = "现场图片urls")
- private String imageUrls;
- /**
- * 处置状态
- */
- @ApiModelProperty(value = "处置状态")
- private Integer disStatus;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("更新时间")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Date updateTime;
-
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskBailReportingEventEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskBailReportingEventEntity.java
deleted file mode 100644
index 22c2df0..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskBailReportingEventEntity.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 取保候审任务 实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@TableName("jczz_task_bail_reporting_event")
-@ApiModel(value = "TaskBailReportingEvent对象", description = "取保候审任务")
-@EqualsAndHashCode(callSuper = true)
-public class TaskBailReportingEventEntity extends TenantEntity {
-
- /**
- * 任务id
- */
- @ApiModelProperty(value = "任务id")
- private Long taskId;
- /**
- * 小区ID
- */
- @ApiModelProperty(value = "小区ID")
- private String districtId;
- /**
- * 小区名称
- */
- @ApiModelProperty(value = "小区名称")
- private String districtName;
- /**
- * 自查人姓名
- */
- @ApiModelProperty(value = "自查人姓名")
- private Long checkUserId;
- /**
- * 自查人姓名
- */
- @ApiModelProperty(value = "自查人姓名")
- private String checkUserName;
- /**
- * 自查人手机
- */
- @ApiModelProperty(value = "自查人手机")
- private String checkTelephone;
- /**
- * 自查位置
- */
- @ApiModelProperty(value = "自查位置")
- private String location;
- /**
- * 确认时间
- */
- @ApiModelProperty(value = "确认时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date confirmTime;
- /**
- * 确认用户ID
- */
- @ApiModelProperty(value = "确认用户ID")
- private Long confirmUserId;
- /**
- * 确认用户ID
- */
- @ApiModelProperty(value = "确认用户ID")
- private String confirmUserName;
- /**
- * 确认意见
- */
- @ApiModelProperty(value = "确认意见")
- private String confirmNotion;
- /**
- * 确认标记
- */
- @ApiModelProperty(value = "确认标记")
- private String confirmFlag;
- /**
- * 申请时间
- */
- @ApiModelProperty(value = "申请时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date applyTime;
- /**
- * 外出原因
- */
- @ApiModelProperty(value = "外出原因")
- private String applyName;
- /**
- * 身份证号
- */
- @ApiModelProperty(value = "身份证号")
- private String idCard;
- /**
- * 标签人员
- */
- @ApiModelProperty(value = "标签人员")
- private String personLabels;
- /**
- * 位置图片
- */
- @ApiModelProperty(value = "位置图片")
- private String locationImageUrls;
- /**
- * 确认用户电话
- */
- @ApiModelProperty(value = "确认用户电话")
- private String confirmUserTelephone;
- /**
- * 出发-当前时间
- */
- @ApiModelProperty(value = "出发-当前时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date startTime;
- /**
- * 出发-报备位置
- */
- @ApiModelProperty(value = "出发-报备位置")
- private String startLocation;
- /**
- * 出发-位置图片
- */
- @ApiModelProperty(value = "出发-位置图片")
- private String startImageUrls;
- /**
- * 到达-当前时间
- */
- @ApiModelProperty(value = "到达-当前时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date reachTime;
- /**
- * 到达-报备位置
- */
- @ApiModelProperty(value = "到达-报备位置")
- private String reachLocation;
- /**
- * 到达-位置图片
- */
- @ApiModelProperty(value = "到达-位置图片")
- private String reachImageUrls;
- /**
- * 返回-当前时间
- */
- @ApiModelProperty(value = "返回-当前时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date returnTime;
- /**
- * 返回-报备位置
- */
- @ApiModelProperty(value = "返回-报备位置")
- private String returnLocation;
- /**
- * 返回-位置图片
- */
- @ApiModelProperty(value = "返回-位置图片")
- private String returnImageUrls;
-
- @TableField(fill = FieldFill.INSERT)
- @ApiModelProperty(value = "创建时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date createTime;
-
- @TableField(fill = FieldFill.UPDATE)
- @ApiModelProperty(value = "更新时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date updateTime;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java
deleted file mode 100644
index 4ab84be..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 校园安全检查任务表 实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@TableName("jczz_task_campus_reporting_event")
-@ApiModel(value = "TaskCampusReportingEvent对象", description = "校园安全检查任务表")
-public class TaskCampusReportingEventEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 任务ID */
- @ApiModelProperty(value = "任务ID", example = "")
- @TableField("task_id")
- private Long taskId;
-
- /** 场所ID */
- @ApiModelProperty(value = "场所ID", example = "")
- @TableField("place_id")
- private Long placeId;
-
-// /** 小区ID */
-// @ApiModelProperty(value = "小区ID", example = "")
-// @TableField("district_id")
-// private String districtId;
-//
-// /** 小区名称 */
-// @ApiModelProperty(value = "小区名称", example = "")
-// @TableField("district_name")
-// private String districtName;
-
- /** 自查时间 */
- @ApiModelProperty(value = "自查时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("check_time")
- private Date checkTime;
-
- /** 自查人姓名 */
- @ApiModelProperty(value = "自查人姓名", example = "")
- @TableField("check_user_id")
- private Long checkUserId;
-
- /** 自查人姓名 */
- @ApiModelProperty(value = "自查人姓名", example = "")
- @TableField("check_user_name")
- private String checkUserName;
-
- /** 自查人手机 */
- @ApiModelProperty(value = "自查人手机", example = "")
- @TableField("check_telephone")
- private String checkTelephone;
-
- /** 自查位置 */
- @ApiModelProperty(value = "自查位置", example = "")
- @TableField("location")
- private String location;
-
- /** 安全通道状态 */
- @ApiModelProperty(value = "安全通道状态", example = "")
- @TableField("sc_status")
- private String scStatus;
-
- /** 安全通道图片 */
- @ApiModelProperty(value = "安全通道图片", example = "")
- @TableField("sc_image_urls")
- private String scImageUrls;
-
- /** 未成年人入住登记本照片 */
- @ApiModelProperty(value = "未成年人入住登记本照片", example = "")
- @TableField("uan_image_urls")
- private String uanImageUrls;
-
- /** 确认时间 */
- @ApiModelProperty(value = "确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 确认用户ID */
- @ApiModelProperty(value = "确认用户ID", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认用户ID */
- @ApiModelProperty(value = "确认用户ID", example = "")
- @TableField("confirm_user_name")
- private String confirmUserName;
-
- /** 确认意见 */
- @ApiModelProperty(value = "确认意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
- /**
- * 确认标记 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)
- */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)", example = "")
- @TableField("confirm_flag")
- private String confirmFlag;
-
- /** 校园名称 */
- @ApiModelProperty(value = "校园名称", example = "")
- @TableField("campus_name")
- private String campusName;
-
- /** 四个一 */
- @ApiModelProperty(value = "四个一", example = "")
- @TableField("four_one")
- private String fourOne;
-
- /** 消防器材数量 */
- @ApiModelProperty(value = "消防器材数量", example = "")
- @TableField("fire_facs_nums")
- private Integer fireFacsNums;
-
- /** 消防器材状态 */
- @ApiModelProperty(value = "消防器材状态", example = "")
- @TableField("fire_facs_status")
- private String fireFacsStatus;
-
- /** 消防器材图片 */
- @ApiModelProperty(value = "消防器材图片", example = "")
- @TableField("fire_facs_image_urls")
- private String fireFacsImageUrls;
-
- /** 消防器材种类 */
- @ApiModelProperty(value = "消防器材种类", example = "")
- @TableField("fire_facs_type")
- private String fireFacsType;
-
- /** 校园周边安全巡查照片 */
- @ApiModelProperty(value = "校园周边安全巡查照片", example = "")
- @TableField("patrol_image_urls")
- private String patrolImageUrls;
-
- /** 学校大门是否配备防撞装置 */
- @ApiModelProperty(value = "学校大门是否配备防撞装置", example = "")
- @TableField("anti_collision")
- private String antiCollision;
-
- /** 校园防撞装置照片 */
- @ApiModelProperty(value = "校园防撞装置照片", example = "")
- @TableField("anti_collision_image_urls")
- private String antiCollisionImageUrls;
-
- /** 专职保安人数 */
- @ApiModelProperty(value = "专职保安人数", example = "")
- @TableField("full_so_nums")
- private Integer fullSoNums;
-
- /** 兼职保安人数 */
- @ApiModelProperty(value = "兼职保安人数", example = "")
- @TableField("part_so_nums")
- private Integer partSoNums;
-
- /** 学校监控总数 */
- @ApiModelProperty(value = "学校监控总数", example = "")
- @TableField("monitor_nums")
- private Integer monitorNums;
-
- /** 监控是否全覆盖 */
- @ApiModelProperty(value = "监控是否全覆盖", example = "")
- @TableField("monitor_over")
- private String monitorOver;
-
- /** 高空抛物监控 */
- @ApiModelProperty(value = "高空抛物监控", example = "")
- @TableField("high_altitude_monitor")
- private String highAltitudeMonitor;
-
- /**
- * 高空抛物监控照片
- */
- @ApiModelProperty(value = "高空抛物监控照片", example = "")
- @TableField("ha_image_urls")
- private String haImageUrls;
-
- /**
- * 四个一工程照片
- */
- @ApiModelProperty(value = "四个一工程照片", example = "")
- @TableField("fo_image_urls")
- private String foImageUrls;
-
- /**
- * 来源: 1:主动上报 2:系统自动下发
- */
- @ApiModelProperty(value = "来源: 1:主动上报 2:系统自动下发")
- private Integer source;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @TableField(fill = FieldFill.UPDATE)
- @ApiModelProperty(value = "更新时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date updateTime;
-
- /**
- * 是否已删除 0:否 1:是
- */
- @ApiModelProperty("是否已删除")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskEntity.java
deleted file mode 100644
index 9509d83..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskEntity.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 任务表 实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@TableName("jczz_task")
-@ApiModel(value = "Task对象", description = "任务表")
-public class TaskEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
- /**
- * 任务名称
- */
- @ApiModelProperty(value = "任务名称")
- private String name;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String houseCode;
-
- /** 事件类型(1:取保候审,2.居住证申请 3 统战部事件上报 5二手交易 6.无诈 7.消防自查任务 8 九小整改任务) */
- @ApiModelProperty(value = "事件类型(1:取保候审,2.居住证申请 3 统战部事件上报 4校园安全 5二手交易 6.无诈 7.消防自查任务 8 九小整改任务 )", example = "")
- @TableField("report_type")
- private Integer reportType;
- /**
- * 类型 1:综治任务 2: 住建任务 3: 公安任务
- */
- @ApiModelProperty(value = "类型 1:综治任务 2: 住建任务 3: 公安任务")
- private Integer type;
- /**
- * 频次 1:一次性 2:周期性
- */
- @ApiModelProperty(value = "频次 1:一次性 2:周期性")
- private Integer frequency;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
-
- /**
- * 来源: 1:主动上报 2:系统自动下发
- */
- @ApiModelProperty(value = "来源: 1:主动上报 2:系统自动下发")
- private Integer source;
-
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty("创建时间")
- @TableField(fill = FieldFill.INSERT)
- private Date createTime;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private Long createUser;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.UPDATE)
- private Long updateUser;
-
- /**
- * 更新时间
- */
- @TableField(fill = FieldFill.UPDATE)
- @ApiModelProperty(value = "更新时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date updateTime;
-
- /**
- * 状态 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)
- */
- @ApiModelProperty(value = "状态 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)", example = "")
- private Integer status;
-
- /**
- * 是否已删除 0:否 1:是
- */
- @ApiModelProperty("是否已删除")
- @TableLogic
- private Integer isDeleted;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskHotelReportingEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskHotelReportingEntity.java
deleted file mode 100644
index 19df34e..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskHotelReportingEntity.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 旅馆安全自查任务 实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@TableName("jczz_task_hotel_reporting")
-@ApiModel(value = "TaskHotelReporting对象", description = "旅馆安全自查任务")
-public class TaskHotelReportingEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 任务id
- */
- @ApiModelProperty(value = "任务id")
- private Long taskId;
- /**
- * 酒店名称
- */
- @ApiModelProperty(value = "酒店名称")
- private String hotelName;
- /**
- * 场所ID
- */
- @ApiModelProperty(value = "场所ID")
- private Long placeId;
-// /**
-// * 小区ID
-// */
-// @ApiModelProperty(value = "小区ID")
-// private String districtId;
-// /**
-// * 小区名称
-// */
-// @ApiModelProperty(value = "小区名称")
-// private String districtName;
- /**
- * 自查时间
- */
- @ApiModelProperty(value = "自查时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date checkTime;
- /**
- * 自查人姓名
- */
- @ApiModelProperty(value = "自查人姓名")
- private Long checkUserId;
- /**
- * 自查人姓名
- */
- @ApiModelProperty(value = "自查人姓名")
- private String checkUserName;
- /**
- * 自查人手机
- */
- @ApiModelProperty(value = "自查人手机")
- private String checkTelephone;
- /**
- * 自查位置
- */
- @ApiModelProperty(value = "自查位置")
- private String location;
- /**
- * 灭火器数量
- */
- @ApiModelProperty(value = "灭火器数量")
- private Integer fireNums;
- /**
- * 灭火器状态
- */
- @ApiModelProperty(value = "灭火器状态")
- private String fireStatus;
- /**
- * 灭火器图片
- */
- @ApiModelProperty(value = "灭火器图片")
- private String fireImageUrls;
- /**
- * 安全通道状态
- */
- @ApiModelProperty(value = "安全通道状态")
- private String scStatus;
- /**
- * 安全通道图片
- */
- @ApiModelProperty(value = "安全通道图片")
- private String scImageUrls;
- /**
- * 技防设施有无
- */
- @ApiModelProperty(value = "技防设施有无")
- private String pfFlag;
- /**
- * 技防设施名称
- */
- @ApiModelProperty(value = "技防设施名称")
- private String pfName;
- /**
- * 技防设施照片
- */
- @ApiModelProperty(value = "技防设施照片")
- private String pfImageUrls;
- /**
- * 接待未成年人需要做到五个必须
- */
- @ApiModelProperty(value = "接待未成年人需要做到五个必须")
- private String fiveMust;
- /**
- * 未成年人入住登记本照片
- */
- @ApiModelProperty(value = "未成年人入住登记本照片")
- private String uanImageUrls;
- /**
- * 是否完全实名制登记
- */
- @ApiModelProperty(value = "是否完全实名制登记")
- private String realName;
- /**
- * 安全通道有无
- */
- @ApiModelProperty(value = "安全通道有无")
- private String scFlag;
- /**
- * 确认时间
- */
- @ApiModelProperty(value = "确认时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date confirmTime;
- /**
- * 确认用户ID
- */
- @ApiModelProperty(value = "确认用户ID")
- private Long confirmUserId;
- /**
- * 确认用户姓名
- */
- @ApiModelProperty(value = "确认用户姓名")
- private String confirmUserName;
- /**
- * 确认意见
- */
- @ApiModelProperty(value = "确认意见")
- private String confirmNotion;
-
- /**
- * 确认标记 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)
- */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)")
- private String confirmFlag;
- /**
- * 来源: 1:主动上报 2:系统自动下发
- */
- @ApiModelProperty(value = "来源: 1:主动上报 2:系统自动下发")
- private Integer source;
-
- /**
- * 创建时间
- */
- @TableField(fill = FieldFill.INSERT)
- @ApiModelProperty(value = "创建时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date createTime;
-
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
- private String createUser;
-
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.UPDATE)
- private String updateUser;
-
- /**
- * 更新时间
- */
- @TableField(fill = FieldFill.UPDATE)
- @ApiModelProperty(value = "更新时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date updateTime;
-
- /**
- * 是否已删除 0:否 1:是
- */
- @ApiModelProperty("是否已删除")
- private Integer isDeleted;
-
- @ApiModelProperty("事件类型:0 :旅馆 1:九小场所")
- @TableField("event_type")
- private Integer eventType;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java
deleted file mode 100644
index d2c5385..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.lang.Double;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 打金店报事 实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@TableName("jczz_task_label_reporting_event")
-@ApiModel(value = "TaskLabelReportingEvent对象", description = "打金店报事")
-public class TaskLabelReportingEventEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /** 主键id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 任务id */
- @ApiModelProperty(value = "任务id", example = "")
- @TableField("task_id")
- private Long taskId;
-
- /** 场所ID */
- @ApiModelProperty(value = "场所ID", example = "")
- @TableField("place_id")
- private Long placeId;
-
- /** 场所名称 */
- @ApiModelProperty(value = "场所名称", example = "")
- @TableField("district_name")
- private String districtName;
-
- /** 发生时间 */
- @ApiModelProperty(value = "发生时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("happen_time")
- private Date happenTime;
-
- /** 用户ID */
- @ApiModelProperty(value = "用户ID", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 用户姓名 */
- @ApiModelProperty(value = "用户姓名", example = "")
- @TableField("owner")
- private String owner;
-
- /** 用户手机号 */
- @ApiModelProperty(value = "用户手机号", example = "")
- @TableField("phone_number")
- private String phoneNumber;
-
- /** 身份证图片URLS */
- @ApiModelProperty(value = "身份证图片URLS", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 位置 */
- @ApiModelProperty(value = "位置", example = "")
- @TableField("localtion")
- private String localtion;
-
- /** 事件类型 1.二手交易 */
- @ApiModelProperty(value = "事件类型 1.二手交易", example = "")
- @TableField("event_type")
- private String eventType;
-
- /** 确认标记 1:待审核 2:审核通过 3:审核不通过 4:待接收 */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 4:待接收", example = "")
- @TableField("confirm_flag")
- private String confirmFlag;
-
- /** 确认人ID */
- @ApiModelProperty(value = "确认人ID", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认时间 */
- @ApiModelProperty(value = "确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 确认意见 */
- @ApiModelProperty(value = "确认意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
- /** 对象电话 */
- @ApiModelProperty(value = "对象电话", example = "")
- @TableField("transaction_object_tel")
- private String transactionObjectTel;
-
- /** 交易金额 */
- @ApiModelProperty(value = "交易金额", example = "")
- @TableField("transaction_money")
- private Float transactionMoney;
-
- /** 物品数量 */
- @ApiModelProperty(value = "物品数量", example = "")
- @TableField("goods_nums")
- private Integer goodsNums;
-
- /** 物品照片URLS */
- @ApiModelProperty(value = "物品照片URLS", example = "")
- @TableField("goods_image_urls")
- private String goodsImageUrls;
-
- /** 交易对象/物品名称 */
- @ApiModelProperty(value = "交易对象/物品名称", example = "")
- @TableField("transaction_object")
- private String transactionObject;
-
- /** 交易过程 */
- @ApiModelProperty(value = "交易过程", example = "")
- @TableField("transaction_process")
- private String transactionProcess;
-
- /** 标签名称 */
- @ApiModelProperty(value = "标签名称", example = "")
- @TableField("label_name")
- private String labelName;
-
- /** 1:主动上报 2:系统自动下发 */
- @ApiModelProperty(value = "1:主动上报 2:系统自动下发", example = "")
- @TableField("source")
- private Integer source;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 0否 1是 */
- @ApiModelProperty(value = "0否 1是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-
- /** 身份证号 */
- @ApiModelProperty(value = "身份证号", example = "")
- @TableField("id_card")
- private String idCard;
-
- /** 收据、发票 */
- @ApiModelProperty(value = "收据、发票", example = "")
- @TableField("receipt_urls")
- private String receiptUrls;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskNoFraudReportingEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskNoFraudReportingEntity.java
deleted file mode 100644
index 6ea0122..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskNoFraudReportingEntity.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 无炸上报任务表 实体类
- *
- * @author BladeX
- * @since 2024-04-10
- */
-@Data
-@TableName("jczz_task_no_fraud_reporting")
-@ApiModel(value = "TaskNoFraudReporting对象", description = "无炸上报任务表")
-public class TaskNoFraudReportingEntity {
-
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /** 任务id */
- @ApiModelProperty(value = "任务id", example = "")
- @TableField("task_id")
- private Long taskId;
-
- /** 任务名称 */
- @ApiModelProperty(value = "任务名称", example = "")
- @TableField("task_name")
- private String taskName;
-
- /** 场所名称 */
- @ApiModelProperty(value = "场所名称", example = "")
- @TableField("place_name")
- private String placeName;
-
- /** 内容 */
- @ApiModelProperty(value = "内容", example = "")
- @TableField("remark")
- private String remark;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 门牌地址编码 */
- @ApiModelProperty(value = "门牌地址编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 状态 1:待审核 2:审核通过 3:审核不通过 4: 待提交(待接收) */
- @ApiModelProperty(value = "状态 1:待审核 2:审核通过 3:审核不通过 4: 待提交(待接收)", example = "")
- @TableField("status")
- private Integer status;
-
- /** 0:否 1:是 */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("delete_flag")
- private Integer deleteFlag;
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskPlaceRecordEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskPlaceRecordEntity.java
deleted file mode 100644
index 8ebe2fe..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskPlaceRecordEntity.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 消防自查详情记录表 实体类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Data
-@TableName("jczz_task_place_record")
-@ApiModel(value = "TaskPlaceRecord对象", description = "消防自查详情记录表")
-public class TaskPlaceRecordEntity {
-
- private static final long serialVersionUID = 1L;
-
-
- /** 主键 */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 内容项id */
- @ApiModelProperty(value = "内容项id", example = "")
- @TableField("item_id")
- private Integer itemId;
-
- /** 场所检查id */
- @ApiModelProperty(value = "场所检查id", example = "")
- @TableField("task_place_self_check_id")
- private Long taskPlaceSelfCheckId;
-
- /** 是否存在隐患 0:存在 1 不存在 */
- @ApiModelProperty(value = "是否存在隐患 0:存在 1 不存在", example = "")
- @TableField("state")
- private Integer state;
-
- /** 隐患备注 */
- @ApiModelProperty(value = "隐患备注", example = "")
- @TableField("remark")
- private String remark;
-
- /** 照片 */
- @ApiModelProperty(value = "照片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 修改时间 */
- @ApiModelProperty(value = "修改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 是否删除 0: 否 1:是 */
- @ApiModelProperty(value = "是否删除 0: 否 1:是", example = "")
- @TableField("is_deleted")
- private Integer isDeleted;
-
- /** 整改照片 */
- @ApiModelProperty(value = "整改照片", example = "")
- @TableField("rectification_image_urls")
- private String rectificationImageUrls;
-
- /** 整改描述 */
- @ApiModelProperty(value = "整改描述", example = "")
- @TableField("rectification_remark")
- private String rectificationRemark;
-
- /** 整改时间 */
- @ApiModelProperty(value = "整改时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_time")
- private Date rectificationTime;
-
- /** 1 自查 2.无诈 */
- @ApiModelProperty(value = "1 自查 2.无诈 3:校园安全检查", example = "")
- @TableField("type")
- private String type;
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskPlaceRectificationEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskPlaceRectificationEntity.java
deleted file mode 100644
index 2304713..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskPlaceRectificationEntity.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import liquibase.pro.packaged.L;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 场所整改任务表 实体类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@Data
-@TableName("jczz_task_place_rectification")
-@ApiModel(value = "TaskPlaceRectification对象", description = "场所整改任务表")
-public class TaskPlaceRectificationEntity {
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 场所检查id */
- @ApiModelProperty(value = "场所检查id", example = "")
- @TableField("place_check_id")
- private Long placeCheckId;
-
- /** 任务id */
- @ApiModelProperty(value = "任务id", example = "")
- @TableField("task_id")
- private Long taskId;
-
- /** 任务状态: 1:待接收 2:审核中 3:审核通过 4:审核不通过 */
- @ApiModelProperty(value = "状态 1:待审核 2:审核通过 3:审核不通过 4:待上报(场所负责人完善,由系统下发的任务)", example = "")
- @TableField("status")
- private Integer status;
-
- /** 任务名称 */
- @ApiModelProperty(value = "任务名称", example = "")
- @TableField("task_name")
- private String taskName;
-
- /** 场所名称 */
- @ApiModelProperty(value = "场所名称", example = "")
- @TableField("place_name")
- private String placeName;
-
- /** 隐患内容 */
- @ApiModelProperty(value = "隐患内容", example = "")
- @TableField("remark")
- private String remark;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("update_time")
- private Date updateTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 门牌地址编码 */
- @ApiModelProperty(value = "门牌地址编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 是否下发整改通知: 1:否 2 :是 */
- @ApiModelProperty(value = "是否下发整改通知: 1:否 2 :是 ", example = "")
- @TableField("rectification_notice_flag")
- private Integer rectificationNoticeFlag;
-
- /** 整改截止时间 */
- @ApiModelProperty(value = "整改截止时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_end_time")
- private Date rectificationEndTime;
-
- /** 整改完成时间 */
- @ApiModelProperty(value = "整改完成时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_complete_time")
- private Date rectificationCompleteTime;
-
- /** 是否整改完毕:1:否 2 :是 */
- @ApiModelProperty(value = "是否整改完毕:1:否 2 :是", example = "")
- @TableField("rectification_flag")
- private Integer rectificationFlag;
-
- /** 是否处罚:1:否 2 :是 */
- @ApiModelProperty(value = "是否处罚:1:否 2 :是", example = "")
- @TableField("punish_flag")
- private Integer punishFlag;
-
- /** 派出所 */
- @ApiModelProperty(value = "派出所", example = "")
- @TableField("police_station")
- private String policeStation;
-
- /** 整改通知书地址 */
- @ApiModelProperty(value = "整改通知书地址", example = "")
- @TableField("rectification_notice_img_url")
- private String rectificationNoticeImgUrl;
-
- /** 签名路径 */
- @ApiModelProperty(value = "签名路径", example = "")
- @TableField("signature_path")
- private String signaturePath;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 照片 */
- @ApiModelProperty(value = "照片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskPlaceSelfCheckEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskPlaceSelfCheckEntity.java
deleted file mode 100644
index 52313ae..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskPlaceSelfCheckEntity.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 消防自查记任务表 实体类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Data
-@TableName("jczz_task_place_self_check")
-@ApiModel(value = "TaskPlaceSelfCheck对象", description = "消防自查记任务表")
-public class TaskPlaceSelfCheckEntity {
-
- private static final long serialVersionUID = 1L;
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 任务id */
- @ApiModelProperty(value = "任务id", example = "")
- @TableField("task_id")
- private Long taskId;
-
- /** 任务名称 */
- @ApiModelProperty(value = "任务名称", example = "")
- @TableField("task_name")
- private String taskName;
-
- /** 场所名称 */
- @ApiModelProperty(value = "场所名称", example = "")
- @TableField("place_name")
- private String placeName;
-
- /** 隐患内容 */
- @ApiModelProperty(value = "隐患内容", example = "")
- @TableField("remark")
- private String remark;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 门牌地址编码 */
- @ApiModelProperty(value = "门牌地址编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 整改截止时间 */
- @ApiModelProperty(value = "整改截止时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_end_time")
- private Date rectificationEndTime;
-
- /** 整改完成时间 */
- @ApiModelProperty(value = "整改完成时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("rectification_complete_time")
- private Date rectificationCompleteTime;
-
- /** 是否整改完毕:1:否 2 :是 */
- @ApiModelProperty(value = "是否整改完毕:1:否 2 :是", example = "")
- @TableField("rectification_flag")
- private Integer rectificationFlag;
-
- /** 派出所 */
- @ApiModelProperty(value = "派出所", example = "")
- @TableField("police_station")
- private String policeStation;
-
- /** 整改通知书地址 */
- @ApiModelProperty(value = "整改通知书地址", example = "")
- @TableField("rectification_notice_img_url")
- private String rectificationNoticeImgUrl;
-
- /** 签名路径 */
- @ApiModelProperty(value = "签名路径", example = "")
- @TableField("signature_path")
- private String signaturePath;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 照片 */
- @ApiModelProperty(value = "照片", example = "")
- @TableField("image_urls")
- private String imageUrls;
-
- /** 任务状态: 1:待接收 2:审核中 3:审核通过 4:审核不通过 */
- @ApiModelProperty(value = "任务状态: 1:待接收 2:审核中 3:审核通过 4:审核不通过", example = "")
- @TableField("status")
- private Integer status;
-
- /** 0:否 1:是 */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("delete_flag")
- private Integer deleteFlag;
-
- /** 1:消防自查 2:校园安全检查 */
- @ApiModelProperty(value = "1:消防自查 2:校园安全检查", example = "")
- @TableField("type")
- private String type;
-
- /** 1:否 2:是 */
- @ApiModelProperty(value = "1:否 2:是", example = "")
- @TableField("send_sms_flag")
- private String sendSmsFlag;
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskRepairAppraiseEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskRepairAppraiseEntity.java
deleted file mode 100644
index 8469d8a..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskRepairAppraiseEntity.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import liquibase.pro.packaged.I;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * 报事报修评分表对象 jczz_task_repair_appraise
- *
- * @author ${context.author}
- * @date 2023-12-26 17:57:06
- */
-@ApiModel(value = "TaskRepairAppraise对象", description = "报事报修评分表")
-@Data
-@TableName("jczz_task_repair_appraise")
-public class TaskRepairAppraiseEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 内容 */
- @ApiModelProperty(value = "内容", example = "")
- @TableField("content")
- private String content;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("create_time")
- private Date createTime;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("image_list")
- private String imageList;
-
- /** 评分数 */
- @ApiModelProperty(value = "评分数", example = "")
- @TableField("point")
- private String point;
-
- /** 事件id */
- @ApiModelProperty(value = "事件id", example = "")
- @TableField("repair_id")
- private Long repairId;
-
- /** 视频 */
- @ApiModelProperty(value = "视频", example = "")
- @TableField("video_list")
- private String videoList;
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskRepairStepEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskRepairStepEntity.java
deleted file mode 100644
index 1f2d880..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskRepairStepEntity.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 报事报修事件步骤表 实体类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Data
-@TableName("jczz_task_repair_step")
-@ApiModel(value = "TaskRepairStep对象", description = "报事报修事件步骤表")
-public class TaskRepairStepEntity {
- private static final long serialVersionUID = 1L;
-
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
-
- /** 事件id */
- @ApiModelProperty(value = "事件id", example = "")
- @TableField("repair_id")
- private Long repairId;
-
- /** 内容 */
- @ApiModelProperty(value = "内容", example = "")
- @TableField("content")
- private String content;
-
- /** 视频 */
- @ApiModelProperty(value = "视频", example = "")
- @TableField("video_list")
- private String videoList;
-
- /** 名字 */
- @ApiModelProperty(value = "名字", example = "")
- @TableField("name")
- private String name;
-
- /** 手机 */
- @ApiModelProperty(value = "手机", example = "")
- @TableField("mobile")
- private String mobile;
-
- /** 用户id */
- @ApiModelProperty(value = "用户id", example = "")
- @TableField("user_id")
- private Long userId;
-
- /** 用户类型: 0:网格员 1:物业公司 */
- @ApiModelProperty(value = "用户类型: 0:网格员 1:管理员 2:物业", example = "")
- @TableField("people_type")
- private String peopleType;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("image_list")
- private String imageList;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskReportForRepairsEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskReportForRepairsEntity.java
deleted file mode 100644
index 3f035e3..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskReportForRepairsEntity.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springblade.core.tenant.mp.TenantEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-/**
- * 报事报修任务表 实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@TableName("jczz_task_report_for_repairs")
-@ApiModel(value = "TaskReportForRepairs对象", description = "报事报修任务表")
-@EqualsAndHashCode(callSuper = true)
-public class TaskReportForRepairsEntity extends BaseEntity {
-
- /**
- * 类型 1公共维修,2居家维修,3矛盾纠纷,4投诉举报,5企业商户上报
- */
- @ApiModelProperty(value = "类型 1公共维修,2居家维修,3矛盾纠纷,4投诉举报,5企业商户上报 6 统战部事件上报")
- private Integer type;
-
- /**
- * 任务id
- */
- @ApiModelProperty(value = "任务id")
- private Long taskId;
-
- /**
- * 门牌地址编码
- */
- @ApiModelProperty(value = "门牌地址编码")
- private String addressCode;
-
- /**
- * 姓名
- */
- @ApiModelProperty(value = "姓名")
- private String realName;
- /**
- * 手机号
- */
- @ApiModelProperty(value = "手机号")
- private String phone;
- /**
- * 备注
- */
- @ApiModelProperty(value = "备注")
- private String remark;
- /**
- * 图片路径
- */
- @ApiModelProperty(value = "图片路径")
- private String imageUrls;
-
- /**
- * 确认用户ID
- */
- @ApiModelProperty(value = "确认用户ID")
- @JsonSerialize(using = ToStringSerializer.class)
- private Long confirmUserId;
- /**
- * 确认时间
- */
- @ApiModelProperty(value = "确认时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date confirmTime;
- /**
- * 确认标记 1:待处理 2:处理中 3:已处理
- */
- @ApiModelProperty(value = "确认标记 1:待处理 2:处理中 3:已处理")
- private Integer confirmFlag;
- /**
- * 确认意见
- */
- @ApiModelProperty(value = "确认意见")
- private String confirmNotion;
- /**
- * 经度
- */
- @ApiModelProperty(value = "经度")
- private String lng;
- /**
- * 纬度
- */
- @ApiModelProperty(value = "纬度")
- private String lat;
- /**
- * 事发地地址
- */
- @ApiModelProperty(value = "事发地地址")
- private String address;
-
-
- /**
- * 临时用 1:已查看 2:未查看
- */
- @ApiModelProperty(value = "临时用 1:已查看 2:未查看")
- private Integer viewType;
-
- /**
- * 1:房屋 2:场所
- */
- @ApiModelProperty(value = "1:房屋 2:场所")
- private Integer houseFlag;
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskResidencePermitApplyEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskResidencePermitApplyEntity.java
deleted file mode 100644
index 0db6532..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskResidencePermitApplyEntity.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 居住证申请 实体类
- *
- * @author BladeX
- * @since 2024-03-14
- */
-@Data
-@TableName("jczz_task_residence_permit_apply")
-@ApiModel(value = "TaskResidencePermitApply对象", description = "居住证申请")
-public class TaskResidencePermitApplyEntity {
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 名称 */
- @ApiModelProperty(value = "名称", example = "")
- @TableField("name")
- private String name;
-
- /** 联系电话 */
- @ApiModelProperty(value = "联系电话", example = "")
- @TableField("phone")
- private String phone;
-
- /** 身份证 */
- @ApiModelProperty(value = "身份证", example = "")
- @TableField("id_card")
- private String idCard;
-
- /** 地址 */
- @ApiModelProperty(value = "地址", example = "")
- @TableField("address")
- private String address;
-
- /** 房屋编码 */
- @ApiModelProperty(value = "房屋编码", example = "")
- @TableField("house_code")
- private String houseCode;
-
- /** 任务id */
- @ApiModelProperty(value = "任务id", example = "")
- @TableField("task_id")
- private Long taskId;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 出租屋id */
- @ApiModelProperty(value = "出租屋id", example = "")
- @TableField("house_rental_id")
- private Long houseRentalId;
-
- /** 0:否 1:是 */
- @ApiModelProperty(value = "0:否 1:是", example = "")
- @TableField("is_deleted")
- @TableLogic
- private Integer isDeleted;
-
- /** 申请事由 */
- @ApiModelProperty(value = "申请事由", example = "")
- @TableField("remak")
- private String remak;
-
- /** 网格编码 */
- @ApiModelProperty(value = "网格编码", example = "")
- @TableField("grid_code")
- private String gridCode;
-
- /** 更新人 */
- @ApiModelProperty(value = "更新人", example = "")
- @TableField("update_user")
- private Long updateUser;
-
- /** 确认人 */
- @ApiModelProperty(value = "确认人", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认时间 */
- @ApiModelProperty(value = "确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 状态 1:待审核 2:审核通过 3:审核不通过 4: 待提交(待接收) */
- @ApiModelProperty(value = "状态 1:待审核 2:审核通过 3:审核不通过 4: 待提交(待接收)", example = "")
- @TableField("confirm_flag")
- private Integer confirmFlag;
-
- /** 确认意见 */
- @ApiModelProperty(value = "确认意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
- /**
- * 警务网格编号
- */
- @ApiModelProperty(value = "警务网格编号")
- @TableField("jw_grid_code")
- private String jwGridCode;
-
-
- /** 房东名称 */
- @ApiModelProperty(value = "房东名称", example = "")
- @TableField("landlord_name")
- private String landlordName;
-
- /** 房东电话 */
- @ApiModelProperty(value = "房东电话", example = "")
- @TableField("landlord_phone")
- private String landlordPhone;
-
- /** 1:否 2:是 */
- @ApiModelProperty(value = "1:否 2:是", example = "")
- @TableField("send_sms_flag")
- private Integer sendSmsFlag;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskSchoolEvenEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskSchoolEvenEntity.java
deleted file mode 100644
index ac77e31..0000000
--- a/src/main/java/org/springblade/modules/task/entity/TaskSchoolEvenEntity.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.util.Date;
-
-/**
- * 校园事件 实体类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Data
-@TableName("jczz_task_school_even")
-@ApiModel(value = "TaskSchoolEven对象", description = "校园事件")
-public class TaskSchoolEvenEntity {
-
-
-
- /** id */
- @ApiModelProperty(value = "主键ID", example = "")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /** 创建人 */
- @ApiModelProperty(value = "创建人", example = "")
- @TableField("create_user")
- private Long createUser;
-
- /** 图片 */
- @ApiModelProperty(value = "图片", example = "")
- @TableField("images")
- private String images;
-
- /** 描述 */
- @ApiModelProperty(value = "描述", example = "")
- @TableField("describe")
- private String describe;
-
- /** 隐患类型 */
- @ApiModelProperty(value = "隐患类型", example = "")
- @TableField("hidden_danger_type")
- private String hiddenDangerType;
-
- /** 类型 1:隐患 2:矛盾 */
- @ApiModelProperty(value = "类型 1:隐患 2:矛盾", example = "")
- @TableField("type")
- private String type;
-
- /** 是否问题 1:是 2:否 */
- @ApiModelProperty(value = "是否问题 1:是 2:否", example = "")
- @TableField("is_problem")
- private String isProblem;
-
- /** 是否处理 1:是 2:否 */
- @ApiModelProperty(value = "是否处理 1:是 2:否", example = "")
- @TableField("is_handle")
- private String isHandle;
-
- /** 是否上报 1:是 2:否 */
- @ApiModelProperty(value = "是否上报 1:是 2:否", example = "")
- @TableField("is_reporting")
- private String isReporting;
-
- /** 工作照片 */
- @ApiModelProperty(value = "工作照片", example = "")
- @TableField("work_image")
- private String workImage;
-
- /** 确认标记 1:待审核 2:审核通过 3:审核不通过 */
- @ApiModelProperty(value = "确认标记 1:待审核 2:审核通过 3:审核不通过 ", example = "")
- @TableField("confirm_flag")
- private String confirmFlag;
-
- /** 确认时间 */
- @ApiModelProperty(value = "确认时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField("confirm_time")
- private Date confirmTime;
-
- /** 确认用户ID */
- @ApiModelProperty(value = "确认用户ID", example = "")
- @TableField("confirm_user_id")
- private Long confirmUserId;
-
- /** 确认用户ID */
- @ApiModelProperty(value = "确认用户ID", example = "")
- @TableField("confirm_user_name")
- private String confirmUserName;
-
- /** 确认意见 */
- @ApiModelProperty(value = "确认意见", example = "")
- @TableField("confirm_notion")
- private String confirmNotion;
-
- /** 创建时间 */
- @ApiModelProperty(value = "创建时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "create_time",fill = FieldFill.INSERT)
- private Date createTime;
-
- /** 更新时间 */
- @ApiModelProperty(value = "更新时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- @TableField(value = "update_time",fill = FieldFill.UPDATE)
- private Date updateTime;
-}
diff --git a/src/main/java/org/springblade/modules/task/excel/PlaceRectificationsExcel.java b/src/main/java/org/springblade/modules/task/excel/PlaceRectificationsExcel.java
deleted file mode 100644
index 2f845d4..0000000
--- a/src/main/java/org/springblade/modules/task/excel/PlaceRectificationsExcel.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.springblade.modules.task.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-import org.springblade.common.excel.ExcelDictItemLabel;
-
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class PlaceRectificationsExcel {
- private static final long serialVersionUID = 1L;
- @ExcelProperty( value = "场所类别",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "nineType")
- @ExcelDictItemLabel(type = "nineType")
- private String nineType;
-
- @ExcelProperty(value = "场所名称")
- private String placeName;
-
- @ExcelProperty(value = "社区名称")
- private String communityName;
-
- @ExcelProperty(value = "场所地址")
- private String placeAddress;
-
- @ExcelProperty(value = "标准地址编码")
- private String houseCode;
-
- @ExcelProperty(value = "场所标准地址")
- private String addressName;
-
- @ExcelProperty(value = "场所负责人")
- private String principal;
-
- @ExcelProperty(value = "负责人电话")
- private String principalPhone;
-
- @ExcelProperty(value = "限期整改时间")
- private String rectificationEndTime;
-
- @ExcelProperty(value = "督促整改责任人及联系方式")
- private String police;
-
- @ExcelProperty(value = "责任人姓名及联系方式")
- private String principals;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/excel/PlaceRectificationsImporter.java b/src/main/java/org/springblade/modules/task/excel/PlaceRectificationsImporter.java
deleted file mode 100644
index e7c4b44..0000000
--- a/src/main/java/org/springblade/modules/task/excel/PlaceRectificationsImporter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.excel;
-
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.excel.support.ExcelImporter;
-import org.springblade.modules.task.service.ITaskPlaceRectificationService;
-
-import java.util.List;
-
-/**
- * 人房数据导入类
- *
- * @author Chill
- */
-@RequiredArgsConstructor
-public class PlaceRectificationsImporter implements ExcelImporter<PlaceRectificationsExcel> {
-
- private final ITaskPlaceRectificationService iTaskPlaceRectificationService;
- private final Boolean isCovered;
-
- @Override
- public void save(List<PlaceRectificationsExcel> data) {
- iTaskPlaceRectificationService.importPlaceRectifications(data, isCovered);
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/excel/TaskLabelReportingEventExcel.java b/src/main/java/org/springblade/modules/task/excel/TaskLabelReportingEventExcel.java
deleted file mode 100644
index cb4454c..0000000
--- a/src/main/java/org/springblade/modules/task/excel/TaskLabelReportingEventExcel.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package org.springblade.modules.task.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-import org.springblade.common.excel.ExcelDictItemLabel;
-
-import java.io.Serializable;
-
-/**
- * 二手交易记录
- *
- * @author zhongrj
- * @date 2024/02/20
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class TaskLabelReportingEventExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty(value = "场所负责人")
- private String principal;
-
- @ExcelProperty(value = "场所负责人电话")
- private String principalPhone;
-
- @ExcelProperty( value = "场所名称")
- private String placeName;
-
- @ExcelProperty( value = "阵地类型",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "frontType")
- private String frontType;
-
- /** 街道名称 */
- @ExcelProperty( "交易对象")
- private String transactionObject;
-
- @ExcelProperty(value = "交易对象电话")
- private String transactionObjectTel;
-
- @ExcelProperty(value = "身份证号码")
- private String idCard;
-
- @ExcelProperty( value = "交易数量")
- private Integer goodsNums;
-
- @ExcelProperty( value = "交易金额")
- private Float transactionMoney;
-
- @ExcelProperty( value = "交易过程")
- private String transactionProcess;
-
- @ExcelProperty( value = "发生时间")
- private String createTime;
-
- @ExcelProperty(value = "地址")
- private String location;
-
- @ExcelProperty( "所属街道")
- private String streetName;
-
- @ExcelProperty(value = "所属社区")
- private String communityName;
-
-
- @ExcelProperty(value = "审核状态")
- private String confirmFlag;
-
- @ExcelProperty(value = "审核意见")
- private String confirmNotion;
-
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/task/excel/TaskNoExplosionExcel.java b/src/main/java/org/springblade/modules/task/excel/TaskNoExplosionExcel.java
deleted file mode 100644
index b71f1f3..0000000
--- a/src/main/java/org/springblade/modules/task/excel/TaskNoExplosionExcel.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.springblade.modules.task.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-
-import java.io.Serializable;
-
-/**
- * 消费自查检查
- *
- * @author zhongrj
- * @date 2024/02/22
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class TaskNoExplosionExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty(value = "场所名称")
- private String placeName;
-
- @ExcelProperty(value = "场所地址")
- private String location;
-
- @ExcelProperty( value = "无诈类别",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "noExplosionCategory")
- private String noExplosionCategory;
-
- /**
- * 街道名称
- */
- @ExcelProperty("所属街道")
- private String streetName;
-
- @ExcelProperty(value = "所属社区")
- private String communityName;
-
- @ExcelProperty(value = "所属网格")
- private String gridName;
-
- // @ExcelProperty( value = "场所隐患")
-// private String remark;
-// @ApiModelProperty(value = "上报数量", example = "")
-// private Integer number;
-
- @ExcelProperty(value = "场所负责人")
- private String principal;
-
- @ExcelProperty(value = "场所负责人电话")
- private String principalPhone;
-
-
- @ExcelProperty(value = "创建时间")
- private String createTime;
-
- @ExcelProperty( value = "审核状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "reviewStatus")
- private String status;
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/task/excel/TaskPlaceRectificationExcel.java b/src/main/java/org/springblade/modules/task/excel/TaskPlaceRectificationExcel.java
deleted file mode 100644
index 461c9c9..0000000
--- a/src/main/java/org/springblade/modules/task/excel/TaskPlaceRectificationExcel.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.excel;
-
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springblade.modules.place.vo.PlacePoiLabelVO;
-
-import java.util.List;
-
-/**
- * 场所整改任务表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class TaskPlaceRectificationExcel {
- private static final long serialVersionUID = 1L;
-
-
- @ExcelProperty(value = "隐患项目")
- @ExcelIgnore
- private List<PatrolRecordVO> patrolRecordVOList;
-
- @ExcelProperty(value = "场所标签")
- @ExcelIgnore
- private List<PlacePoiLabelVO> placePoiLabelVOList ;
-
- @ExcelProperty(value = "场所名称")
- private String placeName;
-
- @ExcelProperty(value = "场所地址")
- private String addressName;
-
- @ExcelProperty( value = "场所类别")
- private String nineType;
-
- @ExcelProperty(value = "存在安全隐患或违法行为")
- private String hiddenDanger;
-
- @ExcelProperty(value = "是否下发《责令改正通知书》或是否处罚")
- private String rectificationNoticeFlag;
-
- @ExcelProperty(value = "是否整改完毕")
- private String rectificationFlag;
-
- @ExcelProperty(value = "完成整改时限")
- private String rectificationEndTime;
-
- @ExcelProperty(value = "检查时间")
- private String createTime;
-
- @ExcelProperty(value = "派出所名称")
- private String deptName;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/excel/TaskPlaceSelfCheckExcel.java b/src/main/java/org/springblade/modules/task/excel/TaskPlaceSelfCheckExcel.java
deleted file mode 100644
index 862a5c2..0000000
--- a/src/main/java/org/springblade/modules/task/excel/TaskPlaceSelfCheckExcel.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.springblade.modules.task.excel;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.write.style.ColumnWidth;
-import com.alibaba.excel.annotation.write.style.ContentRowHeight;
-import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import lombok.Data;
-import org.springblade.common.excel.ExcelDictConverter;
-import org.springblade.common.excel.ExcelDictItem;
-
-import java.io.Serializable;
-
-/**
- * 消费自查检查
- *
- * @author zhongrj
- * @date 2024/02/22
- */
-@Data
-@ColumnWidth(25)
-@HeadRowHeight(20)
-@ContentRowHeight(18)
-public class TaskPlaceSelfCheckExcel implements Serializable {
-
- private static final long serialVersionUID = 2L;
-
- @ExcelProperty( value = "场所名称")
- private String placeName;
-
- @ExcelProperty(value = "场所地址")
- private String location;
-
- @ExcelProperty( value = "场所类别")
- private String nineType;
-
- /** 街道名称 */
- @ExcelProperty( "所属街道")
- private String streetName;
-
- @ExcelProperty(value = "所属社区")
- private String communityName;
-
- @ExcelProperty(value = "所属网格")
- private String gridName;
-
- @ExcelProperty( value = "场所隐患")
- private String remark;
-
- @ExcelProperty(value = "场所负责人")
- private String principal;
-
- @ExcelProperty(value = "场所负责人电话")
- private String principalPhone;
-
-
- @ExcelProperty(value = "创建时间")
- private String createTime;
-
- @ExcelProperty( value = "审核状态",converter = ExcelDictConverter.class)
- @ExcelDictItem(type = "reviewStatus")
- private String status;
-
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.java b/src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.java
deleted file mode 100644
index d46a350..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.entity.ECallEventEntity;
-import org.springblade.modules.task.vo.ECallEventVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * e呼即办表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-07
- */
-public interface EcCallEventMapper extends BaseMapper<ECallEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param eCallEvent
- * @return
- */
- List<ECallEventVO> selectECallEventPage(IPage page,
- @Param("eCallEvent") ECallEventVO eCallEvent,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("isAdministrator") Integer isAdministrator);
-
-
- /**
- * 查询未分享到圈子的内容
- * @return
- */
- List<ECallEventEntity> getNotShareCircleList();
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.xml
deleted file mode 100644
index fe20d64..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.EcCallEventMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="eCallEventResultMap" type="org.springblade.modules.task.entity.ECallEventEntity">
- <result column="id" property="id"/>
- <result column="type" property="type"/>
- <result column="name" property="name"/>
- <result column="community_code" property="communityCode"/>
- <result column="scene" property="scene"/>
- <result column="occurrence_time" property="occurrenceTime"/>
- <result column="real_name" property="realName"/>
- <result column="phone" property="phone"/>
- <result column="remark" property="remark"/>
- <result column="dis_sit" property="disSit"/>
- <result column="ret_vis" property="retVis"/>
- <result column="dis_res" property="disRes"/>
- <result column="source" property="source"/>
- <result column="dis_status" property="disStatus"/>
- <result column="create_time" property="createTime"/>
- <result column="create_user" property="createUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectECallEventPage" resultType="org.springblade.modules.task.vo.ECallEventVO">
- select
- jece.*,
- br.name as communityName
- from jczz_e_call_event jece
- left join blade_region br on br.code = jece.community_code
- where jece.is_deleted = 0
- <if test="eCallEvent.name!=null and eCallEvent.name!=''">
- and jece.name like concat('%',#{eCallEvent.name},'%')
- </if>
- <if test="eCallEvent.phone!=null and eCallEvent.phone!=''">
- and jece.phone like concat('%',#{eCallEvent.phone},'%')
- </if>
- <if test="eCallEvent.realName!=null and eCallEvent.realName!=''">
- and jece.real_name like concat('%',#{eCallEvent.realName},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jece.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jece.community_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="eCallEvent.communityName!=null and eCallEvent.communityName!=''">
- and br.name like concat('%',#{eCallEvent.communityName},'%')
- </if>
- order by jece.create_time desc,jece.id desc
- </select>
-
- <!--查询未分享到圈子的内容-->
- <select id="getNotShareCircleList" resultType="org.springblade.modules.task.entity.ECallEventEntity">
- select
- jece.*
- from jczz_e_call_event jece
- left join jczz_circle jc on jc.event_id = jece.id and jc.even_type = 2 and jc.deleted_falg =0
- where jece.is_deleted = 0 and jc.id is null
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskBailReportingEventMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskBailReportingEventMapper.java
deleted file mode 100644
index a71ae10..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskBailReportingEventMapper.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.lettuce.core.dynamic.annotation.Param;
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import org.springblade.modules.task.vo.TaskBailReportingEventVO;
-
-import java.util.List;
-
-/**
- * 取保候审任务 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface TaskBailReportingEventMapper extends BaseMapper<TaskBailReportingEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskBailReportingEvent
- * @return
- */
- List<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage page, TaskBailReportingEventVO taskBailReportingEvent);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskBailReportingEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskBailReportingEventMapper.xml
deleted file mode 100644
index 081b466..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskBailReportingEventMapper.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskBailReportingEventMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskBailReportingEventResultMap" type="org.springblade.modules.task.entity.TaskBailReportingEventEntity">
- <result column="id" property="id"/>
- <result column="task_id" property="taskId"/>
- <result column="district_id" property="districtId"/>
- <result column="district_name" property="districtName"/>
- <result column="check_user_id" property="checkUserId"/>
- <result column="check_user_name" property="checkUserName"/>
- <result column="check_telephone" property="checkTelephone"/>
- <result column="location" property="location"/>
- <result column="confirm_time" property="confirmTime"/>
- <result column="confirm_user_id" property="confirmUserId"/>
- <result column="confirm_user_name" property="confirmUserName"/>
- <result column="confirm_notion" property="confirmNotion"/>
- <result column="confirm_flag" property="confirmFlag"/>
- <result column="apply_time" property="applyTime"/>
- <result column="apply_name" property="applyName"/>
- <result column="id_card" property="idCard"/>
- <result column="person_labels" property="personLabels"/>
- <result column="location_image_urls" property="locationImageUrls"/>
- <result column="confirm_user_telephone" property="confirmUserTelephone"/>
- <result column="start_time" property="startTime"/>
- <result column="start_location" property="startLocation"/>
- <result column="start_image_urls" property="startImageUrls"/>
- <result column="reach_time" property="reachTime"/>
- <result column="reach_location" property="reachLocation"/>
- <result column="reach_image_urls" property="reachImageUrls"/>
- <result column="return_time" property="returnTime"/>
- <result column="return_location" property="returnLocation"/>
- <result column="return_image_urls" property="returnImageUrls"/>
- </resultMap>
-
-
- <select id="selectTaskBailReportingEventPage" resultMap="taskBailReportingEventResultMap">
- select * from jczz_task_bail_reporting_event where is_deleted = 0
- <if test="taskBailReportingEvent.checkUserId != null and taskBailReportingEvent.checkUserId != ''">
- AND check_user_id = #{taskBailReportingEvent.checkUserId}
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.java
deleted file mode 100644
index ab01246..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 校园安全检查任务表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface TaskCampusReportingEventMapper extends BaseMapper<TaskCampusReportingEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskCampusReportingEvent
- * @return
- */
- List<TaskCampusReportingEventVO> selectTaskCampusReportingEventPage(IPage page, TaskCampusReportingEventVO taskCampusReportingEvent);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml
deleted file mode 100644
index d68037c..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskCampusReportingEventMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskCampusReportingEventResultMap" type="org.springblade.modules.task.entity.TaskCampusReportingEventEntity">
- <result property="id" column="id" />
- <result property="taskId" column="task_id" />
- <result property="placeId" column="place_id" />
- <result property="districtId" column="district_id" />
- <result property="districtName" column="district_name" />
- <result property="checkTime" column="check_time" />
- <result property="checkUserId" column="check_user_id" />
- <result property="checkUserName" column="check_user_name" />
- <result property="checkTelephone" column="check_telephone" />
- <result property="location" column="location" />
- <result property="scStatus" column="sc_status" />
- <result property="scImageUrls" column="sc_image_urls" />
- <result property="uanImageUrls" column="uan_image_urls" />
- <result property="confirmTime" column="confirm_time" />
- <result property="confirmUserId" column="confirm_user_id" />
- <result property="confirmUserName" column="confirm_user_name" />
- <result property="confirmNotion" column="confirm_notion" />
- <result property="confirmFlag" column="confirm_flag" />
- <result property="campusName" column="campus_name" />
- <result property="fourOne" column="four_one" />
- <result property="fireFacsNums" column="fire_facs_nums" />
- <result property="fireFacsStatus" column="fire_facs_status" />
- <result property="fireFacsImageUrls" column="fire_facs_image_urls" />
- <result property="fireFacsType" column="fire_facs_type" />
- <result property="patrolImageUrls" column="patrol_image_urls" />
- <result property="antiCollision" column="anti_collision" />
- <result property="antiCollisionImageUrls" column="anti_collision_image_urls" />
- <result property="fullSoNums" column="full_so_nums" />
- <result property="partSoNums" column="part_so_nums" />
- <result property="monitorNums" column="monitor_nums" />
- <result property="monitorOver" column="monitor_over" />
- <result property="highAltitudeMonitor" column="high_altitude_monitor" />
- <result property="haImageUrls" column="ha_image_urls" />
- <result property="foImageUrls" column="fo_image_urls" />
- </resultMap>
-
-
- <sql id="selectTaskCampusReportingEvent">
- select
- id,
- task_id,
- place_id,
- check_time,
- check_user_id,
- check_user_name,
- check_telephone,
- location,
- sc_status,
- sc_image_urls,
- uan_image_urls,
- confirm_time,
- confirm_user_id,
- confirm_user_name,
- confirm_notion,
- confirm_flag,
- campus_name,
- four_one,
- fire_facs_nums,
- fire_facs_status,
- fire_facs_image_urls,
- fire_facs_type,
- patrol_image_urls,
- anti_collision,
- anti_collision_image_urls,
- full_so_nums,
- part_so_nums,
- monitor_nums,
- monitor_over,
- high_altitude_monitor,
- ha_image_urls,
- fo_image_urls
- from
- jczz_task_campus_reporting_event
- </sql>
-
- <select id="selectTaskCampusReportingEventPage" resultMap="taskCampusReportingEventResultMap">
- <include refid="selectTaskCampusReportingEvent"/>
- <where>
- <if test="taskCampusReportingEvent.id != null "> and id = #{taskCampusReportingEvent.id}</if>
- <if test="taskCampusReportingEvent.taskId != null "> and task_id = #{taskCampusReportingEvent.taskId}</if>
- <if test="taskCampusReportingEvent.placeId != null "> and place_id = #{taskCampusReportingEvent.placeId}</if>
- <if test="taskCampusReportingEvent.checkTime != null "> and check_time = #{taskCampusReportingEvent.checkTime}</if>
- <if test="taskCampusReportingEvent.checkUserId != null "> and check_user_id = #{taskCampusReportingEvent.checkUserId}</if>
- <if test="taskCampusReportingEvent.checkUserName != null and taskCampusReportingEvent.checkUserName != ''"> and check_user_name = #{taskCampusReportingEvent.checkUserName}</if>
- <if test="taskCampusReportingEvent.checkTelephone != null and taskCampusReportingEvent.checkTelephone != ''"> and check_telephone = #{taskCampusReportingEvent.checkTelephone}</if>
- <if test="taskCampusReportingEvent.location != null and taskCampusReportingEvent.location != ''"> and location = #{taskCampusReportingEvent.location}</if>
- <if test="taskCampusReportingEvent.scStatus != null and taskCampusReportingEvent.scStatus != ''"> and sc_status = #{taskCampusReportingEvent.scStatus}</if>
- <if test="taskCampusReportingEvent.scImageUrls != null and taskCampusReportingEvent.scImageUrls != ''"> and sc_image_urls = #{taskCampusReportingEvent.scImageUrls}</if>
- <if test="taskCampusReportingEvent.uanImageUrls != null and taskCampusReportingEvent.uanImageUrls != ''"> and uan_image_urls = #{taskCampusReportingEvent.uanImageUrls}</if>
- <if test="taskCampusReportingEvent.confirmTime != null "> and confirm_time = #{taskCampusReportingEvent.confirmTime}</if>
- <if test="taskCampusReportingEvent.confirmUserId != null "> and confirm_user_id = #{taskCampusReportingEvent.confirmUserId}</if>
- <if test="taskCampusReportingEvent.confirmUserName != null and taskCampusReportingEvent.confirmUserName != ''"> and confirm_user_name = #{taskCampusReportingEvent.confirmUserName}</if>
- <if test="taskCampusReportingEvent.confirmNotion != null and taskCampusReportingEvent.confirmNotion != ''"> and confirm_notion = #{taskCampusReportingEvent.confirmNotion}</if>
- <if test="taskCampusReportingEvent.confirmFlag != null and taskCampusReportingEvent.confirmFlag != ''"> and confirm_flag = #{taskCampusReportingEvent.confirmFlag}</if>
- <if test="taskCampusReportingEvent.campusName != null and taskCampusReportingEvent.campusName != ''"> and campus_name = #{taskCampusReportingEvent.campusName}</if>
- <if test="taskCampusReportingEvent.fourOne != null and taskCampusReportingEvent.fourOne != ''"> and four_one = #{taskCampusReportingEvent.fourOne}</if>
- <if test="taskCampusReportingEvent.fireFacsNums != null "> and fire_facs_nums = #{taskCampusReportingEvent.fireFacsNums}</if>
- <if test="taskCampusReportingEvent.fireFacsStatus != null and taskCampusReportingEvent.fireFacsStatus != ''"> and fire_facs_status = #{taskCampusReportingEvent.fireFacsStatus}</if>
- <if test="taskCampusReportingEvent.fireFacsImageUrls != null and taskCampusReportingEvent.fireFacsImageUrls != ''"> and fire_facs_image_urls = #{taskCampusReportingEvent.fireFacsImageUrls}</if>
- <if test="taskCampusReportingEvent.fireFacsType != null and taskCampusReportingEvent.fireFacsType != ''"> and fire_facs_type = #{taskCampusReportingEvent.fireFacsType}</if>
- <if test="taskCampusReportingEvent.patrolImageUrls != null and taskCampusReportingEvent.patrolImageUrls != ''"> and patrol_image_urls = #{taskCampusReportingEvent.patrolImageUrls}</if>
- <if test="taskCampusReportingEvent.antiCollision != null and taskCampusReportingEvent.antiCollision != ''"> and anti_collision = #{taskCampusReportingEvent.antiCollision}</if>
- <if test="taskCampusReportingEvent.antiCollisionImageUrls != null and taskCampusReportingEvent.antiCollisionImageUrls != ''"> and anti_collision_image_urls = #{taskCampusReportingEvent.antiCollisionImageUrls}</if>
- <if test="taskCampusReportingEvent.fullSoNums != null "> and full_so_nums = #{taskCampusReportingEvent.fullSoNums}</if>
- <if test="taskCampusReportingEvent.partSoNums != null "> and part_so_nums = #{taskCampusReportingEvent.partSoNums}</if>
- <if test="taskCampusReportingEvent.monitorNums != null "> and monitor_nums = #{taskCampusReportingEvent.monitorNums}</if>
- <if test="taskCampusReportingEvent.monitorOver != null and taskCampusReportingEvent.monitorOver != ''"> and monitor_over = #{taskCampusReportingEvent.monitorOver}</if>
- <if test="taskCampusReportingEvent.highAltitudeMonitor != null and taskCampusReportingEvent.highAltitudeMonitor != ''"> and high_altitude_monitor = #{taskCampusReportingEvent.highAltitudeMonitor}</if>
- <if test="taskCampusReportingEvent.haImageUrls != null and taskCampusReportingEvent.haImageUrls != ''"> and ha_image_urls = #{taskCampusReportingEvent.haImageUrls}</if>
- <if test="taskCampusReportingEvent.foImageUrls != null and taskCampusReportingEvent.foImageUrls != ''"> and fo_image_urls = #{taskCampusReportingEvent.foImageUrls}</if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskHotelReportingMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskHotelReportingMapper.java
deleted file mode 100644
index eafa892..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskHotelReportingMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import org.springblade.modules.task.vo.TaskHotelReportingVO;
-
-import java.util.List;
-
-/**
- * 旅馆安全自查任务 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface TaskHotelReportingMapper extends BaseMapper<TaskHotelReportingEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskHotelReporting
- * @return
- */
- List<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage page, TaskHotelReportingVO taskHotelReporting);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskHotelReportingMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskHotelReportingMapper.xml
deleted file mode 100644
index c65971e..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskHotelReportingMapper.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskHotelReportingMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskHotelReportingResultMap" type="org.springblade.modules.task.entity.TaskHotelReportingEntity">
- <result column="id" property="id"/>
- <result column="task_id" property="taskId"/>
- <result column="hotel_name" property="hotelName"/>
- <result column="place_id" property="placeId"/>
- <result column="check_time" property="checkTime"/>
- <result column="check_user_id" property="checkUserId"/>
- <result column="check_user_name" property="checkUserName"/>
- <result column="check_telephone" property="checkTelephone"/>
- <result column="location" property="location"/>
- <result column="fire_nums" property="fireNums"/>
- <result column="fire_status" property="fireStatus"/>
- <result column="fire_image_urls" property="fireImageUrls"/>
- <result column="sc_status" property="scStatus"/>
- <result column="sc_image_urls" property="scImageUrls"/>
- <result column="pf_flag" property="pfFlag"/>
- <result column="pf_name" property="pfName"/>
- <result column="pf_image_urls" property="pfImageUrls"/>
- <result column="five_must" property="fiveMust"/>
- <result column="uan_image_urls" property="uanImageUrls"/>
- <result column="real_name" property="realName"/>
- <result column="confirm_time" property="confirmTime"/>
- <result column="confirm_user_id" property="confirmUserId"/>
- <result column="confirm_user_name" property="confirmUserName"/>
- <result column="sc_flag" property="scFlag"/>
- <result column="confirm_notion" property="confirmNotion"/>
- <result column="confirm_flag" property="confirmFlag"/>
- <result column="event_type" property="eventType"/>
- </resultMap>
-
-
- <select id="selectTaskHotelReportingPage" resultMap="taskHotelReportingResultMap">
- select id,
- task_id,
- hotel_name,
- place_id,
- check_time,
- check_user_id,
- check_user_name,
- check_telephone,
- location,
- fire_nums,
- fire_status,
- fire_image_urls,
- sc_status,
- sc_image_urls,
- pf_flag,
- pf_name,
- pf_image_urls,
- five_must,
- uan_image_urls,
- real_name,
- confirm_time,
- confirm_user_id,
- confirm_user_name,
- sc_flag,
- confirm_notion,
- confirm_flag,
- is_deleted,
- create_time,
- update_time,
- create_user,
- update_user,
- event_type
- from jczz_task_hotel_reporting where is_deleted = 0
- <if test="taskHotelReporting.checkUserId != null and taskHotelReporting.checkUserId != ''">
- AND check_user_id = #{taskHotelReporting.checkUserId}
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
deleted file mode 100644
index feb1566..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import org.springblade.modules.task.excel.TaskLabelReportingEventExcel;
-import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 打金店报事 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface TaskLabelReportingEventMapper extends BaseMapper<TaskLabelReportingEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskLabelReportingEvent
- * @return
- */
- List<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage page,
- @Param("taskLabelReportingEvent") TaskLabelReportingEventVO taskLabelReportingEvent,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 查询打金店报事
- *
- * @param id 打金店报事ID
- * @return 打金店报事
- */
- public TaskLabelReportingEventDTO selectTaskLabelReportingEventById(Long id);
-
- /**
- * 查询打金店报事列表
- *
- * @param taskLabelReportingEventDTO 打金店报事
- * @return 打金店报事集合
- */
- public List<TaskLabelReportingEventDTO> selectTaskLabelReportingEventList(TaskLabelReportingEventDTO taskLabelReportingEventDTO);
-
- /**
- * 导出二手交易信息
- *
- * @param taskLabelReportingEvent
- * @param regionChildCodesList
- * @param isAdministrator
- * @param gridCodeList
- * @return
- */
- List<TaskLabelReportingEventExcel> exportTaskLabelReportingEventList(@Param("taskLabelReportingEvent") TaskLabelReportingEventVO taskLabelReportingEvent,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
- /**
- * 二手交易报事 自定义详情
- * @param taskLabelReportingEvent
- * @return
- */
- TaskLabelReportingEventVO getDetail(@Param("taskLabelReportingEvent") TaskLabelReportingEventVO taskLabelReportingEvent);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
deleted file mode 100644
index 51bc0ad..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
+++ /dev/null
@@ -1,401 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskLabelReportingEventMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskLabelReportingEventResultMap" type="org.springblade.modules.task.entity.TaskLabelReportingEventEntity">
- <result property="id" column="id" />
- <result property="taskId" column="task_id" />
- <result property="placeId" column="place_id" />
- <result property="districtName" column="district_name" />
- <result property="happenTime" column="happen_time" />
- <result property="userId" column="user_id" />
- <result property="owner" column="owner" />
- <result property="phoneNumber" column="phone_number" />
- <result property="imageUrls" column="image_urls" />
- <result property="localtion" column="localtion" />
- <result property="eventType" column="event_type" />
- <result property="confirmFlag" column="confirm_flag" />
- <result property="confirmUserId" column="confirm_user_id" />
- <result property="confirmTime" column="confirm_time" />
- <result property="confirmNotion" column="confirm_notion" />
- <result property="transactionObjectTel" column="transaction_object_tel" />
- <result property="transactionMoney" column="transaction_money" />
- <result property="goodsNums" column="goods_nums" />
- <result property="goodsImageUrls" column="goods_image_urls" />
- <result property="transactionObject" column="transaction_object" />
- <result property="transactionProcess" column="transaction_process" />
- <result property="labelName" column="label_name" />
- <result property="source" column="source" />
- <result property="createTime" column="create_time" />
- <result property="createUser" column="create_user" />
- <result property="updateTime" column="update_time" />
- <result property="updateUser" column="update_user" />
- <result property="isDeleted" column="is_deleted" />
- <result property="idCard" column="id_card" />
- <result property="receiptUrls" column="receipt_urls" />
- </resultMap>
-
- <!--二手交易自定义分页查询-->
- <select id="selectTaskLabelReportingEventPage" resultType="org.springblade.modules.task.vo.TaskLabelReportingEventVO">
- select
- jtlre.*,
- jp.place_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type ,
- jp.front_type ,
- jp.location,
- br.town_name streetName,
- br.village_name communityName
- from
- jczz_task_label_reporting_event jtlre
- LEFT JOIN jczz_place jp ON jtlre.place_id=jp.id and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jtlre.is_deleted = 0
- <if test="taskLabelReportingEvent.userId != null and taskLabelReportingEvent.userId != ''">
- AND jtlre.user_id = #{taskLabelReportingEvent.userId}
- </if>
-
- <if test="taskLabelReportingEvent.houseCode != null and taskLabelReportingEvent.houseCode != ''">
- and jp.house_code = #{taskLabelReportingEvent.houseCode}
- </if>
-
- <if test="taskLabelReportingEvent.eventType != null and taskLabelReportingEvent.eventType != ''">
- AND jtlre.event_type = #{taskLabelReportingEvent.eventType}
- </if>
- <if test="taskLabelReportingEvent.transactionObject != null and taskLabelReportingEvent.transactionObject != ''">
- AND jtlre.transaction_object like concat('%',#{taskLabelReportingEvent.transactionObject},'%')
- </if>
- <if test="taskLabelReportingEvent.transactionObjectTel != null and taskLabelReportingEvent.transactionObjectTel != ''">
- AND jtlre.transaction_object_tel like concat('%',#{taskLabelReportingEvent.transactionObjectTel},'%')
- </if>
- <if test="taskLabelReportingEvent.idCard != null and taskLabelReportingEvent.idCard != ''">
- AND jtlre.id_card like concat('%',#{taskLabelReportingEvent.idCard},'%')
- </if>
- <if test="taskLabelReportingEvent.frontType != null ">
- AND jp.front_type = #{taskLabelReportingEvent.frontType}
- </if>
- <if test="taskLabelReportingEvent.placeName != null and taskLabelReportingEvent.placeName != ''">
- AND jp.place_name like concat('%',#{taskLabelReportingEvent.placeName},'%')
- </if>
- <if test="taskLabelReportingEvent.principal != null and taskLabelReportingEvent.principal != ''">
- AND jp.principal like concat('%',#{taskLabelReportingEvent.principal},'%')
- </if>
- <if test="taskLabelReportingEvent.principalPhone != null and taskLabelReportingEvent.principalPhone != ''">
- AND jp.principal_phone like concat('%',#{taskLabelReportingEvent.principalPhone},'%')
- </if>
- <if test="taskLabelReportingEvent.roleName != null and taskLabelReportingEvent.roleName != ''">
- <if test="taskLabelReportingEvent.roleName=='wgy'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jp.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- <if test="taskLabelReportingEvent.roleName=='mj'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or br.village_code in ('')
- )
- </otherwise>
- </choose>
- </if>
- order by jtlre.create_time desc,jtlre.id desc
- </select>
-
-
- <resultMap type="org.springblade.modules.task.dto.TaskLabelReportingEventDTO" id="TaskLabelReportingEventDTOResult">
- <result property="id" column="id" />
- <result property="taskId" column="task_id" />
- <result property="placeId" column="place_id" />
- <result property="districtName" column="district_name" />
- <result property="happenTime" column="happen_time" />
- <result property="userId" column="user_id" />
- <result property="owner" column="owner" />
- <result property="phoneNumber" column="phone_number" />
- <result property="imageUrls" column="image_urls" />
- <result property="localtion" column="localtion" />
- <result property="eventType" column="event_type" />
- <result property="confirmFlag" column="confirm_flag" />
- <result property="confirmUserId" column="confirm_user_id" />
- <result property="confirmTime" column="confirm_time" />
- <result property="confirmNotion" column="confirm_notion" />
- <result property="transactionObjectTel" column="transaction_object_tel" />
- <result property="transactionMoney" column="transaction_money" />
- <result property="goodsNums" column="goods_nums" />
- <result property="goodsImageUrls" column="goods_image_urls" />
- <result property="transactionObject" column="transaction_object" />
- <result property="transactionProcess" column="transaction_process" />
- <result property="labelName" column="label_name" />
- <result property="source" column="source" />
- <result property="createTime" column="create_time" />
- <result property="createUser" column="create_user" />
- <result property="updateTime" column="update_time" />
- <result property="updateUser" column="update_user" />
- <result property="isDeleted" column="is_deleted" />
- <result property="idCard" column="id_card" />
- <result property="receiptUrls" column="receipt_urls" />
- </resultMap>
-
- <sql id="selectTaskLabelReportingEvent">
- select
- id,
- task_id,
- place_id,
- district_name,
- happen_time,
- user_id,
- owner,
- phone_number,
- image_urls,
- localtion,
- event_type,
- confirm_flag,
- confirm_user_id,
- confirm_time,
- confirm_notion,
- transaction_object_tel,
- transaction_money,
- goods_nums,
- goods_image_urls,
- transaction_object,
- transaction_process,
- label_name,
- source,
- create_time,
- create_user,
- update_time,
- update_user,
- is_deleted,
- id_card,
- receipt_urls
- from
- jczz_task_label_reporting_event
- </sql>
-
- <select id="selectTaskLabelReportingEventById" parameterType="long" resultMap="TaskLabelReportingEventDTOResult">
- <include refid="selectTaskLabelReportingEvent"/>
- where
- id = #{id}
- </select>
-
- <select id="selectTaskLabelReportingEventList" parameterType="org.springblade.modules.task.dto.TaskLabelReportingEventDTO" resultMap="TaskLabelReportingEventDTOResult">
- <include refid="selectTaskLabelReportingEvent"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="taskId != null "> and task_id = #{taskId}</if>
- <if test="placeId != null "> and place_id = #{placeId}</if>
- <if test="districtName != null and districtName != ''"> and district_name = #{districtName}</if>
- <if test="happenTime != null "> and happen_time = #{happenTime}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="owner != null and owner != ''"> and owner = #{owner}</if>
- <if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
- <if test="imageUrls != null and imageUrls != ''"> and image_urls = #{imageUrls}</if>
- <if test="localtion != null and localtion != ''"> and localtion = #{localtion}</if>
- <if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if>
- <if test="confirmFlag != null and confirmFlag != ''"> and confirm_flag = #{confirmFlag}</if>
- <if test="confirmUserId != null "> and confirm_user_id = #{confirmUserId}</if>
- <if test="confirmTime != null "> and confirm_time = #{confirmTime}</if>
- <if test="confirmNotion != null and confirmNotion != ''"> and confirm_notion = #{confirmNotion}</if>
- <if test="transactionObjectTel != null and transactionObjectTel != ''"> and transaction_object_tel = #{transactionObjectTel}</if>
- <if test="transactionMoney != null "> and transaction_money = #{transactionMoney}</if>
- <if test="goodsNums != null "> and goods_nums = #{goodsNums}</if>
- <if test="goodsImageUrls != null and goodsImageUrls != ''"> and goods_image_urls = #{goodsImageUrls}</if>
- <if test="transactionObject != null and transactionObject != ''"> and transaction_object = #{transactionObject}</if>
- <if test="transactionProcess != null and transactionProcess != ''"> and transaction_process = #{transactionProcess}</if>
- <if test="labelName != null and labelName != ''"> and label_name = #{labelName}</if>
- <if test="source != null "> and source = #{source}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="createUser != null "> and create_user = #{createUser}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="updateUser != null "> and update_user = #{updateUser}</if>
- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
- <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
- <if test="receiptUrls != null and receiptUrls != ''"> and receipt_urls = #{receiptUrls}</if>
- </where>
- </select>
-
- <!--二手交易自定义分页查询-->
- <select id="exportTaskLabelReportingEventList" resultType="org.springblade.modules.task.excel.TaskLabelReportingEventExcel">
- select
- jtlre.id,
- jtlre.transaction_object,
- jtlre.transaction_object_tel,
- jtlre.id_card,
- jtlre.goods_nums,
- jtlre.transaction_money,
- jtlre.transaction_process,
- case when jtlre.confirm_flag=1 then '待审核'
- when jtlre.confirm_flag=2 then '审核通过'
- when jtlre.confirm_flag=3 then '审核不通过'
- else '待完成' end as confirm_flag,
- jtlre.confirm_notion,
- jtlre.create_time,
- jp.place_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type ,
- jp.front_type ,
- jp.location,
- br.town_name streetName,
- br.village_name communityName
- from
- jczz_task_label_reporting_event jtlre
- LEFT JOIN jczz_place jp ON jtlre.place_id=jp.id and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jpag.community_code
- where jtlre.is_deleted = 0
- <if test="taskLabelReportingEvent.userId != null and taskLabelReportingEvent.userId != ''">
- AND jtlre.user_id = #{taskLabelReportingEvent.userId}
- </if>
- <if test="taskLabelReportingEvent.eventType != null and taskLabelReportingEvent.eventType != ''">
- AND jtlre.event_type = #{taskLabelReportingEvent.eventType}
- </if>
- <if test="taskLabelReportingEvent.transactionObject != null and taskLabelReportingEvent.transactionObject != ''">
- AND jtlre.transaction_object like concat('%',#{taskLabelReportingEvent.transactionObject},'%')
- </if>
- <if test="taskLabelReportingEvent.transactionObjectTel != null and taskLabelReportingEvent.transactionObjectTel != ''">
- AND jtlre.transaction_object_tel like concat('%',#{taskLabelReportingEvent.transactionObjectTel},'%')
- </if>
- <if test="taskLabelReportingEvent.idCard != null and taskLabelReportingEvent.idCard != ''">
- AND jtlre.id_card like concat('%',#{taskLabelReportingEvent.idCard},'%')
- </if>
- <if test="taskLabelReportingEvent.frontType != null ">
- AND jp.front_type = #{taskLabelReportingEvent.frontType}
- </if>
- <if test="taskLabelReportingEvent.placeName != null and taskLabelReportingEvent.placeName != ''">
- AND jp.place_name like concat('%',#{taskLabelReportingEvent.placeName},'%')
- </if>
- <if test="taskLabelReportingEvent.principal != null and taskLabelReportingEvent.principal != ''">
- AND jp.principal like concat('%',#{taskLabelReportingEvent.principal},'%')
- </if>
- <if test="taskLabelReportingEvent.principalPhone != null and taskLabelReportingEvent.principalPhone != ''">
- AND jp.principal_phone like concat('%',#{taskLabelReportingEvent.principalPhone},'%')
- </if>
- <if test="taskLabelReportingEvent.roleName != null and taskLabelReportingEvent.roleName != ''">
- <if test="taskLabelReportingEvent.roleName=='wgy'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jp.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- <if test="taskLabelReportingEvent.roleName=='mj'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or br.village_code in ('')
- )
- </otherwise>
- </choose>
- </if>
- order by jtlre.create_time desc,jtlre.id desc
- </select>
-
- <!--二手交易自定义分页查询-->
- <select id="getDetail" resultType="org.springblade.modules.task.vo.TaskLabelReportingEventVO">
- select
- jtlre.*,
- jp.place_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type ,
- jp.front_type ,
- jp.location
- from
- jczz_task_label_reporting_event jtlre
- LEFT JOIN jczz_place jp ON jtlre.place_id=jp.id and jp.is_deleted = 0
- where jtlre.is_deleted = 0
- <if test="taskLabelReportingEvent.id != null">
- AND jtlre.id = #{taskLabelReportingEvent.id}
- </if>
- <if test="taskLabelReportingEvent.taskId != null">
- AND jtlre.task_id = #{taskLabelReportingEvent.taskId}
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.java
deleted file mode 100644
index f0907ef..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.vo.TaskVO;
-
-import java.util.List;
-
-/**
- * 任务表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface TaskMapper extends BaseMapper<TaskEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param task
- * @return
- */
- List<TaskVO> selectTaskPage(IPage page,
- @Param("task") TaskVO task,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
- List<TaskVO> selectTaskPageBy(IPage page,
- @Param("task") TaskVO task,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- Integer selectTaskCount(@Param("task") TaskVO task,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- List<TaskVO> getBailReportingPage(IPage<TaskVO> page,
- @Param("task") TaskVO task,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("isAdministrator") Integer isAdministrator);
-
- /**
- * 查询取保候审任务列表(人房相关)
- * @param page
- * @param task
- * @param regionChildCodesList
- * @param isAdministrator
- * @return
- */
- List<TaskVO> selectTaskPageByPerson(IPage<TaskVO> page,
- @Param("task") TaskVO task,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
deleted file mode 100644
index a9181a9..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
+++ /dev/null
@@ -1,636 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskResultMap" type="org.springblade.modules.task.vo.TaskVO">
- <result column="id" property="id"/>
- <result column="name" property="name"/>
- <result column="type" property="type"/>
- <result column="frequency" property="frequency"/>
- <result column="remark" property="remark"/>
- <result column="create_time" property="createTime"/>
- <result column="create_user" property="createUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="status" property="status"/>
- <result column="source" property="source"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="house_code" property="houseCode"/>
- <result column="report_type" property="reportType"/>
- </resultMap>
-
- <!--查询非取保候审任务列表(场所相关)-->
- <select id="selectTaskPage" resultMap="taskResultMap">
- SELECT
- jp.location AS address_name,
- br.district_code regionCode,
- br.village_code neiCode,
- br.town_code streetCode,
- jp.principal as realName,
- jp.principal_phone as phone,
- jp.nine_type ,
- jp.front_type ,
- jt.id,
- jt.NAME,
- jt.type,
- jt.frequency,
- jt.remark,
- jt.create_time,
- jt.create_user,
- jt.update_time,
- jt.update_user,
- jt.STATUS,
- jt.source,
- jt.is_deleted,
- jt.house_code,
- jt.report_type
- FROM
- jczz_task jt
- LEFT JOIN jczz_place jp ON jt.house_code=jp.house_code and jp.is_deleted = 0
- LEFT JOIN blade_user bu on bu.id = jt.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="isAdministrator==2">
- <choose>
- <when test="task.roleName != null and task.roleName != ''">
- <if test="task.roleName=='wgy'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jh.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jh.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="task.roleName=='mj' and isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and br.village_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or br.village_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- <if test="task.status != null and task.status != null">
- and jt.status = #{task.status}
- </if>
- <if test="task.neiCode != null and task.neiCode != null">
- and jg.community_code = #{task.neiCode}
- </if>
- <if test="task.communityCode != null and task.communityCode != null">
- and jg.community_code = #{task.communityCode}
- </if>
- <if test="task.communityName != null and task.communityName != null">
- and br.name like concat('%', #{task.communityName}, '%')
- </if>
- <if test="task.streetCode != null and task.streetCode != null">
- and br.town_code = #{task.streetCode}
- </if>
- <if test="task.realName != null and task.realName != null">
- and jp.principal like concat('%', #{task.realName}, '%')
- </if>
- <if test="task.phone != null and task.phone != null">
- and bu.phone like concat('%', #{task.phone}, '%')
- </if>
- <if test="task.frequency != null and task.frequency != ''">
- and jt.frequency = #{task.frequency}
- </if>
- <if test="task.name != null and task.name != ''">
- and jt.name like concat('%', #{task.name}, '%')
- </if>
- <if test="task.id != null ">and jt.id = #{task.id}</if>
- <if test="task.type != null ">and jt.type = #{task.type}</if>
- <if test="task.remark != null and task.remark != ''">and jt.remark = #{task.remark}</if>
- <if test="task.createTime != null ">and jt.create_time = #{task.createTime}</if>
- <if test="task.createUser != null ">and jt.create_user = #{task.createUser}</if>
- <if test="task.updateTime != null ">and jt.update_time = #{task.updateTime}</if>
- <if test="task.updateUser != null ">and jt.update_user = #{task.updateUser}</if>
- <if test="task.isDeleted != null ">and jt.is_deleted = #{task.isDeleted}</if>
- <if test="task.houseCode != null and task.houseCode != ''">and jt.house_code = #{task.houseCode}</if>
- <if test="task.startTime != null and task.startTime != '' and task.endTime != null and task.endTime != '' ">
- AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime}
- </if>
- <!-- 场所店铺 -->
- <if test="task.reportType != null">
- and jt.report_type = #{task.reportType}
- </if>
- <if test="task.reportType == null">
- and jt.report_type in ( 5,8)
- </if>
- and jt.is_deleted = 0
- and jt.house_code is not null
- order by jt.create_time desc
- </where>
- </select>
-
- <!--查询取保候审任务列表(人房相关)-->
- <select id="selectTaskPageByPerson" resultType="org.springblade.modules.task.vo.TaskVO">
- SELECT
- jh.address AS address_name,
- jh.district_code AS aoiCode,
- br.district_code regionCode,
- br.village_code neiCode,
- br.town_code streetCode,
- jt.id,
- jt.NAME,
- jt.type,
- jt.frequency,
- jt.remark,
- jt.create_time,
- jt.create_user,
- jt.update_time,
- jt.update_user,
- jt.STATUS,
- jt.source,
- jt.is_deleted,
- jt.house_code,
- jt.report_type,
- jtbre.start_time startTimes,
- jtbre.reach_time,
- jtbre.return_time
- FROM
- jczz_task jt
- LEFT JOIN jczz_house jh ON jt.house_code=jh.house_code and jh.is_deleted = 0
- LEFT JOIN blade_user bu on bu.id = jt.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_task_bail_reporting_event jtbre on jtbre.task_id = jt.id
- <where>
- <if test="isAdministrator==2">
- <choose>
- <when test="task.roleName != null and task.roleName != ''">
- <if test="task.roleName=='wgy'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jh.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jh.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="task.roleName=='mj' and isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and br.village_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or br.village_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- <if test="task.status != null and task.status != null">
- and jt.status = #{task.status}
- </if>
- <if test="task.aoiCode != null and task.aoiCode != null">
- and jh.district_code = #{task.aoiCode}
- </if>
- <if test="task.neiCode != null and task.neiCode != null">
- and jg.community_code = #{task.neiCode}
- </if>
- <if test="task.communityCode != null and task.communityCode != null">
- and jg.community_code = #{task.communityCode}
- </if>
- <if test="task.communityName != null and task.communityName != null">
- and br.name like concat('%', #{task.communityName}, '%')
- </if>
- <if test="task.streetCode != null and task.streetCode != null">
- and br.town_code = #{task.streetCode}
- </if>
- <if test="task.realName != null and task.realName != null">
- and bu.name like concat('%', #{task.realName}, '%')
- </if>
- <if test="task.phone != null and task.phone != null">
- and bu.phone like concat('%', #{task.phone}, '%')
- </if>
- <if test="task.districtName != null and task.districtName != null">
- and jh.district_name like concat('%', #{task.districtName}, '%')
- </if>
- <if test="task.frequency != null and task.frequency != ''">
- and jt.frequency = #{task.frequency}
- </if>
- <if test="task.name != null and task.name != ''">
- and jt.name like concat('%', #{task.name}, '%')
- </if>
- <if test="task.id != null ">and jt.id = #{task.id}</if>
- <if test="task.type != null ">and jt.type = #{task.type}</if>
- <if test="task.remark != null and task.remark != ''">and jt.remark = #{task.remark}</if>
- <if test="task.createTime != null ">and jt.create_time = #{task.createTime}</if>
- <if test="task.createUser != null ">and jt.create_user = #{task.createUser}</if>
- <if test="task.updateTime != null ">and jt.update_time = #{task.updateTime}</if>
- <if test="task.updateUser != null ">and jt.update_user = #{task.updateUser}</if>
- <if test="task.isDeleted != null ">and jt.is_deleted = #{task.isDeleted}</if>
- <if test="task.houseCode != null and task.houseCode != ''">and jt.house_code = #{task.houseCode}</if>
- <if test="task.startTime != null and task.startTime != '' and task.endTime != null and task.endTime != '' ">
- AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime}
- </if>
- <!-- 取保候审 或 报事报修 -->
- <if test="task.reportType != null and task.reportType != 2 ">
- and jt.report_type = #{task.reportType}
- </if>
- and jt.is_deleted = 0
- order by jt.create_time desc
- </where>
- </select>
-
-
- <select id="selectTaskCount" resultType="int" parameterType="org.springblade.modules.task.vo.TaskVO">
- SELECT
- count(1)
- FROM
- jczz_task jt
- LEFT JOIN jczz_place jp ON jt.house_code=jp.house_code and jp.is_deleted = 0
- LEFT JOIN blade_user bu on bu.id = jt.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="task.roleName != null and task.roleName != ''">
- <if test="task.roleName=='wgy'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jp.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- <if test="task.roleName=='mj'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or br.village_code in ('')
- )
- </otherwise>
- </choose>
- </if>
- <if test="task.status != null and task.status != null">
- and jt.status = #{task.status}
- </if>
- <if test="task.neiCode != null and task.neiCode != null">
- and jg.community_code = #{task.neiCode}
- </if>
- <if test="task.communityCode != null and task.communityCode != null">
- and jg.community_code = #{task.communityCode}
- </if>
- <if test="task.communityName != null and task.communityName != null">
- and br.name like concat('%', #{task.communityName}, '%')
- </if>
- <if test="task.streetCode != null and task.streetCode != null">
- and br.town_code = #{task.streetCode}
- </if>
- <if test="task.realName != null and task.realName != null">
- and jp.principal like concat('%', #{task.realName}, '%')
- </if>
- <if test="task.phone != null and task.phone != null">
- and bu.phone like concat('%', #{task.phone}, '%')
- </if>
- <if test="task.frequency != null and task.frequency != ''">
- and jt.frequency = #{task.frequency}
- </if>
- <if test="task.name != null and task.name != ''">
- and jt.name like concat('%', #{task.name}, '%')
- </if>
- <if test="task.id != null ">and jt.id = #{task.id}</if>
- <if test="task.type != null ">and jt.type = #{task.type}</if>
- <if test="task.remark != null and task.remark != ''">and jt.remark = #{task.remark}</if>
- <if test="task.createTime != null ">and jt.create_time = #{task.createTime}</if>
- <if test="task.createUser != null ">and jt.create_user = #{task.createUser}</if>
- <if test="task.updateTime != null ">and jt.update_time = #{task.updateTime}</if>
- <if test="task.updateUser != null ">and jt.update_user = #{task.updateUser}</if>
- <if test="task.isDeleted != null ">and jt.is_deleted = #{task.isDeleted}</if>
- <if test="task.houseCode != null and task.houseCode != ''">and jt.house_code = #{task.houseCode}</if>
- <if test="task.startTime != null and task.startTime != '' and task.endTime != null and task.endTime != '' ">
- AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime}
- </if>
- <!-- 场所店铺 -->
- <if test="task.reportType != null">
- and jt.report_type = #{task.reportType}
- </if>
- <if test="task.reportType == null">
- and jt.report_type in (5,8)
- </if>
- and jt.is_deleted = 0
- </where>
- </select>
-
-
- <select id="selectTaskPageBy" resultType="org.springblade.modules.task.vo.TaskVO">
- SELECT
- jt.* ,
- jda.address_name,
- jtbre.start_time startTimes,
- jtbre.reach_time,
- jtbre.return_time
- FROM
- jczz_task jt
- LEFT JOIN jczz_doorplate_address jda ON jt.house_code = jda.address_code
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- LEFT JOIN jczz_task_bail_reporting_event jtbre on jtbre.task_id = jt.id
- <where>
- <if test="task.reportType != null and task.reportType != '' and task.reportType == 1">
- AND jt.report_type = #{task.reportType}
- </if>
-
- <if test="task.reportType == null or task.reportType == ''">
- AND jt.report_type in (2,3,6,7)
- </if>
- <if test="task.userId != null and task.userId != ''">
- AND jc.res_police_user_id like concat('%',#{task.userId},'%')
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jc.code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jc.code in ('')
- </otherwise>
- </choose>
- </if>
- </where>
- </select>
-
- <!--取保候审人员查询-->
- <select id="getBailReportingPage" resultType="org.springblade.modules.task.vo.TaskVO">
- SELECT
- IFNULL( jda.address_name, jh.house_name ) AS address_name,
- jtbre.apply_name,
- jh.district_code aoiCode,
- jda.region_code,
- jg.community_code neiCode,
- jc.street_code streetCode,
- bu.real_name realName,
- ifnull(bu.phone,jtbre.check_telephone) as phone,
- jt.id,
- jt.NAME,
- jt.type,
- jt.frequency,
- jt.remark,
- jt.create_time,
- jt.create_user,
- jt.update_time,
- jt.update_user,
- jt.STATUS,
- jt.source,
- jt.is_deleted,
- jt.house_code,
- jt.report_type,
- jtbre.start_time startTimes,
- jtbre.reach_time,
- jtbre.return_time
- FROM
- jczz_task jt
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jt.house_code
- LEFT JOIN jczz_house jh ON jt.house_code = jh.house_code and jh.is_deleted = 0
- LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN jczz_community jc on jc.`code`= jg.community_code and jc.is_deleted = 0
- LEFT JOIN jczz_task_bail_reporting_event jtbre on jtbre.task_id = jt.id and jtbre.is_deleted = 0
- LEFT JOIN blade_user bu on bu.id = jtbre.check_user_id and bu.is_deleted = 0
- <where>
- <if test="task.userId != null and task.userId != ''">
- AND jt.house_code IN (
- SELECT
- jgr.house_code
- FROM
- jczz_grid_range jgr
- LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- WHERE
- jg.is_deleted = 0
- <if test="task.communityCode != null and task.communityCode != ''">
- and jg.community_code = #{task.communityCode}
- </if>
- AND jgm.user_id = #{task.userId} )
- </if>
-
- <if test="task.status != null and task.status != null">
- and jt.status = #{task.status}
- </if>
-
- <if test="task.aoiCode != null and task.aoiCode != null">
- and jh.district_code = #{task.aoiCode}
- </if>
-
- <if test="task.neiCode != null and task.neiCode != null">
- and jg.community_code = #{task.neiCode}
- </if>
-
- <if test="task.streetCode != null and task.streetCode != null">
- and jc.street_code = #{task.streetCode}
- </if>
-
- <if test="task.realName != null and task.realName != null">
- and bu.name like concat('%', #{task.realName}, '%')
- </if>
-
- <if test="task.phone != null and task.phone != null">
- and bu.phone like concat('%', #{task.phone}, '%')
- </if>
-
- <if test="task.communityName != null and task.communityName != null">
- and jc.name like concat('%', #{task.communityName}, '%')
- </if>
-
- <if test="task.districtName != null and task.districtName != null">
- and jh.district_name like concat('%', #{task.districtName}, '%')
- </if>
-
- <if test="task.frequency != null and task.frequency != ''">
- and jt.frequency = #{task.frequency}
- </if>
- <if test="task.name != null and task.name != ''">
- and jt.name like concat('%', #{task.name}, '%')
- </if>
- <if test="task.id != null ">and jt.id = #{task.id}</if>
- <if test="task.type != null ">and jt.type = #{task.type}</if>
- <if test="task.remark != null and task.remark != ''">and jt.remark = #{task.remark}</if>
- <if test="task.createTime != null ">and jt.create_time = #{task.createTime}</if>
- <if test="task.createUser != null ">and jt.create_user = #{task.createUser}</if>
- <if test="task.updateTime != null ">and jt.update_time = #{task.updateTime}</if>
- <if test="task.updateUser != null ">and jt.update_user = #{task.updateUser}</if>
- <if test="task.isDeleted != null ">and jt.is_deleted = #{task.isDeleted}</if>
- <if test="task.houseCode != null and task.houseCode != ''">and jt.house_code = #{task.houseCode}</if>
- <if test="task.startTime != null and task.startTime != '' and task.endTime != null and task.endTime != '' ">
- AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime}
- </if>
- <!-- 取保候审 或 报事报修 -->
- <if test="task.reportType != null and task.reportType != 2 ">
- and jt.report_type = #{task.reportType}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="task.roleName != null and task.roleName != ''">
- <if test="task.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="task.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- and jt.is_deleted = 0
- and jt.house_code is not null
- order by jt.create_time desc
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java
deleted file mode 100644
index c5002cd..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.dto.TaskNoFraudReportingDTO;
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import org.springblade.modules.task.excel.TaskNoExplosionExcel;
-import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 无炸上报任务表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-10
- */
-public interface TaskNoFraudReportingMapper extends BaseMapper<TaskNoFraudReportingEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskNoFraudReporting
- * @return
- */
- List<TaskNoFraudReportingVO> selectTaskNoFraudReportingPage(IPage page,
- @Param("place") TaskNoFraudReportingVO taskNoFraudReporting,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 查询无炸上报任务表
- *
- * @param id 无炸上报任务表ID
- * @return 无炸上报任务表
- */
- public TaskNoFraudReportingVO selectTaskNoFraudReportingById(@Param("reporting") TaskNoFraudReportingEntity taskNoFraudReporting);
-
- /**
- * 查询无炸上报任务表列表
- *
- * @param taskNoFraudReportingDTO 无炸上报任务表
- * @return 无炸上报任务表集合
- */
- public List<TaskNoFraudReportingDTO> selectTaskNoFraudReportingList(TaskNoFraudReportingDTO taskNoFraudReportingDTO);
-
- List<TaskNoExplosionExcel> selectTaskNoFraudReporting(@Param("place") TaskNoFraudReportingVO taskNoFraudReporting,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml
deleted file mode 100644
index 89fabae..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml
+++ /dev/null
@@ -1,372 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskNoFraudReportingMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskNoFraudReportingResultMap" type="org.springblade.modules.task.vo.TaskNoFraudReportingVO">
- <result property="id" column="id"/>
- <result property="taskId" column="task_id"/>
- <result property="taskName" column="task_name"/>
- <result property="placeName" column="place_name"/>
- <result property="remark" column="remark"/>
- <result property="updateTime" column="update_time"/>
- <result property="createTime" column="create_time"/>
- <result property="houseCode" column="house_code"/>
- <result property="createUser" column="create_user"/>
- <result property="imageUrls" column="image_urls"/>
- <result property="status" column="status"/>
- <result property="deleteFlag" column="delete_flag"/>
- <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
- autoMapping="true">
- </collection>
- </resultMap>
-
-
- <select id="selectTaskNoFraudReportingPage" resultMap="taskNoFraudReportingResultMap">
- select jtnfr.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.no_explosion_category,
- br.town_name as streetName,
- br.village_name as communityName,
- jpag.pcs_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person from jczz_task_no_fraud_reporting jtnfr
- LEFT JOIN jczz_place jp ON jtnfr.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jtnfr.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="place.id != null ">and jtnfr.id = #{place.id}</if>
- <if test="place.taskId != null ">and jtnfr.task_id = #{place.taskId}</if>
- <if test="place.taskName != null and place.taskName != ''">and jtnfr.task_name = #{place.taskName}</if>
- <if test="place.placeName != null and place.placeName != ''">and jtnfr.place_name = #{place.placeName}</if>
- <if test="place.remark != null and place.remark != ''">and jtnfr.remark = #{place.remark}</if>
- <if test="place.updateTime != null ">and jtnfr.update_time = #{place.updateTime}</if>
- <if test="place.createTime != null ">and jtnfr.create_time = #{place.createTime}</if>
- <if test="place.houseCode != null and place.houseCode != ''">and jtnfr.house_code = #{place.houseCode}</if>
- <if test="place.createUser != null ">and jtnfr.create_user = #{place.createUser}</if>
- <if test="place.imageUrls != null and place.imageUrls != ''">and jtnfr.image_urls = #{place.imageUrls}</if>
- <if test="place.status != null ">and jtnfr.status = #{place.status}</if>
- <if test="place.deleteFlag != null ">and jtnfr.delete_flag = #{place.deleteFlag}</if>
-
- <if test="place.noExplosionCategory != null ">and jp.no_explosion_category = #{place.noExplosionCategory}</if>
-
- <if test="place.placeName != null and place.placeName != ''">
- and jp.place_name like concat('%', #{place.placeName},'%')
- </if>
- <if test="place.principal != null and place.principal != ''">
- and jp.principal like concat('%', #{place.principal},'%')
- </if>
- <if test="place.streetName!=null and place.streetName!=''">
- and br.town_name like concat('%', #{place.streetName},'%')
- </if>
-
- <if test="place.communityName!=null and place.communityName!=''">
- and br.village_name like concat('%', #{place.communityName},'%')
- </if>
- <if test="place.gridName!=null and place.gridName!=''">
- and jg.grid_name like concat('%', #{place.gridName},'%')
- </if>
-
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
-
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- order by jtnfr.create_time desc
- </select>
-
- <select id="selectPatrolRecordList" parameterType="Long"
- resultType="org.springblade.modules.task.vo.TaskPlaceRecordVO">
- select jpr.id,
- jpr.item_id,
- jpr.task_place_self_check_id,
- jpr.state,
- jpr.remark,
- jpr.image_urls,
- jpr.create_user,
- jpr.create_time,
- jpr.is_deleted,
- jpr.rectification_image_urls,
- jpr.rectification_remark,
- jpr.rectification_time,
- jpgi.items_name
- from jczz_task_place_record jpr
- LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id = jpgi.id
- where task_place_self_check_id = #{id}
- and jpr.type = '2'
- </select>
-
- <resultMap type="org.springblade.modules.task.vo.TaskNoFraudReportingVO" id="TaskNoFraudReportingDTOResult">
- <result property="id" column="id"/>
- <result property="taskId" column="task_id"/>
- <result property="taskName" column="task_name"/>
- <result property="placeName" column="place_name"/>
- <result property="remark" column="remark"/>
- <result property="updateTime" column="update_time"/>
- <result property="createTime" column="create_time"/>
- <result property="houseCode" column="house_code"/>
- <result property="createUser" column="create_user"/>
- <result property="imageUrls" column="image_urls"/>
- <result property="status" column="status"/>
- <result property="deleteFlag" column="delete_flag"/>
-
- <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
- autoMapping="true">
- </collection>
- </resultMap>
-
- <sql id="selectTaskNoFraudReporting">
- select id,
- task_id,
- task_name,
- place_name,
- remark,
- update_time,
- create_time,
- house_code,
- create_user,
- image_urls,
- status,
- delete_flag
- from jczz_task_no_fraud_reporting
- </sql>
-
- <select id="selectTaskNoFraudReportingById" parameterType="long" resultMap="TaskNoFraudReportingDTOResult">
- SELECT
- jtnfpr.id,
- jtnfpr.task_id,
- jtnfpr.task_name,
- jtnfpr.place_name,
- jtnfpr.remark,
- jtnfpr.update_time,
- jtnfpr.create_time,
- jtnfpr.house_code,
- jtnfpr.create_user,
- jtnfpr.image_urls,
- jtnfpr.status,
- jtnfpr.delete_flag,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.no_explosion_category,
- jp.principal_phone,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person,
- jt.remark reasonFailure,
- jda.address_name
- FROM
- jczz_task_no_fraud_reporting jtnfpr
- LEFT JOIN jczz_task jt ON jt.id = jtnfpr.task_id
- LEFT JOIN jczz_place jp ON jtnfpr.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jtnfpr.create_user
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtnfpr.house_code
- <where>
- <if test="reporting.id != null ">and jtnfpr.id = #{reporting.id}</if>
- <if test="reporting.taskId != null ">and jtnfpr.task_id = #{reporting.taskId}</if>
- </where>
- </select>
-
- <select id="selectTaskNoFraudReportingList" parameterType="org.springblade.modules.task.vo.TaskNoFraudReportingVO"
- resultMap="TaskNoFraudReportingDTOResult">
- <include refid="selectTaskNoFraudReporting"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="taskId != null ">and task_id = #{taskId}</if>
- <if test="taskName != null and taskName != ''">and task_name = #{taskName}</if>
- <if test="placeName != null and placeName != ''">and place_name = #{placeName}</if>
- <if test="remark != null and remark != ''">and remark = #{remark}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="houseCode != null and houseCode != ''">and house_code = #{houseCode}</if>
- <if test="createUser != null ">and create_user = #{createUser}</if>
- <if test="imageUrls != null and imageUrls != ''">and image_urls = #{imageUrls}</if>
- <if test="status != null ">and status = #{status}</if>
- <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
- </where>
- </select>
-
- <select id="selectTaskNoFraudReporting"
- resultType="org.springblade.modules.task.excel.TaskNoExplosionExcel">
-
- select jtnfr.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.no_explosion_category,
- br.town_name as streetName,
- br.village_name as communityName,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person from jczz_task_no_fraud_reporting jtnfr
- LEFT JOIN jczz_place jp ON jtnfr.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jtnfr.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="place.id != null ">and jtnfr.id = #{place.id}</if>
- <if test="place.taskId != null ">and jtnfr.task_id = #{place.taskId}</if>
- <if test="place.taskName != null and place.taskName != ''">and jtnfr.task_name = #{place.taskName}</if>
- <if test="place.placeName != null and place.placeName != ''">and jtnfr.place_name = #{place.placeName}</if>
- <if test="place.remark != null and place.remark != ''">and jtnfr.remark = #{place.remark}</if>
- <if test="place.updateTime != null ">and jtnfr.update_time = #{place.updateTime}</if>
- <if test="place.createTime != null ">and jtnfr.create_time = #{place.createTime}</if>
- <if test="place.houseCode != null and place.houseCode != ''">and jtnfr.house_code = #{place.houseCode}</if>
- <if test="place.createUser != null ">and jtnfr.create_user = #{createUser}</if>
- <if test="place.imageUrls != null and place.imageUrls != ''">and jtnfr.image_urls = #{place.imageUrls}</if>
- <if test="place.status != null ">and jtnfr.status = #{place.status}</if>
- <if test="place.deleteFlag != null ">and jtnfr.delete_flag = #{place.deleteFlag}</if>
-
- <if test="place.noExplosionCategory != null ">and jp.no_explosion_category = #{place.noExplosionCategory}</if>
-
- <if test="place.placeName != null and place.placeName != ''">
- and jp.place_name like concat('%', #{place.placeName},'%')
- </if>
- <if test="place.principal != null and place.principal != ''">
- and jp.principal like concat('%', #{place.principal},'%')
- </if>
- <if test="place.streetName!=null and place.streetName!=''">
- and br.town_name like concat('%', #{place.streetName},'%')
- </if>
-
- <if test="place.communityName!=null and place.communityName!=''">
- and br.village_name like concat('%', #{place.communityName},'%')
- </if>
- <if test="place.gridName!=null and place.gridName!=''">
- and jg.grid_name like concat('%', #{place.gridName},'%')
- </if>
-
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
-
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- order by jtnfr.create_time desc
-
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.java
deleted file mode 100644
index 456baf4..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.springblade.modules.task.dto.TaskPlaceRecordDTO;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 消防自查详情记录表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-02-04
- */
-public interface TaskPlaceRecordMapper extends BaseMapper<TaskPlaceRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskPlaceRecord
- * @return
- */
- List<TaskPlaceRecordVO> selectTaskPlaceRecordPage(IPage page, TaskPlaceRecordVO taskPlaceRecord);
-
- /**
- * 查询消防自查详情记录表
- *
- * @param id 消防自查详情记录表ID
- * @return 消防自查详情记录表
- */
- public TaskPlaceRecordDTO selectTaskPlaceRecordById(Long id);
-
- /**
- * 查询消防自查详情记录表列表
- *
- * @param taskPlaceRecordDTO 消防自查详情记录表
- * @return 消防自查详情记录表集合
- */
- public List<TaskPlaceRecordDTO> selectTaskPlaceRecordList(TaskPlaceRecordDTO taskPlaceRecordDTO);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.xml
deleted file mode 100644
index 154f00a..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskPlaceRecordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskPlaceRecordResultMap" type="org.springblade.modules.task.entity.TaskPlaceRecordEntity">
- </resultMap>
-
-
- <select id="selectTaskPlaceRecordPage" resultMap="taskPlaceRecordResultMap">
- select * from jczz_task_place_record
- </select>
-
-
- <resultMap type="org.springblade.modules.task.dto.TaskPlaceRecordDTO" id="TaskPlaceRecordDTOResult">
- <result property="id" column="id" />
- <result property="itemId" column="item_id" />
- <result property="taskPlaceSelfCheckId" column="task_place_self_check_id" />
- <result property="state" column="state" />
- <result property="remark" column="remark" />
- <result property="imageUrls" column="image_urls" />
- <result property="createUser" column="create_user" />
- <result property="createTime" column="create_time" />
- <result property="isDeleted" column="is_deleted" />
- <result property="rectificationImageUrls" column="rectification_image_urls" />
- <result property="rectificationRemark" column="rectification_remark" />
- <result property="rectificationTime" column="rectification_time" />
- </resultMap>
-
- <sql id="selectTaskPlaceRecord">
- select
- id,
- item_id,
- task_place_self_check_id,
- state,
- remark,
- image_urls,
- create_user,
- create_time,
- is_deleted,
- rectification_image_urls,
- rectification_remark,
- rectification_time
- from
- jczz_task_place_record
- </sql>
-
- <select id="selectTaskPlaceRecordById" parameterType="long" resultMap="TaskPlaceRecordDTOResult">
- <include refid="selectTaskPlaceRecord"/>
- where
- id = #{id}
- </select>
-
- <select id="selectTaskPlaceRecordList" parameterType="org.springblade.modules.task.dto.TaskPlaceRecordDTO" resultMap="TaskPlaceRecordDTOResult">
- <include refid="selectTaskPlaceRecord"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="itemId != null "> and item_id = #{itemId}</if>
- <if test="taskPlaceSelfCheckId != null "> and task_place_self_check_id = #{taskPlaceSelfCheckId}</if>
- <if test="state != null "> and state = #{state}</if>
- <if test="remark != null and remark != ''"> and remark = #{remark}</if>
- <if test="imageUrls != null and imageUrls != ''"> and image_urls = #{imageUrls}</if>
- <if test="createUser != null "> and create_user = #{createUser}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
- <if test="rectificationImageUrls != null and rectificationImageUrls != ''"> and rectification_image_urls = #{rectificationImageUrls}</if>
- <if test="rectificationRemark != null and rectificationRemark != ''"> and rectification_remark = #{rectificationRemark}</if>
- <if test="rectificationTime != null "> and rectification_time = #{rectificationTime}</if>
- </where>
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.java
deleted file mode 100644
index 3fa919d..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.dto.TaskPlaceRectificationDTO;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import org.springblade.modules.task.excel.TaskPlaceRectificationExcel;
-import org.springblade.modules.task.vo.TaskPlaceRectificationVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.task.vo.TaskPlaceRectificationsVO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 场所整改任务表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-31
- */
-public interface TaskPlaceRectificationMapper extends BaseMapper<TaskPlaceRectificationEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskPlaceRectification
- * @return
- */
- List<TaskPlaceRectificationVO> selectTaskPlaceRectificationPage(IPage page, TaskPlaceRectificationVO taskPlaceRectification);
-
- /**
- * 查询场所整改任务表
- *
- * @param taskId 场所整改任务表ID
- * @return 场所整改任务表
- */
- public TaskPlaceRectificationVO selectTaskPlaceRectificationById(@Param("taskId") Long taskId);
-
- /**
- * 查询场所整改任务表列表
- *
- * @param taskPlaceRectificationDTO 场所整改任务表
- * @return 场所整改任务表集合
- */
- List<TaskPlaceRectificationVO> selectTaskPlaceRectificationList(IPage page,
- @Param("taskPalce") TaskPlaceRectificationDTO taskPlaceRectificationDTO,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("nineTypeList") List<String> nineTypeList);
-
- List<Map<String, Object>> getNineTypeStatistics(String code,
- List<String> regionChildCodesList,
- Integer isAdministrator,
- TaskPlaceRectificationVO taskPlaceRectification);
-
- List<TaskPlaceRectificationExcel> export(@Param("taskPalce") TaskPlaceRectificationsVO taskPlaceRectification,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("nineTypeList") List<String> nineTypeList);
-
- /**
- * 统计消防整改记录
- * @param taskPlaceRectificationDTO
- * @param regionChildCodesList
- * @param isAdministrator
- * @return
- */
- Integer getCount(@Param("taskPalce") TaskPlaceRectificationDTO taskPlaceRectificationDTO,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.xml
deleted file mode 100644
index 661f2b2..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.xml
+++ /dev/null
@@ -1,690 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskPlaceRectificationMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskPlaceRectificationResultMap"
- type="org.springblade.modules.task.entity.TaskPlaceRectificationEntity">
- </resultMap>
-
-
- <select id="selectTaskPlaceRectificationPage" resultMap="taskPlaceRectificationResultMap">
- select * from jczz_task_place_rectification where is_deleted = 0
- </select>
-
- <resultMap type="org.springblade.modules.task.vo.TaskPlaceRectificationVO"
- id="TaskPlaceRectificationDTOResult">
- <result property="id" column="id"/>
- <result property="placeCheckId" column="place_check_id"/>
- <result property="taskId" column="task_id"/>
- <result property="status" column="status"/>
- <result property="taskName" column="task_name"/>
- <result property="placeName" column="place_name"/>
- <result property="remark" column="remark"/>
- <result property="updateTime" column="update_time"/>
- <result property="createTime" column="create_time"/>
- <result property="houseCode" column="house_code"/>
- <result property="rectificationNoticeFlag" column="rectification_notice_flag"/>
- <result property="rectificationEndTime" column="rectification_end_time"/>
- <result property="rectificationCompleteTime" column="rectification_complete_time"/>
- <result property="rectificationFlag" column="rectification_flag"/>
- <result property="punishFlag" column="punish_flag"/>
- <result property="policeStation" column="police_station"/>
- <result property="rectificationNoticeImgUrl" column="rectification_notice_img_url"/>
- <result property="signaturePath" column="signature_path"/>
- <result property="createUser" column="create_user"/>
- <result property="imageUrls" column="image_urls"/>
-
- <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
- select="selectPlacePoiLabelList"
- ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
- autoMapping="true">
- </collection>
-
- <collection property="patrolRecordVOList" column="place_check_id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.patrol.vo.PatrolRecordVO"
- autoMapping="true">
- </collection>
-
-
- </resultMap>
-
- <select id="selectPlacePoiLabelList" parameterType="Long"
- resultType="org.springblade.modules.place.vo.PlacePoiLabelVO">
- SELECT
- jppl.id,
- jppl.place_id,
- jppl.poi_code,
- jppl.type,
- jppl.color,
- jppl.remark,
- jc.category_name labelName
- FROM
- jczz_place_poi_label jppl
- LEFT JOIN jczz_category jc ON jppl.poi_code = jc.category_no
- WHERE
- jppl.type = '3'
- and place_id = #{jpid}
- </select>
-
-
- <select id="selectPatrolRecordList" parameterType="Long"
- resultType="org.springblade.modules.patrol.vo.PatrolRecordVO">
- select
- jpr.id,
- jpr.item_id,
- jpr.place_check_id,
- jpr.state,
- jpr.remark,
- jpr.image_urls,
- jpr.create_user,
- jpr.create_time,
- jpr.is_deleted,
- jpr.rectification_image_urls,
- jpr.rectification_remark,
- jpr.rectification_time,
- jpgi.items_name
- from
- jczz_patrol_record jpr
- LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id= jpgi.id
- where place_check_id = #{id}
- </select>
-
- <sql id="selectTaskPlaceRectification">
- select
- id,
- place_check_id,
- task_id,
- status,
- task_name,
- place_name,
- remark,
- update_time,
- create_time,
- house_code,
- rectification_notice_flag,
- rectification_end_time,
- rectification_complete_time,
- rectification_flag,
- punish_flag,
- police_station,
- rectification_notice_img_url,
- signature_path,
- create_user,
- image_urls
- from
- jczz_task_place_rectification
- </sql>
-
- <select id="selectTaskPlaceRectificationById" parameterType="long" resultMap="TaskPlaceRectificationDTOResult">
- SELECT
- jtpr.id,
- jtpr.place_check_id,
- jtpr.task_id,
- jtpr.STATUS,
- jtpr.task_name,
- jtpr.remark,
- jtpr.update_time,
- jtpr.create_time,
- jtpr.house_code,
- jtpr.rectification_notice_flag,
- jtpr.rectification_end_time,
- jtpr.rectification_complete_time,
- jtpr.rectification_flag,
- jtpr.punish_flag,
- jtpr.police_station,
- jtpr.rectification_notice_img_url,
- jtpr.signature_path,
- jtpr.create_user,
- jtpr.image_urls,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person,
- jt.remark reasonFailure,
- jda.address_name
- FROM
- jczz_task_place_rectification jtpr
- LEFT JOIN jczz_task jt on jt.id = jtpr.task_id
- LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
- LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpr.house_code
- WHERE jtpr.task_id = #{taskId}
- </select>
-
- <select id="selectTaskPlaceRectificationList"
- parameterType="org.springblade.modules.task.vo.TaskPlaceRectificationVO"
- resultMap="TaskPlaceRectificationDTOResult">
- SELECT
- jtpr.id,
- jtpr.place_check_id,
- jtpr.task_id,
- jtpr.STATUS,
- jtpr.task_name,
- jtpr.remark,
- jtpr.update_time,
- jtpr.create_time,
- jtpr.house_code,
- jtpr.rectification_notice_flag,
- jtpr.rectification_end_time,
- jtpr.rectification_complete_time,
- jtpr.rectification_flag,
- jtpr.punish_flag,
- jtpr.police_station,
- jtpr.rectification_notice_img_url,
- jtpr.signature_path,
- jtpr.create_user,
- jtpr.image_urls,
- jpag.pcs_name deptName,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person,
- jp.location as address_name
- FROM
- jczz_task_place_rectification jtpr
- LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jtpr.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jpag.community_code
- <where>
- <if test="taskPalce.id != null ">and jtpr.id = #{taskPalce.id}</if>
- <if test="taskPalce.placeCheckId != null ">and jtpr.place_check_id = #{taskPalce.placeCheckId}</if>
- <if test="taskPalce.taskId != null ">and jtpr.task_id = #{taskPalce.taskId}</if>
- <if test="taskPalce.status != null and taskPalce.status != 2 ">and jtpr.status = #{taskPalce.status}</if>
-
- <if test="taskPalce.status != null and taskPalce.status == 2 ">and jtpr.status in (2,3)</if>
-
- <if test="taskPalce.taskName != null and taskPalce.taskName != ''">and jtpr.task_name =
- #{taskPalce.taskName}
- </if>
-
- <if test="taskPalce.startTime!=null and taskPalce.startTime!=''">
- and jtpr.create_time>=#{taskPalce.startTime}
- </if>
- <if test="taskPalce.endTime!=null and taskPalce.endTime!=''">
- and jtpr.create_time<=#{taskPalce.endTime}
- </if>
-
- <if test="taskPalce.placeName!=null and taskPalce.placeName!=''">
- and jp.place_name like concat('%',#{taskPalce.placeName},'%')
- </if>
-
- <if test="taskPalce.addressName!=null and taskPalce.addressName!=''">
- and jp.location like concat('%',#{taskPalce.addressName},'%')
- </if>
-
- <if test="taskPalce.deptName!=null and taskPalce.deptName!=''">
- and jpag.pcs_name like concat('%',#{taskPalce.deptName},'%')
- </if>
-
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
-
- <if test="taskPalce.punishFlag!=null">
- and jp.punish_flag = #{taskPalce.punishFlag}
- </if>
-
- <if test="taskPalce.remark != null and taskPalce.remark != ''">and jtpr.remark = #{taskPalce.remark}</if>
- <if test="taskPalce.updateTime != null ">and jtpr.update_time = #{taskPalce.updateTime}</if>
- <if test="taskPalce.createTime != null ">and jtpr.create_time = #{taskPalce.createTime}</if>
- <if test="taskPalce.houseCode != null and taskPalce.houseCode != ''">and jtpr.house_code =
- #{taskPalce.houseCode}
- </if>
- <if test="taskPalce.rectificationNoticeFlag != null ">and jtpr.rectification_notice_flag =
- #{taskPalce.rectificationNoticeFlag}
- </if>
- <if test="taskPalce.rectificationEndTime != null ">and jtpr.rectification_end_time =
- #{taskPalce.rectificationEndTime}
- </if>
- <if test="taskPalce.rectificationCompleteTime != null ">and jtpr.rectification_complete_time =
- #{taskPalce.rectificationCompleteTime}
- </if>
- <if test="taskPalce.rectificationFlag != null ">and jtpr.rectification_flag =
- #{taskPalce.rectificationFlag}
- </if>
- <if test="taskPalce.punishFlag != null ">and jtpr.punish_flag = #{taskPalce.punishFlag}</if>
- <if test="taskPalce.policeStation != null and taskPalce.policeStation != ''">and jtpr.police_station =
- #{taskPalce.policeStation}
- </if>
- <if test="taskPalce.rectificationNoticeImgUrl != null and taskPalce.rectificationNoticeImgUrl != ''">and
- jtpr.rectification_notice_img_url = #{taskPalce.rectificationNoticeImgUrl}
- </if>
- <if test="taskPalce.signaturePath != null and taskPalce.signaturePath != ''">and jtpr.signature_path =
- #{taskPalce.signaturePath}
- </if>
- <if test="taskPalce.createUser != null ">and jtpr.create_user = #{taskPalce.createUser}</if>
- <if test="taskPalce.imageUrls != null and taskPalce.imageUrls != ''">and jtpr.image_urls =
- #{taskPalce.imageUrls}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="taskPalce.roleName != null and taskPalce.roleName != ''">
- <if test="taskPalce.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="taskPalce.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- order by jtpr.create_time desc
- </select>
-
-
- <select id="getNineTypeStatistics1" resultType="list">
- SELECT
- bd.dict_key,
- bd.dict_value,
- (
- SELECT
- count( 1 )
- FROM
- jczz_place jp
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- <where>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- </choose>
- </if>
- and jp.nine_type = bd.dict_key
- </where>
- ) number
- FROM
- blade_dict_biz bd
- WHERE
- bd.`code` = 'nineType'
- AND bd.is_sealed = 0
- AND bd.dict_key > 0
-
-
- </select>
- <select id="getNineTypeStatistics" resultType="java.util.Map">
-
- SELECT
- bd.dict_key,
- bd.dict_value,
- (
- SELECT
- count(jpr.id)
- FROM
- jczz_patrol_record jpr
- LEFT JOIN jczz_place_check jpc ON jpr.place_check_id = jpc.id
- LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.CODE = jg.community_code
- <where>
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- </choose>
- </if>
- and jpr.state = '0'
- and jp.nine_type = bd.dict_key
- and br.town_code =#{code}
- <if test="taskPlaceRectification.startTime!=null and taskPlaceRectification.startTime!=''">
- and jpc.create_time>=#{taskPlaceRectification.startTime}
- </if>
- <if test="taskPlaceRectification.endTime!=null and taskPlaceRectification.endTime!=''">
- and jpc.create_time<=#{taskPlaceRectification.endTime}
- </if>
- </where>
- ) number
- FROM
- blade_dict_biz bd
- WHERE
- bd.code = 'nineType'
- AND bd.is_sealed = 0
- AND bd.dict_key > 0
- order by bd.sort asc
-
- </select>
-
- <resultMap type="org.springblade.modules.task.excel.TaskPlaceRectificationExcel"
- id="TaskPlaceRectificationExcelResult">
- <result property="placeName" column="place_name"/>
- <result property="createTime" column="create_time"/>
- <result property="rectificationNoticeFlag" column="rectification_notice_flag"/>
- <result property="rectificationEndTime" column="rectification_end_time"/>
- <result property="rectificationFlag" column="rectification_flag"/>
-
- <collection property="patrolRecordVOList" column="place_check_id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.patrol.vo.PatrolRecordVO"
- autoMapping="true">
- </collection>
- </resultMap>
-
- <select id="export"
- resultMap="TaskPlaceRectificationExcelResult">
- SELECT
- jtpr.id,
- jtpr.place_check_id,
- jtpr.task_id,
- jtpr.STATUS,
- jtpr.task_name,
- jtpr.remark,
- jtpr.update_time,
- jtpr.create_time,
- jtpr.house_code,
- jtpr.rectification_notice_flag,
- jtpr.rectification_end_time,
- jtpr.rectification_complete_time,
- jtpr.rectification_flag,
- jtpr.punish_flag,
- jtpr.police_station,
- jtpr.rectification_notice_img_url,
- jtpr.signature_path,
- jtpr.create_user,
- jtpr.image_urls,
- jpag.pcs_name deptName,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person,
- jp.location as address_name
- FROM
- jczz_task_place_rectification jtpr
- LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code
- <where>
- <if test="taskPalce.id != null ">and jtpr.id = #{taskPalce.id}</if>
- <if test="taskPalce.placeCheckId != null ">and jtpr.place_check_id = #{taskPalce.placeCheckId}</if>
- <if test="taskPalce.taskId != null ">and jtpr.task_id = #{taskPalce.taskId}</if>
- <if test="taskPalce.status != null ">and jtpr.status = #{taskPalce.status}</if>
- <if test="taskPalce.taskName != null and taskPalce.taskName != ''">and jtpr.task_name =
- #{taskPalce.taskName}
- </if>
-
- <if test="taskPalce.startTime!=null and taskPalce.startTime!=''">
- and jtpr.create_time>=#{taskPalce.startTime}
- </if>
- <if test="taskPalce.endTime!=null and taskPalce.endTime!=''">
- and jtpr.create_time<=#{taskPalce.endTime}
- </if>
-
- <if test="taskPalce.placeName!=null and taskPalce.placeName!=''">
- and jp.place_name like concat('%',#{taskPalce.placeName},'%')
- </if>
-
- <if test="taskPalce.addressName!=null and taskPalce.addressName!=''">
- and jp.location like concat('%',#{taskPalce.addressName},'%')
- </if>
-
- <if test="taskPalce.deptName!=null and taskPalce.deptName!=''">
- and jpag.pcs_name like concat('%',#{taskPalce.deptName},'%')
- </if>
-
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
-
- <if test="taskPalce.punishFlag!=null">
- and jp.punish_flag = #{taskPalce.punishFlag}
- </if>
-
- <if test="taskPalce.remark != null and taskPalce.remark != ''">and jtpr.remark = #{taskPalce.remark}</if>
- <if test="taskPalce.updateTime != null ">and jtpr.update_time = #{taskPalce.updateTime}</if>
- <if test="taskPalce.createTime != null ">and jtpr.create_time = #{taskPalce.createTime}</if>
- <if test="taskPalce.houseCode != null and taskPalce.houseCode != ''">and jtpr.house_code =
- #{taskPalce.houseCode}
- </if>
- <if test="taskPalce.rectificationNoticeFlag != null ">and jtpr.rectification_notice_flag =
- #{taskPalce.rectificationNoticeFlag}
- </if>
- <if test="taskPalce.rectificationEndTime != null ">and jtpr.rectification_end_time =
- #{taskPalce.rectificationEndTime}
- </if>
- <if test="taskPalce.rectificationCompleteTime != null ">and jtpr.rectification_complete_time =
- #{taskPalce.rectificationCompleteTime}
- </if>
- <if test="taskPalce.rectificationFlag != null ">and jtpr.rectification_flag =
- #{taskPalce.rectificationFlag}
- </if>
- <if test="taskPalce.punishFlag != null ">and jtpr.punish_flag = #{taskPalce.punishFlag}</if>
- <if test="taskPalce.policeStation != null and taskPalce.policeStation != ''">and jtpr.police_station =
- #{taskPalce.policeStation}
- </if>
- <if test="taskPalce.rectificationNoticeImgUrl != null and taskPalce.rectificationNoticeImgUrl != ''">and
- jtpr.rectification_notice_img_url = #{taskPalce.rectificationNoticeImgUrl}
- </if>
- <if test="taskPalce.signaturePath != null and taskPalce.signaturePath != ''">and jtpr.signature_path =
- #{taskPalce.signaturePath}
- </if>
- <if test="taskPalce.createUser != null ">and jtpr.create_user = #{taskPalce.createUser}</if>
- <if test="taskPalce.imageUrls != null and taskPalce.imageUrls != ''">and jtpr.image_urls =
- #{taskPalce.imageUrls}
- </if>
- <if test="isAdministrator==2">
- <choose>
- <when test="taskPalce.roleName != null and taskPalce.roleName != ''">
- <if test="taskPalce.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="taskPalce.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- order by jtpr.create_time desc
- </select>
-
- <select id="getCount" resultType="java.lang.Integer">
-
- SELECT count(1)
- FROM
- jczz_task_place_rectification jtpr
- LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code
- <where>
- <if test="taskPalce.communityCode != null ">and jg.community_code = #{taskPalce.communityCode}</if>
- <if test="taskPalce.status != null ">and jtpr.status = #{taskPalce.status}</if>
- <if test="isAdministrator==2">
- <choose>
- <when test="taskPalce.roleName != null and taskPalce.roleName != ''">
- <if test="taskPalce.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="taskPalce.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and br.village_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and br.village_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and
- (
- jg.grid_code in ('') or jpag.community_code in ('')
- )
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.java
deleted file mode 100644
index b11761d..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel;
-import org.springblade.modules.task.vo.TaskPlaceSelfCheckVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 消防自查记任务表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-02-04
- */
-public interface TaskPlaceSelfCheckMapper extends BaseMapper<TaskPlaceSelfCheckEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskPlaceSelfCheck
- * @return
- */
- List<TaskPlaceSelfCheckVO> selectTaskPlaceSelfCheckPage(IPage page,
- @Param("place") TaskPlaceSelfCheckVO taskPlaceSelfCheck,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList,
- @Param("nineTypeList") List<String> nineTypeList);
-
- /**
- * 查询消防自查记任务表
- *
- * @param taskPlaceSelfCheck 消防自查记任务表ID
- * @return 消防自查记任务表
- */
- public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(@Param("place") TaskPlaceSelfCheckEntity taskPlaceSelfCheck);
-
- /**
- * 查询消防自查记任务表列表
- *
- * @param taskPlaceSelfCheckDTO 消防自查记任务表
- * @return 消防自查记任务表集合
- */
- public List<TaskPlaceSelfCheckDTO> selectTaskPlaceSelfCheckList(TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO);
-
- /**
- * 导出消防自查信息
- * @param taskPlaceSelfCheck
- * @param isAdministrator
- * @param regionChildCodesList
- * @param gridCodeList
- * @return
- */
- List<TaskPlaceSelfCheckExcel> exportTaskPlaceSelfCheck(@Param("nineTypeList") List<String> nineTypeList,
- @Param("place") TaskPlaceSelfCheckVO taskPlaceSelfCheck,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("gridCodeList") List<String> gridCodeList);
-
- Integer getCount(String neiCode, int status,Long userId, int type);
-
- /**
- * 消防自查详情查询
- * @param taskId
- * @return
- */
- TaskPlaceSelfCheckEntity getDetailByTaskId(Long taskId);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml
deleted file mode 100644
index 1f113c4..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml
+++ /dev/null
@@ -1,529 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskPlaceSelfCheckMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskPlaceSelfCheckResultMap"
- type="org.springblade.modules.task.vo.TaskPlaceSelfCheckVO">
- <result property="id" column="id"/>
- <result property="taskId" column="task_id"/>
- <result property="taskName" column="task_name"/>
- <result property="placeName" column="place_name"/>
- <result property="remark" column="remark"/>
- <result property="updateTime" column="update_time"/>
- <result property="createTime" column="create_time"/>
- <result property="houseCode" column="house_code"/>
- <result property="rectificationEndTime" column="rectification_end_time"/>
- <result property="rectificationCompleteTime" column="rectification_complete_time"/>
- <result property="rectificationFlag" column="rectification_flag"/>
- <result property="policeStation" column="police_station"/>
- <result property="rectificationNoticeImgUrl" column="rectification_notice_img_url"/>
- <result property="signaturePath" column="signature_path"/>
- <result property="createUser" column="create_user"/>
- <result property="imageUrls" column="image_urls"/>
- <result property="status" column="status"/>
- <result property="deleteFlag" column="delete_flag"/>
-
- <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
- select="selectPlacePoiLabelList"
- ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
- autoMapping="true">
- </collection>
-
- <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
- autoMapping="true">
- </collection>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectTaskPlaceSelfCheckPage" resultMap="taskPlaceSelfCheckResultMap">
- select jpc.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type,
- jp.is_nine,
- br.town_name as streetName,
- br.village_name as communityName,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person
- FROM jczz_task_place_self_check jpc
- LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="place.id != null ">and jpc.id = #{place.id}</if>
- <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
- <if test="place.taskName != null and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
- <if test="place.placeName != null and place.placeName != ''">
- and jp.place_name like concat('%', #{place.placeName},'%')
- </if>
- <if test="place.principal != null and place.principal != ''">
- and jp.principal like concat('%', #{place.principal},'%')
- </if>
-
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
- <if test="place.remark != null and place.remark != ''">and jpc.remark = #{place.remark}</if>
- <if test="place.updateTime != null ">and jpc.update_time = #{place.updateTime}</if>
- <if test="place.createTime != null ">and jpc.create_time = #{place.createTime}</if>
- <if test="place.houseCode != null and place.houseCode != ''">and jpc.house_code = #{place.houseCode}</if>
- <if test="place.type != null and place.type != ''">and jpc.type = #{place.type}</if>
- <if test="place.rectificationEndTime != null ">and jpc.rectification_end_time =
- #{place.rectificationEndTime}
- </if>
- <if test="place.rectificationCompleteTime != null ">and jpc.rectification_complete_time =
- #{place.rectificationCompleteTime}
- </if>
- <if test="place.rectificationFlag != null ">and jpc.rectification_flag = #{place.rectificationFlag}</if>
- <if test="place.policeStation != null and place.policeStation != ''">and jpc.police_station =
- #{place.policeStation}
- </if>
- <if test="place.rectificationNoticeImgUrl != null and place.rectificationNoticeImgUrl != ''">and
- jpc.rectification_notice_img_url = #{place.rectificationNoticeImgUrl}
- </if>
- <if test="place.signaturePath != null and place.signaturePath != ''">and jpc.signature_path =
- #{place.signaturePath}
- </if>
-
- <if test="place.streetName!=null and place.streetName!=''">
- and br.town_name like concat('%', #{place.streetName},'%')
- </if>
-
- <if test="place.communityName!=null and place.communityName!=''">
- and br.village_name like concat('%', #{place.communityName},'%')
- </if>
- <if test="place.gridName!=null and place.gridName!=''">
- and jg.grid_name like concat('%', #{place.gridName},'%')
- </if>
- <if test="place.createUser != null ">and jpc.create_user = #{place.createUser}</if>
- <if test="place.imageUrls != null and place.imageUrls != ''">and jpc.image_urls = #{place.imageUrls}</if>
- <if test="place.status != null ">and jpc.status = #{place.status}</if>
- <if test="place.deleteFlag != null ">and jpc.delete_flag = #{place.deleteFlag}</if>
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
-
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- order by jpc.create_time desc
- </select>
-
- <resultMap type="org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO"
- id="TaskPlaceSelfCheckDTOResult">
- <result property="id" column="id"/>
- <result property="taskId" column="task_id"/>
- <result property="taskName" column="task_name"/>
- <result property="placeName" column="place_name"/>
- <result property="remark" column="remark"/>
- <result property="updateTime" column="update_time"/>
- <result property="createTime" column="create_time"/>
- <result property="houseCode" column="house_code"/>
- <result property="rectificationEndTime" column="rectification_end_time"/>
- <result property="rectificationCompleteTime" column="rectification_complete_time"/>
- <result property="rectificationFlag" column="rectification_flag"/>
- <result property="policeStation" column="police_station"/>
- <result property="rectificationNoticeImgUrl" column="rectification_notice_img_url"/>
- <result property="signaturePath" column="signature_path"/>
- <result property="createUser" column="create_user"/>
- <result property="imageUrls" column="image_urls"/>
- <result property="status" column="status"/>
- <result property="deleteFlag" column="delete_flag"/>
-
- <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
- select="selectPlacePoiLabelList"
- ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
- autoMapping="true">
- </collection>
-
- <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
- javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
- autoMapping="true">
- </collection>
-
- </resultMap>
-
- <select id="selectPlacePoiLabelList" parameterType="Long"
- resultType="org.springblade.modules.place.vo.PlacePoiLabelVO">
- SELECT
- jppl.id,
- jppl.place_id,
- jppl.poi_code,
- jppl.type,
- jppl.color,
- jppl.remark,
- jc.category_name labelName
- FROM
- jczz_place_poi_label jppl
- LEFT JOIN jczz_category jc ON jppl.poi_code = jc.category_no
- WHERE
- jppl.type = '3'
- and place_id = #{jpid}
- </select>
-
-
- <select id="selectPatrolRecordList" parameterType="Long"
- resultType="org.springblade.modules.task.vo.TaskPlaceRecordVO">
- select jpr.id,
- jpr.item_id,
- jpr.task_place_self_check_id,
- jpr.state,
- jpr.remark,
- jpr.image_urls,
- jpr.create_user,
- jpr.create_time,
- jpr.is_deleted,
- jpr.rectification_image_urls,
- jpr.rectification_remark,
- jpr.rectification_time,
- jpgi.items_name
- from jczz_task_place_record jpr
- LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id = jpgi.id
- where task_place_self_check_id = #{id}
- and jpr.type = '1'
- </select>
-
- <sql id="selectTaskPlaceSelfCheck">
- select
- id,
- task_id,
- task_name,
- place_name,
- remark,
- update_time,
- create_time,
- house_code,
- rectification_end_time,
- rectification_complete_time,
- rectification_flag,
- police_station,
- rectification_notice_img_url,
- signature_path,
- create_user,
- image_urls,
- status,
- delete_flag
- from
- jczz_task_place_self_check
- </sql>
-
- <select id="selectTaskPlaceSelfCheckById" parameterType="long" resultMap="TaskPlaceSelfCheckDTOResult">
- SELECT
- jtpr.id,
- jtpr.task_id,
- jtpr.task_name,
- jtpr.place_name,
- jtpr.remark,
- jtpr.update_time,
- jtpr.create_time,
- jtpr.house_code,
- jtpr.rectification_end_time,
- jtpr.rectification_complete_time,
- jtpr.rectification_flag,
- jtpr.police_station,
- jtpr.rectification_notice_img_url,
- jtpr.signature_path,
- jtpr.create_user,
- jtpr.image_urls,
- jtpr.STATUS,
- jtpr.delete_flag,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person,
- jt.remark reasonFailure,
- jda.address_name
- FROM
- jczz_task_place_self_check jtpr
- LEFT JOIN jczz_task jt ON jt.id = jtpr.task_id
- LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtpr.house_code
- <where>
- <if test="place.id != null ">and jtpr.id = #{place.id}</if>
- <if test="place.taskId != null ">and jtpr.task_id = #{place.taskId}</if>
- </where>
- </select>
-
- <select id="selectTaskPlaceSelfCheckList"
- parameterType="org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO"
- resultMap="TaskPlaceSelfCheckDTOResult">
- <include refid="selectTaskPlaceSelfCheck"/>
- <where>
- <if test="id != null ">and id = #{id}</if>
- <if test="taskId != null ">and task_id = #{taskId}</if>
- <if test="taskName != null and taskName != ''">and task_name = #{taskName}</if>
- <if test="placeName != null and placeName != ''">and place_name = #{placeName}</if>
- <if test="remark != null and remark != ''">and remark = #{remark}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="houseCode != null and houseCode != ''">and house_code = #{houseCode}</if>
- <if test="rectificationEndTime != null ">and rectification_end_time = #{rectificationEndTime}</if>
- <if test="rectificationCompleteTime != null ">and rectification_complete_time =
- #{rectificationCompleteTime}
- </if>
- <if test="rectificationFlag != null ">and rectification_flag = #{rectificationFlag}</if>
- <if test="policeStation != null and policeStation != ''">and police_station = #{policeStation}</if>
- <if test="rectificationNoticeImgUrl != null and rectificationNoticeImgUrl != ''">and
- rectification_notice_img_url = #{rectificationNoticeImgUrl}
- </if>
- <if test="signaturePath != null and signaturePath != ''">and signature_path = #{signaturePath}</if>
- <if test="createUser != null ">and create_user = #{createUser}</if>
- <if test="imageUrls != null and imageUrls != ''">and image_urls = #{imageUrls}</if>
- <if test="status != null ">and status = #{status}</if>
- <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
- </where>
- </select>
-
-
- <!--导出消防自查信息-->
- <select id="exportTaskPlaceSelfCheck"
- resultType="org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel">
- select
- jpc.id,
- case when jpc.status=1 then '待审核'
- when jpc.status=2 then '审核通过'
- when jpc.status=3 then '审核不通过'
- else '待完成' end as status,
- jpc.remark,
- jpc.create_time,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- jp.nine_type,
- jp.is_nine,
- br.town_name as streetName,
- br.village_name as communityName,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person
- FROM jczz_task_place_self_check jpc
- LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
- LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- <if test="place.id != null ">and jpc.id = #{place.id}</if>
- <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
- <if test="place.taskName != null and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
- <if test="place.placeName != null and place.placeName != ''">
- and jp.place_name like concat('%', #{place.placeName},'%')
- </if>
- <if test="place.principal != null and place.principal != ''">
- and jp.principal like concat('%', #{place.principal},'%')
- </if>
-
- <if test="nineTypeList!=null and nineTypeList.size()>0">
- and jp.nine_type in
- <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
- #{nineType}
- </foreach>
- </if>
- <if test="place.remark != null and place.remark != ''">and jpc.remark = #{place.remark}</if>
- <if test="place.updateTime != null ">and jpc.update_time = #{place.updateTime}</if>
- <if test="place.createTime != null ">and jpc.create_time = #{place.createTime}</if>
- <if test="place.houseCode != null and place.houseCode != ''">and jpc.house_code = #{place.houseCode}</if>
- <if test="place.rectificationEndTime != null ">and jpc.rectification_end_time =
- #{place.rectificationEndTime}
- </if>
- <if test="place.rectificationCompleteTime != null ">and jpc.rectification_complete_time =
- #{place.rectificationCompleteTime}
- </if>
- <if test="place.rectificationFlag != null ">and jpc.rectification_flag = #{place.rectificationFlag}</if>
- <if test="place.policeStation != null and place.policeStation != ''">and jpc.police_station =
- #{place.policeStation}
- </if>
- <if test="place.rectificationNoticeImgUrl != null and place.rectificationNoticeImgUrl != ''">and
- jpc.rectification_notice_img_url = #{place.rectificationNoticeImgUrl}
- </if>
- <if test="place.signaturePath != null and place.signaturePath != ''">and jpc.signature_path =
- #{place.signaturePath}
- </if>
-
- <if test="place.streetName!=null and place.streetName!=''">
- and br.town_name like concat('%', #{place.streetName},'%')
- </if>
-
- <if test="place.communityName!=null and place.communityName!=''">
- and br.village_name like concat('%', #{place.communityName},'%')
- </if>
- <if test="place.gridName!=null and place.gridName!=''">
- and jg.grid_name like concat('%', #{place.gridName},'%')
- </if>
- <if test="place.createUser != null ">and jpc.create_user = #{place.createUser}</if>
- <if test="place.imageUrls != null and place.imageUrls != ''">and jpc.image_urls = #{place.imageUrls}</if>
- <if test="place.status != null ">and jpc.status = #{place.status}</if>
- <if test="place.deleteFlag != null ">and jpc.delete_flag = #{place.deleteFlag}</if>
- <if test="isAdministrator==2">
- <choose>
- <when test="place.roleName != null and place.roleName != ''">
- <if test="place.roleName=='wgy'">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jp.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- <if test="place.roleName=='mj'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")"
- separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </when>
- <otherwise>
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and
- (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
-
- </otherwise>
- </choose>
- </otherwise>
- </choose>
- </if>
- </where>
- </select>
- <select id="getCount" resultType="java.lang.Integer">
- SELECT count(1)
- FROM jczz_task_place_self_check jtpsc
- LEFT JOIN jczz_place jp ON jp.house_code = jtpsc.house_code
- LEFT JOIN jczz_grid jg on jg.grid_code=jp.grid_code
- WHERE jp.jw_grid_code IN
- (SELECT jpag.jw_grid_code FROM jczz_police_affairs_grid jpag WHERE jpag.police_user_id like concat('%',#{userId},'%') )
- AND jtpsc.`status` = 1
- AND jtpsc.`type` = #{type}
- AND jg.community_code=#{neiCode}
- </select>
-
-
-
- <select id="getDetailByTaskId" resultType="org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity">
- SELECT
- jtpsc.*,
- jp.id jpid,
- jp.place_name,
- jp.location,
- jg.grid_name,
- jp.principal,
- jp.principal_phone,
- br.town_name,
- br.village_name,
- bu.`name`,
- jpe.legal_tel,
- jpe.legal_person,
- jt.remark reasonFailure,
- jda.address_name
- FROM
- jczz_task_place_self_check jtpsc
- LEFT JOIN jczz_task jt on jt.id = jtpsc.task_id
- LEFT JOIN jczz_place jp ON jtpsc.house_code = jp.house_code
- LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- LEFT JOIN blade_region br ON br.`code` = jg.community_code
- LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
- LEFT JOIN blade_user bu ON bu.id = jtpsc.create_user
- LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpsc.house_code
- WHERE jtpsc.task_id = #{taskId}
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskRepairAppraiseMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskRepairAppraiseMapper.java
deleted file mode 100644
index 718fda8..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskRepairAppraiseMapper.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.springblade.modules.task.dto.TaskRepairAppraiseDTO;
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.modules.task.vo.TaskRepairAppraiseVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 报事报修评分表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-26
- */
-public interface TaskRepairAppraiseMapper extends BaseMapper<TaskRepairAppraiseEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param task
- * @return
- */
- List<TaskRepairAppraiseVO> selectTaskRepairAppraisePage(IPage page, TaskRepairAppraiseVO task);
-
- /**
- * 查询报事报修评分表
- *
- * @param id 报事报修评分表ID
- * @return 报事报修评分表
- */
- public TaskRepairAppraiseDTO selectTaskRepairAppraiseById(Integer id);
-
- /**
- * 查询报事报修评分表列表
- *
- * @param taskRepairAppraiseDTO 报事报修评分表
- * @return 报事报修评分表集合
- */
- public List<TaskRepairAppraiseDTO> selectTaskRepairAppraiseList(TaskRepairAppraiseDTO taskRepairAppraiseDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskRepairAppraiseMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskRepairAppraiseMapper.xml
deleted file mode 100644
index 5c7a3df..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskRepairAppraiseMapper.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskRepairAppraiseMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskResultMap" type="org.springblade.modules.task.entity.TaskRepairAppraiseEntity">
- </resultMap>
-
-
- <select id="selectTaskRepairAppraisePage" resultMap="taskResultMap">
- select * from jczz_task_repair_appraise where is_deleted = 0
- </select>
-
- <resultMap type="org.springblade.modules.task.dto.TaskRepairAppraiseDTO" id="TaskRepairAppraiseDTOResult">
- <result property="id" column="id" />
- <result property="content" column="content" />
- <result property="createTime" column="create_time" />
- <result property="imageList" column="image_list" />
- <result property="point" column="point" />
- <result property="repairId" column="repair_id" />
- <result property="videoList" column="video_list" />
- </resultMap>
-
- <sql id="selectTaskRepairAppraise">
- select
- id,
- content,
- create_time,
- image_list,
- point,
- repair_id,
- video_list
- from
- jczz_task_repair_appraise
- </sql>
-
- <select id="selectTaskRepairAppraiseById" parameterType="int" resultMap="TaskRepairAppraiseDTOResult">
- <include refid="selectTaskRepairAppraise"/>
- where
- id = #{id}
- </select>
-
- <select id="selectTaskRepairAppraiseList" parameterType="org.springblade.modules.task.dto.TaskRepairAppraiseDTO" resultMap="TaskRepairAppraiseDTOResult">
- <include refid="selectTaskRepairAppraise"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="imageList != null and imageList != ''"> and image_list = #{imageList}</if>
- <if test="point != null and point != ''"> and point = #{point}</if>
- <if test="repairId != null "> and repair_id = #{repairId}</if>
- <if test="videoList != null and videoList != ''"> and video_list = #{videoList}</if>
- </where>
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskRepairStepMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskRepairStepMapper.java
deleted file mode 100644
index a701835..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskRepairStepMapper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.springblade.modules.task.dto.TaskRepairStepDTO;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.modules.task.vo.TaskRepairStepVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 报事报修事件步骤表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-12-26
- */
-public interface TaskRepairStepMapper extends BaseMapper<TaskRepairStepEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param task
- * @return
- */
- List<TaskRepairStepVO> selectTaskRepairStepPage(IPage page, TaskRepairStepVO task);
- /**
- * 查询报事报修事件步骤表
- *
- * @param id 报事报修事件步骤表ID
- * @return 报事报修事件步骤表
- */
- public TaskRepairStepDTO selectTaskRepairStepById(Integer id);
-
- /**
- * 查询报事报修事件步骤表列表
- *
- * @param taskRepairStepDTO 报事报修事件步骤表
- * @return 报事报修事件步骤表集合
- */
- public List<TaskRepairStepDTO> selectTaskRepairStepList(TaskRepairStepDTO taskRepairStepDTO);
-
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskRepairStepMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskRepairStepMapper.xml
deleted file mode 100644
index 1ae152e..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskRepairStepMapper.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskRepairStepMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskResultMap" type="org.springblade.modules.task.entity.TaskRepairStepEntity">
- </resultMap>
-
-
- <select id="selectTaskRepairStepPage" resultMap="taskResultMap">
- select * from jczz_task_repair_step where is_deleted = 0
- </select>
-
-
- <resultMap type="org.springblade.modules.task.dto.TaskRepairStepDTO" id="TaskRepairStepDTOResult">
- <result property="id" column="id" />
- <result property="repairId" column="repair_id" />
- <result property="content" column="content" />
- <result property="videoList" column="video_list" />
- <result property="name" column="name" />
- <result property="mobile" column="mobile" />
- <result property="userId" column="user_id" />
- <result property="peopleType" column="people_type" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="imageList" column="image_list" />
- </resultMap>
-
- <sql id="selectTaskRepairStep">
- select
- id,
- repair_id,
- content,
- video_list,
- name,
- mobile,
- user_id,
- people_type,
- create_time,
- update_time,
- image_list
- from
- jczz_task_repair_step
- </sql>
-
- <select id="selectTaskRepairStepById" parameterType="int" resultMap="TaskRepairStepDTOResult">
- <include refid="selectTaskRepairStep"/>
- where
- id = #{id}
- </select>
-
- <select id="selectTaskRepairStepList" parameterType="org.springblade.modules.task.dto.TaskRepairStepDTO" resultMap="TaskRepairStepDTOResult">
- <include refid="selectTaskRepairStep"/>
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="repairId != null "> and repair_id = #{repairId}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="videoList != null and videoList != ''"> and video_list = #{videoList}</if>
- <if test="name != null and name != ''"> and name = #{name}</if>
- <if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="peopleType != null and peopleType != ''"> and people_type = #{peopleType}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="imageList != null and imageList != ''"> and image_list = #{imageList}</if>
- </where>
- </select>
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.java
deleted file mode 100644
index 77c961d..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springblade.modules.task.vo.TaskReportStatistics;
-
-import java.util.List;
-
-/**
- * 报事报修任务表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface TaskReportForRepairsMapper extends BaseMapper<TaskReportForRepairsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskReportForRepairs
- * @return
- */
- List<TaskReportForRepairsVO> selectTaskReportForRepairsPage(IPage page,
- @Param("vo") TaskReportForRepairsVO taskReportForRepairs,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("aoiCodeList") List<String> aoiCodeList,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- /**
- * 查询报事报修统计
- *
- * @param userId
- * @return
- */
- TaskReportStatistics getStatisticsCount(@Param("userId") Long userId,
- @Param("houseCode") String houseCode,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator);
-
- Integer getStatistics(Long userId, String neiCode, String roleName,@Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
- /**
- * 更新状态--临时接口
- *
- * @param gridman
- * @return
- */
- int updateView(GridmanEntity gridman);
-
- Integer getReportForStatistics(String code, Long userId, Integer status, Integer type, String roleType);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
deleted file mode 100644
index ec82bde..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
+++ /dev/null
@@ -1,407 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskReportForRepairsMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskReportForRepairsResultMap" type="org.springblade.modules.task.entity.TaskReportForRepairsEntity">
- <result column="id" property="id"/>
- <result column="type" property="type"/>
- <result column="real_name" property="realName"/>
- <result column="phone" property="phone"/>
- <result column="remark" property="remark"/>
- <result column="image_urls" property="imageUrls"/>
- <result column="create_time" property="createTime"/>
- <result column="create_user" property="createUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="is_deleted" property="isDeleted"/>
- </resultMap>
-
- <resultMap id="taskReportForRepairsResult" type="org.springblade.modules.task.vo.TaskReportForRepairsVO">
- <result property="id" column="id"/>
- <result property="taskId" column="task_id"/>
- <result property="addressCode" column="address_code"/>
- <result property="type" column="type"/>
- <result property="realName" column="real_name"/>
- <result property="phone" column="phone"/>
- <result property="remark" column="remark"/>
- <result property="imageUrls" column="image_urls"/>
- <result property="confirmUserId" column="confirm_user_id"/>
- <result property="confirmTime" column="confirm_time"/>
- <result property="confirmFlag" column="confirm_flag"/>
- <result property="confirmNotion" column="confirm_notion"/>
- <result property="createTime" column="create_time"/>
- <result property="createUser" column="create_user"/>
- <result property="createDept" column="create_dept"/>
- <result property="updateTime" column="update_time"/>
- <result property="updateUser" column="update_user"/>
- <result property="isDeleted" column="is_deleted"/>
- <result property="status" column="status"/>
- <result property="lng" column="lng"/>
- <result property="lat" column="lat"/>
- <result property="address" column="address"/>
- <result property="viewType" column="view_type"/>
- <result property="houseFlag" column="house_flag"/>
-
-
- <collection property="taskRepairStepList" column="id" select="selectTaskRepairStepList"
- javaType="java.util.List" ofType="org.springblade.modules.task.entity.TaskRepairStepEntity"
- autoMapping="true">
- <id property="repairId" column="id"/>
- </collection>
-
- <collection property="taskRepairAppraiseList" column="id" select="selectTaskRepairAppraiseList"
- javaType="java.util.List" ofType="org.springblade.modules.task.entity.TaskRepairAppraiseEntity"
- autoMapping="true">
- <id property="repairId" column="id"/>
- </collection>
-
-
- </resultMap>
-
-
- <select id="selectTaskRepairStepList" parameterType="java.lang.Long"
- resultType="org.springblade.modules.task.entity.TaskRepairStepEntity">
- select
- id,
- repair_id,
- content,
- video_list,
- name,
- mobile,
- user_id,
- people_type,
- create_time,
- update_time,
- image_list
- from
- jczz_task_repair_step
- <where>
- <if test="id != null and id != '' ">repair_id = #{id}</if>
- </where>
- </select>
-
-
- <select id="selectTaskRepairAppraiseList" parameterType="java.lang.Long"
- resultType="org.springblade.modules.task.entity.TaskRepairAppraiseEntity">
- select
- id,
- content,
- create_time,
- image_list,
- point,
- repair_id,
- video_list
- from
- jczz_task_repair_appraise
- <where>
- <if test="id != null and id != ''">repair_id = #{id}</if>
- </where>
- </select>
-
-
- <sql id="selectTaskReportForRepairs">
- select id,
- task_id,
- address_code,
- type,
- real_name,
- phone,
- remark,
- image_urls,
- confirm_user_id,
- confirm_time,
- confirm_flag,
- confirm_notion,
- create_time,
- create_user,
- create_dept,
- update_time,
- update_user,
- is_deleted,
- status,
- lng,
- lat,
- address,
- view_type,
- house_flag
- from jczz_task_report_for_repairs
- </sql>
-
- <!--自定义分页查询-->
- <select id="selectTaskReportForRepairsPage" resultMap="taskReportForRepairsResult">
- select
- jtrfr.id id,
- jtrfr.task_id,
- jtrfr.address_code,
- jtrfr.type,
- jtrfr.real_name,
- jtrfr.phone,
- jtrfr.remark,
- jtrfr.image_urls,
- jtrfr.confirm_user_id,
- jtrfr.confirm_time,
- jtrfr.confirm_flag,
- jtrfr.confirm_notion,
- jtrfr.create_time,
- jtrfr.create_user,
- jtrfr.create_dept,
- jtrfr.update_time,
- jtrfr.update_user,
- jtrfr.is_deleted,
- jtrfr.status,
- jtrfr.lng,
- jtrfr.lat,
- jtrfr.address,
- jtrfr.view_type,
- jtrfr.house_flag,
- br.town_name streetName,
- jg.grid_name,
- jda.aoi_name,
- br.village_name communityName,
- jda.address_name as addressName
- from jczz_task_report_for_repairs jtrfr
- left join jczz_doorplate_address jda on jda.address_code = jtrfr.address_code
- LEFT JOIN jczz_house jh on jh.house_code=jtrfr.address_code
- left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- LEFT JOIN jczz_place jp on jtrfr.address_code = jp.house_code and jp.is_deleted = 0
- where jtrfr.is_deleted = 0
- <if test="vo.createUser != null and vo.createUser != ''">
- AND jtrfr.create_user = #{vo.createUser}
- </if>
-
- <if test="vo.houseCode != null and vo.houseCode != ''">
- and jtrfr.address_code = #{vo.houseCode}
- </if>
-
- <if test="vo.streetName != null and vo.streetName != ''">
- AND br.town_name like concat('%',#{vo.streetName},'%')
- </if>
- <if test="vo.communityName != null and vo.communityName != ''">
- AND br.village_name like concat('%',#{vo.communityName},'%')
- </if>
-
- <if test="vo.gridName != null and vo.gridName != ''">
- AND jg.grid_name like concat('%',#{vo.gridName},'%')
- </if>
-
- <if test="vo.aoiName != null and vo.aoiName != ''">
- AND jda.aoi_name like concat('%',#{vo.aoiName},'%')
- </if>
-
- <if test="vo.type != null">
- AND jtrfr.type = #{vo.type}
- </if>
- <if test="vo.realName != null and vo.realName != ''">
- AND jtrfr.real_name like concat('%',#{vo.realName},'%')
- </if>
- <if test="vo.phone != null and vo.phone != ''">
- AND jtrfr.phone like concat('%',#{vo.phone},'%')
- </if>
- <if test="vo.confirmFlag != null">
- AND jtrfr.confirm_flag = #{vo.confirmFlag}
- </if>
-
- <if test="vo.status != null">
- AND jtrfr.status = #{vo.status}
- </if>
- <if test="vo.addressCode != null">
- AND jtrfr.address_code = #{vo.addressCode}
- </if>
- <if test="vo.viewType != null">
- AND jtrfr.view_type = #{vo.viewType}
- </if>
- <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != '' ">
- AND jtrfr.create_time BETWEEN #{vo.startTime} and #{vo.endTime}
- </if>
- <if test="isAdministrator==2">
- <!-- 物业和居民 -->
- <if test="vo.roleType !=null and (vo.roleType == 'wy' or vo.roleType == 'inhabitant')">
- <if test="aoiCodeList!=null and aoiCodeList.size()>0">
- and (
- jda.aoi_code in
- <foreach collection="aoiCodeList" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- or
- jp.aoi_code in
- <foreach collection="aoiCodeList" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- )
- </if>
-
- <if test="vo.roleType == 'wy' and vo.confirmUserId != null ">
- or jtrfr.confirm_user_id = #{vo.confirmUserId}
- </if>
- </if>
- <!-- 其他 -->
- <if test="vo.roleType ==null and vo.roleName !='wgy' ">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jp.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- </choose>
- </if>
- <!-- 网格员 -->
- <if test="vo.roleName =='wgy' ">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and (
- jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jp.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
-
- <if test="vo.confirmUserId != null ">
- or jtrfr.confirm_user_id = #{vo.confirmUserId}
- </if>
- </if>
- </if>
- ORDER BY jtrfr.create_time DESC
- </select>
-
- <!--统计查询,个人-->
- <select id="getReportForStatistics" resultType="java.lang.Integer">
-
- SELECT
- COUNT( 1 )
- FROM
- jczz_task_report_for_repairs jtrfr
- LEFT JOIN jczz_doorplate_address jda ON jtrfr.address_code = jda.address_code
- WHERE
- jda.nei_code = #{code}
- AND jtrfr.is_deleted = 0
- <if test="status != null">
- and jtrfr.confirm_flag = #{status}
- </if>
- <if test="type != null">
- and jtrfr.type = #{type}
- </if>
-
- <if test="userId != null and roleType == '1'">
- AND jda.address_code IN (
- SELECT DISTINCT
- jgr.house_code
- FROM
- jczz_grid jg
- LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
- LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
- WHERE
- jgm.user_id = #{userId}
- AND jg.is_deleted = 0
- )
- </if>
- <if test="userId != null and roleType == '3'">
- AND jda.address_code IN (SELECT
- jda.address_code
- FROM
- jczz_doorplate_address jda
- LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
- WHERE
- jc.res_police_user_id like concat('%',#{userId},'%'))
- )
- </if>
- </select>
-
-
- <select id="getStatisticsCount" resultType="org.springblade.modules.task.vo.TaskReportStatistics">
- SELECT
- count( 1 ) AS total,
- ifnull( sum( CASE WHEN STATUS = 10 THEN 1 ELSE 0 END ), 0 ) AS handle
- FROM
- jczz_task_report_for_repairs jtrfr
- LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtrfr.address_code
- WHERE is_deleted = 0
- <if test="userId != null">
- and jtrfr.create_user = #{userId}
- </if>
- <if test="houseCode != null and houseCode != ''">
- and jtrfr.address_code = #{houseCode}
- </if>
-
- </select>
-
-
- <select id="getStatistics" resultType="java.lang.Integer">
- SELECT
- count( 1 )
- FROM
- jczz_task_report_for_repairs jtr
- LEFT JOIN jczz_house jh ON jh.house_code = jtr.address_code
- LEFT JOIN jczz_place jp ON jtr.address_code = jp.house_code
- LEFT JOIN jczz_grid jg on (jh.grid_code = jg.grid_code or jp.grid_code = jg.grid_code )
- LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
- <where>
- and jtr.is_deleted = 0
- and jtr.confirm_flag = 1
- <if test="neiCode !=null and neiCode !=''">
- and jg.community_code = #{neiCode}
- </if>
-
- <if test="roleName != null and roleName != ''">
- <if test="roleName=='wgy'">
- <if test="isAdministrator==2">
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jg.grid_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- <if test="roleName=='mj'">
- <if test="isAdministrator==2">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jpag.community_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </when>
- <otherwise>
- and jpag.community_code in ('')
- </otherwise>
- </choose>
- </if>
- </if>
- </if>
- </where>
-
- </select>
-
- <!--更新状态-临时接口-->
- <update id="updateView">
- update jczz_task_report_for_repairs
- set view_type = 1
- </update>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.java
deleted file mode 100644
index 2aa5df0..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springblade.modules.task.vo.TaskResidencePermitApplyVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 居住证申请 Mapper 接口
- *
- * @author BladeX
- * @since 2024-03-14
- */
-public interface TaskResidencePermitApplyMapper extends BaseMapper<TaskResidencePermitApplyEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskResidencePermitApply
- * @return
- */
- List<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage page,
- @Param("residen") TaskResidencePermitApplyVO taskResidencePermitApply,
- @Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-
-
- Integer getCount(String neiCode, int status, Long userId,@Param("regionChildCodesList") List<String> regionChildCodesList,
- @Param("isAdministrator") Integer isAdministrator,
- @Param("gridCodeList") List<String> gridCodeList);
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml
deleted file mode 100644
index 6ba79fd..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskResidencePermitApplyMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskResidencePermitApplyResultMap"
- type="org.springblade.modules.task.vo.TaskResidencePermitApplyVO">
- </resultMap>
-
-
- <select id="selectTaskResidencePermitApplyPage" resultMap="taskResidencePermitApplyResultMap">
- select
- jtrpa.*,
- br.town_name streetName,
- case
- when TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) < 18 then 2
- when TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) >= 18 then 1
- end as minors,
- jg.grid_name,
- jda.aoi_name,
- br.village_name communityName,
- jda.address_name as addressName
- from jczz_task_residence_permit_apply jtrpa
- left join jczz_doorplate_address jda on jda.address_code = jtrpa.house_code
- LEFT JOIN jczz_house jh on jh.house_code=jtrpa.house_code
- left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- <where>
- and jtrpa.is_deleted = 0
- <if test="residen.minors!=null and residen.minors ==2">
- and TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) < 18
- </if>
- <if test="residen.minors!=null and residen.minors ==1">
- and TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) >= 18
- </if>
- <if test="residen.communityCode != null and residen.communityCode != ''"> and jg.community_code = #{residen.communityCode}</if>
-
- <if test="residen.id != null ">and jtrpa.id = #{residen.id}</if>
- <if test="residen.name != null and residen.name != ''">and jtrpa.name like CONCAT('%',#{residen.name},'%')</if>
- <if test="residen.phone != null and residen.phone != ''">and jtrpa.phone like CONCAT('%',#{residen.phone},'%')</if>
- <if test="residen.idCard != null and residen.idCard != ''">and jtrpa.id_card like CONCAT('%',#{residen.idCard},'%')</if>
- <if test="residen.address != null and residen.address != ''">and jtrpa.address like CONCAT('%',#{residen.address},'%')</if>
- <if test="residen.houseCode != null and residen.houseCode != ''">and jtrpa.house_code = #{residen.houseCode}</if>
- <if test="residen.taskId != null ">and jtrpa.task_id = #{residen.taskId}</if>
- <if test="residen.createTime != null ">and jtrpa.create_time = #{residen.createTime}</if>
- <if test="residen.updateTime != null ">and jtrpa.update_time = #{residen.updateTime}</if>
- <if test="residen.createUser != null ">and jtrpa.create_user = #{residen.createUser}</if>
- <if test="residen.houseRentalId != null ">and jtrpa.house_rental_id = #{residen.houseRentalId}</if>
- <if test="residen.isDeleted != null ">and jtrpa.is_deleted = #{residen.isDeleted}</if>
- <if test="residen.remak != null and residen.remak != ''">and jtrpa.remak = #{residen.remak}</if>
- <if test="residen.gridCode != null and residen.gridCode != ''"> and jtrpa.grid_code = #{residen.gridCode}</if>
- <if test="residen.updateUser != null "> and jtrpa.update_user = #{residen.updateUser}</if>
- <if test="residen.confirmUserId != null "> and jtrpa.confirm_user_id = #{residen.confirmUserId}</if>
- <if test="residen.confirmTime != null "> and jtrpa.confirm_time = #{residen.confirmTime}</if>
- <if test="residen.confirmFlag != null "> and jtrpa.confirm_flag = #{residen.confirmFlag}</if>
- <if test="residen.confirmNotion != null and residen.confirmNotion != ''"> and jtrpa.confirm_notion = #{residen.confirmNotion}</if>
- <if test="residen.jwGridCode != null and residen.jwGridCode != ''"> and jtrpa.jw_grid_code = #{residen.jwGridCode}</if>
-
- <if test="isAdministrator==2">
- <!-- 网格员及其他 -->
- <if test="residen.roleType ==null and residen.roleName !='inhabitant'">
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jtrpa.jw_grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- </choose>
-
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and (
- jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- </choose>
-
- <if test="residen.confirmUserId != null ">
- or jtrfr.confirm_user_id = #{residen.confirmUserId}
- </if>
-
- </if>
- </if>
- order by jtrpa.create_time desc
- </where>
- </select>
-
-
- <select id="getCount" resultType="java.lang.Integer">
- SELECT count(1)
- from jczz_task_residence_permit_apply jtrpa
- left join jczz_doorplate_address jda on jda.address_code = jtrpa.house_code
- LEFT JOIN jczz_house jh on jh.house_code=jtrpa.house_code
- left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
- left join blade_region br on br.code = jg.community_code
- <where>
- and jtrpa.is_deleted = 0
- <if test="neiCode != null and neiCode != ''"> and jg.community_code = #{neiCode}</if>
- <if test="status != null and status != ''"> and jtrpa.confirm_flag = #{status}</if>
-
- <if test="isAdministrator==2">
-<!-- <if test="residen.roleType ==null ">-->
- <choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and (
- jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- or
- jtrpa.jw_grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- </choose>
-
- <choose>
- <when test="gridCodeList !=null and gridCodeList.size()>0">
- and (
- jg.grid_code in
- <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- )
- </when>
- </choose>
-<!-- </if>-->
- </if>
- </where>
-
- </select>
-
- <resultMap type="org.springblade.modules.task.dto.TaskResidencePermitApplyDTO"
- id="TaskResidencePermitApplyDTOResult">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="phone" column="phone"/>
- <result property="idCard" column="id_card"/>
- <result property="address" column="address"/>
- <result property="houseCode" column="house_code"/>
- <result property="taskId" column="task_id"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="createUser" column="create_user"/>
- <result property="houseRentalId" column="house_rental_id"/>
- <result property="isDeleted" column="is_deleted"/>
- <result property="remak" column="remak"/>
- <result property="gridCode" column="grid_code"/>
- <result property="updateUser" column="update_user"/>
- <result property="confirmUserId" column="confirm_user_id"/>
- <result property="confirmTime" column="confirm_time"/>
- <result property="confirmFlag" column="confirm_flag"/>
- <result property="confirmNotion" column="confirm_notion"/>
- <result property="jwGridCode" column="jw_grid_code"/>
- </resultMap>
-
- <sql id="selectTaskResidencePermitApply">
- select
- id,
- name,
- phone,
- id_card,
- address,
- house_code,
- task_id,
- create_time,
- update_time,
- create_user,
- house_rental_id,
- is_deleted,
- remak,
- grid_code,
- update_user,
- confirm_user_id,
- confirm_time,
- confirm_flag,
- confirm_notion,
- jw_grid_code
- from
- jczz_task_residence_permit_apply
- </sql>
-
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.java
deleted file mode 100644
index aae8651..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.mapper;
-
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-import org.springblade.modules.task.vo.TaskSchoolEvenVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 校园事件 Mapper 接口
- *
- * @author BladeX
- * @since 2024-04-18
- */
-public interface TaskSchoolEvenMapper extends BaseMapper<TaskSchoolEvenEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskSchoolEven
- * @return
- */
- List<TaskSchoolEvenVO> selectTaskSchoolEvenPage(IPage page, TaskSchoolEvenVO taskSchoolEven);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.xml
deleted file mode 100644
index 833782e..0000000
--- a/src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.task.mapper.TaskSchoolEvenMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="taskSchoolEvenResultMap" type="org.springblade.modules.task.entity.TaskSchoolEvenEntity">
- </resultMap>
-
-
- <select id="selectTaskSchoolEvenPage" resultMap="taskSchoolEvenResultMap">
- select * from jczz_task_school_even
- </select>
-
- <resultMap type="org.springblade.modules.task.dto.TaskSchoolEvenDTO" id="TaskSchoolEvenDTOResult">
- <result property="id" column="id" />
- <result property="createUser" column="create_user" />
- <result property="images" column="images" />
- <result property="describe" column="describe" />
- <result property="hiddenDangerType" column="hidden_danger_type" />
- <result property="type" column="type" />
- <result property="isProblem" column="is_problem" />
- <result property="isHandle" column="is_handle" />
- <result property="isReporting" column="is_reporting" />
- <result property="workImage" column="work_image" />
- <result property="confirmFlag" column="confirm_flag" />
- <result property="confirmTime" column="confirm_time" />
- <result property="confirmUserId" column="confirm_user_id" />
- <result property="confirmUserName" column="confirm_user_name" />
- <result property="confirmNotion" column="confirm_notion" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- </resultMap>
-
- <sql id="selectTaskSchoolEven">
- select
- id,
- create_user,
- images,
- describe,
- hidden_danger_type,
- type,
- is_problem,
- is_handle,
- is_reporting,
- work_image,
- confirm_flag,
- confirm_time,
- confirm_user_id,
- confirm_user_name,
- confirm_notion,
- create_time,
- update_time
- from
- jczz_task_school_even
- </sql>
-
-<!-- <select id="selectTaskSchoolEvenById" parameterType="long" resultMap="TaskSchoolEvenDTOResult">-->
-<!-- <include refid="selectTaskSchoolEven"/>-->
-<!-- where-->
-<!-- id = #{id}-->
-<!-- </select>-->
-
-<!-- <select id="selectTaskSchoolEvenList" parameterType="org.springblade.modules..dto.TaskSchoolEvenDTO" resultMap="TaskSchoolEvenDTOResult">-->
-<!-- <include refid="selectTaskSchoolEven"/>-->
-<!-- <where>-->
-<!-- <if test="id != null "> and id = #{id}</if>-->
-<!-- <if test="createUser != null "> and create_user = #{createUser}</if>-->
-<!-- <if test="images != null and images != ''"> and images = #{images}</if>-->
-<!-- <if test="describe != null and describe != ''"> and describe = #{describe}</if>-->
-<!-- <if test="hiddenDangerType != null and hiddenDangerType != ''"> and hidden_danger_type = #{hiddenDangerType}</if>-->
-<!-- <if test="type != null and type != ''"> and type = #{type}</if>-->
-<!-- <if test="isProblem != null and isProblem != ''"> and is_problem = #{isProblem}</if>-->
-<!-- <if test="isHandle != null and isHandle != ''"> and is_handle = #{isHandle}</if>-->
-<!-- <if test="isReporting != null and isReporting != ''"> and is_reporting = #{isReporting}</if>-->
-<!-- <if test="workImage != null and workImage != ''"> and work_image = #{workImage}</if>-->
-<!-- <if test="confirmFlag != null and confirmFlag != ''"> and confirm_flag = #{confirmFlag}</if>-->
-<!-- <if test="confirmTime != null "> and confirm_time = #{confirmTime}</if>-->
-<!-- <if test="confirmUserId != null "> and confirm_user_id = #{confirmUserId}</if>-->
-<!-- <if test="confirmUserName != null and confirmUserName != ''"> and confirm_user_name = #{confirmUserName}</if>-->
-<!-- <if test="confirmNotion != null and confirmNotion != ''"> and confirm_notion = #{confirmNotion}</if>-->
-<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
-<!-- <if test="updateTime != null "> and update_time = #{updateTime}</if>-->
-<!-- </where>-->
-<!-- </select>-->
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/task/service/IECallEventService.java b/src/main/java/org/springblade/modules/task/service/IECallEventService.java
deleted file mode 100644
index cea3d1c..0000000
--- a/src/main/java/org/springblade/modules/task/service/IECallEventService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.entity.ECallEventEntity;
-import org.springblade.modules.task.vo.ECallEventVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * e呼即办表 服务类
- *
- * @author BladeX
- * @since 2023-12-07
- */
-public interface IECallEventService extends IService<ECallEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param eCallEvent
- * @return
- */
- IPage<ECallEventVO> selectECallEventPage(IPage<ECallEventVO> page, ECallEventVO eCallEvent);
-
-
- /**
- * e呼即办数据处理
- */
- Object dataHandle();
-
- /**
- * e呼即办数据批量分享到圈子
- * @param type
- * @return
- */
- boolean batchShareCircle(Integer type);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java b/src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java
deleted file mode 100644
index c419829..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.task.dto.TaskBailReportingEventDTO;
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import org.springblade.modules.task.vo.TaskBailReportingEventVO;
-
-/**
- * 取保候审任务 服务类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface ITaskBailReportingEventService extends BaseService<TaskBailReportingEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskBailReportingEvent
- * @return
- */
- IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent);
-
-
- Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent);
-
- Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) ;
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java b/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
deleted file mode 100644
index 8b3e63e..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskCampusReportingEventDTO;
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
-
-/**
- * 校园安全检查任务表 服务类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface ITaskCampusReportingEventService extends IService<TaskCampusReportingEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskCampusReportingEvent
- * @return
- */
- IPage<TaskCampusReportingEventVO> selectTaskCampusReportingEventPage(IPage<TaskCampusReportingEventVO> page, TaskCampusReportingEventVO taskCampusReportingEvent);
-
-
- Boolean saveCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent);
-
- Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java b/src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java
deleted file mode 100644
index d2e5dbb..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.task.dto.TaskHotelReportingDTO;
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import org.springblade.modules.task.vo.TaskHotelReportingVO;
-
-/**
- * 旅馆安全自查任务 服务类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface ITaskHotelReportingService extends IService<TaskHotelReportingEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskHotelReporting
- * @return
- */
- IPage<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage<TaskHotelReportingVO> page, TaskHotelReportingVO taskHotelReporting);
-
- /**
- * 保存酒店自查任务
- *
- * @param taskHotelReporting
- * @return
- */
- boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting);
-
- Boolean updateHotelReporting(TaskHotelReportingVO taskHotelReporting);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java b/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
deleted file mode 100644
index 7b6a4ca..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import org.springblade.modules.task.excel.TaskLabelReportingEventExcel;
-import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
-
-import java.util.List;
-
-/**
- * 打金店报事 服务类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface ITaskLabelReportingEventService extends IService<TaskLabelReportingEventEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskLabelReportingEvent
- * @return
- */
- IPage<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage<TaskLabelReportingEventVO> page, TaskLabelReportingEventVO taskLabelReportingEvent);
-
-
- Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent);
-
- Boolean updateLabelReporting(TaskLabelReportingEventVO taskLabelReportingEvent);
-
- /**
- * 查询打金店报事
- *
- * @param id 打金店报事ID
- * @return 打金店报事
- */
- public TaskLabelReportingEventDTO selectTaskLabelReportingEventById(Long id);
-
- /**
- * 查询打金店报事列表
- *
- * @param taskLabelReportingEventDTO 打金店报事
- * @return 打金店报事集合
- */
- public List<TaskLabelReportingEventDTO> selectTaskLabelReportingEventList(TaskLabelReportingEventDTO taskLabelReportingEventDTO);
-
- /**
- * 导出二手交易信息
- * @param taskLabelReportingEvent
- */
- List<TaskLabelReportingEventExcel> exportTaskLabelReportingEvent(TaskLabelReportingEventVO taskLabelReportingEvent);
-
- /**
- * 二手交易 删除
- * @param toLongList
- * @return
- */
- boolean removeTaskByIds(List<Long> toLongList);
-
- /**
- * 二手交易报事 自定义详情
- * @param taskLabelReportingEvent
- * @return
- */
- TaskLabelReportingEventVO getDetail(TaskLabelReportingEventVO taskLabelReportingEvent);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java b/src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java
deleted file mode 100644
index e9754b9..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskNoFraudReportingDTO;
-import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import org.springblade.modules.task.excel.TaskNoExplosionExcel;
-import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 无炸上报任务表 服务类
- *
- * @author BladeX
- * @since 2024-04-10
- */
-public interface ITaskNoFraudReportingService extends IService<TaskNoFraudReportingEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskNoFraudReporting
- * @return
- */
- IPage<TaskNoFraudReportingVO> selectTaskNoFraudReportingPage(IPage<TaskNoFraudReportingVO> page, TaskNoFraudReportingVO taskNoFraudReporting);
-
-
- Boolean saveNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReporting);
-
- TaskNoFraudReportingVO selectTaskNoFraudReportingById(TaskNoFraudReportingEntity taskNoFraudReporting);
-
- List<TaskNoExplosionExcel> exportTaskNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReportingVO);
-
- Boolean updateTaskNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReporting);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskPlaceRecordService.java b/src/main/java/org/springblade/modules/task/service/ITaskPlaceRecordService.java
deleted file mode 100644
index e9222a7..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskPlaceRecordService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskPlaceRecordDTO;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 消防自查详情记录表 服务类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-public interface ITaskPlaceRecordService extends IService<TaskPlaceRecordEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskPlaceRecord
- * @return
- */
- IPage<TaskPlaceRecordVO> selectTaskPlaceRecordPage(IPage<TaskPlaceRecordVO> page, TaskPlaceRecordVO taskPlaceRecord);
-
-
- /**
- * 查询消防自查详情记录表
- *
- * @param id 消防自查详情记录表ID
- * @return 消防自查详情记录表
- */
- public TaskPlaceRecordDTO selectTaskPlaceRecordById(Long id);
-
- /**
- * 查询消防自查详情记录表列表
- *
- * @param taskPlaceRecordDTO 消防自查详情记录表
- * @return 消防自查详情记录表集合
- */
- public List<TaskPlaceRecordDTO> selectTaskPlaceRecordList(TaskPlaceRecordDTO taskPlaceRecordDTO);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskPlaceRectificationService.java b/src/main/java/org/springblade/modules/task/service/ITaskPlaceRectificationService.java
deleted file mode 100644
index 59055ad..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskPlaceRectificationService.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskPlaceRectificationDTO;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import org.springblade.modules.task.excel.PlaceRectificationsExcel;
-import org.springblade.modules.task.excel.TaskPlaceRectificationExcel;
-import org.springblade.modules.task.vo.TaskPlaceRectificationVO;
-import org.springblade.modules.task.vo.TaskPlaceRectificationsVO;
-
-import java.util.List;
-
-/**
- * 场所整改任务表 服务类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-public interface ITaskPlaceRectificationService extends IService<TaskPlaceRectificationEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskPlaceRectification
- * @return
- */
- IPage<TaskPlaceRectificationVO> selectTaskPlaceRectificationPage(IPage<TaskPlaceRectificationVO> page, TaskPlaceRectificationVO taskPlaceRectification);
-
- /**
- * 查询场所整改任务表
- *
- * @param taskId 场所整改任务表ID
- * @return 场所整改任务表
- */
- public TaskPlaceRectificationVO selectTaskPlaceRectificationById(Long taskId);
-
- /**
- * 查询场所整改任务表列表
- *
- * @param taskPlaceRectificationDTO 场所整改任务表
- * @return 场所整改任务表集合
- */
- public IPage<TaskPlaceRectificationVO> selectTaskPlaceRectificationList(IPage<TaskPlaceRectificationVO> page, TaskPlaceRectificationDTO taskPlaceRectificationDTO);
-
- Boolean updateRectification(TaskPlaceRectificationVO taskPlaceRectification);
-
- Boolean applyRectification(TaskPlaceRectificationVO taskPlaceRectification);
-
- Object rectificationStatistics(TaskPlaceRectificationVO taskPlaceRectification);
-
- List<TaskPlaceRectificationExcel> export(TaskPlaceRectificationsVO taskPlaceRectificationVO);
-
- void importPlaceRectifications(List<PlaceRectificationsExcel> data, Boolean isCovered);
-
- Integer getCount(String neiCode, int i);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskPlaceSelfCheckService.java b/src/main/java/org/springblade/modules/task/service/ITaskPlaceSelfCheckService.java
deleted file mode 100644
index 2b07758..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskPlaceSelfCheckService.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel;
-import org.springblade.modules.task.vo.TaskPlaceSelfCheckVO;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 消防自查记任务表 服务类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-public interface ITaskPlaceSelfCheckService extends IService<TaskPlaceSelfCheckEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskPlaceSelfCheck
- * @return
- */
- IPage<TaskPlaceSelfCheckVO> selectTaskPlaceSelfCheckPage(IPage<TaskPlaceSelfCheckVO> page, TaskPlaceSelfCheckVO taskPlaceSelfCheck);
-
- /**
- * 查询消防自查记任务表
- *
- * @param id 消防自查记任务表ID
- * @return 消防自查记任务表
- */
- public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(TaskPlaceSelfCheckEntity taskPlaceSelfCheck);
-
- /**
- * 查询消防自查记任务表列表
- *
- * @param taskPlaceSelfCheckDTO 消防自查记任务表
- * @return 消防自查记任务表集合
- */
- public List<TaskPlaceSelfCheckDTO> selectTaskPlaceSelfCheckList(TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO);
-
-
- Boolean savePlace(TaskPlaceSelfCheckVO taskPlaceSelfCheck);
-
- Boolean updateTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck);
-
- /**
- * 导出消防自查信息
- *
- * @param taskPlaceSelfCheck
- * @return
- */
- List<TaskPlaceSelfCheckExcel> exportTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck);
-
- Integer getCount(String neiCode, int i, int type);
-
- /**
- * @param taskId
- * @return
- */
- TaskPlaceSelfCheckEntity getDetailByTaskId(Long taskId);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskRepairAppraiseService.java b/src/main/java/org/springblade/modules/task/service/ITaskRepairAppraiseService.java
deleted file mode 100644
index 5c1a3af..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskRepairAppraiseService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskRepairAppraiseDTO;
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.modules.task.vo.TaskRepairAppraiseVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 报事报修评分表 服务类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-public interface ITaskRepairAppraiseService extends IService<TaskRepairAppraiseEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param task
- * @return
- */
- IPage<TaskRepairAppraiseVO> selectTaskRepairAppraisePage(IPage<TaskRepairAppraiseVO> page, TaskRepairAppraiseVO task);
-
-
- /**
- * 查询报事报修评分表
- *
- * @param id 报事报修评分表ID
- * @return 报事报修评分表
- */
- public TaskRepairAppraiseDTO selectTaskRepairAppraiseById(Integer id);
-
- /**
- * 查询报事报修评分表列表
- *
- * @param taskRepairAppraiseDTO 报事报修评分表
- * @return 报事报修评分表集合
- */
- public List<TaskRepairAppraiseDTO> selectTaskRepairAppraiseList(TaskRepairAppraiseDTO taskRepairAppraiseDTO);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskRepairStepService.java b/src/main/java/org/springblade/modules/task/service/ITaskRepairStepService.java
deleted file mode 100644
index 9f8242b..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskRepairStepService.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.dto.TaskRepairStepDTO;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.modules.task.vo.TaskRepairStepVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 报事报修事件步骤表 服务类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-public interface ITaskRepairStepService extends IService<TaskRepairStepEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param task
- * @return
- */
- IPage<TaskRepairStepVO> selectTaskRepairStepPage(IPage<TaskRepairStepVO> page, TaskRepairStepVO task);
-
- /**
- * 查询报事报修事件步骤表
- *
- * @param id 报事报修事件步骤表ID
- * @return 报事报修事件步骤表
- */
- public TaskRepairStepDTO selectTaskRepairStepById(Integer id);
-
- /**
- * 查询报事报修事件步骤表列表
- *
- * @param taskRepairStepDTO 报事报修事件步骤表
- * @return 报事报修事件步骤表集合
- */
- public List<TaskRepairStepDTO> selectTaskRepairStepList(TaskRepairStepDTO taskRepairStepDTO);
-
- Boolean saveTaskRepairStep(TaskRepairStepVO task);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskReportForRepairsService.java b/src/main/java/org/springblade/modules/task/service/ITaskReportForRepairsService.java
deleted file mode 100644
index 29ea88d..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskReportForRepairsService.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springblade.modules.task.vo.TaskReportStatistics;
-
-import java.util.List;
-
-/**
- * 报事报修任务表 服务类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface ITaskReportForRepairsService extends BaseService<TaskReportForRepairsEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskReportForRepairs
- * @return
- */
- IPage<TaskReportForRepairsVO> selectTaskReportForRepairsPage(IPage<TaskReportForRepairsVO> page, TaskReportForRepairsVO taskReportForRepairs);
-
- /**
- * 查询报事报修统计
- *
- * @return
- */
- TaskReportStatistics getStatisticsCount(String houseCode);
-
- /**
- * 报事报修任务表 新增
- * @param taskReportForRepairs
- * @return
- */
- boolean saveTaskReportForRepairs(TaskReportForRepairsEntity taskReportForRepairs);
-
- /**
- * 报事报修任务表 自定义修改
- * @param taskReportForRepairs
- * @return
- */
- boolean updateTaskReportForRepairs(TaskReportForRepairsEntity taskReportForRepairs);
-
- /**
- * 报事报修任务表 审核
- * @param taskReportForRepairs
- * @return
- */
- boolean checkReportForRepairs(TaskReportForRepairsEntity taskReportForRepairs);
-
- Integer getStatistics(Long userId,String neiCode, List<String> regionChildCodesList,
- Integer isAdministrator,
- List<String> gridCodeList);
-
- /**
- * 更新状态--临时接口
- * @param gridman
- * @return
- */
- boolean updateView(GridmanEntity gridman);
-
- Object getReportForStatistics(String code, String roleType);
-
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskResidencePermitApplyService.java b/src/main/java/org/springblade/modules/task/service/ITaskResidencePermitApplyService.java
deleted file mode 100644
index 0b95548..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskResidencePermitApplyService.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import org.springblade.modules.task.vo.TaskResidencePermitApplyVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 居住证申请 服务类
- *
- * @author BladeX
- * @since 2024-03-14
- */
-public interface ITaskResidencePermitApplyService extends IService<TaskResidencePermitApplyEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskResidencePermitApply
- * @return
- */
- IPage<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage<TaskResidencePermitApplyVO> page, TaskResidencePermitApplyVO taskResidencePermitApply);
-
- /**
- * 新增
- * @param taskResidencePermitApply
- * @return
- */
- Boolean saveResidencePermitApplyEntity(TaskResidencePermitApplyEntity taskResidencePermitApply);
-
- /**
- * 统计数量
- * @param neiCode
- * @param i
- * @return
- */
- Integer getCount(String neiCode, int status);
-
- /**
- * 审核
- * @param taskResidencePermitApply
- * @return
- */
- Boolean updateResidencePermitApplyEntity(TaskResidencePermitApplyEntity taskResidencePermitApply);
-
- /**
- * 居住证申请 删除
- * @param toLongList
- * @return
- */
- boolean removeTaskResidencePermitApplyBatchByIds(List<Long> toLongList);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskSchoolEvenService.java b/src/main/java/org/springblade/modules/task/service/ITaskSchoolEvenService.java
deleted file mode 100644
index 321ea57..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskSchoolEvenService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import liquibase.pro.packaged.I;
-import org.springblade.modules.task.vo.TaskSchoolEvenVO;
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 校园事件 服务类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-public interface ITaskSchoolEvenService extends IService<TaskSchoolEvenEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskSchoolEven
- * @return
- */
- IPage<TaskSchoolEvenVO> selectTaskSchoolEvenPage(IPage<TaskSchoolEvenVO> page, TaskSchoolEvenVO taskSchoolEven);
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskService.java b/src/main/java/org/springblade/modules/task/service/ITaskService.java
deleted file mode 100644
index c667956..0000000
--- a/src/main/java/org/springblade/modules/task/service/ITaskService.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.vo.TaskVO;
-
-/**
- * 任务表 服务类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public interface ITaskService extends IService<TaskEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param task
- * @return
- */
- IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task);
-
- /**
- * 新增任务
- *
- * @param type
- * @param name
- * @param frequency
- * @param remark
- * @param createUser
- * @return
- */
- Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser,String houseCode,Integer reportType,Integer status);
-
- /**
- * @param type
- * @param name
- * @param frequency
- * @param remark
- * @param updateUser
- * @param id
- * @return
- */
- Long updateTask(Integer type, String name, Integer frequency, String remark, Long updateUser, Long id, Integer status);
-
- Object countNumber(String houseCode, Integer status);
-
- Object countTypeNumber(Integer roleType, String neiCode);
-
- Object countFrequencyNumber();
-
- Boolean removeTask(TaskEntity task);
-
- IPage<TaskVO> getBailReportingPage(IPage<TaskVO> page, TaskVO task);
-
- /**
- * 根据类型创建任务
- * @param param 参数
- * @return
- */
- boolean createTaskJob(String param);
-
- /**
- * 任务审核
- * @param task
- * @return
- */
- Boolean examine(TaskEntity task);
-
- boolean createResidenceSendSms(String param);
-
- boolean createSchoolSendSms(String param);
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/ECallEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/ECallEventServiceImpl.java
deleted file mode 100644
index f9b0423..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/ECallEventServiceImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.circle.entity.CircleEntity;
-import org.springblade.modules.circle.service.ICircleService;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.service.IDeptService;
-import org.springblade.modules.task.entity.ECallEventEntity;
-import org.springblade.modules.task.vo.ECallEventVO;
-import org.springblade.modules.task.mapper.EcCallEventMapper;
-import org.springblade.modules.task.service.IECallEventService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * e呼即办表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-07
- */
-@Service
-public class ECallEventServiceImpl extends ServiceImpl<EcCallEventMapper, ECallEventEntity> implements IECallEventService {
-
- @Override
- public IPage<ECallEventVO> selectECallEventPage(IPage<ECallEventVO> page, ECallEventVO eCallEvent) {
- CommonParamSet invoke = new CommonParamSet<>().invoke(ECallEventVO.class, eCallEvent);
- return page.setRecords(baseMapper.selectECallEventPage(page,
- eCallEvent,
- invoke.getRegionChildCodesList(),
- invoke.getGridCodeList(),
- invoke.getIsAdministrator()));
- }
-
- /**
- * e呼即办数据处理
- */
- @Override
- public Object dataHandle() {
- List<ECallEventEntity> list = list();
- // 遍历
- for (ECallEventEntity eCallEventEntity : list) {
- if (!Strings.isBlank(eCallEventEntity.getLocation())){
- String[] split = eCallEventEntity.getLocation().split(",");
- eCallEventEntity.setAddress(split[2]);
- // 更新
- updateById(eCallEventEntity);
- }
- }
- return null;
- }
-
- /**
- * e呼即办数据批量分享到圈子
- * @param type 0 :邻里 1协同
- * @return
- */
- @Override
- public boolean batchShareCircle(Integer type) {
- boolean flag = true;
- ICircleService circleService = SpringUtils.getBean(ICircleService.class);
- // 查询未分享到圈子的内容
- List<ECallEventEntity> list = baseMapper.getNotShareCircleList();
- // 遍历插入到圈子表
- for (ECallEventEntity callEventEntity : list) {
- CircleEntity circleEntity = new CircleEntity();
- circleEntity.setEventId(callEventEntity.getId());
- circleEntity.setEvenType(2);
- circleEntity.setCommunityCode(callEventEntity.getCommunityCode());
- circleEntity.setCircleType(type);
- circleEntity.setCircleText(callEventEntity.getRemark());
- circleEntity.setHouseCode(callEventEntity.getAddressCode());
- circleEntity.setCircleImages(callEventEntity.getImageUrls());
- // 保存
- circleService.saveCircle(circleEntity);
- }
- return flag;
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java
deleted file mode 100644
index e652148..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.exception.CustomException;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.task.dto.TaskBailReportingEventDTO;
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import org.springblade.modules.task.mapper.TaskBailReportingEventMapper;
-import org.springblade.modules.task.service.ITaskBailReportingEventService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskBailReportingEventVO;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.Date;
-
-/**
- * 取保候审任务 服务实现类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Service
-public class TaskBailReportingEventServiceImpl extends BaseServiceImpl<TaskBailReportingEventMapper, TaskBailReportingEventEntity> implements ITaskBailReportingEventService {
-
- @Resource
- private ITaskService taskService;
-
- @Override
- public IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent) {
- return page.setRecords(baseMapper.selectTaskBailReportingEventPage(page, taskBailReportingEvent));
- }
-
-
- @Override
- public Boolean saveBailReporting(TaskBailReportingEventDTO bailReporting) {
- Long aLong = taskService.saveTask(3,
- DictConstant.BAIL_PENDING_TRIAL,
- 1, bailReporting.getApplyName(),
- AuthUtil.getUserId(),
- bailReporting.getHouseCode(),
- bailReporting.getReportType(),1);
- if (aLong > 0) {
- bailReporting.setTaskId(aLong);
- bailReporting.setCheckUserId(AuthUtil.getUserId());
- return baseMapper.insert(bailReporting) > 0;
- }
- return false;
- }
-
- @Override
- public Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) {
- Integer integer = StringUtils.isBlank(taskBailReportingEvent.getConfirmFlag()) ? null : Integer.valueOf(taskBailReportingEvent.getConfirmFlag());
- Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskBailReportingEvent.getTaskId(), integer);
- if (aLong > 0) {
- taskBailReportingEvent.setConfirmUserId(AuthUtil.getUserId());
- taskBailReportingEvent.setConfirmTime(new Date());
- Boolean b = baseMapper.updateById(taskBailReportingEvent) > 0;
- if (b) {
- return b;
- }
- throw new CustomException("更新失败!");
- }
- return false;
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
deleted file mode 100644
index 0239945..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.exception.CustomException;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.task.dto.TaskCampusReportingEventDTO;
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-import org.springblade.modules.task.mapper.TaskCampusReportingEventMapper;
-import org.springblade.modules.task.service.ITaskCampusReportingEventService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.Date;
-
-/**
- * 校园安全检查任务表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Service
-public class TaskCampusReportingEventServiceImpl extends ServiceImpl<TaskCampusReportingEventMapper, TaskCampusReportingEventEntity> implements ITaskCampusReportingEventService {
-
- @Autowired
- @Lazy
- private ITaskService taskService;
-
- @Autowired
- private IPlaceService placeService;
-
- @Override
- public IPage<TaskCampusReportingEventVO> selectTaskCampusReportingEventPage(IPage<TaskCampusReportingEventVO> page, TaskCampusReportingEventVO taskCampusReportingEvent) {
- return page.setRecords(baseMapper.selectTaskCampusReportingEventPage(page, taskCampusReportingEvent));
- }
-
-
- /**
- * 自定义新增
- * @param reporting
- * @return
- */
- @Override
- public Boolean saveCampusReporting(TaskCampusReportingEventDTO reporting) {
- Long aLong = taskService.saveTask(1, DictConstant.CAMPUS_SECURITY_INSPECTION, 1 , "",
- AuthUtil.getUserId(),reporting.getHouseCode(),reporting.getReportType(),0);
- if (aLong > 0) {
- // 通过houseCode 获取场所id
- QueryWrapper<PlaceEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted",0).eq("house_code",reporting.getHouseCode());
- PlaceEntity placeEntity = placeService.getOne(queryWrapper);
- reporting.setPlaceId(placeEntity.getId());
- reporting.setTaskId(aLong);
- reporting.setCheckUserId(AuthUtil.getUserId());
- return baseMapper.insert(reporting) > 0;
- }
- return false;
- }
-
-
- @Override
- public Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) {
- Integer integer = null==taskCampusReportingEvent.getStatus() ? null : taskCampusReportingEvent.getStatus();
- Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskCampusReportingEvent.getTaskId(), integer);
- if (aLong > 0) {
- if (null!=taskCampusReportingEvent.getStatus()
- && taskCampusReportingEvent.getStatus()!=4) {
- taskCampusReportingEvent.setConfirmFlag(taskCampusReportingEvent.getStatus().toString());
- taskCampusReportingEvent.setConfirmUserId(AuthUtil.getUserId());
- taskCampusReportingEvent.setConfirmTime(new Date());
- }
- Boolean b = baseMapper.updateById(taskCampusReportingEvent) > 0;
- if (b) {
- return b;
- }
- throw new CustomException("更新失败!");
- }
- return false;
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java
deleted file mode 100644
index 5cfbea8..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.exception.CustomException;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.system.entity.Dict;
-import org.springblade.modules.task.dto.TaskHotelReportingDTO;
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import org.springblade.modules.task.mapper.TaskHotelReportingMapper;
-import org.springblade.modules.task.service.ITaskHotelReportingService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskHotelReportingVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import java.util.Date;
-
-/**
- * 旅馆安全自查任务 服务实现类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Service
-public class TaskHotelReportingServiceImpl extends ServiceImpl<TaskHotelReportingMapper, TaskHotelReportingEntity> implements ITaskHotelReportingService {
-
- @Resource
- @Lazy
- private ITaskService taskService;
-
- @Autowired
- private IPlaceService placeService;
-
- @Override
- public IPage<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage<TaskHotelReportingVO> page, TaskHotelReportingVO taskHotelReporting) {
- return page.setRecords(baseMapper.selectTaskHotelReportingPage(page, taskHotelReporting));
- }
-
-
- @Override
- public boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting) {
- String name = DictConstant.HOTEL_SECURITY;
- // 九小场所
- if (taskHotelReporting.getEventType().equals(1)) {
- taskHotelReporting.setReportType(7);
- name = DictConstant.FIRE_CHECK;
- }
- Long aLong = taskService.saveTask(2, name, 1, "", AuthUtil.getUserId(),
- taskHotelReporting.getHouseCode(), taskHotelReporting.getReportType(),0);
- if (aLong > 0) {
- // 通过houseCode 获取场所id
- QueryWrapper<PlaceEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("house_code", taskHotelReporting.getHouseCode());
- PlaceEntity placeEntity = placeService.getOne(queryWrapper);
- taskHotelReporting.setPlaceId(placeEntity.getId());
- taskHotelReporting.setTaskId(aLong);
- taskHotelReporting.setCheckUserId(AuthUtil.getUserId());
- return baseMapper.insert(taskHotelReporting) > 0;
- }
- return false;
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean updateHotelReporting(TaskHotelReportingVO taskHotelReporting) {
- Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskHotelReporting.getTaskId(), taskHotelReporting.getStatus());
- if (aLong > 0) {
- if (null!=taskHotelReporting.getStatus()
- && taskHotelReporting.getStatus()!=4) {
- taskHotelReporting.setConfirmFlag(taskHotelReporting.getStatus().toString());
- taskHotelReporting.setConfirmUserId(AuthUtil.getUserId());
- taskHotelReporting.setConfirmTime(new Date());
- }
- boolean b = baseMapper.updateById(taskHotelReporting) > 0;
- if (b) {
- return b;
- }
- throw new CustomException("更新失败!");
- }
- return false;
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
deleted file mode 100644
index db1d402..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.exception.CustomException;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import org.springblade.modules.task.excel.TaskLabelReportingEventExcel;
-import org.springblade.modules.task.mapper.TaskLabelReportingEventMapper;
-import org.springblade.modules.task.service.ITaskLabelReportingEventService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 打金店报事 服务实现类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Service
-public class TaskLabelReportingEventServiceImpl extends ServiceImpl<TaskLabelReportingEventMapper, TaskLabelReportingEventEntity> implements ITaskLabelReportingEventService {
-
- @Resource
- @Lazy
- private ITaskService taskService;
-
- @Autowired
- private IPlaceService placeService;
-
- @Override
- public IPage<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage<TaskLabelReportingEventVO> page, TaskLabelReportingEventVO taskLabelReportingEvent) {
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskLabelReportingEventVO.class,taskLabelReportingEvent);
- List<String> regionChildCodesList = commonParamSet.getRegionChildCodesList();
- Integer isAdministrator = commonParamSet.getIsAdministrator();
- List<String> gridCodeList = commonParamSet.getGridCodeList();
- return page.setRecords(baseMapper.selectTaskLabelReportingEventPage(page, taskLabelReportingEvent,regionChildCodesList,isAdministrator,gridCodeList));
- }
-
- @Override
- public Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent) {
- Long aLong = taskService.saveTask(1, DictConstant.SECOND_HAND_TRANSACTION, 1, "", AuthUtil.getUserId(),
- taskLabelReportingEvent.getHouseCode(), taskLabelReportingEvent.getReportType(), 1);
- if (aLong > 0) {
- // 通过houseCode 获取场所id
- QueryWrapper<PlaceEntity> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("house_code", taskLabelReportingEvent.getHouseCode());
- PlaceEntity placeEntity = placeService.getOne(queryWrapper);
- taskLabelReportingEvent.setPlaceId(placeEntity.getId());
- taskLabelReportingEvent.setTaskId(aLong);
- taskLabelReportingEvent.setUserId(AuthUtil.getUserId());
- taskLabelReportingEvent.setLabelName(DictConstant.SECOND_HAND_TRANSACTION);
- return baseMapper.insert(taskLabelReportingEvent) > 0;
- }
- return false;
- }
-
-
- @Override
- public Boolean updateLabelReporting(TaskLabelReportingEventVO taskLabelReportingEvent) {
- Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(),
- taskLabelReportingEvent.getTaskId(), taskLabelReportingEvent.getStatus());
- if (aLong > 0) {
- taskLabelReportingEvent.setConfirmFlag(taskLabelReportingEvent.getStatus().toString());
- taskLabelReportingEvent.setConfirmUserId(AuthUtil.getUserId());
- if (null != taskLabelReportingEvent.getStatus()
- && taskLabelReportingEvent.getStatus() != 4) {
- taskLabelReportingEvent.setConfirmFlag(taskLabelReportingEvent.getStatus().toString());
- taskLabelReportingEvent.setConfirmUserId(AuthUtil.getUserId());
- taskLabelReportingEvent.setConfirmTime(new Date());
- }
- Boolean b = baseMapper.updateById(taskLabelReportingEvent) > 0;
- if (b) {
- return b;
- }
- throw new CustomException("更新失败!");
- }
- return false;
- }
-
-
- /**
- * 查询打金店报事
- *
- * @param id 打金店报事ID
- * @return 打金店报事
- */
- @Override
- public TaskLabelReportingEventDTO selectTaskLabelReportingEventById(Long id) {
- return this.baseMapper.selectTaskLabelReportingEventById(id);
- }
-
- /**
- * 查询打金店报事列表
- *
- * @param taskLabelReportingEventDTO 打金店报事
- * @return 打金店报事集合
- */
- @Override
- public List<TaskLabelReportingEventDTO> selectTaskLabelReportingEventList(TaskLabelReportingEventDTO taskLabelReportingEventDTO) {
- return this.baseMapper.selectTaskLabelReportingEventList(taskLabelReportingEventDTO);
- }
-
- /**
- * 导出二手交易信息
- * @param taskLabelReportingEvent
- */
- @Override
- public List<TaskLabelReportingEventExcel> exportTaskLabelReportingEvent(TaskLabelReportingEventVO taskLabelReportingEvent) {
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskLabelReportingEventVO.class,taskLabelReportingEvent);
- return baseMapper.exportTaskLabelReportingEventList(taskLabelReportingEvent,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(),
- commonParamSet.getGridCodeList());
- }
-
- /**
- * 二手交易 删除
- * @param toLongList
- * @return
- */
- @Override
- public boolean removeTaskByIds(List<Long> toLongList) {
- boolean flag = false;
- for (Long id : toLongList) {
- // 先查询对应的任务id
- TaskLabelReportingEventEntity labelReportingEventEntity = getById(id);
- // 删除二手交易
- flag = removeById(id);
- if (flag){
- // 删除对应的任务
- flag = taskService.removeById(labelReportingEventEntity.getTaskId());
- }
- }
- // 返回
- return flag;
- }
-
- /**
- * 二手交易报事 自定义详情
- * @param taskLabelReportingEvent
- * @return
- */
- @Override
- public TaskLabelReportingEventVO getDetail(TaskLabelReportingEventVO taskLabelReportingEvent) {
- return baseMapper.getDetail(taskLabelReportingEvent);
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java
deleted file mode 100644
index 092130d..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.exception.CustomException;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.excel.TaskNoExplosionExcel;
-import org.springblade.modules.task.mapper.TaskNoFraudReportingMapper;
-import org.springblade.modules.task.service.ITaskNoFraudReportingService;
-import org.springblade.modules.task.service.ITaskPlaceRecordService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 无炸上报任务表 服务实现类
- *
- * @author BladeX
- * @since 2024-04-10
- */
-@Service
-public class TaskNoFraudReportingServiceImpl extends ServiceImpl<TaskNoFraudReportingMapper, TaskNoFraudReportingEntity> implements ITaskNoFraudReportingService {
-
- @Override
- public IPage<TaskNoFraudReportingVO> selectTaskNoFraudReportingPage(IPage<TaskNoFraudReportingVO> page, TaskNoFraudReportingVO taskNoFraudReporting) {
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskNoFraudReportingVO.class, taskNoFraudReporting);
- List<TaskNoFraudReportingVO> taskNoFraudReportingVOS = baseMapper.selectTaskNoFraudReportingPage(page,
- taskNoFraudReporting,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList());
- return page.setRecords(taskNoFraudReportingVOS);
- }
-
- @Override
- public TaskNoFraudReportingVO selectTaskNoFraudReportingById(TaskNoFraudReportingEntity taskNoFraudReporting) {
- return this.baseMapper.selectTaskNoFraudReportingById(taskNoFraudReporting);
- }
-
- @Override
- public Boolean saveNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReporting) {
- taskNoFraudReporting.setCreateUser(AuthUtil.getUserId());
- // 1.保存任务表
- ITaskService bean2 = SpringUtils.getBean(ITaskService.class);
- Long aLong = bean2.saveTask(CommonConstant.NUMBER_ONE, DictConstant.NO_FRAUD_REPORTING, 1,
- "", AuthUtil.getUserId(), taskNoFraudReporting.getHouseCode(), CommonConstant.NUMBER_SIX, 1);
- if (aLong <= 0) {
- return false;
- }
- taskNoFraudReporting.setTaskId(aLong);
- // 2.保存任务详情
- boolean save = save(taskNoFraudReporting);
- if (save) {
- // 3.保存题目记录
- List<TaskPlaceRecordVO> taskPlaceRecordList = taskNoFraudReporting.getTaskPlaceRecordVOList();
- ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class);
- taskPlaceRecordList.stream().forEach(item -> {
- item.setTaskPlaceSelfCheckId(taskNoFraudReporting.getId());
- item.setCreateUser(AuthUtil.getUserId());
- item.setType("2");
- });
- List<TaskPlaceRecordEntity> collect = taskPlaceRecordList.stream().collect(Collectors.toList());
- if (collect.size() > 0) {
- bean.saveBatch(collect);
- }
- updateById(taskNoFraudReporting);
- return save;
- }
- return false;
- }
-
- @Override
- public List<TaskNoExplosionExcel> exportTaskNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReportingVO) {
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskNoFraudReportingVO.class, taskNoFraudReportingVO);
- List<TaskNoExplosionExcel> taskNoExplosionExcels = baseMapper.selectTaskNoFraudReporting(
- taskNoFraudReportingVO,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList());
- return taskNoExplosionExcels;
- }
-
- /**
- * 更新
- * @param taskNoFraudReporting
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean updateTaskNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReporting){
- // 1.更新任务表
- ITaskService taskService = SpringUtils.getBean(ITaskService.class);
- Long aLong = taskService.updateTask(null, null, null, taskNoFraudReporting.getReasonFailure(), AuthUtil.getUserId(), taskNoFraudReporting.getTaskId(), taskNoFraudReporting.getStatus());
- if (aLong <= 0) {
- return false;
- }
- // 2.更新任务详情
- boolean save = updateById(taskNoFraudReporting);
- if (save) {
- // 3.更新或新增题目记录
- List<TaskPlaceRecordVO> taskPlaceRecordList = taskNoFraudReporting.getTaskPlaceRecordVOList();
- if (taskPlaceRecordList != null && taskPlaceRecordList.size() > 0) {
- ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class);
- List<TaskPlaceRecordEntity> recordEntityList = BeanUtil.copy(taskPlaceRecordList, TaskPlaceRecordEntity.class);
- for (TaskPlaceRecordEntity taskPlaceRecordEntity : recordEntityList) {
- taskPlaceRecordEntity.setType("2");
- }
- boolean result = bean.saveOrUpdateBatch(recordEntityList);
- if (result) {
- return result;
- }
- throw new CustomException("保存失败!");
- }
- return save;
- }
- throw new CustomException("保存失败!");
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRecordServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRecordServiceImpl.java
deleted file mode 100644
index f69453f..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRecordServiceImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.task.dto.TaskPlaceRecordDTO;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springblade.modules.task.mapper.TaskPlaceRecordMapper;
-import org.springblade.modules.task.service.ITaskPlaceRecordService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 消防自查详情记录表 服务实现类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Service
-public class TaskPlaceRecordServiceImpl extends ServiceImpl<TaskPlaceRecordMapper, TaskPlaceRecordEntity> implements ITaskPlaceRecordService {
-
- @Override
- public IPage<TaskPlaceRecordVO> selectTaskPlaceRecordPage(IPage<TaskPlaceRecordVO> page, TaskPlaceRecordVO taskPlaceRecord) {
- return page.setRecords(baseMapper.selectTaskPlaceRecordPage(page, taskPlaceRecord));
- }
- /**
- * 查询消防自查详情记录表
- *
- * @param id 消防自查详情记录表ID
- * @return 消防自查详情记录表
- */
- @Override
- public TaskPlaceRecordDTO selectTaskPlaceRecordById(Long id)
- {
- return this.baseMapper.selectTaskPlaceRecordById(id);
- }
-
- /**
- * 查询消防自查详情记录表列表
- *
- * @param taskPlaceRecordDTO 消防自查详情记录表
- * @return 消防自查详情记录表集合
- */
- @Override
- public List<TaskPlaceRecordDTO> selectTaskPlaceRecordList(TaskPlaceRecordDTO taskPlaceRecordDTO)
- {
- return this.baseMapper.selectTaskPlaceRecordList(taskPlaceRecordDTO);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRectificationServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRectificationServiceImpl.java
deleted file mode 100644
index d21458b..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRectificationServiceImpl.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.util.Strings;
-import org.springblade.common.cache.SysCache;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.patrol.entity.PatrolRecord;
-import org.springblade.modules.patrol.service.IPatrolRecordService;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.system.entity.DictBiz;
-import org.springblade.modules.system.entity.Region;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IDictBizService;
-import org.springblade.modules.system.service.IRegionService;
-import org.springblade.modules.system.service.IUserService;
-import org.springblade.modules.system.vo.RegionVO;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.dto.TaskPlaceRectificationDTO;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import org.springblade.modules.task.excel.PlaceRectificationsExcel;
-import org.springblade.modules.task.excel.TaskPlaceRectificationExcel;
-import org.springblade.modules.task.mapper.TaskPlaceRectificationMapper;
-import org.springblade.modules.task.service.ITaskPlaceRectificationService;
-import org.springblade.modules.task.vo.TaskPlaceRectificationVO;
-import org.springblade.modules.task.vo.TaskPlaceRectificationsVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-
-/**
- * 场所整改任务表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@Service
-public class TaskPlaceRectificationServiceImpl extends ServiceImpl<TaskPlaceRectificationMapper, TaskPlaceRectificationEntity> implements ITaskPlaceRectificationService {
-
- @Autowired
- private IDictBizService dictBizService;
-
- @Override
- public IPage<TaskPlaceRectificationVO> selectTaskPlaceRectificationPage(IPage<TaskPlaceRectificationVO> page, TaskPlaceRectificationVO taskPlaceRectification) {
- return page.setRecords(baseMapper.selectTaskPlaceRectificationPage(page, taskPlaceRectification));
- }
-
-
- /**
- * 查询场所整改任务表
- *
- * @param taskId 场所整改任务表ID
- * @return 场所整改任务表
- */
- @Override
- public TaskPlaceRectificationVO selectTaskPlaceRectificationById(Long taskId) {
- return this.baseMapper.selectTaskPlaceRectificationById(taskId);
- }
-
- /**
- * 查询场所整改任务表列表
- *
- * @param taskPlaceRectificationDTO 场所整改任务表
- * @return 场所整改任务表集合
- */
- @Override
- public IPage<TaskPlaceRectificationVO> selectTaskPlaceRectificationList(IPage<TaskPlaceRectificationVO> page, TaskPlaceRectificationDTO taskPlaceRectificationDTO) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(TaskPlaceRectificationDTO.class, taskPlaceRectificationDTO);
- List<String> strings = new ArrayList<>();
- if (null != taskPlaceRectificationDTO.getNineType()) {
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("dict_key", taskPlaceRectificationDTO.getNineType()).eq("code", "nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size() == 0) {
- strings.add(taskPlaceRectificationDTO.getNineType());
- } else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- List<TaskPlaceRectificationVO> taskPlaceRectificationVOS = baseMapper.selectTaskPlaceRectificationList(page,
- taskPlaceRectificationDTO,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(),
- commonParamSet.getGridCodeList(),
- strings);
- for (TaskPlaceRectificationVO taskPlaceRectificationVO : taskPlaceRectificationVOS) {
- StringBuilder builder = new StringBuilder("");
- List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectificationVO.getPatrolRecordVOList();
- for (int i = 0; i < patrolRecordVOList.size(); i++) {
- if (patrolRecordVOList.get(i).getState().equals(0)) {
- builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; ");
- }
- }
- taskPlaceRectificationVO.setHiddenDanger(builder.toString());
- }
- return page.setRecords(taskPlaceRectificationVOS);
- }
-
- @Override
- public Boolean updateRectification(TaskPlaceRectificationVO taskPlaceRectification) {
- // 更新隐患项记录
- IPatrolRecordService patrolRecordService = SpringUtils.getBean(IPatrolRecordService.class);
- List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectification.getPatrolRecordVOList();
- boolean b = patrolRecordService.updateBatchById(BeanUtil.copy(patrolRecordVOList, PatrolRecord.class));
- if (b) {
- // 更新任务状态
- ITaskService bean = SpringUtils.getBean(ITaskService.class);
- boolean update = bean.update(Wrappers.<TaskEntity>lambdaUpdate()
- .set(TaskEntity::getStatus, taskPlaceRectification.getStatus())
- .eq(TaskEntity::getId, taskPlaceRectification.getTaskId()));
- // 更新任务详情状态
- boolean b1 = updateById(taskPlaceRectification);
- return b1;
- }
- return false;
- }
-
- @Override
- public Boolean applyRectification(TaskPlaceRectificationVO taskPlaceRectification) {
- // 更新任务状态
- ITaskService bean = SpringUtils.getBean(ITaskService.class);
- boolean update = bean.update(Wrappers.<TaskEntity>lambdaUpdate()
- .set(TaskEntity::getStatus, taskPlaceRectification.getStatus())
- .set(TaskEntity::getRemark, taskPlaceRectification.getReasonFailure())
- .eq(TaskEntity::getId, taskPlaceRectification.getTaskId()));
- // 更新任务详情状态
- if (taskPlaceRectification.getStatus().equals(2)) {
- taskPlaceRectification.setRectificationFlag(2);
- }
- boolean b1 = updateById(taskPlaceRectification);
- return b1;
- }
-
- @Override
- public Object rectificationStatistics(TaskPlaceRectificationVO taskPlaceRectification) {
- // todo
- List<String> regionChildCodesList = new ArrayList<>();//SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
- Integer isAdministrator = AuthUtil.isAdmin() == true ? 1 : 2;
- // 统计九小场所类型隐患统计
- IRegionService bean = SpringUtils.getBean(IRegionService.class);
- List<Region> list = bean.list(Wrappers.<Region>lambdaQuery()
- .like(Region::getCode, "361102")
- .eq(Region::getRegionLevel, 4));
- List<RegionVO> copy = BeanUtil.copy(list, RegionVO.class);
- for (RegionVO regionVO : copy) {
- List<Map<String, Object>> nineTypeStatistics = baseMapper.getNineTypeStatistics(regionVO.getCode(), regionChildCodesList, isAdministrator, taskPlaceRectification);
- regionVO.setNineTypeStatistics(nineTypeStatistics);
- }
- return copy;
- }
-
- @Override
- public List<TaskPlaceRectificationExcel> export(TaskPlaceRectificationsVO taskPlaceRectificationVO) {
- CommonParamSet commonParamSet = new CommonParamSet<>().invoke(TaskPlaceRectificationsVO.class, taskPlaceRectificationVO);
- List<String> strings = new ArrayList<>();
- if (null != taskPlaceRectificationVO.getNineType()) {
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("dict_key", taskPlaceRectificationVO.getNineType()).eq("code", "nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size() == 0) {
- strings.add(taskPlaceRectificationVO.getNineType());
- } else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- List<TaskPlaceRectificationExcel> export = baseMapper.export(
- taskPlaceRectificationVO,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(),
- commonParamSet.getGridCodeList(),
- strings);
- IDictBizService bean = SpringUtils.getBean(IDictBizService.class);
- List<DictBiz> nineType = bean.list(Wrappers.<DictBiz>lambdaQuery().eq(DictBiz::getCode, "nineType").eq(DictBiz::getIsDeleted, 0));
- for (TaskPlaceRectificationExcel taskPlaceRectificationExcel : export) {
- for (DictBiz dictBiz : nineType) {
- if (StringUtils.isNotBlank(taskPlaceRectificationExcel.getNineType()) && taskPlaceRectificationExcel.getNineType().equals(dictBiz.getDictKey())) {
- if (taskPlaceRectificationExcel.getNineType().contains("10,11,12")) {
- taskPlaceRectificationExcel.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue());
- } else if (taskPlaceRectificationExcel.getNineType().contains("13,14,15")) {
- taskPlaceRectificationExcel.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue());
- } else {
- taskPlaceRectificationExcel.setNineType(dictBiz.getDictValue());
- }
- }
- }
- if (taskPlaceRectificationExcel.getRectificationFlag().equals(1)) {
- taskPlaceRectificationExcel.setRectificationFlag("否");
- } else {
- taskPlaceRectificationExcel.setRectificationFlag("是");
- }
- if (taskPlaceRectificationExcel.getRectificationNoticeFlag().equals(1)) {
- taskPlaceRectificationExcel.setRectificationNoticeFlag("否");
- } else {
- taskPlaceRectificationExcel.setRectificationNoticeFlag("是");
- }
- StringBuilder builder = new StringBuilder("");
- List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectificationExcel.getPatrolRecordVOList();
- for (int i = 0; i < patrolRecordVOList.size(); i++) {
- if (patrolRecordVOList.get(i).getState().equals(0)) {
- builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; ");
- }
- }
- taskPlaceRectificationExcel.setHiddenDanger(builder.toString());
- }
- return export;
- }
-
-
- @Override
- public void importPlaceRectifications(List<PlaceRectificationsExcel> data, Boolean isCovered) {
- IPlaceService bean = SpringUtils.getBean(IPlaceService.class);
- IUserService bean1 = SpringUtils.getBean(IUserService.class);
- IDoorplateAddressService bean3 = SpringUtils.getBean(IDoorplateAddressService.class);
- IPlaceService bean4 = SpringUtils.getBean(IPlaceService.class);
- IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
-
- List<String> objects = new ArrayList<>();
- List<String> objects2 = new ArrayList<>();
- List<String> objects3 = new ArrayList<>();
- List<String> objects4 = new ArrayList<>();
- int a = 0;
- for (PlaceRectificationsExcel datum : data) {
- a++;
- System.out.println(a + "第几个:" + datum.getHouseCode());
- String phone1 = getPhone(datum.getPrincipals());
- String name = getName(datum.getPrincipals());
- datum.setPrincipalPhone(phone1);
- datum.setPrincipal(name);
- // 1.判断场所是否存在
- PlaceEntity one = bean.getOne(Wrappers.<PlaceEntity>lambdaQuery()
- .eq(PlaceEntity::getHouseCode, datum.getHouseCode())
- .eq(PlaceEntity::getIsDeleted, 0));
- if (one == null) {
- // 新增场所
- DoorplateAddressEntity doorplateAddressEntity = bean3.getOne(Wrappers.<DoorplateAddressEntity>lambdaQuery()
- .eq(DoorplateAddressEntity::getAddressCode, datum.getHouseCode()));
- if (doorplateAddressEntity != null) {
- objects.add(datum.getHouseCode());
- continue;
- } else {
- PoliceAffairsGridEntity one1 = policeAffairsGridService.getOne(Wrappers.<PoliceAffairsGridEntity>lambdaQuery()
- .like(PoliceAffairsGridEntity::getCommunityName, datum.getCommunityName()).last("limit 1"));
- if (one1 == null) {
- continue;
- }
- PlaceVO placeVO = new PlaceVO();
- placeVO.setJwGridCode(one1.getJwGridCode());
- placeVO.setHouseCode(datum.getHouseCode());
- placeVO.setIsNine(1);
- placeVO.setPrincipal(StringUtils.isBlank(datum.getPrincipal().trim()) ? "demo" : datum.getPrincipal().trim());
- placeVO.setPrincipalPhone(datum.getPrincipalPhone());
- placeVO.setRoleName("民警");
- placeVO.setLocation(datum.getPlaceAddress());
- placeVO.setSource(2);
- placeVO.setIsScene(1);
- placeVO.setIsNine(1);
- placeVO.setPlaceName(datum.getPlaceName());
- if (StringUtils.isNotBlank(datum.getNineType())) {
- placeVO.setNineType(Integer.valueOf(datum.getNineType()));
- }
- Boolean aBoolean = bean4.addOrUpdate(placeVO);
- objects2.add(datum.getHouseCode());
- continue;
- }
- }
- // 2.判断负责人电话是否存在
- if (StringUtils.isBlank(datum.getPrincipalPhone())) {
- objects4.add(datum.getHouseCode());
- continue;
- }
- // 2.判断负责人是否存在
- User one1 = bean1.getOne(Wrappers.<User>lambdaQuery()
- .eq(User::getPhone, datum.getPrincipalPhone())
- .eq(User::getIsDeleted, 0));
- if (one1 == null) {
- // 创建
- User newUser = new User();
- //如果用户不存在,则新增一个用户
- newUser.setAccount(datum.getPrincipalPhone().trim());
- newUser.setPhone(datum.getPrincipalPhone().trim());
- newUser.setName(StringUtils.isBlank(datum.getPrincipal().trim()) ? "demo" : datum.getPrincipal().trim());
- newUser.setRealName(StringUtils.isBlank(datum.getPrincipal().trim()) ? "demo" : datum.getPrincipal().trim());
- // 社区群众部门
- newUser.setDeptId("1727979636479037441");
- // 目前暂定居民角色,
- newUser.setRoleId("1717429059648606209");
- //默认密码为 123456
- newUser.setPassword("123456");
- // 用户新增
- boolean submit = bean1.submit(newUser);
- // 3.更新场所负责人
- one.setPrincipal(newUser.getRealName());
- one.setPrincipalUserId(newUser.getId());
- one.setPrincipalPhone(newUser.getPhone());
- one.setLocation(datum.getAddressName());
- one.setPlaceName(datum.getPlaceName());
- one.setIsNine(1);
- if (StringUtils.isNotBlank(datum.getNineType())) {
- one.setNineType(Integer.valueOf(datum.getNineType()));
- }
- bean.updateById(one);
- } else {
- if (one == null) {
- one = bean.getOne(Wrappers.<PlaceEntity>lambdaQuery()
- .eq(PlaceEntity::getHouseCode, datum.getHouseCode())
- .eq(PlaceEntity::getIsDeleted, 0));
- }
- // 3.更新场所负责人
- one.setIsNine(1);
- if (StringUtils.isNotBlank(datum.getNineType())) {
- one.setNineType(Integer.valueOf(datum.getNineType()));
- }
- one.setPrincipal(one1.getRealName());
- one.setPrincipalUserId(one1.getId());
- one.setPrincipalPhone(one1.getPhone());
- one.setLocation(datum.getAddressName());
- one.setPlaceName(datum.getPlaceName());
- bean.updateById(one);
- }
- }
- System.out.println("没有数据:" + JSON.toJSONString(objects));
- System.out.println("没有数据2:" + JSON.toJSONString(objects2));
- System.out.println("没有数据3:" + JSON.toJSONString(objects3));
- System.out.println("没有数据4:" + JSON.toJSONString(objects4));
- }
-
-
- private String getPhone(String text) {
- if (StringUtils.isBlank(text)) {
- return "";
- }
- Pattern pattern = Pattern.compile("1[3-9]\\d{9}");
- Matcher matcher = pattern.matcher(text);
-
- while (matcher.find()) {
- return matcher.group();
- }
- return "";
- }
-
- private String getName(String text) {
- if (StringUtils.isBlank(text)) {
- return "";
- }
- // Pattern pattern = Pattern.compile("[\\\\u4e00-\\\\u9fa5]+");
- // Matcher matcher = pattern.matcher(text);
-
- String result = text.replaceAll("[^\\u4e00-\\u9fa5]", "");
- // while (matcher.find()) {
- // return matcher.group();
- // }
- return result;
- }
-
- @Override
- public Integer getCount(String neiCode, int i) {
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- if (AuthUtils.isMj(roleName)) {
- // 民警角色
- List<String> regionChildCodesList = SpringUtil.getBean(IPoliceAffairsGridService.class)
- .getCommunityCodeListByUserId(AuthUtil.getUserId());
- TaskPlaceRectificationDTO taskPlaceRectificationDTO = new TaskPlaceRectificationDTO();
- taskPlaceRectificationDTO.setCommunityCode(neiCode);
- taskPlaceRectificationDTO.setStatus(i);
- taskPlaceRectificationDTO.setRoleName(roleName);
- return baseMapper.getCount(taskPlaceRectificationDTO, regionChildCodesList, 2);
- }
- return 0;
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java
deleted file mode 100644
index bf20c1c..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.exception.CustomException;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.system.entity.DictBiz;
-import org.springblade.modules.system.service.IDictBizService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.service.ITaskPlaceRecordService;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel;
-import org.springblade.modules.task.vo.TaskPlaceSelfCheckVO;
-import org.springblade.modules.task.mapper.TaskPlaceSelfCheckMapper;
-import org.springblade.modules.task.service.ITaskPlaceSelfCheckService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 消防自查记任务表 服务实现类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Service
-public class TaskPlaceSelfCheckServiceImpl extends ServiceImpl<TaskPlaceSelfCheckMapper, TaskPlaceSelfCheckEntity> implements ITaskPlaceSelfCheckService {
-
-
- @Autowired
- private IDictBizService dictBizService;
-
- @Override
- public IPage<TaskPlaceSelfCheckVO> selectTaskPlaceSelfCheckPage(IPage<TaskPlaceSelfCheckVO> page, TaskPlaceSelfCheckVO taskPlaceSelfCheck) {
- List<String> strings = new ArrayList<>();
- if (null != taskPlaceSelfCheck.getNineType()) {
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("dict_key", taskPlaceSelfCheck.getNineType()).eq("code", "nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size() == 0) {
- strings.add(taskPlaceSelfCheck.getNineType().toString());
- } else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskPlaceSelfCheckVO.class, taskPlaceSelfCheck);
- List<TaskPlaceSelfCheckVO> placeCheckVOS = baseMapper.selectTaskPlaceSelfCheckPage(page,
- taskPlaceSelfCheck,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList(),
- strings);
- List<DictBiz> nineType = dictBizService.list(Wrappers.<DictBiz>lambdaQuery().eq(DictBiz::getCode, "nineType").eq(DictBiz::getIsDeleted, 0));
- for (TaskPlaceSelfCheckVO placeCheckVO : placeCheckVOS) {
- int number = 0;
- for (TaskPlaceRecordVO patrolRecord : placeCheckVO.getTaskPlaceRecordVOList()) {
- if (patrolRecord.getState().equals(0)) {
- number++;
- }
- }
- placeCheckVO.setNumber(number);
- for (DictBiz dictBiz : nineType) {
- if (StringUtils.isNotBlank(placeCheckVO.getNineType()) && placeCheckVO.getNineType().equals(dictBiz.getDictKey())) {
- if (placeCheckVO.getNineType().contains("10,11,12")) {
- placeCheckVO.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue());
- } else if (placeCheckVO.getNineType().contains("13,14,15")) {
- placeCheckVO.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue());
- } else {
- placeCheckVO.setNineType(dictBiz.getDictValue());
- }
- }
- }
- }
- // 返回
- return page.setRecords(placeCheckVOS);
- }
-
- /**
- * 查询消防自查记任务表
- *
- * @param taskPlaceSelfCheck 消防自查记任务表ID
- * @return 消防自查记任务表
- */
- @Override
- public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(TaskPlaceSelfCheckEntity taskPlaceSelfCheck) {
- return this.baseMapper.selectTaskPlaceSelfCheckById(taskPlaceSelfCheck);
- }
-
- /**
- * 查询消防自查记任务表列表
- *
- * @param taskPlaceSelfCheckDTO 消防自查记任务表
- * @return 消防自查记任务表集合
- */
- @Override
- public List<TaskPlaceSelfCheckDTO> selectTaskPlaceSelfCheckList(TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO) {
- return this.baseMapper.selectTaskPlaceSelfCheckList(taskPlaceSelfCheckDTO);
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean savePlace(TaskPlaceSelfCheckVO taskPlaceSelfCheck) {
- taskPlaceSelfCheck.setCreateUser(AuthUtil.getUserId());
- // 1.保存任务表
- ITaskService iTaskService = SpringUtils.getBean(ITaskService.class);
- Long restults;
- if (taskPlaceSelfCheck.getType().equals("2")) {
- restults = iTaskService.saveTask(CommonConstant.NUMBER_ONE, DictConstant.FIRE_SCHOOL_CHECK_NOTICE, 1,
- "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_FOUR, 1);
- } else {
- restults = iTaskService.saveTask(CommonConstant.NUMBER_ONE, DictConstant.FIRE_SELF_CHECK_NOTICE, 1,
- "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_SEVEN, 1);
- }
- if (restults <= 0) {
- return false;
- }
- taskPlaceSelfCheck.setTaskId(restults);
- // 2.保存任务详情
- boolean save = save(taskPlaceSelfCheck);
- if (save) {
- // 3.保存题目记录
- List<TaskPlaceRecordVO> taskPlaceRecordList = taskPlaceSelfCheck.getTaskPlaceRecordVOList();
- ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class);
- taskPlaceRecordList.stream().forEach(item -> {
- item.setTaskPlaceSelfCheckId(taskPlaceSelfCheck.getId());
- item.setCreateUser(AuthUtil.getUserId());
- item.setType("1");
- });
- List<TaskPlaceRecordEntity> collect = taskPlaceRecordList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList());
- if (collect.size() > 0) {
- bean.saveBatch(collect);
- }
- updateById(taskPlaceSelfCheck);
- return save;
- }
- return false;
- }
-
- @Override
- @Transactional
- public Boolean updateTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck) {
- // 1.更新任务表
- ITaskService taskService = SpringUtils.getBean(ITaskService.class);
- Long aLong = taskService.updateTask(null, null, null, taskPlaceSelfCheck.getReasonFailure(), AuthUtil.getUserId(), taskPlaceSelfCheck.getTaskId(), taskPlaceSelfCheck.getStatus());
- if (aLong <= 0) {
- return false;
- }
- // 2.更新任务详情
- boolean save = updateById(taskPlaceSelfCheck);
- if (save) {
- // 3.更新题目记录
- List<TaskPlaceRecordVO> taskPlaceRecordList = taskPlaceSelfCheck.getTaskPlaceRecordVOList();
- if (taskPlaceRecordList != null && taskPlaceRecordList.size() > 0) {
- ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class);
- List<TaskPlaceRecordEntity> copy = BeanUtil.copy(taskPlaceRecordList, TaskPlaceRecordEntity.class);
- boolean b = bean.saveOrUpdateBatch(copy);
- if (b) {
- return b;
- }
- throw new CustomException("保存失败!");
- }
- return save;
- }
- throw new CustomException("保存失败!");
- }
-
- /**
- * 导出消防自查信息
- *
- * @param taskPlaceSelfCheck
- * @return
- */
- @Override
- public List<TaskPlaceSelfCheckExcel> exportTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck) {
- List<String> strings = new ArrayList<>();
- if (null != taskPlaceSelfCheck.getNineType()) {
- QueryWrapper<DictBiz> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("is_deleted", 0).eq("dict_key", taskPlaceSelfCheck.getNineType()).eq("code", "nineType");
- // 先查询当前
- DictBiz one = dictBizService.getOne(queryWrapper);
- // 查询本身和子集的key
- List<DictBiz> list = dictBizService.getList("nineType", one.getId());
- if (list.size() == 0) {
- strings.add(taskPlaceSelfCheck.getNineType().toString());
- } else {
- strings = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
- }
- }
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskPlaceSelfCheckVO.class, taskPlaceSelfCheck);
- List<TaskPlaceSelfCheckExcel> taskPlaceSelfCheckExcels = baseMapper.exportTaskPlaceSelfCheck(
- strings,
- taskPlaceSelfCheck,
- commonParamSet.getIsAdministrator(),
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList());
- // 返回
- List<DictBiz> nineType = dictBizService.list(Wrappers.<DictBiz>lambdaQuery().eq(DictBiz::getCode, "nineType").eq(DictBiz::getIsDeleted, 0));
- for (TaskPlaceSelfCheckExcel ninePlaceExcel : taskPlaceSelfCheckExcels) {
- for (DictBiz dictBiz : nineType) {
- if (StringUtils.isNotBlank(ninePlaceExcel.getNineType()) && ninePlaceExcel.getNineType().equals(dictBiz.getDictKey())) {
- if (ninePlaceExcel.getNineType().contains("10,11,12")) {
- ninePlaceExcel.setNineType("小学校(幼儿园、校外培训机构)- " + dictBiz.getDictValue());
- } else if (ninePlaceExcel.getNineType().contains("13,14,15")) {
- ninePlaceExcel.setNineType("小医院(诊所、养老院)- " + dictBiz.getDictValue());
- } else {
- ninePlaceExcel.setNineType(dictBiz.getDictValue());
- }
- }
- }
- }
- return taskPlaceSelfCheckExcels;
- }
-
- @Override
- public Integer getCount(String neiCode, int status, int type) {
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- if (AuthUtils.isMj(roleName)) {
- return baseMapper.getCount(neiCode, status, AuthUtil.getUserId(), type);
- }
- return 0;
- }
-
- @Override
- public TaskPlaceSelfCheckEntity getDetailByTaskId(Long taskId) {
- return baseMapper.getDetailByTaskId(taskId);
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskRepairAppraiseServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskRepairAppraiseServiceImpl.java
deleted file mode 100644
index a5101c2..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskRepairAppraiseServiceImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.task.dto.TaskRepairAppraiseDTO;
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.modules.task.vo.TaskRepairAppraiseVO;
-import org.springblade.modules.task.mapper.TaskRepairAppraiseMapper;
-import org.springblade.modules.task.service.ITaskRepairAppraiseService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * 报事报修评分表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Service
-public class TaskRepairAppraiseServiceImpl extends ServiceImpl<TaskRepairAppraiseMapper, TaskRepairAppraiseEntity> implements ITaskRepairAppraiseService {
-
- @Override
- public IPage<TaskRepairAppraiseVO> selectTaskRepairAppraisePage(IPage<TaskRepairAppraiseVO> page, TaskRepairAppraiseVO task) {
- return page.setRecords(baseMapper.selectTaskRepairAppraisePage(page, task));
- }
-
- /**
- * 查询报事报修评分表
- *
- * @param id 报事报修评分表ID
- * @return 报事报修评分表
- */
- @Override
- public TaskRepairAppraiseDTO selectTaskRepairAppraiseById(Integer id)
- {
- return this.baseMapper.selectTaskRepairAppraiseById(id);
- }
-
- /**
- * 查询报事报修评分表列表
- *
- * @param taskRepairAppraiseDTO 报事报修评分表
- * @return 报事报修评分表集合
- */
- @Override
- public List<TaskRepairAppraiseDTO> selectTaskRepairAppraiseList(TaskRepairAppraiseDTO taskRepairAppraiseDTO)
- {
- return this.baseMapper.selectTaskRepairAppraiseList(taskRepairAppraiseDTO);
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskRepairStepServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskRepairStepServiceImpl.java
deleted file mode 100644
index 5571956..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskRepairStepServiceImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.task.dto.TaskRepairStepDTO;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.mapper.TaskRepairStepMapper;
-import org.springblade.modules.task.service.ITaskRepairStepService;
-import org.springblade.modules.task.service.ITaskReportForRepairsService;
-import org.springblade.modules.task.vo.TaskRepairStepVO;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 报事报修事件步骤表 服务实现类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Service
-public class TaskRepairStepServiceImpl extends ServiceImpl<TaskRepairStepMapper, TaskRepairStepEntity> implements ITaskRepairStepService {
-
- @Override
- public IPage<TaskRepairStepVO> selectTaskRepairStepPage(IPage<TaskRepairStepVO> page, TaskRepairStepVO task) {
- return page.setRecords(baseMapper.selectTaskRepairStepPage(page, task));
- }
-
- /**
- * 查询报事报修事件步骤表
- *
- * @param id 报事报修事件步骤表ID
- * @return 报事报修事件步骤表
- */
- @Override
- public TaskRepairStepDTO selectTaskRepairStepById(Integer id)
- {
- return this.baseMapper.selectTaskRepairStepById(id);
- }
-
- /**
- * 查询报事报修事件步骤表列表
- *
- * @param taskRepairStepDTO 报事报修事件步骤表
- * @return 报事报修事件步骤表集合
- */
- @Override
- public List<TaskRepairStepDTO> selectTaskRepairStepList(TaskRepairStepDTO taskRepairStepDTO) {
- return this.baseMapper.selectTaskRepairStepList(taskRepairStepDTO);
- }
-
- @Override
- public Boolean saveTaskRepairStep(TaskRepairStepVO task) {
- task.setUserId(AuthUtil.getUserId());
- TaskReportForRepairsEntity taskReportForRepairsEntity = new TaskReportForRepairsEntity();
- taskReportForRepairsEntity.setId(task.getRepairId());
- taskReportForRepairsEntity.setConfirmFlag(task.getConfirmFlag());
- taskReportForRepairsEntity.setConfirmUserId(task.getTransferUserId());
- if (CommonConstant.NUMBER_ZERO.equals(task.getConfirmFlag()) || CommonConstant.NUMBER_THREE.equals(task.getConfirmFlag())) {
- task.setName(AuthUtil.getUserName());
- }
- if (CommonConstant.NUMBER_THREE.equals(task.getConfirmFlag())) {
- taskReportForRepairsEntity.setConfirmTime(new Date());
- }
- boolean b = SpringUtils.getBean(ITaskReportForRepairsService.class).updateById(taskReportForRepairsEntity);
- return save(task);
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
deleted file mode 100644
index 2db5a64..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.RoleUtil;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.district.entity.DistrictEntity;
-import org.springblade.modules.district.service.IDistrictService;
-import org.springblade.modules.grid.entity.GridmanEntity;
-import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
-import org.springblade.modules.property.entity.PropertyCompanyEntity;
-import org.springblade.modules.property.service.IPropertyCompanyDistrictService;
-import org.springblade.modules.property.service.IPropertyCompanyService;
-import org.springblade.modules.property.service.IPropertyDistrictUserService;
-import org.springblade.modules.sse.server.SSEServer;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.mapper.TaskReportForRepairsMapper;
-import org.springblade.modules.task.service.ITaskReportForRepairsService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springblade.modules.task.vo.TaskReportStatistics;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 报事报修任务表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Service
-public class TaskReportForRepairsServiceImpl extends BaseServiceImpl<TaskReportForRepairsMapper, TaskReportForRepairsEntity> implements ITaskReportForRepairsService {
-
- @Autowired
- private ITaskService taskService;
-
-
- /**
- * 自定义分页
- *
- * @param page
- * @param taskReportForRepairs
- * @return
- */
- @Override
- public IPage<TaskReportForRepairsVO> selectTaskReportForRepairsPage(IPage<TaskReportForRepairsVO> page, TaskReportForRepairsVO taskReportForRepairs) {
- // 公共参数设置
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskReportForRepairsVO.class, taskReportForRepairs);
- String userRole = AuthUtil.getUserRole();
- if (RoleUtil.isProperty(userRole) || RoleUtil.isWgy(userRole)){
- taskReportForRepairs.setConfirmUserId(AuthUtil.getUserId());
- }
- if (null != taskReportForRepairs.getRoleName() && !taskReportForRepairs.getRoleName().equals("")) {
- if (taskReportForRepairs.getRoleName().equals("inhabitant")) {
- taskReportForRepairs.setCreateUser(AuthUtil.getUserId());
- taskReportForRepairs.setConfirmUserId(null);
- //
- taskReportForRepairs.setRoleType("inhabitant");
- }
- }
- List<String> aoiCodeList = new ArrayList<>();
- if (RoleUtil.isProperty(userRole)) {
- taskReportForRepairs.setRoleType("wy");
- // 查询小区id
- IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
- List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
- // 通过用户机构查询用户的物业公司
- IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
- PropertyCompanyEntity companyEntity = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery()
- .eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId())
- .eq(PropertyCompanyEntity::getIsDeleted, 0)
- .last("limit 1"));
- if (companyEntity != null) {
- IPropertyCompanyDistrictService bean2 = SpringUtils.getBean(IPropertyCompanyDistrictService.class);
- // 通过物业公司,查询小区
- List<PropertyCompanyDistrictEntity> companyDistrictEntities = bean2.list(Wrappers.<PropertyCompanyDistrictEntity>lambdaQuery()
- .eq(PropertyCompanyDistrictEntity::getPropertyCompanyId, companyEntity.getId()));
- if (companyDistrictEntities.size() > 0) {
- List<String> collect = companyDistrictEntities.stream().map(i -> i.getDistrictId()).collect(Collectors.toList());
- districtIds.addAll(collect);
- }
- }
- if (districtIds.size() == 0) {
- return page.setRecords(new ArrayList<>());
- }
- IDistrictService districtService = SpringUtil.getBean(IDistrictService.class);
- List<DistrictEntity> districtEntityList = districtService.list(Wrappers.<DistrictEntity>lambdaQuery().in(DistrictEntity::getId, districtIds));
- aoiCodeList = districtEntityList.stream().map(i -> i.getAoiCode()).collect(Collectors.toList());
- }
-
- return page.setRecords(baseMapper.selectTaskReportForRepairsPage(page, taskReportForRepairs,
- commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator(), aoiCodeList, commonParamSet.getGridCodeList()));
- }
-
- /**
- * 查询报事报修统计
- *
- * @return
- */
- @Override
- public TaskReportStatistics getStatisticsCount(String houseCode) {
- TaskReportForRepairsVO reportForRepairsVO = new TaskReportForRepairsVO();
- reportForRepairsVO.setHouseCode(houseCode);
- CommonParamSet invoke = new CommonParamSet<>().invoke(TaskReportForRepairsVO.class, reportForRepairsVO);
- return baseMapper.getStatisticsCount(AuthUtil.getUserId(), houseCode, invoke.getRegionChildCodesList(), invoke.getIsAdministrator());
- }
-
- /**
- * 报事报修任务表 新增
- *
- * @param taskReportForRepairs
- * @return
- */
- @Override
- public boolean saveTaskReportForRepairs(TaskReportForRepairsEntity taskReportForRepairs) {
- boolean flag = false;
- // 任务新增
- TaskEntity taskEntity = new TaskEntity();
- taskEntity.setName(taskReportForRepairs.getRealName() + "报修");
- taskEntity.setStatus(1);
- taskEntity.setType(1);
- taskEntity.setFrequency(3);
- if (null != taskReportForRepairs.getAddressCode() && !taskReportForRepairs.getAddressCode().equals("")) {
- taskEntity.setHouseCode(taskReportForRepairs.getAddressCode());
- }
- // 新增
- boolean save = taskService.save(taskEntity);
- if (save) {
- // 设置网格编码
-// if (taskReportForRepairs.getHouseFlag().equals(CommonConstant.NUMBER_TWO)) {
-// IPlaceService bean = SpringUtils.getBean(IPlaceService.class);
-// PlaceEntity placeEntity = bean.getOne(Wrappers.<PlaceEntity>lambdaQuery()
-// .eq(PlaceEntity::getHouseCode, taskReportForRepairs.getAddressCode()).last("limit 1"));
-// taskReportForRepairs.setGridCode(placeEntity.getGridCode());
-// } else {
-// IHouseService bean = SpringUtils.getBean(IHouseService.class);
-// HouseEntity houseEntity = bean.getOne(Wrappers.<HouseEntity>lambdaQuery()
-// .eq(HouseEntity::getHouseCode, taskReportForRepairs.getAddressCode()));
-// taskReportForRepairs.setGridCode(houseEntity.getGridCode());
-// }
- taskReportForRepairs.setTaskId(taskEntity.getId());
- taskReportForRepairs.setConfirmFlag(1);
- flag = save(taskReportForRepairs);
- // 同时向web 端推送消息
- SSEServer.sendMessage("web:1", "1");
- }
- return flag;
- }
-
- /**
- * 报事报修任务表 自定义修改
- *
- * @param taskReportForRepairs
- * @return
- */
- @Override
- public boolean updateTaskReportForRepairs(TaskReportForRepairsEntity taskReportForRepairs) {
- // 设置参数
- taskReportForRepairs.setUpdateTime(new Date());
- taskReportForRepairs.setUpdateUser(AuthUtil.getUserId());
- // 更新
- return updateById(taskReportForRepairs);
- }
-
- /**
- * 报事报修任务表 审核
- *
- * @param taskReportForRepairs
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean checkReportForRepairs(TaskReportForRepairsEntity taskReportForRepairs) {
- boolean flag = false;
- // 设置更新时间
- taskReportForRepairs.setConfirmTime(new Date());
- taskReportForRepairs.setConfirmUserId(AuthUtil.getUserId());
- // 更新数据
- boolean b = updateById(taskReportForRepairs);
- if (b) {
- TaskReportForRepairsEntity entity = getById(taskReportForRepairs.getId());
- // 更新任务表状态
- TaskEntity taskEntity = new TaskEntity();
- taskEntity.setId(entity.getTaskId());
- taskEntity.setStatus(taskReportForRepairs.getConfirmFlag());
- flag = taskService.updateById(taskEntity);
- }
- // 返回
- return flag;
- }
-
- @Override
- public Integer getStatistics(Long userId, String neiCode, List<String> regionChildCodesList,
- Integer isAdministrator,
- List<String> gridCodeList) {
- String roleName = SpringUtils.getRequestParam("roleName");
- return baseMapper.getStatistics(userId, neiCode,roleName, regionChildCodesList,isAdministrator, gridCodeList);
- }
-
- /**
- * 更新状态--临时接口
- *
- * @param gridman
- * @return
- */
- @Override
- public boolean updateView(GridmanEntity gridman) {
- baseMapper.updateView(gridman);
- return true;
- }
-
- @Override
- public Object getReportForStatistics(String code, String roleType) {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- if (roleType.equals("2")) {
- Integer result1 = baseMapper.getReportForStatistics(code, null, null, null, roleType);
- Integer result = baseMapper.getReportForStatistics(code, null, 3, null, roleType);
- objectObjectHashMap.put("result", result1);
- objectObjectHashMap.put("result1", result);
- objectObjectHashMap.put("result2", result1.equals(0) ? 0 : BigDecimal.valueOf(result).divide(BigDecimal.valueOf(result1), 4, BigDecimal.ROUND_HALF_UP));
- objectObjectHashMap.put("result3", baseMapper.getReportForStatistics(code, null, null, 1, roleType));
- objectObjectHashMap.put("result4", baseMapper.getReportForStatistics(code, null, null, 2, roleType));
- objectObjectHashMap.put("result5", baseMapper.getReportForStatistics(code, null, null, 3, roleType));
- objectObjectHashMap.put("result6", baseMapper.getReportForStatistics(code, null, null, 4, roleType));
- } else {
- Integer result1 = baseMapper.getReportForStatistics(code, AuthUtil.getUserId(), null, null, roleType);
- Integer result = baseMapper.getReportForStatistics(code, AuthUtil.getUserId(), 3, null, roleType);
- // result 总数 result1 已处理 result2 处理率 result3 公共维修 result4 居家维修 result5 矛盾纠纷 result6 投诉举报
- objectObjectHashMap.put("result", result1);
- objectObjectHashMap.put("result1", result);
- objectObjectHashMap.put("result2", result1.equals(0) ? 0 : BigDecimal.valueOf(result).divide(BigDecimal.valueOf(result1), 4, BigDecimal.ROUND_HALF_UP));
- objectObjectHashMap.put("result3", baseMapper.getReportForStatistics(code, AuthUtil.getUserId(), null, 1, roleType));
- objectObjectHashMap.put("result4", baseMapper.getReportForStatistics(code, AuthUtil.getUserId(), null, 2, roleType));
- objectObjectHashMap.put("result5", baseMapper.getReportForStatistics(code, AuthUtil.getUserId(), null, 3, roleType));
- objectObjectHashMap.put("result6", baseMapper.getReportForStatistics(code, AuthUtil.getUserId(), null, 4, roleType));
- }
- return objectObjectHashMap;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskResidencePermitApplyServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskResidencePermitApplyServiceImpl.java
deleted file mode 100644
index 22719e6..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskResidencePermitApplyServiceImpl.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.AuthUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.service.IHouseService;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.task.entity.*;
-import org.springblade.modules.task.service.ITaskPlaceRecordService;
-import org.springblade.modules.task.service.ITaskService;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import org.springblade.modules.task.vo.TaskResidencePermitApplyVO;
-import org.springblade.modules.task.mapper.TaskResidencePermitApplyMapper;
-import org.springblade.modules.task.service.ITaskResidencePermitApplyService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 居住证申请 服务实现类
- *
- * @author BladeX
- * @since 2024-03-14
- */
-@Service
-public class TaskResidencePermitApplyServiceImpl extends ServiceImpl<TaskResidencePermitApplyMapper, TaskResidencePermitApplyEntity> implements ITaskResidencePermitApplyService {
-
- @Resource
- @Lazy
- private ITaskService taskService;
-
- @Override
- public IPage<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage<TaskResidencePermitApplyVO> page, TaskResidencePermitApplyVO taskResidencePermitApply) {
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskResidencePermitApplyVO.class, taskResidencePermitApply);
- if (taskResidencePermitApply.getRoleName() != null && taskResidencePermitApply.getRoleName().equals("inhabitant")) {
- taskResidencePermitApply.setCreateUser(AuthUtil.getUserId());
- }
- return page.setRecords(baseMapper.selectTaskResidencePermitApplyPage(page, taskResidencePermitApply,
- commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList()));
- }
-
- @Override
- public Boolean saveResidencePermitApplyEntity(TaskResidencePermitApplyEntity permitApply) {
- permitApply.setCreateUser(AuthUtil.getUserId());
- // 1.保存任务表
- ITaskService taskService = SpringUtils.getBean(ITaskService.class);
- Long aLong = taskService.saveTask(CommonConstant.NUMBER_ONE, DictConstant.RESIDENCE_PERMIT_APPLICATION, 1,
- "", AuthUtil.getUserId(), permitApply.getHouseCode(), CommonConstant.NUMBER_TWO, 1);
- if (aLong <= 0) {
- return false;
- }
- if (StringUtils.isNotBlank(permitApply.getHouseCode())) {
- // 设置网格编码
- IHouseService houseService = SpringUtils.getBean(IHouseService.class);
- HouseEntity houseEntity = houseService.getOne(Wrappers.<HouseEntity>lambdaQuery()
- .eq(HouseEntity::getHouseCode, permitApply.getHouseCode()));
- permitApply.setGridCode(houseEntity.getGridCode());
- permitApply.setJwGridCode(houseEntity.getJwGridCode());
- }
-
- permitApply.setTaskId(aLong);
- // 2.保存任务详情
- boolean save = save(permitApply);
- return save;
- }
-
- @Override
- public Integer getCount(String neiCode, int status) {
- TaskResidencePermitApplyVO taskResidencePermitApply = new TaskResidencePermitApplyVO();
- taskResidencePermitApply.setCommunityCode(neiCode);
- // 获取请求头中的角色别名
- String roleName = SpringUtils.getRequestParam("roleName");
- if (AuthUtils.isMj(roleName)) {
- // todo 需要改造
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskResidencePermitApplyVO.class, taskResidencePermitApply);
- return baseMapper.getCount(neiCode, status, AuthUtil.getUserId(),commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
- }
- return 0;
- }
-
- /**
- * 居住证申请 审核
- * @param taskResidencePermitApply
- * @return
- */
- @Override
- public Boolean updateResidencePermitApplyEntity(TaskResidencePermitApplyEntity taskResidencePermitApply) {
- taskResidencePermitApply.setConfirmTime(new Date());
- taskResidencePermitApply.setConfirmUserId(AuthUtil.getUserId());
- boolean b = updateById(taskResidencePermitApply);
- if (b) {
- TaskResidencePermitApplyEntity entity = getById(taskResidencePermitApply.getId());
- // 更新任务表状态
- TaskEntity taskEntity = new TaskEntity();
- taskEntity.setId(entity.getTaskId());
- taskEntity.setStatus(taskResidencePermitApply.getConfirmFlag());
- b = taskService.updateById(taskEntity);
- return b;
- }
- return b;
- }
-
- /**
- * 居住证申请 删除
- * @param toLongList
- * @return
- */
- @Override
- public boolean removeTaskResidencePermitApplyBatchByIds(List<Long> toLongList) {
- boolean flag = false;
- for (Long id : toLongList) {
- // 先查询对应的任务id
- TaskResidencePermitApplyEntity taskResidencePermitApplyEntity = getById(id);
- // 删除居住证
- flag = removeById(id);
- if (flag) {
- // 删除对应的任务
- flag = taskService.removeById(taskResidencePermitApplyEntity.getTaskId());
- }
- }
- // 返回
- return flag;
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskSchoolEvenServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskSchoolEvenServiceImpl.java
deleted file mode 100644
index 760f081..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskSchoolEvenServiceImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.task.service.ITaskSchoolEvenService;
-import org.springblade.modules.task.vo.TaskSchoolEvenVO;
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-import org.springblade.modules.task.mapper.TaskSchoolEvenMapper;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 校园事件 服务实现类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Service
-public class TaskSchoolEvenServiceImpl extends ServiceImpl<TaskSchoolEvenMapper, TaskSchoolEvenEntity> implements ITaskSchoolEvenService {
-
- @Override
- public IPage<TaskSchoolEvenVO> selectTaskSchoolEvenPage(IPage<TaskSchoolEvenVO> page, TaskSchoolEvenVO taskSchoolEven) {
- return page.setRecords(baseMapper.selectTaskSchoolEvenPage(page, taskSchoolEven));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
deleted file mode 100644
index 91c82c2..0000000
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
+++ /dev/null
@@ -1,791 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.itextpdf.text.log.Logger;
-import com.itextpdf.text.log.LoggerFactory;
-import org.apache.commons.lang3.StringUtils;
-import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.constant.DictConstant;
-import org.springblade.common.param.CommonParamSet;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.category.entity.CategoryEntity;
-import org.springblade.modules.category.service.ICategoryService;
-import org.springblade.modules.grid.entity.GridEntity;
-import org.springblade.modules.grid.entity.GridWorkLogEntity;
-import org.springblade.modules.grid.service.IGridService;
-import org.springblade.modules.grid.service.IGridWorkLogService;
-import org.springblade.modules.house.service.IHouseRentalService;
-import org.springblade.modules.house.service.IHouseholdService;
-import org.springblade.modules.house.vo.HouseRentalTenantVO;
-import org.springblade.modules.house.vo.HouseholdVO;
-import org.springblade.modules.place.service.IPlaceExtService;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.place.vo.PlaceVO;
-import org.springblade.modules.sms.service.ISmsSendService;
-import org.springblade.modules.task.entity.*;
-import org.springblade.modules.task.mapper.TaskMapper;
-import org.springblade.modules.task.service.*;
-import org.springblade.modules.task.vo.TaskVO;
-import org.springblade.modules.task.service.ITaskPlaceRectificationService;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.service.ITaskPlaceSelfCheckService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.temporal.ChronoUnit;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 任务表 服务实现类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Service
-public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskEntity> implements ITaskService {
-
- private Logger logger = LoggerFactory.getLogger(TaskServiceImpl.class);
-
- @Autowired
- private IPlaceService placeService;
-
- @Autowired
- private IHouseholdService iHouseholdService;
-
- @Autowired
- private IHouseRentalService iHouseRentalService;
-
- @Autowired
- private ICategoryService categoryService;
-
- @Autowired
- private ITaskCampusReportingEventService taskCampusReportingEventService;
-
- @Autowired
- private ITaskLabelReportingEventService taskLabelReportingEventService;
-
- @Autowired
- private ITaskHotelReportingService taskHotelReportingService;
-
- @Autowired
- private IGridWorkLogService gridWorkLogService;
-
- @Autowired
- private ITaskResidencePermitApplyService residencePermitApplyService;
-
- @Autowired
- private ISmsSendService smsSendService;
-
- // 确保该常量值正确地从配置文件中读取或以更合适的方式定义
- private static final long SMS_TEMPLATE_ID = 1775429789463142401L;
-
- @Override
- public IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task) {
-// String roleName = SpringUtils.getRequestParam("roleName");
-// String communityCode = SpringUtils.getRequestParam("communityCode");
-// if (!Strings.isBlank(communityCode)) {
-// // 校验社区编号是否合规
-// if (null != SpringUtils.getBean(IRegionService.class).getById(communityCode)) {
-// task.setCommunityCode(communityCode);
-// }
-// }
-// List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
-// Integer isAdministrator = AuthUtil.isAdministrator() == true ? 1 : 2;
- // 网格编号集合
-// List<String> gridCodeList = new ArrayList<>();
- // 民警角色
-// if (!Strings.isBlank(roleName)) {
-// task.setRoleName(roleName);
-// if (roleName.equals("mj")) {
-// regionChildCodesList = SpringUtil.getBean(IPoliceAffairsGridService.class).getCommunityCodeListByUserId(AuthUtil.getUserId());
-// }
-// if (roleName.equals("wgy")) {
-// gridCodeList = SpringUtil.getBean(IGridService.class).getGridListByUserId(AuthUtil.getUserId());
-// }
-// }
-// if (AuthUtil.getUserAccount().equals("18879306957")) {
-// task.setCommunityCode("361102003027");
-// }
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskVO.class, task);
- if (null != task.getReportType() && task.getReportType() == 1) {
- // 查询取保候审任务列表(人房相关)
- return page.setRecords(baseMapper.selectTaskPageByPerson(page, task, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList()));
- }
- // 查询非取保候审任务列表(场所相关)
- return page.setRecords(baseMapper.selectTaskPage(page, task, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList()));
- }
-
- @Override
- public IPage<TaskVO> getBailReportingPage(IPage<TaskVO> page, TaskVO task) {
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskVO.class, task);
- // 民警角色
- if (AuthUtil.getUserRole().equals("mj")) {
- task.setUserId(AuthUtil.getUserId());
- return page.setRecords(baseMapper.selectTaskPageBy(page, task,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator()));
- } else {
- if (AuthUtil.getUserAccount().equals("18879306957")) {
- task.setCommunityCode("361102003027");
- task.setUserId(null);
- }
- if (AuthUtil.getUserRole().equals("wgy")) {
- task.setUserId(AuthUtil.getUserId());
- }
- // 非民警角色
- List<TaskVO> taskVOS = baseMapper.getBailReportingPage(page,
- task,
- commonParamSet.getRegionChildCodesList(),
- commonParamSet.getGridCodeList(),
- commonParamSet.getIsAdministrator());
- // 返回
- return page.setRecords(taskVOS);
- }
- }
-
- /**
- * 新增任务
- *
- * @param type
- * @param name
- * @param frequency
- * @param remark
- * @param createUser
- * @return
- */
- @Override
- public Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser,
- String houseCode, Integer reportType, Integer status) {
- TaskEntity taskEntity = new TaskEntity();
- taskEntity.setType(type);
- taskEntity.setName(name);
- taskEntity.setFrequency(frequency);
- taskEntity.setRemark(remark);
- taskEntity.setCreateTime(new Date());
- taskEntity.setCreateUser(createUser);
- taskEntity.setHouseCode(houseCode);
- taskEntity.setReportType(reportType);
- taskEntity.setStatus(status);
- return baseMapper.insert(taskEntity) > 0 ? taskEntity.getId() : 0;
- }
-
- @Override
- public Long updateTask(Integer type, String name, Integer frequency, String remark, Long updateUser, Long id, Integer status) {
- TaskEntity taskEntity = new TaskEntity();
- taskEntity.setId(id);
- taskEntity.setType(type);
- taskEntity.setName(name);
- taskEntity.setFrequency(frequency);
- taskEntity.setRemark(remark);
- taskEntity.setUpdateTime(new Date());
- taskEntity.setUpdateUser(updateUser);
- taskEntity.setStatus(status);
- return baseMapper.updateById(taskEntity) > 0 ? 1L : 0;
- }
-
-
- @Override
- public Object countNumber(String houseCode, Integer status) {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- // 总数
- LambdaQueryWrapper<TaskEntity> objectQueryWrapper = new LambdaQueryWrapper<>();
- objectQueryWrapper.eq(TaskEntity::getCreateUser, AuthUtil.getUserId());
- objectQueryWrapper.isNotNull(TaskEntity::getHouseCode);
- objectQueryWrapper.eq(TaskEntity::getIsDeleted, 0);
- objectQueryWrapper.in(TaskEntity::getReportType, 2, 3, 4, 5, 6);
- if (StringUtils.isNotBlank(houseCode)) {
- objectQueryWrapper.eq(TaskEntity::getHouseCode, houseCode);
- }
- Long all = baseMapper.selectCount(objectQueryWrapper);
- objectQueryWrapper.eq(TaskEntity::getStatus, 2);
- // 已处理
- Long processed = baseMapper.selectCount(objectQueryWrapper);
- objectObjectHashMap.put("all", all);
- objectObjectHashMap.put("processed", processed);
- return objectObjectHashMap;
- }
-
- @Override
- public Object countTypeNumber(Integer roleType, String neiCode) {
- TaskVO taskVO = new TaskVO();
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- taskVO.setStatus(CommonConstant.NUMBER_ONE);
- taskVO.setUserId(roleType > CommonConstant.NUMBER_ZERO ? AuthUtil.getUserId() : null);
- taskVO.setNeiCode(neiCode);
- taskVO.setReportType(CommonConstant.NUMBER_FIVE);
- taskVO.setIsDeleted(CommonConstant.NUMBER_ZERO);
- CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskVO.class, taskVO);
-
- // 标签报事-二手交易
- Integer bqsj = baseMapper.selectTaskCount(taskVO, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
- taskVO.setReportType(CommonConstant.NUMBER_ONE);
- // 取保候审
- Integer qbhs = baseMapper.selectTaskCount(taskVO, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
- // 报事报修
- Integer bsbx = SpringUtils.getBean(ITaskReportForRepairsService.class).getStatistics(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
- // 住户审核
- Integer zhsh = iHouseholdService.statistics(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, 0);
- // 出租审核
- HouseRentalTenantVO houseRentalTenantVO = new HouseRentalTenantVO();
- houseRentalTenantVO.setCommunityCode(neiCode);
- houseRentalTenantVO.setAuditStatus(2);
- Integer czsh = iHouseRentalService.getStatisticsCount(houseRentalTenantVO);
- // 场所审核
- Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, CommonConstant.NUMBER_ONE);
- // 走访日志
- // 查询网格员对应的网格id
- String gridCode = getGridCode();
- Integer zfrw = SpringUtils.getBean(IGridWorkLogService.class).getGridWorkCountHandleCount(gridCode, CommonConstant.NUMBER_ONE);
- // 消防自查
- Integer xfzc = SpringUtils.getBean(ITaskPlaceSelfCheckService.class).getCount(neiCode, CommonConstant.NUMBER_ONE, CommonConstant.NUMBER_ONE);
- // 校园检查
- Integer xyjc = SpringUtils.getBean(ITaskPlaceSelfCheckService.class).getCount(neiCode, CommonConstant.NUMBER_ONE, CommonConstant.NUMBER_TWO);
- // 消防隐患整改
- Integer xfyhzg = SpringUtils.getBean(ITaskPlaceRectificationService.class).getCount(neiCode, CommonConstant.NUMBER_ONE);
- // 居住证申请
- Integer jzzsq = residencePermitApplyService.getCount(neiCode, CommonConstant.NUMBER_ONE);
- // 无诈统计
- taskVO.setReportType(6);
- Integer wztj = baseMapper.selectTaskCount(taskVO, commonParamSet.getRegionChildCodesList(),
- commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
- // 设置
- objectObjectHashMap.put("qbhs", qbhs);// 取保候审
- objectObjectHashMap.put("bqsj", bqsj);// 标签报事-二手交易
- objectObjectHashMap.put("bsbx", bsbx);// 报事报修
- objectObjectHashMap.put("zhsh", zhsh);// 住户审核
- objectObjectHashMap.put("czsh", czsh);// 出租审核
- objectObjectHashMap.put("cssh", cssh);// 场所审核
- objectObjectHashMap.put("zfrw", zfrw);// 走访日志
- objectObjectHashMap.put("xfzc", xfzc);// 消防自查
- objectObjectHashMap.put("xfyhzg", xfyhzg);// 消防隐患整改
- objectObjectHashMap.put("jzzsq", jzzsq);// 居住证申请
- objectObjectHashMap.put("wztj", wztj);// 无诈
- objectObjectHashMap.put("xyjc", xyjc);// 校园检查
- return objectObjectHashMap;
- }
-
- /**
- * 获取网格员id
- *
- * @return
- */
- private String getGridCode() {
- GridEntity grid = SpringUtils.getBean(IGridService.class).getGridByUserId(AuthUtil.getUserId());
- if (null != grid) {
- return grid.getGridCode();
- }
- return null;
- }
-
- @Override
- public Object countFrequencyNumber() {
- Map<String, Object> objectObjectHashMap = new HashMap<>();
- TaskVO taskVO = new TaskVO();
- taskVO.setUserId(AuthUtil.getUserId());
- taskVO.setFrequency(1);
- taskVO.setStatus(1);
- Integer disposable = baseMapper.selectTaskCount(taskVO, null, null, null);
- taskVO.setFrequency(2);
- Integer periodicity = baseMapper.selectTaskCount(taskVO, null, null, null);
- objectObjectHashMap.put("disposable", disposable);
- objectObjectHashMap.put("periodicity", periodicity);
- return objectObjectHashMap;
- }
-
- @Override
- public Boolean removeTask(TaskEntity task) {
-
- boolean update1 = update(Wrappers.<TaskEntity>lambdaUpdate()
- .set(TaskEntity::getIsDeleted, 1)
- .eq(TaskEntity::getId, task.getId()));
- if (update1) {
- if (task.getReportType().equals(1)) {
- ITaskBailReportingEventService bean = SpringUtils.getBean(ITaskBailReportingEventService.class);
- boolean update = bean.update(Wrappers.<TaskBailReportingEventEntity>lambdaUpdate()
- .set(TaskBailReportingEventEntity::getIsDeleted, 1)
- .eq(TaskBailReportingEventEntity::getTaskId, task.getId()));
- return update;
- } else if (task.getReportType().equals(2)) {
- ITaskHotelReportingService bean = SpringUtils.getBean(ITaskHotelReportingService.class);
- boolean update = bean.update(Wrappers.<TaskHotelReportingEntity>lambdaUpdate()
- .set(TaskHotelReportingEntity::getIsDeleted, 1)
- .eq(TaskHotelReportingEntity::getTaskId, task.getId()));
- return update;
- } else if (task.getReportType().equals(3)) {
- ITaskLabelReportingEventService bean = SpringUtils.getBean(ITaskLabelReportingEventService.class);
- boolean update = bean.update(Wrappers.<TaskLabelReportingEventEntity>lambdaUpdate()
- .set(TaskLabelReportingEventEntity::getIsDeleted, 1)
- .eq(TaskLabelReportingEventEntity::getTaskId, task.getId()));
- return update;
- } else if (task.getReportType().equals(4)) {
- ITaskLabelReportingEventService bean = SpringUtils.getBean(ITaskLabelReportingEventService.class);
- boolean update = bean.update(Wrappers.<TaskLabelReportingEventEntity>lambdaUpdate()
- .set(TaskLabelReportingEventEntity::getIsDeleted, 1)
- .eq(TaskLabelReportingEventEntity::getTaskId, task.getId()));
- return update;
- } else if (task.getReportType().equals(5)) {
- ITaskLabelReportingEventService bean = SpringUtils.getBean(ITaskLabelReportingEventService.class);
- boolean update = bean.update(Wrappers.<TaskLabelReportingEventEntity>lambdaUpdate()
- .set(TaskLabelReportingEventEntity::getIsDeleted, 1)
- .eq(TaskLabelReportingEventEntity::getTaskId, task.getId()));
- return update;
- } else if (task.getReportType().equals(6)) {
- ITaskCampusReportingEventService bean = SpringUtils.getBean(ITaskCampusReportingEventService.class);
- boolean update = bean.update(Wrappers.<TaskCampusReportingEventEntity>lambdaUpdate()
- .set(TaskCampusReportingEventEntity::getIsDeleted, 1)
- .eq(TaskCampusReportingEventEntity::getTaskId, task.getId()));
- return update;
- }
- }
-
- return update1;
- }
-
- /**
- * 根据类型创建任务
- *
- * @param param 参数
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean createTaskJob(String param) {
- // 解析参数
- JSONObject jsonParam = JSON.parseObject(param);
-// String params = jsonParam.getString("params");
- boolean flag = false;
- // 校园安全自查任务生成
- createCampusReportingTask();
- // 打金店/二手车/二手手机任务生成
- createLabelReportingTask();
- // 旅馆安全自查任务生成
- createHotelReportingTask();
- // 人员类-肇事肇祸精神障碍患者走访任务生成
- createGridWordTask();
- // 返回
- return flag;
- }
-
-
- /**
- * 人员类-肇事肇祸精神障碍患者走访任务生成
- */
- public void createGridWordTask() {
- // 肇事肇祸精神障碍患者走访任务生成,查询标签为:1006
- List<Integer> list = new ArrayList<Integer>() {{
- add(1006);
- }};
- // 根据人员标签编号集合查询对应的住户(按颜色区分近多少天没有发过任务的住户)
- List<HouseholdVO> householdVOList = iHouseholdService.getHouseholdListByParam(list);
- // 生成任务
- for (HouseholdVO household : householdVOList) {
- // 新增走访任务
- saveGridWordTask(household);
- }
- }
-
- /**
- * 新增走访任务
- *
- * @param household
- */
- public void saveGridWordTask(HouseholdVO household) {
- GridWorkLogEntity gridWorkLogEntity = new GridWorkLogEntity();
- gridWorkLogEntity.setHouseholdId(household.getId());
- gridWorkLogEntity.setType(2);
- gridWorkLogEntity.setPersonType(1006);
- // 系统下发
- gridWorkLogEntity.setSource(2);
- // 待处理
- gridWorkLogEntity.setStatus(1);
- // 新增
- gridWorkLogService.save(gridWorkLogEntity);
- }
-
- /**
- * 打金店/二手车/二手手机任务生成
- */
- public void createLabelReportingTask() {
- // 打金店/二手车/二手手机任务生成,标签:130808/140304/130604
- List<String> stringList = new ArrayList<String>() {{
- add("130808");
- add("140304");
- add("130604");
- }};
- String tableName = "jczz_task_label_reporting_event";
- // 根据编号集合查询对应的场所(按颜色区分近多少天没有发过任务的场所)
- List<PlaceVO> placeVOList = placeService.getPlaceListByParam(stringList, tableName);
- // 生成任务
- for (PlaceVO placeVO : placeVOList) {
- String taskName = "";
- Integer reportType = 3;
- if (placeVO.getLabel().equals("130808")) {
- taskName = DictConstant.SECOND_HAND_TRANSACTION;
- reportType = 3;
- }
- if (placeVO.getLabel().equals("130604")) {
- taskName = DictConstant.USED_MOBILE_PHONES;
- reportType = 4;
- }
- if (placeVO.getLabel().equals("140304")) {
- taskName = DictConstant.USED_CAR;
- reportType = 5;
- }
- // 新增任务
- TaskEntity taskEntity = saveTaskEntity(placeVO.getHouseCode(), 1, taskName, 2, reportType);
- // 同时新增打金店/二手车/二手手机任务
- saveGoldShop(placeVO, taskEntity, taskName, reportType);
- }
- }
-
- /**
- * 旅馆安全自查任务生成
- */
- public void createHotelReportingTask() {
- // 旅馆标签为
- List<String> stringList = new ArrayList<String>() {{
- add("120101");
- add("120102");
- add("120103");
- add("120104");
- }};
- String tableName = "jczz_task_hotel_reporting";
- // 根据编号集合查询对应的场所(按颜色区分近多少天没有发过任务的场所)
- List<PlaceVO> placeVOList = placeService.getPlaceListByParam(stringList, tableName);
- // 生成任务
- for (PlaceVO placeVO : placeVOList) {
- // 新增任务
- TaskEntity taskEntity = saveTaskEntity(placeVO.getHouseCode(), 1, DictConstant.HOTEL_SECURITY, 2, 2);
- // 同时新增校园安全检查任务
- saveHotel(placeVO, taskEntity);
- }
- }
-
- /**
- * 校园安全自查任务生成
- */
- public void createCampusReportingTask() {
- // 校园安全自查,查询标签为教育的场所 parentNo = 1601
- String parentNo = "1601";
- QueryWrapper<CategoryEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("is_deleted", 0).eq("parent_no", parentNo);
- List<CategoryEntity> categoryEntityList = categoryService.list(wrapper);
- // 取出编号集合
- List<String> stringList = categoryEntityList.stream().map(categoryEntity -> categoryEntity.getCategoryNo()).collect(Collectors.toList());
- // 根据编号集合查询对应的场所(按颜色区分近多少天没有发过任务的场所)
- String tableName = "jczz_task_campus_reporting_event";
- List<PlaceVO> placeVOList = placeService.getPlaceListByParam(stringList, tableName);
- // 生成任务
- for (PlaceVO placeVO : placeVOList) {
- // 新增任务
- TaskEntity taskEntity = saveTaskEntity(placeVO.getHouseCode(), 1, DictConstant.CAMPUS_SECURITY_INSPECTION, 2, 6);
- // 同时新增校园安全检查任务
- saveCampus(placeVO, taskEntity);
- }
- }
-
- /**
- * 新增校园安全检查任务
- *
- * @param placeVO
- * @param taskEntity
- */
- private void saveCampus(PlaceVO placeVO, TaskEntity taskEntity) {
- TaskCampusReportingEventEntity campusReportingEventEntity = new TaskCampusReportingEventEntity();
- campusReportingEventEntity.setTaskId(taskEntity.getId());
- campusReportingEventEntity.setPlaceId(placeVO.getId());
- campusReportingEventEntity.setCampusName(placeVO.getPlaceName());
- campusReportingEventEntity.setCheckUserId(placeVO.getPrincipalUserId());
- campusReportingEventEntity.setCheckUserName(placeVO.getPrincipal());
- campusReportingEventEntity.setCheckTelephone(placeVO.getPrincipalPhone());
- // 系统下发
- campusReportingEventEntity.setSource(2);
- // 待完善
- campusReportingEventEntity.setConfirmFlag("4");
- // 新增
- taskCampusReportingEventService.save(campusReportingEventEntity);
- }
-
- /**
- * 新增旅馆安全检查任务
- *
- * @param placeVO
- * @param taskEntity
- */
- private void saveHotel(PlaceVO placeVO, TaskEntity taskEntity) {
- TaskHotelReportingEntity taskHotelReportingEntity = new TaskHotelReportingEntity();
- taskHotelReportingEntity.setTaskId(taskEntity.getId());
- taskHotelReportingEntity.setPlaceId(placeVO.getId());
- taskHotelReportingEntity.setHotelName(placeVO.getPlaceName());
- taskHotelReportingEntity.setCheckUserId(placeVO.getPrincipalUserId());
- taskHotelReportingEntity.setCheckUserName(placeVO.getPrincipal());
- taskHotelReportingEntity.setCheckTelephone(placeVO.getPrincipalPhone());
- // 系统下发
- taskHotelReportingEntity.setSource(2);
- // 待完善
- taskHotelReportingEntity.setConfirmFlag("4");
- // 新增
- taskHotelReportingService.save(taskHotelReportingEntity);
- }
-
-
- /**
- * 新增打金店/二手车/二手手机任务
- *
- * @param placeVO
- * @param taskEntity
- * @param taskName
- * @param reportType
- */
- private void saveGoldShop(PlaceVO placeVO, TaskEntity taskEntity, String taskName, Integer reportType) {
- TaskLabelReportingEventEntity taskLabelReportingEventEntity = new TaskLabelReportingEventEntity();
- taskLabelReportingEventEntity.setTaskId(taskEntity.getId());
- taskLabelReportingEventEntity.setPlaceId(placeVO.getId());
- taskLabelReportingEventEntity.setDistrictName(placeVO.getPlaceName());
- taskLabelReportingEventEntity.setUserId(placeVO.getPrincipalUserId());
- taskLabelReportingEventEntity.setOwner(placeVO.getPrincipal());
- taskLabelReportingEventEntity.setPhoneNumber(placeVO.getPrincipalPhone());
- taskLabelReportingEventEntity.setLabelName(taskName);
- // 打金店
- if (reportType == 3) {
- taskLabelReportingEventEntity.setEventType("1");
- }
- // 二手车
- if (reportType == 4) {
- taskLabelReportingEventEntity.setEventType("3");
- }
- // 二手手机
- if (reportType == 5) {
- taskLabelReportingEventEntity.setEventType("2");
- }
- // 系统下发
- taskLabelReportingEventEntity.setSource(2);
- // 待完善
- taskLabelReportingEventEntity.setConfirmFlag("4");
- // 新增
- taskLabelReportingEventService.save(taskLabelReportingEventEntity);
- }
-
- /**
- * 插入任务信息
- *
- * @param houseCode
- * @param type
- * @param taskName
- * @param frequency
- * @param reportType
- * @return
- */
- private TaskEntity saveTaskEntity(String houseCode,
- Integer type,
- String taskName,
- Integer frequency,
- Integer reportType) {
- TaskEntity taskEntity = new TaskEntity();
- taskEntity.setType(type);
- taskEntity.setName(taskName);
- taskEntity.setFrequency(frequency);
- taskEntity.setCreateTime(new Date());
- taskEntity.setHouseCode(houseCode);
- taskEntity.setReportType(reportType);
- // 系统下发
- taskEntity.setSource(2);
- // 待场所负责人上报完善处理
- taskEntity.setStatus(4);
- // 新增
- save(taskEntity);
- // 返回
- return taskEntity;
- }
-
- /**
- * 审核任务。
- * 根据任务的报告类型,更新相应的任务状态,并触发相应的事件更新。
- *
- * @param task 任务实体,包含任务信息和报告类型。
- * @return 返回审核结果,成功为true,失败为false。
- */
- @Override
- public Boolean examine(TaskEntity task) {
- if (task == null || task.getReportType() == null) {
- // 检查任务和报告类型是否为空,若为空则直接返回false
- return false;
- }
- // 根据任务报告类型,更新任务状态并触发相应的事件更新
- boolean result = updateById(task);
- if (!result) {
- return false;
- }
- if (task.getReportType().equals(CommonConstant.REPORT_TYPE_SECONDHAND_TRADE)) {
- // 如果报告类型匹配,尝试更新任务标签报告事件状态
- ITaskLabelReportingEventService bean = SpringUtils.getBean(ITaskLabelReportingEventService.class);
- return bean.update(Wrappers.<TaskLabelReportingEventEntity>lambdaUpdate()
- .set(TaskLabelReportingEventEntity::getConfirmFlag, task.getStatus())
- .eq(TaskLabelReportingEventEntity::getTaskId, task.getId()));
- } else if (task.getReportType().
- equals(CommonConstant.REPORT_TYPE_FIRE_INSPECTION)) {
- // 如果报告类型为消防自查,尝试更新消防自查状态
- ITaskPlaceSelfCheckService bean = SpringUtils.getBean(ITaskPlaceSelfCheckService.class);
- return bean.update(Wrappers.<TaskPlaceSelfCheckEntity>lambdaUpdate()
- .set(TaskPlaceSelfCheckEntity::getStatus, task.getStatus())
- .eq(TaskPlaceSelfCheckEntity::getTaskId, task.getId()));
-
- } else if (task.getReportType().equals(CommonConstant.REPORT_TYPE_NO_FRAUD)) {
- // 如果报告类型为无诈,尝试更新无诈报告状态
- ITaskNoFraudReportingService bean = SpringUtils.getBean(ITaskNoFraudReportingService.class);
- return bean.update(Wrappers.<TaskNoFraudReportingEntity>lambdaUpdate()
- .set(TaskNoFraudReportingEntity::getStatus, task.getStatus())
- .eq(TaskNoFraudReportingEntity::getTaskId, task.getId()));
- }
- // 如果没有匹配的报告类型,返回false
- return false;
- }
-
- /**
- * 创建居住证发送短信任务。
- * 该方法首先计算六个月前的日期,然后查询在该日期之后申请的居住证任务实体列表,
- * 并对这些实体发送短信通知。
- *
- * @param param 传递给发送短信任务的参数,具体用途根据实现而定。
- * @return 返回一个布尔值,通常用于指示任务是否创建成功。
- * 根据实际逻辑需要调整返回值,当前示例中返回值始终为false。
- */
- @Override
- public boolean createResidenceSendSms(String param) {
- try {
- // 计算六个月前的日期
- LocalDate sixMonthsAgo = getSixMonthsAgo();
- // 查询需要发送短信的居住证申请实体列表
- List<TaskResidencePermitApplyEntity> entitiesToSms = queryEntitiesToSms(sixMonthsAgo);
- // 发送短信并更新相关实体状态
- sendSmsAndUpdateEntities(entitiesToSms);
- } catch (Exception e) {
- // 处理发送短信过程中可能出现的异常,如记录日志
- logger.error("Error occurred while sending SMS: " + e.getMessage(), e);
- return false; // 根据异常处理逻辑决定是否返回false或其他值
- }
- return false; // 根据实际逻辑调整返回值
- }
-
- @Override
- public boolean createSchoolSendSms(String param) {
- try {
- // 计算当前时间加一天
- LocalDate endDate = LocalDate.now().plusDays(1);
- // 创建表示一天结束时刻的 LocalTime 对象
- LocalTime endOfDayTime = LocalTime.of(23, 59, 59, 999_000_000); // 纳秒精度为999毫微秒,接近最大值
- // 合并得到加一天后的最后时刻的 LocalDateTime
- LocalDateTime endTime = LocalDateTime.of(endDate, endOfDayTime);
- ITaskPlaceSelfCheckService taskPlaceSelfCheckService = SpringUtils.getBean(ITaskPlaceSelfCheckService.class);
- // 查询整改完毕且未发送短信的记录
- List<TaskPlaceSelfCheckEntity> list = taskPlaceSelfCheckService.list(new LambdaQueryWrapper<TaskPlaceSelfCheckEntity>()
- .eq(TaskPlaceSelfCheckEntity::getRectificationFlag, CommonConstant.NUMBER_TWO)
- .eq(TaskPlaceSelfCheckEntity::getSendSmsFlag, CommonConstant.NUMBER_ONE)
- .le(TaskPlaceSelfCheckEntity::getRectificationEndTime, endTime));
- if (list == null || list.isEmpty()) {
- return false;
- }
- // 用于收集成功发送短信并需更新状态的实体列表
- List<TaskPlaceSelfCheckEntity> updatedEntities = new ArrayList<>();
- for (TaskPlaceSelfCheckEntity updatedEntity : list) {
- // 尝试发送短信,发送成功则更新实体状态
- Boolean smsSent = smsSendService.sendNotice(SMS_TEMPLATE_ID, updatedEntity.getId());
- if (smsSent) {
- updatedEntity.setSendSmsFlag("2"); // 标记为已发送短信
- updatedEntities.add(updatedEntity); // 加入到需更新的实体列表中
- }
- }
- // 若存在需更新的实体,则批量更新这些实体的状态
- if (!updatedEntities.isEmpty()) {
- taskPlaceSelfCheckService.updateBatchById(updatedEntities);
- }
- } catch (Exception e) {
- // 处理发送短信过程中可能出现的异常,如记录日志
- logger.error("Error occurred while sending SMS: " + e.getMessage(), e);
- return false; // 根据异常处理逻辑决定是否返回false或其他值
- }
- return false; // 根据实际逻辑调整返回值
- }
-
- /**
- * 获取六个月前的日期。
- * 该方法不接受任何参数,仅返回当前日期减去六个月的结果。
- *
- * @return 返回一个LocalDate对象,表示六个月前的日期。
- */
- private LocalDate getSixMonthsAgo() {
- // 获取当前日期并减去6个月
- return LocalDate.now().minus(6, ChronoUnit.MONTHS);
- }
-
- /**
- * 查询需要发送短信的居住证申请实体列表。
- *
- * @param sixMonthsAgo 六个月前的日期,用于筛选确认时间在六个月之前的申请记录。
- * @return 返回一个包含所有符合条件的居住证申请实体的列表。
- */
- private List<TaskResidencePermitApplyEntity> queryEntitiesToSms(LocalDate sixMonthsAgo) {
- // 使用LambdaQueryWrapper构建查询条件,筛选出确认状态为2(即确认),且未发送过短信(发送短信标志为1),确认时间在指定日期(sixMonthsAgo)之前的所有申请记录。
- return residencePermitApplyService.list(new LambdaQueryWrapper<TaskResidencePermitApplyEntity>()
- .eq(TaskResidencePermitApplyEntity::getConfirmFlag, 2)
- .eq(TaskResidencePermitApplyEntity::getSendSmsFlag, 1)
- .le(TaskResidencePermitApplyEntity::getConfirmTime, sixMonthsAgo));
- }
-
- /**
- * 发送短信并更新实体状态
- *
- * @param entitiesToSms 需要发送短信并更新状态的实体列表,每个实体代表一个居住证申请任务。
- * 实体列表中每个元素应包含至少一个ID属性,用于标识申请任务。
- */
- private void sendSmsAndUpdateEntities(List<TaskResidencePermitApplyEntity> entitiesToSms) {
- List<TaskResidencePermitApplyEntity> updatedEntities = new ArrayList<>(); // 用于收集成功发送短信并需更新状态的实体列表
-
- for (TaskResidencePermitApplyEntity entity : entitiesToSms) {
- // 尝试发送短信,发送成功则更新实体状态
- Boolean smsSent = smsSendService.sendNotice(SMS_TEMPLATE_ID, entity.getId());
- if (smsSent) {
- entity.setSendSmsFlag(2); // 标记为已发送短信
- updatedEntities.add(entity); // 加入到需更新的实体列表中
- }
- }
-
- // 若存在需更新的实体,则批量更新这些实体的状态
- if (!updatedEntities.isEmpty()) {
- residencePermitApplyService.updateBatchById(updatedEntities);
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/ECallEventVO.java b/src/main/java/org/springblade/modules/task/vo/ECallEventVO.java
deleted file mode 100644
index 1f19b3a..0000000
--- a/src/main/java/org/springblade/modules/task/vo/ECallEventVO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.ECallEventEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * e呼即办表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-07
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ECallEventVO extends ECallEventEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- /**
- * 社区名称
- */
- private String communityName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- /**
- * 角色名称
- */
- private String roleName;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskBailReportingEventVO.java b/src/main/java/org/springblade/modules/task/vo/TaskBailReportingEventVO.java
deleted file mode 100644
index a7caee7..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskBailReportingEventVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 取保候审任务 视图实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskBailReportingEventVO extends TaskBailReportingEventEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskCampusReportingEventVO.java b/src/main/java/org/springblade/modules/task/vo/TaskCampusReportingEventVO.java
deleted file mode 100644
index 848af92..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskCampusReportingEventVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 校园安全检查任务表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskCampusReportingEventVO extends TaskCampusReportingEventEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskHotelReportingVO.java b/src/main/java/org/springblade/modules/task/vo/TaskHotelReportingVO.java
deleted file mode 100644
index 061a4f2..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskHotelReportingVO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 旅馆安全自查任务 视图实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskHotelReportingVO extends TaskHotelReportingEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 状态
- */
- private Integer status;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskLabelReportingEventVO.java b/src/main/java/org/springblade/modules/task/vo/TaskLabelReportingEventVO.java
deleted file mode 100644
index 5da38e7..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskLabelReportingEventVO.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 打金店报事 视图实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskLabelReportingEventVO extends TaskLabelReportingEventEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 状态
- */
- private Integer status;
- private Integer nineType;
-
- /**
- * 阵地类型
- */
- private Integer frontType;
-
- /**
- * 场所名称
- */
- private String placeName;
-
- /**
- * 场所负责人
- */
- private String principal;
-
- /**
- * 场所负责人电话
- */
- private String principalPhone;
-
- /**
- * 地址
- */
- private String location;
-
- /**+
- * 街道名称
- */
- private String streetName;
- /**+
- * 社区名称
- */
- private String communityName;
- /**+
- * 网格名称
- */
- private String gridName;
-
- /**
- * 角色别名
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
- private String houseCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskNoFraudReportingVO.java b/src/main/java/org/springblade/modules/task/vo/TaskNoFraudReportingVO.java
deleted file mode 100644
index c58797c..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskNoFraudReportingVO.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 无炸上报任务表 视图实体类
- *
- * @author BladeX
- * @since 2024-04-10
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskNoFraudReportingVO extends TaskNoFraudReportingEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "上报项目", example = "")
- private List<TaskPlaceRecordVO> taskPlaceRecordVOList;
-
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "上报数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "机构名称", example = "")
- private String deptName;
-
- @ApiModelProperty(value = "无诈类别", example = "")
- private String noExplosionCategory;
-
-// @ApiModelProperty(value = "隐患问题", example = "")
-// private String hiddenDanger;
-
- @ApiModelProperty(value = "不通过原因", example = "")
- private String reasonFailure;
-
- @ApiModelProperty(value = "地址编码", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String startTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "结束时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String endTime;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
- @ApiModelProperty(value = "派出所名称", example = "")
- private String pcsName;
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskPlaceRecordVO.java b/src/main/java/org/springblade/modules/task/vo/TaskPlaceRecordVO.java
deleted file mode 100644
index 201dde5..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskPlaceRecordVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 消防自查详情记录表 视图实体类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceRecordVO extends TaskPlaceRecordEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationVO.java b/src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationVO.java
deleted file mode 100644
index 47e6cba..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationVO.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.patrol.vo.PatrolRecordVO;
-import org.springblade.modules.place.vo.PlacePoiLabelVO;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 场所整改任务表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceRectificationVO extends TaskPlaceRectificationEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "隐患项目", example = "")
- private List<PatrolRecordVO> patrolRecordVOList;
-
- @ApiModelProperty(value = "场所标签", example = "")
- private List<PlacePoiLabelVO> placePoiLabelVOList ;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "机构名称", example = "")
- private String deptName;
-
- @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
- private String nineType;
-
- @ApiModelProperty(value = "隐患问题", example = "")
- private String hiddenDanger;
-
- @ApiModelProperty(value = "不通过原因", example = "")
- private String reasonFailure;
-
- @ApiModelProperty(value = "地址编码", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String startTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "结束时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String endTime;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationsVO.java b/src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationsVO.java
deleted file mode 100644
index 85b3bb9..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationsVO.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-
-import java.util.Date;
-
-/**
- * 场所整改任务表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-31
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceRectificationsVO extends TaskPlaceRectificationEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "机构名称", example = "")
- private String deptName;
-
- @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
- private String nineType;
-
- @ApiModelProperty(value = "隐患问题", example = "")
- private String hiddenDanger;
-
- @ApiModelProperty(value = "不通过原因", example = "")
- private String reasonFailure;
-
- @ApiModelProperty(value = "地址编码", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date startTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "结束时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date endTime;
-
- /**
- * 角色名称
- */
- private String roleName;
-
- /**
- * 社区编号
- */
- private String communityCode;
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskPlaceSelfCheckVO.java b/src/main/java/org/springblade/modules/task/vo/TaskPlaceSelfCheckVO.java
deleted file mode 100644
index 8a70264..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskPlaceSelfCheckVO.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.place.vo.PlacePoiLabelVO;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 消防自查记任务表 视图实体类
- *
- * @author BladeX
- * @since 2024-02-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskPlaceSelfCheckVO extends TaskPlaceSelfCheckEntity {
- private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "隐患项目", example = "")
- private List<TaskPlaceRecordVO> taskPlaceRecordVOList;
-
- @ApiModelProperty(value = "场所标签", example = "")
- private List<PlacePoiLabelVO> placePoiLabelVOList ;
-
- @ApiModelProperty(value = "场所名称", example = "")
- private String placeName;
-
- @ApiModelProperty(value = "场所地址", example = "")
- private String location;
-
- @ApiModelProperty(value = "负责人", example = "")
- private String principal;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "负责人电话", example = "")
- private String principalPhone;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "法人", example = "")
- private String legalPerson;
-
- @ApiModelProperty(value = "法人电话", example = "")
- private String legalTel;
-
- @ApiModelProperty(value = "检查人名称", example = "")
- private String name;
-
- @ApiModelProperty(value = "隐患数量", example = "")
- private Integer number;
-
- @ApiModelProperty(value = "机构名称", example = "")
- private String deptName;
-
- @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
- private String nineType;
-
- @ApiModelProperty(value = "隐患问题", example = "")
- private String hiddenDanger;
-
- @ApiModelProperty(value = "不通过原因", example = "")
- private String reasonFailure;
-
- @ApiModelProperty(value = "地址编码", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "开始时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String startTime;
-
- /** 创建时间 */
- @ApiModelProperty(value = "结束时间", example = "")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private String endTime;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskRepairAppraiseVO.java b/src/main/java/org/springblade/modules/task/vo/TaskRepairAppraiseVO.java
deleted file mode 100644
index 702117d..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskRepairAppraiseVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 报事报修评分表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskRepairAppraiseVO extends TaskRepairAppraiseEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskRepairStepVO.java b/src/main/java/org/springblade/modules/task/vo/TaskRepairStepVO.java
deleted file mode 100644
index a5ecf29..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskRepairStepVO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 报事报修事件步骤表 视图实体类
- *
- * @author BladeX
- * @since 2023-12-26
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskRepairStepVO extends TaskRepairStepEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "确认标记 1:待处理 2:处理中 3:已处理")
- private Integer confirmFlag;
-
- @ApiModelProperty(value = "移交人id")
- private Long transferUserId;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskReportForRepairsVO.java b/src/main/java/org/springblade/modules/task/vo/TaskReportForRepairsVO.java
deleted file mode 100644
index 44ed900..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskReportForRepairsVO.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import liquibase.pro.packaged.S;
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.core.tool.node.INode;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * 报事报修任务表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskReportForRepairsVO extends TaskReportForRepairsEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 地址名称
- */
- private String addressName;
-
- // 角色类型 wy
- private String roleType;
-
- @ApiModelProperty("开始时间")
- private String startTime;
-
- @ApiModelProperty("结束时间")
- private String endTime;
-
- /**
- * 区域编号
- */
- private String regionCode;
-
- private String streetName;
-
- private String communityName;
- // 网格名称
- private String gridName;
-
- // 小区名称
- private String aoiName;
-
- /**
- * 事件步骤
- */
- @ApiModelProperty("事件步骤")
- private List<TaskRepairStepEntity> taskRepairStepList;
-
- @ApiModelProperty("评分")
- private List<TaskRepairAppraiseEntity> taskRepairAppraiseList;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
- /**
- * 地址编码
- */
- private String houseCode;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskReportStatistics.java b/src/main/java/org/springblade/modules/task/vo/TaskReportStatistics.java
deleted file mode 100644
index 90f76eb..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskReportStatistics.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.modules.task.vo;
-
-import lombok.Data;
-
-/**
- * 上报统计数据
- */
-@Data
-public class TaskReportStatistics {
-
- //总申请
- private Integer total;
-
- //已处理
- private Integer handle;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java b/src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java
deleted file mode 100644
index c75e5c0..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 居住证申请 视图实体类
- *
- * @author BladeX
- * @since 2024-03-14
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskResidencePermitApplyVO extends TaskResidencePermitApplyEntity {
- private static final long serialVersionUID = 1L;
-
- // 角色名称
- @ApiModelProperty(value = "角色名称", example = "")
- private String roleName;
-
- // 社区编号
- @ApiModelProperty(value = "社区编号", example = "")
- private String communityCode;
-
- @ApiModelProperty(value = "地址", example = "")
- private String addressName;
-
- @ApiModelProperty(value = "社区名称", example = "")
- private String communityName;
-
- @ApiModelProperty(value = "小区名称", example = "")
- private String aoiName;
-
- @ApiModelProperty(value = "网格名称", example = "")
- private String gridName;
-
- @ApiModelProperty(value = "街道名称", example = "")
- private String streetName;
-
- @ApiModelProperty(value = "未成年 1:否 2:是", example = "")
- private Integer minors;
-
- @ApiModelProperty(value = "角色类型", example = "")
- private String roleType;
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskSchoolEvenVO.java b/src/main/java/org/springblade/modules/task/vo/TaskSchoolEvenVO.java
deleted file mode 100644
index f8e684c..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskSchoolEvenVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 校园事件 视图实体类
- *
- * @author BladeX
- * @since 2024-04-18
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskSchoolEvenVO extends TaskSchoolEvenEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskVO.java b/src/main/java/org/springblade/modules/task/vo/TaskVO.java
deleted file mode 100644
index 0354311..0000000
--- a/src/main/java/org/springblade/modules/task/vo/TaskVO.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-/**
- * 任务表 视图实体类
- *
- * @author BladeX
- * @since 2023-11-06
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TaskVO extends TaskEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "用户id")
- private Long userId;
-
- @ApiModelProperty(value = "地址")
- private String addressName;
-
- /**
- * 社区编码
- */
- @ApiModelProperty(value = "社区编码")
- private String communityCode;
-
- private String neiCode;
- private String aoiCode;
- private String regionCode;
- private String realName;
- private String phone;
- private String streetCode;
- private String streetName;
- private String applyName;
- private String communityName;
- private String districtName;
-
- @ApiModelProperty("开始时间")
- private String startTime;
-
- @ApiModelProperty("结束时间")
- private String endTime;
-
- /**
- * 角色别名
- */
- private String roleName;
-
- private String nineType;
-
- private String frontType;
-
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date startTimes;
-
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date reachTime;
-
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date returnTime;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/ECallEventWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/ECallEventWrapper.java
deleted file mode 100644
index c469cb6..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/ECallEventWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.ECallEventEntity;
-import org.springblade.modules.task.vo.ECallEventVO;
-import java.util.Objects;
-
-/**
- * e呼即办表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-07
- */
-public class ECallEventWrapper extends BaseEntityWrapper<ECallEventEntity, ECallEventVO> {
-
- public static ECallEventWrapper build() {
- return new ECallEventWrapper();
- }
-
- @Override
- public ECallEventVO entityVO(ECallEventEntity eCallEvent) {
- ECallEventVO eCallEventVO = Objects.requireNonNull(BeanUtil.copy(eCallEvent, ECallEventVO.class));
-
- //User createUser = UserCache.getUser(eCallEvent.getCreateUser());
- //User updateUser = UserCache.getUser(eCallEvent.getUpdateUser());
- //eCallEventVO.setCreateUserName(createUser.getName());
- //eCallEventVO.setUpdateUserName(updateUser.getName());
-
- return eCallEventVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskBailReportingEventWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskBailReportingEventWrapper.java
deleted file mode 100644
index f37ec0b..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskBailReportingEventWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
-import org.springblade.modules.task.vo.TaskBailReportingEventVO;
-import java.util.Objects;
-
-/**
- * 取保候审任务 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public class TaskBailReportingEventWrapper extends BaseEntityWrapper<TaskBailReportingEventEntity, TaskBailReportingEventVO> {
-
- public static TaskBailReportingEventWrapper build() {
- return new TaskBailReportingEventWrapper();
- }
-
- @Override
- public TaskBailReportingEventVO entityVO(TaskBailReportingEventEntity taskBailReportingEvent) {
- TaskBailReportingEventVO taskBailReportingEventVO = Objects.requireNonNull(BeanUtil.copy(taskBailReportingEvent, TaskBailReportingEventVO.class));
-
- //User createUser = UserCache.getUser(taskBailReportingEvent.getCreateUser());
- //User updateUser = UserCache.getUser(taskBailReportingEvent.getUpdateUser());
- //taskBailReportingEventVO.setCreateUserName(createUser.getName());
- //taskBailReportingEventVO.setUpdateUserName(updateUser.getName());
-
- return taskBailReportingEventVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskCampusReportingEventWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskCampusReportingEventWrapper.java
deleted file mode 100644
index 0100109..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskCampusReportingEventWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
-import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
-import java.util.Objects;
-
-/**
- * 校园安全检查任务表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public class TaskCampusReportingEventWrapper extends BaseEntityWrapper<TaskCampusReportingEventEntity, TaskCampusReportingEventVO> {
-
- public static TaskCampusReportingEventWrapper build() {
- return new TaskCampusReportingEventWrapper();
- }
-
- @Override
- public TaskCampusReportingEventVO entityVO(TaskCampusReportingEventEntity taskCampusReportingEvent) {
- TaskCampusReportingEventVO taskCampusReportingEventVO = Objects.requireNonNull(BeanUtil.copy(taskCampusReportingEvent, TaskCampusReportingEventVO.class));
-
- //User createUser = UserCache.getUser(taskCampusReportingEvent.getCreateUser());
- //User updateUser = UserCache.getUser(taskCampusReportingEvent.getUpdateUser());
- //taskCampusReportingEventVO.setCreateUserName(createUser.getName());
- //taskCampusReportingEventVO.setUpdateUserName(updateUser.getName());
-
- return taskCampusReportingEventVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskHotelReportingWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskHotelReportingWrapper.java
deleted file mode 100644
index debfd4a..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskHotelReportingWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskHotelReportingEntity;
-import org.springblade.modules.task.vo.TaskHotelReportingVO;
-import java.util.Objects;
-
-/**
- * 旅馆安全自查任务 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public class TaskHotelReportingWrapper extends BaseEntityWrapper<TaskHotelReportingEntity, TaskHotelReportingVO> {
-
- public static TaskHotelReportingWrapper build() {
- return new TaskHotelReportingWrapper();
- }
-
- @Override
- public TaskHotelReportingVO entityVO(TaskHotelReportingEntity taskHotelReporting) {
- TaskHotelReportingVO taskHotelReportingVO = Objects.requireNonNull(BeanUtil.copy(taskHotelReporting, TaskHotelReportingVO.class));
-
- //User createUser = UserCache.getUser(taskHotelReporting.getCreateUser());
- //User updateUser = UserCache.getUser(taskHotelReporting.getUpdateUser());
- //taskHotelReportingVO.setCreateUserName(createUser.getName());
- //taskHotelReportingVO.setUpdateUserName(updateUser.getName());
-
- return taskHotelReportingVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskLabelReportingEventWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskLabelReportingEventWrapper.java
deleted file mode 100644
index b2a13f7..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskLabelReportingEventWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
-import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
-import java.util.Objects;
-
-/**
- * 打金店报事 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public class TaskLabelReportingEventWrapper extends BaseEntityWrapper<TaskLabelReportingEventEntity, TaskLabelReportingEventVO> {
-
- public static TaskLabelReportingEventWrapper build() {
- return new TaskLabelReportingEventWrapper();
- }
-
- @Override
- public TaskLabelReportingEventVO entityVO(TaskLabelReportingEventEntity taskLabelReportingEvent) {
- TaskLabelReportingEventVO taskLabelReportingEventVO = Objects.requireNonNull(BeanUtil.copy(taskLabelReportingEvent, TaskLabelReportingEventVO.class));
-
- //User createUser = UserCache.getUser(taskLabelReportingEvent.getCreateUser());
- //User updateUser = UserCache.getUser(taskLabelReportingEvent.getUpdateUser());
- //taskLabelReportingEventVO.setCreateUserName(createUser.getName());
- //taskLabelReportingEventVO.setUpdateUserName(updateUser.getName());
-
- return taskLabelReportingEventVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskNoFraudReportingWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskNoFraudReportingWrapper.java
deleted file mode 100644
index fbcb569..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskNoFraudReportingWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
-import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
-import java.util.Objects;
-
-/**
- * 无炸上报任务表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-10
- */
-public class TaskNoFraudReportingWrapper extends BaseEntityWrapper<TaskNoFraudReportingEntity, TaskNoFraudReportingVO> {
-
- public static TaskNoFraudReportingWrapper build() {
- return new TaskNoFraudReportingWrapper();
- }
-
- @Override
- public TaskNoFraudReportingVO entityVO(TaskNoFraudReportingEntity taskNoFraudReporting) {
- TaskNoFraudReportingVO taskNoFraudReportingVO = Objects.requireNonNull(BeanUtil.copy(taskNoFraudReporting, TaskNoFraudReportingVO.class));
-
- //User createUser = UserCache.getUser(taskNoFraudReporting.getCreateUser());
- //User updateUser = UserCache.getUser(taskNoFraudReporting.getUpdateUser());
- //taskNoFraudReportingVO.setCreateUserName(createUser.getName());
- //taskNoFraudReportingVO.setUpdateUserName(updateUser.getName());
-
- return taskNoFraudReportingVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRecordWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRecordWrapper.java
deleted file mode 100644
index 104d47d..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRecordWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskPlaceRecordEntity;
-import org.springblade.modules.task.vo.TaskPlaceRecordVO;
-import java.util.Objects;
-
-/**
- * 消防自查详情记录表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-02-04
- */
-public class TaskPlaceRecordWrapper extends BaseEntityWrapper<TaskPlaceRecordEntity, TaskPlaceRecordVO> {
-
- public static TaskPlaceRecordWrapper build() {
- return new TaskPlaceRecordWrapper();
- }
-
- @Override
- public TaskPlaceRecordVO entityVO(TaskPlaceRecordEntity taskPlaceRecord) {
- TaskPlaceRecordVO taskPlaceRecordVO = Objects.requireNonNull(BeanUtil.copy(taskPlaceRecord, TaskPlaceRecordVO.class));
-
- //User createUser = UserCache.getUser(taskPlaceRecord.getCreateUser());
- //User updateUser = UserCache.getUser(taskPlaceRecord.getUpdateUser());
- //taskPlaceRecordVO.setCreateUserName(createUser.getName());
- //taskPlaceRecordVO.setUpdateUserName(updateUser.getName());
-
- return taskPlaceRecordVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRectificationWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRectificationWrapper.java
deleted file mode 100644
index aeb1569..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRectificationWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskPlaceRectificationEntity;
-import org.springblade.modules.task.vo.TaskPlaceRectificationVO;
-import java.util.Objects;
-
-/**
- * 场所整改任务表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-31
- */
-public class TaskPlaceRectificationWrapper extends BaseEntityWrapper<TaskPlaceRectificationEntity, TaskPlaceRectificationVO> {
-
- public static TaskPlaceRectificationWrapper build() {
- return new TaskPlaceRectificationWrapper();
- }
-
- @Override
- public TaskPlaceRectificationVO entityVO(TaskPlaceRectificationEntity taskPlaceRectification) {
- TaskPlaceRectificationVO taskPlaceRectificationVO = Objects.requireNonNull(BeanUtil.copy(taskPlaceRectification, TaskPlaceRectificationVO.class));
-
- //User createUser = UserCache.getUser(taskPlaceRectification.getCreateUser());
- //User updateUser = UserCache.getUser(taskPlaceRectification.getUpdateUser());
- //taskPlaceRectificationVO.setCreateUserName(createUser.getName());
- //taskPlaceRectificationVO.setUpdateUserName(updateUser.getName());
-
- return taskPlaceRectificationVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceSelfCheckWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceSelfCheckWrapper.java
deleted file mode 100644
index c537611..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskPlaceSelfCheckWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity;
-import org.springblade.modules.task.vo.TaskPlaceSelfCheckVO;
-import java.util.Objects;
-
-/**
- * 消防自查记任务表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-02-04
- */
-public class TaskPlaceSelfCheckWrapper extends BaseEntityWrapper<TaskPlaceSelfCheckEntity, TaskPlaceSelfCheckVO> {
-
- public static TaskPlaceSelfCheckWrapper build() {
- return new TaskPlaceSelfCheckWrapper();
- }
-
- @Override
- public TaskPlaceSelfCheckVO entityVO(TaskPlaceSelfCheckEntity taskPlaceSelfCheck) {
- TaskPlaceSelfCheckVO taskPlaceSelfCheckVO = Objects.requireNonNull(BeanUtil.copy(taskPlaceSelfCheck, TaskPlaceSelfCheckVO.class));
-
- //User createUser = UserCache.getUser(taskPlaceSelfCheck.getCreateUser());
- //User updateUser = UserCache.getUser(taskPlaceSelfCheck.getUpdateUser());
- //taskPlaceSelfCheckVO.setCreateUserName(createUser.getName());
- //taskPlaceSelfCheckVO.setUpdateUserName(updateUser.getName());
-
- return taskPlaceSelfCheckVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskRepairAppraiseWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskRepairAppraiseWrapper.java
deleted file mode 100644
index f810d93..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskRepairAppraiseWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskRepairAppraiseEntity;
-import org.springblade.modules.task.vo.TaskRepairAppraiseVO;
-import java.util.Objects;
-
-/**
- * 报事报修评分表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-26
- */
-public class TaskRepairAppraiseWrapper extends BaseEntityWrapper<TaskRepairAppraiseEntity, TaskRepairAppraiseVO> {
-
- public static TaskRepairAppraiseWrapper build() {
- return new TaskRepairAppraiseWrapper();
- }
-
- @Override
- public TaskRepairAppraiseVO entityVO(TaskRepairAppraiseEntity task) {
- TaskRepairAppraiseVO taskVO = Objects.requireNonNull(BeanUtil.copy(task, TaskRepairAppraiseVO.class));
-
- //User createUser = UserCache.getUser(task.getCreateUser());
- //User updateUser = UserCache.getUser(task.getUpdateUser());
- //taskVO.setCreateUserName(createUser.getName());
- //taskVO.setUpdateUserName(updateUser.getName());
-
- return taskVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskRepairStepWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskRepairStepWrapper.java
deleted file mode 100644
index 5445b0a..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskRepairStepWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskRepairStepEntity;
-import org.springblade.modules.task.vo.TaskRepairStepVO;
-import java.util.Objects;
-
-/**
- * 报事报修事件步骤表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-12-26
- */
-public class TaskRepairStepWrapper extends BaseEntityWrapper<TaskRepairStepEntity, TaskRepairStepVO> {
-
- public static TaskRepairStepWrapper build() {
- return new TaskRepairStepWrapper();
- }
-
- @Override
- public TaskRepairStepVO entityVO(TaskRepairStepEntity task) {
- TaskRepairStepVO taskVO = Objects.requireNonNull(BeanUtil.copy(task, TaskRepairStepVO.class));
-
- //User createUser = UserCache.getUser(task.getCreateUser());
- //User updateUser = UserCache.getUser(task.getUpdateUser());
- //taskVO.setCreateUserName(createUser.getName());
- //taskVO.setUpdateUserName(updateUser.getName());
-
- return taskVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskReportForRepairsWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskReportForRepairsWrapper.java
deleted file mode 100644
index d1d5d2c..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskReportForRepairsWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.vo.TaskReportForRepairsVO;
-import java.util.Objects;
-
-/**
- * 报事报修任务表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public class TaskReportForRepairsWrapper extends BaseEntityWrapper<TaskReportForRepairsEntity, TaskReportForRepairsVO> {
-
- public static TaskReportForRepairsWrapper build() {
- return new TaskReportForRepairsWrapper();
- }
-
- @Override
- public TaskReportForRepairsVO entityVO(TaskReportForRepairsEntity taskReportForRepairs) {
- TaskReportForRepairsVO taskReportForRepairsVO = Objects.requireNonNull(BeanUtil.copy(taskReportForRepairs, TaskReportForRepairsVO.class));
-
- //User createUser = UserCache.getUser(taskReportForRepairs.getCreateUser());
- //User updateUser = UserCache.getUser(taskReportForRepairs.getUpdateUser());
- //taskReportForRepairsVO.setCreateUserName(createUser.getName());
- //taskReportForRepairsVO.setUpdateUserName(updateUser.getName());
-
- return taskReportForRepairsVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskResidencePermitApplyWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskResidencePermitApplyWrapper.java
deleted file mode 100644
index b225d22..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskResidencePermitApplyWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity;
-import org.springblade.modules.task.vo.TaskResidencePermitApplyVO;
-import java.util.Objects;
-
-/**
- * 居住证申请 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-03-14
- */
-public class TaskResidencePermitApplyWrapper extends BaseEntityWrapper<TaskResidencePermitApplyEntity, TaskResidencePermitApplyVO> {
-
- public static TaskResidencePermitApplyWrapper build() {
- return new TaskResidencePermitApplyWrapper();
- }
-
- @Override
- public TaskResidencePermitApplyVO entityVO(TaskResidencePermitApplyEntity taskResidencePermitApply) {
- TaskResidencePermitApplyVO taskResidencePermitApplyVO = Objects.requireNonNull(BeanUtil.copy(taskResidencePermitApply, TaskResidencePermitApplyVO.class));
-
- //User createUser = UserCache.getUser(taskResidencePermitApply.getCreateUser());
- //User updateUser = UserCache.getUser(taskResidencePermitApply.getUpdateUser());
- //taskResidencePermitApplyVO.setCreateUserName(createUser.getName());
- //taskResidencePermitApplyVO.setUpdateUserName(updateUser.getName());
-
- return taskResidencePermitApplyVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskSchoolEvenWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskSchoolEvenWrapper.java
deleted file mode 100644
index 970aeb4..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskSchoolEvenWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.vo.TaskSchoolEvenVO;
-import org.springblade.modules.task.entity.TaskSchoolEvenEntity;
-
-import java.util.Objects;
-
-/**
- * 校园事件 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-04-18
- */
-public class TaskSchoolEvenWrapper extends BaseEntityWrapper<TaskSchoolEvenEntity, TaskSchoolEvenVO> {
-
- public static TaskSchoolEvenWrapper build() {
- return new TaskSchoolEvenWrapper();
- }
-
- @Override
- public TaskSchoolEvenVO entityVO(TaskSchoolEvenEntity taskSchoolEven) {
- TaskSchoolEvenVO taskSchoolEvenVO = Objects.requireNonNull(BeanUtil.copy(taskSchoolEven, TaskSchoolEvenVO.class));
-
- //User createUser = UserCache.getUser(taskSchoolEven.getCreateUser());
- //User updateUser = UserCache.getUser(taskSchoolEven.getUpdateUser());
- //taskSchoolEvenVO.setCreateUserName(createUser.getName());
- //taskSchoolEvenVO.setUpdateUserName(updateUser.getName());
-
- return taskSchoolEvenVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/task/wrapper/TaskWrapper.java b/src/main/java/org/springblade/modules/task/wrapper/TaskWrapper.java
deleted file mode 100644
index aa7d4d6..0000000
--- a/src/main/java/org/springblade/modules/task/wrapper/TaskWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.task.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.task.entity.TaskEntity;
-import org.springblade.modules.task.vo.TaskVO;
-import java.util.Objects;
-
-/**
- * 任务表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2023-11-06
- */
-public class TaskWrapper extends BaseEntityWrapper<TaskEntity, TaskVO> {
-
- public static TaskWrapper build() {
- return new TaskWrapper();
- }
-
- @Override
- public TaskVO entityVO(TaskEntity task) {
- TaskVO taskVO = Objects.requireNonNull(BeanUtil.copy(task, TaskVO.class));
-
- //User createUser = UserCache.getUser(task.getCreateUser());
- //User updateUser = UserCache.getUser(task.getUpdateUser());
- //taskVO.setCreateUserName(createUser.getName());
- //taskVO.setUpdateUserName(updateUser.getName());
-
- return taskVO;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/test4j/Test4jController.java b/src/main/java/org/springblade/modules/test4j/Test4jController.java
deleted file mode 100644
index 7aced56..0000000
--- a/src/main/java/org/springblade/modules/test4j/Test4jController.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.springblade.modules.test4j;
-
-import io.swagger.annotations.Api;
-import lombok.AllArgsConstructor;
-import net.sourceforge.tess4j.ITesseract;
-import net.sourceforge.tess4j.Tesseract;
-import net.sourceforge.tess4j.TesseractException;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.test4j.util.Test4jUtil;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.imageio.ImageIO;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("/test4j")
-@Api(value = "图片智能识别", tags = "图片智能识别")
-public class Test4jController {
-
- @PostMapping("/read-id")
- public R readText(@RequestParam("file") MultipartFile file) {
- try {
- BufferedImage grayscaleImage = grayscale(ImageIO.read(file.getInputStream()));
- String text = recognizeText(grayscaleImage);
- return R.data(text);
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- public BufferedImage grayscale(BufferedImage image) {
- int width = image.getWidth();
- int height = image.getHeight();
- BufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
- Graphics g = result.getGraphics();
- g.drawImage(image, 0, 0, null);
- g.dispose();
- return result;
- }
-
- public String recognizeText(BufferedImage image) {
- ITesseract tesseract = new Tesseract();
- // 设置Tesseract的路径
- tesseract.setDatapath("F:\\test4jdata");
- // 设置为中文简体
- tesseract.setLanguage("chi_sim");
- try {
- return tesseract.doOCR(image);
- } catch (TesseractException e) {
- e.printStackTrace();
- return null;
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/test4j/util/Test4jUtil.java b/src/main/java/org/springblade/modules/test4j/util/Test4jUtil.java
deleted file mode 100644
index 40752e1..0000000
--- a/src/main/java/org/springblade/modules/test4j/util/Test4jUtil.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.springblade.modules.test4j.util;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * 身份证信息读取工具
- */
-public class Test4jUtil {
- /**
- * 去掉字符串里的非中文字符
- *
- * @param inputString 字符串
- * @return 中文字符串
- */
- public static String removeNonChinese(String inputString) {
- // 匹配非汉字字符的正则表达式
- String regex = "[^\u4E00-\u9FA5]";
- Pattern pattern = Pattern.compile(regex);
- Matcher matcher = pattern.matcher(inputString);
- // 替换非汉字字符为空格
- return matcher.replaceAll("");
- }
-
- /**
- * 提取出生日期
- *
- * @param inputString 字符串
- * @return 出生日期
- */
- private static String extractBirthDate(String inputString) {
- // 匹配日期格式的正则表达式
- String regex = "(\\d{4}年\\d{2}月\\d{2}日)";
- Pattern pattern = Pattern.compile(regex);
- Matcher matcher = pattern.matcher(inputString);
- // 提取匹配到的日期
- if (matcher.find()) {
- return matcher.group(1);
- } else {
- return "未找到日期";
- }
- }
-
- /**
- * 截取指定字符
- *
- * @param inputString 字符串
- * @param indexStart 开始Index
- * @return 截取的字符串
- */
- public static String getStringByIndex(String inputString, int indexStart) {
- return getStringByIndex(inputString, indexStart, -1);
- }
-
- /**
- * 截取指定字符
- *
- * @param inputString 字符串
- * @param indexStart 开始Index
- * @param size 截取的字符个数
- * @return 截取的字符串
- */
- public static String getStringByIndex(String inputString, int indexStart, int size) {
- // 去除字符串两端的空白字符
- String trimmedString = inputString.trim();
- // 将字符串以空白字符分割
- StringBuilder res = new StringBuilder();
- String[] words = trimmedString.split("\\s+");
- int length = words.length;
- int contentSize = indexStart + size;
- if (length > indexStart) {
- int index = length;
- if (size > 0 && length > contentSize) {
- index = contentSize;
- }
- for (int i = indexStart; i < index; i++) {
- res.append(words[i]);
- }
- }
- return res.toString();
- }
-
-
-
-}
diff --git a/src/main/java/org/springblade/modules/ureport/HouseholdBean.java b/src/main/java/org/springblade/modules/ureport/HouseholdBean.java
deleted file mode 100644
index 1dca4f3..0000000
--- a/src/main/java/org/springblade/modules/ureport/HouseholdBean.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.springblade.modules.ureport;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.house.entity.HouseholdEntity;
-import org.springblade.modules.house.service.IUserHouseLabelService;
-import org.springblade.modules.house.vo.HouseholdLabelVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Map;
-
-/**
- * 住户bean
- */
-@Component
-public class HouseholdBean {
-
- @Autowired
- private IUserHouseLabelService householdLabelService;
-
- /**
- * 统计标签
- * @param dsName
- * @param datasetName
- * @param parameters
- * @return
- */
- public R statisticalLabels(String dsName, String datasetName, Map<String, Object> parameters) {
- HouseholdLabelVO householdLabel = new HouseholdLabelVO();
- Query query= new Query();
- query.setCurrent(1);
- query.setSize(100);
- IPage<HouseholdLabelVO> pages = householdLabelService.statisticalLabels(Condition.getPage(query), householdLabel);
- return R.data(pages.getRecords());
- }
-}
diff --git a/src/main/java/org/springblade/modules/wechat/controller/WechatController.java b/src/main/java/org/springblade/modules/wechat/controller/WechatController.java
deleted file mode 100644
index 82b571f..0000000
--- a/src/main/java/org/springblade/modules/wechat/controller/WechatController.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.springblade.modules.wechat.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.core.tool.api.R;
-import org.springblade.modules.pay.entity.WeChatMiniAuthorizeVo;
-import org.springblade.modules.wechat.service.WechatService;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-@Slf4j
-@RestController
-@RequestMapping("blade-wechat/wechat/")
-@Api(tags = "用户 -- 登录注册")
-public class WechatController {
- @Resource
- private WechatService wechatService;
-
- @ApiOperation(value = "微信小程序授权")
- @RequestMapping(value = "/getOpenId", method = RequestMethod.GET)
- public R<WeChatMiniAuthorizeVo> wechatRoutineLogin(String code) throws Exception {
- return R.data(wechatService.miniAuthCode(code));
- }
-
-
-}
-
-
-
diff --git a/src/main/java/org/springblade/modules/wechat/service/WechatService.java b/src/main/java/org/springblade/modules/wechat/service/WechatService.java
deleted file mode 100644
index b6e029c..0000000
--- a/src/main/java/org/springblade/modules/wechat/service/WechatService.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.springblade.modules.wechat.service;
-
-import org.springblade.modules.pay.entity.WeChatMiniAuthorizeVo;
-
-public interface WechatService {
- /**
- * 小程序登录凭证校验
- *
- * @return 小程序登录校验对象
- */
- WeChatMiniAuthorizeVo miniAuthCode(String code);
-}
diff --git a/src/main/java/org/springblade/modules/wechat/service/impl/WechatServiceImpl.java b/src/main/java/org/springblade/modules/wechat/service/impl/WechatServiceImpl.java
deleted file mode 100644
index 6f9b9d4..0000000
--- a/src/main/java/org/springblade/modules/wechat/service/impl/WechatServiceImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.springblade.modules.wechat.service.impl;
-
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.common.config.WxMiniConfig;
-import org.springblade.common.exception.CustomException;
-import org.springblade.common.utils.HttpClientUtils;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.modules.pay.entity.WeChatMiniAuthorizeVo;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.service.IUserService;
-import org.springblade.modules.wechat.service.WechatService;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-
-@Service
-public class WechatServiceImpl implements WechatService {
-
- private static final Logger logger = LoggerFactory.getLogger(WechatServiceImpl.class);
-
- @Resource
- private WxMiniConfig wxMiniConfig;
-
- /**
- * 小程序登录凭证校验
- *
- * @return 小程序登录校验对象
- */
- @Override
- public WeChatMiniAuthorizeVo miniAuthCode(String code) {
- String url = StrUtil.format(wxMiniConfig.getJscode2sessionUrl(), wxMiniConfig.getAppid(), wxMiniConfig.getSecret(), code);
- JSONObject data = JSON.parseObject(HttpClientUtils.doGet(url));
- if (ObjectUtil.isNull(data)) {
- logger.error("微信平台接口异常,没任何数据返回!");
- throw new CustomException("微信平台接口异常,没任何数据返回!");
- }
- if (data.containsKey("errcode") && !data.getString("errcode").equals("0")) {
- if (data.containsKey("errmsg")) {
- logger.error("微信接口调用失败:" + data.getString("errcode") + data.getString("errmsg"));
- throw new CustomException("微信接口调用失败:" + data.getString("errcode") + data.getString("errmsg"));
- }
- }
- WeChatMiniAuthorizeVo weChatMiniAuthorizeVo = JSONObject.parseObject(data.toJSONString(), WeChatMiniAuthorizeVo.class);
- // 绑定用户openid
- Long userId = AuthUtil.getUserId();
- IUserService userService = SpringUtils.getBean(IUserService.class);
- userService.update(Wrappers.<User>lambdaUpdate().set(User::getMiniOpenId, weChatMiniAuthorizeVo.getOpenId()).eq(User::getId, userId));
- return weChatMiniAuthorizeVo;
- }
-
-
-}
-
diff --git a/src/main/java/org/springblade/modules/words/DemoApplication.java b/src/main/java/org/springblade/modules/words/DemoApplication.java
deleted file mode 100644
index 3fb5f91..0000000
--- a/src/main/java/org/springblade/modules/words/DemoApplication.java
+++ /dev/null
@@ -1,1082 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.util.StopWatch;
-
-import java.io.*;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Stream;
-
-public class DemoApplication {
-
- public static void main(String[] args) throws Exception {
-
-// test_StringSearch();
-// test_WordsSearch();
-
- Map content = new HashMap();
- content = interceptWords("nihoahsodahioda日本人,大萨达");
- System.out.println(content);
-// test_StringSearchEx();
-// test_WordsSearchEx();
-//
-// test_StringSearchEx2();
-// test_WordsSearchEx2();
-// test_IllegalWordsSearch();
-//
-// test_StringMatch();
-// test_WordsMatch();
-//
-// test_StringMatchEx();
-// test_WordsMatchEx();
-//
-// test_PinyinMatch();
-// test_PinyinMatch2();
-//
-// test_Pinyin();
-// test_words();
-
- // try {
- // test_save_load();
- // test_IllegalWordsSearch_loadWordsFormBinaryFile();
- // } catch (Exception e) {
- // e.printStackTrace();
- // }
- // test_times();
-
-// test_issues_54();
-// test_issues_57();
-// test_issues_57_2();
-// test_issues_57_3();
-// test_issues_65();
-// test_issues_74();
- }
-
- public static Map interceptWords(String content) {
- List<String> list = new ArrayList<String>();
- list.add("美国");
- list.add("日本");
- StringSearch iwords = new StringSearch();
- iwords.SetKeywords(list);
-
- Map res = new HashMap();
-
- boolean b = iwords.ContainsAny(content);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- res.put("iswords",String.valueOf(b));
-
- String str = iwords.Replace(content, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- res.put("content",str);
-
- String text = "";
- List<String> all = iwords.FindAll(content);
- for (int i = 0; i < all.size(); i++) {
- text += all.get(i) + ",";
- }
- String words = "";
- if(!text.equals("")){
- words = text.substring(0,text.length()-1);
- }
-
-
- res.put("words",words);
-
- return res;
- }
-
- public static void test_StringSearch() {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("StringSearch run Test.");
-
- StringSearch iwords = new StringSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.FindFirst(test);
- if (f != "中国") {
- System.out.println("FindFirst is Error.");
- }
-
- List<String> all = iwords.FindAll(test);
- if (all.get(0) != "中国") {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1) != "国人") {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_StringSearchEx() {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("StringSearchEx run Test.");
-
- StringSearchEx iwords = new StringSearchEx();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.FindFirst(test);
- if (f != "中国") {
- System.out.println("FindFirst is Error.");
- }
-
- List<String> all = iwords.FindAll(test);
- if (all.get(0) != "中国") {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1) != "国人") {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_StringSearchEx2() {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("StringSearchEx2 run Test.");
-
- StringSearchEx2 iwords = new StringSearchEx2();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.FindFirst(test);
- if (f != "中国") {
- System.out.println("FindFirst is Error.");
- }
-
- List<String> all = iwords.FindAll(test);
- if (all.get(0) != "中国") {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1) != "国人") {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_WordsSearch() {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("WordsSearch run Test.");
-
- WordsSearch iwords = new WordsSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- WordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword != "中国") {
- System.out.println("FindFirst is Error.");
- }
-
- List<WordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword != "中国") {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword != "国人") {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_WordsSearchEx() throws IOException {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("WordsSearchEx run Test.");
-
- WordsSearchEx iwords2 = new WordsSearchEx();
- iwords2.SetKeywords(list);
- iwords2.Save("WordsSearchEx.dat");
-
- WordsSearchEx iwords = new WordsSearchEx();
- iwords.Load("WordsSearchEx.dat");
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- WordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword.equals("中国") == false) {
- System.out.println("FindFirst is Error.");
- }
-
- List<WordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword.equals("中国") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword.equals("国人") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_WordsSearchEx2() {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("WordsSearchEx2 run Test.");
-
- WordsSearchEx2 iwords = new WordsSearchEx2();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- WordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword != "中国") {
- System.out.println("FindFirst is Error.");
- }
-
- List<WordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword != "中国") {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword != "国人") {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_IllegalWordsSearch() {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("IllegalWordsSearch run Test.");
-
- IllegalWordsSearch iwords = new IllegalWordsSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- IllegalWordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword.equals("中国") == false) {
- System.out.println("FindFirst is Error.");
- }
-
- List<IllegalWordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword.equals("中国") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword.equals("国人") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_StringMatch() throws Exception {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("[中美]国");
- list.add("国人");
- list.add("zg人");
- System.out.println("StringMatch run Test.");
-
- StringMatch iwords = new StringMatch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.FindFirst(test);
- if (!f.equals("中国")) {
- System.out.println("FindFirst is Error.");
- }
-
- List<String> all = iwords.FindAll(test);
- if (!all.get(0).equals("中国")) {
- System.out.println("FindAll is Error.");
- }
- if (!all.get(1).equals("国人")) {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_StringMatchEx() throws Exception {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("[中美]国");
- list.add("国人");
- list.add("zg人");
- System.out.println("StringMatchEx run Test.");
-
- StringMatchEx iwords = new StringMatchEx();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.FindFirst(test);
- if (!f.equals("中国")) {
- System.out.println("FindFirst is Error.");
- }
-
- List<String> all = iwords.FindAll(test);
- if (!all.get(0).equals("中国")) {
- System.out.println("FindAll is Error.");
- }
- if (!all.get(1).equals("国人")) {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_WordsMatch() throws Exception {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("[中美]国");
- list.add("国人");
- list.add("zg人");
- System.out.println("WordsMatch run Test.");
-
- WordsMatch iwords = new WordsMatch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- WordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword.equals("中国") == false) {
- System.out.println("FindFirst is Error.");
- }
-
- List<WordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword.equals("中国") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword.equals("国人") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_WordsMatchEx() throws Exception {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("[中美]国");
- list.add("国人");
- list.add("zg人");
- System.out.println("WordsMatchEx run Test.");
-
- WordsMatchEx iwords = new WordsMatchEx();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- WordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword.equals("中国") == false) {
- System.out.println("FindFirst is Error.");
- }
-
- List<WordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword.equals("中国") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword.equals("国人") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_PinyinMatch() throws NumberFormatException, IOException {
- String s = "北京|天津|河北|辽宁|吉林|黑龙江|山东|江苏|上海|浙江|安徽|福建|江西|广东|广西|海南|河南|湖南|湖北|山西|内蒙古|宁夏|青海|陕西|甘肃|新疆|四川|贵州|云南|重庆|西藏|香港|澳门|台湾";
- List<String> list = new ArrayList<String>();
- String[] ss = s.split("\\|");
- for (String st : ss) {
- list.add(st);
- }
- PinyinMatch match = new PinyinMatch();
- match.SetKeywords(list);
- System.out.println("PinyinMatch run Test.");
-
- List<String> all = match.Find("BJ");
- if (all.get(0).equals("北京") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
-
- all = match.Find("北J");
- if (all.get(0).equals("北京") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
-
- all = match.Find("北Ji");
- if (all.get(0).equals("北京") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
- all = match.Find("Su");
- if (all.get(0).equals("江苏") == false) {
- System.out.println("Find is Error.");
- }
-
- all = match.Find("Sdon");
- if (all.get(0).equals("山东") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
- all = match.Find("S东");
- if (all.get(0).equals("山东") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
-
- List<Integer> all2 = match.FindIndex("BJ");
- if (all2.get(0) != 0) {
- System.out.println("FindIndex is Error.");
- }
- if (all2.size() != 1) {
- System.out.println("FindIndex is Error.");
- }
-
- all = match.FindWithSpace("S 东");
- if (all.get(0).equals("山东") == false) {
- System.out.println("FindWithSpace is Error.");
- }
- if (all.size() != 1) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("h 江");
- if (all.get(0).equals("黑龙江") == false) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all2 = match.FindIndexWithSpace("B J");
- if (all2.get(0) != 0) {
- System.out.println("FindIndexWithSpace is Error.");
- }
- if (all2.size() != 1) {
- System.out.println("FindIndexWithSpace is Error.");
- }
-
- all = match.FindWithSpace("京 北");
- if (all.size() != 0) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("黑龙 龙江");
- if (all.size() != 0) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("黑龙 江");
- if (all.get(0).equals("黑龙江") == false) {
- System.out.println("FindWithSpace is Error.");
- }
- all = match.FindWithSpace("黑 龙 江");
- if (all.get(0).equals("黑龙江") == false) {
- System.out.println("FindWithSpace is Error.");
- }
- }
-
- private static void test_PinyinMatch2() throws Exception {
- String s = "北京|天津|河北|辽宁|吉林|黑龙江|山东|江苏|上海|浙江|安徽|福建|江西|广东|广西|海南|河南|湖南|湖北|山西|内蒙古|宁夏|青海|陕西|甘肃|新疆|四川|贵州|云南|重庆|西藏|香港|澳门|台湾";
- List<String> list = new ArrayList<String>();
- String[] ss = s.split("\\|");
- for (String st : ss) {
- list.add(st);
- }
- PinyinMatch2<String> match = new PinyinMatch2<String>(list);
- match.SetKeywordsFunc(new Function<String, String>() {
- @Override
- public String apply(String t) {
- return t;
- }
- });
-
- System.out.println("PinyinMatch2 run Test.");
-
- List<String> all = match.Find("BJ");
- if (all.get(0).equals("北京") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
-
- all = match.Find("北J");
- if (all.get(0).equals("北京") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
-
- all = match.Find("北Ji");
- if (all.get(0).equals("北京") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
- all = match.Find("Su");
- if (all.get(0).equals("江苏") == false) {
- System.out.println("Find is Error.");
- }
-
- all = match.Find("Sdon");
- if (all.get(0).equals("山东") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
- all = match.Find("S东");
- if (all.get(0).equals("山东") == false) {
- System.out.println("Find is Error.");
- }
- if (all.size() != 1) {
- System.out.println("Find is Error.");
- }
-
- all = match.FindWithSpace("S 东");
- if (all.get(0).equals("山东") == false) {
- System.out.println("FindWithSpace is Error.");
- }
- if (all.size() != 1) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("h 江");
- if (all.get(0).equals("黑龙江") == false) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("京 北");
- if (all.size() != 0) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("黑龙 龙江");
- if (all.size() != 0) {
- System.out.println("FindWithSpace is Error.");
- }
-
- all = match.FindWithSpace("黑龙 江");
- if (all.get(0).equals("黑龙江") == false) {
- System.out.println("FindWithSpace is Error.");
- }
- all = match.FindWithSpace("黑 龙 江");
- if (all.get(0).equals("黑龙江") == false) {
- System.out.println("FindWithSpace is Error.");
- }
- }
-
- private static void test_save_load() throws IOException {
- String test = "我是中国人";
- List<String> list = new ArrayList<String>();
- list.add("中国");
- list.add("国人");
- list.add("zg人");
- System.out.println("test_save_load run Test.");
-
- StringSearchEx2 search = new StringSearchEx2();
- search.SetKeywords(list);
- search.Save("1.dat");
-
- StringSearchEx2 iwords = new StringSearchEx2();
- iwords.Load("1.dat");
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.FindFirst(test);
- if (f != "中国") {
- System.out.println("FindFirst is Error.");
- }
-
- List<String> all = iwords.FindAll(test);
- if (all.get(0) != "中国") {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1) != "国人") {
- System.out.println("FindAll is Error.");
- }
- if (all.size() != 2) {
- System.out.println("FindAll is Error.");
- }
-
- String str = iwords.Replace(test, '*');
- if (str.equals("我是***") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- private static void test_times() {
- String ts = readLineByLineJava8("BadWord.txt");
- String[] sp = ts.split("[\r\n]");
- List<String> list = new ArrayList<String>();
- for (String item : sp) {
- list.add(item);
- }
- String words = readLineByLineJava8("Talk.txt");
-
- StringSearchEx2 iwords = new StringSearchEx2();
- iwords.SetKeywords(list);
-
- StopWatch sw = new StopWatch();
- sw.start("校验耗时");
- for (int i = 0; i < 100000; i++) {
- // iwords.ContainsAny(words);
- iwords.FindAll(words);
- // System.out.println(list2.size());
- }
- sw.stop();
- System.out.println(sw.getTotalTimeMillis() + "ms");
-
- }
-
- private static String readLineByLineJava8(String filePath) {
- StringBuilder contentBuilder = new StringBuilder();
- try (Stream<String> stream = Files.lines(Paths.get(filePath), StandardCharsets.UTF_8)) {
- stream.forEach(s -> contentBuilder.append(s).append("\n"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- return contentBuilder.toString();
- }
-
- private static void test_IllegalWordsSearch_loadWordsFormBinaryFile() throws IOException {
-
- long l1 = System.currentTimeMillis();
-
- IllegalWordsSearch search = new IllegalWordsSearch();
- long l2 = System.currentTimeMillis();
- System.out.println("IllegalWordsSearch init time:" + (l2 - l1));
-
- search.Load(new ClassPathResource("IllegalWordsSearch.dat").getFile().getAbsolutePath());
- long l3 = System.currentTimeMillis();
- System.out.println("load Load time:" + (l3 - l2));
-
- String test = "卖毒品哈哈哈哈毛澤東porn哈哈哈哈胡锦涛pornasds哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛胡锦涛撒旦撒旦pornporn哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn"
- + "哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn哈哈哈哈胡錦濤porn哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn"
- + "哈哈哈哈胡锦涛porn哈哈哈哈胡锦涛porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn"
- + "哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn"
- + "哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn"
- + "哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn"
- + "哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn哈哈哈哈或porn";
-
- boolean b = search.ContainsAny(test);
- if (!b) {
- System.out.println("ContainsAny is Error.");
- }
- long l4 = System.currentTimeMillis();
- System.out.println("ContainsAny time:" + (l4 - l3));
-
- String str = search.Replace(test, '*');
- long l5 = System.currentTimeMillis();
- System.out.println("Replace Result:" + str);
- System.out.println("Replace time:" + (l5 - l4));
- }
-
- private static void test_IllegalWordsSearch_saveToBinaryFile() throws IOException {
- List<String> list = new ArrayList<>();
- try (BufferedReader bufferedReader = new BufferedReader(
- new InputStreamReader(new ClassPathResource("sensi_words.txt").getInputStream()))) {
- for (String line = bufferedReader.readLine(); line != null; line = bufferedReader.readLine()) {
- list.add(line);
- }
- }
- IllegalWordsSearch search = new IllegalWordsSearch();
- search.SetKeywords(list);
- search.Save("IllegalWordsSearch.dat");
- }
-
- private static void test_Pinyin() throws NumberFormatException, IOException {
- System.out.println("text_Pinyin run Test.");
- List<String> t = WordsHelper.GetAllPinyin('芃');
- if (t.get(0).equals("Peng") == false) {
- System.out.println("GetAllPinyin is Error.");
- }
-
- String a = WordsHelper.GetPinyinFast("阿");
- if (a.equals("A") == false) {
- System.out.println("GetPinyinFast is Error.");
- }
-
- String b = WordsHelper.GetPinyin("摩擦棒");
- if (b.equals("MoCaBang") == false) {
- System.out.println("GetPinyin is Error.");
- }
- b = WordsHelper.GetPinyin("秘鲁");
- if (b.equals("BiLu") == false) {
- System.out.println("GetPinyin is Error.");
- }
-
- String py = WordsHelper.GetPinyinFast("我爱中国");
- if (py.equals("WoAiZhongGuo") == false) {
- System.out.println("GetPinyinFast is Error.");
- }
-
- py = WordsHelper.GetPinyin("快乐,乐清");
- if (py.equals("KuaiLe,YueQing") == false) {
- System.out.println("GetPinyin is Error.");
- }
-
- py = WordsHelper.GetPinyin("快乐清理");
- if (py.equals("KuaiLeQingLi") == false) {
- System.out.println("GetPinyin is Error.");
- }
-
- py = WordsHelper.GetPinyin("我爱中国", true);
- if (py.equals("WǒÀiZhōngGuó") == false) {
- System.out.println("GetPinyin is Error.");
- }
-
- py = WordsHelper.GetFirstPinyin("我爱中国");
- if (py.equals("WAZG") == false) {
- System.out.println("GetPinyin is Error.");
- }
-
- List<String> pys = WordsHelper.GetAllPinyin('传');
- if (pys.get(0).equals("Chuan") == false) {
- System.out.println("GetAllPinyin is Error.");
- }
- if (pys.get(1).equals("Zhuan") == false) {
- System.out.println("GetAllPinyin is Error.");
- }
-
- py = WordsHelper.GetPinyinForName("单一一");
- if (py.equals("ShanYiYi") == false) {
- System.out.println("GetPinyinForName is Error.");
- }
-
- py = WordsHelper.GetPinyinForName("单一一", true);
- if (py.equals("ShànYīYī") == false) {
- System.out.println("GetPinyinForName is Error.");
- }
-
- List<String> all = WordsHelper.GetAllPinyin('石');
- if (all.size() == 0) {
- System.out.println("GetAllPinyin is Error.");
- }
-
- }
-
- private static void test_words() throws Exception {
- System.out.println("test_words run Test.");
- String s = WordsHelper.ToSimplifiedChinese("壹佰贰拾叁億肆仟伍佰陆拾柒萬捌仟玖佰零壹元壹角贰分");
- if (s.equals("壹佰贰拾叁亿肆仟伍佰陆拾柒万捌仟玖佰零壹元壹角贰分") == false) {
- System.out.println("ToSimplifiedChinese is Error.");
- }
-
- String tw = WordsHelper.ToTraditionalChinese("壹佰贰拾叁亿肆仟伍佰陆拾柒万捌仟玖佰零壹元壹角贰分");
- if (tw.equals("壹佰貳拾叄億肆仟伍佰陸拾柒萬捌仟玖佰零壹元壹角貳分") == false) {
- System.out.println("ToTraditionalChinese is Error.");
- }
-
- String tw2 = WordsHelper.ToTraditionalChinese("原代码11", 2);
- if (tw2.equals("原始碼11") == false) {
- System.out.println("ToTraditionalChinese is Error.");
- }
-
- String tw3 = WordsHelper.ToTraditionalChinese("反反复复", 2);
- if (tw3.equals("反反覆覆") == false) {
- System.out.println("ToTraditionalChinese is Error.");
- }
-
- String tw4 = WordsHelper.ToTraditionalChinese("这人考虑事情总是反反复复的", 2);
- if (tw4.equals("這人考慮事情總是反反覆覆的") == false) {
- System.out.println("ToTraditionalChinese is Error.");
- }
-
- }
-
- public static void test_issues_54() {
- IllegalWordsSearch search = new IllegalWordsSearch();
- search.SetKeywords(Arrays.asList("test", "world", "this", "hello", "monster"));
- String result = search.Replace("test, hahaha, this is a hello world", '*');
- if (result.equals("****, hahaha, **** is a ***** *****") == false) {
- System.out.println("IllegalWordsSearch Replace is Error.");
- }
- }
- public static void test_issues_57(){
- String test = "一,二二,三三三,四四四四,五五五五五,六六六六六六";
- List<String> list = new ArrayList<String>();
- list.add("一");
- list.add("二二");
- list.add("三三三");
- list.add("四四四四");
- list.add("五五五五五");
- list.add("六六六六六六");
- System.out.println("test_issues_57 run Test.");
-
- IllegalWordsSearch iwords = new IllegalWordsSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- IllegalWordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword.equals("一") == false) {
- System.out.println("FindFirst is Error.");
- }
-
- List<IllegalWordsSearchResult> all = iwords.FindAll(test);
- if (all.get(0).Keyword.equals("一") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(1).Keyword.equals("二二") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(2).Keyword.equals("三三三") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(3).Keyword.equals("四四四四") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(4).Keyword.equals("五五五五五") == false) {
- System.out.println("FindAll is Error.");
- }
- if (all.get(5).Keyword.equals("六六六六六六") == false) {
- System.out.println("FindAll is Error.");
- }
- }
-
- public static void test_issues_57_2(){
- String test = "jameson吃饭";
- List<String> list = new ArrayList<String>();
- list.add("jameson吃饭");
- list.add("吃饭jameson");
- System.out.println("test_issues_57_2 run Test.");
-
- IllegalWordsSearch iwords = new IllegalWordsSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- IllegalWordsSearchResult f = iwords.FindFirst(test);
- if (f.Keyword.equals("jameson吃饭") == false) {
- System.out.println("FindFirst is Error.");
- }
- }
- public static void test_issues_57_3(){
- String test = "his is sha ash";
- List<String> list = new ArrayList<String>();
- list.add("ash");
- list.add("sha");
- list.add("bcd");
- System.out.println("test_issues_57_3 run Test.");
-
- IllegalWordsSearch iwords = new IllegalWordsSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- IllegalWordsSearchResult f = iwords.FindFirst(test);
- if (f == null || f.Keyword.equals("sha") == false) {
- System.out.println("FindFirst is Error.");
- }
- }
- public static void test_issues_65(){
- String test = "fFuck";
- List<String> list = new ArrayList<String>();
- list.add("fuck");
- list.add("ffx");
- list.add("bcd");
- System.out.println("test_issues_65 run Test.");
-
- IllegalWordsSearch iwords = new IllegalWordsSearch();
- iwords.SetKeywords(list);
-
- boolean b = iwords.ContainsAny(test);
- if (b == false) {
- System.out.println("ContainsAny is Error.");
- }
-
- String f = iwords.Replace(test);
- if (f == null || f.equals("*****") == false) {
- System.out.println("Replace is Error.");
- }
- }
-
- public static void test_issues_74(){
- List<String> list =loadKeywords(new File("sensi_words.txt"));
- System.out.println("test_issues_74 run Test.");
-
- IllegalWordsSearch iwords = new IllegalWordsSearch();
- iwords.SetKeywords(list);
- String test = "机机歪歪";
-
- boolean b = iwords.ContainsAny(test);
- if (b==false) {
- System.out.println("ContainsAny is Error.");
- }
- }
-
- public static List<String> loadKeywords(File file){
- List<String> keyArray=new ArrayList<String>();
- try{
- BufferedReader br = new BufferedReader(new FileReader(file));//构造一个BufferedReader类来读取文件
- String s = null;
- while((s = br.readLine())!=null){//使用readLine方法,一次读一行
- keyArray.add(s);
- }
- br.close();
- }catch(Exception e){
- e.printStackTrace();
- }
- return keyArray;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/IllegalWordsSearch.java b/src/main/java/org/springblade/modules/words/IllegalWordsSearch.java
deleted file mode 100644
index 1b0f8e9..0000000
--- a/src/main/java/org/springblade/modules/words/IllegalWordsSearch.java
+++ /dev/null
@@ -1,636 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearchEx;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.function.Function;
-
-/**
- * 最新版本的IllegalWordsSearch, 与2020.05.24以前的版本不兼容, IllegalWordsSearch类太费精力了,头发稀疏了。
- * 我未来可能以敏感词过滤做为创业项目,所以这是最后的开源版本,不再免费补bug了。
- * IllegalWordsSearch修复了2020-10-8日前所有bug。
- */
-@Deprecated
-public class IllegalWordsSearch extends BaseSearchEx {
- public class SkipWordFilterHandler {
- public char c;
- public String text;
- public int index;
-
- public SkipWordFilterHandler(final char c, final String text, final int index) {
- this.c = c;
- this.text = text;
- this.index = index;
- }
- }
-
- public class CharTranslateHandler {
- public char c;
- public String text;
- public int index;
-
- public CharTranslateHandler(final char c, final String text, final int index) {
- this.c = c;
- this.text = text;
- this.index = index;
- }
- }
-
- public class StringMatchHandler {
- public String text;
- public int start;
- public int end;
- public String keyword;
- public int keywordIndex;
- public String matchKeyword;
- public int blacklistIndex;
-
- public StringMatchHandler(final String text, final int start, final int end, final String keyword,
- final int keywordIndex, final String matchKeyword, final int blacklistIndex) {
- this.text = text;
- this.start = start;
- this.end = end;
- this.keyword = keyword;
- this.keywordIndex = keywordIndex;
- this.matchKeyword = matchKeyword;
- this.blacklistIndex = blacklistIndex;
- }
- }
-
- /**
- * 使用跳词过滤器,默认使用
- */
- public boolean UseSkipWordFilter = true;
- private final String _skipList = " \t\r\n~!@#$%^&*()_+-=【】、[]{}|;"
- + "':\",。、《》?αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩①②③④⑤⑥⑦⑧⑨⑩⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇≈≡≠=≤≥<>≮≯∷±+-×÷/∫∮∝∞∧∨∑∏∪∩∈∵∴⊥∥∠⌒⊙≌∽√§№☆★○●◎◇◆□℃‰€■△▲※→←↑↓〓¤°#&@\︿_ ̄―♂♀┌┍┎┐┑┒┓─┄┈├┝┞┟┠┡┢┣│┆┊┬┭┮┯┰┱┲┳┼┽┾┿╀╁╂╃└┕┖┗┘┙┚┛━┅┉┤┥┦┧┨┩┪┫┃┇┋┴┵┶┷┸┹┺┻╋╊╉╈╇╆╅╄";
- private boolean[] _skipBitArray;
-
- /** 过滤跳词 */
- public Function<SkipWordFilterHandler, Boolean> SkipWordFilter;
- /**
- * 字符转化,可以设置繁简转化、忽略大小写,启用后UseIgnoreCase开启无效
- * 若想使用CharTranslateHandler,请先添加事件CharTranslateHandler, 再用SetKeywords设置关键字
- */
- public Function<CharTranslateHandler, Character> CharTranslate;
-
- /**
- * 自定义字符串匹配
- */
- public Function<StringMatchHandler, Boolean> StringMatch;
-
- /**
- * 使用重复词过滤器
- */
- public boolean UseDuplicateWordFilter = true;
- /**
- * 使用黑名单过滤器
- */
- private int[] _blacklist = new int[0];
- /**
- * 使用半角转化器
- */
- public boolean UseDBCcaseConverter = true;
- /**
- * 使用忽略大小写
- */
- public boolean UseIgnoreCase = true;
-
- /**
- * 最新版本的IllegalWordsSearch, 与2020.05.24以前的版本不兼容, IllegalWordsSearch类太费精力了,头发稀疏了。
- * 我未来可能以敏感词过滤做为创业项目,所以这是最后的开源版本,不再免费补bug了。
- * IllegalWordsSearch修复了2020-10-8日前所有bug。
- */
- public IllegalWordsSearch() {
- _skipBitArray = new boolean[Character.MAX_VALUE + 1];
- for (int i = 0; i < _skipList.length(); i++) {
- _skipBitArray[_skipList.charAt(i)] = true;
- }
- SkipWordFilter = null;
- CharTranslate = null;
- StringMatch = null;
- }
-
- /**
- * 设置跳词
- *
- * @param skipList
- */
- public void SetSkipWords(final String skipList) {
-
- _skipBitArray = new boolean[Character.MAX_VALUE + 1];
- if (skipList != null) {
- for (int i = 0; i < skipList.length(); i++) {
- _skipBitArray[skipList.charAt(i)] = true;
- }
- }
- }
-
- /**
- * 设置关键字 如果想使用CharTranslateHandler,请先添加事件CharTranslateHandler,
- * 再用SetKeywords设置关键字 使用CharTranslateHandler后,UseIgnoreCase配置无效
- * 如果不使用忽略大小写,请先UseIgnoreCase设置为false,再用SetKeywords设置关键字
- *
- * @param keywords
- */
- public void SetKeywords(final List<String> keywords) {
- if (CharTranslate != null) {
- final Set<String> kws = new HashSet<String>(keywords);
- final List<String> list = new ArrayList<String>();
- for (final String item : kws) {
- final StringBuilder sb = new StringBuilder();
- for (int i = 0; i < item.length(); i++) {
- final char c = CharTranslate.apply(new CharTranslateHandler(item.charAt(i), item, i));
- sb.append(c);
- }
- list.add(sb.toString());
- }
- super.SetKeywords(list);
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- final Set<String> kws = new HashSet<String>(keywords);
- final List<String> list = new ArrayList<String>();
- for (final String item : kws) {
- list.add(ToSenseWord(item));
- }
- super.SetKeywords(list);
- } else {
- super.SetKeywords(keywords);
- }
- }
-
- protected void Save(final FileOutputStream bw) throws IOException {
- super.Save(bw);
-
- bw.write(UseSkipWordFilter ? 1 : 0);
- bw.write(NumHelper.serialize(_skipBitArray.length));
- for (final boolean item : _skipBitArray) {
- bw.write(item ? 1 : 0);
- }
-
- bw.write(UseDuplicateWordFilter ? 1 : 0);
- bw.write(NumHelper.serialize(_blacklist.length));
- for (final int item : _blacklist) {
- bw.write(NumHelper.serialize(item));
- }
-
- bw.write(UseDBCcaseConverter ? 1 : 0);
- bw.write(UseIgnoreCase ? 1 : 0);
- }
-
- public void Load(final InputStream br) throws IOException {
- super.Load(br);
-
- UseSkipWordFilter = br.read() > 0;
- int length = NumHelper.read(br);
- _skipBitArray = new boolean[length];
- for (int i = 0; i < length; i++) {
- _skipBitArray[i] = br.read() > 0;
- }
-
- UseDuplicateWordFilter = br.read() > 0;
- length = NumHelper.read(br);
- _blacklist = new int[length];
- for (int i = 0; i < length; i++) {
- _blacklist[i] = NumHelper.read(br);
- }
-
- UseDBCcaseConverter = br.read() > 0;
- UseIgnoreCase = br.read() > 0;
- }
-
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<IllegalWordsSearchResult> FindAll(final String text) {
- final List<IllegalWordsSearchResult> results = new ArrayList<IllegalWordsSearchResult>();
- int p = 0;
- char pChar = (char) 0;
-
- for (int i = 0; i < text.length(); i++) {
- char t1 = text.charAt(i);
- if (UseSkipWordFilter) {
- if (SkipWordFilter != null) {// 跳词跳过
- if (SkipWordFilter.apply(new SkipWordFilterHandler(t1, text, i))) {
- continue;
- }
- } else if (_skipBitArray[t1]) {
- continue;
- }
- }
-
- if (CharTranslate != null) { // 字符串转换
- t1 = CharTranslate.apply(new CharTranslateHandler(t1, text, i));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- t1 = ToSenseWord(t1);
- }
- final int t = _dict[t1];
- if (t == 0) {
- pChar = t1;
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index > -1) {
- next = _nextIndex[p].GetValue(index);
- } else if (UseDuplicateWordFilter && pChar == t1) {
- next = p;
- } else {
- next = _first[t];
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1] && CheckNextChar(text, t1, i)) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int index = _resultIndex[j];
- final IllegalWordsSearchResult r = GetGetIllegalResult(text, i, index);
- if (r != null) {
- results.add(r);
- }
- }
- }
- }
- p = next;
- pChar = t1;
- }
- return results;
- }
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public IllegalWordsSearchResult FindFirst(final String text) {
- int p = 0;
- char pChar = (char) 0;
-
- for (int i = 0; i < text.length(); i++) {
- char t1 = text.charAt(i);
- if (UseSkipWordFilter) {
- if (SkipWordFilter != null) {// 跳词跳过
- if (SkipWordFilter.apply(new SkipWordFilterHandler(t1, text, i))) {
- continue;
- }
- } else if (_skipBitArray[t1]) {
- continue;
- }
- }
-
- if (CharTranslate != null) { // 字符串转换
- t1 = CharTranslate.apply(new CharTranslateHandler(t1, text, i));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- t1 = ToSenseWord(t1);
- }
- final int t = _dict[t1];
- if (t == 0) {
- pChar = t1;
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index > -1) {
- next = _nextIndex[p].GetValue(index);
- } else if (UseDuplicateWordFilter && pChar == t1) {
- next = p;
- } else {
- next = _first[t];
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1] && CheckNextChar(text, t1, i)) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int index = _resultIndex[j];
- final IllegalWordsSearchResult r = GetGetIllegalResult(text, i, index);
- if (r != null) {
- return r;
- }
- }
- }
- }
- p = next;
- pChar = t1;
- }
- return null;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- int p = 0;
- char pChar = (char) 0;
-
- for (int i = 0; i < text.length(); i++) {
- char t1 = text.charAt(i);
- if (UseSkipWordFilter) {
- if (SkipWordFilter != null) {// 跳词跳过
- if (SkipWordFilter.apply(new SkipWordFilterHandler(t1, text, i))) {
- continue;
- }
- } else if (_skipBitArray[t1]) {
- continue;
- }
- }
-
- if (CharTranslate != null) { // 字符串转换
- t1 = CharTranslate.apply(new CharTranslateHandler(t1, text, i));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- t1 = ToSenseWord(t1);
- }
- final int t = _dict[t1];
- if (t == 0) {
- pChar = t1;
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index > -1) {
- next = _nextIndex[p].GetValue(index);
- } else if (UseDuplicateWordFilter && pChar == t1) {
- next = p;
- } else {
- next = _first[t];
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1] && CheckNextChar(text, t1, i)) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int index = _resultIndex[j];
- final IllegalWordsSearchResult r = GetGetIllegalResult(text, i, index);
- if (r != null) {
- return true;
- }
- }
- }
- }
- p = next;
- pChar = t1;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 文本
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- int p = 0;
- char pChar = (char) 0;
-
- for (int i = 0; i < text.length(); i++) {
- char t1 = text.charAt(i);
- if (UseSkipWordFilter) {
- if (SkipWordFilter != null) {// 跳词跳过
- if (SkipWordFilter.apply(new SkipWordFilterHandler(t1, text, i))) {
- continue;
- }
- } else if (_skipBitArray[t1]) {
- continue;
- }
- }
-
- if (CharTranslate != null) { // 字符串转换
- t1 = CharTranslate.apply(new CharTranslateHandler(t1, text, i));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- t1 = ToSenseWord(t1);
- }
- final int t = _dict[t1];
- if (t == 0) {
- pChar = t1;
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index > -1) {
- next = _nextIndex[p].GetValue(index);
- } else if (UseDuplicateWordFilter && pChar == t1) {
- next = p;
- } else {
- next = _first[t];
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1] && CheckNextChar(text, t1, i)) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int index = _resultIndex[j];
- final IllegalWordsSearchResult r = GetGetIllegalResult(text, i, index);
- if (r != null) {
- for (int k = r.Start; k <= r.End; k++) {
- result.setCharAt(k, replaceChar);
- }
- break;
- }
- }
- }
- }
- p = next;
- pChar = t1;
- }
- return result.toString();
- }
-
- private boolean CheckNextChar(final String text, final char c, final int end) {
- if (IsEnglishOrNumber(c) == false) {
- return true;
- }
- if (end + 1 < text.length()) {
- char e1 = text.charAt(end + 1);
- if (UseSkipWordFilter) {
- if (SkipWordFilter != null) {// 跳词跳过
- if (SkipWordFilter.apply(new SkipWordFilterHandler(e1, text, end + 1))) {
- return true;
- }
- } else if (_skipBitArray[e1]) {
- return true;
- }
- }
- if (CharTranslate != null) { // 字符串转换
- e1 = CharTranslate.apply(new CharTranslateHandler(e1, text, end + 1));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- e1 = ToSenseWord(e1);
- }
- if (IsEnglishOrNumber(e1)) {
- return false;
- }
- }
- return true;
- }
-
- private IllegalWordsSearchResult GetGetIllegalResult(String text, int end, int index) {
- String key = _keywords[index];
-
- int keyIndex = key.length() - 1;
- int start = end;
- for (int i = end; i >= 0; i--) {
- char s2 = text.charAt(i);
- if (UseSkipWordFilter) {
- if (SkipWordFilter != null) {
- if (SkipWordFilter.apply(new SkipWordFilterHandler(s2, text, i))) {
- continue;
- }
- } else if (_skipBitArray[s2]) {
- continue;
- }
- }
-
- if (CharTranslate != null) { // 字符串转换
- s2 = CharTranslate.apply(new CharTranslateHandler(s2, text, i));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- s2 = ToSenseWord(s2);
- }
- if (s2 == key.charAt(keyIndex)) {
- keyIndex--;
- if (keyIndex == -1) {
- start = i;
- break;
- }
- }
- }
- for (int i = start; i >= 0; i--) {
- char s2 = text.charAt(i);
- if (CharTranslate != null) { // 字符串转换
- s2 = CharTranslate.apply(new CharTranslateHandler(s2, text, i));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- s2 = ToSenseWord(s2);
- }
- if (s2 != key.charAt(0)) {
- break;
- }
- start = i;
- }
- return GetGetIllegalResult(text, key, start, end, index);
- }
-
- private IllegalWordsSearchResult GetGetIllegalResult(String text, String key, int start, int end, int index) {
- if (start > 0) {
- char s1 = text.charAt(start);
- if (CharTranslate != null) { // 字符串转换
- s1 = CharTranslate.apply(new CharTranslateHandler(s1, text, start));
- }
- if (IsEnglishOrNumber(s1)) {
- char s2 = text.charAt(start - 1);
- if (CharTranslate != null) { // 字符串转换
- s2 = CharTranslate.apply(new CharTranslateHandler(s2, text, start - 1));
- } else if (UseDBCcaseConverter || UseIgnoreCase) {
- s2 = ToSenseWord(s2);
- }
- if (IsEnglishOrNumber(s2)) {
- return null;
- }
- }
- }
-
- final String keyword = text.substring(start, end + 1);
- final int bl = _blacklist.length > index ? _blacklist[index] : 0;
- if (StringMatch != null) {
- if (StringMatch.apply(new StringMatchHandler(text, start, end, keyword, index, key, _blacklist[index]))) {
- return new IllegalWordsSearchResult(keyword, start, end, index, key, bl);
- }
- return null;
- }
- return new IllegalWordsSearchResult(keyword, start, end, index, key, bl);
- }
-
- /**
- * 设置黑名单
- *
- * @param blacklist
- * @throws IllegalArgumentException
- */
- public void SetBlacklist(final int[] blacklist) throws IllegalArgumentException {
- if (_keywords == null) {
- throw new IllegalArgumentException("请先使用SetKeywords方法设置关键字!");
- }
- if (blacklist.length != _keywords.length) {
- throw new IllegalArgumentException("请关键字与黑名单列表的长度要一样长!");
- }
- _blacklist = blacklist;
- }
-
- private Boolean IsEnglishOrNumber(final char c) {
- if (c < 128) {
- if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
- return true;
- }
- }
- return false;
- }
-
- private String ToSenseWord(final String text) {
- final StringBuilder stringBuilder = new StringBuilder(text.length());
- for (int i = 0; i < text.length(); i++) {
- stringBuilder.append(ToSenseWord(text.charAt(i)));
- }
- return stringBuilder.toString();
- }
-
- private Character ToSenseWord(final Character c) {
-
- if (UseIgnoreCase) {
- if (c >= 'A' && c <= 'Z')
- return (char) (c | 0x20);
- }
- if (UseDBCcaseConverter) {
- if (c == 12288)
- return ' ';
- if (c >= 65280 && c < 65375) {
- Character k = (char) (c - 65248);
- if (UseIgnoreCase) {
- if ('A' <= k && k <= 'Z') {
- k = (char) (k | 0x20);
- }
- }
- return (char) k;
- }
- }
- return c;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/IllegalWordsSearchResult.java b/src/main/java/org/springblade/modules/words/IllegalWordsSearchResult.java
deleted file mode 100644
index 5d19181..0000000
--- a/src/main/java/org/springblade/modules/words/IllegalWordsSearchResult.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.springblade.modules.words;
-
-
-public class IllegalWordsSearchResult
-{
- public IllegalWordsSearchResult(final String keyword, final int start, final int end, final int index,
- final String matchKeyword, final int type)
- {
- MatchKeyword = matchKeyword;
- End = end;
- Start = start;
- Index = index;
- Keyword = keyword;
- BlacklistType = type;
- }
-
- /**开始位置 */
- public int Start;
- /**结束位置 */
- public int End ;
- /**原始文本 */
- public String Keyword ;
- /**关键字 */
- public String MatchKeyword;
- /**黑名单类型 */
- public int BlacklistType ;
- /**索引 */
- public int Index;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/words/NumHelper.java b/src/main/java/org/springblade/modules/words/NumHelper.java
deleted file mode 100644
index e1323ac..0000000
--- a/src/main/java/org/springblade/modules/words/NumHelper.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.springblade.modules.words;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author yongxuan.he
- * @date 2020/3/17
- */
-public class NumHelper {
-
- public enum SerializableType {
- /** 大小在-128~127之间的整数,占用空间为1字节 */
- TINY_INT(1),
- /** 大小在-32768~32767之间的整数,占用空间为2字节 */
- SMALL_INT(2),
- /** 大小在-8388608~8388607之间的整数,占用空间为3字节 */
- MEDIUM_INT(3),
- /** int类型 */
- INT(4),
- ;
-
- private final int flag;
-
- private static Map<Integer, SerializableType> typeMap;
- static {
- Map<Integer, SerializableType> tmpMap = new HashMap<>();
- for (SerializableType type : SerializableType.values()) {
- tmpMap.put(type.getFlag(), type);
- }
- typeMap = tmpMap;
- }
- public static SerializableType getType(int flag) {
- return typeMap.get(flag);
- }
-
- SerializableType(int flag) {
- this.flag = flag;
- }
-
- public int getFlag() {
- return flag;
- }
- }
-
- private interface Serializer {
- byte[] serialize(int a);
- }
-
- private static Serializer tinyIntWriter = v -> {
- if (v < -128 || v > 127) {
- throw new RuntimeException("not tinyInt: " + v);
- }
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- out.write(v);
- return out.toByteArray();
- };
- private static Serializer smallIntWriter = v -> {
- if (v < -32768 || v > 32767) {
- throw new RuntimeException("not smallInt: " + v);
- }
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- out.write((v >>> 8) & 0xFF);
- out.write(v & 0xFF);
- return out.toByteArray();
- };
- private static Serializer mediumIntWriter = v -> {
- if (v < -8388608 || v > 8388607) {
- throw new RuntimeException("not mediumInt: " + v);
- }
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- out.write((v >>> 16) & 0xFF);
- out.write((v >>> 8) & 0xFF);
- out.write(v & 0xFF);
- return out.toByteArray();
- };
-
- private static Serializer intWriter = v -> {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- out.write((v >>> 24) & 0xFF);
- out.write((v >>> 16) & 0xFF);
- out.write((v >>> 8) & 0xFF);
- out.write(v & 0xFF);
- return out.toByteArray();
- };
-
- private static final Map<SerializableType, Serializer> simpleWriterMap = new ConcurrentHashMap<>();
- static {
- simpleWriterMap.put(SerializableType.TINY_INT, tinyIntWriter);
- simpleWriterMap.put(SerializableType.SMALL_INT, smallIntWriter);
- simpleWriterMap.put(SerializableType.MEDIUM_INT, mediumIntWriter);
- simpleWriterMap.put(SerializableType.INT, intWriter);
- }
-
- public static byte[] serialize(int v) {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Serializer serializer;
- int typeFlag;
-
- if(v >= -128 && v<= 127) {
- serializer = simpleWriterMap.get(SerializableType.TINY_INT);
- typeFlag = SerializableType.TINY_INT.getFlag();
- } else if(v >= -32768 && v <= 32767) {
- serializer = simpleWriterMap.get(SerializableType.SMALL_INT);
- typeFlag = SerializableType.SMALL_INT.getFlag();
- } else if(v >= -8388608 && v <= 8388607){
- serializer = simpleWriterMap.get(SerializableType.MEDIUM_INT);
- typeFlag = SerializableType.MEDIUM_INT.getFlag();
- } else {
- serializer = simpleWriterMap.get(SerializableType.INT);
- typeFlag = SerializableType.INT.getFlag();
- }
- out.write(typeFlag);
- byte[] bytes = serializer.serialize(v);
- out.write(bytes, 0, bytes.length);
- return out.toByteArray();
- }
-
- public interface Deserializer {
- int deserialize(InputStream in) throws IOException;
- }
-
- private static Deserializer tinyIntReader = in -> {
- int ch = in.read();
- if (ch < 0)
- throw new RuntimeException("deserializing");
- if ((0x80 & ch) == 0x80) {
- ch = 0xffffff00 | ch;
- }
- return ch;
- };
- private static Deserializer smallIntReader = in -> {
- int ch1 = in.read();
- int ch2 = in.read();
- if ((ch1 | ch2) < 0)
- throw new RuntimeException("deserializing");
- int ch = (ch1 << 8) + ch2;
- if ((0x8000 & ch) == 0x8000) {
- ch = 0xffff0000 | ch;
- }
- return ch;
- };
- private static Deserializer mediumIntReader = in -> {
- int ch1 = in.read();
- int ch2 = in.read();
- int ch3 = in.read();
- if ((ch1 | ch2 | ch3) < 0)
- throw new RuntimeException("deserializing");
- int ch = (ch1 << 16) + (ch2 << 8) + (ch3);
- if ((0x800000 & ch) == 0x800000) {
- ch = 0xff000000 | ch;
- }
- return ch;
- };
-
- private static Deserializer intReader = in -> {
- int ch1 = in.read();
- int ch2 = in.read();
- int ch3 = in.read();
- int ch4 = in.read();
- if ((ch1 | ch2 | ch3 | ch4) < 0)
- throw new RuntimeException("deserializing");
- return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4);
- };
-
- private static final Map<SerializableType, Deserializer> simpleReaderMap = new ConcurrentHashMap<>();
- static {
- simpleReaderMap.put(SerializableType.TINY_INT, tinyIntReader);
- simpleReaderMap.put(SerializableType.SMALL_INT, smallIntReader);
- simpleReaderMap.put(SerializableType.MEDIUM_INT, mediumIntReader);
- simpleReaderMap.put(SerializableType.INT, intReader);
- }
-
- public static int read(InputStream in) throws IOException {
- int flag = in.read();
- SerializableType type = SerializableType.getType(flag);
- Deserializer deserializer = simpleReaderMap.get(type);
-
- if(deserializer == null) {
- throw new RuntimeException("wrong flag: " + flag);
- }
- return deserializer.deserialize(in);
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/PinyinMatch.java b/src/main/java/org/springblade/modules/words/PinyinMatch.java
deleted file mode 100644
index db0a08f..0000000
--- a/src/main/java/org/springblade/modules/words/PinyinMatch.java
+++ /dev/null
@@ -1,332 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BasePinyinMatch;
-import org.springblade.modules.words.internals.PinyinDict;
-import org.springblade.modules.words.internals.TwoTuple;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class PinyinMatch extends BasePinyinMatch {
- private String[] _keywords;
- private String[] _keywordsFirstPinyin;
- private String[][] _keywordsPinyin;
- private int[] _indexs;
-
- /**
- * 设置关键字,注:索引会被清空
- *
- * @param keywords
- * @throws NumberFormatException
- * @throws IOException
- */
- public void SetKeywords(final List<String> keywords) throws NumberFormatException, IOException {
- _keywords = keywords.toArray(new String[0]);
- _keywordsFirstPinyin = new String[_keywords.length];
- _keywordsPinyin = new String[_keywords.length][];
- for (int i = 0; i < _keywords.length; i++) {
- final String text = _keywords[i];
- final String[] pys = PinyinDict.GetPinyinList(text, 0);
- String fpy = "";
- for (int j = 0; j < pys.length; j++) {
- pys[j] = pys[j].toUpperCase();
- fpy += pys[j].charAt(0);
- }
- _keywordsPinyin[i] = pys;
- _keywordsFirstPinyin[i] = fpy;
- }
- _indexs = null;
- }
-
- /**
- * 设置关键字,注:索引会被清空
- *
- * @param keywords
- * @param pinyin
- */
- public void SetKeywords(final List<String> keywords, final List<String> pinyin) {
- SetKeywords(keywords, pinyin, ',');
- }
-
- /**
- * 设置关键字,注:索引会被清空
- *
- * @param keywords
- * @param pinyin
- * @param splitChar
- */
- public void SetKeywords(final List<String> keywords, final List<String> pinyin, final char splitChar) {
- _keywords = keywords.toArray(new String[0]);
- _keywordsFirstPinyin = new String[_keywords.length];
- _keywordsPinyin = new String[_keywords.length][];
- for (int i = 0; i < _keywords.length; i++) {
- final String text = pinyin.get(i);
- final String[] pys = text.split(((Character) splitChar).toString());
- String fpy = "";
- for (int j = 0; j < pys.length; j++) {
- pys[j] = pys[j].toUpperCase();
- fpy += pys[j].charAt(0);
- }
- _keywordsPinyin[i] = pys;
- _keywordsFirstPinyin[i] = fpy;
- }
- _indexs = null;
- }
-
- /**
- * 设置索引
- *
- * @param indexs
- * @throws Exception
- */
- public void SetIndexs(final List<Integer> indexs) throws Exception {
- if (_keywords == null) {
- throw new Exception("请先使用 SetKeywords 方法");
- }
- if (indexs.size() < _keywords.length) {
- throw new Exception("indexs 数组长度大于 keywords");
- }
- _indexs = new int[indexs.size()];
- for (int i = 0; i < indexs.size(); i++) {
- _indexs[i] = indexs.get(i);
- }
- }
-
- /**
- * 查询
- *
- * @param key
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public List<String> Find(String key) throws NumberFormatException, IOException {
- key = key.toUpperCase().trim();
- if (key == null || key.equals("")) {
- return null;
- }
-
- final boolean hasPinyin = key.matches("^.*?[A-Z]+.*$");// Pattern.matches("[a-zA-Z]",key);
- if (hasPinyin == false) {
- final List<String> rs = new ArrayList<String>();
- for (int i = 0; i < _keywords.length; i++) {
- final String keyword = _keywords[i];
- if (keyword.contains(key)) {
- rs.add(keyword);
- }
- }
- return rs;
- }
-
- final List<String> pykeys = SplitKeywords(key);
- int minLength = Integer.MAX_VALUE;
- final List<TwoTuple<String, String[]>> list = new ArrayList<TwoTuple<String, String[]>>();
- for (final String pykey : pykeys) {
- final String[] keys = pykey.split(((Character) (char) 0).toString());
- if (minLength > keys.length) {
- minLength = keys.length;
- }
- MergeKeywords(keys, 0, "", list);
- }
-
- final PinyinSearch search = new PinyinSearch();
- search.SetKeywords2(list);
- final List<String> result = new ArrayList<String>();
- for (int i = 0; i < _keywords.length; i++) {
- final String keywords = _keywords[i];
- if (keywords.length() < minLength) {
- continue;
- }
- final String fpy = _keywordsFirstPinyin[i];
- final String[] pylist = _keywordsPinyin[i];
-
- if (search.Find(fpy, keywords, pylist)) {
- result.add(keywords);
- }
- }
- return result;
- }
-
- /**
- * 查询索引
- *
- * @param key
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public List<Integer> FindIndex(String key) throws NumberFormatException, IOException {
- key = key.toUpperCase().trim();
- if (key == null || key.equals("")) {
- return null;
- }
- final boolean hasPinyin = key.matches("^.*?[A-Z]+.*$");// Pattern.matches("[a-zA-Z]",key);
- if (hasPinyin == false) {
- final List<Integer> rs = new ArrayList<Integer>();
- for (int i = 0; i < _keywords.length; i++) {
- final String keyword = _keywords[i];
- if (keyword.contains(key)) {
- if (_indexs == null) {
- rs.add(i);
- } else {
- rs.add(_indexs[i]);
- }
- }
- }
- return rs;
- }
-
- final List<String> pykeys = SplitKeywords(key);
- int minLength = Integer.MAX_VALUE;
- final List<TwoTuple<String, String[]>> list = new ArrayList<TwoTuple<String, String[]>>();
- for (final String pykey : pykeys) {
- final String[] keys = pykey.split(((Character) (char) 0).toString());
- if (minLength > keys.length) {
- minLength = keys.length;
- }
- MergeKeywords(keys, 0, "", list);
- }
-
- final PinyinSearch search = new PinyinSearch();
- search.SetKeywords2(list);
- final List<Integer> result = new ArrayList<Integer>();
- for (int i = 0; i < _keywords.length; i++) {
- final String keywords = _keywords[i];
- if (keywords.length() < minLength) {
- continue;
- }
- final String fpy = _keywordsFirstPinyin[i];
- final String[] pylist = _keywordsPinyin[i];
- if (search.Find(fpy, keywords, pylist)) {
- if (_indexs == null) {
- result.add(i);
- } else {
- result.add(_indexs[i]);
- }
- }
- }
- return result;
- }
-
- /**
- * 查询,空格为通配符
- *
- * @param keywords
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public List<String> FindWithSpace(String keywords) throws NumberFormatException, IOException {
- keywords = keywords.toUpperCase().trim();
- if (keywords == null || keywords.equals("")) {
- return null;
- }
- if (keywords.contains(" ") == false) {
- return Find(keywords);
- }
-
- final List<TwoTuple<String, String[]>> list = new ArrayList<TwoTuple<String, String[]>>();
- final List<Integer> indexs = new ArrayList<Integer>();
- int minLength = 0;
- int keysCount;
- {
- final String[] keys = keywords.split(" ");
- keysCount = keys.length;
- for (int i = 0; i < keys.length; i++) {
- final String key = keys[i];
- final List<String> pykeys = SplitKeywords(key);
- int min = Integer.MAX_VALUE;
- for (final String pykey : pykeys) {
- final String[] keys2 = pykey.split(((Character) (char) 0).toString());
- if (min > keys2.length) {
- min = keys2.length;
- }
- MergeKeywords(keys2, 0, "", list, i, indexs);
- }
- minLength += min;
- }
- }
-
- final PinyinSearch search = new PinyinSearch();
- search.SetKeywords2(list);
- search.SetIndexs(indexs);
-
- final List<String> result = new ArrayList<String>();
- for (int i = 0; i < _keywords.length; i++) {
- final String keywords2 = _keywords[i];
- if (keywords2.length() < minLength) {
- continue;
- }
- final String fpy = _keywordsFirstPinyin[i];
- final String[] pylist = _keywordsPinyin[i];
-
- if (search.Find2(fpy, keywords2, pylist, keysCount)) {
- result.add(keywords2);
- }
- }
- return result;
- }
-
- /**
- * 查询索引号,空格为通配符
- *
- * @param keywords
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public List<Integer> FindIndexWithSpace(String keywords) throws NumberFormatException, IOException {
- keywords = keywords.toUpperCase().trim();
- if (keywords == null || keywords.equals("")) {
- return null;
- }
- if (keywords.contains(" ") == false) {
- return FindIndex(keywords);
- }
-
- final List<TwoTuple<String, String[]>> list = new ArrayList<TwoTuple<String, String[]>>();
- final List<Integer> indexs = new ArrayList<Integer>();
- int minLength = 0;
- int keysCount;
- {
- final String[] keys = keywords.split(" ");
- keysCount = keys.length;
- for (int i = 0; i < keys.length; i++) {
- final String key = keys[i];
- final List<String> pykeys = SplitKeywords(key);
- int min = Integer.MAX_VALUE;
- for (final String pykey : pykeys) {
- final String[] keys2 = pykey.split(((Character) (char) 0).toString());
- if (min > keys2.length) {
- min = keys2.length;
- }
- MergeKeywords(keys2, 0, "", list, i, indexs);
- }
- minLength += min;
- }
- }
-
- final PinyinSearch search = new PinyinSearch();
- search.SetKeywords2(list);
- search.SetIndexs(indexs);
-
- final List<Integer> result = new ArrayList<Integer>();
- for (int i = 0; i < _keywords.length; i++) {
- final String keywords2 = _keywords[i];
- if (keywords2.length() < minLength) {
- continue;
- }
- final String fpy = _keywordsFirstPinyin[i];
- final String[] pylist = _keywordsPinyin[i];
- if (search.Find2(fpy, keywords2, pylist, keysCount)) {
- if (_indexs == null) {
- result.add(i);
- } else {
- result.add(_indexs[i]);
- }
- }
- }
- return result;
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/PinyinMatch2.java b/src/main/java/org/springblade/modules/words/PinyinMatch2.java
deleted file mode 100644
index 556b63f..0000000
--- a/src/main/java/org/springblade/modules/words/PinyinMatch2.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BasePinyinMatch;
-import org.springblade.modules.words.internals.PinyinDict;
-import org.springblade.modules.words.internals.TwoTuple;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.function.Function;
-
-public class PinyinMatch2<T> extends BasePinyinMatch {
- private final List<T> _list;
- private Function<T, String> _keywordsFunc;
- private Function<T, String> _pinyinFunc;
- private char _splitChar = ',';
-
- /**
- * 拼音匹配, 不支持[0x20000-0x2B81D]
- *
- * @param list
- */
- public PinyinMatch2(final List<T> list) {
- _list = list;
- _keywordsFunc = null;
- _pinyinFunc = null;
- }
-
- /**
- * 设置获取关键字的方法
- *
- * @param keywordsFunc
- */
- public void SetKeywordsFunc(final Function<T, String> keywordsFunc) {
- _keywordsFunc = keywordsFunc;
- }
-
- /**
- * 设置获取拼音的方法
- *
- * @param pinyinFunc
- */
- public void SetPinyinFunc(final Function<T, String> pinyinFunc) {
- _pinyinFunc = pinyinFunc;
- }
-
- /**
- * 设置拼音分隔符
- *
- * @param splitChar
- */
- public void SetPinyinSplitChar(final char splitChar) {
- _splitChar = splitChar;
- }
-
- /**
- * 查询
- *
- * @param keywords
- * @return
- * @throws Exception
- */
- public List<T> Find(String keywords) throws Exception {
- if (_keywordsFunc == null) {
- throw new Exception("请先使用SetKeywordsFunc方法。");
- }
- keywords = keywords.toUpperCase().trim();
- if (keywords == null || keywords.equals("")) {
- return null;
- }
- final List<T> result = new ArrayList<T>();
- final boolean hasPinyin = keywords.matches("^.*?[A-Z]+.*$");// Pattern.matches("[a-zA-Z]",key);
- if (hasPinyin == false) {
- for (final T item : _list) {
- final String keyword = _keywordsFunc.apply(item);
- if (keyword.contains(keywords)) {
- result.add(item);
- }
- }
- return result;
- }
-
- final List<String> pykeys = SplitKeywords(keywords);
- int minLength = Integer.MAX_VALUE;
- final List<TwoTuple<String, String[]>> list = new ArrayList<TwoTuple<String, String[]>>();
- for (final String pykey : pykeys) {
- final String[] keys = pykey.split(((Character) (char) 0).toString());
- if (minLength > keys.length) {
- minLength = keys.length;
- }
- MergeKeywords(keys, 0, "", list);
- }
-
- final PinyinSearch search = new PinyinSearch();
- search.SetKeywords2(list);
- for (final T item : _list) {
- final String keyword = _keywordsFunc.apply(item);
- if (keyword.length() < minLength) {
- continue;
- }
- String fpy = "";
- String[] pylist;
- if (_pinyinFunc == null) {
- pylist = PinyinDict.GetPinyinList(keyword, 0);
- } else {
- pylist = _pinyinFunc.apply(item).split(((Character) _splitChar).toString());
- }
- for (int j = 0; j < pylist.length; j++) {
- pylist[j] = pylist[j].toUpperCase();
- fpy += pylist[j].charAt(0);
- }
- if (search.Find(fpy, keyword, pylist)) {
- result.add(item);
- }
- }
- return result;
- }
-
- /**
- * 查询,空格为通配符
- *
- * @param keywords
- * @return
- * @throws Exception
- */
- public List<T> FindWithSpace(String keywords) throws Exception {
- if (_keywordsFunc == null) {
- throw new Exception("请先使用SetKeywordsFunc方法。");
- }
- keywords = keywords.toUpperCase().trim();
- if (keywords == null || keywords.equals("")) {
- return null;
- }
- if (keywords.contains(" ") == false) {
- return Find(keywords);
- }
-
- final List<TwoTuple<String, String[]>> list = new ArrayList<TwoTuple<String, String[]>>();
- final List<Integer> indexs = new ArrayList<Integer>();
- int minLength = 0;
- int keysCount;
- {
-
- final String[] keys = keywords.split(" ");
- keysCount = keys.length;
- for (int i = 0; i < keys.length; i++) {
- final String key = keys[i];
- final List<String> pykeys = SplitKeywords(key);
- int min = Integer.MAX_VALUE;
- for (final String pykey : pykeys) {
- final String[] keys2 = pykey.split(((Character) (char) 0).toString());
- if (min > keys2.length) {
- min = keys2.length;
- }
- MergeKeywords(keys2, 0, "", list, i, indexs);
- }
- minLength += min;
- }
- }
-
- final PinyinSearch search = new PinyinSearch();
- search.SetKeywords2(list);
- search.SetIndexs(indexs);
-
- final List<T> result = new ArrayList<T>();
- for (final T item : _list) {
- final String keyword = _keywordsFunc.apply(item);
- if (keyword.length() < minLength) {
- continue;
- }
- String fpy = "";
- String[] pylist;
- if (_pinyinFunc == null) {
- pylist = PinyinDict.GetPinyinList(keyword, 0);
- } else {
- pylist = _pinyinFunc.apply(item).split(((Character)_splitChar).toString());
- }
- for (int j = 0; j < pylist.length; j++) {
- pylist[j] = pylist[j].toUpperCase();
- fpy += pylist[j].charAt(0);
- }
- if (search.Find2(fpy, keyword, pylist, keysCount)) {
- result.add(item);
- }
- }
- return result;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/StringMatch.java b/src/main/java/org/springblade/modules/words/StringMatch.java
deleted file mode 100644
index 8700c97..0000000
--- a/src/main/java/org/springblade/modules/words/StringMatch.java
+++ /dev/null
@@ -1,291 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseMatch;
-import org.springblade.modules.words.internals.TrieNode3;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 文本搜索匹配, ,支持 部分 正则 如 . ? [ ] \ ( | ) ,不支持( )内再嵌套( )
- */
-public class StringMatch extends BaseMatch {
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public String FindFirst(final String text) {
- TrieNode3 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
-
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- final String result = FindFirst(text, i + 1, ptr.WildcardNode);
- if (result != null) {
- return result;
- }
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int length = _keywordLength[tn.Results.get(0)];
- final int s = i - length + 1;
- if (s >= 0) {
- return text.substring(s, i + 1);
- }
- }
- }
- ptr = tn;
- }
- return null;
- }
-
- private String FindFirst(final String text, final int index, TrieNode3 ptr) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- final String result = FindFirst(text, i + 1, ptr.WildcardNode);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
- tn = ptr.GetValue(t);
-
- if (tn.End) {
- final int length = _keywordLength[tn.Results.get(0)];
- final int s = i - length + 1;
- if (s >= 0) {
- return text.substring(s, i + 1);
- }
- }
- ptr = tn;
- }
- return null;
- }
-
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<String> FindAll(final String text) {
- TrieNode3 ptr = null;
- final List<String> result = new ArrayList<String>();
-
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- FindAll(text, i + 1, ptr.WildcardNode, result);
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- for (final Integer item : tn.Results) {
- final int length = _keywordLength[item];
- final int s = i - length + 1;
- if (s >= 0) {
- final String key = text.substring(s, i + 1);
- result.add(key);
-
- }
- }
- }
- }
- ptr = tn;
- }
- return result;
- }
-
- private void FindAll(final String text, final int index, TrieNode3 ptr, final List<String> result) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- FindAll(text, i + 1, ptr.WildcardNode, result);
- }
- return;
- } else {
- tn = ptr.GetValue(t);
- }
- if (tn.End) {
- for (final Integer item : tn.Results) {
- final int length = _keywordLength[item];
- final int s = i - length + 1;
- if (s >= 0) {
- final String key = text.substring(s, i + 1);
- result.add(key);
- }
- }
- }
- ptr = tn;
- }
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- TrieNode3 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- final boolean result = ContainsAny(text, i + 1, ptr.WildcardNode);
- if (result) {
- return true;
- }
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int length = _keywordLength[tn.Results.get(0)];
- final int s = i - length + 1;
- if (s >= 0) {
- return true;
- }
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- private boolean ContainsAny(final String text, final int index, TrieNode3 ptr) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- return ContainsAny(text, i + 1, ptr.WildcardNode);
- }
- return false;
- }
- tn = ptr.GetValue(t);
-
- if (tn.End) {
- final int length = _keywordLength[tn.Results.get(0)];
- final int s = i - length + 1;
- if (s >= 0) {
- return true;
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- TrieNode3 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- Replace(text, i + 1, ptr.WildcardNode, replaceChar, result);
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int maxLength = _keywordLength[tn.Results.get(0)];
- final int start = i + 1 - maxLength;
- if (start >= 0) {
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- }
- ptr = tn;
- }
- return result.toString();
- }
-
- private void Replace(final String text, final int index, TrieNode3 ptr, final char replaceChar,
- final StringBuilder result) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- Replace(text, i + 1, ptr.WildcardNode, replaceChar, result);
- }
- return;
- }
- tn = ptr.GetValue(t);
- if (tn.End) {
- final int maxLength = _keywordLength[tn.Results.get(0)];
- final int start = i + 1 - maxLength;
- if (start >= 0) {
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- ptr = tn;
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/StringMatchEx.java b/src/main/java/org/springblade/modules/words/StringMatchEx.java
deleted file mode 100644
index 468b8c8..0000000
--- a/src/main/java/org/springblade/modules/words/StringMatchEx.java
+++ /dev/null
@@ -1,346 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseMatchEx;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StringMatchEx extends BaseMatchEx {
-
- /// <summary>
- /// 在文本中查找第一个关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <returns></returns>
- public String FindFirst(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
-
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- if (_wildcard[p] > 0) {
- final String r = FindFirst(text, i + 1, _wildcard[p]);
- if (r != null) {
- return r;
- }
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int length = _keywordLength[_resultIndex[start]];
- final int s = i - length + 1;
- if (s >= 0) {
- return text.substring(s, i + 1);
- }
- }
- }
- p = next;
- }
- return null;
- }
-
- private String FindFirst(final String text, final int index, int p) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- return null;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- final String r = FindFirst(text, i + 1, _wildcard[p]);
- if (r != null) {
- return r;
- }
- }
- return null;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int length = _keywordLength[_resultIndex[start]];
- final int s = i - length + 1;
- if (s >= 0) {
- return text.substring(s, i + 1);
- }
- }
- p = next;
- }
- return null;
- }
-
- /// <summary>
- /// 在文本中查找所有的关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <returns></returns>
- public List<String> FindAll(final String text) {
- final List<String> result = new ArrayList<String>();
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
-
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- FindAll(text, i + 1, _wildcard[p], result);
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- if (next != 0) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int length = _keywordLength[_resultIndex[j]];
- final int s = i - length + 1;
- if (s >= 0) {
- final String key = text.substring(s, i + 1);
- result.add(key);
- }
- }
- }
- p = next;
- }
- return result;
- }
-
- private void FindAll(final String text, final int index, int p, final List<String> result) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- return;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- FindAll(text, i + 1, _wildcard[p], result);
- }
- return;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int length = _keywordLength[_resultIndex[j]];
- final int s = i - length + 1;
- if (s >= 0) {
- final String key = text.substring(s, i + 1);
- result.add(key);
- }
- }
- p = next;
- }
- }
-
- /// <summary>
- /// 判断文本是否包含关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <returns></returns>
- public boolean ContainsAny(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
-
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- if (_wildcard[p] > 0) {
- final boolean r = ContainsAny(text, i + 1, _wildcard[p]);
- if (r) {
- return true;
- }
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1]) {
- return true;
- }
- }
- p = next;
- }
- return false;
- }
-
- private boolean ContainsAny(final String text, final int index, int p) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
-
- final int t = _dict[t1];
- if (t == 0) {
- return false;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- final boolean r = ContainsAny(text, i + 1, _wildcard[p]);
- if (r) {
- return true;
- }
- }
- return false;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int length = _keywordLength[_resultIndex[start]];
- final int s = i - length + 1;
- if (s >= 0) {
- return true;
- }
- }
- p = next;
- }
- return false;
- }
-
- /// <summary>
- /// 在文本中替换所有的关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <param name="replaceChar">替换符</param>
- /// <returns></returns>
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
-
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- Replace(text, i + 1, _wildcard[p], replaceChar, result);
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int maxLength = _keywordLength[_resultIndex[start]];
- final int start2 = i + 1 - maxLength;
- if (start2 >= 0) {
- for (int j = start2; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- }
- p = next;
- }
- return result.toString();
- }
-
- private void Replace(final String text, final int index, int p, final char replaceChar,
- final StringBuilder result) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
-
- final int t = _dict[t1];
- if (t == 0) {
- return;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- Replace(text, i + 1, _wildcard[p], replaceChar, result);
- }
- return;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int maxLength = _keywordLength[_resultIndex[start]];
- final int start2 = i + 1 - maxLength;
- if (start2 >= 0) {
- for (int j = start2; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- p = next;
- }
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/StringSearch.java b/src/main/java/org/springblade/modules/words/StringSearch.java
deleted file mode 100644
index 355616a..0000000
--- a/src/main/java/org/springblade/modules/words/StringSearch.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearch;
-import org.springblade.modules.words.internals.TrieNode2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StringSearch extends BaseSearch {
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public String FindFirst(final String text) {
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- return _keywords[tn.Results.get(0)];
- }
- }
- ptr = tn;
- }
- return null;
- }
-
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<String> FindAll(final String text) {
- TrieNode2 ptr = null;
- final List<String> list = new ArrayList<String>();
-
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- tn.Results.forEach(item -> {
- list.add(_keywords[item]);
- });
- }
- }
- ptr = tn;
- }
- return list;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- return true;
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int maxLength = _keywords[tn.Results.get(0)].length();
- final int start = i + 1 - maxLength;
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- ptr = tn;
- }
- return result.toString();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/StringSearchEx.java b/src/main/java/org/springblade/modules/words/StringSearchEx.java
deleted file mode 100644
index dabca20..0000000
--- a/src/main/java/org/springblade/modules/words/StringSearchEx.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearchEx;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StringSearchEx extends BaseSearchEx {
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<String> FindAll(final String text) {
- final List<String> result = new ArrayList<String>();
-
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final Integer t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- result.add(_keywords[_resultIndex[j]]);
- }
- }
- p = next;
- }
- return result;
- }
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public String FindFirst(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- return _keywords[_resultIndex[start]];
- }
- }
- p = next;
- }
- return null;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1]) {
- return true;
- }
- }
- p = next;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int maxLength = _keywords[_resultIndex[start]].length();
- for (int j = i + 1 - maxLength; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
-
- }
- }
- p = next;
- }
- return result.toString();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/StringSearchEx2.java b/src/main/java/org/springblade/modules/words/StringSearchEx2.java
deleted file mode 100644
index 87eeb8c..0000000
--- a/src/main/java/org/springblade/modules/words/StringSearchEx2.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearchEx2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class StringSearchEx2 extends BaseSearchEx2 {
-
- /**
- * 在文本中查找所有的关键字
- * @param text 文本
- * @return
- */
- public List<String> FindAll(final String text) {
- final List<String> root = new ArrayList<String>();
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- boolean find = _key[next] == t;
- if (find == false && p != 0) {
- p = 0;
- next = _next[0] + t;
- find = _key[next] == t;
- }
- if (find) {
- final int index = _check[next];
- if (index > 0) {
- for (final int item : _guides[index]) {
- root.add(_keywords[item]);
- }
- }
- p = next;
- }
- }
- return root;
- }
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public String FindFirst(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- if (_key[next] == t) {
- final int index = _check[next];
- if (index > 0) {
- return _keywords[_guides[index][0]];
- }
- p = next;
- } else {
- p = 0;
- next = _next[p] + t;
- if (_key[next] == t) {
- final int index = _check[next];
- if (index > 0) {
- return _keywords[_guides[index][0]];
- }
- p = next;
- }
- }
- }
- return null;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- */
- public boolean ContainsAny(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- if (_key[next] == t) {
- if (_check[next] > 0) {
- return true;
- }
- p = next;
- } else {
- p = 0;
- next = _next[p] + t;
- if (_key[next] == t) {
- if (_check[next] > 0) {
- return true;
- }
- p = next;
- }
- }
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- boolean find = _key[next] == t;
- if (find == false && p != 0) {
- p = 0;
- next = _next[p] + t;
- find = _key[next] == t;
- }
- if (find) {
- final int index = _check[next];
- if (index > 0) {
- final int maxLength = _keywords[_guides[index][0]].length();
- final int start = i + 1 - maxLength;
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- p = next;
- }
- }
- return result.toString();
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsHelper.java b/src/main/java/org/springblade/modules/words/WordsHelper.java
deleted file mode 100644
index 47dc692..0000000
--- a/src/main/java/org/springblade/modules/words/WordsHelper.java
+++ /dev/null
@@ -1,284 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.PinyinDict;
-import org.springblade.modules.words.internals.Translate;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.regex.Pattern;
-
-public class WordsHelper {
-
- /**
- * 获取首字母,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- *
- * @param text 原文本
- * @return
- * @throws IOException
- * @throws NumberFormatException
- */
- public static String GetFirstPinyin(String text) throws NumberFormatException, IOException {
- return PinyinDict.GetFirstPinyin(text, 0);
- }
-
- /**
- * 获取拼音全拼, 不支持多音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证 请使用GetPinyin方法,此方法不支持多音
- *
- * @param text 原文本
- * @param tone 是否带声调
- * @return
- * @throws IOException
- * @throws NumberFormatException
- */
- public static String GetPinyinFast(String text, Boolean tone) throws NumberFormatException, IOException {
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < text.length(); i++) {
- Character c = text.charAt(i);
- sb.append(PinyinDict.GetPinyinFast(c, tone ? 1 : 0));
- }
- return sb.toString();
- }
-
- /**
- * 获取拼音全拼, 不支持多音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证 请使用GetPinyin方法,此方法不支持多音
- *
- * @param text
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static String GetPinyinFast(String text) throws NumberFormatException, IOException {
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < text.length(); i++) {
- Character c = text.charAt(i);
- sb.append(PinyinDict.GetPinyinFast(c, 0));
- }
- return sb.toString();
- }
-
- /**
- * 获取拼音全拼,支持多音,中文字符集为[0x4E00,0x9FD5]
- *
- * @param text 原文本
- * @param tone 是否带声调
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static String GetPinyin(String text, Boolean tone) throws NumberFormatException, IOException {
- return PinyinDict.GetPinyin(text, tone ? 1 : 0);
- }
-
- /**
- * 获取拼音全拼,支持多音,中文字符集为[0x4E00,0x9FD5]
- *
- * @param text
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static String GetPinyin(String text) throws NumberFormatException, IOException {
- return PinyinDict.GetPinyin(text, 0);
- }
-
- /**
- * 获取所有拼音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- *
- * @param c 原文本
- * @param tone 是否带声调
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static List<String> GetAllPinyin(char c, Boolean tone) throws NumberFormatException, IOException {
- return PinyinDict.GetAllPinyin(c, tone ? 1 : 0);
- }
-
- /**
- * 获取所有拼音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- *
- * @param c
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static List<String> GetAllPinyin(char c) throws NumberFormatException, IOException {
- return PinyinDict.GetAllPinyin(c, 0);
- }
-
- /**
- * 获取姓名拼音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- *
- * @param name 姓名
- * @param tone 是否带声调
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static String GetPinyinForName(String name, Boolean tone) throws NumberFormatException, IOException {
- return String.join("", PinyinDict.GetPinyinForName(name, tone ? 1 : 0));
- }
-
- /**
- * 获取姓名拼音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- *
- * @param name
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static String GetPinyinForName(String name) throws NumberFormatException, IOException {
- return String.join("", PinyinDict.GetPinyinForName(name, 0));
- }
-
- /**
- * 获取姓名拼音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- *
- * @param name 姓名
- * @param tone 是否带声调
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static List<String> GetPinyinListForName(String name, Boolean tone)
- throws NumberFormatException, IOException {
- return PinyinDict.GetPinyinForName(name, tone ? 1 : 0);
- }
-
- /**
- * 获取姓名拼音,中文字符集为[0x3400,0x9FD5],注:偏僻汉字很多未验证
- * @param name
- * @return
- * @throws NumberFormatException
- * @throws IOException
- */
- public static List<String> GetPinyinListForName(String name) throws NumberFormatException, IOException {
- return PinyinDict.GetPinyinForName(name, 0);
- }
-
-
- /**
- * 判断输入是否为中文 ,中文字符集为[0x4E00,0x9FA5]
- *
- * @param content
- * @return
- */
- public static boolean HasChinese(String content) {
- return Pattern.matches("[\\u3400-\\u4db5\\u4e00-\\u9fd5]", content);
- }
-
- /**
- * 判断输入是否全为中文,中文字符集为[0x4E00,0x9FA5]
- *
- * @param content
- * @return
- */
- public static boolean IsAllChinese(String content) {
- return Pattern.matches("^[\\u3400-\\u4db5\\u4e00-\\u9fd5]*$", content);
- }
-
- /**
- * 判断含有英语
- *
- * @param content
- * @return
- */
- public static boolean HasEnglish(String content) {
- return Pattern.matches("[A-Za-z]", content);
- }
-
- /**
- * 判断是否全部英语
- *
- * @param content
- * @return
- */
- public static boolean IsAllEnglish(String content) {
- return Pattern.matches("^[A-Za-z]*$", content);
- }
-
- /**
- * 半角转全角
- *
- * @param input
- * @return
- */
- public static String ToSBC(String input) {
- StringBuilder sb = new StringBuilder(input);
- for (int i = 0; i < input.length(); i++) {
- char c = input.charAt(i);
- if (c == 32) {
- sb.setCharAt(i, (char) 12288);
- } else if (c < 127) {
- sb.setCharAt(i, (char) (c + 65248));
- }
- }
- return sb.toString();
- }
-
- /**
- * 转半角的函数
- *
- * @param input
- * @return
- */
- public static String ToDBC(String input) {
- StringBuilder sb = new StringBuilder(input);
- for (int i = 0; i < input.length(); i++) {
- char c = input.charAt(i);
- if (c == 12288) {
- sb.setCharAt(i, (char) 32);
- } else if (c > 65280 && c < 65375) {
- sb.setCharAt(i, (char) (c - 65248));
- }
- }
- return sb.toString();
- }
-
- /**
- * 转繁体中文
- *
- * @param text
- * @return
- * @throws Exception
- */
- public static String ToTraditionalChinese(String text) throws Exception {
- return Translate.ToTraditionalChinese(text, 0);
- }
-
- /**
- * 转繁体中文
- *
- * @param text
- * @param type 0、繁体中文,1、港澳繁体,2、台湾正体
- * @return
- * @throws Exception
- */
- public static String ToTraditionalChinese(String text, int type) throws Exception {
- return Translate.ToTraditionalChinese(text, type);
- }
-
- /***
- * 转简体中文
- *
- * @param text
- * @return
- * @throws Exception
- */
- public static String ToSimplifiedChinese(String text) throws Exception {
- return Translate.ToSimplifiedChinese(text, 0);
- }
-
- /**
- * 转简体中文
- *
- * @param text
- * @param srcType 0、繁体中文,1、港澳繁体,2、台湾正体
- * @return
- * @throws Exception
- */
- public static String ToSimplifiedChinese(String text, int srcType) throws Exception {
- return Translate.ToSimplifiedChinese(text, srcType);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsMatch.java b/src/main/java/org/springblade/modules/words/WordsMatch.java
deleted file mode 100644
index b44f180..0000000
--- a/src/main/java/org/springblade/modules/words/WordsMatch.java
+++ /dev/null
@@ -1,304 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseMatch;
-import org.springblade.modules.words.internals.TrieNode3;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 文本搜索匹配, ,支持 部分 正则 如 . ? [ ] \ ( | ) ,不支持( )内再嵌套( )
- */
-public class WordsMatch extends BaseMatch {
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public WordsSearchResult FindFirst(final String text) {
- TrieNode3 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
-
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- final WordsSearchResult result = FindFirst(text, i + 1, ptr.WildcardNode);
- if (result != null) {
- return result;
- }
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final Integer r = tn.Results.get(0);
- final int length = _keywordLength[r];
- final int start = i - length + 1;
- if (start >= 0) {
- final int kIndex = _keywordIndex[r];
- final String matchKeyword = _matchKeywords[kIndex];
- final String keyword = text.substring(start, i + 1);
- return new WordsSearchResult(keyword, start, i, kIndex, matchKeyword);
- }
- }
- }
- ptr = tn;
- }
- return null;
- }
-
- private WordsSearchResult FindFirst(final String text, final int index, TrieNode3 ptr) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- final WordsSearchResult result = FindFirst(text, i + 1, ptr.WildcardNode);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
- tn = ptr.GetValue(t);
-
- if (tn.End) {
- final Integer r = tn.Results.get(0);
- final int length = _keywordLength[r];
- final int start = i - length + 1;
- if (start >= 0) {
- final int kIndex = _keywordIndex[r];
- final String matchKeyword = _matchKeywords[kIndex];
- final String keyword = text.substring(start, i + 1);
- return new WordsSearchResult(keyword, start, i, kIndex, matchKeyword);
- }
- }
- ptr = tn;
- }
- return null;
- }
-
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<WordsSearchResult> FindAll(final String text) {
- TrieNode3 ptr = null;
- final List<WordsSearchResult> result = new ArrayList<WordsSearchResult>();
-
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- FindAll(text, i + 1, ptr.WildcardNode, result);
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- for (final Integer r : tn.Results) {
- final int length = _keywordLength[r];
- final int start = i - length + 1;
- if (start >= 0) {
- final int kIndex = _keywordIndex[r];
- final String matchKeyword = _matchKeywords[kIndex];
- final String keyword = text.substring(start, i + 1);
- final WordsSearchResult wr = new WordsSearchResult(keyword, start, i, kIndex, matchKeyword);
- result.add(wr);
- }
- }
- }
- }
- ptr = tn;
- }
- return result;
- }
-
- private void FindAll(final String text, final int index, TrieNode3 ptr, final List<WordsSearchResult> result) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- FindAll(text, i + 1, ptr.WildcardNode, result);
- }
- return;
- } else {
- tn = ptr.GetValue(t);
- }
- if (tn.End) {
- for (final Integer r : tn.Results) {
- final int length = _keywordLength[r];
- final int start = i - length + 1;
- if (start >= 0) {
- final int kIndex = _keywordIndex[r];
- final String matchKeyword = _matchKeywords[kIndex];
- final String keyword = text.substring(start, i + 1);
- final WordsSearchResult wr = new WordsSearchResult(keyword, start, i, kIndex, matchKeyword);
- result.add(wr);
- }
- }
- }
- ptr = tn;
- }
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- TrieNode3 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- final boolean result = ContainsAny(text, i + 1, ptr.WildcardNode);
- if (result) {
- return true;
- }
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int length = _keywordLength[tn.Results.get(0)];
- final int s = i - length + 1;
- if (s >= 0) {
- return true;
- }
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- private boolean ContainsAny(final String text, final int index, TrieNode3 ptr) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- return ContainsAny(text, i + 1, ptr.WildcardNode);
- }
- return false;
- }
- tn = ptr.GetValue(t);
-
- if (tn.End) {
- final int length = _keywordLength[tn.Results.get(0)];
- final int s = i - length + 1;
- if (s >= 0) {
- return true;
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- TrieNode3 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- Replace(text, i + 1, ptr.WildcardNode, replaceChar, result);
- }
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int maxLength = _keywordLength[tn.Results.get(0)];
- final int start = i + 1 - maxLength;
- if (start >= 0) {
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- }
- ptr = tn;
- }
- return result.toString();
- }
-
- private void Replace(final String text, final int index, TrieNode3 ptr, final char replaceChar,
- final StringBuilder result) {
- for (int i = index; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode3 tn;
- if (ptr.HasKey(t) == false) {
- if (ptr.HasWildcard) {
- Replace(text, i + 1, ptr.WildcardNode, replaceChar, result);
- }
- return;
- }
- tn = ptr.GetValue(t);
- if (tn.End) {
- final int maxLength = _keywordLength[tn.Results.get(0)];
- final int start = i + 1 - maxLength;
- if (start >= 0) {
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- ptr = tn;
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsMatchEx.java b/src/main/java/org/springblade/modules/words/WordsMatchEx.java
deleted file mode 100644
index abfae5b..0000000
--- a/src/main/java/org/springblade/modules/words/WordsMatchEx.java
+++ /dev/null
@@ -1,358 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseMatchEx;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class WordsMatchEx extends BaseMatchEx {
-
- /// <summary>
- /// 在文本中查找第一个关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <returns></returns>
- public WordsSearchResult FindFirst(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
-
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- if (_wildcard[p] > 0) {
- final WordsSearchResult r = FindFirst(text, i + 1, _wildcard[p]);
- if (r != null) {
- return r;
- }
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int length = _keywordLength[_resultIndex[start]];
- final int s = i - length + 1;
- if (s >= 0) {
- final String key = text.substring(s, i + 1);
- final int index = _resultIndex[start];
- final String matchKeyword = _matchKeywords[index];
- return new WordsSearchResult(key, i + 1 - key.length(), i, index, matchKeyword);
- }
- }
- }
- p = next;
- }
- return null;
- }
-
- private WordsSearchResult FindFirst(final String text, final int index, int p) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- return null;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- final WordsSearchResult r = FindFirst(text, i + 1, _wildcard[p]);
- if (r != null) {
- return r;
- }
- }
- return null;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int length = _keywordLength[_resultIndex[start]];
- final int s = i - length + 1;
- if (s >= 0) {
- final String key = text.substring(s, i + 1);
- final int index2 = _resultIndex[start];
- final String matchKeyword = _matchKeywords[index2];
- return new WordsSearchResult(key, i + 1 - key.length(), i, index2, matchKeyword);
- }
- }
- p = next;
- }
- return null;
- }
-
- /// <summary>
- /// 在文本中查找所有的关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <returns></returns>
- public List<WordsSearchResult> FindAll(final String text) {
- final List<WordsSearchResult> result = new ArrayList<WordsSearchResult>();
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
-
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- FindAll(text, i + 1, _wildcard[p], result);
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- if (next != 0) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int length = _keywordLength[_resultIndex[j]];
- final int s = i - length + 1;
- if (s >= 0) {
- final int kIndex = _keywordIndex[j];
- final String matchKeyword = _matchKeywords[kIndex];
- final String key = text.substring(s, i + 1);
- final WordsSearchResult r = new WordsSearchResult(key, s, i, kIndex, matchKeyword);
- result.add(r);
- }
- }
- }
- p = next;
- }
- return result;
- }
-
- private void FindAll(final String text, final int index, int p, final List<WordsSearchResult> result) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- return;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- FindAll(text, i + 1, _wildcard[p], result);
- }
- return;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int length = _keywordLength[_resultIndex[j]];
- final int s = i - length + 1;
- if (s >= 0) {
- final int kIndex = _keywordIndex[j];
- final String matchKeyword = _matchKeywords[kIndex];
- final String key = text.substring(s, i + 1);
- final WordsSearchResult r = new WordsSearchResult(key, s, i, kIndex, matchKeyword);
- result.add(r);
- }
- }
- p = next;
- }
- }
-
- /// <summary>
- /// 判断文本是否包含关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <returns></returns>
- public boolean ContainsAny(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
-
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- if (_wildcard[p] > 0) {
- final boolean r = ContainsAny(text, i + 1, _wildcard[p]);
- if (r) {
- return true;
- }
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
-
- if (next != 0) {
- if (_end[next] < _end[next + 1]) {
- return true;
- }
- }
- p = next;
- }
- return false;
- }
-
- private boolean ContainsAny(final String text, final int index, int p) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
-
- final int t = _dict[t1];
- if (t == 0) {
- return false;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- final boolean r = ContainsAny(text, i + 1, _wildcard[p]);
- if (r) {
- return true;
- }
- }
- return false;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int length = _keywordLength[_resultIndex[start]];
- final int s = i - length + 1;
- if (s >= 0) {
- return true;
- }
- }
- p = next;
- }
- return false;
- }
-
- /// <summary>
- /// 在文本中替换所有的关键字
- /// </summary>
- /// <param name="text">文本</param>
- /// <param name="replaceChar">替换符</param>
- /// <returns></returns>
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
-
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- Replace(text, i + 1, _wildcard[p], replaceChar, result);
- }
- next = _firstIndex[t];
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int maxLength = _keywordLength[_resultIndex[start]];
- final int start2 = i + 1 - maxLength;
- if (start2 >= 0) {
- for (int j = start2; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- }
- p = next;
- }
- return result.toString();
- }
-
- private void Replace(final String text, final int index, int p, final char replaceChar,
- final StringBuilder result) {
- for (int i = index; i < text.length(); i++) {
- final char t1 = text.charAt(i);
-
- final int t = _dict[t1];
- if (t == 0) {
- return;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _firstIndex[t];
- } else {
- final int index2 = _nextIndex[p].IndexOf(t);
- if (index2 == -1) {
- if (_wildcard[p] > 0) {
- Replace(text, i + 1, _wildcard[p], replaceChar, result);
- }
- return;
- } else {
- next = _nextIndex[p].GetValue(index2);
- }
- }
-
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int maxLength = _keywordLength[_resultIndex[start]];
- final int start2 = i + 1 - maxLength;
- if (start2 >= 0) {
- for (int j = start2; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- p = next;
- }
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsSearch.java b/src/main/java/org/springblade/modules/words/WordsSearch.java
deleted file mode 100644
index bbeed91..0000000
--- a/src/main/java/org/springblade/modules/words/WordsSearch.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearch;
-import org.springblade.modules.words.internals.TrieNode2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class WordsSearch extends BaseSearch {
- public String[] _others;
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public WordsSearchResult FindFirst(final String text) {
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- for (final Integer index : tn.Results) {
- final String key = _keywords[index];
- return new WordsSearchResult(key, i + 1 - key.length(), i, index);
- }
- }
- }
- ptr = tn;
- }
- return null;
- }
-
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<WordsSearchResult> FindAll(final String text) {
- TrieNode2 ptr = null;
- final List<WordsSearchResult> list = new ArrayList<WordsSearchResult>();
-
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- for (final Integer index : tn.Results) {
- final String key = _keywords[index];
- final WordsSearchResult item = new WordsSearchResult(key, i + 1 - key.length(), i, index);
- list.add(item);
- }
- }
- }
- ptr = tn;
- }
- return list;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- return true;
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final char t = text.charAt(i);
- TrieNode2 tn = null;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- final int maxLength = _keywords[tn.Results.get(0)].length();
- final int start = i + 1 - maxLength;
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- }
- ptr = tn;
- }
- return result.toString();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsSearchEx.java b/src/main/java/org/springblade/modules/words/WordsSearchEx.java
deleted file mode 100644
index 32115fe..0000000
--- a/src/main/java/org/springblade/modules/words/WordsSearchEx.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearchEx;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class WordsSearchEx extends BaseSearchEx {
- /**
- * 在文本中查找所有的关键字
- *
- * @param text 文本
- * @return
- */
- public List<WordsSearchResult> FindAll(final String text) {
- final List<WordsSearchResult> result = new ArrayList<WordsSearchResult>();
-
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- for (int j = _end[next]; j < _end[next + 1]; j++) {
- final int index = _resultIndex[j];
- final String key = _keywords[index];
- final WordsSearchResult r = new WordsSearchResult(key, i + 1 - key.length(), i, index);
- result.add(r);
- }
- }
- p = next;
- }
- return result;
- }
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public WordsSearchResult FindFirst(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int index = _resultIndex[start];
- final String key = _keywords[index];
- return new WordsSearchResult(key, i + 1 - key.length(), i, index);
- }
- }
- p = next;
- }
- return null;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- if (_end[next] < _end[next + 1]) {
- return true;
- }
- }
- p = next;
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final char t1 = text.charAt(i);
- final int t = _dict[t1];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next;
- if (p == 0 || t < _min[p] || t > _max[p]) {
- next = _first[t];
- } else {
- final int index = _nextIndex[p].IndexOf(t);
- if (index == -1) {
- next = _first[t];
- } else {
- next = _nextIndex[p].GetValue(index);
- }
- }
- if (next != 0) {
- final int start = _end[next];
- if (start < _end[next + 1]) {
- final int maxLength = _keywords[_resultIndex[start]].length();
- for (int j = i + 1 - maxLength; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
-
- }
- }
- p = next;
- }
- return result.toString();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsSearchEx2.java b/src/main/java/org/springblade/modules/words/WordsSearchEx2.java
deleted file mode 100644
index b029205..0000000
--- a/src/main/java/org/springblade/modules/words/WordsSearchEx2.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.internals.BaseSearchEx2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class WordsSearchEx2 extends BaseSearchEx2 {
- /**
- * 在文本中查找所有的关键字
- * @param text 文本
- * @return
- */
- public List<WordsSearchResult> FindAll(final String text) {
- final List<WordsSearchResult> root = new ArrayList<WordsSearchResult>();
- int p = 0;
- final int length = text.length();
- for (int i = 0; i < length; i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- boolean find = _key[next] == t;
- if (find == false && p != 0) {
- p = 0;
- next = _next[0] + t;
- find = _key[next] == t;
- }
- if (find) {
- final int index = _check[next];
- if (index > 0) {
- for (final int item : _guides[index]) {
- final String key = _keywords[item];
- final WordsSearchResult r = new WordsSearchResult(key, i + 1 - key.length(), i, item);
- root.add(r);
- }
- }
- p = next;
- }
- }
- return root;
- }
-
- /**
- * 在文本中查找第一个关键字
- *
- * @param text 文本
- * @return
- */
- public WordsSearchResult FindFirst(final String text) {
- int p = 0;
- final int length = text.length();
- for (int i = 0; i < length; i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- if (_key[next] == t) {
- final int index = _check[next];
- if (index > 0) {
- final String item = _keywords[_guides[index][0]];
- return new WordsSearchResult(item, i + 1 - item.length(), i, _guides[index][0]);
- }
- p = next;
- } else {
- p = 0;
- next = _next[p] + t;
- if (_key[next] == t) {
- final int index = _check[next];
- if (index > 0) {
- final String item = _keywords[_guides[index][0]];
- return new WordsSearchResult(item, i + 1 - item.length(), i, _guides[index][0]);
- }
- p = next;
- }
- }
- }
- return null;
- }
-
- /**
- * 判断文本是否包含关键字
- *
- * @param text 文本
- * @return
- */
- public boolean ContainsAny(final String text) {
- int p = 0;
- for (int i = 0; i < text.length(); i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- if (_key[next] == t) {
- if (_check[next] > 0) {
- return true;
- }
- p = next;
- } else {
- p = 0;
- next = _next[p] + t;
- if (_key[next] == t) {
- if (_check[next] > 0) {
- return true;
- }
- p = next;
- }
- }
- }
- return false;
- }
-
- /**
- * 在文本中替换所有的关键字, 替换符默认为 *
- *
- * @param text 文本
- * @return
- */
- public String Replace(final String text) {
- return Replace(text, '*');
- }
-
- /**
- * 在文本中替换所有的关键字
- *
- * @param text 文本
- * @param replaceChar 替换符
- * @return
- */
- public String Replace(final String text, final char replaceChar) {
- final StringBuilder result = new StringBuilder(text);
-
- int p = 0;
-
- for (int i = 0; i < text.length(); i++) {
- final int t = _dict[text.charAt(i)];
- if (t == 0) {
- p = 0;
- continue;
- }
- int next = _next[p] + t;
- boolean find = _key[next] == t;
- if (find == false && p != 0) {
- p = 0;
- next = _next[p] + t;
- find = _key[next] == t;
- }
- if (find) {
- final int index = _check[next];
- if (index > 0) {
- final int maxLength = _keywords[_guides[index][0]].length();
- final int start = i + 1 - maxLength;
- for (int j = start; j <= i; j++) {
- result.setCharAt(j, replaceChar);
- }
- }
- p = next;
- }
- }
- return result.toString();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/WordsSearchResult.java b/src/main/java/org/springblade/modules/words/WordsSearchResult.java
deleted file mode 100644
index f335a04..0000000
--- a/src/main/java/org/springblade/modules/words/WordsSearchResult.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.springblade.modules.words;
-
-public class WordsSearchResult {
-
- public WordsSearchResult(final String keyword, final int start, final int end, final int index) {
- Keyword = keyword;
- End = end;
- Start = start;
- Index = index;
- MatchKeyword = keyword;
- }
-
- public WordsSearchResult(final String keyword, final int start, final int end, final int index,
- final String matchKeyword) {
- Keyword = keyword;
- End = end;
- Start = start;
- Index = index;
- MatchKeyword = matchKeyword;
- }
-
- /** 开始位置 */
- public int Start;
- /** 结束位置 */
- public int End;
- /** 关键字 */
- public String Keyword;
- /** 索引 */
- public int Index;
- /** 匹配关键字 */
- public String MatchKeyword;
-
-}
diff --git a/src/main/java/org/springblade/modules/words/WorksService.java b/src/main/java/org/springblade/modules/words/WorksService.java
deleted file mode 100644
index 15b39f9..0000000
--- a/src/main/java/org/springblade/modules/words/WorksService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.springblade.modules.words;
-
-import org.springblade.modules.words.sensitiveword.service.ISensitivewordService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 敏感词过滤服务
- * @author zhongrj
- * @date 2024-01-22
- */
-@Component
-public class WorksService {
-
- @Autowired
- private ISensitivewordService sensitivewordService;
-
-
- /**
- * 敏感词过滤
- * @param content
- * @return
- */
- public Map<String,Object> interceptWords(String content) {
- // 查询所有的敏感词数据集合
- List<String> list = sensitivewordService.getBadSensitivewordList();
- // 创建查询对象
- StringSearch iwords = new StringSearch();
- // 设置敏感词集合
- iwords.SetKeywords(list);
- // 判断是否存在敏感词
- boolean b = iwords.ContainsAny(content);
- // 创建map 对象返回
- Map<String,Object> res = new HashMap(3);
- // 设置是否有敏感词
- res.put("iswords",String.valueOf(b));
- if (b) {
- // 在文本中替换所有的关键字
- String str = iwords.Replace(content, '*');
- // 设置替换后的内容
- res.put("content", str);
- String text = "";
- // 在文本中查找所有的关键字
- List<String> all = iwords.FindAll(content);
- for (int i = 0; i < all.size(); i++) {
- text += all.get(i) + ",";
- }
- String words = "";
- if (!text.equals("")) {
- words = text.substring(0, text.length() - 1);
- }
- // 设置找到的敏感关键字
- res.put("words", words);
- }
- // 返回
- return res;
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/BaseMatch.java b/src/main/java/org/springblade/modules/words/internals/BaseMatch.java
deleted file mode 100644
index a24716c..0000000
--- a/src/main/java/org/springblade/modules/words/internals/BaseMatch.java
+++ /dev/null
@@ -1,457 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-public class BaseMatch {
- protected TrieNode3[] _first;
- protected int[] _keywordLength;
- protected int[] _keywordIndex;
- protected String[] _matchKeywords;
-
- protected List<TrieNode> BuildFirstLayerTrieNode(List<String> keywords) {
- TrieNode root = new TrieNode();
-
- Map<Integer, List<TrieNode>> allNodeLayers = new Hashtable<Integer, List<TrieNode>>();
- // 第一次关键字
- for (int i = 0; i < keywords.size(); i++) {
- String p = keywords.get(i);
- TrieNode nd = root;
- int start = 0;
- while (p.charAt(start) == 0) { // 0 为 通配符
- start++;
- }
- for (int j = start; j < p.length(); j++) {
- nd = nd.Add(p.charAt(j));
- if (nd.Layer == 0) {
- nd.Layer = j + 1 - start;
- if (allNodeLayers.containsKey(nd.Layer) == false) {
- List<TrieNode> nodes = new ArrayList<TrieNode>();
- nodes.add(nd);
- allNodeLayers.put(nd.Layer, nodes);
- } else {
- allNodeLayers.get(nd.Layer).add(nd);
- }
- }
- }
- nd.SetResults(i);
- }
- Character z = 0;
- // 第二次关键字 通配符
- for (int i = 0; i < keywords.size(); i++) {
- String p = keywords.get(i);
- if (p.contains(z.toString()) == false) {
- continue;
- }
- int start = 0;
- while (p.charAt(start) == 0) { // 0 为 通配符
- start++;
- }
- List<TrieNode> trieNodes = new ArrayList<TrieNode>();
- trieNodes.add(root);
-
- for (int j = start; j < p.length(); j++) {
- List<TrieNode> newTrieNodes = new ArrayList<TrieNode>();
- Character c = p.charAt(j);
- if (c == 0) {
- for (TrieNode nd : trieNodes) {
- for (Character key : nd.m_values.keySet()) {
- newTrieNodes.add(nd.m_values.get(key));
- }
- }
- } else {
- for (TrieNode nd : trieNodes) {
- TrieNode nd2 = nd.Add(c);
- if (nd2.Layer == 0) {
- nd2.Layer = j + 1 - start;
- if (allNodeLayers.containsKey(nd2.Layer) == false) {
- List<TrieNode> nodes = new ArrayList<TrieNode>();
- nodes.add(nd2);
- allNodeLayers.put(nd2.Layer, nodes);
- } else {
- allNodeLayers.get(nd2.Layer).add(nd2);
- }
- // List<TrieNode> tnodes;
- // if (allNodeLayers.TryGetValue(nd2.Layer, tnodes) == false) {
- // tnodes = new ArrayList<TrieNode>();
- // allNodeLayers[nd.Layer] = tnodes;
- // }
- // tnodes.add(nd2);
- }
- newTrieNodes.add(nd2);
- }
- }
- trieNodes = newTrieNodes;
- }
- for (TrieNode nd : trieNodes) {
- nd.SetResults(i);
- }
- }
-
- // 添加到 allNode
- List<TrieNode> allNode = new ArrayList<TrieNode>();
- allNode.add(root);
- for (int i = 0; i < allNodeLayers.size(); i++) { // 注意 这里不能用 keySet()
- List<TrieNode> nodes = allNodeLayers.get(i + 1);
- for (int j = 0; j < nodes.size(); j++) {
- allNode.add(nodes.get(j));
- }
- }
- allNodeLayers.clear();
- allNodeLayers = null;
-
- // 第一次 Set Failure
- for (int i = 1; i < allNode.size(); i++) {
- TrieNode nd = allNode.get(i);
- nd.Index = i;
- TrieNode r = nd.Parent.Failure;
- char c = nd.Char;
- while (r != null && !r.m_values.containsKey(c))
- r = r.Failure;
- if (r == null)
- nd.Failure = root;
- else {
- nd.Failure = r.m_values.get(c);
- for (Integer result : nd.Failure.Results)
- nd.SetResults(result);
- }
- }
-
- // 第二次 Set Failure
- Character zore = 0;
- for (int i = 1; i < allNode.size(); i++) {
- TrieNode nd = allNode.get(i);
- if (nd.Layer == 1) {
- continue;
- }
-
- if (nd.m_values.containsKey(zore)) {
- nd.HasWildcard = true;
- }
- if (nd.Failure.HasWildcard) {
- nd.HasWildcard = true;
- }
- if (nd.Char == 0) {
- nd.IsWildcard = true;
- continue;
- } else if (nd.Parent.IsWildcard) {
- nd.IsWildcard = true;
- nd.WildcardLayer = nd.Parent.WildcardLayer + 1;
- if (nd.Failure != root) {
- if (nd.Failure.Layer <= nd.WildcardLayer) {
- nd.Failure = root;
- }
- }
- continue;
- }
- }
- root.Failure = root;
-
- return allNode;
- }
-
- protected boolean HasMatch(String keyword) {
- for (int i = 0; i < keyword.length(); i++) {
- Character c = keyword.charAt(i);
- if (c == '.' || c == '?' || c == '\\' || c == '[' || c == '(') {
- return true;
- }
- }
- return false;
- }
-
- protected List<String> MatchKeywordBuild(String keyword) throws Exception {
- StringBuilder stringBuilder = new StringBuilder();
- Map<Integer, List<String>> parameterDict = new Hashtable<Integer, List<String>>();
- SeparateParameters(keyword, stringBuilder, parameterDict);
-
- if (parameterDict.size() == 0) {
- List<String> al = new ArrayList<String>();
- al.add(stringBuilder.toString());
- return al;
- }
- List<String> parameters = new ArrayList<String>();
- KeywordBuild(parameterDict, 0, parameterDict.keySet().size() - 1, "", parameters);
- String keywordFmt = stringBuilder.toString();
- List<String> list = new ArrayList<String>();
-
- String z = ((Character) (char) 0).toString();
- for (int i = 0; i < parameters.size(); i++) {
- String item = parameters.get(i);
- String[] items = item.split(z);
- Object[] ls = new Object[items.length];
- for (int j = 0; j < ls.length; j++) {
- ls[j] = items[j];
- }
- String t = String.format(keywordFmt, ls);
- if (list.contains(t) == false) {
- list.add(t);
- }
- }
- return list;
- }
-
- private void SeparateParameters(String keyword, StringBuilder stringBuilder,
- Map<Integer, List<String>> parameterDict) throws Exception {
- int index = 0;
- int parameterIndex = 0;
- Character zore = 0;
-
- while (index < keyword.length()) {
- Character c = keyword.charAt(index);
- if (c == '.') {
- if (index + 1 < keyword.length() && keyword.charAt(index + 1) == '?') {
- List<String> lt = new ArrayList<String>();
- lt.add("");
- lt.add(zore.toString());
- parameterDict.put(parameterIndex, lt);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index += 2;
-
- } else {
- stringBuilder.append(((char) 0));
- index++;
- }
- } else if (c == '\\') {
- if (index + 2 < keyword.length() && keyword.charAt(index + 2) == '?') {
- List<String> lt = new ArrayList<String>();
- lt.add("");
- lt.add(((Character) keyword.charAt(index + 1)).toString());
- parameterDict.put(parameterIndex, lt);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index += 3;
- } else if (index + 1 < keyword.length()) {
- stringBuilder.append(keyword.charAt(index + 1));
- index += 2;
- } else {
- throw new Exception("【{keyword}】出错了,最后一位为\\");
- }
- } else if (c == '[') {
- index++;
- List<String> ps = new ArrayList<String>();
- while (index < keyword.length()) {
- c = keyword.charAt(index);
- if (c == ']') {
- break;
- } else if (c == '\\') {
- if (index + 1 < keyword.length()) {
- ps.add(((Character) keyword.charAt(index + 1)).toString());
- index += 2;
- }
- } else {
- ps.add(c.toString());
- index++;
- }
- }
- if (c != ']') {
- throw new Exception("【{keyword}】出错了,最后一位不为]");
- }
- if (index + 1 < keyword.length() && keyword.charAt(index + 1) == '?') {
- ps.add("");
- parameterDict.put(parameterIndex, ps);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index += 2;
- } else {
- parameterDict.put(parameterIndex, ps);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index++;
- }
- } else if (c == '(') {
- index++;
- List<String> ps = new ArrayList<String>();
- String words = "";
- while (index < keyword.length()) {
- c = keyword.charAt(index);
- if (c == ')') {
- break;
- } else if (c == '|') {
- ps.add(words);
- words = "";
- index++;
- } else if (c == '\\') {
- if (index + 1 < keyword.length()) {
- words += keyword.charAt(index + 1);
- index += 2;
- }
- } else {
- words += c;
- index++;
- }
- }
- ps.add(words);
- if (c != ')') {
- throw new Exception("【{keyword}】出错了,最后一位不为)");
- }
- if (index + 1 < keyword.length() && keyword.charAt(index + 1) == '?') {
- ps.add("");
- parameterDict.put(parameterIndex, ps);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index += 2;
- } else {
- parameterDict.put(parameterIndex, ps);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index++;
- }
- } else {
- if (index + 1 < keyword.length() && keyword.charAt(index + 1) == '?') {
- List<String> lt = new ArrayList<String>();
- lt.add("");
- lt.add(c.toString());
- parameterDict.put(parameterIndex, lt);
- stringBuilder.append("%" + parameterIndex + "$s");
- parameterIndex++;
- index += 2;
- } else {
- if (c == '{') {
- stringBuilder.append("{{");
- } else if (c == '}') {
- stringBuilder.append("}}");
- } else {
- stringBuilder.append(c);
- }
- index++;
- }
- }
- }
-
- }
-
- private static void KeywordBuild(Map<Integer, List<String>> parameterDict, int index, int end, String keyword,
- List<String> result) {
- Character span = (char) 1;
- List<String> list = parameterDict.get(index);
- if (index == end) {
- for (int i = 0; i < list.size(); i++) {
- String item = list.get(i);
- result.add((keyword + span + item).substring(1));
- }
- } else {
- for (int i = 0; i < list.size(); i++) {
- String item = list.get(i);
- KeywordBuild(parameterDict, index + 1, end, keyword + span + item, result);
- }
- }
- }
-
- /**
- * 设置关键字
- *
- * @param keywords 关键字列表
- * @throws Exception
- */
- public void SetKeywords(List<String> keywords) throws Exception {
- _matchKeywords = keywords.toArray(new String[0]);
- List<String> newKeyword = new ArrayList<String>();
- List<Integer> newKeywordLength = new ArrayList<Integer>();
- List<Integer> newKeywordIndex = new ArrayList<Integer>();
- Integer index = 0;
- for (String keyword : keywords) {
- if (HasMatch(keyword) == false) {
- newKeyword.add(keyword);
- newKeywordLength.add(keyword.length());
- newKeywordIndex.add(index);
- } else {
- List<String> list = MatchKeywordBuild(keyword);
- for (String item : list) {
- newKeyword.add(item);
- newKeywordLength.add(item.length());
- newKeywordIndex.add(index);
- }
- }
- index++;
- }
- _keywordLength = new int[newKeywordLength.size()];
- for (int i = 0; i < _keywordLength.length; i++) {
- _keywordLength[i] = newKeywordLength.get(i);
- }
- _keywordIndex = new int[newKeywordIndex.size()];
- for (int j = 0; j < _keywordIndex.length; j++) {
- _keywordIndex[j] = newKeywordIndex.get(j);
- }
-
- SetKeywords2(newKeyword);
- }
-
- protected void SetKeywords2(List<String> keywords) {
- List<TrieNode> allNode = BuildFirstLayerTrieNode(keywords);
- TrieNode root = allNode.get(0);
-
- List<TrieNode3> allNode2 = new ArrayList<TrieNode3>();
- for (int i = 0; i < allNode.size(); i++) {
- allNode2.add(new TrieNode3());
- }
-
- for (int i = 0; i < allNode2.size(); i++) {
- TrieNode oldNode = allNode.get(i);
- TrieNode3 newNode = allNode2.get(i);
-
- for (Character key : oldNode.m_values.keySet()) {
- int index = oldNode.m_values.get(key).Index;
- if (key == 0) {
- newNode.HasWildcard = true;
- newNode.WildcardNode = allNode2.get(index);
- continue;
- }
- newNode.Add(key, allNode2.get(index));
- }
- for (Integer item : oldNode.Results) {
- if (oldNode.IsWildcard) {
- if (keywords.get(item).length() > oldNode.WildcardLayer) {
- newNode.SetResults(item);
- }
- } else {
- newNode.SetResults(item);
- }
- }
-
- TrieNode failure = oldNode.Failure;
- while (failure != root) {
- if (oldNode.IsWildcard && failure.Layer <= oldNode.WildcardLayer) {
- break;
- }
- for (Character key : failure.m_values.keySet()) {
- int index = failure.m_values.get(key).Index;
- if (key == 0) {
- newNode.HasWildcard = true;
- if (newNode.WildcardNode == null) {
- newNode.WildcardNode = allNode2.get(index);
- }
- continue;
- }
- if (newNode.HasKey(key) == false) {
- newNode.Add(key, allNode2.get(index));
- }
- }
- for (Integer item : failure.Results) {
- if (oldNode.IsWildcard) {
- if (keywords.get(item).length() > oldNode.WildcardLayer) {
- newNode.SetResults(item);
- }
- } else {
- newNode.SetResults(item);
- }
- }
- failure = failure.Failure;
- }
- }
- allNode.clear();
- allNode = null;
- root = null;
-
- // var root2 = allNode2[0];
- TrieNode3[] first = new TrieNode3[Character.MAX_VALUE + 1];
- for (Character key : allNode2.get(0).m_values.keySet()) {
- first[key] = allNode2.get(0).m_values.get(key);
- }
- _first = first;
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/BaseMatchEx.java b/src/main/java/org/springblade/modules/words/internals/BaseMatchEx.java
deleted file mode 100644
index 214050e..0000000
--- a/src/main/java/org/springblade/modules/words/internals/BaseMatchEx.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.*;
-
-import static java.util.stream.Collectors.toMap;
-
-public class BaseMatchEx extends BaseMatch {
- protected int[] _dict;
- protected int[] _firstIndex;
- protected int[] _min;
- protected int[] _max;
-
- protected IntDictionary[] _nextIndex;
- protected int[] _wildcard;
- protected int[] _end;
- protected int[] _resultIndex;
-
-
- @Override
- protected void SetKeywords2(List<String> keywords)
- {
- List<TrieNode> allNode = BuildFirstLayerTrieNode(keywords);
- TrieNode root = allNode.get(0);
-
- StringBuilder stringBuilder = new StringBuilder();
- for (int i = 1; i < allNode.size(); i++) {
- stringBuilder.append(allNode.get(i).Char);
- }
- CreateDict(stringBuilder.toString());
- stringBuilder = null;
-
-
- List<TrieNode3Ex> allNode2 = new ArrayList<TrieNode3Ex>();
- for (int i = 0; i < allNode.size(); i++) {
- TrieNode3Ex node3=new TrieNode3Ex();
- node3.Index=i;
- allNode2.add(node3); ;
- }
-
- for (int i = 0; i < allNode2.size(); i++) {
- TrieNode oldNode = allNode.get(i);
- TrieNode3Ex newNode = allNode2.get(i);
-
- for (Character item : oldNode.m_values.keySet()) {
- int key = _dict[item];
- int index = oldNode.m_values.get(item).Index;
- if (key == 0) {
- newNode.HasWildcard = true;
- newNode.WildcardNode = allNode2.get(index) ;
- continue;
- }
- newNode.Add((char)key, allNode2.get(index) );
- }
- for (int item : oldNode.Results) {
- if (oldNode.IsWildcard) {
- if (keywords.get(item).length() > oldNode.WildcardLayer) {
- newNode.SetResults(item);
- }
- } else {
- newNode.SetResults(item);
- }
- //newNode.SetResults(item);
- }
-
- TrieNode failure = oldNode.Failure;
- while (failure != root) {
- if (oldNode.IsWildcard && failure.Layer <= oldNode.WildcardLayer) {
- break;
- }
- for (Character item : failure.m_values.keySet()) {
- int key = _dict[item];
- int index = failure.m_values.get(item).Index;
- if (key == 0) {
- newNode.HasWildcard = true;
- if (newNode.WildcardNode == null) {
- newNode.WildcardNode = allNode2.get(index);
- }
- continue;
- }
- if (newNode.HasKey((char)key) == false) {
- newNode.Add((char)key, allNode2.get(index));
- }
- }
- for (int item : failure.Results) {
- if (oldNode.IsWildcard) {
- if (keywords.get(item).length() > oldNode.WildcardLayer) {
- newNode.SetResults(item);
- }
- } else {
- newNode.SetResults(item);
- }
- }
- failure = failure.Failure;
- }
- }
- allNode.clear();
- allNode = null;
- root = null;
-
-
- List<Integer> min = new ArrayList<Integer>();
- List<Integer> max = new ArrayList<Integer>();
- List<Integer> wildcard = new ArrayList<Integer>();
- List<Map<Integer, Integer>> nextIndexs = new ArrayList<Map<Integer, Integer>>();
- List<Integer> end = new ArrayList<Integer>() ;
- end.add(0);
- List<Integer> resultIndex = new ArrayList<Integer>();
- for (int i = 0; i < allNode2.size(); i++) {
- Map<Integer, Integer> dict = new HashMap<Integer, Integer>();
- TrieNode3Ex node = allNode2.get(i);
- min.add(node.minflag);
- max.add(node.maxflag);
-
- if (node.HasWildcard) {
- wildcard.add(node.WildcardNode.Index);
- } else {
- wildcard.add(0);
- }
-
- if (i > 0) {
- for (Character item : node.m_values.keySet()) {
- dict.put((Integer)(int)(item) , node.m_values.get(item).Index);
- }
- }
- for (int item : node.Results) {
- resultIndex.add(item);
- }
- end.add(resultIndex.size());
- nextIndexs.add(dict);
- }
- int[] first = new int[Character.MAX_VALUE + 1];
- for (Character item : allNode2.get(0).m_values.keySet()) {
- first[item] = allNode2.get(0).m_values.get(item).Index;
- }
-
- _firstIndex = first;
- _min = new int[min.size()];
- _max = new int[min.size()];
- for (int i = 0; i < min.size(); i++) {
- _min[i] = (int) (min.get(i));
- _max[i] = (int) (max.get(i));
- }
- _nextIndex = new IntDictionary[nextIndexs.size()];
- for (int i = 0; i < nextIndexs.size(); i++) {
- IntDictionary dictionary = new IntDictionary();
- dictionary.SetDictionary(nextIndexs.get(i));
- _nextIndex[i] = dictionary;
- }
- _wildcard= new int[wildcard.size()];
- for (int i = 0; i < wildcard.size(); i++) {
- _wildcard[i] = (int) (wildcard.get(i));
- }
- _end = new int[end.size()];
- for (int i = 0; i < end.size(); i++) {
- _end[i] = (int) (end.get(i));
- }
- _resultIndex = new int[resultIndex.size()];
- for (int i = 0; i < resultIndex.size(); i++) {
- _resultIndex[i] = (int) (resultIndex.get(i));
- }
- allNode2.clear();
- allNode2 = null;
- }
-
- private int CreateDict(String keywords) {
- Map<Character, Integer> dictionary = new Hashtable<Character, Integer>();
- for (int i = 0; i < keywords.length(); i++) {
- Character item = keywords.charAt(i);
- if (dictionary.containsKey(item)) {
- dictionary.put(item, dictionary.get(item) + 1);
- } else {
- dictionary.put(item, 1);
- }
- }
- Map<Character, Integer> dictionary2 = dictionary.entrySet().stream()
- .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
- .collect(toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new));
-
- List<Character> list2 = new ArrayList<Character>();
- for (Character item : dictionary2.keySet()) {
- list2.add(item);
- }
-
- _dict = new int[Character.MAX_VALUE + 1];
- for (int i = 0; i < list2.size(); i++) {
- _dict[list2.get(i)] = i + 1;
- }
- return dictionary.size();
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/BasePinyinMatch.java b/src/main/java/org/springblade/modules/words/internals/BasePinyinMatch.java
deleted file mode 100644
index 107713b..0000000
--- a/src/main/java/org/springblade/modules/words/internals/BasePinyinMatch.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import org.springblade.modules.words.WordsSearch;
-import org.springblade.modules.words.WordsSearchResult;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class BasePinyinMatch {
-
- public class PinyinSearch extends BaseSearch {
- String[][] _keywordPinyins;
- int[] _indexs;
-
- public void SetIndexs(final int[] indexs) {
- _indexs = indexs;
- }
- public void SetIndexs(List<Integer> indexs) {
- _indexs=new int[indexs.size()];
- for (int i = 0; i < indexs.size(); i++) {
- _indexs[i]=indexs.get(i);
- }
- }
-
- public void SetKeywords2(List<TwoTuple<String, String[]>> keywords) {
- _keywords = new String[keywords.size()];
- _keywordPinyins = new String[keywords.size()][];
- for (int i = 0; i < keywords.size(); i++) {
- _keywords[i] = keywords.get(i).Item1;
- _keywordPinyins[i] = keywords.get(i).Item2;
- }
- SetKeywords();
- }
-
- public boolean Find(final String text, final String hz, final String[] pinyins) {
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final Character t = text.charAt(i);
- TrieNode2 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- for (final int result : tn.Results) {
- final String keyword = _keywords[result];
- final int start = i + 1 - keyword.length();
- boolean isok = true;
- final String[] keywordPinyins = _keywordPinyins[result];
-
- for (int j = 0; j < keyword.length(); j++) {
- final int idx = start + j;
- final String py = keywordPinyins[j];
- if (py.length() == 1 && py.charAt(0) >= 0x3400 && py.charAt(0) <= 0x9fd5) {
- if (hz.charAt(idx) != py.charAt(0)) {
- isok = false;
- break;
- }
- } else {
- if (pinyins[idx].startsWith(py) == false) {
- isok = false;
- break;
- }
- }
- }
- if (isok) {
- return true;
- }
- }
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- public boolean Find2(final String text, final String hz, final String[] pinyins, final int keysCount) {
- int findCount = 0;
- int lastWordsIndex = -1;
- TrieNode2 ptr = null;
- for (int i = 0; i < text.length(); i++) {
- final Character t = text.charAt(i);
- TrieNode2 tn;
- if (ptr == null) {
- tn = _first[t];
- } else {
- if (ptr.HasKey(t) == false) {
- tn = _first[t];
- } else {
- tn = ptr.GetValue(t);
- }
- }
- if (tn != null) {
- if (tn.End) {
- for (final Integer result : tn.Results) {
- final int index = _indexs[result];
- if (index != findCount) {
- continue;
- }
-
- final String keyword = _keywords[result];
- final int start = i + 1 - keyword.length();
- if (lastWordsIndex >= start) {
- continue;
- }
-
- boolean isok = true;
- final String[] keywordPinyins = _keywordPinyins[result];
-
- for (int j = 0; j < keyword.length(); j++) {
- final int idx = start + j;
- final String py = keywordPinyins[j];
- if (py.length() == 1 && py.charAt(0) >= 0x3400 && py.charAt(0) <= 0x9fd5) {
- if (hz.charAt(idx) != py.charAt(0)) {
- isok = false;
- break;
- }
- } else {
- if (pinyins[idx].startsWith(py) == false) {
- isok = false;
- break;
- }
- }
- }
- if (isok) {
- findCount++;
- lastWordsIndex = i;
- if (findCount == keysCount) {
- return true;
- }
- break;
- }
- }
- }
- }
- ptr = tn;
- }
- return false;
- }
-
- }
-
- protected void MergeKeywords(String[] keys, int id, String keyword, List<TwoTuple<String, String[]>> list)
- throws NumberFormatException, IOException {
- if (id >= keys.length) {
- TwoTuple<String, String[]> tuple = new TwoTuple<String, String[]>(keyword, keys);
- list.add(tuple);
- return;
- }
- String key = keys[id];
- if (key.charAt(0) >= 0x3400 && key.charAt(0) <= 0x9fd5) {
- List<String> all = PinyinDict.GetAllPinyin(key.charAt(0), 0);
- Set<Character> fpy = new HashSet<Character>();
- for (String item : all) {
- fpy.add(item.charAt(0));
- }
- for (Character item : fpy) {
- MergeKeywords(keys, id + 1, keyword + item, list);
- }
- } else {
- MergeKeywords(keys, id + 1, keyword + key.charAt(0), list);
- }
- }
-
- protected void MergeKeywords(String[] keys, int id, String keyword, List<TwoTuple<String, String[]>> list,
- int index, List<Integer> indexs) throws NumberFormatException, IOException {
- if (id >= keys.length) {
- TwoTuple<String, String[]> tuple = new TwoTuple<String, String[]>(keyword, keys);
- list.add(tuple);
- indexs.add(index);
- return;
- }
- String key = keys[id];
- if (key.charAt(0) >= 0x3400 && key.charAt(0) <= 0x9fd5) {
- List<String> all = PinyinDict.GetAllPinyin(key.charAt(0), 0);
- Set<Character> fpy = new HashSet<Character>();
- for (String item : all) {
- fpy.add(item.charAt(0));
- }
- for (Character item : fpy) {
- MergeKeywords(keys, id + 1, keyword + item, list, index, indexs);
- }
- } else {
- MergeKeywords(keys, id + 1, keyword + key.charAt(0), list, index, indexs);
- }
- }
-
- protected List<String> SplitKeywords(String key) throws NumberFormatException, IOException {
- InitPinyinSearch();
- List<TextNode> textNodes = new ArrayList<TextNode>();
- for (int i = 0; i <= key.length(); i++) {
- textNodes.add(new TextNode());
- }
- textNodes.get(textNodes.size() - 1).End = true;
-
- for (int i = 0; i < key.length(); i++) {
- TextLine line = new TextLine();
- line.Next = textNodes.get(i + 1);
- line.Words = ((Character) key.charAt(i)).toString();
- textNodes.get(i).Children.add(line);
- }
-
- List<WordsSearchResult> all = _wordsSearch.FindAll(key);
- for (WordsSearchResult searchResult : all) {
- TextLine line = new TextLine();
- line.Next = textNodes.get(searchResult.End + 1);
- line.Words = searchResult.Keyword;
- textNodes.get(searchResult.Start).Children.add(line);
- }
-
- List<String> list = new ArrayList<String>();
- BuildKsywords(textNodes.get(0), 0, "", list);
- return list;
- }
-
- private void BuildKsywords(TextNode textNode, int id, String keywords, List<String> list) {
- if (textNode.End) {
- String k = keywords.substring(1);
- if (list.contains(k) == false) {
- list.add(k);
- }
- return;
- }
- for (TextLine item : textNode.Children) {
- BuildKsywords(item.Next, id + 1, keywords + (char) 0 + item.Words, list);
- }
- }
-
- class TextNode {
- public boolean End;
- public List<TextLine> Children = new ArrayList<TextLine>();
- }
-
- class TextLine {
- public String Words;
- public TextNode Next;
- }
-
- private static WordsSearch _wordsSearch;
-
- private void InitPinyinSearch() throws NumberFormatException, IOException {
- if (_wordsSearch == null) {
- List<String> allPinyins = new ArrayList<String>();
- String[] pys = PinyinDict.getPyShow();
- for (int i = 1; i < pys.length; i += 2) {
- String py = pys[i].toUpperCase();
- for (int j = 1; j <= py.length(); j++) {
- String key = py.substring(0, j);
- if (allPinyins.contains(key) == false) {
- allPinyins.add(key);
- }
-
- }
- }
- WordsSearch wordsSearch = new WordsSearch();
- wordsSearch.SetKeywords(allPinyins);
- _wordsSearch = wordsSearch;
- }
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/BaseSearch.java b/src/main/java/org/springblade/modules/words/internals/BaseSearch.java
deleted file mode 100644
index 16856d3..0000000
--- a/src/main/java/org/springblade/modules/words/internals/BaseSearch.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-public class BaseSearch {
- protected TrieNode2[] _first = new TrieNode2[Character.MAX_VALUE + 1];
- protected String[] _keywords;
-
-
- /**
- * 设置关键字
- *
- * @param keywords 关键字列表
- */
- public void SetKeywords(List<String> keywords) {
- _keywords = new String[keywords.size()];
- _keywords = keywords.toArray(_keywords);
- SetKeywords();
- }
-
- protected void SetKeywords() {
- TrieNode root = new TrieNode();
- Map<Integer, List<TrieNode>> allNodeLayers = new Hashtable<Integer, List<TrieNode>>();
- for (int i = 0; i < _keywords.length; i++) {
- String p = _keywords[i];
- TrieNode nd = root;
- for (int j = 0; j < p.length(); j++) {
- nd = nd.Add(p.charAt(j));
- if (nd.Layer == 0) {
- nd.Layer = j + 1;
- if (allNodeLayers.containsKey(nd.Layer) == false) {
- List<TrieNode> nodes = new ArrayList<TrieNode>();
- nodes.add(nd);
- allNodeLayers.put(nd.Layer, nodes);
- } else {
- allNodeLayers.get(nd.Layer).add(nd);
- }
- }
- }
- nd.SetResults(i);
- }
-
- List<TrieNode> allNode = new ArrayList<TrieNode>();
- allNode.add(root);
- for (int i = 0; i < allNodeLayers.size(); i++) { // 注意 这里不能用 keySet()
- List<TrieNode> nodes = allNodeLayers.get(i + 1);
- for (int j = 0; j < nodes.size(); j++) {
- allNode.add(nodes.get(j));
- }
- }
- allNodeLayers.clear();
- allNodeLayers = null;
-
- for (int i = 1; i < allNode.size(); i++) {
- TrieNode nd = allNode.get(i);
- nd.Index = i;
- TrieNode r = nd.Parent.Failure;
- Character c = nd.Char;
- while (r != null && !r.m_values.containsKey(c))
- r = r.Failure;
- if (r == null)
- nd.Failure = root;
- else {
- nd.Failure = r.m_values.get(c);
- for (Integer result : nd.Failure.Results) {
- nd.SetResults(result);
- }
- }
- }
- root.Failure = root;
-
- List<TrieNode2> allNode2 = new ArrayList<TrieNode2>();
- for (int i = 0; i < allNode.size(); i++) {
- allNode2.add(new TrieNode2());
- }
- for (int i = 0; i < allNode2.size(); i++) {
- TrieNode oldNode = allNode.get(i);
- TrieNode2 newNode = allNode2.get(i);
-
- for (Character key : oldNode.m_values.keySet()) {
- TrieNode nd = oldNode.m_values.get(key);
- newNode.Add(key, allNode2.get(nd.Index));
- }
- oldNode.Results.forEach(item -> {
- newNode.SetResults(item);
- });
-
- oldNode = oldNode.Failure;
- while (oldNode != root) {
- for (Character key : oldNode.m_values.keySet()) {
- TrieNode nd = oldNode.m_values.get(key);
- if (newNode.HasKey(key) == false) {
- newNode.Add(key, allNode2.get(nd.Index));
- }
- }
- oldNode.Results.forEach(item -> {
- newNode.SetResults(item);
- });
- oldNode = oldNode.Failure;
- }
- }
- allNode.clear();
- allNode = null;
- root = null;
-
- TrieNode2[] first = new TrieNode2[Character.MAX_VALUE + 1];
- TrieNode2 root2 = allNode2.get(0);
- for (Character key : root2.m_values.keySet()) {
- TrieNode2 nd = root2.m_values.get(key);
- first[(int) key] = nd;
- }
- _first = first;
- }
-
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/BaseSearchEx.java b/src/main/java/org/springblade/modules/words/internals/BaseSearchEx.java
deleted file mode 100644
index 0520163..0000000
--- a/src/main/java/org/springblade/modules/words/internals/BaseSearchEx.java
+++ /dev/null
@@ -1,347 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import org.springblade.modules.words.NumHelper;
-
-import java.io.*;
-import java.util.*;
-
-import static java.util.stream.Collectors.toMap;
-
-public class BaseSearchEx {
- protected int[] _dict;
- protected int[] _first;
- protected int[] _min;
- protected int[] _max;
-
- protected IntDictionary[] _nextIndex;
- protected int[] _end;
- protected int[] _resultIndex;
- protected String[] _keywords;
-
- /**
- * 保存, 修改于2020-08-06,使用utf-8保存,与以前数据可能会不同
- *
- * @param filePath 文件地址
- * @throws IOException
- */
- public void Save(String filePath) throws IOException {
- File fi = new File(filePath);
- FileOutputStream fs = new FileOutputStream(fi);
- Save(fs);
- fs.close();
- }
-
- protected void Save(FileOutputStream bw) throws IOException {
- bw.write(NumHelper.serialize(_keywords.length));
- for (String item : _keywords) {
- byte[] bytes = item.getBytes("utf-8");
- bw.write(NumHelper.serialize(bytes.length));
- bw.write(bytes);
- }
-
- bw.write(NumHelper.serialize(_dict.length));
- for (int item : _dict) {
- bw.write(NumHelper.serialize(item));
- }
-
- bw.write(NumHelper.serialize(_first.length));
- for (int item : _first) {
- bw.write(NumHelper.serialize(item));
- }
- bw.write(NumHelper.serialize(_min.length));
- for (int item : _min) {
- bw.write(NumHelper.serialize(item));
- }
- bw.write(NumHelper.serialize(_max.length));
- for (int item : _max) {
- bw.write(NumHelper.serialize(item));
- }
- bw.write(NumHelper.serialize(_end.length));
- for (int item : _end) {
- bw.write(NumHelper.serialize(item));
- }
- bw.write(NumHelper.serialize(_resultIndex.length));
- for (int item : _resultIndex) {
- bw.write(NumHelper.serialize(item));
- }
-
- bw.write(NumHelper.serialize(_nextIndex.length));
- for (int i = 0; i < _nextIndex.length; i++) {
- int[] keys = _nextIndex[i].getKeys();
- bw.write(NumHelper.serialize(keys.length));
- for (int item : keys) {
- bw.write(NumHelper.serialize(item));
- }
-
- int[] values = _nextIndex[i].getValues();
- bw.write(NumHelper.serialize(values.length));
- for (int item : values) {
- bw.write(NumHelper.serialize(item));
- }
- }
- }
-
- /**
- * 加载, 修改于2020-08-06,使用utf-8加载,加载以前数据可能会出错
- *
- * @param filePath
- * @throws FileNotFoundException
- * @throws IOException
- */
- public void Load(String filePath) throws FileNotFoundException, IOException {
- File fi = new File(filePath);
- InputStream in = new BufferedInputStream(new FileInputStream(fi));
- Load(in);
- in.close();
- }
-
- public void Load(InputStream br) throws IOException {
- int length = NumHelper.read(br);
- _keywords = new String[length];
- for (int i = 0; i < length; i++) {
- int l = NumHelper.read(br);
- byte[] bytes = new byte[l];
- br.read(bytes, 0, l);
- _keywords[i] = new String(bytes,"utf-8");
- }
-
- length = NumHelper.read(br);
- _dict = new int[length];
- for (int i = 0; i < length; i++) {
- _dict[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _first = new int[length];
- for (int i = 0; i < length; i++) {
- _first[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _min = new int[length];
- for (int i = 0; i < length; i++) {
- _min[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _max = new int[length];
- for (int i = 0; i < length; i++) {
- _max[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _end = new int[length];
- for (int i = 0; i < length; i++) {
- _end[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _resultIndex = new int[length];
- for (int i = 0; i < length; i++) {
- _resultIndex[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _nextIndex = new IntDictionary[length];
- for (int i = 0; i < length; i++) {
- int l2 = NumHelper.read(br);
- int[] keys = new int[l2];
- for (int j = 0; j < keys.length; j++) {
- keys[j] = NumHelper.read(br);
- }
-
- l2 = NumHelper.read(br);
- int[] values = new int[l2];
- for (int j = 0; j < values.length; j++) {
- values[j] = NumHelper.read(br);
- }
- _nextIndex[i] = new IntDictionary();
- _nextIndex[i].SetDictionary(keys, values);
- }
- }
-
- /**
- * 设置关键字
- *
- * @param keywords
- */
- public void SetKeywords(List<String> keywords) {
- _keywords = keywords.toArray(new String[0]);
- SetKeywords();
- }
-
- private void SetKeywords() {
- TrieNode root = new TrieNode();
- Map<Integer, List<TrieNode>> allNodeLayers = new TreeMap<Integer, List<TrieNode>>();
- for (int i = 0; i < _keywords.length; i++) {
- String p = _keywords[i];
- TrieNode nd = root;
- for (int j = 0; j < p.length(); j++) {
- nd = nd.Add(p.charAt(j));
- if (nd.Layer == 0) {
- nd.Layer = j + 1;
- if (allNodeLayers.containsKey(nd.Layer) == false) {
- List<TrieNode> nodes = new ArrayList<TrieNode>();
- nodes.add(nd);
- allNodeLayers.put(nd.Layer, nodes);
- } else {
- allNodeLayers.get(nd.Layer).add(nd);
- }
- }
- }
- nd.SetResults(i);
- }
-
- List<TrieNode> allNode = new ArrayList<TrieNode>();
- allNode.add(root);
- for (int i = 0; i < allNodeLayers.size(); i++) { // 注意 这里不能用 keySet()
- List<TrieNode> nodes = allNodeLayers.get(i + 1);
- for (int j = 0; j < nodes.size(); j++) {
- allNode.add(nodes.get(j));
- }
- }
- allNodeLayers.clear();
- allNodeLayers = null;
-
- for (int i = 1; i < allNode.size(); i++) {
- TrieNode nd = allNode.get(i);
- nd.Index = i;
- TrieNode r = nd.Parent.Failure;
- Character c = nd.Char;
- while (r != null && !r.m_values.containsKey(c))
- r = r.Failure;
- if (r == null)
- nd.Failure = root;
- else {
- nd.Failure = r.m_values.get(c);
- for (Integer result : nd.Failure.Results) {
- nd.SetResults(result);
- }
- }
- }
- root.Failure = root;
-
- StringBuilder stringBuilder = new StringBuilder();
- for (int i = 1; i < allNode.size(); i++) {
- stringBuilder.append(allNode.get(i).Char);
- }
- CreateDict(stringBuilder.toString());
- stringBuilder = null;
-
- List<TrieNode2Ex> allNode2 = new ArrayList<TrieNode2Ex>();
- for (int i = 0; i < allNode.size(); i++) {
- TrieNode2Ex nd = new TrieNode2Ex();
- nd.Index = i;
- allNode2.add(nd);
- }
- for (int i = 0; i < allNode2.size(); i++) {
- TrieNode oldNode = allNode.get(i);
- TrieNode2Ex newNode = allNode2.get(i);
-
- for (Character key : oldNode.m_values.keySet()) {
- TrieNode nd = oldNode.m_values.get(key);
- newNode.Add(_dict[key], allNode2.get(nd.Index));
- }
- oldNode.Results.forEach(item -> {
- newNode.SetResults(item);
- });
-
- oldNode = oldNode.Failure;
- while (oldNode != root) {
- for (Character key : oldNode.m_values.keySet()) {
- if (newNode.HasKey(_dict[key]) == false) {
- TrieNode nd = oldNode.m_values.get(key);
- newNode.Add(_dict[key], allNode2.get(nd.Index));
- }
- }
- oldNode.Results.forEach(item -> {
- newNode.SetResults(item);
- });
- oldNode = oldNode.Failure;
- }
- }
- allNode.clear();
- allNode = null;
- root = null;
-
- List<Integer> min = new ArrayList<Integer>();
- List<Integer> max = new ArrayList<Integer>();
- List<Map<Integer, Integer>> nextIndexs = new ArrayList<Map<Integer, Integer>>();
- List<Integer> end = new ArrayList<Integer>();
- end.add(0);
- List<Integer> resultIndex = new ArrayList<Integer>();
- for (int i = 0; i < allNode2.size(); i++) {
- Map<Integer, Integer> dict = new TreeMap<Integer, Integer>();
- TrieNode2Ex node = allNode2.get(i);
- min.add(node.minflag);
- max.add(node.maxflag);
-
- if (i > 0) {
- for (Integer key : node.m_values.keySet()) {
- dict.put(key, node.m_values.get(key).Index);
- }
- }
- for (int j = 0; j < node.Results.size(); j++) {
- resultIndex.add(node.Results.get(j));
- }
- end.add(resultIndex.size());
- nextIndexs.add(dict);
- }
- int[] first = new int[Character.MAX_VALUE + 1];
- for (Integer key : allNode2.get(0).m_values.keySet()) {
- TrieNode2Ex nd = allNode2.get(0).m_values.get(key);
- first[(int) key] = nd.Index;
- }
-
- _first = first;
- _min = new int[min.size()];
- _max = new int[min.size()];
- for (int i = 0; i < min.size(); i++) {
- _min[i] = (int) (min.get(i));
- _max[i] = (int) (max.get(i));
- }
- _nextIndex = new IntDictionary[nextIndexs.size()];
- for (int i = 0; i < nextIndexs.size(); i++) {
- IntDictionary dictionary = new IntDictionary();
- dictionary.SetDictionary(nextIndexs.get(i));
- _nextIndex[i] = dictionary;
- }
- _end = new int[end.size()];
- for (int i = 0; i < end.size(); i++) {
- _end[i] = (int) (end.get(i));
- }
- _resultIndex = new int[resultIndex.size()];
- for (int i = 0; i < resultIndex.size(); i++) {
- _resultIndex[i] = (int) (resultIndex.get(i));
- }
- allNode2.clear();
- allNode2 = null;
- }
-
- private int CreateDict(String keywords) {
- Map<Character, Integer> dictionary = new Hashtable<Character, Integer>();
- for (int i = 0; i < keywords.length(); i++) {
- Character item = keywords.charAt(i);
- if (dictionary.containsKey(item)) {
- dictionary.put(item, dictionary.get(item) + 1);
- } else {
- dictionary.put(item, 1);
- }
- }
- Map<Character, Integer> dictionary2 = dictionary.entrySet().stream()
- .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
- .collect(toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new));
-
- List<Character> list2 = new ArrayList<Character>();
- for (Character item : dictionary2.keySet()) {
- list2.add(item);
- }
-
- _dict = new int[Character.MAX_VALUE + 1];
- for (int i = 0; i < list2.size(); i++) {
- _dict[list2.get(i)] = i + 1;
- }
- return dictionary.size();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/BaseSearchEx2.java b/src/main/java/org/springblade/modules/words/internals/BaseSearchEx2.java
deleted file mode 100644
index 9426e66..0000000
--- a/src/main/java/org/springblade/modules/words/internals/BaseSearchEx2.java
+++ /dev/null
@@ -1,305 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import org.springblade.modules.words.NumHelper;
-
-import java.io.*;
-import java.util.*;
-
-import static java.util.stream.Collectors.toMap;
-
-public abstract class BaseSearchEx2 {
- protected String[] _keywords;
- protected int[][] _guides;
- protected int[] _key;
- protected int[] _next;
- protected int[] _check;
- protected int[] _dict;
-
- /**
- * 保存, 修改于2020-08-06,使用utf-8保存与以前保存的数据不同
- *
- * @param filePath 文件地址
- * @throws IOException
- */
- public void Save(String filePath) throws IOException {
- File fi = new File(filePath);
- FileOutputStream fs = new FileOutputStream(fi);
- Save(fs);
- fs.close();
- }
-
- protected void Save(FileOutputStream bw) throws IOException {
- bw.write(NumHelper.serialize(_keywords.length));
- for (String item : _keywords) {
- byte[] bytes = item.getBytes("utf-8");
- bw.write(NumHelper.serialize(bytes.length));
- bw.write(bytes);
- }
-
- bw.write(NumHelper.serialize(_guides.length));
- for (int[] guide : _guides) {
- bw.write(NumHelper.serialize(guide.length));
- for (int item : guide) {
- bw.write(NumHelper.serialize(item));
- }
- }
-
- bw.write(NumHelper.serialize(_key.length));
- for (int item : _key) {
- bw.write(NumHelper.serialize(item));
- }
-
- bw.write(NumHelper.serialize(_next.length));
- for (int item : _next) {
- bw.write(NumHelper.serialize(item));
- }
-
- bw.write(NumHelper.serialize(_check.length));
- for (int item : _check) {
- bw.write(NumHelper.serialize(item));
- }
-
- bw.write(NumHelper.serialize(_dict.length));
- for (int item : _dict) {
- bw.write(NumHelper.serialize(item));
- }
- }
-
- /**
- * 加载, 修改于2020-08-06,使用utf-8加载,加载以前数据可能会出错
- *
- * @param filePath
- * @throws FileNotFoundException
- * @throws IOException
- */
- public void Load(String filePath) throws FileNotFoundException, IOException {
- File fi = new File(filePath);
- InputStream in = new BufferedInputStream(new FileInputStream(fi));
- Load(in);
- in.close();
- }
-
- public void Load(InputStream br) throws IOException {
- int length = NumHelper.read(br);
- _keywords = new String[length];
- for (int i = 0; i < length; i++) {
- int l = NumHelper.read(br);
- byte[] bytes = new byte[l];
- br.read(bytes, 0, l);
- _keywords[i] = new String(bytes,"utf-8");
- }
- length = NumHelper.read(br);
- _guides = new int[length][];
- for (int i = 0; i < length; i++) {
- int length2 = NumHelper.read(br);
- _guides[i] = new int[length2];
- for (int j = 0; j < length2; j++) {
- _guides[i][j] = NumHelper.read(br);
- }
- }
-
- length = NumHelper.read(br);
- _key = new int[length];
- for (int i = 0; i < length; i++) {
- _key[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _next = new int[length];
- for (int i = 0; i < length; i++) {
- _next[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _check = new int[length];
- for (int i = 0; i < length; i++) {
- _check[i] = NumHelper.read(br);
- }
-
- length = NumHelper.read(br);
- _dict = new int[length];
- for (int i = 0; i < length; i++) {
- _dict[i] = NumHelper.read(br);
- }
- }
-
- /**
- * 设置关键字
- *
- * @param keywords
- */
- public void SetKeywords(List<String> keywords) {
- _keywords = keywords.toArray(new String[0]);
-
- SetKeywords();
- }
-
- private void SetKeywords() {
- TrieNode root = new TrieNode();
- Map<Integer,List<TrieNode>> allNodeLayers=new TreeMap<Integer,List<TrieNode>>();
- for (int i = 0; i < _keywords.length; i++) {
- String p = _keywords[i];
- TrieNode nd = root;
- for (int j = 0; j < p.length(); j++) {
- nd = nd.Add(p.charAt(j));
- if (nd.Layer == 0) {
- nd.Layer = j + 1;
- if(allNodeLayers.containsKey(nd.Layer)==false){
- List<TrieNode> nodes=new ArrayList<TrieNode>();
- nodes.add(nd);
- allNodeLayers.put(nd.Layer, nodes);
- }else {
- allNodeLayers.get(nd.Layer).add(nd);
- } }
- }
- nd.SetResults(i);
- }
-
- List<TrieNode> allNode = new ArrayList<TrieNode>();
- allNode.add(root);
- for (int i = 0; i < allNodeLayers.size(); i++) { //注意 这里不能用 keySet()
- List<TrieNode> nodes = allNodeLayers.get(i+1);
- for (int j = 0; j < nodes.size(); j++) {
- allNode.add(nodes.get(j));
- }
- }
- allNodeLayers.clear();
- allNodeLayers=null;
-
-
- for (int i = 1; i < allNode.size(); i++) {
- TrieNode nd = allNode.get(i);
- nd.Index = i;
- TrieNode r = nd.Parent.Failure;
- Character c = nd.Char;
- while (r != null && !r.m_values.containsKey(c)) r = r.Failure;
- if (r == null)
- nd.Failure = root;
- else {
- nd.Failure = r.m_values.get(c);
- for (Integer result : nd.Failure.Results) {
- nd.SetResults(result);
- }
- }
- }
- root.Failure = root;
-
-
- StringBuilder stringBuilder = new StringBuilder();
- for (int i = 1; i < allNode.size(); i++) {
- stringBuilder.append(allNode.get(i).Char);
- }
- Integer length = CreateDict(stringBuilder.toString());
- stringBuilder = null;
-
- List<TrieNodeEx> allNode2 = new ArrayList<TrieNodeEx>();
- for (int i = 0; i < allNode.size(); i++) {
- TrieNodeEx nd = new TrieNodeEx();
- nd.Index = i;
- allNode2.add(nd);
- }
- for (int i = 0; i < allNode2.size(); i++) {
- TrieNode oldNode = allNode.get(i);
- TrieNodeEx newNode = allNode2.get(i);
- newNode.Char = _dict[oldNode.Char];
-
- for (Character key : oldNode.m_values.keySet()) {
- TrieNode nd = oldNode.m_values.get(key);
- newNode.Add(_dict[key], allNode2.get(nd.Index));
- }
- oldNode.Results.forEach(item -> {
- newNode.SetResults(item);
- });
- oldNode = oldNode.Failure;
- while (oldNode != root) {
- for (Character key : oldNode.m_values.keySet()) {
- if (newNode.HasKey(_dict[key]) == false) {
- TrieNode nd = oldNode.m_values.get(key);
- newNode.Add(_dict[key], allNode2.get(nd.Index));
- }
- }
- oldNode.Results.forEach(item -> {
- newNode.SetResults(item);
- });
- oldNode = oldNode.Failure;
- }
- }
- allNode.clear();
- allNode = null;
- root = null;
-
- build(allNode2, length);
- }
-
- private void build(List<TrieNodeEx> nodes, int length) {
- Integer[] has = new Integer[0x00FFFFFF];
- boolean[] seats = new boolean[0x00FFFFFF];
- boolean[] seats2 = new boolean[0x00FFFFFF];
- Integer start = 1;
- Integer oneStart = 1;
- for (int i = 0; i < nodes.size(); i++) {
- TrieNodeEx node = nodes.get(i);
- node.Rank(oneStart, start, seats, seats2, has);
- }
- Integer maxCount = has.length - 1;
- while (has[maxCount] == null) {
- maxCount--;
- }
- length = maxCount + length + 1;
-
- // length = root.Rank(has) + length + 1;
- _key = new int[length];
- _next = new int[length];
- _check = new int[length];
- List<Integer[]> guides = new ArrayList<Integer[]>();
- guides.add(new Integer[] { 0 });
- for (int i = 0; i < length; i++) {
- if (has[i] == null)
- continue;
- TrieNodeEx item = nodes.get(has[i]);
- _key[i] = item.Char;
- _next[i] = item.Next;
- if (item.End) {
- _check[i] = guides.size();
- Integer[] result = item.Results.toArray(new Integer[0]);
- guides.add(result);
- }
- }
- _guides = new int[guides.size()][];
- for (int i = 0; i < guides.size(); i++) {
- Integer[] array = guides.get(i);
- _guides[i] = new int[array.length];
- for (int j = 0; j < array.length; j++) {
- _guides[i][j] = array[j];
- }
- }
-
- }
-
- private int CreateDict(String keywords) {
- Map<Character, Integer> dictionary = new Hashtable<Character, Integer>();
- for (int i = 0; i < keywords.length(); i++) {
- Character item = keywords.charAt(i);
- if (dictionary.containsKey(item)) {
- dictionary.put(item, dictionary.get(item) + 1);
- } else {
- dictionary.put(item, 1);
- }
- }
- Map<Character, Integer> dictionary2 = dictionary.entrySet().stream()
- .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
- .collect(toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new));
-
- List<Character> list2 = new ArrayList<Character>();
- for (Character item : dictionary2.keySet()) {
- list2.add(item);
- }
-
- _dict = new int[Character.MAX_VALUE + 1];
- for (int i = 0; i < list2.size(); i++) {
- _dict[list2.get(i)] = i + 1;
- }
- return dictionary.size();
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/IntDictionary.java b/src/main/java/org/springblade/modules/words/internals/IntDictionary.java
deleted file mode 100644
index 7bbc63c..0000000
--- a/src/main/java/org/springblade/modules/words/internals/IntDictionary.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class IntDictionary {
- private int[] _keys;
- private int[] _values;
- private int last;
-
- public IntDictionary() {
- last = -1;
- }
-
- public int[] getKeys() {
- return _keys;
- }
-
- public int[] getValues() {
- return _values;
- }
-
- public void SetDictionary(Map<Integer, Integer> dict) {
-
- List<Integer> keys = new ArrayList<Integer>();
- dict.forEach((k, v) -> {
- keys.add((int) k);
- });
-
- _keys = new int[dict.size()];
- _values = new int[dict.size()];
- for (int i = 0; i < keys.size(); i++) {
- _keys[i] = keys.get(i);
- _values[i] = dict.get(_keys[i]);
- }
- last = _keys.length - 1;
- }
-
- public void SetDictionary(int[] keys, int[] values) {
- _keys = keys;
- _values = values;
- last = _keys.length - 1;
- }
-
- public int IndexOf(int key) {
- if (last == -1) {
- return -1;
- }
- if (_keys[0] == key) {
- return 0;
- }
- if (_keys[last] == key) {
- return last;
- }
-
- int left = 0;
- int right = last;
- while (left + 1 < right) {
- int mid = (left + right) >> 1;
- int d = _keys[mid] - key;
-
- if (d == 0) {
- return mid;
- } else if (d > 0) {
- right = mid;
- } else {
- left = mid;
- }
- }
- return -1;
- }
-
- public int GetValue(int index){
- return _values[index];
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/PinyinDict.java b/src/main/java/org/springblade/modules/words/internals/PinyinDict.java
deleted file mode 100644
index 96d8035..0000000
--- a/src/main/java/org/springblade/modules/words/internals/PinyinDict.java
+++ /dev/null
@@ -1,277 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import org.springblade.modules.words.WordsSearch;
-import org.springblade.modules.words.WordsSearchResult;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class PinyinDict {
- private static Map<String, Integer[]> _pyName;
- private static String[] _pyShow;
- private static Integer[] _pyIndex;
- private static Integer[] _pyData;
- private static Integer[] _wordPyIndex;
- private static Integer[] _wordPy;
- private static WordsSearch _search;
-
- public static String[] getPyShow() throws NumberFormatException, IOException {
- InitPyIndex();
- return _pyShow;
- }
-
- public static String[] GetPinyinList(String text, int tone) throws NumberFormatException, IOException {
- InitPyIndex();
- InitPyWords();
-
- String[] list = new String[text.length()];
- List<WordsSearchResult> pos = _search.FindAll(text);
- Integer pindex = -1;
-
- for (WordsSearchResult p : pos) {
- if (p.Start > pindex) {
- for (int i = 0; i < p.Keyword.length(); i++) {
- list[i + p.Start] = _pyShow[_wordPy[i + _wordPyIndex[p.Index]] + tone];
- }
- pindex = p.End;
- }
- }
-
- for (int i = 0; i < text.length(); i++) {
- if (list[i] != null)
- continue;
- Character c = text.charAt(i);
- if (c >= 0x3400 && c <= 0x9fd5) {
- int index = c - 0x3400;
- int start = _pyIndex[index];
- int end = _pyIndex[index + 1];
- if (end > start) {
- list[i] = _pyShow[_pyData[start] + tone];
- }
- }
- }
- return list;
- }
-
- public static String GetPinyin(String text, int tone) throws NumberFormatException, IOException {
- InitPyIndex();
-
- String[] list = GetPinyinList(text, tone);
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < list.length; i++) {
- String s = list[i];
- if (s != null) {
- sb.append(list[i]);
- } else {
- sb.append(text.charAt(i));
- }
- }
- return sb.toString();
- }
-
- public static String GetFirstPinyin(String text, int tone) throws NumberFormatException, IOException {
- InitPyIndex();
-
- String[] list = GetPinyinList(text, tone);
- StringBuilder sb = new StringBuilder(text);
- for (int i = 0; i < list.length; i++) {
- String c = list[i];
- if (c != null) {
- sb.setCharAt(i, c.charAt(0));
- }
- }
- return sb.toString();
- }
-
- public static List<String> GetAllPinyin(Character c, int tone) throws NumberFormatException, IOException {
- InitPyIndex();
- if (c >= 0x3400 && c <= 0x9fd5) {
- int index = c - 0x3400;
- List<String> list = new ArrayList<String>();
- int start = _pyIndex[index];
- int end = _pyIndex[index + 1];
- if (end > start) {
- for (int i = start; i < end; i++) {
- String py = _pyShow[_pyData[i] + tone];
- if (list.contains(py) == false) {
- list.add(py);
- }
- }
- }
- return list;
- }
- return new ArrayList<String>();
- }
-
- public static String GetPinyinFast(Character c, int tone) throws NumberFormatException, IOException {
- InitPyIndex();
-
- if (c >= 0x3400 && c <= 0x9fd5) {
- int index = c - 0x3400;
- int start = _pyIndex[index];
- int end = _pyIndex[index + 1];
- if (end > start) {
- return _pyShow[_pyData[start] + tone];
- }
- }
- return c.toString();
- }
-
- public static List<String> GetPinyinForName(String name, int tone) throws NumberFormatException, IOException {
- InitPyName();
- InitPyIndex();
-
- List<String> list = new ArrayList<String>();
- String xing;
- String ming;
- Integer[] indexs;
- if (name.length() > 1) { // 检查复姓
- xing = name.substring(0, 2);
- if (_pyName.containsKey(xing)) {
- indexs = _pyName.get(xing);
- for (Integer index : indexs) {
- list.add(_pyShow[index + tone]);
- }
- if (name.length() > 2) {
- ming = name.substring(2);
- String[] pys = GetPinyinList(ming, tone);
- for (String py : pys) {
- list.add(py);
- }
- }
- return list;
- }
- }
- xing = name.substring(0, 1);
- if (_pyName.containsKey(xing)) {
- indexs = _pyName.get(xing);
- for (Integer index : indexs) {
- list.add(_pyShow[index + tone]);
- }
- if (name.length() > 1) {
- ming = name.substring(1);
- String[] pys = GetPinyinList(ming, tone);
- for (String py : pys) {
- list.add(py);
- }
- }
- return list;
- }
- String[] pys = GetPinyinList(name, tone);
- for (String py : pys) {
- list.add(py);
- }
- return list;
- }
- private final static Object lockObj = new Object();
- private static void InitPyIndex() throws NumberFormatException, IOException {
- if (_pyIndex == null) {
- synchronized(lockObj){
- if (_pyIndex == null) {
- String resourceName = "pyIndex.txt";
- InputStream u1 = WordsSearch.class.getClassLoader().getResourceAsStream(resourceName);
- BufferedReader br = new BufferedReader(new InputStreamReader(u1));
-
- String tStr = "";
- List<Integer> pyIndex = new ArrayList<Integer>();
- pyIndex.add(0);
- List<Integer> pyData = new ArrayList<Integer>();
-
- while ((tStr = br.readLine()) != null) {
- if (_pyShow == null) {
- String[] ss = tStr.split(",");
- _pyShow = ss;
- } else {
- if (tStr != "0") {
- for (String idx : tStr.split(",")) {
- int in = Integer.valueOf(idx, 16);
- pyData.add(in);
- }
- }
- pyIndex.add((int) pyData.size());
- }
- }
- br.close();
-
- Integer[] pd = new Integer[pyData.size()];
- _pyData = pyData.toArray(pd);
- Integer[] pi = new Integer[pyIndex.size()];
- _pyIndex = pyIndex.toArray(pi);
- }
- }
- }
- }
-
- private static void InitPyName() throws NumberFormatException, IOException {
- if (_pyName == null) {
- synchronized(lockObj){
- if (_pyName == null) {
- String resourceName = "pyName.txt";
- InputStream u1 = WordsSearch.class.getClassLoader().getResourceAsStream(resourceName);
- BufferedReader br = new BufferedReader(new InputStreamReader(u1));
-
- Map<String, Integer[]> pyName = new HashMap<String, Integer[]>();
- String tStr = "";
- while ((tStr = br.readLine()) != null) {
- String[] sp = tStr.split(",");
- List<Integer> index = new ArrayList<Integer>();
- for (int i = 1; i < sp.length; i++) {
- String idx = sp[i];
- int in = Integer.valueOf(idx, 16);
- index.add(in);
- }
- Integer[] temp = new Integer[index.size()];
- pyName.put(sp[0], index.toArray(temp));
- }
- br.close();
-
- _pyName = pyName;
-
- }
- }
- }
- }
-
- private static void InitPyWords() throws NumberFormatException, IOException {
- if (_search == null) {
- synchronized(lockObj){
- if (_search == null) {
- String resourceName = "pyWords.txt";
- InputStream u1 = WordsSearch.class.getClassLoader().getResourceAsStream(resourceName);
- BufferedReader br = new BufferedReader(new InputStreamReader(u1));
-
- List<String> keywords = new ArrayList<String>();
- List<Integer> wordPyIndex = new ArrayList<Integer>();
- List<Integer> wordPy = new ArrayList<Integer>();
-
- String tStr = "";
- while ((tStr = br.readLine()) != null) {
- String[] sp = tStr.split(",");
- keywords.add(sp[0]);
- wordPyIndex.add(wordPy.size());
- for (int i = 1; i < sp.length; i++) {
- String idx = sp[i];
- int in = Integer.valueOf(idx, 16);
- wordPy.add(in);
- }
- }
- br.close();
- WordsSearch search = new WordsSearch();
- search.SetKeywords(keywords);
- Integer[] wp = new Integer[wordPy.size()];
- _wordPy = wordPy.toArray(wp);
- Integer[] wpi = new Integer[wordPyIndex.size()];
- _wordPyIndex = wordPyIndex.toArray(wpi);
- _search = search;
- }
- }
- }
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/Translate.java b/src/main/java/org/springblade/modules/words/internals/Translate.java
deleted file mode 100644
index 45e4822..0000000
--- a/src/main/java/org/springblade/modules/words/internals/Translate.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import org.springblade.modules.words.WordsSearch;
-import org.springblade.modules.words.WordsSearchResult;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class Translate {
- private static WordsSearch s2tSearch;
- private static WordsSearch t2sSearch;
- private static WordsSearch t2twSearch;
- private static WordsSearch tw2tSearch;
- private static WordsSearch t2hkSearch;
- private static WordsSearch hk2tSearch;
-
- /**
- * 转繁体中文
- *
- * @param text
- * @param type 0、繁体中文,1、港澳繁体,2、台湾正体
- * @return
- * @throws Exception
- */
- public static String ToTraditionalChinese(String text, final int type) throws Exception {
- if (type > 2 || type < 0) {
- throw new Exception("type 不支持该类型");
- }
-
- final WordsSearch s2t = GetWordsSearch(true, 0);
- text = TransformationReplace(text, s2t);
- if (type > 0) {
- final WordsSearch t2 = GetWordsSearch(true, type);
- text = TransformationReplace(text, t2);
- }
- return text;
- }
-
- /**
- * 转简体中文
- *
- * @param text
- * @param srcType 0、繁体中文,1、港澳繁体,2、台湾正体
- * @return
- * @throws Exception
- */
- public static String ToSimplifiedChinese(String text, final int srcType) throws Exception {
- if (srcType > 2 || srcType < 0) {
- throw new Exception("srcType 不支持该类型");
- }
- if (srcType > 0) {
- final WordsSearch t2 = GetWordsSearch(false, srcType);
- text = TransformationReplace(text, t2);
- }
- final WordsSearch s2t = GetWordsSearch(false, 0);
- text = TransformationReplace(text, s2t);
- return text;
- }
-
- /**
- * 清理 简繁转换 缓存
- */
- public static void ClearTranslate() {
- s2tSearch = null;
- t2sSearch = null;
- t2twSearch = null;
- tw2tSearch = null;
- t2hkSearch = null;
- hk2tSearch = null;
- }
-
- /**
- *
- * @param text
- * @param wordsSearch
- * @return
- */
- private static String TransformationReplace(String text, WordsSearch wordsSearch) {
- List<WordsSearchResult> ts = wordsSearch.FindAll(text);
- StringBuilder sb = new StringBuilder();
- int index = 0;
- while (index < text.length()) {
- WordsSearchResult t = null;
- int end = -1;
- for (WordsSearchResult wordsSearchResult : ts) {
- if (wordsSearchResult.Start == index) {
- if (end < wordsSearchResult.End) {
- end = wordsSearchResult.End;
- t = wordsSearchResult;
- }
- }
- }
- if (t == null) {
- sb.append(text.charAt(index));
- index++;
- } else {
- sb.append(wordsSearch._others[t.Index]);
- index = t.End + 1;
- }
- }
- return sb.toString();
- }
-
- private final static Object lockObj = new Object();
- private static WordsSearch GetWordsSearch(Boolean s2t, int srcType) throws IOException {
- if (s2t) {
- if (srcType == 0) {
- if (s2tSearch == null) {
- synchronized(lockObj){
- if (s2tSearch == null) {
- s2tSearch = BuildWordsSearch("s2t.dat", false);
- }
- }
- }
- return s2tSearch;
- } else if (srcType == 1) {
- if (t2hkSearch == null) {
- synchronized(lockObj){
- if (t2hkSearch == null) {
- t2hkSearch = BuildWordsSearch("t2hk.dat", false);
- }
- }
- }
- return t2hkSearch;
- } else if (srcType == 2) {
- if (t2twSearch == null) {
- synchronized(lockObj){
- if (t2twSearch == null) {
- t2twSearch = BuildWordsSearch("t2tw.dat", false);
- }
- }
- }
- return t2twSearch;
- }
- } else {
- if (srcType == 0) {
- if (t2sSearch == null) {
- synchronized(lockObj){
- if (t2sSearch == null) {
- t2sSearch = BuildWordsSearch("t2s.dat", false);
- }
- }
- }
- return t2sSearch;
- } else if (srcType == 1) {
- if (hk2tSearch == null) {
- synchronized(lockObj){
- if (hk2tSearch == null) {
- hk2tSearch = BuildWordsSearch("t2hk.dat", true);
- }
- }
- }
- return hk2tSearch;
- } else if (srcType == 2) {
- if (tw2tSearch == null) {
- synchronized(lockObj){
- if (tw2tSearch == null) {
- tw2tSearch = BuildWordsSearch("t2tw.dat", true);
- }
- }
- }
- return tw2tSearch;
- }
- }
- return null;
- }
-
- private static WordsSearch BuildWordsSearch(String fileName, Boolean reverse) throws IOException {
- Map<String, String> dict = GetTransformationDict(fileName);
- List<String> Keys = new ArrayList<String>();
- List<String> Values = new ArrayList<String>();
- dict.forEach((k, v) -> {
- Keys.add(k);
- Values.add(v);
- });
- WordsSearch wordsSearch = new WordsSearch();
- if (reverse) {
- wordsSearch.SetKeywords(Values);
- String[] temp = new String[Keys.size()];
- wordsSearch._others = Keys.toArray(temp);
- } else {
- wordsSearch.SetKeywords(Keys);
- String[] temp = new String[Keys.size()];
- wordsSearch._others = Values.toArray(temp);
- }
- return wordsSearch;
- }
-
- static Map<String, String> GetTransformationDict(String fileName) throws IOException {
- String resourceName = fileName;
- InputStream u1 = WordsSearch.class.getClassLoader().getResourceAsStream(resourceName);
- BufferedReader br = new BufferedReader(new InputStreamReader(u1));
-
- String tStr = "";
- Map<String, String> dict = new HashMap<String, String>();
- while ((tStr = br.readLine()) != null) {
- String[] ss = tStr.split("\t");
- if (ss.length < 2) {
- continue;
- }
- dict.put(ss[0], ss[1]);
- }
- br.close();
- return dict;
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TrieNode.java b/src/main/java/org/springblade/modules/words/internals/TrieNode.java
deleted file mode 100644
index 00def8a..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TrieNode.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class TrieNode implements Comparable<TrieNode> {
-
- public int Index;
- public int Layer;
- public boolean End;
- public char Char;
- public List<Integer> Results;
- public HashMap<Character, TrieNode> m_values;
- public TrieNode Failure;
- public TrieNode Parent;
- public boolean IsWildcard;
- public int WildcardLayer;
- public boolean HasWildcard;
-
-
- public TrieNode() {
- m_values = new HashMap<Character, TrieNode>();
- Results = new ArrayList<Integer>();
- }
-
- public TrieNode Add(final Character c) {
- if (m_values.containsKey(c)) {
- return m_values.get(c);
- }
- final TrieNode node = new TrieNode();
- node.Parent = this;
- node.Char = c;
- m_values.put(c, node);
- return node;
- }
-
- public void SetResults(final Integer index) {
- if (End == false) {
- End = true;
- }
- if (Results.contains(index) == false) {
- Results.add(index);
- }
- }
-
- @Override
- public int compareTo(final TrieNode o) {
- return this.Layer - o.Layer ;
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TrieNode2.java b/src/main/java/org/springblade/modules/words/internals/TrieNode2.java
deleted file mode 100644
index ba25aaf..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TrieNode2.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-
-public class TrieNode2{
- public boolean End;
- public List<Integer> Results;
- public HashMap<Character, TrieNode2> m_values;
- private int minflag = Integer.MAX_VALUE;
- private int maxflag = 0;
-
- public TrieNode2()
- {
- Results = new ArrayList<Integer>();
- m_values = new HashMap<Character, TrieNode2>();
- }
-
- public void Add(final char c, final TrieNode2 node3) {
- if (minflag > c) {
- minflag = c;
- }
- if (maxflag < c) {
- maxflag = c;
- }
- m_values.put(c, node3);
- }
-
- public void SetResults(final Integer index) {
- if (End == false) {
- End = true;
- }
- if (Results.contains(index) == false) {
- Results.add(index);
- }
- }
-
- public boolean HasKey(final char c) {
- if (minflag <= c && maxflag >= c) {
- return m_values.containsKey(c);
- }
- return false;
- }
-
- public TrieNode2 GetValue(final char c) {
- return m_values.get(c);
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TrieNode2Ex.java b/src/main/java/org/springblade/modules/words/internals/TrieNode2Ex.java
deleted file mode 100644
index 6ac189f..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TrieNode2Ex.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class TrieNode2Ex {
- public int Index;
- public boolean End;
- public List<Integer> Results;
- public HashMap<Integer, TrieNode2Ex> m_values;
- public int minflag = Integer.MAX_VALUE;
- public int maxflag = 0;
-
- public TrieNode2Ex()
- {
- Results = new ArrayList<Integer>();
- m_values = new HashMap<Integer, TrieNode2Ex>();
- }
-
- public void Add(final int c, final TrieNode2Ex node3) {
- if (minflag > c) {
- minflag = c;
- }
- if (maxflag < c) {
- maxflag = c;
- }
- m_values.put(c, node3);
- }
-
- public void SetResults(final int index) {
- if (End == false) {
- End = true;
- }
- if (Results.contains(index) == false) {
- Results.add(index);
- }
- }
-
- public boolean HasKey(final int c) {
- if (minflag <= c && maxflag >= c) {
- return m_values.containsKey(c);
- }
- return false;
- }
-
- public TrieNode2Ex GetValue(final int c) {
- return m_values.get(c);
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TrieNode3.java b/src/main/java/org/springblade/modules/words/internals/TrieNode3.java
deleted file mode 100644
index 2569e15..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TrieNode3.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class TrieNode3 {
- public boolean End;
- public boolean HasWildcard;
- public List<Integer> Results;
- public HashMap<Character, TrieNode3> m_values;
- private int minflag = Integer.MAX_VALUE;
- private int maxflag = 0;
- public TrieNode3 WildcardNode;
-
-
- public TrieNode3()
- {
- Results = new ArrayList<Integer>();
- m_values = new HashMap<Character, TrieNode3>();
- }
-
- public void Add(final char c, final TrieNode3 node3) {
- if (minflag > c) {
- minflag = c;
- }
- if (maxflag < c) {
- maxflag = c;
- }
- m_values.put(c, node3);
- }
-
- public void SetResults(final int index) {
- if (End == false) {
- End = true;
- }
- if (Results.contains(index) == false) {
- Results.add(index);
- }
- }
-
- public boolean HasKey(final char c) {
- if (minflag <= c && maxflag >= c) {
- return m_values.containsKey(c);
- }
- return false;
- }
-
- public TrieNode3 GetValue(final char c) {
- return m_values.get(c);
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TrieNode3Ex.java b/src/main/java/org/springblade/modules/words/internals/TrieNode3Ex.java
deleted file mode 100644
index 937ae11..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TrieNode3Ex.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class TrieNode3Ex {
- public int Index;
- public boolean End;
- public boolean HasWildcard;
- public List<Integer> Results;
- public HashMap<Character, TrieNode3Ex> m_values;
- public int minflag = Integer.MAX_VALUE;
- public int maxflag = 0;
- public TrieNode3Ex WildcardNode;
-
-
- public TrieNode3Ex()
- {
- Results = new ArrayList<Integer>();
- m_values = new HashMap<Character, TrieNode3Ex>();
- }
-
- public void Add(final char c, final TrieNode3Ex node3) {
- if (minflag > c) {
- minflag = c;
- }
- if (maxflag < c) {
- maxflag = c;
- }
- m_values.put(c, node3);
- }
-
- public void SetResults(final int index) {
- if (End == false) {
- End = true;
- }
- if (Results.contains(index) == false) {
- Results.add(index);
- }
- }
-
- public boolean HasKey(final char c) {
- if (minflag <= c && maxflag >= c) {
- return m_values.containsKey(c);
- }
- return false;
- }
-
- public TrieNode3Ex GetValue(final char c) {
- return m_values.get(c);
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TrieNodeEx.java b/src/main/java/org/springblade/modules/words/internals/TrieNodeEx.java
deleted file mode 100644
index 9ef0e51..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TrieNodeEx.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package org.springblade.modules.words.internals;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-public class TrieNodeEx {
- public Integer Char;
- public boolean End;
- public Integer Index;
- public List<Integer> Results;
- public Map<Integer, TrieNodeEx> m_values;
- private Integer minflag = Integer.MAX_VALUE;
- private Integer maxflag = 0;
- public int Next;
-
- public TrieNodeEx() {
- m_values = new Hashtable<Integer, TrieNodeEx>();
- Results = new ArrayList<Integer>();
- }
-
- public void Add(int c, TrieNodeEx node3) {
- if (minflag > c) {
- minflag = c;
- }
- if (maxflag < c) {
- maxflag = c;
- }
- m_values.put(c, node3);
- }
-
- public void SetResults(Integer text) {
- if (End == false) {
- End = true;
- }
- if (Results.contains(text) == false) {
- Results.add(text);
- }
- }
-
- public boolean HasKey(Integer c) {
- if (minflag <= c && maxflag >= c) {
- return m_values.containsKey((int) c);
- }
- return false;
- }
-
- public void Rank(Integer oneStart, Integer start, boolean[] seats, boolean[] seats2, Integer[] has) {
- if (maxflag == 0)
- return;
- if (minflag == maxflag) {
- RankOne(oneStart, seats, has);
- return;
- }
- List<Integer> keys = new ArrayList<Integer>();
- m_values.forEach((k, v) -> {
- keys.add((int) k);
- });
-
- Integer length = keys.size() - 1;
- int[] moves = new int[keys.size() - 1];
- for (int i = 1; i < keys.size(); i++) {
- moves[i - 1] = maxflag - keys.get(i);
- }
-
- while (has[start] != null) {
- start++;
- }
- Integer s = start < minflag ? minflag : start;
-
- for (int i = s; i < s + (maxflag - minflag); i++) {
- if (has[i] != null) {
- for (int j = 0; j < length; j++) {
- Integer p = i + moves[j];
- if (seats2[p] == false) {
- seats2[p] = true;
- }
- }
- }
- }
- Integer max = 0;
- for (int i = s + (maxflag - minflag); i < has.length; i++) {
- if (has[i] == null) {
- if (seats2[i]) {
- continue;
- }
- Integer next = i - (Integer) maxflag;
- if (seats[next])
- continue;
- SetSeats(next, seats, has);
- max = i;
- break;
- } else {
- for (int j = 0; j < length; j++) {
- Integer p = i + moves[j];
- if (seats2[p] == false) {
- seats2[p] = true;
- }
- }
- }
- }
- start += keys.size() / 2;
- for (int p = start; p < max + maxflag - start + 1; p++) {
- if (seats2[p] == true) {
- seats2[p] = false;
- }
- }
- }
-
- private void RankOne(Integer start, boolean[] seats, Integer[] has) {
- while (has[start] != null) {
- start++;
- }
- Integer s = start < minflag ? minflag : start;
-
- for (Integer i = s; i < has.length; i++) {
- if (has[i] == null) {
- Integer next = i - (Integer) minflag;
- if (seats[next])
- continue;
- SetSeats(next, seats, has);
- break;
- }
- }
- start++;
- }
-
-
- private void SetSeats(Integer next, boolean[] seats, Integer[] has) {
- Next = next;
- seats[next] = true;
-
- m_values.forEach((key, value) -> {
- int position = next + key;
- has[position] = value.Index;
- });
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/words/internals/TwoTuple.java b/src/main/java/org/springblade/modules/words/internals/TwoTuple.java
deleted file mode 100644
index 7548446..0000000
--- a/src/main/java/org/springblade/modules/words/internals/TwoTuple.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.springblade.modules.words.internals;
-
-public class TwoTuple<A, B> {
- public A Item1;
- public B Item2;
-
- public TwoTuple(A a, B b) {
- this.Item1 = a;
- this.Item2 = b;
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/controller/SensitivewordController.java b/src/main/java/org/springblade/modules/words/sensitiveword/controller/SensitivewordController.java
deleted file mode 100644
index af4654a..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/controller/SensitivewordController.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.words.sensitiveword.entity.Sensitiveword;
-import org.springblade.modules.words.sensitiveword.service.ISensitivewordService;
-import org.springblade.modules.words.sensitiveword.vo.SensitivewordVO;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * 控制器
- *
- * @author BladeX
- * @since 2022-01-04
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("/sensitiveword")
-@Api(value = "", tags = "接口")
-public class SensitivewordController extends BladeController {
-
- private final ISensitivewordService sensitivewordService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入sensitiveword")
- public R<Sensitiveword> detail(Sensitiveword sensitiveword) {
- Sensitiveword detail = sensitivewordService.getOne(Condition.getQueryWrapper(sensitiveword));
- return R.data(detail);
- }
-
- /**
- * 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入sensitiveword")
- public R<IPage<Sensitiveword>> list(Sensitiveword sensitiveword, Query query) {
- IPage<Sensitiveword> pages = sensitivewordService.page(Condition.getPage(query), Condition.getQueryWrapper(sensitiveword));
- return R.data(pages);
- }
-
- /**
- * 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入sensitiveword")
- public R<IPage<SensitivewordVO>> page(SensitivewordVO sensitiveword, Query query) {
- IPage<SensitivewordVO> pages = sensitivewordService.selectSensitivewordPage(Condition.getPage(query), sensitiveword);
- return R.data(pages);
- }
-
- /**
- * 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入sensitiveword")
- public R save(@Valid @RequestBody Sensitiveword sensitiveword) {
- return R.status(sensitivewordService.save(sensitiveword));
- }
-
- /**
- * 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入sensitiveword")
- public R update(@Valid @RequestBody Sensitiveword sensitiveword) {
- return R.status(sensitivewordService.updateById(sensitiveword));
- }
-
- /**
- * 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入sensitiveword")
- public R submit(@Valid @RequestBody Sensitiveword sensitiveword) {
- return R.status(sensitivewordService.saveOrUpdate(sensitiveword));
- }
-
-
- /**
- * 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(sensitivewordService.removeByIds(Func.toLongList(ids)));
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/dto/SensitivewordDTO.java b/src/main/java/org/springblade/modules/words/sensitiveword/dto/SensitivewordDTO.java
deleted file mode 100644
index e208730..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/dto/SensitivewordDTO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.words.sensitiveword.entity.Sensitiveword;
-
-/**
- * 数据传输对象实体类
- *
- * @author BladeX
- * @since 2022-01-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SensitivewordDTO extends Sensitiveword {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/entity/Sensitiveword.java b/src/main/java/org/springblade/modules/words/sensitiveword/entity/Sensitiveword.java
deleted file mode 100644
index 9d66549..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/entity/Sensitiveword.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * 实体类
- *
- * @author BladeX
- * @since 2022-01-04
- */
-@Data
-@TableName("jczz_sensitiveword")
-@ApiModel(value = "Sensitiveword对象", description = "Sensitiveword对象")
-public class Sensitiveword implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
- private String badword;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/mapper/SensitivewordMapper.java b/src/main/java/org/springblade/modules/words/sensitiveword/mapper/SensitivewordMapper.java
deleted file mode 100644
index 960b0a2..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/mapper/SensitivewordMapper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.words.sensitiveword.entity.Sensitiveword;
-import org.springblade.modules.words.sensitiveword.vo.SensitivewordVO;
-
-import java.util.List;
-
-/**
- * Mapper 接口
- *
- * @author BladeX
- * @since 2022-01-04
- */
-public interface SensitivewordMapper extends BaseMapper<Sensitiveword> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param sensitiveword
- * @return
- */
- List<SensitivewordVO> selectSensitivewordPage(IPage page, SensitivewordVO sensitiveword);
-
- /**
- * 查询所有的敏感词数据集合
- * @return
- */
- List<String> getBadSensitivewordList();
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/mapper/SensitivewordMapper.xml b/src/main/java/org/springblade/modules/words/sensitiveword/mapper/SensitivewordMapper.xml
deleted file mode 100644
index 0751069..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/mapper/SensitivewordMapper.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.words.sensitiveword.mapper.SensitivewordMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="sensitivewordResultMap" type="org.springblade.modules.words.sensitiveword.entity.Sensitiveword">
- <id column="id" property="id"/>
- <result column="badword" property="badword"/>
- </resultMap>
-
-
- <select id="selectSensitivewordPage" resultMap="sensitivewordResultMap">
- select * from sys_sensitiveword where is_deleted = 0
- </select>
-
- <!--查询所有的敏感词数据集合-->
- <select id="getBadSensitivewordList" resultType="java.lang.String">
- select badword from sys_sensitiveword where 1=1
- </select>
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/service/ISensitivewordService.java b/src/main/java/org/springblade/modules/words/sensitiveword/service/ISensitivewordService.java
deleted file mode 100644
index 3681925..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/service/ISensitivewordService.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.words.sensitiveword.entity.Sensitiveword;
-import org.springblade.modules.words.sensitiveword.vo.SensitivewordVO;
-
-import java.util.List;
-
-/**
- * 服务类
- *
- * @author BladeX
- * @since 2022-01-04
- */
-public interface ISensitivewordService extends IService<Sensitiveword> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param sensitiveword
- * @return
- */
- IPage<SensitivewordVO> selectSensitivewordPage(IPage<SensitivewordVO> page, SensitivewordVO sensitiveword);
-
- /**
- * 查询所有的敏感词数据集合
- * @return
- */
- List<String> getBadSensitivewordList();
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/service/impl/SensitivewordServiceImpl.java b/src/main/java/org/springblade/modules/words/sensitiveword/service/impl/SensitivewordServiceImpl.java
deleted file mode 100644
index bd3d967..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/service/impl/SensitivewordServiceImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.service.impl;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.words.sensitiveword.entity.Sensitiveword;
-import org.springblade.modules.words.sensitiveword.mapper.SensitivewordMapper;
-import org.springblade.modules.words.sensitiveword.service.ISensitivewordService;
-import org.springblade.modules.words.sensitiveword.vo.SensitivewordVO;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 服务实现类
- *
- * @author BladeX
- * @since 2022-01-04
- */
-@Service
-public class SensitivewordServiceImpl extends ServiceImpl<SensitivewordMapper, Sensitiveword> implements ISensitivewordService {
-
- @Override
- public IPage<SensitivewordVO> selectSensitivewordPage(IPage<SensitivewordVO> page, SensitivewordVO sensitiveword) {
- return page.setRecords(baseMapper.selectSensitivewordPage(page, sensitiveword));
- }
-
- /**
- * 查询所有的敏感词数据集合
- * @return
- */
- @Override
- public List<String> getBadSensitivewordList() {
- return baseMapper.getBadSensitivewordList();
- }
-}
diff --git a/src/main/java/org/springblade/modules/words/sensitiveword/vo/SensitivewordVO.java b/src/main/java/org/springblade/modules/words/sensitiveword/vo/SensitivewordVO.java
deleted file mode 100644
index c924213..0000000
--- a/src/main/java/org/springblade/modules/words/sensitiveword/vo/SensitivewordVO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang 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.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.words.sensitiveword.vo;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.words.sensitiveword.entity.Sensitiveword;
-
-/**
- * 视图实体类
- *
- * @author BladeX
- * @since 2022-01-04
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "SensitivewordVO对象", description = "SensitivewordVO对象")
-public class SensitivewordVO extends Sensitiveword {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/xxljob/config/XxlJobConfig.java b/src/main/java/org/springblade/xxljob/config/XxlJobConfig.java
deleted file mode 100644
index bb9cc1f..0000000
--- a/src/main/java/org/springblade/xxljob/config/XxlJobConfig.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.springblade.xxljob.config;
-
-import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * xxl-job config
- *
- * @author liyh
- */
-@Configuration(proxyBeanMethods = false)
-@ConditionalOnProperty(value = "xxl.enabled")
-public class XxlJobConfig {
- private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
-
- @Value("${xxl.job.admin.addresses}")
- private String adminAddresses;
-
- @Value("${xxl.job.accessToken}")
- private String accessToken;
-
- @Value("${xxl.job.executor.appname}")
- private String appname;
-
- @Value("${xxl.job.executor.address}")
- private String address;
-
- @Value("${xxl.job.executor.ip}")
- private String ip;
-
- @Value("${xxl.job.executor.port}")
- private int port;
-
- @Value("${xxl.job.executor.logpath}")
- private String logPath;
-
- @Value("${xxl.job.executor.logretentiondays}")
- private int logRetentionDays;
-
- @Bean
- public XxlJobSpringExecutor xxlJobExecutor() {
- logger.info(">>>>>>>>>>> xxl-job config init.");
- XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
- xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
- xxlJobSpringExecutor.setAppname(appname);
- xxlJobSpringExecutor.setAddress(address);
- xxlJobSpringExecutor.setIp(ip);
- xxlJobSpringExecutor.setPort(port);
- xxlJobSpringExecutor.setAccessToken(accessToken);
- xxlJobSpringExecutor.setLogPath(logPath);
- xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
-
- return xxlJobSpringExecutor;
- }
-
-}
diff --git a/src/main/java/org/springblade/xxljob/controller/JobInfoController.java b/src/main/java/org/springblade/xxljob/controller/JobInfoController.java
deleted file mode 100644
index 4bcd86d..0000000
--- a/src/main/java/org/springblade/xxljob/controller/JobInfoController.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.springblade.xxljob.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.xxljob.entity.JobInfoEntity;
-import org.springblade.xxljob.vo.JobInfoVO;
-import org.springblade.xxljob.wrapper.JobInfoWrapper;
-import org.springblade.xxljob.service.IJobInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 调度任务信息表 控制器
- *
- * @author BladeX
- * @since 2024-01-10
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("blade-jobInfo/jobInfo")
-@Api(value = "调度任务信息表", tags = "调度任务信息表接口")
-public class JobInfoController{
-
- private final IJobInfoService jobInfoService;
-
- /**
- * 调度任务信息表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @ApiOperation(value = "详情", notes = "传入jobInfo")
- public R<JobInfoEntity> detail(JobInfoEntity jobInfo) {
- JobInfoEntity detail = jobInfoService.getOne(Condition.getQueryWrapper(jobInfo));
- return R.data(detail);
- }
- /**
- * 调度任务信息表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入jobInfo")
- public R<IPage<JobInfoVO>> list(JobInfoEntity jobInfo, Query query) {
- IPage<JobInfoEntity> pages = jobInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(jobInfo));
- return R.data(JobInfoWrapper.build().pageVO(pages));
- }
-
- /**
- * 调度任务信息表 自定义分页
- */
- @GetMapping("/page")
- @ApiOperationSupport(order = 3)
- @ApiOperation(value = "分页", notes = "传入jobInfo")
- public R<IPage<JobInfoVO>> page(JobInfoVO jobInfo, Query query) {
- IPage<JobInfoVO> pages = jobInfoService.selectJobInfoPage(Condition.getPage(query), jobInfo);
- return R.data(pages);
- }
-
- /**
- * 调度任务信息表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入jobInfo")
- public R save(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.save(jobInfo));
- }
-
- /**
- * 调度任务信息表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入jobInfo")
- public R update(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.updateById(jobInfo));
- }
-
- /**
- * 调度任务信息表 修改
- */
- @PostMapping("/updateJob")
- @ApiOperationSupport(order = 8)
- @ApiOperation(value = "修改", notes = "传入jobInfo")
- public R updateJob(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.updateJob(jobInfo));
- }
-
-
- /**
- * 调度任务信息表 新增
- */
- @PostMapping("/addJob")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "修改", notes = "传入jobInfo")
- public R addJob(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.addJob(jobInfo));
- }
-
- /**
- * 调度任务信息表 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 6)
- @ApiOperation(value = "新增或修改", notes = "传入jobInfo")
- public R submit(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.saveOrUpdate(jobInfo));
- }
-
- /**
- * 调度任务信息表 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 7)
- @ApiOperation(value = "逻辑删除", notes = "传入ids")
- public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(jobInfoService.removeByIds(Func.toIntList(ids)));
- }
-
-
- /**
- * 调度任务信息表 启动
- */
- @PostMapping("/start")
- @ApiOperationSupport(order = 10)
- @ApiOperation(value = "启动", notes = "传入jobInfo")
- public R start(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.start(jobInfo));
- }
-
-
- /**
- * 调度任务信息表 停止
- */
- @PostMapping("/stop")
- @ApiOperationSupport(order = 11)
- @ApiOperation(value = "停止", notes = "传入jobInfo")
- public R stop(@Valid @RequestBody JobInfoEntity jobInfo) {
- return R.status(jobInfoService.stop(jobInfo));
- }
-
-
-}
diff --git a/src/main/java/org/springblade/xxljob/cron/CronExpression.java b/src/main/java/org/springblade/xxljob/cron/CronExpression.java
deleted file mode 100644
index 4781f36..0000000
--- a/src/main/java/org/springblade/xxljob/cron/CronExpression.java
+++ /dev/null
@@ -1,1402 +0,0 @@
-package org.springblade.xxljob.cron;
-
-import java.io.Serializable;
-import java.text.ParseException;
-import java.util.*;
-
-public final class CronExpression implements Serializable, Cloneable {
-
- private static final long serialVersionUID = 12423409423L;
-
- protected static final int SECOND = 0;
- protected static final int MINUTE = 1;
- protected static final int HOUR = 2;
- protected static final int DAY_OF_MONTH = 3;
- protected static final int MONTH = 4;
- protected static final int DAY_OF_WEEK = 5;
- protected static final int YEAR = 6;
- protected static final int ALL_SPEC_INT = 99; // '*'
- protected static final int NO_SPEC_INT = 98; // '?'
- protected static final Integer ALL_SPEC = ALL_SPEC_INT;
- protected static final Integer NO_SPEC = NO_SPEC_INT;
-
- protected static final Map<String, Integer> monthMap = new HashMap<String, Integer>(20);
- protected static final Map<String, Integer> dayMap = new HashMap<String, Integer>(60);
-
- static {
- monthMap.put("JAN", 0);
- monthMap.put("FEB", 1);
- monthMap.put("MAR", 2);
- monthMap.put("APR", 3);
- monthMap.put("MAY", 4);
- monthMap.put("JUN", 5);
- monthMap.put("JUL", 6);
- monthMap.put("AUG", 7);
- monthMap.put("SEP", 8);
- monthMap.put("OCT", 9);
- monthMap.put("NOV", 10);
- monthMap.put("DEC", 11);
-
- dayMap.put("SUN", 1);
- dayMap.put("MON", 2);
- dayMap.put("TUE", 3);
- dayMap.put("WED", 4);
- dayMap.put("THU", 5);
- dayMap.put("FRI", 6);
- dayMap.put("SAT", 7);
- }
-
- private final String cronExpression;
- private TimeZone timeZone = null;
- protected transient TreeSet<Integer> seconds;
- protected transient TreeSet<Integer> minutes;
- protected transient TreeSet<Integer> hours;
- protected transient TreeSet<Integer> daysOfMonth;
- protected transient TreeSet<Integer> months;
- protected transient TreeSet<Integer> daysOfWeek;
- protected transient TreeSet<Integer> years;
-
- protected transient boolean lastdayOfWeek = false;
- protected transient int nthdayOfWeek = 0;
- protected transient boolean lastdayOfMonth = false;
- protected transient boolean nearestWeekday = false;
- protected transient int lastdayOffset = 0;
- protected transient boolean expressionParsed = false;
-
- public static final int MAX_YEAR = Calendar.getInstance().get(Calendar.YEAR) + 100;
-
- public CronExpression(String cronExpression) throws ParseException {
- if (cronExpression == null) {
- throw new IllegalArgumentException("cronExpression cannot be null");
- }
-
- this.cronExpression = cronExpression.toUpperCase(Locale.US);
-
- buildExpression(this.cronExpression);
- }
-
- public CronExpression(CronExpression expression) {
- this.cronExpression = expression.getCronExpression();
- try {
- buildExpression(cronExpression);
- } catch (ParseException ex) {
- throw new AssertionError();
- }
- if (expression.getTimeZone() != null) {
- setTimeZone((TimeZone) expression.getTimeZone().clone());
- }
- }
- public boolean isSatisfiedBy(Date date) {
- Calendar testDateCal = Calendar.getInstance(getTimeZone());
- testDateCal.setTime(date);
- testDateCal.set(Calendar.MILLISECOND, 0);
- Date originalDate = testDateCal.getTime();
-
- testDateCal.add(Calendar.SECOND, -1);
-
- Date timeAfter = getTimeAfter(testDateCal.getTime());
-
- return ((timeAfter != null) && (timeAfter.equals(originalDate)));
- }
-
- public Date getNextValidTimeAfter(Date date) {
- return getTimeAfter(date);
- }
-
- public Date getNextInvalidTimeAfter(Date date) {
- long difference = 1000;
-
- //move back to the nearest second so differences will be accurate
- Calendar adjustCal = Calendar.getInstance(getTimeZone());
- adjustCal.setTime(date);
- adjustCal.set(Calendar.MILLISECOND, 0);
- Date lastDate = adjustCal.getTime();
-
- Date newDate;
-
- //FUTURE_TODO: (QUARTZ-481) IMPROVE THIS! The following is a BAD solution to this problem. Performance will be very bad here, depending on the cron expression. It is, however A solution.
-
- //keep getting the next included time until it's farther than one second
- // apart. At that point, lastDate is the last valid fire time. We return
- // the second immediately following it.
- while (difference == 1000) {
- newDate = getTimeAfter(lastDate);
- if (newDate == null)
- break;
-
- difference = newDate.getTime() - lastDate.getTime();
-
- if (difference == 1000) {
- lastDate = newDate;
- }
- }
-
- return new Date(lastDate.getTime() + 1000);
- }
-
- public TimeZone getTimeZone() {
- if (timeZone == null) {
- timeZone = TimeZone.getDefault();
- }
-
- return timeZone;
- }
-
- public void setTimeZone(TimeZone timeZone) {
- this.timeZone = timeZone;
- }
-
- @Override
- public String toString() {
- return cronExpression;
- }
-
- public static boolean isValidExpression(String cronExpression) {
-
- try {
- new CronExpression(cronExpression);
- } catch (ParseException pe) {
- return false;
- }
-
- return true;
- }
-
- public static void validateExpression(String cronExpression) throws ParseException {
-
- new CronExpression(cronExpression);
- }
-
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Expression Parsing Functions
- //
- ////////////////////////////////////////////////////////////////////////////
-
- protected void buildExpression(String expression) throws ParseException {
- expressionParsed = true;
-
- try {
-
- if (seconds == null) {
- seconds = new TreeSet<Integer>();
- }
- if (minutes == null) {
- minutes = new TreeSet<Integer>();
- }
- if (hours == null) {
- hours = new TreeSet<Integer>();
- }
- if (daysOfMonth == null) {
- daysOfMonth = new TreeSet<Integer>();
- }
- if (months == null) {
- months = new TreeSet<Integer>();
- }
- if (daysOfWeek == null) {
- daysOfWeek = new TreeSet<Integer>();
- }
- if (years == null) {
- years = new TreeSet<Integer>();
- }
-
- int exprOn = SECOND;
-
- StringTokenizer exprsTok = new StringTokenizer(expression, " \t",
- false);
-
- while (exprsTok.hasMoreTokens() && exprOn <= YEAR) {
- String expr = exprsTok.nextToken().trim();
-
- // throw an exception if L is used with other days of the month
- if (exprOn == DAY_OF_MONTH && expr.indexOf('L') != -1 && expr.length() > 1 && expr.contains(",")) {
- throw new ParseException("Support for specifying 'L' and 'LW' with other days of the month is not implemented", -1);
- }
- // throw an exception if L is used with other days of the week
- if (exprOn == DAY_OF_WEEK && expr.indexOf('L') != -1 && expr.length() > 1 && expr.contains(",")) {
- throw new ParseException("Support for specifying 'L' with other days of the week is not implemented", -1);
- }
- if (exprOn == DAY_OF_WEEK && expr.indexOf('#') != -1 && expr.indexOf('#', expr.indexOf('#') + 1) != -1) {
- throw new ParseException("Support for specifying multiple \"nth\" days is not implemented.", -1);
- }
-
- StringTokenizer vTok = new StringTokenizer(expr, ",");
- while (vTok.hasMoreTokens()) {
- String v = vTok.nextToken();
- storeExpressionVals(0, v, exprOn);
- }
-
- exprOn++;
- }
-
- if (exprOn <= DAY_OF_WEEK) {
- throw new ParseException("Unexpected end of expression.",
- expression.length());
- }
-
- if (exprOn <= YEAR) {
- storeExpressionVals(0, "*", YEAR);
- }
-
- TreeSet<Integer> dow = getSet(DAY_OF_WEEK);
- TreeSet<Integer> dom = getSet(DAY_OF_MONTH);
-
- // Copying the logic from the UnsupportedOperationException below
- boolean dayOfMSpec = !dom.contains(NO_SPEC);
- boolean dayOfWSpec = !dow.contains(NO_SPEC);
-
- if (!dayOfMSpec || dayOfWSpec) {
- if (!dayOfWSpec || dayOfMSpec) {
- throw new ParseException(
- "Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.", 0);
- }
- }
- } catch (ParseException pe) {
- throw pe;
- } catch (Exception e) {
- throw new ParseException("Illegal cron expression format ("
- + e.toString() + ")", 0);
- }
- }
-
- protected int storeExpressionVals(int pos, String s, int type)
- throws ParseException {
-
- int incr = 0;
- int i = skipWhiteSpace(pos, s);
- if (i >= s.length()) {
- return i;
- }
- char c = s.charAt(i);
- if ((c >= 'A') && (c <= 'Z') && (!s.equals("L")) && (!s.equals("LW")) && (!s.matches("^L-[0-9]*[W]?"))) {
- String sub = s.substring(i, i + 3);
- int sval = -1;
- int eval = -1;
- if (type == MONTH) {
- sval = getMonthNumber(sub) + 1;
- if (sval <= 0) {
- throw new ParseException("Invalid Month value: '" + sub + "'", i);
- }
- if (s.length() > i + 3) {
- c = s.charAt(i + 3);
- if (c == '-') {
- i += 4;
- sub = s.substring(i, i + 3);
- eval = getMonthNumber(sub) + 1;
- if (eval <= 0) {
- throw new ParseException("Invalid Month value: '" + sub + "'", i);
- }
- }
- }
- } else if (type == DAY_OF_WEEK) {
- sval = getDayOfWeekNumber(sub);
- if (sval < 0) {
- throw new ParseException("Invalid Day-of-Week value: '"
- + sub + "'", i);
- }
- if (s.length() > i + 3) {
- c = s.charAt(i + 3);
- if (c == '-') {
- i += 4;
- sub = s.substring(i, i + 3);
- eval = getDayOfWeekNumber(sub);
- if (eval < 0) {
- throw new ParseException(
- "Invalid Day-of-Week value: '" + sub
- + "'", i);
- }
- } else if (c == '#') {
- try {
- i += 4;
- nthdayOfWeek = Integer.parseInt(s.substring(i));
- if (nthdayOfWeek < 1 || nthdayOfWeek > 5) {
- throw new Exception();
- }
- } catch (Exception e) {
- throw new ParseException(
- "A numeric value between 1 and 5 must follow the '#' option",
- i);
- }
- } else if (c == 'L') {
- lastdayOfWeek = true;
- i++;
- }
- }
-
- } else {
- throw new ParseException(
- "Illegal characters for this position: '" + sub + "'",
- i);
- }
- if (eval != -1) {
- incr = 1;
- }
- addToSet(sval, eval, incr, type);
- return (i + 3);
- }
-
- if (c == '?') {
- i++;
- if ((i + 1) < s.length()
- && (s.charAt(i) != ' ' && s.charAt(i + 1) != '\t')) {
- throw new ParseException("Illegal character after '?': "
- + s.charAt(i), i);
- }
- if (type != DAY_OF_WEEK && type != DAY_OF_MONTH) {
- throw new ParseException(
- "'?' can only be specified for Day-of-Month or Day-of-Week.",
- i);
- }
- if (type == DAY_OF_WEEK && !lastdayOfMonth) {
- int val = daysOfMonth.last();
- if (val == NO_SPEC_INT) {
- throw new ParseException(
- "'?' can only be specified for Day-of-Month -OR- Day-of-Week.",
- i);
- }
- }
-
- addToSet(NO_SPEC_INT, -1, 0, type);
- return i;
- }
-
- if (c == '*' || c == '/') {
- if (c == '*' && (i + 1) >= s.length()) {
- addToSet(ALL_SPEC_INT, -1, incr, type);
- return i + 1;
- } else if (c == '/'
- && ((i + 1) >= s.length() || s.charAt(i + 1) == ' ' || s
- .charAt(i + 1) == '\t')) {
- throw new ParseException("'/' must be followed by an integer.", i);
- } else if (c == '*') {
- i++;
- }
- c = s.charAt(i);
- if (c == '/') { // is an increment specified?
- i++;
- if (i >= s.length()) {
- throw new ParseException("Unexpected end of string.", i);
- }
-
- incr = getNumericValue(s, i);
-
- i++;
- if (incr > 10) {
- i++;
- }
- checkIncrementRange(incr, type, i);
- } else {
- incr = 1;
- }
-
- addToSet(ALL_SPEC_INT, -1, incr, type);
- return i;
- } else if (c == 'L') {
- i++;
- if (type == DAY_OF_MONTH) {
- lastdayOfMonth = true;
- }
- if (type == DAY_OF_WEEK) {
- addToSet(7, 7, 0, type);
- }
- if (type == DAY_OF_MONTH && s.length() > i) {
- c = s.charAt(i);
- if (c == '-') {
- ValueSet vs = getValue(0, s, i + 1);
- lastdayOffset = vs.value;
- if (lastdayOffset > 30)
- throw new ParseException("Offset from last day must be <= 30", i + 1);
- i = vs.pos;
- }
- if (s.length() > i) {
- c = s.charAt(i);
- if (c == 'W') {
- nearestWeekday = true;
- i++;
- }
- }
- }
- return i;
- } else if (c >= '0' && c <= '9') {
- int val = Integer.parseInt(String.valueOf(c));
- i++;
- if (i >= s.length()) {
- addToSet(val, -1, -1, type);
- } else {
- c = s.charAt(i);
- if (c >= '0' && c <= '9') {
- ValueSet vs = getValue(val, s, i);
- val = vs.value;
- i = vs.pos;
- }
- i = checkNext(i, s, val, type);
- return i;
- }
- } else {
- throw new ParseException("Unexpected character: " + c, i);
- }
-
- return i;
- }
-
- private void checkIncrementRange(int incr, int type, int idxPos) throws ParseException {
- if (incr > 59 && (type == SECOND || type == MINUTE)) {
- throw new ParseException("Increment > 60 : " + incr, idxPos);
- } else if (incr > 23 && (type == HOUR)) {
- throw new ParseException("Increment > 24 : " + incr, idxPos);
- } else if (incr > 31 && (type == DAY_OF_MONTH)) {
- throw new ParseException("Increment > 31 : " + incr, idxPos);
- } else if (incr > 7 && (type == DAY_OF_WEEK)) {
- throw new ParseException("Increment > 7 : " + incr, idxPos);
- } else if (incr > 12 && (type == MONTH)) {
- throw new ParseException("Increment > 12 : " + incr, idxPos);
- }
- }
-
- protected int checkNext(int pos, String s, int val, int type)
- throws ParseException {
-
- int end = -1;
- int i = pos;
-
- if (i >= s.length()) {
- addToSet(val, end, -1, type);
- return i;
- }
-
- char c = s.charAt(pos);
-
- if (c == 'L') {
- if (type == DAY_OF_WEEK) {
- if (val < 1 || val > 7)
- throw new ParseException("Day-of-Week values must be between 1 and 7", -1);
- lastdayOfWeek = true;
- } else {
- throw new ParseException("'L' option is not valid here. (pos=" + i + ")", i);
- }
- TreeSet<Integer> set = getSet(type);
- set.add(val);
- i++;
- return i;
- }
-
- if (c == 'W') {
- if (type == DAY_OF_MONTH) {
- nearestWeekday = true;
- } else {
- throw new ParseException("'W' option is not valid here. (pos=" + i + ")", i);
- }
- if (val > 31)
- throw new ParseException("The 'W' option does not make sense with values larger than 31 (max number of days in a month)", i);
- TreeSet<Integer> set = getSet(type);
- set.add(val);
- i++;
- return i;
- }
-
- if (c == '#') {
- if (type != DAY_OF_WEEK) {
- throw new ParseException("'#' option is not valid here. (pos=" + i + ")", i);
- }
- i++;
- try {
- nthdayOfWeek = Integer.parseInt(s.substring(i));
- if (nthdayOfWeek < 1 || nthdayOfWeek > 5) {
- throw new Exception();
- }
- } catch (Exception e) {
- throw new ParseException(
- "A numeric value between 1 and 5 must follow the '#' option",
- i);
- }
-
- TreeSet<Integer> set = getSet(type);
- set.add(val);
- i++;
- return i;
- }
-
- if (c == '-') {
- i++;
- c = s.charAt(i);
- int v = Integer.parseInt(String.valueOf(c));
- end = v;
- i++;
- if (i >= s.length()) {
- addToSet(val, end, 1, type);
- return i;
- }
- c = s.charAt(i);
- if (c >= '0' && c <= '9') {
- ValueSet vs = getValue(v, s, i);
- end = vs.value;
- i = vs.pos;
- }
- if (i < s.length() && ((c = s.charAt(i)) == '/')) {
- i++;
- c = s.charAt(i);
- int v2 = Integer.parseInt(String.valueOf(c));
- i++;
- if (i >= s.length()) {
- addToSet(val, end, v2, type);
- return i;
- }
- c = s.charAt(i);
- if (c >= '0' && c <= '9') {
- ValueSet vs = getValue(v2, s, i);
- int v3 = vs.value;
- addToSet(val, end, v3, type);
- i = vs.pos;
- return i;
- } else {
- addToSet(val, end, v2, type);
- return i;
- }
- } else {
- addToSet(val, end, 1, type);
- return i;
- }
- }
-
- if (c == '/') {
- if ((i + 1) >= s.length() || s.charAt(i + 1) == ' ' || s.charAt(i + 1) == '\t') {
- throw new ParseException("'/' must be followed by an integer.", i);
- }
-
- i++;
- c = s.charAt(i);
- int v2 = Integer.parseInt(String.valueOf(c));
- i++;
- if (i >= s.length()) {
- checkIncrementRange(v2, type, i);
- addToSet(val, end, v2, type);
- return i;
- }
- c = s.charAt(i);
- if (c >= '0' && c <= '9') {
- ValueSet vs = getValue(v2, s, i);
- int v3 = vs.value;
- checkIncrementRange(v3, type, i);
- addToSet(val, end, v3, type);
- i = vs.pos;
- return i;
- } else {
- throw new ParseException("Unexpected character '" + c + "' after '/'", i);
- }
- }
-
- addToSet(val, end, 0, type);
- i++;
- return i;
- }
-
- public String getCronExpression() {
- return cronExpression;
- }
-
- public String getExpressionSummary() {
- StringBuilder buf = new StringBuilder();
-
- buf.append("seconds: ");
- buf.append(getExpressionSetSummary(seconds));
- buf.append("\n");
- buf.append("minutes: ");
- buf.append(getExpressionSetSummary(minutes));
- buf.append("\n");
- buf.append("hours: ");
- buf.append(getExpressionSetSummary(hours));
- buf.append("\n");
- buf.append("daysOfMonth: ");
- buf.append(getExpressionSetSummary(daysOfMonth));
- buf.append("\n");
- buf.append("months: ");
- buf.append(getExpressionSetSummary(months));
- buf.append("\n");
- buf.append("daysOfWeek: ");
- buf.append(getExpressionSetSummary(daysOfWeek));
- buf.append("\n");
- buf.append("lastdayOfWeek: ");
- buf.append(lastdayOfWeek);
- buf.append("\n");
- buf.append("nearestWeekday: ");
- buf.append(nearestWeekday);
- buf.append("\n");
- buf.append("NthDayOfWeek: ");
- buf.append(nthdayOfWeek);
- buf.append("\n");
- buf.append("lastdayOfMonth: ");
- buf.append(lastdayOfMonth);
- buf.append("\n");
- buf.append("years: ");
- buf.append(getExpressionSetSummary(years));
- buf.append("\n");
-
- return buf.toString();
- }
-
- protected String getExpressionSetSummary(Set<Integer> set) {
-
- if (set.contains(NO_SPEC)) {
- return "?";
- }
- if (set.contains(ALL_SPEC)) {
- return "*";
- }
-
- StringBuilder buf = new StringBuilder();
-
- Iterator<Integer> itr = set.iterator();
- boolean first = true;
- while (itr.hasNext()) {
- Integer iVal = itr.next();
- String val = iVal.toString();
- if (!first) {
- buf.append(",");
- }
- buf.append(val);
- first = false;
- }
-
- return buf.toString();
- }
-
- protected String getExpressionSetSummary(ArrayList<Integer> list) {
-
- if (list.contains(NO_SPEC)) {
- return "?";
- }
- if (list.contains(ALL_SPEC)) {
- return "*";
- }
-
- StringBuilder buf = new StringBuilder();
-
- Iterator<Integer> itr = list.iterator();
- boolean first = true;
- while (itr.hasNext()) {
- Integer iVal = itr.next();
- String val = iVal.toString();
- if (!first) {
- buf.append(",");
- }
- buf.append(val);
- first = false;
- }
-
- return buf.toString();
- }
-
- protected int skipWhiteSpace(int i, String s) {
- for (; i < s.length() && (s.charAt(i) == ' ' || s.charAt(i) == '\t'); i++) {
- }
-
- return i;
- }
-
- protected int findNextWhiteSpace(int i, String s) {
- for (; i < s.length() && (s.charAt(i) != ' ' || s.charAt(i) != '\t'); i++) {
- }
-
- return i;
- }
-
- protected void addToSet(int val, int end, int incr, int type)
- throws ParseException {
-
- TreeSet<Integer> set = getSet(type);
-
- if (type == SECOND || type == MINUTE) {
- if ((val < 0 || val > 59 || end > 59) && (val != ALL_SPEC_INT)) {
- throw new ParseException(
- "Minute and Second values must be between 0 and 59",
- -1);
- }
- } else if (type == HOUR) {
- if ((val < 0 || val > 23 || end > 23) && (val != ALL_SPEC_INT)) {
- throw new ParseException(
- "Hour values must be between 0 and 23", -1);
- }
- } else if (type == DAY_OF_MONTH) {
- if ((val < 1 || val > 31 || end > 31) && (val != ALL_SPEC_INT)
- && (val != NO_SPEC_INT)) {
- throw new ParseException(
- "Day of month values must be between 1 and 31", -1);
- }
- } else if (type == MONTH) {
- if ((val < 1 || val > 12 || end > 12) && (val != ALL_SPEC_INT)) {
- throw new ParseException(
- "Month values must be between 1 and 12", -1);
- }
- } else if (type == DAY_OF_WEEK) {
- if ((val == 0 || val > 7 || end > 7) && (val != ALL_SPEC_INT)
- && (val != NO_SPEC_INT)) {
- throw new ParseException(
- "Day-of-Week values must be between 1 and 7", -1);
- }
- }
-
- if ((incr == 0 || incr == -1) && val != ALL_SPEC_INT) {
- if (val != -1) {
- set.add(val);
- } else {
- set.add(NO_SPEC);
- }
-
- return;
- }
-
- int startAt = val;
- int stopAt = end;
-
- if (val == ALL_SPEC_INT && incr <= 0) {
- incr = 1;
- set.add(ALL_SPEC); // put in a marker, but also fill values
- }
-
- if (type == SECOND || type == MINUTE) {
- if (stopAt == -1) {
- stopAt = 59;
- }
- if (startAt == -1 || startAt == ALL_SPEC_INT) {
- startAt = 0;
- }
- } else if (type == HOUR) {
- if (stopAt == -1) {
- stopAt = 23;
- }
- if (startAt == -1 || startAt == ALL_SPEC_INT) {
- startAt = 0;
- }
- } else if (type == DAY_OF_MONTH) {
- if (stopAt == -1) {
- stopAt = 31;
- }
- if (startAt == -1 || startAt == ALL_SPEC_INT) {
- startAt = 1;
- }
- } else if (type == MONTH) {
- if (stopAt == -1) {
- stopAt = 12;
- }
- if (startAt == -1 || startAt == ALL_SPEC_INT) {
- startAt = 1;
- }
- } else if (type == DAY_OF_WEEK) {
- if (stopAt == -1) {
- stopAt = 7;
- }
- if (startAt == -1 || startAt == ALL_SPEC_INT) {
- startAt = 1;
- }
- } else if (type == YEAR) {
- if (stopAt == -1) {
- stopAt = MAX_YEAR;
- }
- if (startAt == -1 || startAt == ALL_SPEC_INT) {
- startAt = 1970;
- }
- }
-
- // if the end of the range is before the start, then we need to overflow into
- // the next day, month etc. This is done by adding the maximum amount for that
- // type, and using modulus max to determine the value being added.
- int max = -1;
- if (stopAt < startAt) {
- switch (type) {
- case SECOND:
- max = 60;
- break;
- case MINUTE:
- max = 60;
- break;
- case HOUR:
- max = 24;
- break;
- case MONTH:
- max = 12;
- break;
- case DAY_OF_WEEK:
- max = 7;
- break;
- case DAY_OF_MONTH:
- max = 31;
- break;
- case YEAR:
- throw new IllegalArgumentException("Start year must be less than stop year");
- default:
- throw new IllegalArgumentException("Unexpected type encountered");
- }
- stopAt += max;
- }
-
- for (int i = startAt; i <= stopAt; i += incr) {
- if (max == -1) {
- // ie: there's no max to overflow over
- set.add(i);
- } else {
- // take the modulus to get the real value
- int i2 = i % max;
-
- // 1-indexed ranges should not include 0, and should include their max
- if (i2 == 0 && (type == MONTH || type == DAY_OF_WEEK || type == DAY_OF_MONTH)) {
- i2 = max;
- }
-
- set.add(i2);
- }
- }
- }
-
- TreeSet<Integer> getSet(int type) {
- switch (type) {
- case SECOND:
- return seconds;
- case MINUTE:
- return minutes;
- case HOUR:
- return hours;
- case DAY_OF_MONTH:
- return daysOfMonth;
- case MONTH:
- return months;
- case DAY_OF_WEEK:
- return daysOfWeek;
- case YEAR:
- return years;
- default:
- return null;
- }
- }
-
- protected ValueSet getValue(int v, String s, int i) {
- char c = s.charAt(i);
- StringBuilder s1 = new StringBuilder(String.valueOf(v));
- while (c >= '0' && c <= '9') {
- s1.append(c);
- i++;
- if (i >= s.length()) {
- break;
- }
- c = s.charAt(i);
- }
- ValueSet val = new ValueSet();
-
- val.pos = (i < s.length()) ? i : i + 1;
- val.value = Integer.parseInt(s1.toString());
- return val;
- }
-
- protected int getNumericValue(String s, int i) {
- int endOfVal = findNextWhiteSpace(i, s);
- String val = s.substring(i, endOfVal);
- return Integer.parseInt(val);
- }
-
- protected int getMonthNumber(String s) {
- Integer integer = monthMap.get(s);
-
- if (integer == null) {
- return -1;
- }
-
- return integer;
- }
-
- protected int getDayOfWeekNumber(String s) {
- Integer integer = dayMap.get(s);
-
- if (integer == null) {
- return -1;
- }
-
- return integer;
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Computation Functions
- //
- ////////////////////////////////////////////////////////////////////////////
-
- public Date getTimeAfter(Date afterTime) {
-
- // Computation is based on Gregorian year only.
- Calendar cl = new GregorianCalendar(getTimeZone());
-
- // move ahead one second, since we're computing the time *after* the
- // given time
- afterTime = new Date(afterTime.getTime() + 1000);
- // CronTrigger does not deal with milliseconds
- cl.setTime(afterTime);
- cl.set(Calendar.MILLISECOND, 0);
-
- boolean gotOne = false;
- // loop until we've computed the next time, or we've past the endTime
- while (!gotOne) {
-
- //if (endTime != null && cl.getTime().after(endTime)) return null;
- if (cl.get(Calendar.YEAR) > 2999) { // prevent endless loop...
- return null;
- }
-
- SortedSet<Integer> st = null;
- int t = 0;
-
- int sec = cl.get(Calendar.SECOND);
- int min = cl.get(Calendar.MINUTE);
-
- // get second.................................................
- st = seconds.tailSet(sec);
- if (st != null && st.size() != 0) {
- sec = st.first();
- } else {
- sec = seconds.first();
- min++;
- cl.set(Calendar.MINUTE, min);
- }
- cl.set(Calendar.SECOND, sec);
-
- min = cl.get(Calendar.MINUTE);
- int hr = cl.get(Calendar.HOUR_OF_DAY);
- t = -1;
-
- // get minute.................................................
- st = minutes.tailSet(min);
- if (st != null && st.size() != 0) {
- t = min;
- min = st.first();
- } else {
- min = minutes.first();
- hr++;
- }
- if (min != t) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, min);
- setCalendarHour(cl, hr);
- continue;
- }
- cl.set(Calendar.MINUTE, min);
-
- hr = cl.get(Calendar.HOUR_OF_DAY);
- int day = cl.get(Calendar.DAY_OF_MONTH);
- t = -1;
-
- // get hour...................................................
- st = hours.tailSet(hr);
- if (st != null && st.size() != 0) {
- t = hr;
- hr = st.first();
- } else {
- hr = hours.first();
- day++;
- }
- if (hr != t) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.DAY_OF_MONTH, day);
- setCalendarHour(cl, hr);
- continue;
- }
- cl.set(Calendar.HOUR_OF_DAY, hr);
-
- day = cl.get(Calendar.DAY_OF_MONTH);
- int mon = cl.get(Calendar.MONTH) + 1;
- // '+ 1' because calendar is 0-based for this field, and we are
- // 1-based
- t = -1;
- int tmon = mon;
-
- // get day...................................................
- boolean dayOfMSpec = !daysOfMonth.contains(NO_SPEC);
- boolean dayOfWSpec = !daysOfWeek.contains(NO_SPEC);
- if (dayOfMSpec && !dayOfWSpec) { // get day by day of month rule
- st = daysOfMonth.tailSet(day);
- if (lastdayOfMonth) {
- if (!nearestWeekday) {
- t = day;
- day = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
- day -= lastdayOffset;
- if (t > day) {
- mon++;
- if (mon > 12) {
- mon = 1;
- tmon = 3333; // ensure test of mon != tmon further below fails
- cl.add(Calendar.YEAR, 1);
- }
- day = 1;
- }
- } else {
- t = day;
- day = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
- day -= lastdayOffset;
-
- Calendar tcal = Calendar.getInstance(getTimeZone());
- tcal.set(Calendar.SECOND, 0);
- tcal.set(Calendar.MINUTE, 0);
- tcal.set(Calendar.HOUR_OF_DAY, 0);
- tcal.set(Calendar.DAY_OF_MONTH, day);
- tcal.set(Calendar.MONTH, mon - 1);
- tcal.set(Calendar.YEAR, cl.get(Calendar.YEAR));
-
- int ldom = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
- int dow = tcal.get(Calendar.DAY_OF_WEEK);
-
- if (dow == Calendar.SATURDAY && day == 1) {
- day += 2;
- } else if (dow == Calendar.SATURDAY) {
- day -= 1;
- } else if (dow == Calendar.SUNDAY && day == ldom) {
- day -= 2;
- } else if (dow == Calendar.SUNDAY) {
- day += 1;
- }
-
- tcal.set(Calendar.SECOND, sec);
- tcal.set(Calendar.MINUTE, min);
- tcal.set(Calendar.HOUR_OF_DAY, hr);
- tcal.set(Calendar.DAY_OF_MONTH, day);
- tcal.set(Calendar.MONTH, mon - 1);
- Date nTime = tcal.getTime();
- if (nTime.before(afterTime)) {
- day = 1;
- mon++;
- }
- }
- } else if (nearestWeekday) {
- t = day;
- day = daysOfMonth.first();
-
- Calendar tcal = Calendar.getInstance(getTimeZone());
- tcal.set(Calendar.SECOND, 0);
- tcal.set(Calendar.MINUTE, 0);
- tcal.set(Calendar.HOUR_OF_DAY, 0);
- tcal.set(Calendar.DAY_OF_MONTH, day);
- tcal.set(Calendar.MONTH, mon - 1);
- tcal.set(Calendar.YEAR, cl.get(Calendar.YEAR));
-
- int ldom = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
- int dow = tcal.get(Calendar.DAY_OF_WEEK);
-
- if (dow == Calendar.SATURDAY && day == 1) {
- day += 2;
- } else if (dow == Calendar.SATURDAY) {
- day -= 1;
- } else if (dow == Calendar.SUNDAY && day == ldom) {
- day -= 2;
- } else if (dow == Calendar.SUNDAY) {
- day += 1;
- }
-
-
- tcal.set(Calendar.SECOND, sec);
- tcal.set(Calendar.MINUTE, min);
- tcal.set(Calendar.HOUR_OF_DAY, hr);
- tcal.set(Calendar.DAY_OF_MONTH, day);
- tcal.set(Calendar.MONTH, mon - 1);
- Date nTime = tcal.getTime();
- if (nTime.before(afterTime)) {
- day = daysOfMonth.first();
- mon++;
- }
- } else if (st != null && st.size() != 0) {
- t = day;
- day = st.first();
- // make sure we don't over-run a short month, such as february
- int lastDay = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
- if (day > lastDay) {
- day = daysOfMonth.first();
- mon++;
- }
- } else {
- day = daysOfMonth.first();
- mon++;
- }
-
- if (day != t || mon != tmon) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, day);
- cl.set(Calendar.MONTH, mon - 1);
- // '- 1' because calendar is 0-based for this field, and we
- // are 1-based
- continue;
- }
- } else if (dayOfWSpec && !dayOfMSpec) { // get day by day of week rule
- if (lastdayOfWeek) { // are we looking for the last XXX day of
- // the month?
- int dow = daysOfWeek.first(); // desired
- // d-o-w
- int cDow = cl.get(Calendar.DAY_OF_WEEK); // current d-o-w
- int daysToAdd = 0;
- if (cDow < dow) {
- daysToAdd = dow - cDow;
- }
- if (cDow > dow) {
- daysToAdd = dow + (7 - cDow);
- }
-
- int lDay = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
-
- if (day + daysToAdd > lDay) { // did we already miss the
- // last one?
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, 1);
- cl.set(Calendar.MONTH, mon);
- // no '- 1' here because we are promoting the month
- continue;
- }
-
- // find date of last occurrence of this day in this month...
- while ((day + daysToAdd + 7) <= lDay) {
- daysToAdd += 7;
- }
-
- day += daysToAdd;
-
- if (daysToAdd > 0) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, day);
- cl.set(Calendar.MONTH, mon - 1);
- // '- 1' here because we are not promoting the month
- continue;
- }
-
- } else if (nthdayOfWeek != 0) {
- // are we looking for the Nth XXX day in the month?
- int dow = daysOfWeek.first(); // desired
- // d-o-w
- int cDow = cl.get(Calendar.DAY_OF_WEEK); // current d-o-w
- int daysToAdd = 0;
- if (cDow < dow) {
- daysToAdd = dow - cDow;
- } else if (cDow > dow) {
- daysToAdd = dow + (7 - cDow);
- }
-
- boolean dayShifted = false;
- if (daysToAdd > 0) {
- dayShifted = true;
- }
-
- day += daysToAdd;
- int weekOfMonth = day / 7;
- if (day % 7 > 0) {
- weekOfMonth++;
- }
-
- daysToAdd = (nthdayOfWeek - weekOfMonth) * 7;
- day += daysToAdd;
- if (daysToAdd < 0
- || day > getLastDayOfMonth(mon, cl
- .get(Calendar.YEAR))) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, 1);
- cl.set(Calendar.MONTH, mon);
- // no '- 1' here because we are promoting the month
- continue;
- } else if (daysToAdd > 0 || dayShifted) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, day);
- cl.set(Calendar.MONTH, mon - 1);
- // '- 1' here because we are NOT promoting the month
- continue;
- }
- } else {
- int cDow = cl.get(Calendar.DAY_OF_WEEK); // current d-o-w
- int dow = daysOfWeek.first(); // desired
- // d-o-w
- st = daysOfWeek.tailSet(cDow);
- if (st != null && st.size() > 0) {
- dow = st.first();
- }
-
- int daysToAdd = 0;
- if (cDow < dow) {
- daysToAdd = dow - cDow;
- }
- if (cDow > dow) {
- daysToAdd = dow + (7 - cDow);
- }
-
- int lDay = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
-
- if (day + daysToAdd > lDay) { // will we pass the end of
- // the month?
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, 1);
- cl.set(Calendar.MONTH, mon);
- // no '- 1' here because we are promoting the month
- continue;
- } else if (daysToAdd > 0) { // are we swithing days?
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, day + daysToAdd);
- cl.set(Calendar.MONTH, mon - 1);
- // '- 1' because calendar is 0-based for this field,
- // and we are 1-based
- continue;
- }
- }
- } else { // dayOfWSpec && !dayOfMSpec
- throw new UnsupportedOperationException(
- "Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.");
- }
- cl.set(Calendar.DAY_OF_MONTH, day);
-
- mon = cl.get(Calendar.MONTH) + 1;
- // '+ 1' because calendar is 0-based for this field, and we are
- // 1-based
- int year = cl.get(Calendar.YEAR);
- t = -1;
-
- // test for expressions that never generate a valid fire date,
- // but keep looping...
- if (year > MAX_YEAR) {
- return null;
- }
-
- // get month...................................................
- st = months.tailSet(mon);
- if (st != null && st.size() != 0) {
- t = mon;
- mon = st.first();
- } else {
- mon = months.first();
- year++;
- }
- if (mon != t) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, 1);
- cl.set(Calendar.MONTH, mon - 1);
- // '- 1' because calendar is 0-based for this field, and we are
- // 1-based
- cl.set(Calendar.YEAR, year);
- continue;
- }
- cl.set(Calendar.MONTH, mon - 1);
- // '- 1' because calendar is 0-based for this field, and we are
- // 1-based
-
- year = cl.get(Calendar.YEAR);
- t = -1;
-
- // get year...................................................
- st = years.tailSet(year);
- if (st != null && st.size() != 0) {
- t = year;
- year = st.first();
- } else {
- return null; // ran out of years...
- }
-
- if (year != t) {
- cl.set(Calendar.SECOND, 0);
- cl.set(Calendar.MINUTE, 0);
- cl.set(Calendar.HOUR_OF_DAY, 0);
- cl.set(Calendar.DAY_OF_MONTH, 1);
- cl.set(Calendar.MONTH, 0);
- // '- 1' because calendar is 0-based for this field, and we are
- // 1-based
- cl.set(Calendar.YEAR, year);
- continue;
- }
- cl.set(Calendar.YEAR, year);
-
- gotOne = true;
- } // while( !done )
-
- return cl.getTime();
- }
-
- protected void setCalendarHour(Calendar cal, int hour) {
- cal.set(Calendar.HOUR_OF_DAY, hour);
- if (cal.get(Calendar.HOUR_OF_DAY) != hour && hour != 24) {
- cal.set(Calendar.HOUR_OF_DAY, hour + 1);
- }
- }
-
- public Date getTimeBefore(Date endTime) {
- // FUTURE_TODO: implement QUARTZ-423
- return null;
- }
-
- public Date getFinalFireTime() {
- // FUTURE_TODO: implement QUARTZ-423
- return null;
- }
-
- protected boolean isLeapYear(int year) {
- return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0));
- }
-
- protected int getLastDayOfMonth(int monthNum, int year) {
-
- switch (monthNum) {
- case 1:
- return 31;
- case 2:
- return (isLeapYear(year)) ? 29 : 28;
- case 3:
- return 31;
- case 4:
- return 30;
- case 5:
- return 31;
- case 6:
- return 30;
- case 7:
- return 31;
- case 8:
- return 31;
- case 9:
- return 30;
- case 10:
- return 31;
- case 11:
- return 30;
- case 12:
- return 31;
- default:
- throw new IllegalArgumentException("Illegal month number: "
- + monthNum);
- }
- }
-
-
- private void readObject(java.io.ObjectInputStream stream)
- throws java.io.IOException, ClassNotFoundException {
-
- stream.defaultReadObject();
- try {
- buildExpression(cronExpression);
- } catch (Exception ignore) {
- } // never happens
- }
-
- @Override
- @Deprecated
- public Object clone() {
- return new CronExpression(this);
- }
-}
-
-class ValueSet {
- public int value;
-
- public int pos;
-}
diff --git a/src/main/java/org/springblade/xxljob/dto/JobInfoDTO.java b/src/main/java/org/springblade/xxljob/dto/JobInfoDTO.java
deleted file mode 100644
index 16e35b7..0000000
--- a/src/main/java/org/springblade/xxljob/dto/JobInfoDTO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.xxljob.dto;
-
-import org.springblade.xxljob.entity.JobInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 调度任务信息表 数据传输对象实体类
- *
- * @author BladeX
- * @since 2024-01-10
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class JobInfoDTO extends JobInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/xxljob/entity/JobInfoEntity.java b/src/main/java/org/springblade/xxljob/entity/JobInfoEntity.java
deleted file mode 100644
index c8c60a5..0000000
--- a/src/main/java/org/springblade/xxljob/entity/JobInfoEntity.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.springblade.xxljob.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.Date;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-/**
- * 调度任务信息表 实体类
- *
- * @author BladeX
- * @since 2024-01-10
- */
-@Data
-@TableName("xxl_job_info")
-@ApiModel(value = "JobInfo对象", description = "调度任务信息表")
-public class JobInfoEntity{
-
- /**
- * 执行器主键ID
- */
- @ApiModelProperty(value = "执行器主键ID")
- @TableId(value = "id",type = IdType.AUTO)
- private Integer id;
-
- /**
- * 执行器主键ID
- */
- @ApiModelProperty(value = "执行器主键ID")
- private Integer jobGroup;
- /**
- * 任务描述
- */
- @ApiModelProperty(value = "任务描述")
- private String jobDesc;
- /**
- * 新增时间
- */
- @ApiModelProperty(value = "新增时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date addTime;
-
- /**
- * 更新时间
- */
- @ApiModelProperty(value = "更新时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date updateTime;
- /**
- * 作者
- */
- @ApiModelProperty(value = "作者")
- private String author;
- /**
- * 报警邮件
- */
- @ApiModelProperty(value = "报警邮件")
- private String alarmEmail;
- /**
- * 调度类型
- */
- @ApiModelProperty(value = "调度类型")
- private String scheduleType;
- /**
- * 调度配置,值含义取决于调度类型
- */
- @ApiModelProperty(value = "调度配置,值含义取决于调度类型")
- private String scheduleConf;
- /**
- * 调度过期策略
- */
- @ApiModelProperty(value = "调度过期策略")
- private String misfireStrategy;
- /**
- * 执行器路由策略
- */
- @ApiModelProperty(value = "执行器路由策略")
- private String executorRouteStrategy;
- /**
- * 执行器任务handler
- */
- @ApiModelProperty(value = "执行器任务handler")
- private String executorHandler;
- /**
- * 执行器任务参数
- */
- @ApiModelProperty(value = "执行器任务参数")
- private String executorParam;
- /**
- * 阻塞处理策略
- */
- @ApiModelProperty(value = "阻塞处理策略")
- private String executorBlockStrategy;
- /**
- * 任务执行超时时间,单位秒
- */
- @ApiModelProperty(value = "任务执行超时时间,单位秒")
- private Integer executorTimeout;
- /**
- * 失败重试次数
- */
- @ApiModelProperty(value = "失败重试次数")
- private Integer executorFailRetryCount;
- /**
- * GLUE类型
- */
- @ApiModelProperty(value = "GLUE类型")
- private String glueType;
- /**
- * GLUE源代码
- */
- @ApiModelProperty(value = "GLUE源代码")
- private String glueSource;
- /**
- * GLUE备注
- */
- @ApiModelProperty(value = "GLUE备注")
- private String glueRemark;
- /**
- * GLUE更新时间
- */
- @ApiModelProperty(value = "GLUE更新时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date glueUpdatetime;
- /**
- * 子任务ID,多个逗号分隔
- */
- @ApiModelProperty(value = "子任务ID,多个逗号分隔")
- private String childJobid;
- /**
- * 调度状态:0-停止,1-运行
- */
- @ApiModelProperty(value = "调度状态:0-停止,1-运行")
- private Byte triggerStatus;
- /**
- * 上次调度时间
- */
- @ApiModelProperty(value = "上次调度时间")
- private Long triggerLastTime;
- /**
- * 下次调度时间
- */
- @ApiModelProperty(value = "下次调度时间")
- private Long triggerNextTime;
-
-}
diff --git a/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java b/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
deleted file mode 100644
index edbef23..0000000
--- a/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.springblade.xxljob.jobhandler;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springblade.modules.task.service.ITaskService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-/**
- * 三色标签定时任务执行器
- * @author zhongrj
- * @date 2024-01-10
- */
-@Component
-public class LabelHandleJob {
-
- private static Logger logger = LoggerFactory.getLogger(LabelHandleJob.class);
-
- @Autowired
- private ITaskService taskService;
-
- /**
- * 三色定时任务
- */
- @XxlJob("threeColourJobHandler")
- public void threeColourJobHandler (String param){
- XxlJobHelper.log("开始执行任务...");
-
- // 校园安全检查
- // 根据类型创建任务
- boolean result = taskService.createTaskJob(param);
- XxlJobHelper.log("任务响应结果..." + result);
- // 创建外呼短信发送任务记录
- XxlJobHelper.log("结束自动创建任务...");
- }
-
- /**
- * 创建居住证发送短信定时任务
- */
- @XxlJob("residenceSendSmsJobHandler")
- public void residenceJobHandler (String param){
- XxlJobHelper.log("开始执行任务...创建居住证发送短信定时任务");
- // 创建居住证发送短信定时任务
- boolean result = taskService.createResidenceSendSms(param);
- XxlJobHelper.log("任务响应结果..." + result);
- // 创建居住证发送短信定时任务
- XxlJobHelper.log("结束自动创建任务...");
- }
-
- /**
- * 创建校园安全发送短信定时任务
- */
- @XxlJob("schoolSendSmsJobHandler")
- public void schoolJobHandler (String param){
- XxlJobHelper.log("开始执行任务...创建校园安全发送短信定时任务");
- // 创建居住证发送短信定时任务
- boolean result = taskService.createSchoolSendSms(param);
- XxlJobHelper.log("任务响应结果..." + result);
- // 创建居住证发送短信定时任务
- XxlJobHelper.log("结束自动创建任务...");
- }
-
-}
diff --git a/src/main/java/org/springblade/xxljob/jobhandler/SampleXxlJob.java b/src/main/java/org/springblade/xxljob/jobhandler/SampleXxlJob.java
deleted file mode 100644
index 7b28e25..0000000
--- a/src/main/java/org/springblade/xxljob/jobhandler/SampleXxlJob.java
+++ /dev/null
@@ -1,258 +0,0 @@
-package org.springblade.xxljob.jobhandler;
-
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.concurrent.TimeUnit;
-
-/**
- * XxlJob开发示例(Bean模式)
- * <p>
- * 开发步骤:
- * 1、任务开发:在Spring Bean实例中,开发Job方法;
- * 2、注解配置:为Job方法添加注解 "@XxlJob(value="自定义jobhandler名称", init = "JobHandler初始化方法", destroy = "JobHandler销毁方法")",注解value值对应的是调度中心新建任务的JobHandler属性的值。
- * 3、执行日志:需要通过 "XxlJobHelper.log" 打印执行日志;
- * 4、任务结果:默认任务结果为 "成功" 状态,不需要主动设置;如有诉求,比如设置任务结果为失败,可以通过 "XxlJobHelper.handleFail/handleSuccess" 自主设置任务结果;
- *
- * @author liyh
- */
-@Component
-public class SampleXxlJob {
- private static Logger logger = LoggerFactory.getLogger(SampleXxlJob.class);
-
- /**
- * 1、简单任务示例(Bean模式)
- */
- @XxlJob("demoJobHandler")
- public void demoJobHandler() throws Exception {
- XxlJobHelper.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobHelper.log("beat at:" + i);
- System.out.println("hello" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- System.out.println("完成了");
- }
-
- @XxlJob("testJobHandler")
- public void testJobHandler() throws Exception {
- String jobParam = XxlJobHelper.getJobParam();
- System.out.println("执行成功,参数:" + jobParam);
- }
-
- /**
- * 2、分片广播任务
- */
- @XxlJob("shardingJobHandler")
- public void shardingJobHandler() throws Exception {
-
- // 分片参数
- int shardIndex = XxlJobHelper.getShardIndex();
- int shardTotal = XxlJobHelper.getShardTotal();
-
- XxlJobHelper.log("分片参数:当前分片序号 = {}, 总分片数 = {}", shardIndex, shardTotal);
-
- // 业务逻辑
- for (int i = 0; i < shardTotal; i++) {
- if (i == shardIndex) {
- XxlJobHelper.log("第 {} 片, 命中分片开始处理", i);
- } else {
- XxlJobHelper.log("第 {} 片, 忽略", i);
- }
- }
-
- }
-
- /**
- * 3、命令行任务
- */
- @XxlJob("commandJobHandler")
- public void commandJobHandler() throws Exception {
- String command = XxlJobHelper.getJobParam();
- int exitValue = -1;
-
- BufferedReader bufferedReader = null;
- try {
- // command process
- ProcessBuilder processBuilder = new ProcessBuilder();
- processBuilder.command(command);
- processBuilder.redirectErrorStream(true);
-
- Process process = processBuilder.start();
- //Process process = Runtime.getRuntime().exec(command);
-
- BufferedInputStream bufferedInputStream = new BufferedInputStream(process.getInputStream());
- bufferedReader = new BufferedReader(new InputStreamReader(bufferedInputStream));
-
- // command log
- String line;
- while ((line = bufferedReader.readLine()) != null) {
- XxlJobHelper.log(line);
- }
-
- // command exit
- process.waitFor();
- exitValue = process.exitValue();
- } catch (Exception e) {
- XxlJobHelper.log(e);
- } finally {
- if (bufferedReader != null) {
- bufferedReader.close();
- }
- }
-
- if (exitValue == 0) {
- // default success
- } else {
- XxlJobHelper.handleFail("command exit value(" + exitValue + ") is failed");
- }
-
- }
-
-
- /**
- * 4、跨平台Http任务
- * 参数示例:
- * "url: http://www.baidu.com\n" +
- * "method: get\n" +
- * "data: content\n";
- */
- @XxlJob("httpJobHandler")
- public void httpJobHandler() throws Exception {
-
- // param parse
- String param = XxlJobHelper.getJobParam();
- if (param == null || param.trim().length() == 0) {
- XxlJobHelper.log("param[" + param + "] invalid.");
-
- XxlJobHelper.handleFail();
- return;
- }
-
- String[] httpParams = param.split("\n");
- String url = null;
- String method = null;
- String data = null;
- for (String httpParam : httpParams) {
- if (httpParam.startsWith("url:")) {
- url = httpParam.substring(httpParam.indexOf("url:") + 4).trim();
- }
- if (httpParam.startsWith("method:")) {
- method = httpParam.substring(httpParam.indexOf("method:") + 7).trim().toUpperCase();
- }
- if (httpParam.startsWith("data:")) {
- data = httpParam.substring(httpParam.indexOf("data:") + 5).trim();
- }
- }
-
- // param valid
- if (url == null || url.trim().length() == 0) {
- XxlJobHelper.log("url[" + url + "] invalid.");
-
- XxlJobHelper.handleFail();
- return;
- }
- if (method == null || !Arrays.asList("GET", "POST").contains(method)) {
- XxlJobHelper.log("method[" + method + "] invalid.");
-
- XxlJobHelper.handleFail();
- return;
- }
- boolean isPostMethod = method.equals("POST");
-
- // request
- HttpURLConnection connection = null;
- BufferedReader bufferedReader = null;
- try {
- // connection
- URL realUrl = new URL(url);
- connection = (HttpURLConnection) realUrl.openConnection();
-
- // connection setting
- connection.setRequestMethod(method);
- connection.setDoOutput(isPostMethod);
- connection.setDoInput(true);
- connection.setUseCaches(false);
- connection.setReadTimeout(5 * 1000);
- connection.setConnectTimeout(3 * 1000);
- connection.setRequestProperty("connection", "Keep-Alive");
- connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
- connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");
-
- // do connection
- connection.connect();
-
- // data
- if (isPostMethod && data != null && data.trim().length() > 0) {
- DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
- dataOutputStream.write(data.getBytes("UTF-8"));
- dataOutputStream.flush();
- dataOutputStream.close();
- }
-
- // valid StatusCode
- int statusCode = connection.getResponseCode();
- if (statusCode != 200) {
- throw new RuntimeException("Http Request StatusCode(" + statusCode + ") Invalid.");
- }
-
- // result
- bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
- StringBuilder result = new StringBuilder();
- String line;
- while ((line = bufferedReader.readLine()) != null) {
- result.append(line);
- }
- String responseMsg = result.toString();
-
- XxlJobHelper.log(responseMsg);
-
- return;
- } catch (Exception e) {
- XxlJobHelper.log(e);
-
- XxlJobHelper.handleFail();
- return;
- } finally {
- try {
- if (bufferedReader != null) {
- bufferedReader.close();
- }
- if (connection != null) {
- connection.disconnect();
- }
- } catch (Exception e2) {
- XxlJobHelper.log(e2);
- }
- }
-
- }
-
- /**
- * 5、生命周期任务示例:任务初始化与销毁时,支持自定义相关逻辑;
- */
- @XxlJob(value = "demoJobHandler2", init = "init", destroy = "destroy")
- public void demoJobHandler2() throws Exception {
- XxlJobHelper.log("XXL-JOB, Hello World.");
- }
-
- public void init() {
- logger.info("init");
- }
-
- public void destroy() {
- logger.info("destroy");
- }
-
-}
diff --git a/src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.java b/src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.java
deleted file mode 100644
index 13911f2..0000000
--- a/src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.springblade.xxljob.mapper;
-
-import org.apache.ibatis.annotations.Param;
-import org.springblade.xxljob.entity.JobInfoEntity;
-import org.springblade.xxljob.vo.JobInfoVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 调度任务信息表 Mapper 接口
- *
- * @author BladeX
- * @since 2024-01-10
- */
-public interface JobInfoMapper extends BaseMapper<JobInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param jobInfo
- * @return
- */
- List<JobInfoVO> selectJobInfoPage(IPage page,@Param("jobInfo") JobInfoVO jobInfo);
-
-
-}
diff --git a/src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.xml b/src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.xml
deleted file mode 100644
index 3362204..0000000
--- a/src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.xxljob.mapper.JobInfoMapper">
-
- <!-- 通用查询映射结果 -->
- <resultMap id="jobInfoResultMap" type="org.springblade.xxljob.entity.JobInfoEntity">
- <result column="id" property="id"/>
- <result column="job_group" property="jobGroup"/>
- <result column="job_desc" property="jobDesc"/>
- <result column="add_time" property="addTime"/>
- <result column="author" property="author"/>
- <result column="alarm_email" property="alarmEmail"/>
- <result column="schedule_type" property="scheduleType"/>
- <result column="schedule_conf" property="scheduleConf"/>
- <result column="misfire_strategy" property="misfireStrategy"/>
- <result column="executor_route_strategy" property="executorRouteStrategy"/>
- <result column="executor_handler" property="executorHandler"/>
- <result column="executor_param" property="executorParam"/>
- <result column="executor_block_strategy" property="executorBlockStrategy"/>
- <result column="executor_timeout" property="executorTimeout"/>
- <result column="executor_fail_retry_count" property="executorFailRetryCount"/>
- <result column="glue_type" property="glueType"/>
- <result column="glue_source" property="glueSource"/>
- <result column="glue_remark" property="glueRemark"/>
- <result column="glue_updatetime" property="glueUpdatetime"/>
- <result column="child_jobid" property="childJobid"/>
- <result column="trigger_status" property="triggerStatus"/>
- <result column="trigger_last_time" property="triggerLastTime"/>
- <result column="trigger_next_time" property="triggerNextTime"/>
- </resultMap>
-
- <!--自定义分页查询-->
- <select id="selectJobInfoPage" resultMap="jobInfoResultMap">
- select * from xxl_job_info where 1=1
- <if test="jobInfo.jobDesc!=null and jobInfo.jobDesc!=''">
- and job_desc like concat('%',#{jobInfo.jobDesc},'%')
- </if>
- <if test="jobInfo.triggerStatus!=null">
- and trigger_status = #{jobInfo.triggerStatus}
- </if>
- </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/xxljob/service/IJobInfoService.java b/src/main/java/org/springblade/xxljob/service/IJobInfoService.java
deleted file mode 100644
index eb3b467..0000000
--- a/src/main/java/org/springblade/xxljob/service/IJobInfoService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.springblade.xxljob.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.xxljob.entity.JobInfoEntity;
-import org.springblade.xxljob.vo.JobInfoVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 调度任务信息表 服务类
- *
- * @author BladeX
- * @since 2024-01-10
- */
-public interface IJobInfoService extends IService<JobInfoEntity> {
-
- /**
- * 自定义分页
- *
- * @param page
- * @param jobInfo
- * @return
- */
- IPage<JobInfoVO> selectJobInfoPage(IPage<JobInfoVO> page, JobInfoVO jobInfo);
-
-
- /**
- * 更新任务
- * @param jobInfo
- * @return
- */
- boolean updateJob(JobInfoEntity jobInfo);
-
- /**
- * 调度任务信息表 新增
- * @param jobInfo
- * @return
- */
- boolean addJob(JobInfoEntity jobInfo);
-
- /**
- * 调度任务信息表 启动
- * @param jobInfo
- * @return
- */
- boolean start(JobInfoEntity jobInfo);
-
- /**
- * 调度任务信息表 停止
- * @param jobInfo
- * @return
- */
- boolean stop(JobInfoEntity jobInfo);
-}
diff --git a/src/main/java/org/springblade/xxljob/service/impl/JobInfoServiceImpl.java b/src/main/java/org/springblade/xxljob/service/impl/JobInfoServiceImpl.java
deleted file mode 100644
index 1f7c86e..0000000
--- a/src/main/java/org/springblade/xxljob/service/impl/JobInfoServiceImpl.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package org.springblade.xxljob.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.core.biz.model.ReturnT;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.xxljob.cron.CronExpression;
-import org.springblade.xxljob.entity.JobInfoEntity;
-import org.springblade.xxljob.vo.JobInfoVO;
-import org.springblade.xxljob.mapper.JobInfoMapper;
-import org.springblade.xxljob.service.IJobInfoService;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.Date;
-
-/**
- * 调度任务信息表 服务实现类
- *
- * @author BladeX
- * @since 2024-01-10
- */
-@Service
-public class JobInfoServiceImpl extends ServiceImpl<JobInfoMapper, JobInfoEntity> implements IJobInfoService {
-
-
- public static final long PRE_READ_MS = 5000; // pre read
-
-
- @Override
- public IPage<JobInfoVO> selectJobInfoPage(IPage<JobInfoVO> page, JobInfoVO jobInfo) {
- return page.setRecords(baseMapper.selectJobInfoPage(page, jobInfo));
- }
-
- /**
- * 更新任务
- * @param jobInfo
- * @return
- */
- @Override
- public boolean updateJob(JobInfoEntity jobInfo) {
- boolean flag = false;
- // 获取最新任务信息
- JobInfoEntity exists_jobInfo = getById(jobInfo.getId());
- // next trigger time (5s后生效,避开预读周期)
- long nextTriggerTime = jobInfo.getTriggerNextTime();
- boolean scheduleDataNotChanged = jobInfo.getScheduleType().equals(exists_jobInfo.getScheduleType()) && jobInfo.getScheduleConf().equals(exists_jobInfo.getScheduleConf());
- if (exists_jobInfo.getTriggerStatus() == 1 && !scheduleDataNotChanged) {
- try {
- Date nextValidTime = generateNextValidTime(jobInfo, new Date(System.currentTimeMillis() + PRE_READ_MS));
- if (nextValidTime == null) {
- return false;
- }
- nextTriggerTime = nextValidTime.getTime();
- } catch (Exception e) {
- return false;
- }
- }
-
- exists_jobInfo.setJobGroup(jobInfo.getJobGroup());
- exists_jobInfo.setJobDesc(jobInfo.getJobDesc());
- exists_jobInfo.setAuthor(jobInfo.getAuthor());
- exists_jobInfo.setAlarmEmail(jobInfo.getAlarmEmail());
- exists_jobInfo.setScheduleType(jobInfo.getScheduleType());
- exists_jobInfo.setScheduleConf(jobInfo.getScheduleConf());
- exists_jobInfo.setMisfireStrategy(jobInfo.getMisfireStrategy());
- exists_jobInfo.setExecutorRouteStrategy(jobInfo.getExecutorRouteStrategy());
- exists_jobInfo.setExecutorHandler(jobInfo.getExecutorHandler());
- exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam());
- exists_jobInfo.setExecutorBlockStrategy(jobInfo.getExecutorBlockStrategy());
- exists_jobInfo.setExecutorTimeout(jobInfo.getExecutorTimeout());
- exists_jobInfo.setExecutorFailRetryCount(jobInfo.getExecutorFailRetryCount());
- exists_jobInfo.setChildJobid(jobInfo.getChildJobid());
- exists_jobInfo.setTriggerNextTime(nextTriggerTime);
- exists_jobInfo.setUpdateTime(new Date());
- // 更新
- flag = updateById(exists_jobInfo);
- // 返回
- return flag;
- }
-
- // ---------------------- tools ----------------------
- public Date generateNextValidTime(JobInfoEntity jobInfo, Date fromTime) throws Exception {
- Date nextValidTime = new CronExpression(jobInfo.getScheduleConf()).getNextValidTimeAfter(fromTime);
- return nextValidTime;
- }
-
- /**
- * 调度任务信息表 新增
- * @param jobInfo
- * @return
- */
- @Override
- public boolean addJob(JobInfoEntity jobInfo) {
- boolean flag = false;
- // add in db
- jobInfo.setAddTime(new Date());
- jobInfo.setUpdateTime(new Date());
- jobInfo.setGlueUpdatetime(new Date());
- // 新增
- flag = save(jobInfo);
- // 返回
- return flag;
- }
-
- /**
- * 调度任务信息表 启动
- * @param jobInfo
- * @return
- */
- @Override
- public boolean start(JobInfoEntity jobInfo) {
- // next trigger time (5s后生效,避开预读周期)
- long nextTriggerTime = 0;
- try {
- Date nextValidTime = generateNextValidTime(jobInfo, new Date(System.currentTimeMillis() + PRE_READ_MS));
- if (nextValidTime == null) {
- return false;
- }
- nextTriggerTime = nextValidTime.getTime();
- } catch (Exception e) {
- return false;
- }
- byte b = 1;
- jobInfo.setTriggerStatus(b);
- jobInfo.setTriggerLastTime(0L);
- jobInfo.setTriggerNextTime(nextTriggerTime);
-
- jobInfo.setUpdateTime(new Date());
- boolean update = updateById(jobInfo);
- // 返回
- return update;
- }
-
- /**
- * 调度任务信息表 停止
- * @param jobInfo
- * @return
- */
- @Override
- public boolean stop(JobInfoEntity jobInfo) {
- byte b = 0;
- jobInfo.setTriggerStatus(b);
- jobInfo.setTriggerLastTime(0L);
- jobInfo.setTriggerNextTime(0L);
- jobInfo.setUpdateTime(new Date());
- boolean update = updateById(jobInfo);
- // 返回
- return update;
- }
-}
diff --git a/src/main/java/org/springblade/xxljob/util/CookieUtil.java b/src/main/java/org/springblade/xxljob/util/CookieUtil.java
deleted file mode 100644
index 6cd7c8e..0000000
--- a/src/main/java/org/springblade/xxljob/util/CookieUtil.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.springblade.xxljob.util;
-
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Cookie.Util
- *
- * @author liyh
- */
-public class CookieUtil {
-
- // 默认缓存时间,单位/秒, 2H
- private static final int COOKIE_MAX_AGE = Integer.MAX_VALUE;
- // 保存路径,根路径
- private static final String COOKIE_PATH = "/";
-
- /**
- * 保存
- *
- * @param response
- * @param key
- * @param value
- * @param ifRemember
- */
- public static void set(HttpServletResponse response, String key, String value, boolean ifRemember) {
- int age = ifRemember ? COOKIE_MAX_AGE : -1;
- set(response, key, value, null, COOKIE_PATH, age, true);
- }
-
- /**
- * 保存
- *
- * @param response
- * @param key
- * @param value
- * @param maxAge
- */
- private static void set(HttpServletResponse response, String key, String value, String domain, String path, int maxAge, boolean isHttpOnly) {
- Cookie cookie = new Cookie(key, value);
- if (domain != null) {
- cookie.setDomain(domain);
- }
- cookie.setPath(path);
- cookie.setMaxAge(maxAge);
- cookie.setHttpOnly(isHttpOnly);
- response.addCookie(cookie);
- }
-
- /**
- * 查询value
- *
- * @param request
- * @param key
- * @return
- */
- public static String getValue(HttpServletRequest request, String key) {
- Cookie cookie = get(request, key);
- if (cookie != null) {
- return cookie.getValue();
- }
- return null;
- }
-
- /**
- * 查询Cookie
- *
- * @param request
- * @param key
- */
- private static Cookie get(HttpServletRequest request, String key) {
- Cookie[] arr_cookie = request.getCookies();
- if (arr_cookie != null && arr_cookie.length > 0) {
- for (Cookie cookie : arr_cookie) {
- if (cookie.getName().equals(key)) {
- return cookie;
- }
- }
- }
- return null;
- }
-
- /**
- * 删除Cookie
- *
- * @param request
- * @param response
- * @param key
- */
- public static void remove(HttpServletRequest request, HttpServletResponse response, String key) {
- Cookie cookie = get(request, key);
- if (cookie != null) {
- set(response, key, "", null, COOKIE_PATH, 0, true);
- }
- }
-
-}
diff --git a/src/main/java/org/springblade/xxljob/util/JacksonUtil.java b/src/main/java/org/springblade/xxljob/util/JacksonUtil.java
deleted file mode 100644
index 1a7dd3a..0000000
--- a/src/main/java/org/springblade/xxljob/util/JacksonUtil.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.springblade.xxljob.util;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-
-/**
- * Jackson util
- * <p>
- * 1、obj need private and set/get;
- * 2、do not support inner class;
- *
- * @author liyh
- */
-public class JacksonUtil {
- private static Logger logger = LoggerFactory.getLogger(JacksonUtil.class);
-
- private final static ObjectMapper objectMapper = new ObjectMapper();
-
- public static ObjectMapper getInstance() {
- return objectMapper;
- }
-
- /**
- * bean、array、List、Map --> json
- *
- * @param obj
- * @return json string
- * @throws Exception
- */
- public static String writeValueAsString(Object obj) {
- try {
- return getInstance().writeValueAsString(obj);
- } catch (JsonGenerationException e) {
- logger.error(e.getMessage(), e);
- } catch (JsonMappingException e) {
- logger.error(e.getMessage(), e);
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- return null;
- }
-
- /**
- * string --> bean、Map、List(array)
- *
- * @param jsonStr
- * @param clazz
- * @return obj
- * @throws Exception
- */
- public static <T> T readValue(String jsonStr, Class<T> clazz) {
- try {
- return getInstance().readValue(jsonStr, clazz);
- } catch (JsonParseException e) {
- logger.error(e.getMessage(), e);
- } catch (JsonMappingException e) {
- logger.error(e.getMessage(), e);
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- return null;
- }
-
- /**
- * string --> List<Bean>...
- *
- * @param jsonStr
- * @param parametrized
- * @param parameterClasses
- * @param <T>
- * @return
- */
- public static <T> T readValue(String jsonStr, Class<?> parametrized, Class<?>... parameterClasses) {
- try {
- JavaType javaType = getInstance().getTypeFactory().constructParametricType(parametrized, parameterClasses);
- return getInstance().readValue(jsonStr, javaType);
- } catch (JsonParseException e) {
- logger.error(e.getMessage(), e);
- } catch (JsonMappingException e) {
- logger.error(e.getMessage(), e);
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
- return null;
- }
-}
diff --git a/src/main/java/org/springblade/xxljob/util/LocalCacheUtil.java b/src/main/java/org/springblade/xxljob/util/LocalCacheUtil.java
deleted file mode 100644
index 929e77f..0000000
--- a/src/main/java/org/springblade/xxljob/util/LocalCacheUtil.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package org.springblade.xxljob.util;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * local cache tool
- *
- * @author liyh
- */
-public class LocalCacheUtil {
-
- private static ConcurrentMap<String, LocalCacheData> cacheRepository = new ConcurrentHashMap<String, LocalCacheData>(); // 类型建议用抽象父类,兼容性更好;
-
- private static class LocalCacheData {
- private String key;
- private Object val;
- private long timeoutTime;
-
- public LocalCacheData() {
- }
-
- public LocalCacheData(String key, Object val, long timeoutTime) {
- this.key = key;
- this.val = val;
- this.timeoutTime = timeoutTime;
- }
-
- public String getKey() {
- return key;
- }
-
- public void setKey(String key) {
- this.key = key;
- }
-
- public Object getVal() {
- return val;
- }
-
- public void setVal(Object val) {
- this.val = val;
- }
-
- public long getTimeoutTime() {
- return timeoutTime;
- }
-
- public void setTimeoutTime(long timeoutTime) {
- this.timeoutTime = timeoutTime;
- }
- }
-
-
- /**
- * set cache
- *
- * @param key
- * @param val
- * @param cacheTime
- * @return
- */
- public static boolean set(String key, Object val, long cacheTime) {
-
- // clean timeout cache, before set new cache (avoid cache too much)
- cleanTimeoutCache();
-
- // set new cache
- if (key == null || key.trim().length() == 0) {
- return false;
- }
- if (val == null) {
- remove(key);
- }
- if (cacheTime <= 0) {
- remove(key);
- }
- long timeoutTime = System.currentTimeMillis() + cacheTime;
- LocalCacheData localCacheData = new LocalCacheData(key, val, timeoutTime);
- cacheRepository.put(localCacheData.getKey(), localCacheData);
- return true;
- }
-
- /**
- * remove cache
- *
- * @param key
- * @return
- */
- public static boolean remove(String key) {
- if (key == null || key.trim().length() == 0) {
- return false;
- }
- cacheRepository.remove(key);
- return true;
- }
-
- /**
- * get cache
- *
- * @param key
- * @return
- */
- public static Object get(String key) {
- if (key == null || key.trim().length() == 0) {
- return null;
- }
- LocalCacheData localCacheData = cacheRepository.get(key);
- if (localCacheData != null && System.currentTimeMillis() < localCacheData.getTimeoutTime()) {
- return localCacheData.getVal();
- } else {
- remove(key);
- return null;
- }
- }
-
- /**
- * clean timeout cache
- *
- * @return
- */
- public static boolean cleanTimeoutCache() {
- if (!cacheRepository.keySet().isEmpty()) {
- for (String key : cacheRepository.keySet()) {
- LocalCacheData localCacheData = cacheRepository.get(key);
- if (localCacheData != null && System.currentTimeMillis() >= localCacheData.getTimeoutTime()) {
- cacheRepository.remove(key);
- }
- }
- }
- return true;
- }
-
-}
diff --git a/src/main/java/org/springblade/xxljob/vo/JobInfoVO.java b/src/main/java/org/springblade/xxljob/vo/JobInfoVO.java
deleted file mode 100644
index 1a7ecbe..0000000
--- a/src/main/java/org/springblade/xxljob/vo/JobInfoVO.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.springblade.xxljob.vo;
-
-import org.springblade.xxljob.entity.JobInfoEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 调度任务信息表 视图实体类
- *
- * @author BladeX
- * @since 2024-01-10
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class JobInfoVO extends JobInfoEntity {
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/org/springblade/xxljob/wrapper/JobInfoWrapper.java b/src/main/java/org/springblade/xxljob/wrapper/JobInfoWrapper.java
deleted file mode 100644
index 2cce7b3..0000000
--- a/src/main/java/org/springblade/xxljob/wrapper/JobInfoWrapper.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.springblade.xxljob.wrapper;
-
-import org.springblade.core.mp.support.BaseEntityWrapper;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.xxljob.entity.JobInfoEntity;
-import org.springblade.xxljob.vo.JobInfoVO;
-import java.util.Objects;
-
-/**
- * 调度任务信息表 包装类,返回视图层所需的字段
- *
- * @author BladeX
- * @since 2024-01-10
- */
-public class JobInfoWrapper extends BaseEntityWrapper<JobInfoEntity, JobInfoVO> {
-
- public static JobInfoWrapper build() {
- return new JobInfoWrapper();
- }
-
- @Override
- public JobInfoVO entityVO(JobInfoEntity jobInfo) {
- JobInfoVO jobInfoVO = Objects.requireNonNull(BeanUtil.copy(jobInfo, JobInfoVO.class));
-
- //User createUser = UserCache.getUser(jobInfo.getCreateUser());
- //User updateUser = UserCache.getUser(jobInfo.getUpdateUser());
- //jobInfoVO.setCreateUserName(createUser.getName());
- //jobInfoVO.setUpdateUserName(updateUser.getName());
-
- return jobInfoVO;
- }
-
-
-}
diff --git a/src/test/java/org/springblade/test/BladeTest.java b/src/test/java/org/springblade/test/BladeTest.java
deleted file mode 100644
index 0098ce5..0000000
--- a/src/test/java/org/springblade/test/BladeTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.springblade.test;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.apache.logging.log4j.util.Strings;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.springblade.common.utils.SpringUtils;
-import org.springblade.core.test.BladeBootTest;
-import org.springblade.core.test.BladeSpringExtension;
-import org.springblade.core.tool.utils.SpringUtil;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.flow.engine.entity.FlowModel;
-import org.springblade.flow.engine.service.FlowEngineService;
-import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
-import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
-import org.springblade.modules.house.entity.HouseEntity;
-import org.springblade.modules.house.service.IHouseService;
-import org.springblade.modules.place.entity.PlaceEntity;
-import org.springblade.modules.place.service.IPlaceService;
-import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
-import org.springblade.modules.police.service.IPoliceAffairsGridService;
-import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
-import org.springblade.modules.task.service.ITaskReportForRepairsService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.List;
-
-/**
- * Blade单元测试
- *
- * @author Chill
- */
-@ExtendWith(BladeSpringExtension.class)
-@BladeBootTest(appName = "blade-runner", enableLoader = true)
-public class BladeTest {
-
- @Autowired
- private FlowEngineService service;
-
- @Autowired
- private IPlaceService iPlaceService;
-
- @Autowired
- private IDoorplateAddressService iDoorplateAddressService;
-
- @Autowired
- private IHouseService iHouseService;
-
-// @Test
- public void test() {
-
- List<PlaceEntity> list = iPlaceService.list();
- for (PlaceEntity placeEntity : list) {
- DoorplateAddressEntity one = iDoorplateAddressService.getOne(Wrappers.<DoorplateAddressEntity>lambdaQuery()
- .eq(DoorplateAddressEntity::getAddressCode, placeEntity.getHouseCode()).last("limit 1"));
- if (one != null) {
- placeEntity.setAoiCode(one.getAoiCode());
- iPlaceService.updateById(placeEntity);
- }
- }
-
- }
-
-// @Test
- public void test2() {
- // 查询 警务网格为空的数据
- List<HouseEntity> list = iHouseService.list(Wrappers.<HouseEntity>lambdaQuery().eq(HouseEntity::getIsDeleted,0));
- // 遍历
- for (HouseEntity houseEntity : list) {
- if (!Strings.isBlank(houseEntity.getLng())) {
- // 空间分析
- //点坐标解析
- String point = "'POINT(" + houseEntity.getLng() + " " + houseEntity.getLat() + ")'";
- List<PoliceAffairsGridEntity> policeAffairsGridEntities
- = SpringUtil.getBean(IPoliceAffairsGridService.class).spatialAnalysis(point);
- if (policeAffairsGridEntities.size() > 0) {
- PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntities.get(0);
- houseEntity.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
- // 更新
- iHouseService.updateById(houseEntity);
- }
- }
- }
- }
-
- @Test
- public void contextLoads() {
- System.out.println("=====数据迁移启动=====");
-
- // 获取 ACT_DE_MODEL 表需要转换的数据
- List<FlowModel> list = service.list();
- // 循环转换
- list.forEach(flowModel -> {
- if (StringUtil.isBlank(flowModel.getModelEditorXml())) {
- service.update(Wrappers.<FlowModel>lambdaUpdate()
- .set(FlowModel::getModelEditorXml, new String(service.getModelEditorXML(flowModel)))
- .ge(FlowModel::getId, flowModel.getId())
- );
- }
- });
-
- System.out.println("=====数据迁移完毕=====");
- }
-
-}
--
Gitblit v1.9.3