Commit 4548986c authored by tianbo's avatar tianbo

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

parents 0f439483 820360c2
......@@ -10,7 +10,7 @@ public class ChangeFieldWatchConstants {
public static final Set<String> USE_CERT_MONITORED_FIELDS =
Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
"equDefine", "equCode", "useInnerCode", "factoryNum",
"province", "city", "county", "street", "address", "useOrgCode", "carNumber", "useRegistrationCode",
"province", "city", "county", "street", "factoryUseSiteStreet", "address", "useOrgCode", "carNumber", "useRegistrationCode",
"receiveCompanyCode"
)));
......@@ -56,7 +56,7 @@ public class ChangeFieldWatchConstants {
Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
"equCode", "productName", "contactPhone", "installUnitName",
"equipType", "factoryNum", "produceUnitName", "produceLicenseNum", "province",
"city", "county", "street", "address", "useOrgCode", "useRegistrationCode"
"city", "county", "street", "factoryUseSiteStreet", "address", "useOrgCode", "useRegistrationCode"
)));
/**
......
......@@ -155,6 +155,7 @@ public class ChangeEquipImpactCertListener {
case "city":
case "county":
case "street":
case "factoryUseSiteStreet":
case "address":
if (!"unit".equals(manage.getManageType())) {
updateEquUseAddressByChangeId(manage, meta.getChangeId());
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -274,7 +275,20 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
changeInfo.put("safetyManagerName", notice.getSafetyManager().split("_")[1]);
}
} else {
changeInfo.put("registrationList", JSON.parse(historyServiceOne.getChangeData()));
JSONArray registrationList = JSON.parseArray(historyServiceOne.getChangeData());
if (!ValidationUtil.isEmpty(registrationList)) {
registrationList.stream().map(obj -> (JSONObject) obj).forEach(jsonObject -> {
String estateUnitSeq = jsonObject.getString("estateUnitSeq");
String estateUnitName = jsonObject.getString("estateUnitName");
// 兼容历史数据(历史数据estateUnitName字段存的是base_info表主键)
// 如果estateUnitSeq字段存在则表示是新加的单子不用特殊处理
if (ValidationUtil.isEmpty(estateUnitSeq) && !ValidationUtil.isEmpty(estateUnitName)) {
Map<String, String> propertyUnitInfo = commonServiceImpl.queryTcmUnitInfoBySeq(estateUnitName, TcmUnitTypeEnum.CQ.getCode());
jsonObject.put("estateUnitName", MapUtil.getStr(propertyUnitInfo, "sequenceNbr"));
}
});
}
changeInfo.put("registrationList", registrationList);
}
changeInfo.put("havingPermission", notice.getNextExecuteUserIds() != null && notice.getNextExecuteUserIds().contains(RequestContext.getExeUserId()));
String companyType = selectedOrgInfo.getCompany().getCompanyType();
......
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