|
|
@@ -14,11 +14,10 @@ import com.siwei.apply.domain.vo.ProjectVo;
|
|
|
import com.siwei.apply.enums.AloneWorkFlowEnum;
|
|
|
import com.siwei.apply.enums.ProjectType;
|
|
|
import com.siwei.apply.mapper.*;
|
|
|
-import com.siwei.apply.service.NodeAttachmentService;
|
|
|
import com.siwei.apply.service.NodeLandService;
|
|
|
import com.siwei.apply.service.ProjectService;
|
|
|
-import com.siwei.apply.service.third.TakeDataService;
|
|
|
import com.siwei.apply.utils.ServiceFileUtil;
|
|
|
+import com.siwei.apply.utils.ServiceUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.MapUtils;
|
|
|
import org.geotools.data.DefaultTransaction;
|
|
|
@@ -143,14 +142,11 @@ public class ProjectImpl implements ProjectService {
|
|
|
@Autowired
|
|
|
private NodeLandMapper nodeLandMapper;
|
|
|
|
|
|
- @Autowired
|
|
|
- private NodeAttachmentService nodeAttachmentService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private NodeLandService nodeLandService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private TakeDataService takeDataService;
|
|
|
+// @Autowired
|
|
|
+// private TakeDataService takeDataService;
|
|
|
|
|
|
@Autowired
|
|
|
private ProjectImmobileCodeMapper projectImmobileCodeMapper;
|
|
|
@@ -2012,7 +2008,7 @@ public class ProjectImpl implements ProjectService {
|
|
|
if(com.siwei.common.core.utils.StringUtils.isBlank(preAssignCode) && com.siwei.common.core.utils.StringUtils.isBlank(sequenceNumber)) {
|
|
|
String plotCode = "";
|
|
|
String regionCode = "";
|
|
|
- Map<String, String> maxSequenceMap = takeDataService.getThirdMaxSequence(projectId,nodeId,detailsId);
|
|
|
+ Map<String, String> maxSequenceMap = this.getThirdMaxSequence(projectId,nodeId,detailsId);
|
|
|
if (MapUtils.isNotEmpty(maxSequenceMap) && maxSequenceMap.get("code").equalsIgnoreCase("200")) {
|
|
|
regionCode = maxSequenceMap.get("regionCode");
|
|
|
plotCode = maxSequenceMap.get("plotCode");
|
|
|
@@ -2065,6 +2061,65 @@ public class ProjectImpl implements ProjectService {
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 远程获取第三方最大序号
|
|
|
+ * 然后根据规则生成预赋不动产单元号
|
|
|
+ * @param projectId
|
|
|
+ * @param nodeId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Map<String, String> getThirdMaxSequence(String projectId, String nodeId,String detailsId) {
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ Project project = projectMapper.get(projectId);
|
|
|
+ String firstPlotCode = project.getFirstPlotCode();
|
|
|
+ String secondPlotCode = project.getSecondPlotCode();
|
|
|
+ if (com.siwei.common.core.utils.StringUtils.isEmpty(firstPlotCode)) {
|
|
|
+ firstPlotCode = "G";
|
|
|
+ }
|
|
|
+ if (com.siwei.common.core.utils.StringUtils.isEmpty(secondPlotCode)) {
|
|
|
+ secondPlotCode = "B";
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取地籍子区的代码
|
|
|
+ String regionCode = "";
|
|
|
+ //当前地块所属地籍子区编号
|
|
|
+ Map<String, String> detailGeomBelongToDjzqMap = nodeLandService.getDjzqContainsNodeList(detailsId);
|
|
|
+ if (!MapUtils.isEmpty(detailGeomBelongToDjzqMap)) {
|
|
|
+ regionCode = detailGeomBelongToDjzqMap.get("djzqdm");
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("这里计算地籍子区的代码,区域号:{}", regionCode);
|
|
|
+ //这里三方接口入参
|
|
|
+ retMap.put("maxSequence", "");
|
|
|
+ retMap.put("plotCode", firstPlotCode + secondPlotCode);
|
|
|
+ retMap.put("regionCode", regionCode);
|
|
|
+ retMap.put("code", "201");
|
|
|
+
|
|
|
+ if (com.siwei.common.core.utils.StringUtils.isNotBlank(regionCode)) {
|
|
|
+ retMap.put("code", "200");
|
|
|
+ try{
|
|
|
+ Map<String,Object> paramMap = new LinkedHashMap<>();
|
|
|
+ paramMap.put("regionCode",regionCode+firstPlotCode + secondPlotCode);
|
|
|
+ //这里调用 httpClient 进行远程调用
|
|
|
+ String remoteResult = ServiceUtil.getRemoteDataByHttpClient("query.getMaxSeq.datas",paramMap);
|
|
|
+ log.info("远程获取最大序列号解析数据为:{}", remoteResult);
|
|
|
+
|
|
|
+ JSONObject root = JSON.parseObject(remoteResult);
|
|
|
+ JSONObject innerData = root.getJSONObject("data");
|
|
|
+
|
|
|
+ if(innerData.get("code").equals("200") && com.siwei.common.core.utils.StringUtils.isNumeric(String.valueOf(innerData.get("maxsequence")))){
|
|
|
+ retMap.put("maxSequence", innerData.get("maxsequence").toString());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("调用矢量保存文件错误,区域号:{}", regionCode,e);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ log.error("远程获取最大序列号-计算区域代码为空-项目号:{},", projectId);
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|