|
|
@@ -1941,6 +1941,7 @@ public class ProjectImpl implements ProjectService {
|
|
|
* 1.每一个地块都需要进行赋码操作,并且获取不动产最大序列值。
|
|
|
* 3.保证异常情况下,预付码不会重复。
|
|
|
* 5.简单取两者中最大序列号,进行+1赋码
|
|
|
+ * 6.如果每次上链都要求重新生成,则需要方法入口先删除当前t_project_immobile_code条目
|
|
|
* @param nodeId
|
|
|
* @param projectId
|
|
|
* @param geomDbId
|
|
|
@@ -1975,31 +1976,34 @@ public class ProjectImpl implements ProjectService {
|
|
|
// 3.校验当前地块是否已经存在当前项目的其它节点中,如果存在则共用一个预赋码,如果不存在则走第三部分
|
|
|
|
|
|
if(com.siwei.common.core.utils.StringUtils.isBlank(preAssignCode) && com.siwei.common.core.utils.StringUtils.isBlank(sequenceNumber)) {
|
|
|
- List<String> nodeIdList = new ArrayList<>();
|
|
|
+ //List<String> nodeIdList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<String> geomDbIdList = new ArrayList<>();
|
|
|
List<ProjectImmobileCode> currentProjectImmobileList = projectImmobileCodeMapper.selectByProjectId(projectId, "");
|
|
|
if (CollectionUtils.isNotEmpty(currentProjectImmobileList)) {
|
|
|
- nodeIdList = currentProjectImmobileList.stream().map(ProjectImmobileCode::getNodeId).collect(Collectors.toList());
|
|
|
+ geomDbIdList = currentProjectImmobileList.stream().map(ProjectImmobileCode::getGeomDbId).collect(Collectors.toList());
|
|
|
}
|
|
|
- String equalsNodeId = "";
|
|
|
+ String equalsGeomDbId = "";
|
|
|
Boolean equalsFlag = true;
|
|
|
List<Map<String, Object>> currentNodeDetails = nodeLandMapper.selectGeomDetailsByGeomDbId(currentNodeGeomDbId);
|
|
|
//这里简单判断,如果当前节点的图斑在当前项目其它节点都存在,则认为地块是存在地块,并且已经赋码完成,取最后一次的节点预赋码为当前码
|
|
|
- if (!currentNodeDetails.isEmpty() && !nodeIdList.isEmpty()) {
|
|
|
+ if (!currentNodeDetails.isEmpty() && !geomDbIdList.isEmpty()) {
|
|
|
for (Map<String, Object> tmpMap : currentNodeDetails) {
|
|
|
String detailsId = tmpMap.get("id").toString();
|
|
|
- Map<String, String> equalsGeomMap = nodeLandMapper.selectNodeGeomContains(nodeIdList, detailsId);
|
|
|
- if (MapUtils.isNotEmpty(equalsGeomMap) && equalsGeomMap.containsKey("node_id")) {
|
|
|
- equalsNodeId = equalsGeomMap.get("node_id");
|
|
|
+ Map<String, String> equalsGeomMap = nodeLandMapper.selectGeomContains(geomDbIdList, detailsId);
|
|
|
+
|
|
|
+ if (MapUtils.isNotEmpty(equalsGeomMap) && equalsGeomMap.containsKey("geom_db_id")) {
|
|
|
+ equalsGeomDbId = equalsGeomMap.get("geom_db_id");
|
|
|
} else {
|
|
|
equalsFlag = false;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (equalsFlag.equals(true) && StringUtils.isNotBlank(equalsNodeId)) {
|
|
|
+ if (equalsFlag.equals(true) && StringUtils.isNotBlank(equalsGeomDbId)) {
|
|
|
param = new ProjectImmobileCode();
|
|
|
param.setProjectId(projectId);
|
|
|
- param.setGeomDbId(equalsNodeId);
|
|
|
+ param.setGeomDbId(equalsGeomDbId);
|
|
|
existsRes = projectImmobileCodeMapper.selectByCondition(param);
|
|
|
if (Objects.nonNull(existsRes)) {
|
|
|
preAssignCode = existsRes.getPreAssignCode();
|
|
|
@@ -2007,7 +2011,6 @@ public class ProjectImpl implements ProjectService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//--------------------第三部分 这里生成预赋码逻辑,调用三方接口获取最大序号,然后生成预赋码,插入到不动产单元号表中---------------------------
|
|
|
if(com.siwei.common.core.utils.StringUtils.isBlank(preAssignCode) && com.siwei.common.core.utils.StringUtils.isBlank(sequenceNumber)) {
|
|
|
String plotCode = "";
|