From 630cb0babb264657d8a07476e328654573620f8c Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 15 一月 2022 13:41:47 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
service-api/src/main/java/com/java110/api/rest/RestApi.java | 2
service-fee/src/main/java/com/java110/fee/FeeServiceApplicationStart.java | 1
java110-bean/src/main/java/com/java110/po/car/OwnerCarPo.java | 9
java110-interface/src/main/java/com/java110/intf/fee/IPayFeeNewV1InnerServiceSMO.java | 37 +-
service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeNewV1InnerServiceSMOImpl.java | 41 +-
java110-bean/src/main/java/com/java110/po/parkingSpaceApply/ParkingSpaceApplyPo.java | 8
service-api/src/main/java/com/java110/api/ApiApplicationStart.java | 2
service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java | 1
java110-bean/src/main/java/com/java110/dto/fee/PayFeeDto.java | 179 ++++++++++++++++
java110-interface/src/main/java/com/java110/config/feign/FeignConfiguration.java | 7
service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/SaveParkingSpaceApplyCmd.java | 53 ++++
service-order/src/main/java/com/java110/order/OrderServiceApplicationStart.java | 2
java110-db/src/main/resources/mapper/community/ParkingSpaceApplyV1ServiceDaoImplMapper.xml | 3
service-api/src/main/java/com/java110/api/listener/AbstractServiceApiListener.java | 2
service-api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java | 2
service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/UpdateParkingSpaceApplyCmd.java | 106 +++++++++
service-store/src/main/java/com/java110/store/StoreServiceApplicationStart.java | 2
service-api/src/main/java/com/java110/api/controller/app/AppController.java | 3
java110-bean/src/main/java/com/java110/po/fee/PayFeePo.java | 9
java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java | 20 +
java110-bean/src/main/java/com/java110/dto/system/SystemLogDto.java | 18 +
service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java | 1
service-acct/src/main/java/com/java110/acct/AcctServiceApplicationStart.java | 1
java110-core/src/main/java/com/java110/core/client/RestTemplate.java | 9
service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java | 1
service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java | 1
service-common/src/main/java/com/java110/common/dao/impl/TransactionLogServiceDaoImpl.java | 41 +-
service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java | 2
java110-core/src/main/java/com/java110/core/log/LogAgent.java | 9
service-job/src/main/java/com/java110/job/JobServiceApplication.java | 1
java110-core/src/main/java/com/java110/core/factory/CallApiServiceFactory.java | 2
java110-core/src/main/java/com/java110/core/log/LoggerFactory.java | 55 ++--
service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java | 1
33 files changed, 513 insertions(+), 118 deletions(-)
diff --git a/java110-bean/src/main/java/com/java110/dto/fee/PayFeeDto.java b/java110-bean/src/main/java/com/java110/dto/fee/PayFeeDto.java
new file mode 100644
index 0000000..94eef28
--- /dev/null
+++ b/java110-bean/src/main/java/com/java110/dto/fee/PayFeeDto.java
@@ -0,0 +1,179 @@
+package com.java110.dto.fee;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName PayFeePo
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/5/27 22:57
+ * @Version 1.0
+ * add by wuxw 2020/5/27
+ **/
+public class PayFeeDto implements Serializable {
+
+ private String feeId;
+ private String feeTypeCd;
+ private String communityId;
+ private String payerObjId;
+ private String incomeObjId;
+ private String startTime;
+ private String endTime;
+ private String amount;
+ private String userId;
+
+ private String feeFlag;
+ private String state;
+ private String configId;
+ private String payerObjType;
+ private String statusCd = "0";
+ private String createTime;
+ private String batchId;
+
+ private int page;
+ private int row;
+
+ public String getFeeId() {
+ return feeId;
+ }
+
+ public void setFeeId(String feeId) {
+ this.feeId = feeId;
+ }
+
+ public String getFeeTypeCd() {
+ return feeTypeCd;
+ }
+
+ public void setFeeTypeCd(String feeTypeCd) {
+ this.feeTypeCd = feeTypeCd;
+ }
+
+ public String getCommunityId() {
+ return communityId;
+ }
+
+ public void setCommunityId(String communityId) {
+ this.communityId = communityId;
+ }
+
+ public String getPayerObjId() {
+ return payerObjId;
+ }
+
+ public void setPayerObjId(String payerObjId) {
+ this.payerObjId = payerObjId;
+ }
+
+ public String getIncomeObjId() {
+ return incomeObjId;
+ }
+
+ public void setIncomeObjId(String incomeObjId) {
+ this.incomeObjId = incomeObjId;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public String getAmount() {
+ return amount;
+ }
+
+ public void setAmount(String amount) {
+ this.amount = amount;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getFeeFlag() {
+ return feeFlag;
+ }
+
+ public void setFeeFlag(String feeFlag) {
+ this.feeFlag = feeFlag;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getConfigId() {
+ return configId;
+ }
+
+ public void setConfigId(String configId) {
+ this.configId = configId;
+ }
+
+ public String getPayerObjType() {
+ return payerObjType;
+ }
+
+ public void setPayerObjType(String payerObjType) {
+ this.payerObjType = payerObjType;
+ }
+
+ public String getStatusCd() {
+ return statusCd;
+ }
+
+ public void setStatusCd(String statusCd) {
+ this.statusCd = statusCd;
+ }
+
+ public String getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getBatchId() {
+ return batchId;
+ }
+
+ public void setBatchId(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ public int getRow() {
+ return row;
+ }
+
+ public void setRow(int row) {
+ this.row = row;
+ }
+}
diff --git a/java110-bean/src/main/java/com/java110/dto/system/SystemLogDto.java b/java110-bean/src/main/java/com/java110/dto/system/SystemLogDto.java
new file mode 100644
index 0000000..4e60b2e
--- /dev/null
+++ b/java110-bean/src/main/java/com/java110/dto/system/SystemLogDto.java
@@ -0,0 +1,18 @@
+package com.java110.dto.system;
+
+/**
+ * 绯荤粺鏃ュ織
+ */
+public class SystemLogDto {
+
+ private static String logSwatch = "logSwatch";
+ private static String LOG_SWATCH_ON = "ON";
+
+ public static boolean getLogSwatch() {
+ return logSwatch == LOG_SWATCH_ON ? true : false;
+ }
+
+ public static void setLogSwatch(String logSwatch) {
+ logSwatch = logSwatch;
+ }
+}
diff --git a/java110-bean/src/main/java/com/java110/po/car/OwnerCarPo.java b/java110-bean/src/main/java/com/java110/po/car/OwnerCarPo.java
index d766e80..b8ded97 100755
--- a/java110-bean/src/main/java/com/java110/po/car/OwnerCarPo.java
+++ b/java110-bean/src/main/java/com/java110/po/car/OwnerCarPo.java
@@ -28,6 +28,7 @@
private String endTime;
private String state;
+ private String bId;
private String communityId;
private String carTypeCd;
@@ -162,4 +163,12 @@
public void setStatusCd(String statusCd) {
this.statusCd = statusCd;
}
+
+ public String getbId() {
+ return bId;
+ }
+
+ public void setbId(String bId) {
+ this.bId = bId;
+ }
}
diff --git a/java110-bean/src/main/java/com/java110/po/fee/PayFeePo.java b/java110-bean/src/main/java/com/java110/po/fee/PayFeePo.java
index ea3a7e7..59a3657 100755
--- a/java110-bean/src/main/java/com/java110/po/fee/PayFeePo.java
+++ b/java110-bean/src/main/java/com/java110/po/fee/PayFeePo.java
@@ -21,6 +21,7 @@
private String endTime;
private String amount;
private String userId;
+ private String bId;
private String feeFlag;
private String state;
@@ -157,4 +158,12 @@
public void setBatchId(String batchId) {
this.batchId = batchId;
}
+
+ public String getbId() {
+ return bId;
+ }
+
+ public void setbId(String bId) {
+ this.bId = bId;
+ }
}
diff --git a/java110-bean/src/main/java/com/java110/po/parkingSpaceApply/ParkingSpaceApplyPo.java b/java110-bean/src/main/java/com/java110/po/parkingSpaceApply/ParkingSpaceApplyPo.java
index 3f4f283..30de72c 100644
--- a/java110-bean/src/main/java/com/java110/po/parkingSpaceApply/ParkingSpaceApplyPo.java
+++ b/java110-bean/src/main/java/com/java110/po/parkingSpaceApply/ParkingSpaceApplyPo.java
@@ -42,6 +42,7 @@
private String applyPersonId;
private String endTime;
private String state;
+private String feeId;
private String communityId;
public String getCarBrand() {
return carBrand;
@@ -140,6 +141,11 @@
this.communityId = communityId;
}
+ public String getFeeId() {
+ return feeId;
+ }
-
+ public void setFeeId(String feeId) {
+ this.feeId = feeId;
+ }
}
diff --git a/java110-core/src/main/java/com/java110/core/client/RestTemplate.java b/java110-core/src/main/java/com/java110/core/client/RestTemplate.java
index 249ff9f..8267e15 100755
--- a/java110-core/src/main/java/com/java110/core/client/RestTemplate.java
+++ b/java110-core/src/main/java/com/java110/core/client/RestTemplate.java
@@ -1,12 +1,10 @@
package com.java110.core.client;
+import com.java110.core.log.LoggerFactory;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.client.RequestCallback;
-import org.springframework.web.client.ResponseExtractor;
import org.springframework.web.client.RestClientException;
/**
@@ -22,6 +20,7 @@
/**
* 閲嶅啓spring RestTemplate绫� 鍔犲叆鏃ュ織绛変俊鎭�
+ *
* @param url
* @param method
* @param requestEntity
@@ -35,9 +34,9 @@
public <T> ResponseEntity<T> exchange(String url, HttpMethod method,
HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables) throws RestClientException {
- logger.debug("璇锋眰淇℃伅锛歶rl:{},method:{},request:{},uriVariables:{}",url,method,requestEntity,uriVariables);
+ logger.debug("璇锋眰淇℃伅锛歶rl:{},method:{},request:{},uriVariables:{}", url, method, requestEntity, uriVariables);
ResponseEntity<T> responseEntity = super.exchange(url, method, requestEntity, responseType, uriVariables);
- logger.debug("杩斿洖淇℃伅锛歳esponseEntity:{}",responseEntity);
+ logger.debug("杩斿洖淇℃伅锛歳esponseEntity:{}", responseEntity);
return responseEntity;
}
diff --git a/java110-core/src/main/java/com/java110/core/factory/CallApiServiceFactory.java b/java110-core/src/main/java/com/java110/core/factory/CallApiServiceFactory.java
index bff1929..58c05ee 100755
--- a/java110-core/src/main/java/com/java110/core/factory/CallApiServiceFactory.java
+++ b/java110-core/src/main/java/com/java110/core/factory/CallApiServiceFactory.java
@@ -4,6 +4,7 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.IPageData;
import com.java110.core.context.PageData;
+import com.java110.core.log.LoggerFactory;
import com.java110.dto.app.AppDto;
import com.java110.utils.constant.CommonConstant;
import com.java110.utils.exception.SMOException;
@@ -13,7 +14,6 @@
import com.java110.utils.util.StringUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.web.client.HttpStatusCodeException;
diff --git a/java110-core/src/main/java/com/java110/core/log/LogAgent.java b/java110-core/src/main/java/com/java110/core/log/LogAgent.java
index dc63986..1e44083 100755
--- a/java110-core/src/main/java/com/java110/core/log/LogAgent.java
+++ b/java110-core/src/main/java/com/java110/core/log/LogAgent.java
@@ -25,8 +25,7 @@
public static final String LOG_STATUS_S = "S";
public static final String LOG_STATUS_F = "F";
- private static String logSwatch = "logSwatch";
- private static String LOG_SWATCH_ON = "ON";
+
/**
@@ -139,11 +138,5 @@
return message;
}
- public static boolean getLogSwatch() {
- return logSwatch == LogAgent.LOG_SWATCH_ON?true:false;
- }
- public static void setLogSwatch(String logSwatch) {
- LogAgent.logSwatch = logSwatch;
- }
}
diff --git a/java110-core/src/main/java/com/java110/core/log/LoggerFactory.java b/java110-core/src/main/java/com/java110/core/log/LoggerFactory.java
index 258b4f7..b893ec1 100644
--- a/java110-core/src/main/java/com/java110/core/log/LoggerFactory.java
+++ b/java110-core/src/main/java/com/java110/core/log/LoggerFactory.java
@@ -1,5 +1,6 @@
package com.java110.core.log;
+import com.java110.dto.system.SystemLogDto;
import org.slf4j.Logger;
import org.slf4j.Marker;
@@ -25,23 +26,23 @@
@Override
public boolean isTraceEnabled() {
- return LogAgent.getLogSwatch();
+ return SystemLogDto.getLogSwatch();
}
@Override
public boolean isDebugEnabled() {
- return LogAgent.getLogSwatch();
+ return SystemLogDto.getLogSwatch();
}
@Override
public boolean isInfoEnabled() {
- return LogAgent.getLogSwatch();
+ return SystemLogDto.getLogSwatch();
}
@Override
public boolean isErrorEnabled() {
- return LogAgent.getLogSwatch();
+ return SystemLogDto.getLogSwatch();
}
@@ -61,35 +62,35 @@
return this.logger.isDebugEnabled(marker);
}
public void trace(String message) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(this.logPrefix + message);
}
}
public void trace(String message, Object arg) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(this.logPrefix + message, arg);
}
}
public void trace(String message, Object arg1, Object arg2) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(this.logPrefix + message, arg1, arg2);
}
}
public void trace(String message, Object... args) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(this.logPrefix + message, args);
}
}
public void trace(String msg, Throwable t) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(this.logPrefix + msg, t);
}
@@ -101,35 +102,35 @@
}
public void trace(Marker marker, String msg) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(marker, this.logPrefix + msg);
}
}
public void trace(Marker marker, String format, Object arg) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(marker, this.logPrefix + format, arg);
}
}
public void trace(Marker marker, String format, Object arg1, Object arg2) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(marker, this.logPrefix + format, arg1, arg2);
}
}
public void trace(Marker marker, String format, Object... argArray) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(marker, this.logPrefix + format, argArray);
}
}
public void trace(Marker marker, String msg, Throwable t) {
- if (this.logger.isTraceEnabled()) {
+ if (this.isTraceEnabled()) {
this.logger.trace(marker, this.logPrefix + msg, t);
}
@@ -137,35 +138,35 @@
public void debug(String message) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(this.logPrefix + message);
}
}
public void debug(String message, Object arg) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(this.logPrefix + message, arg);
}
}
public void debug(String message, Object arg1, Object arg2) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(this.logPrefix + message, arg1, arg2);
}
}
public void debug(String message, Object... args) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(this.logPrefix + message, args);
}
}
public void debug(String msg, Throwable t) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(this.logPrefix + msg, t);
}
@@ -173,35 +174,35 @@
public void debug(Marker marker, String msg) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(marker, this.logPrefix + msg);
}
}
public void debug(Marker marker, String format, Object arg) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(marker, this.logPrefix + format, arg);
}
}
public void debug(Marker marker, String format, Object arg1, Object arg2) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(marker, this.logPrefix + format, arg1, arg2);
}
}
public void debug(Marker marker, String format, Object... arguments) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(marker, this.logPrefix + format, arguments);
}
}
public void debug(Marker marker, String msg, Throwable t) {
- if (this.logger.isDebugEnabled()) {
+ if (this.isDebugEnabled()) {
this.logger.debug(marker, this.logPrefix + msg, t);
}
@@ -272,7 +273,7 @@
}
public void error(String message, Object... args) {
- if (this.logger.isErrorEnabled()) {
+ if (this.isErrorEnabled()) {
this.logger.error(this.logPrefix + message, args);
}
}
@@ -304,7 +305,7 @@
}
public void info(String message) {
- if (this.logger.isInfoEnabled()) {
+ if (this.isInfoEnabled()) {
this.logger.info(this.logPrefix + message);
}
}
@@ -318,7 +319,7 @@
}
public void info(String message, Object... args) {
- if (this.logger.isInfoEnabled()) {
+ if (this.isInfoEnabled()) {
this.logger.info(this.logPrefix + message, args);
}
}
diff --git a/java110-db/src/main/resources/mapper/community/ParkingSpaceApplyV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/ParkingSpaceApplyV1ServiceDaoImplMapper.xml
index 960fc25..679fe2e 100644
--- a/java110-db/src/main/resources/mapper/community/ParkingSpaceApplyV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/ParkingSpaceApplyV1ServiceDaoImplMapper.xml
@@ -103,6 +103,9 @@
<if test="psId !=null and psId != ''">
, t.ps_id= #{psId}
</if>
+<if test="feeId !=null and feeId != ''">
+, t.fee_id= #{feeId}
+</if>
<if test="remark !=null and remark != ''">
, t.remark= #{remark}
</if>
diff --git a/java110-interface/src/main/java/com/java110/config/feign/FeignConfiguration.java b/java110-interface/src/main/java/com/java110/config/feign/FeignConfiguration.java
index 2347c5e..729d58b 100755
--- a/java110-interface/src/main/java/com/java110/config/feign/FeignConfiguration.java
+++ b/java110-interface/src/main/java/com/java110/config/feign/FeignConfiguration.java
@@ -1,5 +1,6 @@
package com.java110.config.feign;
+import com.java110.dto.system.SystemLogDto;
import feign.Logger;
import feign.codec.ErrorDecoder;
import org.springframework.context.annotation.Bean;
@@ -22,7 +23,11 @@
@Bean
Logger.Level feignLoggerLevel() {
//杩欓噷璁板綍鎵�鏈夛紝鏍规嵁瀹為檯鎯呭喌閫夋嫨鍚堥�傜殑鏃ュ織level
- return Logger.Level.FULL;
+ if (SystemLogDto.getLogSwatch()) {
+ return Logger.Level.FULL;
+ } else {
+ return Logger.Level.NONE;
+ }
}
diff --git a/java110-interface/src/main/java/com/java110/intf/fee/IPayFeeNewV1InnerServiceSMO.java b/java110-interface/src/main/java/com/java110/intf/fee/IPayFeeNewV1InnerServiceSMO.java
index 53afbfc..32b1363 100644
--- a/java110-interface/src/main/java/com/java110/intf/fee/IPayFeeNewV1InnerServiceSMO.java
+++ b/java110-interface/src/main/java/com/java110/intf/fee/IPayFeeNewV1InnerServiceSMO.java
@@ -16,6 +16,7 @@
package com.java110.intf.fee;
import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.fee.PayFeeDto;
import com.java110.po.fee.PayFeePo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
@@ -46,22 +47,22 @@
@RequestMapping(value = "/deletePayFeeNew", method = RequestMethod.POST)
public int deletePayFeeNew(@RequestBody PayFeePo PayFeePo);
-// /**
-// * <p>鏌ヨ灏忓尯妤间俊鎭�</p>
-// *
-// *
-// * @param PayFeeDto 鏁版嵁瀵硅薄鍒嗕韩
-// * @return PayFeeDto 瀵硅薄鏁版嵁
-// */
-// @RequestMapping(value = "/queryPayFeeNews", method = RequestMethod.POST)
-// List<PayFeeDto> queryPayFeeNews(@RequestBody PayFeeDto PayFeeDto);
-//
-// /**
-// * 鏌ヨ<p>灏忓尯妤�</p>鎬昏褰曟暟
-// *
-// * @param PayFeeDto 鏁版嵁瀵硅薄鍒嗕韩
-// * @return 灏忓尯涓嬬殑灏忓尯妤艰褰曟暟
-// */
-// @RequestMapping(value = "/queryPayFeeNewsCount", method = RequestMethod.POST)
-// int queryPayFeeNewsCount(@RequestBody PayFeeDto PayFeeDto);
+ /**
+ * <p>鏌ヨ灏忓尯妤间俊鎭�</p>
+ *
+ *
+ * @param payFeeDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return PayFeeDto 瀵硅薄鏁版嵁
+ */
+ @RequestMapping(value = "/queryPayFeeNews", method = RequestMethod.POST)
+ List<PayFeeDto> queryPayFeeNews(@RequestBody PayFeeDto payFeeDto);
+
+ /**
+ * 鏌ヨ<p>灏忓尯妤�</p>鎬昏褰曟暟
+ *
+ * @param payFeeDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return 灏忓尯涓嬬殑灏忓尯妤艰褰曟暟
+ */
+ @RequestMapping(value = "/queryPayFeeNewsCount", method = RequestMethod.POST)
+ int queryPayFeeNewsCount(@RequestBody PayFeeDto payFeeDto);
}
diff --git a/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java b/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java
index 108a64f..a352825 100755
--- a/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java
+++ b/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java
@@ -1,6 +1,6 @@
package com.java110.service.init;
-import com.java110.core.log.LogAgent;
+import com.java110.dto.system.SystemLogDto;
import com.java110.utils.factory.ApplicationContextFactory;
import com.java110.utils.util.StringUtil;
import org.slf4j.Logger;
@@ -17,23 +17,31 @@
private static Environment env;
- public static void initSystemConfig(ApplicationContext context){
+ public static void initSystemConfig(ApplicationContext context) {
//鍔犺浇閰嶇疆鏂囦欢锛屾敞鍐岃鍗曞鐞嗕睛鍚�
try {
ApplicationContextFactory.setApplicationContext(context);
env = context.getEnvironment();
String logSwitch = env.getProperty("LogSwitch");
- if(!StringUtil.isEmpty(logSwitch)){
+ if (!StringUtil.isEmpty(logSwitch)) {
//璁剧疆鏃ュ織绾у埆
- LogAgent.setLogSwatch(logSwitch);
+ SystemLogDto.setLogSwatch(logSwitch);
}
- }
- catch (Exception ex) {
+ } catch (Exception ex) {
throw new IllegalStateException("绯荤粺鍒濆鍖栧け璐�", ex);
}
}
+ public static void preInitSystemConfig() {
+ //鍔犺浇閰嶇疆鏂囦欢锛屾敞鍐岃鍗曞鐞嗕睛鍚�
+ String logSwitch = System.getenv("LogSwitch");
+ if (!StringUtil.isEmpty(logSwitch)) {
+ //璁剧疆鏃ュ織绾у埆
+ SystemLogDto.setLogSwatch(logSwitch);
+ }
+ }
+
}
diff --git a/service-acct/src/main/java/com/java110/acct/AcctServiceApplicationStart.java b/service-acct/src/main/java/com/java110/acct/AcctServiceApplicationStart.java
index 171125c..11cfc06 100644
--- a/service-acct/src/main/java/com/java110/acct/AcctServiceApplicationStart.java
+++ b/service-acct/src/main/java/com/java110/acct/AcctServiceApplicationStart.java
@@ -49,6 +49,7 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(AcctServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
//鍔犺浇涓氬姟渚﹀惉
diff --git a/service-api/src/main/java/com/java110/api/ApiApplicationStart.java b/service-api/src/main/java/com/java110/api/ApiApplicationStart.java
index ffd52f2..79e94f9 100755
--- a/service-api/src/main/java/com/java110/api/ApiApplicationStart.java
+++ b/service-api/src/main/java/com/java110/api/ApiApplicationStart.java
@@ -131,8 +131,8 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(ApiApplicationStart.class, args);
-
//鏈嶅姟鍚姩鍔犺浇
ServiceStartInit.initSystemConfig(context);
} catch (Throwable e) {
diff --git a/service-api/src/main/java/com/java110/api/controller/app/AppController.java b/service-api/src/main/java/com/java110/api/controller/app/AppController.java
index 62b40f8..753664d 100644
--- a/service-api/src/main/java/com/java110/api/controller/app/AppController.java
+++ b/service-api/src/main/java/com/java110/api/controller/app/AppController.java
@@ -21,12 +21,13 @@
import com.java110.api.smo.privilege.IPrivilegeSMO;
import com.java110.core.base.controller.BaseController;
import com.java110.core.context.IPageData;
+import com.java110.core.log.LoggerFactory;
import com.java110.utils.constant.CommonConstant;
import com.java110.vo.ResultVo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
diff --git a/service-api/src/main/java/com/java110/api/listener/AbstractServiceApiListener.java b/service-api/src/main/java/com/java110/api/listener/AbstractServiceApiListener.java
index b4c3297..54cccc6 100755
--- a/service-api/src/main/java/com/java110/api/listener/AbstractServiceApiListener.java
+++ b/service-api/src/main/java/com/java110/api/listener/AbstractServiceApiListener.java
@@ -3,8 +3,8 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.core.log.LoggerFactory;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import java.text.ParseException;
diff --git a/service-api/src/main/java/com/java110/api/rest/RestApi.java b/service-api/src/main/java/com/java110/api/rest/RestApi.java
index 4c90ec4..7fcbf93 100755
--- a/service-api/src/main/java/com/java110/api/rest/RestApi.java
+++ b/service-api/src/main/java/com/java110/api/rest/RestApi.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.api.smo.IApiServiceSMO;
import com.java110.core.base.controller.BaseController;
+import com.java110.core.log.LoggerFactory;
import com.java110.intf.user.IUserInnerServiceSMO;
import com.java110.utils.constant.CommonConstant;
import com.java110.vo.ResultVo;
@@ -10,7 +11,6 @@
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
diff --git a/service-api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java b/service-api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java
index 88d9b73..2abdef8 100755
--- a/service-api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java
+++ b/service-api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.smo.IApiServiceSMO;
+import com.java110.core.log.LoggerFactory;
import com.java110.core.smo.ISaveTransactionLogSMO;
import com.java110.core.client.RestTemplate;
import com.java110.core.context.ApiDataFlow;
@@ -35,7 +36,6 @@
import com.java110.vo.ResultVo;
import org.apache.commons.lang3.math.NumberUtils;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
diff --git a/service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java b/service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java
index ffd72b3..93d3c5c 100755
--- a/service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java
+++ b/service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java
@@ -103,6 +103,7 @@
}
public static void main(String[] args) throws Exception {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(CommonServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
diff --git a/service-common/src/main/java/com/java110/common/dao/impl/TransactionLogServiceDaoImpl.java b/service-common/src/main/java/com/java110/common/dao/impl/TransactionLogServiceDaoImpl.java
index 4668917..653e64e 100755
--- a/service-common/src/main/java/com/java110/common/dao/impl/TransactionLogServiceDaoImpl.java
+++ b/service-common/src/main/java/com/java110/common/dao/impl/TransactionLogServiceDaoImpl.java
@@ -1,15 +1,13 @@
package com.java110.common.dao.impl;
import com.alibaba.fastjson.JSONObject;
+import com.java110.common.dao.ITransactionLogServiceDao;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.core.log.LoggerFactory;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.DAOException;
-import com.java110.utils.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.common.dao.ITransactionLogServiceDao;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@@ -25,37 +23,36 @@
private static Logger logger = LoggerFactory.getLogger(TransactionLogServiceDaoImpl.class);
-
-
-
/**
* 淇濆瓨浜や簰鏃ュ織淇℃伅 鍒� instance
- * @param info bId 淇℃伅
+ *
+ * @param info bId 淇℃伅
* @throws DAOException DAO寮傚父
*/
@Override
public void saveTransactionLogInfo(Map info) throws DAOException {
- logger.debug("淇濆瓨浜や簰鏃ュ織淇℃伅Instance 鍏ュ弬 info : {}",info);
+ logger.debug("淇濆瓨浜や簰鏃ュ織淇℃伅Instance 鍏ュ弬 info : {}", info);
- int saveFlag = sqlSessionTemplate.insert("transactionLogServiceDaoImpl.saveTransactionLogInfo",info);
+ int saveFlag = sqlSessionTemplate.insert("transactionLogServiceDaoImpl.saveTransactionLogInfo", info);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇濆瓨浜や簰鏃ュ織淇℃伅Instance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇濆瓨浜や簰鏃ュ織淇℃伅Instance鏁版嵁澶辫触锛�" + JSONObject.toJSONString(info));
}
}
/**
* 鏌ヨ浜や簰鏃ュ織淇℃伅锛坕nstance锛�
+ *
* @param info bId 淇℃伅
* @return List<Map>
* @throws DAOException DAO寮傚父
*/
@Override
public List<Map> getTransactionLogInfo(Map info) throws DAOException {
- logger.debug("鏌ヨ浜や簰鏃ュ織淇℃伅 鍏ュ弬 info : {}",info);
+ logger.debug("鏌ヨ浜や簰鏃ュ織淇℃伅 鍏ュ弬 info : {}", info);
- List<Map> businessTransactionLogInfos = sqlSessionTemplate.selectList("transactionLogServiceDaoImpl.getTransactionLogInfo",info);
+ List<Map> businessTransactionLogInfos = sqlSessionTemplate.selectList("transactionLogServiceDaoImpl.getTransactionLogInfo", info);
return businessTransactionLogInfos;
}
@@ -63,28 +60,30 @@
/**
* 淇敼浜や簰鏃ュ織淇℃伅
+ *
* @param info 淇敼淇℃伅
* @throws DAOException DAO寮傚父
*/
@Override
public void updateTransactionLogInfo(Map info) throws DAOException {
- logger.debug("淇敼浜や簰鏃ュ織淇℃伅Instance 鍏ュ弬 info : {}",info);
+ logger.debug("淇敼浜や簰鏃ュ織淇℃伅Instance 鍏ュ弬 info : {}", info);
- int saveFlag = sqlSessionTemplate.update("transactionLogServiceDaoImpl.updateTransactionLogInfo",info);
+ int saveFlag = sqlSessionTemplate.update("transactionLogServiceDaoImpl.updateTransactionLogInfo", info);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇敼浜や簰鏃ュ織淇℃伅Instance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇敼浜や簰鏃ュ織淇℃伅Instance鏁版嵁澶辫触锛�" + JSONObject.toJSONString(info));
}
}
- /**
+ /**
* 鏌ヨ浜や簰鏃ュ織鏁伴噺
+ *
* @param info 浜や簰鏃ュ織淇℃伅
* @return 浜や簰鏃ュ織鏁伴噺
*/
@Override
public int queryTransactionLogsCount(Map info) {
- logger.debug("鏌ヨ浜や簰鏃ュ織鏁版嵁 鍏ュ弬 info : {}",info);
+ logger.debug("鏌ヨ浜や簰鏃ュ織鏁版嵁 鍏ュ弬 info : {}", info);
List<Map> businessTransactionLogInfos = sqlSessionTemplate.selectList("transactionLogServiceDaoImpl.queryTransactionLogsCount", info);
if (businessTransactionLogInfos.size() < 1) {
diff --git a/service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java b/service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java
index 5eb2e92..9a47133 100755
--- a/service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java
+++ b/service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java
@@ -86,6 +86,7 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(CommunityServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
} catch (Throwable e) {
diff --git a/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/SaveParkingSpaceApplyCmd.java b/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/SaveParkingSpaceApplyCmd.java
index fae17ea..c89cb3c 100644
--- a/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/SaveParkingSpaceApplyCmd.java
+++ b/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/SaveParkingSpaceApplyCmd.java
@@ -22,8 +22,14 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.fee.PayFeeDto;
+import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.owner.OwnerDto;
import com.java110.dto.parkingSpaceApply.ParkingSpaceApplyDto;
import com.java110.intf.community.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.intf.fee.IPayFeeNewV1InnerServiceSMO;
+import com.java110.intf.user.IBuildingOwnerV1InnerServiceSMO;
+import com.java110.intf.user.IOwnerCarV1InnerServiceSMO;
import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -32,6 +38,10 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.List;
/**
* 绫昏〃杩帮細淇濆瓨
@@ -52,6 +62,12 @@
@Autowired
private IParkingSpaceApplyV1InnerServiceSMO parkingSpaceApplyV1InnerServiceSMOImpl;
+ @Autowired
+ private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl;
+ @Autowired
+ private IPayFeeNewV1InnerServiceSMO payFeeNewV1InnerServiceSMOImpl;
+ @Autowired
+ private IBuildingOwnerV1InnerServiceSMO buildingOwnerV1InnerServiceSMOImpl;
@Override
public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@ -65,21 +81,54 @@
Assert.hasKeyAndValue(reqJson, "applyPersonName", "璇锋眰鎶ユ枃涓湭鍖呭惈applyPersonName");
Assert.hasKeyAndValue(reqJson, "applyPersonLink", "璇锋眰鎶ユ枃涓湭鍖呭惈applyPersonLink");
Assert.hasKeyAndValue(reqJson, "applyPersonId", "璇锋眰鎶ユ枃涓湭鍖呭惈applyPersonId");
+ Assert.hasKeyAndValue(reqJson, "communityId", "璇锋眰鎶ユ枃涓湭鍖呭惈communityId");
}
@Override
@Java110Transactional
public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
ParkingSpaceApplyPo parkingSpaceApplyPo = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyPo.class);
+ /**
+ * 1銆佽粖浣嶇敵璜嬪垽鏂疯粖杓涙槸鍚﹀瓨鍦╫wner_car锛屽鏋滃瓨鍦ㄥ垽鏂槸鍚︽湁2008001鐨勮垂鐢紝
+ * car_id鏄垂鐢ㄨ〃涓殑payer_obj_id銆傜敵璇风殑鏃跺�欏垽鏂笅owner_id鏄惁涓�-1锛岃繕闇�鍒皁wner琛ㄤ腑鏍¢獙鍦ㄤ笉鍦紝
+ * 2銆佸鏍哥殑鏃讹紝鍒ゆ柇杞﹁締鏄惁鍦╫wner_car涓湁锛屾湁灏辫烦杩囥�� 娌℃湁鐨勮瘽鍐欏叆owner_car锛�--閮借鍐欏叆pay_fee銆�
+ * 3銆佹敮浠樻垚鍔熷悗锛屽洖璋冩柟娉曚腑鍒锋柊鐢宠琛ㄧ姸鎬併��
+ */
+ //鐢宠鐨勬椂鍊欏垽鏂笅owner_id鏄惁涓�-1
+ if ("-1".equals(parkingSpaceApplyPo.getApplyPersonId())) {
+ throw new CmdException("娓稿韬唤涓嶈兘鐢宠杞︿綅锛�");
+ }
+ //杩橀渶鍒皁wner琛ㄤ腑鏍¢獙鍦ㄤ笉鍦�,涓嶆槸涓氫富鍒欎笉鑳界敵璇�
+ OwnerDto ownerDto = new OwnerDto();
+ ownerDto.setOwnerId(parkingSpaceApplyPo.getApplyPersonId());
+ List<OwnerDto> ownerDtos = buildingOwnerV1InnerServiceSMOImpl.queryBuildingOwners(ownerDto);
+ if (ownerDtos == null || ownerDtos.size() < 1) {
+ throw new CmdException("涓嶆槸鏈皬鍖轰笟涓讳笉鑳界敵璇疯溅浣嶏紒");
+ }
+ //鍒ゆ柇杞﹁締鏄惁宸茬粡鏈夌敵璇峰崟
ParkingSpaceApplyDto parkingSpaceApplyDto = new ParkingSpaceApplyDto();
- parkingSpaceApplyDto.setCarNum(parkingSpaceApplyDto.getCarNum());
+ parkingSpaceApplyDto.setCarNum(parkingSpaceApplyPo.getCarNum());
parkingSpaceApplyDto.setState("1001");//瀹℃牳涓�
int count = parkingSpaceApplyV1InnerServiceSMOImpl.queryParkingSpaceApplysCount(parkingSpaceApplyDto);
if (count > 1) {
throw new CmdException("褰撳墠杞﹁締鐢宠澶勭悊瀹℃牳涓紝涓嶈兘閲嶅鐢宠銆�");
}
+ //杌婁綅鐢宠珛鍒ゆ柗杌婅紱鏄惁瀛樺湪owner_car锛屽鏋滃瓨鍦ㄥ垽鏂槸鍚︽湁2008001鐨勮垂鐢�
+ OwnerCarDto ownerCarDto = new OwnerCarDto();
+ ownerCarDto.setCarNum(parkingSpaceApplyPo.getCarNum());
+ ownerCarDto.setCommunityId(parkingSpaceApplyPo.getCommunityId());
+ List<OwnerCarDto> ownerCarDtos = ownerCarV1InnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
+ if (ownerCarDtos != null && ownerCarDtos.size() > 0) {
+ PayFeeDto payFeeDto = new PayFeeDto();
+ payFeeDto.setPayerObjId(ownerCarDtos.get(0).getCarId());
+ payFeeDto.setState("2008001");
+ List<PayFeeDto> payFeeDtos = payFeeNewV1InnerServiceSMOImpl.queryPayFeeNews(payFeeDto);
+ if (payFeeDtos != null && payFeeDtos.size() > 0) {
+ throw new CmdException("璇ヨ溅杈嗗凡缁忔湁鐩稿叧璐圭敤锛岃鍒板仠杞﹁垂涓画璐广�傛垨鑰呰仈绯荤鐞嗗憳");
+ }
+ }
+
parkingSpaceApplyPo.setApplyId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
int flag = parkingSpaceApplyV1InnerServiceSMOImpl.saveParkingSpaceApply(parkingSpaceApplyPo);
if (flag < 1) {
diff --git a/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/UpdateParkingSpaceApplyCmd.java b/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/UpdateParkingSpaceApplyCmd.java
index 1e9fa5a..051399c 100644
--- a/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/UpdateParkingSpaceApplyCmd.java
+++ b/service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/UpdateParkingSpaceApplyCmd.java
@@ -22,8 +22,20 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.CommunityMemberDto;
+import com.java110.dto.fee.FeeConfigDto;
+import com.java110.dto.fee.PayFeeDto;
+import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.parkingSpaceApply.ParkingSpaceApplyDto;
+import com.java110.intf.community.ICommunityMemberV1InnerServiceSMO;
import com.java110.intf.community.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
+import com.java110.intf.fee.IPayFeeNewV1InnerServiceSMO;
+import com.java110.intf.user.IOwnerCarV1InnerServiceSMO;
+import com.java110.po.car.OwnerCarPo;
+import com.java110.po.fee.PayFeePo;
import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+import com.java110.utils.constant.CommonConstant;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
@@ -32,6 +44,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
+import java.util.List;
/**
@@ -47,11 +61,19 @@
@Java110Cmd(serviceCode = "parkingSpaceApply.updateParkingSpaceApply")
public class UpdateParkingSpaceApplyCmd extends AbstractServiceCmdListener {
- private static Logger logger = LoggerFactory.getLogger(UpdateParkingSpaceApplyCmd.class);
+ private static Logger logger = LoggerFactory.getLogger(UpdateParkingSpaceApplyCmd.class);
-
+ public static final String CODE_PREFIX_ID = "10";
@Autowired
private IParkingSpaceApplyV1InnerServiceSMO parkingSpaceApplyV1InnerServiceSMOImpl;
+ @Autowired
+ private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl;
+ @Autowired
+ private IPayFeeNewV1InnerServiceSMO payFeeNewV1InnerServiceSMOImpl;
+ @Autowired
+ private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
+ @Autowired
+ private ICommunityMemberV1InnerServiceSMO communityMemberV1InnerServiceSMOImpl;
@Override
public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@ -62,15 +84,93 @@
@Override
@Java110Transactional
public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ String userId = cmdDataFlowContext.getReqHeaders().get(CommonConstant.USER_ID);
+ ParkingSpaceApplyPo parkingSpaceApplyPo = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyPo.class);
- ParkingSpaceApplyPo parkingSpaceApplyPo = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyPo.class);
+ PayFeePo payFeePo = new PayFeePo();
+ payFeePo.setFeeId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+ parkingSpaceApplyPo.setFeeId(payFeePo.getFeeId());
int flag = parkingSpaceApplyV1InnerServiceSMOImpl.updateParkingSpaceApply(parkingSpaceApplyPo);
if (flag < 1) {
throw new CmdException("鏇存柊鏁版嵁澶辫触");
}
+ ParkingSpaceApplyDto parkingSpaceApplyDto = new ParkingSpaceApplyDto();
+ parkingSpaceApplyDto.setApplyId(parkingSpaceApplyPo.getApplyId());
+ List<ParkingSpaceApplyDto> parkingSpaceApplyDtos = parkingSpaceApplyV1InnerServiceSMOImpl.queryParkingSpaceApplys(parkingSpaceApplyDto);
+
+ if (parkingSpaceApplyDtos == null || parkingSpaceApplyDtos.size() < 1) {
+ throw new CmdException("鏈煡璇㈠埌鐢宠鍗曪紝璇疯仈绯荤鐞嗗憳");
+ }
+ ParkingSpaceApplyDto parkingSpaceApply = parkingSpaceApplyDtos.get(0);
+
+ //2銆佸鏍哥殑鏃讹紝鍒ゆ柇杞﹁締鏄惁鍦╫wner_car涓湁锛屾湁灏辫烦杩囥�� 娌℃湁鐨勮瘽鍐欏叆owner_car锛�--閮借鍐欏叆pay_fee銆�
+ OwnerCarDto ownerCarDto = new OwnerCarDto();
+ ownerCarDto.setCarNum(parkingSpaceApplyPo.getCarNum());
+ ownerCarDto.setCommunityId(parkingSpaceApplyPo.getCommunityId());
+ List<OwnerCarDto> ownerCarDtos = ownerCarV1InnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
+ String catId = "";
+ OwnerCarPo ownerCarPo = new OwnerCarPo();
+ if (ownerCarDtos == null || ownerCarDtos.size() < 1) {
+ ownerCarPo.setCarId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+ ownerCarPo.setOwnerId(parkingSpaceApply.getApplyPersonId());
+ ownerCarPo.setbId("-1");
+ ownerCarPo.setCarNum(parkingSpaceApply.getCarNum());
+ ownerCarPo.setCarColor(parkingSpaceApply.getCarColor());
+ ownerCarPo.setCarBrand(parkingSpaceApply.getCarBrand());
+ ownerCarPo.setCarType(parkingSpaceApply.getCarType());
+ ownerCarPo.setCarTypeCd("1001");
+ ownerCarPo.setCommunityId(parkingSpaceApply.getCommunityId());
+ ownerCarPo.setMemberId(ownerCarPo.getCarId());
+ ownerCarPo.setStartTime(parkingSpaceApply.getStartTime());
+ ownerCarPo.setEndTime(parkingSpaceApply.getEndTime());
+ ownerCarPo.setPsId(parkingSpaceApply.getPsId());
+ ownerCarPo.setState("1001");
+ ownerCarPo.setUserId(userId);
+ ownerCarPo.setRemark("杞︿綅鐢宠锛岀郴缁熻嚜鍔ㄥ啓鍏�");
+ flag = ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo);
+ if (flag < 1) {
+ throw new CmdException("鏇存柊鏁版嵁澶辫触");
+ }
+ catId = ownerCarPo.getCarId();
+ }else {
+ catId = ownerCarDtos.get(0).getCarId();
+ }
+
+ FeeConfigDto feeConfigDto = new FeeConfigDto();
+ feeConfigDto.setConfigId(parkingSpaceApply.getConfigId());
+ List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto);
+ if (feeConfigDtos == null || feeConfigDtos.size() < 1) {
+ throw new CmdException("鏈煡璇㈠埌鐩稿叧璐圭敤椤硅缃紝璇疯仈绯荤鐞嗗憳");
+ }
+ CommunityMemberDto communityMemberDto = new CommunityMemberDto();
+ communityMemberDto.setCommunityId(parkingSpaceApply.getCommunityId());
+ communityMemberDto.setMemberTypeCd("390001200002");
+ List<CommunityMemberDto> communityMemberDtos = communityMemberV1InnerServiceSMOImpl.queryCommunityMembers(communityMemberDto);
+ if (communityMemberDtos == null || communityMemberDtos.size() < 1) {
+ throw new CmdException("鏈煡璇㈠埌灏忓尯鍜屽晢鎴风殑鍏崇郴锛岃鑱旂郴绠$悊鍛�");
+ }
+ FeeConfigDto feeConfig = feeConfigDtos.get(0);
+ payFeePo.setCommunityId(feeConfig.getCommunityId());
+ payFeePo.setConfigId(feeConfig.getConfigId());
+ payFeePo.setFeeTypeCd(feeConfig.getFeeTypeCd());
+ payFeePo.setPayerObjId(catId);
+ payFeePo.setIncomeObjId(communityMemberDtos.get(0).getMemberId());//鏍规嵁灏忓尯ID鏌ヨstoreId
+ payFeePo.setStartTime(parkingSpaceApply.getStartTime());
+ payFeePo.setEndTime(parkingSpaceApply.getEndTime());
+ payFeePo.setAmount("0");
+ payFeePo.setFeeFlag("1003006");
+ payFeePo.setState("2009001");
+ payFeePo.setPayerObjType("6666");
+ payFeePo.setBatchId("-1");
+ payFeePo.setbId("-1");
+ payFeePo.setUserId(userId);
+ flag = payFeeNewV1InnerServiceSMOImpl.savePayFeeNew(payFeePo);
+ if (flag < 1) {
+ throw new CmdException("鏇存柊鏁版嵁澶辫触");
+ }
cmdDataFlowContext.setResponseEntity(ResultVo.success());
}
}
diff --git a/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java b/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java
index d00cc30..e69cdf4 100644
--- a/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java
+++ b/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java
@@ -77,6 +77,7 @@
}
public static void main(String[] args) throws Exception {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(DevServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
diff --git a/service-fee/src/main/java/com/java110/fee/FeeServiceApplicationStart.java b/service-fee/src/main/java/com/java110/fee/FeeServiceApplicationStart.java
index 78b16ff..0f87b40 100755
--- a/service-fee/src/main/java/com/java110/fee/FeeServiceApplicationStart.java
+++ b/service-fee/src/main/java/com/java110/fee/FeeServiceApplicationStart.java
@@ -64,6 +64,7 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(FeeServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
} catch (Throwable e) {
diff --git a/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeNewV1InnerServiceSMOImpl.java b/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeNewV1InnerServiceSMOImpl.java
index fd48510..fc3a894 100644
--- a/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeNewV1InnerServiceSMOImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeNewV1InnerServiceSMOImpl.java
@@ -16,6 +16,7 @@
package com.java110.fee.smo.impl;
+import com.java110.dto.fee.PayFeeDto;
import com.java110.fee.dao.IPayFeeNewV1ServiceDao;
import com.java110.intf.fee.IPayFeeNewV1InnerServiceSMO;
import com.java110.po.fee.PayFeePo;
@@ -64,25 +65,25 @@
return saveFlag;
}
-// @Override
-// public List<PayFeeNewDto> queryPayFeeNews(@RequestBody PayFeeNewDto payFeeNewDto) {
-//
-// //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
-//
-// int page = payFeeNewDto.getPage();
-//
-// if (page != PageDto.DEFAULT_PAGE) {
-// payFeeNewDto.setPage((page - 1) * payFeeNewDto.getRow());
-// }
-//
-// List<PayFeeNewDto> payFeeNews = BeanConvertUtil.covertBeanList(payFeeNewV1ServiceDaoImpl.getPayFeeNewInfo(BeanConvertUtil.beanCovertMap(payFeeNewDto)), PayFeeNewDto.class);
-//
-// return payFeeNews;
-// }
-//
-//
-// @Override
-// public int queryPayFeeNewsCount(@RequestBody PayFeeNewDto payFeeNewDto) {
-// return payFeeNewV1ServiceDaoImpl.queryPayFeeNewsCount(BeanConvertUtil.beanCovertMap(payFeeNewDto)); }
+ @Override
+ public List<PayFeeDto> queryPayFeeNews(@RequestBody PayFeeDto payFeeNewDto) {
+
+ //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+ int page = payFeeNewDto.getPage();
+
+ if (page != PageDto.DEFAULT_PAGE) {
+ payFeeNewDto.setPage((page - 1) * payFeeNewDto.getRow());
+ }
+
+ List<PayFeeDto> payFeeNews = BeanConvertUtil.covertBeanList(payFeeNewV1ServiceDaoImpl.getPayFeeNewInfo(BeanConvertUtil.beanCovertMap(payFeeNewDto)), PayFeeDto.class);
+
+ return payFeeNews;
+ }
+
+
+ @Override
+ public int queryPayFeeNewsCount(@RequestBody PayFeeDto payFeeNewDto) {
+ return payFeeNewV1ServiceDaoImpl.queryPayFeeNewsCount(BeanConvertUtil.beanCovertMap(payFeeNewDto)); }
}
diff --git a/service-job/src/main/java/com/java110/job/JobServiceApplication.java b/service-job/src/main/java/com/java110/job/JobServiceApplication.java
index 9a116c3..852ed8f 100755
--- a/service-job/src/main/java/com/java110/job/JobServiceApplication.java
+++ b/service-job/src/main/java/com/java110/job/JobServiceApplication.java
@@ -79,6 +79,7 @@
}
public static void main(String[] args) throws Exception {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(JobServiceApplication.class, args);
ServiceStartInit.initSystemConfig(context);
//鍔犺浇涓氬姟渚﹀惉
diff --git a/service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java b/service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java
index 71244b3..e2451d2 100644
--- a/service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java
+++ b/service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java
@@ -89,6 +89,7 @@
}
public static void main(String[] args) throws Exception {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(OaServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
diff --git a/service-order/src/main/java/com/java110/order/OrderServiceApplicationStart.java b/service-order/src/main/java/com/java110/order/OrderServiceApplicationStart.java
index aa2fa3b..127cf8b 100755
--- a/service-order/src/main/java/com/java110/order/OrderServiceApplicationStart.java
+++ b/service-order/src/main/java/com/java110/order/OrderServiceApplicationStart.java
@@ -104,6 +104,8 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
+
ApplicationContext context = SpringApplication.run(OrderServiceApplicationStart.class, args);
//鏈嶅姟鍚姩鍔犺浇
diff --git a/service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java b/service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java
index e9e60ac..b168075 100755
--- a/service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java
+++ b/service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java
@@ -77,6 +77,8 @@
}
public static void main(String[] args) throws Exception {
+ ServiceStartInit.preInitSystemConfig();
+
ApplicationContext context = SpringApplication.run(ReportServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
diff --git a/service-store/src/main/java/com/java110/store/StoreServiceApplicationStart.java b/service-store/src/main/java/com/java110/store/StoreServiceApplicationStart.java
index 13d976b..4e7b39e 100755
--- a/service-store/src/main/java/com/java110/store/StoreServiceApplicationStart.java
+++ b/service-store/src/main/java/com/java110/store/StoreServiceApplicationStart.java
@@ -77,6 +77,8 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
+
ApplicationContext context = SpringApplication.run(StoreServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
//鍔犺浇涓氬姟渚﹀惉
diff --git a/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java b/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java
index c4dc119..faf3c90 100755
--- a/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java
+++ b/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java
@@ -49,6 +49,7 @@
public static void main(String[] args) throws Exception {
try {
+ ServiceStartInit.preInitSystemConfig();
ApplicationContext context = SpringApplication.run(UserServiceApplicationStart.class, args);
ServiceStartInit.initSystemConfig(context);
//鍔犺浇涓氬姟渚﹀惉
--
Gitblit v1.8.0