|
@@ -2,13 +2,18 @@ package com.siwei.apply.service.third.impl;
|
|
|
|
|
|
|
|
import com.siwei.apply.domain.NodeAttachment;
|
|
import com.siwei.apply.domain.NodeAttachment;
|
|
|
import com.siwei.apply.domain.ProjectWorkflow;
|
|
import com.siwei.apply.domain.ProjectWorkflow;
|
|
|
|
|
+import com.siwei.apply.domain.vo.GyjsydscdjVo;
|
|
|
|
|
+import com.siwei.apply.domain.vo.LandFirstParamVo;
|
|
|
import com.siwei.apply.enums.AloneWorkFlowEnum;
|
|
import com.siwei.apply.enums.AloneWorkFlowEnum;
|
|
|
import com.siwei.apply.mapper.ProjectWorkflowMapper;
|
|
import com.siwei.apply.mapper.ProjectWorkflowMapper;
|
|
|
|
|
+import com.siwei.apply.service.GyjsydscdjService;
|
|
|
import com.siwei.apply.service.NodeAttachmentService;
|
|
import com.siwei.apply.service.NodeAttachmentService;
|
|
|
import com.siwei.apply.service.third.OfferDataService;
|
|
import com.siwei.apply.service.third.OfferDataService;
|
|
|
import com.siwei.apply.utils.ServiceUtil;
|
|
import com.siwei.apply.utils.ServiceUtil;
|
|
|
|
|
+import com.siwei.common.core.exception.ServiceException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -16,7 +21,7 @@ import java.util.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取三方数据服务实现类
|
|
|
|
|
|
|
+ * 获取三方数据服务实现类
|
|
|
*/
|
|
*/
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@Service
|
|
@Service
|
|
@@ -29,6 +34,17 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ProjectWorkflowMapper projectWorkflowMapper;
|
|
private ProjectWorkflowMapper projectWorkflowMapper;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private GyjsydscdjService gyjsydscdjService;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public Map<String, String> get(String projectId) {
|
|
public Map<String, String> get(String projectId) {
|
|
|
return Map.of();
|
|
return Map.of();
|
|
@@ -41,16 +57,60 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public String getTheFile(String attachmentId, String dirName,String fileName) {
|
|
|
|
|
|
|
+ public Map<String, Object> landFirstRegistration(LandFirstParamVo body) {
|
|
|
|
|
+ //
|
|
|
|
|
+ String yfbdcdyh = body.getYfbdcdyh();
|
|
|
|
|
+ if(StringUtils.isBlank(yfbdcdyh)){
|
|
|
|
|
+ throw new ServiceException("预分不动产单元号为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ String ywbh = body.getYwbh();
|
|
|
|
|
+ if(StringUtils.isBlank(ywbh)){
|
|
|
|
|
+ throw new ServiceException("业务编号为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ //todo 这里进行文件下载入库:
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //todo 这里进行矢量文件的保存及其传输。
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ GyjsydscdjVo gyjsydscdjVo = new GyjsydscdjVo();
|
|
|
|
|
+ gyjsydscdjVo.setProjectId(body.getXmbh());
|
|
|
|
|
+ gyjsydscdjVo.setQlr(body.getQlr());
|
|
|
|
|
+ gyjsydscdjVo.setGyqk(body.getGyqk());
|
|
|
|
|
+ gyjsydscdjVo.setZl(body.getZl());
|
|
|
|
|
+ gyjsydscdjVo.setQllx(body.getQllx());
|
|
|
|
|
+ gyjsydscdjVo.setQlxz(body.getQlxz());
|
|
|
|
|
+ gyjsydscdjVo.setTdyt(body.getTdyt());
|
|
|
|
|
+ if (StringUtils.isNotBlank(body.getTdmj())) {
|
|
|
|
|
+ gyjsydscdjVo.setArea(Float.valueOf(body.getTdmj()));
|
|
|
|
|
+ }
|
|
|
|
|
+ gyjsydscdjVo.setAreaUnit(body.getTdmjdw());
|
|
|
|
|
+ gyjsydscdjVo.setBdcdyh(StringUtils.isNotBlank(body.getBdcdyh()) ? body.getBdcdyh() : body.getYfbdcdyh());
|
|
|
|
|
+ gyjsydscdjVo.setBdczh(body.getBdczh());
|
|
|
|
|
+ gyjsydscdjVo.setDjjg(body.getDjjg());
|
|
|
|
|
+ gyjsydscdjVo.setDjDate(body.getDjrq());
|
|
|
|
|
+
|
|
|
|
|
+ String id = gyjsydscdjService.add(gyjsydscdjVo);
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("id", id);
|
|
|
|
|
+ return map;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String getTheFile(String attachmentId, String dirName, String fileName) {
|
|
|
String fileAndPath = "";
|
|
String fileAndPath = "";
|
|
|
NodeAttachment nodeAttachment = nodeAttachmentService.getById(attachmentId);
|
|
NodeAttachment nodeAttachment = nodeAttachmentService.getById(attachmentId);
|
|
|
- nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeAttachment.getNodeId(),null);
|
|
|
|
|
|
|
+ nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeAttachment.getNodeId(), null);
|
|
|
|
|
|
|
|
- if(Objects.nonNull(nodeAttachment)){
|
|
|
|
|
- List<Map <String,String>> fileList = ServiceUtil.getDirChildrenList(dirName,nodeAttachment);
|
|
|
|
|
- if(Objects.nonNull(fileList)){
|
|
|
|
|
- Optional<Map<String, String>> result = fileList.stream().filter(s->s.get("name").equalsIgnoreCase(fileName)).findFirst();
|
|
|
|
|
- if(result.isPresent()){
|
|
|
|
|
|
|
+ if (Objects.nonNull(nodeAttachment)) {
|
|
|
|
|
+ List<Map<String, String>> fileList = ServiceUtil.getDirChildrenList(dirName, nodeAttachment);
|
|
|
|
|
+ if (Objects.nonNull(fileList)) {
|
|
|
|
|
+ Optional<Map<String, String>> result = fileList.stream().filter(s -> s.get("name").equalsIgnoreCase(fileName)).findFirst();
|
|
|
|
|
+ if (result.isPresent()) {
|
|
|
fileAndPath = result.get().get("path");
|
|
fileAndPath = result.get().get("path");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -59,15 +119,15 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public NodeAttachment getThirdNodeAttachment(String immobileCode, String projectId,String dqjd) throws Exception{
|
|
|
|
|
- String nodeTableName = dqjd.equals("00") ? AloneWorkFlowEnum.NODE_2.getTableName() : dqjd.equals("01") ? AloneWorkFlowEnum.NODE_6.getTableName() :"";
|
|
|
|
|
|
|
+ public NodeAttachment getThirdNodeAttachment(String immobileCode, String projectId, String dqjd) throws Exception {
|
|
|
|
|
+ String nodeTableName = dqjd.equals("00") ? AloneWorkFlowEnum.NODE_2.getTableName() : dqjd.equals("01") ? AloneWorkFlowEnum.NODE_6.getTableName() : "";
|
|
|
NodeAttachment nodeAttachment = null;
|
|
NodeAttachment nodeAttachment = null;
|
|
|
List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId, nodeTableName);
|
|
List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId, nodeTableName);
|
|
|
Optional<ProjectWorkflow> res = projectWorkflows.stream().findFirst();
|
|
Optional<ProjectWorkflow> res = projectWorkflows.stream().findFirst();
|
|
|
- if(res.isPresent()){
|
|
|
|
|
|
|
+ if (res.isPresent()) {
|
|
|
String nodeId = res.get().getNodeId();
|
|
String nodeId = res.get().getNodeId();
|
|
|
- log.info("-------getAttachmentByProjectIdAndTable-----"+nodeId);
|
|
|
|
|
- nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeId,null);
|
|
|
|
|
|
|
+ log.info("-------getAttachmentByProjectIdAndTable-----" + nodeId);
|
|
|
|
|
+ nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeId, null);
|
|
|
//这里获取到所有附件文件路径进行转化拼接为新的
|
|
//这里获取到所有附件文件路径进行转化拼接为新的
|
|
|
ServiceUtil.convertFilePath(nodeAttachment);
|
|
ServiceUtil.convertFilePath(nodeAttachment);
|
|
|
}
|
|
}
|
|
@@ -75,16 +135,4 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|