Commit afff8c782490f2fcef9531c4dcf0edbe9fd7f47c

Authored by 王富生
1 parent c6488f67

抢险任务提交update

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/emergencytask/EmergencyTaskController.java
... ... @@ -3,6 +3,7 @@ package com.zteits.urbanops.module.garden.controller.admin.emergencytask;
3 3 import com.alibaba.fastjson.JSONObject;
4 4 import com.zteits.urbanops.framework.common.biz.system.dict.dto.DictDataRespDTO;
5 5 import jodd.util.StringUtil;
  6 +import org.springframework.util.CollectionUtils;
6 7 import org.springframework.web.bind.annotation.*;
7 8 import jakarta.annotation.Resource;
8 9 import org.springframework.validation.annotation.Validated;
... ... @@ -153,7 +154,7 @@ public class EmergencyTaskController {
153 154 Integer machineryCount = emergencyMachinery.getMachineryCount();
154 155 machineryList.add(machineryName + ":" + machineryCount);
155 156 });
156   - emergencyTaskExcleRespVO.setMachineryInfo(JSONObject.toJSONString(machineryList));
  157 + emergencyTaskExcleRespVO.setMachineryInfo(machineryList);
157 158 respList.add(emergencyTaskExcleRespVO);
158 159 });
159 160  
... ... @@ -162,6 +163,9 @@ public class EmergencyTaskController {
162 163 }
163 164  
164 165 private String getLabel(List<DictDataRespDTO> dictDataList, Integer id){
  166 + if(CollectionUtils.isEmpty(dictDataList)){
  167 + return "";
  168 + }
165 169 Map<String, String> nameMap = dictDataList.stream()
166 170 .collect(Collectors.toMap(
167 171 DictDataRespDTO::getValue, // Key=id
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/emergencytask/vo/EmergencyTaskExcleRespVO.java
... ... @@ -105,7 +105,7 @@ public class EmergencyTaskExcleRespVO {
105 105 private String updaterName;
106 106  
107 107 @ExcelProperty(value="机械信息", converter = ListToStringConverter.class)
108   - private String machineryInfo;
  108 + private List<String> machineryInfo;
109 109  
110 110 @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "20800")
111 111 @ExcelProperty("归属公司")
... ...
urbanops-server/src/main/resources/application.yaml
... ... @@ -3,7 +3,7 @@ spring:
3 3 name: urbanops-server
4 4  
5 5 profiles:
6   - active: prod
  6 + active: dev
7 7  
8 8 main:
9 9 allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
... ...