feat(eightwork): 添加对step_17其他参数的解析支持

master
zhaokai 2026-06-15 11:24:04 +08:00
parent eab5c0bac2
commit 8d497c65f0
1 changed files with 21 additions and 1 deletions

View File

@ -130,6 +130,26 @@ public class EightworkInfoQueryExe {
if (chooseLimitedSpaceJson == null) { if (chooseLimitedSpaceJson == null) {
chooseLimitedSpaceJson = new JSONObject(); chooseLimitedSpaceJson = new JSONObject();
} }
JSONObject step17Json = infoJson.getJSONObject("step_17");
if (step17Json == null) {
step17Json = new JSONObject();
}
JSONObject step17OtherParamsJson = step17Json.getJSONObject("otherParams");
if (step17OtherParamsJson == null && StringUtils.isNotBlank(step17Json.getString("otherParams"))) {
try {
step17OtherParamsJson = JSONObject.parseObject(step17Json.getString("otherParams"));
} catch (Exception e) {
log.warn("解析 step_17.otherParams 失败,使用空对象: workId={}", eightworkInfoDO.getWorkId(), e);
step17OtherParamsJson = new JSONObject();
}
}
if (step17OtherParamsJson == null) {
step17OtherParamsJson = new JSONObject();
}
String workPersonCount = step17OtherParamsJson.getString("limitSpaceWorkNum");
if (StringUtils.isBlank(workPersonCount)) {
workPersonCount = infoJson.getString("limitSpaceWorkNum");
}
EightworkConfinedspaceExcelExportEntity userExcelExportEntity = new EightworkConfinedspaceExcelExportEntity(); EightworkConfinedspaceExcelExportEntity userExcelExportEntity = new EightworkConfinedspaceExcelExportEntity();
userExcelExportEntity.setWorkTime(infoJson.getString("applyTime")); userExcelExportEntity.setWorkTime(infoJson.getString("applyTime"));
@ -138,7 +158,7 @@ public class EightworkInfoQueryExe {
userExcelExportEntity.setSpaceNameAndCode(infoJson.getString("limitedSpaceNameAndCode")); userExcelExportEntity.setSpaceNameAndCode(infoJson.getString("limitedSpaceNameAndCode"));
userExcelExportEntity.setLocationAndRange(chooseLimitedSpaceJson.getString("positionAndRange")); userExcelExportEntity.setLocationAndRange(chooseLimitedSpaceJson.getString("positionAndRange"));
userExcelExportEntity.setRiskLevel(chooseLimitedSpaceJson.getString("riskLevelName")); userExcelExportEntity.setRiskLevel(chooseLimitedSpaceJson.getString("riskLevelName"));
userExcelExportEntity.setWorkPersonCount(infoJson.getString("limitSpaceWorkNum")); userExcelExportEntity.setWorkPersonCount(workPersonCount);
//获取 //获取
EightworkSupplementaryInfoDO eightworkSupplementaryInfoDO = eightworkSupplementaryInfoDOMap.get(eightworkInfoDO.getWorkId()); EightworkSupplementaryInfoDO eightworkSupplementaryInfoDO = eightworkSupplementaryInfoDOMap.get(eightworkInfoDO.getWorkId());