|
@@ -165,9 +165,7 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
if (StringUtils.isBlank(ywh)) {
|
|
if (StringUtils.isBlank(ywh)) {
|
|
|
throw new ServiceException("业务号为空");
|
|
throw new ServiceException("业务号为空");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
log.info("登簿数据校验通过开始入库: {}" , JSON.toJSONString(body));
|
|
log.info("登簿数据校验通过开始入库: {}" , JSON.toJSONString(body));
|
|
|
-
|
|
|
|
|
String id="";
|
|
String id="";
|
|
|
String tbztFlag="0";
|
|
String tbztFlag="0";
|
|
|
// 入库:以 yfbdcdyh 或 ywh 及 ywlx 判重,已存在则按主键覆盖更新,避免重复插入
|
|
// 入库:以 yfbdcdyh 或 ywh 及 ywlx 判重,已存在则按主键覆盖更新,避免重复插入
|
|
@@ -192,117 +190,11 @@ public class OfferDataServiceImpl implements OfferDataService {
|
|
|
return map;
|
|
return map;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
- 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("业务编号为空");
|
|
|
|
|
- }
|
|
|
|
|
- List<String> geomsList = body.getGeoms();
|
|
|
|
|
- if (CollectionUtils.isEmpty(geomsList)) {
|
|
|
|
|
- throw new ServiceException("geom信息为空");
|
|
|
|
|
- }
|
|
|
|
|
- //todo 这里进行文件下载入库:
|
|
|
|
|
-
|
|
|
|
|
- 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);
|
|
|
|
|
- map1.put("sourceType", "third");
|
|
|
|
|
- //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();
|
|
|
|
|
- }
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- @Override
|
|
|
|
|
- public Map<String, Object> houseFirstRegistration(HouseFirstParamVo body) {
|
|
|
|
|
- String yfbdcdyh = body.getYfbdcdyh();
|
|
|
|
|
- if (StringUtils.isBlank(yfbdcdyh)) {
|
|
|
|
|
- throw new ServiceException("预分不动产单元号为空");
|
|
|
|
|
- }
|
|
|
|
|
- String ywbh = body.getYwbh();
|
|
|
|
|
- if (StringUtils.isBlank(ywbh)) {
|
|
|
|
|
- throw new ServiceException("业务编号为空");
|
|
|
|
|
- }
|
|
|
|
|
- List<String> geomsList = body.getGeoms();
|
|
|
|
|
- if (CollectionUtils.isEmpty(geomsList)) {
|
|
|
|
|
- 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());
|
|
|
|
|
-// gyjsydjfwscdjVo.setBdcqk(body.getBdcqk());
|
|
|
|
|
-// if (StringUtils.isNotBlank(body.getJzmj())) {
|
|
|
|
|
-// gyjsydjfwscdjVo.setJzmj(body.getJzmj());
|
|
|
|
|
-// }
|
|
|
|
|
-// gyjsydjfwscdjVo.setJzmjDw(body.getJzmjDw());
|
|
|
|
|
-// gyjsydjfwscdjVo.setTnmj(body.getTnmj());
|
|
|
|
|
-// gyjsydjfwscdjVo.setTnmjDw(body.getTnmjDw());
|
|
|
|
|
-// gyjsydjfwscdjVo.setFtmj(body.getFtmj());
|
|
|
|
|
-// gyjsydjfwscdjVo.setFtmjDw(body.getFtmjDw());
|
|
|
|
|
-// gyjsydjfwscdjVo.setBz(body.getBz());
|
|
|
|
|
-
|
|
|
|
|
- String nodeId = gyjsydjfwscdjService.add(gyjsydjfwscdjVo);
|
|
|
|
|
- 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();
|
|
|
|
|
- }
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public String getTheFile(String attachmentId, String dirName, String fileName) {
|
|
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)) {
|
|
if (Objects.nonNull(nodeAttachment)) {
|
|
|
List<Map<String, String>> fileList = ServiceUtil.getDirChildrenList(dirName, nodeAttachment);
|
|
List<Map<String, String>> fileList = ServiceUtil.getDirChildrenList(dirName, nodeAttachment);
|
|
|
if (Objects.nonNull(fileList)) {
|
|
if (Objects.nonNull(fileList)) {
|