|
|
@@ -8,11 +8,16 @@ import com.siwei.apply.enums.AloneWorkFlowEnum;
|
|
|
import com.siwei.apply.mapper.ProjectWorkflowMapper;
|
|
|
import com.siwei.apply.service.GyjsydscdjService;
|
|
|
import com.siwei.apply.service.NodeAttachmentService;
|
|
|
+import com.siwei.apply.service.NodeLandService;
|
|
|
import com.siwei.apply.service.third.OfferDataService;
|
|
|
import com.siwei.apply.utils.ServiceUtil;
|
|
|
+import com.siwei.common.core.domain.R;
|
|
|
import com.siwei.common.core.exception.ServiceException;
|
|
|
+import com.siwei.spatial.api.RemoteSpatialFilesDbService;
|
|
|
+import com.siwei.spatial.api.domain.file.TGeomDb;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -27,22 +32,20 @@ import java.util.*;
|
|
|
@Service
|
|
|
public class OfferDataServiceImpl implements OfferDataService {
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private NodeAttachmentService nodeAttachmentService;
|
|
|
|
|
|
@Autowired
|
|
|
private ProjectWorkflowMapper projectWorkflowMapper;
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private GyjsydscdjService gyjsydscdjService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RemoteSpatialFilesDbService remoteSpatialFilesDbService;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private NodeLandService nodeLandService;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -55,10 +58,8 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
return Map.of();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public Map<String, Object> landFirstRegistration(LandFirstParamVo body) {
|
|
|
- //
|
|
|
String yfbdcdyh = body.getYfbdcdyh();
|
|
|
if(StringUtils.isBlank(yfbdcdyh)){
|
|
|
throw new ServiceException("预分不动产单元号为空");
|
|
|
@@ -67,39 +68,50 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
if(StringUtils.isBlank(ywbh)){
|
|
|
throw new ServiceException("业务编号为空");
|
|
|
}
|
|
|
+ List<String> geomsList = body.getGeoms();
|
|
|
+ if(CollectionUtils.isEmpty(geomsList)){
|
|
|
+ throw new ServiceException("geom信息为空");
|
|
|
+ }
|
|
|
//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()));
|
|
|
+ try {
|
|
|
+ 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 nodeId = gyjsydscdjService.add(gyjsydscdjVo);
|
|
|
+ Map<String, Object> map1 = new HashMap<>();
|
|
|
+ map1.put("geomData", geomsList);
|
|
|
+ //todo 这里进行矢量文件的保存及其传输。
|
|
|
+ R<TGeomDb> res = remoteSpatialFilesDbService.saveGeom(map1);
|
|
|
+ TGeomDb tGeomDb = res.getData();
|
|
|
+ //这里保存geom映射关系
|
|
|
+ nodeLandService.createNodeLand(nodeId, tGeomDb.getId());
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("id", nodeId);
|
|
|
+ return map;
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("调用矢量保存文件错误,业务编号:{}: ",ywbh);
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- 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;
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public String getTheFile(String attachmentId, String dirName, String fileName) {
|
|
|
String fileAndPath = "";
|