|
|
@@ -8,12 +8,14 @@ import com.java110.dto.fee.FeeAttrDto;
|
|
|
import com.java110.dto.fee.FeeConfigDto;
|
|
|
import com.java110.dto.fee.FeeDto;
|
|
|
import com.java110.dto.importFee.ImportFeeDto;
|
|
|
+import com.java110.dto.owner.OwnerDto;
|
|
|
import com.java110.entity.assetImport.ImportRoomFee;
|
|
|
import com.java110.fee.bmo.IImportRoomFee;
|
|
|
import com.java110.fee.listener.fee.UpdateFeeInfoListener;
|
|
|
import com.java110.intf.community.IRoomInnerServiceSMO;
|
|
|
import com.java110.intf.fee.*;
|
|
|
import com.java110.intf.user.IOwnerCarInnerServiceSMO;
|
|
|
+import com.java110.intf.user.IOwnerInnerServiceSMO;
|
|
|
import com.java110.po.fee.FeeAttrPo;
|
|
|
import com.java110.po.fee.PayFeeConfigPo;
|
|
|
import com.java110.po.fee.PayFeePo;
|
|
|
@@ -70,6 +72,9 @@ public class ImportRoomFeeImpl implements IImportRoomFee {
|
|
|
@Autowired
|
|
|
private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
|
|
|
+
|
|
|
/**
|
|
|
* 欠费缴费
|
|
|
*
|
|
|
@@ -117,6 +122,24 @@ public class ImportRoomFeeImpl implements IImportRoomFee {
|
|
|
|
|
|
tmpImportRoomFees = roomInnerServiceSMOImpl.freshRoomIds(tmpImportRoomFees);
|
|
|
|
|
|
+ List<String> roomIds = new ArrayList<>();
|
|
|
+ for (ImportRoomFee importRoomFee : tmpImportRoomFees) {
|
|
|
+ roomIds.add(importRoomFee.getRoomId());
|
|
|
+ }
|
|
|
+ OwnerDto ownerDto = new OwnerDto();
|
|
|
+ ownerDto.setCommunityId(tmpImportRoomFees.get(0).getCommunityId());
|
|
|
+ ownerDto.setRoomIds(roomIds.toArray(new String[roomIds.size()]));
|
|
|
+ List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnersByRoom(ownerDto);
|
|
|
+ for (ImportRoomFee importRoomFee : tmpImportRoomFees) {
|
|
|
+ for (OwnerDto tmpOwnerDto : ownerDtos) {
|
|
|
+ if (importRoomFee.getRoomId().equals(tmpOwnerDto.getRoomId())) {
|
|
|
+ importRoomFee.setOwnerId(tmpOwnerDto.getOwnerId());
|
|
|
+ importRoomFee.setOwnerName(tmpOwnerDto.getName());
|
|
|
+ importRoomFee.setOwnerLink(tmpOwnerDto.getLink());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
List<PayFeePo> payFeePos = new ArrayList<>();
|
|
|
List<FeeAttrPo> feeAttrPos = new ArrayList<>();
|
|
|
List<ImportFeeDetailPo> importFeeDetailPos = new ArrayList<>();
|
|
|
@@ -156,6 +179,33 @@ public class ImportRoomFeeImpl implements IImportRoomFee {
|
|
|
feeAttrPo.setValue(importRoomFee.getFeeName());
|
|
|
feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
feeAttrPos.add(feeAttrPo);
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(importRoomFee.getOwnerId())) {
|
|
|
+ feeAttrPo = new FeeAttrPo();
|
|
|
+ feeAttrPo.setCommunityId(communityId);
|
|
|
+ feeAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
|
|
|
+ feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_ID);
|
|
|
+ feeAttrPo.setValue(importRoomFee.getOwnerId());
|
|
|
+ feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
+ feeAttrPos.add(feeAttrPo);
|
|
|
+
|
|
|
+ feeAttrPo = new FeeAttrPo();
|
|
|
+ feeAttrPo.setCommunityId(communityId);
|
|
|
+ feeAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
|
|
|
+ feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_NAME);
|
|
|
+ feeAttrPo.setValue(importRoomFee.getOwnerName());
|
|
|
+ feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
+ feeAttrPos.add(feeAttrPo);
|
|
|
+
|
|
|
+ feeAttrPo = new FeeAttrPo();
|
|
|
+ feeAttrPo.setCommunityId(communityId);
|
|
|
+ feeAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
|
|
|
+ feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_LINK);
|
|
|
+ feeAttrPo.setValue(importRoomFee.getOwnerLink());
|
|
|
+ feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
+ feeAttrPos.add(feeAttrPo);
|
|
|
+ }
|
|
|
+
|
|
|
importFeeDetailPo = new ImportFeeDetailPo();
|
|
|
importFeeDetailPo.setAmount(importRoomFee.getAmount());
|
|
|
importFeeDetailPo.setCommunityId(communityId);
|
|
|
@@ -294,6 +344,33 @@ public class ImportRoomFeeImpl implements IImportRoomFee {
|
|
|
feeAttrPo.setValue(importCarFee.getFeeName());
|
|
|
feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
feeAttrPos.add(feeAttrPo);
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(importCarFee.getOwnerId())) {
|
|
|
+ feeAttrPo = new FeeAttrPo();
|
|
|
+ feeAttrPo.setCommunityId(communityId);
|
|
|
+ feeAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
|
|
|
+ feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_ID);
|
|
|
+ feeAttrPo.setValue(importCarFee.getOwnerId());
|
|
|
+ feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
+ feeAttrPos.add(feeAttrPo);
|
|
|
+
|
|
|
+ feeAttrPo = new FeeAttrPo();
|
|
|
+ feeAttrPo.setCommunityId(communityId);
|
|
|
+ feeAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
|
|
|
+ feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_NAME);
|
|
|
+ feeAttrPo.setValue(importCarFee.getOwnerName());
|
|
|
+ feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
+ feeAttrPos.add(feeAttrPo);
|
|
|
+
|
|
|
+ feeAttrPo = new FeeAttrPo();
|
|
|
+ feeAttrPo.setCommunityId(communityId);
|
|
|
+ feeAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
|
|
|
+ feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_LINK);
|
|
|
+ feeAttrPo.setValue(importCarFee.getOwnerLink());
|
|
|
+ feeAttrPo.setFeeId(payFeePo.getFeeId());
|
|
|
+ feeAttrPos.add(feeAttrPo);
|
|
|
+ }
|
|
|
+
|
|
|
importFeeDetailPo = new ImportFeeDetailPo();
|
|
|
importFeeDetailPo.setAmount(importCarFee.getAmount());
|
|
|
importFeeDetailPo.setCommunityId(communityId);
|