Commit ed553c81 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 90a43e0e 9f0fb557
......@@ -25,6 +25,12 @@ public class ExcelDto {
this.type = type;
}
public ExcelDto(String fileName, String sheetName, String type) {
this.fileName = fileName;
this.sheetName = sheetName;
this.type = type;
}
public String getFileName() {
return StringUtils.isEmpty(fileName) ? DateUtils.convertDateToString(new Date(), "yyyyMMddHHmmss") : fileName;
}
......
......@@ -252,6 +252,7 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
if (fireEnduranceRateArray.length > 1) {
keySiteDto.setFireEnduranceRate(fireEnduranceRateArray[1]);
}
keySiteDto.setFireEnduranceRateName(fireEnduranceRateArray[0]);
}
if (StringUtils.isNotBlank(keySiteExcleDto.getUseNature())
&& keySiteExcleDto.getUseNature().contains("@")) {
......@@ -259,6 +260,7 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
if (useNatureArray.length > 1) {
keySiteDto.setUseNature(useNatureArray[1]);
}
keySiteDto.setUseNatureName(useNatureArray[0]);
}
if (keySiteExcleDto.getFirePreventionFlagName().equals("有")) {
keySiteDto.setFirePreventionFlag(true);
......
......@@ -73,6 +73,19 @@ public class ExcelController extends BaseController {
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出公用类2")
@GetMapping("/export/list")
public void exportByType(HttpServletResponse response, @RequestParam(required = false) String fileName,
@RequestParam(required = false) String sheetName, @RequestParam String type) {
try {
excelService.commonExport(response, new ExcelDto(fileName, sheetName, type));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "上传文件数据-")
@PostMapping("/upload")
public void upload(@RequestPart("file") MultipartFile multipartFile, ExcelDto excelDto) {
......
......@@ -273,6 +273,4 @@ public class DataSourcesImpl implements DataSources {
String[] str = stringList.toArray(new String[stringList.size()]);
return str;
}
}
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