|
@@ -1,7 +1,9 @@
|
|
package com.platform.rest.controller.repair;
|
|
package com.platform.rest.controller.repair;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
+import com.platform.common.cache.DictCache;
|
|
import com.platform.common.constant.CommonConstants;
|
|
import com.platform.common.constant.CommonConstants;
|
|
|
|
+import com.platform.common.enums.DictTypeEnum;
|
|
import com.platform.common.exception.DeniedException;
|
|
import com.platform.common.exception.DeniedException;
|
|
import com.platform.common.model.UserInfo;
|
|
import com.platform.common.model.UserInfo;
|
|
import com.platform.common.util.*;
|
|
import com.platform.common.util.*;
|
|
@@ -493,6 +495,19 @@ public class RepairApplicationFormController {
|
|
@PreAuthorize("@pms.hasPermission('repair-application-forms-export')")
|
|
@PreAuthorize("@pms.hasPermission('repair-application-forms-export')")
|
|
public void export(HttpServletResponse response, RepairApplicationFormDTO repairApplicationFormDTO) {
|
|
public void export(HttpServletResponse response, RepairApplicationFormDTO repairApplicationFormDTO) {
|
|
List<RepairApplicationFormVO> list = repairApplicationFormService.getVOListByDTO(repairApplicationFormDTO);
|
|
List<RepairApplicationFormVO> list = repairApplicationFormService.getVOListByDTO(repairApplicationFormDTO);
|
|
|
|
+ for (RepairApplicationFormVO vo:list){
|
|
|
|
+ String[] arr = vo.getRepairProfessor().split(",");
|
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
|
+ for (String a:arr){
|
|
|
|
+ String professor = DictCache.getLabelByValue("REPAIR_APPLICATION_PROFESSOR",Integer.parseInt(a));
|
|
|
|
+ sb.append(professor+",");
|
|
|
|
+ }
|
|
|
|
+// vo.setRepairProfessor(DictCache.getLabelByValue("REPAIR_APPLICATION_PROFESSOR",vo.getRepairProfessor()));
|
|
|
|
+// String str =DictCache.getLabelByValue("SYS_DEPT_NATURE", "JITUAN");
|
|
|
|
+// System.out.println(str);
|
|
|
|
+ vo.setRepairProfessor(sb.toString().substring(0,sb.toString().length()-1));
|
|
|
|
+
|
|
|
|
+ }
|
|
List<ExportRepairApplicationFormVO> excelList = new ArrayList<>();
|
|
List<ExportRepairApplicationFormVO> excelList = new ArrayList<>();
|
|
for (RepairApplicationFormVO vo : list) {
|
|
for (RepairApplicationFormVO vo : list) {
|
|
ExportRepairApplicationFormVO excel = BeanConverterUtil.copyObjectProperties(vo, ExportRepairApplicationFormVO.class);
|
|
ExportRepairApplicationFormVO excel = BeanConverterUtil.copyObjectProperties(vo, ExportRepairApplicationFormVO.class);
|