|
@@ -96,15 +96,12 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
|
|
|
@Override
|
|
|
public Long createTableWord(HouseGuarantyTableDTO houseGuarantyTableDTO) {
|
|
|
- try {
|
|
|
- sleep(500);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
String html = houseGuarantyTableDTO.getHtml();
|
|
|
String homePath = houseGuarantyTableDTO.getHomePath();
|
|
|
+ Long baseId = houseGuarantyTableDTO.getBaseId();
|
|
|
String xHtml = wordTableHelper.htmlTableFormat(html);
|
|
|
HouseGuarantyProcess hgp = new HouseGuarantyProcess();
|
|
|
+ hgp.setBaseId(baseId);
|
|
|
hgp.setHome(homePath);
|
|
|
hgp.setTargetsHtml(html);
|
|
|
hgp.setProcessName(BusinessEnum.HouseGuarantyProcess.CONSIGNOR_LETTER.getMsg());
|
|
@@ -114,32 +111,25 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Long analysisCollect1(Long id) throws Exception {
|
|
|
- HouseGuarantyProcess process = houseGuarantyProcessService.getById(id);
|
|
|
+ public Long analysisCollect1(Long processId) throws Exception {
|
|
|
+ HouseGuarantyProcess process = houseGuarantyProcessService.getById(processId);
|
|
|
String home = fileNetConfig.getBaseDir() + process.getHome();
|
|
|
Workbook workbook = new Workbook( home + COLLECT1_XLSX);
|
|
|
workbook.save(home+ COLLECT1_JSON, SaveFormat.JSON);
|
|
|
|
|
|
|
|
|
//解析估价对象json(估价对象一览表)
|
|
|
- JSONArray array = JsonUtil.file2JsonArray(home + COLLECT1_JSON, TARGETS_TABLE_ZH);
|
|
|
+ JSONArray array = JsonUtil.file2JsonArray(home + COLLECT1_JSON);
|
|
|
JSONArray xArray = HouseDocumentUtil.houseTargetsFormat(array);
|
|
|
List<HouseGuarantyAim> houseGuarantyAims = HouseDocumentUtil.houseTargetsFormatDTO(xArray);
|
|
|
//获取项目名称
|
|
|
String projectName = HouseDocumentUtil.getProjectName(houseGuarantyAims);
|
|
|
|
|
|
-
|
|
|
- //解析估价对象json(基本信息)
|
|
|
- XSSFWorkbook book = new XSSFWorkbook(home + COLLECT1_XLSX);
|
|
|
- Map<String, String> valueMap = EasyExcelUtil.getExcelCellValue(book, BASE_INFO_ZH);
|
|
|
- HouseGuarantyBase houseGuarantyBase = BeanUtil.mapToBean(valueMap, HouseGuarantyBase.class, true);
|
|
|
-
|
|
|
- DocumentProduction dp = buildDocumentProduction(id, projectName, houseGuarantyBase.getDocNo(), houseGuarantyBase.getConsignor());
|
|
|
+ HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
|
|
|
+ DocumentProduction dp = buildDocumentProduction(processId, projectName, base.getDocNo(), base.getConsignor());
|
|
|
documentProductionService.save(dp);
|
|
|
|
|
|
Long docId = dp.getId();
|
|
|
- houseGuarantyBase.setDocId(docId);
|
|
|
- houseGuarantyBaseService.save(houseGuarantyBase);
|
|
|
|
|
|
houseGuarantyAims.stream().forEach(x->{
|
|
|
x.setDocId(docId);
|
|
@@ -152,11 +142,6 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
|
|
|
@Override
|
|
|
public Boolean genConsignorLetter(Long pId,Long docId) {
|
|
|
- try {
|
|
|
- sleep(1000);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
HouseGuarantyProcess process = houseGuarantyProcessService.getById(pId);
|
|
|
String baseDir = fileNetConfig.getBaseDir();
|
|
|
String home = baseDir + process.getHome();
|
|
@@ -167,7 +152,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
.eq(HouseGuarantyAim::getDocId, docId));
|
|
|
|
|
|
//读取基本信息
|
|
|
- HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, docId));
|
|
|
+ HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
|
|
|
|
|
|
Map<String, List<HouseGuarantyAim>> collect = aims.stream().collect(Collectors.groupingBy(HouseGuarantyAim::getTid));
|
|
|
String actDesc = HouseDocumentUtil.combinationTargetDescription(collect);
|
|
@@ -226,7 +211,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
String baseDir = fileNetConfig.getBaseDir();
|
|
|
|
|
|
try {
|
|
|
- HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, id));
|
|
|
+ HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
|
|
|
ConditionDO conditionDO = new ConditionDO();
|
|
|
conditionDO.setAppraiser1(base.getAppraiser1());
|
|
|
conditionDO.setAppraiser2(base.getAppraiser2());
|
|
@@ -247,7 +232,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
|
|
|
//获取土地证信息
|
|
|
List<CertificateLandUse> landCerts = certificateLandUseService.list(new LambdaQueryWrapper<CertificateLandUse>().eq(CertificateLandUse::getBusinessId, id));
|
|
|
- String isCheckOriginCertificate = base.getIsCheckOriginCertificate();
|
|
|
+ Boolean isCheckOriginCertificate = base.getIsCheckOriginCertificate();
|
|
|
|
|
|
|
|
|
//组合一般假设内容
|
|
@@ -323,7 +308,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
try {
|
|
|
//读取估价对象数组
|
|
|
List<HouseGuarantyAim> aims = houseGuarantyAimService.list(new LambdaQueryWrapper<HouseGuarantyAim>().eq(HouseGuarantyAim::getDocId, id));
|
|
|
- HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, id));
|
|
|
+ HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
|
|
|
// JSONArray array = JsonUtil.file2JsonArray(home + TARGETS_JSON);
|
|
|
// JSONObject jsonObject = JsonUtil.file2JsonObject(home + BASE_INFO_JSON);
|
|
|
|
|
@@ -364,7 +349,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
//获取权属信息数据源
|
|
|
List<HouseRightsDTO> houseRightsDTOList = houseTargetEntityService.getHouseRightsDTOList(id);
|
|
|
HouseDocumentUtil.getRightsDesc(doc,houseRightsDTOList,
|
|
|
- HouseDocumentUtil.checkBoolean(base.getIsCheckOriginCertificate()));
|
|
|
+ base.getIsCheckOriginCertificate());
|
|
|
|
|
|
//获取区位状况数据源
|
|
|
List<HouseGuarantyArea> areas = houseGuarantyAreaService.getAreasList(id);
|