Commit 9fd8a6da authored by 刘林's avatar 刘林

fix(jg):西安电梯历史数据导入接口修改

parent b4fe5270
......@@ -49,5 +49,25 @@ public class XiAnDataDockController {
}
return xiAnDataDockService.importEquipmentData(file);
}
/**
* 西安电梯历史设备以及业务数据批量导入
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/importElevatorData")
@ApiOperation(httpMethod = "POST", value = "西安电梯历史设备以及业务数据批量导入", notes = "西安电梯历史设备以及业务数据批量导入")
public Object importElevatorData(@RequestParam MultipartFile file) {
if (file.isEmpty()) {
return ResponseHelper.buildResponse("文件不能为空");
}
String contentType = file.getContentType();
String fileExtension = FilenameUtils.getExtension(file.getOriginalFilename());
if (!("application/vnd.ms-excel".equals(contentType) ||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) ||
!("xls".equalsIgnoreCase(fileExtension) || "xlsx".equalsIgnoreCase(fileExtension))) {
return ResponseHelper.buildResponse("文件类型必须是 Excel 文件");
}
return xiAnDataDockService.importElevatorData(file);
}
}
......@@ -75,6 +75,12 @@ public class DictParamsConverter implements Converter<String> {
dictMap.put("液化天然气", "LIQUEFIED_NATURAL_GAS");
dictMap.put("液化石油气", "LIQUEFIED_PETROLEUM_GAS");
dictMap.put("氢气", "HYDROGEN");
dictMap.put("集选", "1");
dictMap.put("并联", "2");
dictMap.put("按钮", "3");
dictMap.put("其他控制方式", "4");
dictMap.put("直接顶升", "1");
dictMap.put("间接顶升", "2");
}
@Override
......
package com.yeejoin.amos.api.openapi.feign;
import com.yeejoin.amos.api.openapi.dto.XiAnElevatorExcelDto;
import com.yeejoin.amos.api.openapi.dto.XiAnEquipInfoExcelDto;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -105,4 +106,13 @@ public interface TzsJgServiceFeignClient {
*/
@RequestMapping(value = "/common/checkFactoryNumUniquenessForVehicleCylinder", method = RequestMethod.GET)
Integer checkFactoryNumUniquenessForVehicleCylinder(@RequestParam("factoryNum") String factoryNum);
/**
* 批量保存西安电梯上传的历史数据
*
* @param elevatorExcelDtos 西安电梯上传的历史数据
* @return
*/
@RequestMapping(value = "/dataDock/xi-an/saveElevatorData", method = RequestMethod.POST)
Object saveElevatorData(@RequestBody List<XiAnElevatorExcelDto> elevatorExcelDtos);
}
......@@ -92,5 +92,17 @@ public class DataDockController {
return ResponseHelper.buildResponse(dataDockService.checkGDData(multipartFile, false));
}
/**
* 西安电梯历史设备以及业务数据批量导入
*
* @param equLists 电梯历史设备以及业务数据
* @return result
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/xi-an/saveElevatorData")
@ApiOperation(httpMethod = "POST", value = "西安电梯历史设备以及业务数据批量导入", notes = "西安电梯历史设备以及业务数据批量导入")
public ResponseModel<?> saveElevatorData(@RequestBody List<Map<String, Object>> equLists) {
return ResponseHelper.buildResponse(dataDockService.saveElevatorData(equLists));
}
}
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