|
|
@@ -9,6 +9,7 @@ import com.java110.dto.fee.FeeAttrDto;
|
|
|
import com.java110.dto.fee.FeeConfigDto;
|
|
|
import com.java110.dto.fee.FeeDto;
|
|
|
import com.java110.dto.owner.OwnerCarDto;
|
|
|
+import com.java110.dto.owner.OwnerDto;
|
|
|
import com.java110.dto.parking.ParkingSpaceDto;
|
|
|
import com.java110.dto.report.ReportCarDto;
|
|
|
import com.java110.dto.report.ReportFeeDto;
|
|
|
@@ -18,6 +19,7 @@ import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
|
|
|
import com.java110.intf.community.IRoomInnerServiceSMO;
|
|
|
import com.java110.intf.fee.IFeeInnerServiceSMO;
|
|
|
import com.java110.intf.user.IOwnerCarInnerServiceSMO;
|
|
|
+import com.java110.intf.user.IOwnerInnerServiceSMO;
|
|
|
import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo;
|
|
|
import com.java110.utils.constant.ResponseConstant;
|
|
|
import com.java110.utils.exception.ListenerExecuteException;
|
|
|
@@ -69,6 +71,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
|
|
|
@Autowired(required = false)
|
|
|
private ICommunityInnerServiceSMO communityInnerServiceSMOImpl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
|
|
|
+
|
|
|
@Override
|
|
|
public Date getFeeEndTime() {
|
|
|
return null;
|
|
|
@@ -342,6 +347,68 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
|
|
|
return objName;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public OwnerDto getFeeOwnerDto(FeeDto feeDto) {
|
|
|
+ OwnerDto ownerDto = getOwnerDtoByFeeAttr(feeDto);
|
|
|
+ if (ownerDto != null) {
|
|
|
+ return ownerDto;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(feeDto.getPayerObjType())) { //房屋相关
|
|
|
+ ownerDto = new OwnerDto();
|
|
|
+ ownerDto.setRoomId(feeDto.getPayerObjId());
|
|
|
+ ownerDto.setCommunityId(feeDto.getCommunityId());
|
|
|
+ List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
|
|
|
+ Assert.listOnlyOne(ownerDtos, "业主不存在");
|
|
|
+ return ownerDtos.get(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(FeeDto.PAYER_OBJ_TYPE_CAR.equals(feeDto.getPayerObjType())){
|
|
|
+ OwnerCarDto ownerCarDto = new OwnerCarDto();
|
|
|
+ ownerCarDto.setCarId(feeDto.getPayerObjId());
|
|
|
+ ownerCarDto.setCommunityId(feeDto.getCommunityId());
|
|
|
+ List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
|
|
|
+
|
|
|
+ Assert.listOnlyOne(ownerCarDtos,"车辆不存在");
|
|
|
+ ownerDto = new OwnerDto();
|
|
|
+ ownerDto.setOwnerId(ownerCarDtos.get(0).getOwnerId());
|
|
|
+ ownerDto.setCommunityId(feeDto.getCommunityId());
|
|
|
+ List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
|
|
|
+ Assert.listOnlyOne(ownerDtos, "业主不存在");
|
|
|
+ return ownerDtos.get(0);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OwnerDto getOwnerDtoByFeeAttr(FeeDto feeDto) {
|
|
|
+ List<FeeAttrDto> feeAttrDtos = feeDto.getFeeAttrDtos();
|
|
|
+
|
|
|
+ if (feeAttrDtos == null || feeAttrDtos.size() < 1) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ OwnerDto ownerDto = new OwnerDto();
|
|
|
+ for (FeeAttrDto feeAttrDto : feeAttrDtos) {
|
|
|
+ if (feeAttrDto.getSpecCd().equals(FeeAttrDto.SPEC_CD_OWNER_ID)) {
|
|
|
+ ownerDto.setOwnerId(feeAttrDto.getValue());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (feeAttrDto.getSpecCd().equals(FeeAttrDto.SPEC_CD_OWNER_NAME)) {
|
|
|
+ ownerDto.setName(feeAttrDto.getValue());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (feeAttrDto.getSpecCd().equals(FeeAttrDto.SPEC_CD_OWNER_LINK)) {
|
|
|
+ ownerDto.setLink(feeAttrDto.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtil.isEmpty(ownerDto.getOwnerId())) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ownerDto;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void freshFeeObjName(List<FeeDto> feeDtos) {
|
|
|
|
|
|
@@ -510,9 +577,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
|
|
|
int hours = new Double((cycle - Math.floor(cycle)) * futureDay * 24).intValue();
|
|
|
endCalender.add(Calendar.HOUR, hours);
|
|
|
if (FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
|
|
|
- if(feeDto.getDeadlineTime() != null){
|
|
|
- endCalender.setTime(feeDto.getDeadlineTime());
|
|
|
- }else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
|
|
|
+ if (feeDto.getDeadlineTime() != null) {
|
|
|
+ endCalender.setTime(feeDto.getDeadlineTime());
|
|
|
+ } else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
|
|
|
endCalender.setTime(feeDto.getCurReadingTime());
|
|
|
} else if (feeDto.getImportFeeEndTime() == null) {
|
|
|
endCalender.setTime(feeDto.getConfigEndTime());
|
|
|
@@ -842,9 +909,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
|
|
|
}
|
|
|
if (FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
|
|
|
//先取 deadlineTime
|
|
|
- if(feeDto.getDeadlineTime() != null){
|
|
|
+ if (feeDto.getDeadlineTime() != null) {
|
|
|
targetEndDate = feeDto.getDeadlineTime();
|
|
|
- }else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
|
|
|
+ } else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
|
|
|
targetEndDate = feeDto.getCurReadingTime();
|
|
|
} else if (feeDto.getImportFeeEndTime() == null) {
|
|
|
targetEndDate = feeDto.getConfigEndTime();
|