|
|
@@ -1,9 +1,11 @@
|
|
|
package com.siwei.apply.service.third.impl;
|
|
|
|
|
|
import com.siwei.apply.domain.NodeAttachment;
|
|
|
+import com.siwei.apply.domain.ProjectImmobileCode;
|
|
|
import com.siwei.apply.domain.ProjectWorkflow;
|
|
|
import com.siwei.apply.domain.vo.*;
|
|
|
import com.siwei.apply.enums.AloneWorkFlowEnum;
|
|
|
+import com.siwei.apply.mapper.ProjectImmobileCodeMapper;
|
|
|
import com.siwei.apply.mapper.ProjectMapper;
|
|
|
import com.siwei.apply.mapper.ProjectWorkflowMapper;
|
|
|
import com.siwei.apply.mapper.ThirdRecordStatusMapper;
|
|
|
@@ -61,6 +63,11 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
private ThirdRecordStatusMapper thirdRecordStatusMapper;
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ProjectImmobileCodeMapper projectImmobileCodeMapper;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, String> get(String projectId) {
|
|
|
return Map.of();
|
|
|
@@ -226,11 +233,9 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
throw new ServiceException("geom信息为空");
|
|
|
}
|
|
|
//todo 这里进行文件下载入库:
|
|
|
-
|
|
|
try {
|
|
|
GyjsydjfwscdjVo gyjsydjfwscdjVo = new GyjsydjfwscdjVo();
|
|
|
gyjsydjfwscdjVo.setProjectId(body.getXmbh());
|
|
|
-
|
|
|
// gyjsydjfwscdjVo.setYwh(body.getYwh());
|
|
|
// gyjsydjfwscdjVo.setGzdgzsj(body.getGzdgzsj());
|
|
|
// gyjsydjfwscdjVo.setKfdw(body.getKfdw());
|
|
|
@@ -264,8 +269,6 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
public String getTheFile(String attachmentId, String dirName, String fileName) {
|
|
|
String fileAndPath = "";
|
|
|
@@ -285,17 +288,26 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
}
|
|
|
|
|
|
@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 preImmobileCode, String projectId, String dqjd) throws Exception {
|
|
|
NodeAttachment nodeAttachment = null;
|
|
|
- List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId, nodeTableName);
|
|
|
- Optional<ProjectWorkflow> res = projectWorkflows.stream().findFirst();
|
|
|
- if (res.isPresent()) {
|
|
|
- String nodeId = res.get().getNodeId();
|
|
|
- log.info("-------getAttachmentByProjectIdAndTable-----" + nodeId);
|
|
|
- nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeId, null);
|
|
|
- //这里获取到所有附件文件路径进行转化拼接为新的
|
|
|
- ServiceUtil.convertFilePath(nodeAttachment);
|
|
|
+ //这里根据预赋不动产单元号获取项目id
|
|
|
+ if(StringUtils.isBlank(projectId)){
|
|
|
+ ProjectImmobileCode existing = projectImmobileCodeMapper.selectByPreAssignCode(preImmobileCode);
|
|
|
+ if (Objects.nonNull(existing)) {
|
|
|
+ projectId = existing.getProjectId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(projectId)){
|
|
|
+ String nodeTableName = dqjd.equals("00") ? AloneWorkFlowEnum.NODE_2.getTableName() : dqjd.equals("01") ? AloneWorkFlowEnum.NODE_6.getTableName() : "";
|
|
|
+ List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId, nodeTableName);
|
|
|
+ Optional<ProjectWorkflow> res = projectWorkflows.stream().findFirst();
|
|
|
+ if (res.isPresent()) {
|
|
|
+ String nodeId = res.get().getNodeId();
|
|
|
+ log.info("-------getAttachmentByProjectIdAndTable-----" + nodeId);
|
|
|
+ nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeId, null);
|
|
|
+ //这里获取到所有附件文件路径进行转化拼接为新的
|
|
|
+ ServiceUtil.convertFilePath(nodeAttachment);
|
|
|
+ }
|
|
|
}
|
|
|
return nodeAttachment;
|
|
|
}
|