Commit ae6f0518 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents f32bd2b2 543478a4
...@@ -2088,6 +2088,11 @@ public class DataDockServiceImpl { ...@@ -2088,6 +2088,11 @@ public class DataDockServiceImpl {
String usePlace = Objects.toString(equipInfo.get("usePlace"), null); String usePlace = Objects.toString(equipInfo.get("usePlace"), null);
String useDate = Objects.toString(equipInfo.get("useDate"), null); String useDate = Objects.toString(equipInfo.get("useDate"), null);
String equState = Objects.toString(equipInfo.get("EQU_STATE"), null); String equState = Objects.toString(equipInfo.get("EQU_STATE"), null);
String _receiveCompanyCode = Optional.ofNullable(receiveCompanyCode)
.map(code -> code.split("_"))
.filter(parts -> parts.length > 0)
.map(parts -> parts[0])
.orElse(null);
return new EquipRequestParamsDto().setCompanyCode(company.getCompanyCode().split("_")[0]) return new EquipRequestParamsDto().setCompanyCode(company.getCompanyCode().split("_")[0])
.setProvince(province) .setProvince(province)
.setProvinceName("陕西省") .setProvinceName("陕西省")
...@@ -2114,11 +2119,7 @@ public class DataDockServiceImpl { ...@@ -2114,11 +2119,7 @@ public class DataDockServiceImpl {
.setOrgBranchName(orgBranchCode.split("_").length > 1 ? orgBranchCode.split("_")[1] : "") .setOrgBranchName(orgBranchCode.split("_").length > 1 ? orgBranchCode.split("_")[1] : "")
.setUseOrgCode(useOrgCode) .setUseOrgCode(useOrgCode)
.setVehicleApanage(Objects.toString(equipInfo.get("VEHICLE_APANAGE"),"")) .setVehicleApanage(Objects.toString(equipInfo.get("VEHICLE_APANAGE"),""))
.setReceiveCompanyCode(Optional.ofNullable(receiveCompanyCode) .setReceiveCompanyCode(_receiveCompanyCode)
.map(code -> code.split("_"))
.filter(parts -> parts.length > 0)
.map(parts -> parts[0])
.orElse(null))
.setReceiveCompanyName(Optional.ofNullable(receiveCompanyCode) .setReceiveCompanyName(Optional.ofNullable(receiveCompanyCode)
.map(code -> code.split("_")) .map(code -> code.split("_"))
.filter(parts -> parts.length > 1) .filter(parts -> parts.length > 1)
...@@ -2135,7 +2136,7 @@ public class DataDockServiceImpl { ...@@ -2135,7 +2136,7 @@ public class DataDockServiceImpl {
.setStartLatitudeLongitude(toJSONString(equipInfo.get("startLatitudeLongitude"))) .setStartLatitudeLongitude(toJSONString(equipInfo.get("startLatitudeLongitude")))
.setEndLatitudeLongitude(toJSONString(equipInfo.get("endLatitudeLongitude"))) .setEndLatitudeLongitude(toJSONString(equipInfo.get("endLatitudeLongitude")))
.setEquState(equState) .setEquState(equState)
.setEquCode(installationNoticeService.generateEquCode(equListCode, equCategoryCode, equDefineCode, new Date(), receiveCompanyCode)); .setEquCode(installationNoticeService.generateEquCode(equListCode, equCategoryCode, equDefineCode, new Date(), _receiveCompanyCode));
} }
/** /**
......
...@@ -10,5 +10,5 @@ public interface BizCommonConstant { ...@@ -10,5 +10,5 @@ public interface BizCommonConstant {
/** /**
* 所有平台企业数据redisKey * 所有平台企业数据redisKey
*/ */
String COMPANY_TREE_REDIS_KEY = "REGULATOR_UNIT_TREE"; String COMPANY_TREE_REDIS_KEY = "REGULATOR_UNIT_TREE_YMT";
} }
...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; ...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao; import com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo; import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo;
import com.yeejoin.amos.boot.module.ymt.api.common.BizCommonConstant;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipExportDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipExportDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentMessageDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentMessageDto;
...@@ -552,11 +553,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -552,11 +553,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override @Override
public List<LinkedHashMap> getTree() { public List<LinkedHashMap> getTree() {
List<LinkedHashMap> result = (List<LinkedHashMap>) redisUtils.get(REGULATOR_UNIT_TREE); List<LinkedHashMap> result = (List<LinkedHashMap>) redisUtils.get(BizCommonConstant.COMPANY_TREE_REDIS_KEY);
// 判断redis是否存在管辖机构树 // 判断redis是否存在管辖机构树
return !ObjectUtils.isEmpty(result) ? result : creatTree(); return !ObjectUtils.isEmpty(result) ? result : creatTree();
} }
/**
* 创建监管机构树,不包含审批局
*/
@Override @Override
public List<LinkedHashMap> creatTree() { public List<LinkedHashMap> creatTree() {
FeignClientResult tree = privilegeFeginService.tree(RequestContext.getToken(), RequestContext.getAppKey(), RequestContext.getProduct()); FeignClientResult tree = privilegeFeginService.tree(RequestContext.getToken(), RequestContext.getAppKey(), RequestContext.getProduct());
...@@ -564,7 +568,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -564,7 +568,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<LinkedHashMap> treeData = deleteTreeData(result, REGULATOR_UNIT); List<LinkedHashMap> treeData = deleteTreeData(result, REGULATOR_UNIT);
List<LinkedHashMap> supervisionTree = treeData.stream().filter(e -> code.equals(e.get("orgCode"))).collect(Collectors.toList()); List<LinkedHashMap> supervisionTree = treeData.stream().filter(e -> code.equals(e.get("orgCode"))).collect(Collectors.toList());
List<LinkedHashMap> resultTree = updateNullChildren(supervisionTree); List<LinkedHashMap> resultTree = updateNullChildren(supervisionTree);
redisUtils.set(REGULATOR_UNIT_TREE, resultTree); redisUtils.set(BizCommonConstant.COMPANY_TREE_REDIS_KEY, resultTree);
return resultTree; return resultTree;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment