From dea2325896c7f8bd7df5107569b71d15fede79c7 Mon Sep 17 00:00:00 2001
From: xiaogang <905166056@qq.com>
Date: 星期四, 22 九月 2022 20:11:55 +0800
Subject: [PATCH] 1、优化图片异步上传2、bug修复3、合同bug修复4、车场相关问题
---
service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java b/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java
index cc8bc70..f18d147 100644
--- a/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java
+++ b/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java
@@ -13,6 +13,7 @@
import com.java110.dto.UnitDto;
import com.java110.dto.fee.FeeDto;
import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.owner.OwnerRoomRelDto;
import com.java110.dto.parking.ParkingSpaceDto;
import com.java110.intf.community.IFloorInnerServiceSMO;
import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
@@ -22,6 +23,7 @@
import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
import com.java110.intf.fee.IFeeInnerServiceSMO;
import com.java110.intf.user.IOwnerCarInnerServiceSMO;
+import com.java110.intf.user.IOwnerRoomRelV1InnerServiceSMO;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -74,6 +76,9 @@
@Autowired
private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+ @Autowired
+ private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
+
//鍩�
public static final String DOMAIN_COMMON = "DOMAIN.COMMON";
@@ -95,7 +100,7 @@
@Override
public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
if (reqJson.containsKey("roomNum") && !StringUtil.isEmpty(reqJson.getString("roomNum"))) {
- String[] roomNums = reqJson.getString("roomNum").split("-",3);
+ String[] roomNums = reqJson.getString("roomNum").split("-", 3);
if (roomNums == null || roomNums.length != 3) {
throw new IllegalArgumentException("鎴垮眿缂栧彿鏍煎紡閿欒锛�");
}
@@ -128,11 +133,22 @@
}
FeeDto feeDto = BeanConvertUtil.covertBean(reqJson, FeeDto.class);
-
- int count = feeInnerServiceSMOImpl.queryFeesCount(feeDto);
-
List<ApiFeeDataVo> fees = new ArrayList<>();
-
+ if (reqJson.containsKey("ownerId") && !StringUtil.isEmpty(reqJson.getString("ownerId"))) {
+ OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
+ ownerRoomRelDto.setRoomId(reqJson.getString("payerObjId"));
+ ownerRoomRelDto.setOwnerId(reqJson.getString("ownerId"));
+ List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
+ if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) {
+ ApiFeeVo apiFeeVo = new ApiFeeVo();
+ apiFeeVo.setTotal(0);
+ apiFeeVo.setRecords((int) Math.ceil((double) 0 / (double) reqJson.getInteger("row")));
+ apiFeeVo.setFees(fees);
+ ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiFeeVo), HttpStatus.OK);
+ cmdDataFlowContext.setResponseEntity(responseEntity);
+ }
+ }
+ int count = feeInnerServiceSMOImpl.queryFeesCount(feeDto);
if (count > 0) {
List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);//鏌ヨ璐圭敤椤圭洰
computeFeePrice(feeDtos);//璁$畻璐圭敤
--
Gitblit v1.8.0