|
@@ -5,13 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.zksy.property.domain.AContractInfo;
|
|
import com.zksy.property.domain.AContractInfo;
|
|
|
|
|
+import com.zksy.property.domain.AHouseInfoDetail;
|
|
|
import com.zksy.property.domain.ASimplifiedHouseInfo;
|
|
import com.zksy.property.domain.ASimplifiedHouseInfo;
|
|
|
import com.zksy.property.domain.bo.*;
|
|
import com.zksy.property.domain.bo.*;
|
|
|
import com.zksy.property.domain.dto.ContractFormDTO;
|
|
import com.zksy.property.domain.dto.ContractFormDTO;
|
|
|
-import com.zksy.property.domain.vo.HouseInfoVo;
|
|
|
|
|
import com.zksy.property.factory.ContractFactory;
|
|
import com.zksy.property.factory.ContractFactory;
|
|
|
import com.zksy.property.mapper.AContractInfoMapper;
|
|
import com.zksy.property.mapper.AContractInfoMapper;
|
|
|
import com.zksy.property.service.AContractInfoService;
|
|
import com.zksy.property.service.AContractInfoService;
|
|
|
|
|
+import com.zksy.property.service.AHouseInfoDetailService;
|
|
|
import com.zksy.property.service.ARentalContractService;
|
|
import com.zksy.property.service.ARentalContractService;
|
|
|
import com.zksy.property.service.ASimplifiedHouseInfoService;
|
|
import com.zksy.property.service.ASimplifiedHouseInfoService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -62,19 +63,22 @@ public class AContractInfoServiceImpl extends ServiceImpl<AContractInfoMapper, A
|
|
|
return this.getOne(queryWrapper);
|
|
return this.getOne(queryWrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private AHouseInfoDetailService aHouseInfoDetailService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public String signContract(ContractFormDTO dto) {
|
|
public String signContract(ContractFormDTO dto) {
|
|
|
- HouseInfoVo houseDetailInfo = aSimplifiedHouseInfoService.getHouseDetailInfo(dto.getHouseId());
|
|
|
|
|
|
|
+ AHouseInfoDetail houseInfoDetail = aHouseInfoDetailService.getBySimplifiedHouseId(dto.getHouseId());
|
|
|
ASimplifiedHouseInfo aSimplifiedHouseInfo = aSimplifiedHouseInfoService.getById(dto.getHouseId());
|
|
ASimplifiedHouseInfo aSimplifiedHouseInfo = aSimplifiedHouseInfoService.getById(dto.getHouseId());
|
|
|
Contract baseContract = ContractFactory.createContract(aSimplifiedHouseInfo.getAssetType());
|
|
Contract baseContract = ContractFactory.createContract(aSimplifiedHouseInfo.getAssetType());
|
|
|
BeanUtil.copyProperties(dto.getContractData(), baseContract);
|
|
BeanUtil.copyProperties(dto.getContractData(), baseContract);
|
|
|
RentalTempBo bo = new RentalTempBo();
|
|
RentalTempBo bo = new RentalTempBo();
|
|
|
var resPath = "";
|
|
var resPath = "";
|
|
|
if (baseContract instanceof ContractA) {
|
|
if (baseContract instanceof ContractA) {
|
|
|
- processContractA((ContractA) baseContract,aSimplifiedHouseInfo,houseDetailInfo, bo);
|
|
|
|
|
|
|
+ processContractA((ContractA) baseContract,aSimplifiedHouseInfo,houseInfoDetail, bo);
|
|
|
resPath = fillContractData(bo, aSimplifiedHouseInfo.getAssetType());
|
|
resPath = fillContractData(bo, aSimplifiedHouseInfo.getAssetType());
|
|
|
} else if (baseContract instanceof ContractB) {
|
|
} else if (baseContract instanceof ContractB) {
|
|
|
- processContractB((ContractB) baseContract, bo);
|
|
|
|
|
|
|
+ processContractB((ContractB) baseContract,aSimplifiedHouseInfo,houseInfoDetail, bo);
|
|
|
resPath = fillContractData(bo, aSimplifiedHouseInfo.getAssetType());
|
|
resPath = fillContractData(bo, aSimplifiedHouseInfo.getAssetType());
|
|
|
} else if (baseContract instanceof ContractC) {
|
|
} else if (baseContract instanceof ContractC) {
|
|
|
processContractC((ContractC) baseContract, bo);
|
|
processContractC((ContractC) baseContract, bo);
|
|
@@ -115,37 +119,37 @@ public class AContractInfoServiceImpl extends ServiceImpl<AContractInfoMapper, A
|
|
|
bo.setC27("");
|
|
bo.setC27("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static void processContractB(ContractB baseContract, RentalTempBo bo) {
|
|
|
|
|
|
|
+ private static void processContractB(ContractB baseContract, ASimplifiedHouseInfo aSimplifiedHouseInfo, AHouseInfoDetail houseDetailInfo,RentalTempBo bo) {
|
|
|
ContractB contractB = baseContract;
|
|
ContractB contractB = baseContract;
|
|
|
//todo 处理bo
|
|
//todo 处理bo
|
|
|
- bo.setB1("");
|
|
|
|
|
- bo.setB2("");
|
|
|
|
|
- bo.setB3("");
|
|
|
|
|
- bo.setB4("");
|
|
|
|
|
- bo.setB5("");
|
|
|
|
|
- bo.setB6("");
|
|
|
|
|
- bo.setB7("");
|
|
|
|
|
- bo.setB8("");
|
|
|
|
|
- bo.setB9("");
|
|
|
|
|
- bo.setB10("");
|
|
|
|
|
- bo.setB11("");
|
|
|
|
|
- bo.setB12("");
|
|
|
|
|
- bo.setB13("");
|
|
|
|
|
- bo.setB14("");
|
|
|
|
|
- bo.setB15("");
|
|
|
|
|
- bo.setB16("");
|
|
|
|
|
- bo.setB17("");
|
|
|
|
|
- bo.setB18("");
|
|
|
|
|
- bo.setB19("");
|
|
|
|
|
- bo.setB20("");
|
|
|
|
|
- bo.setB21("");
|
|
|
|
|
- bo.setB22("");
|
|
|
|
|
- bo.setB23("");
|
|
|
|
|
- bo.setB24("");
|
|
|
|
|
- bo.setB25("");
|
|
|
|
|
- bo.setB26("");
|
|
|
|
|
- bo.setB27("");
|
|
|
|
|
- bo.setB28("");
|
|
|
|
|
|
|
+ bo.setB1(contractB.getPurpose());
|
|
|
|
|
+ bo.setB2(contractB.getLandlordName());
|
|
|
|
|
+ bo.setB3(contractB.getLandlordUniCode());
|
|
|
|
|
+ bo.setB4(contractB.getLandlordLegalRepresentative());
|
|
|
|
|
+ bo.setB5(contractB.getLandlordDuty());
|
|
|
|
|
+ bo.setB6(contractB.getTenantName());
|
|
|
|
|
+ bo.setB7(contractB.getTenantUniCode());
|
|
|
|
|
+ bo.setB8(contractB.getTenantLegalRepresentative());
|
|
|
|
|
+ bo.setB9(contractB.getTenantDuty());
|
|
|
|
|
+ bo.setB10(contractB.getWho());
|
|
|
|
|
+ bo.setB11(contractB.getWhatTime());
|
|
|
|
|
+ bo.setB12(contractB.getTitle());
|
|
|
|
|
+ bo.setB13(aSimplifiedHouseInfo.getHouseName());
|
|
|
|
|
+ bo.setB14(aSimplifiedHouseInfo.getFloor());
|
|
|
|
|
+ bo.setB15(houseDetailInfo.getArea());
|
|
|
|
|
+ bo.setB16(contractB.getSupportingRoomArea());
|
|
|
|
|
+ bo.setB17(contractB.getOfficeArea());
|
|
|
|
|
+ bo.setB18(contractB.getCanteenArea());
|
|
|
|
|
+ bo.setB19(contractB.getTotalLeasedArea());
|
|
|
|
|
+ bo.setB20(contractB.getDormTotalRooms());
|
|
|
|
|
+ bo.setB21(contractB.getDormSmallRooms());
|
|
|
|
|
+ bo.setB22(contractB.getDormLargeRooms());
|
|
|
|
|
+ bo.setB23(contractB.getDeliveryDate());
|
|
|
|
|
+ bo.setB24(contractB.getProductionProject());
|
|
|
|
|
+ bo.setB25(contractB.getLeaseTermYears());
|
|
|
|
|
+ bo.setB26(contractB.getLeaseStartDate());
|
|
|
|
|
+ bo.setB27(contractB.getLeaseEndDate());
|
|
|
|
|
+ bo.setB28(contractB.getRenewNoticeMonths());
|
|
|
bo.setB29("");
|
|
bo.setB29("");
|
|
|
bo.setB30("");
|
|
bo.setB30("");
|
|
|
bo.setB31("");
|
|
bo.setB31("");
|
|
@@ -176,9 +180,8 @@ public class AContractInfoServiceImpl extends ServiceImpl<AContractInfoMapper, A
|
|
|
bo.setB56("");
|
|
bo.setB56("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static void processContractA(ContractA baseContract, ASimplifiedHouseInfo aSimplifiedHouseInfo, HouseInfoVo houseDetailInfo, RentalTempBo bo) {
|
|
|
|
|
|
|
+ private static void processContractA(ContractA baseContract, ASimplifiedHouseInfo aSimplifiedHouseInfo, AHouseInfoDetail houseDetailInfo, RentalTempBo bo) {
|
|
|
ContractA contractA = baseContract;
|
|
ContractA contractA = baseContract;
|
|
|
- //todo 处理bo
|
|
|
|
|
bo.setA1(contractA.getLandlordName());
|
|
bo.setA1(contractA.getLandlordName());
|
|
|
bo.setA2(contractA.getTenantName());
|
|
bo.setA2(contractA.getTenantName());
|
|
|
bo.setA3(aSimplifiedHouseInfo.getAddress());
|
|
bo.setA3(aSimplifiedHouseInfo.getAddress());
|