Commit f2936d67 authored by 韩桐桐's avatar 韩桐桐

feat(openapi/jg):西安数据对接接口

parent 25db81a0
...@@ -2,8 +2,7 @@ package com.yeejoin.amos.api.common.restful.utils; ...@@ -2,8 +2,7 @@ package com.yeejoin.amos.api.common.restful.utils;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
public class ResponseHelper public class ResponseHelper {
{
public static <T> ResponseModel<T> buildResponse(T t) { public static <T> ResponseModel<T> buildResponse(T t) {
ResponseModel<T> response = new ResponseModel<>(); ResponseModel<T> response = new ResponseModel<>();
...@@ -13,4 +12,21 @@ public class ResponseHelper ...@@ -13,4 +12,21 @@ public class ResponseHelper
return response; return response;
} }
/**
* 失败的响应
*
* @param result 接口执行结果
* @param errorMessage 错误信息
* @param status HttpStatus 响应状态码
* @param <T>
* @return 响应
*/
public static <T> ResponseModel<T> buildFailureResponse(T result, String errorMessage, HttpStatus status) {
ResponseModel<T> response = new ResponseModel<>();
response.setStatus(status.value());
response.setMessage(errorMessage);
response.setResult(result);
return response;
}
} }
...@@ -41,7 +41,10 @@ public class OpenApiControllerAop { ...@@ -41,7 +41,10 @@ public class OpenApiControllerAop {
HttpServletRequest request = attributes.getRequest(); HttpServletRequest request = attributes.getRequest();
logger.info("request>>>",request); logger.info("request>>>",request);
// 不需要添加请求头的接口 // 不需要添加请求头的接口
String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany","/bizToken/applyToken","/openapi/bizToken/getAppId","/lift/upload","/lift/status","/lift/run","/lift/fault","/lift/video/preview","/cylinderPage/serviceProvider","/cylinderPage/getTableInfo","/cylinderPage/initCylinderNum","/openapi/appId/setAppId"}; String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany","/bizToken/applyToken",
"/openapi/bizToken/getAppId","/lift/upload","/lift/status","/lift/run","/lift/fault",
"/lift/video/preview","/cylinderPage/serviceProvider","/cylinderPage/getTableInfo",
"/cylinderPage/initCylinderNum","/openapi/appId/setAppId","/openapi/xi-an/importData"};
// 获取请求路径 // 获取请求路径
for(String uri : url) { for(String uri : url) {
if(request.getRequestURI().indexOf(uri) != -1) { if(request.getRequestURI().indexOf(uri) != -1) {
......
package com.yeejoin.amos.api.openapi.controller;
import com.yeejoin.amos.api.openapi.service.XiAnDataDockServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.io.FilenameUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
@RestController
@Api(tags = "西安数据对接 API")
@RequestMapping(value = "/xi-an")
public class XiAnDataDockController {
private final XiAnDataDockServiceImpl xiAnDataDockService;
public XiAnDataDockController(XiAnDataDockServiceImpl xiAnDataDockService) {
this.xiAnDataDockService = xiAnDataDockService;
}
/**
* 批量导入设备数据的接口
*
* @param file 上传的文件
* @return ResponseModel 封装的响应数据
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/importData")
@ApiOperation(httpMethod = "POST", value = "设备批量导入", notes = "导入多个设备的数据文件")
public Object importPressureData(@RequestParam("file") MultipartFile file) {
// 校验文件是否为空
if (file.isEmpty()) {
return ResponseHelper.buildResponse("文件不能为空");
}
// 校验文件类型为 Excel
String contentType = file.getContentType();
String fileExtension = FilenameUtils.getExtension(file.getOriginalFilename());
// 校验 Excel 文件的 MIME type 和扩展名
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.importEquipmentData(file);
}
}
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class EquCategoryConverter implements Converter<String> {
private static final Map<String, String> equipmentMap = new HashMap<>();
static {
// 填充映射关系
equipmentMap.put("承压蒸汽锅炉", "1100");
equipmentMap.put("承压热水锅炉", "1200");
equipmentMap.put("有机热载体锅炉", "1300");
equipmentMap.put("移动式压力容器", "2200");
equipmentMap.put("气瓶", "2300");
equipmentMap.put("氧舱", "2400");
equipmentMap.put("桥式起重机", "4100");
equipmentMap.put("门式起重机", "4200");
equipmentMap.put("塔式起重机", "4300");
equipmentMap.put("流动式起重机", "4400");
equipmentMap.put("门座式起重机", "4700");
equipmentMap.put("升降机", "4800");
equipmentMap.put("缆索式起重机", "4900");
equipmentMap.put("桅杆式起重机", "4A00");
equipmentMap.put("机械式停车设备", "4D00");
equipmentMap.put("机动工业车辆", "5100");
equipmentMap.put("非公路用旅游观光车辆", "5200");
equipmentMap.put("观览车类", "6100");
equipmentMap.put("滑行车类", "6200");
equipmentMap.put("固定式压力容器", "2100");
equipmentMap.put("架空游览车类", "6300");
equipmentMap.put("陀螺类", "6400");
equipmentMap.put("飞行塔类", "6500");
equipmentMap.put("转马类", "6600");
equipmentMap.put("自控飞机类", "6700");
equipmentMap.put("赛车类", "6800");
equipmentMap.put("小火车类", "6900");
equipmentMap.put("碰碰车类", "6A00");
equipmentMap.put("滑道类", "6B00");
equipmentMap.put("无动力游乐设施", "6E00");
equipmentMap.put("工业管道", "8300");
equipmentMap.put("客运架空索道", "9100");
equipmentMap.put("客运缆车", "9200");
equipmentMap.put("客运拖牵索道", "9300");
equipmentMap.put("水上游乐设施类", "6D00");
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
return equipmentMap.getOrDefault(cellValue, null);
}
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData("");
}
}
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class EquCodeTypeConverter implements Converter<String> {
private static final String HAVE = "有";
private static final String NOT = "无";
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (HAVE.equals(cellValue)) {
return "1";
} else if (NOT.equals(cellValue)) {
return "2";
}
return null;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("1")) {
return new CellData(HAVE);
} else if (o.equals("2")) {
return new CellData(NOT);
}
return new CellData("");
}
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class EquDefineConverter implements Converter<String> {
private static final Map<String, String> equipmentMap = new HashMap<>();
static {
// 填充映射关系
equipmentMap.put("有机热载体气相炉", "1310");
equipmentMap.put("有机热载体液相炉", "1320");
equipmentMap.put("超高压容器", "2110");
equipmentMap.put("第三类压力容器", "2130");
equipmentMap.put("第二类压力容器", "2150");
equipmentMap.put("第一类压力容器", "2170");
equipmentMap.put("铁路罐车", "2210");
equipmentMap.put("汽车罐车", "2220");
equipmentMap.put("长管拖车", "2230");
equipmentMap.put("罐式集装箱", "2240");
equipmentMap.put("管束式集装箱", "2250");
equipmentMap.put("无缝气瓶", "2310");
equipmentMap.put("焊接气瓶", "2320");
equipmentMap.put("特种气瓶(内装填料气瓶、纤维缠绕气瓶、低温绝热气瓶)", "23T0");
equipmentMap.put("医用氧舱", "2410");
equipmentMap.put("高气压舱", "2420");
equipmentMap.put("通用桥式起重机", "4110");
equipmentMap.put("防爆桥式起重机", "4130");
equipmentMap.put("绝缘桥式起重机", "4140");
equipmentMap.put("冶金桥式起重机", "4150");
equipmentMap.put("电动葫芦桥式起重机", "4190");
equipmentMap.put("通用门式起重机", "4210");
equipmentMap.put("防爆门式起重机", "4220");
equipmentMap.put("轨道式集装箱门式起重机", "4230");
equipmentMap.put("轮胎式集装箱门式起重机", "4240");
equipmentMap.put("岸边集装箱起重机", "4250");
equipmentMap.put("造船门式起重机", "4260");
equipmentMap.put("电动葫芦门式起重机", "4270");
equipmentMap.put("装卸桥", "4280");
equipmentMap.put("架桥机", "4290");
equipmentMap.put("普通塔式起重机", "4310");
equipmentMap.put("电站塔式起重机", "4320");
equipmentMap.put("轮胎起重机", "4410");
equipmentMap.put("履带起重机", "4420");
equipmentMap.put("集装箱正面吊运起重机", "4440");
equipmentMap.put("铁路起重机", "4450");
equipmentMap.put("门座起重机", "4710");
equipmentMap.put("固定式起重机", "4760");
equipmentMap.put("施工升降机", "4860");
equipmentMap.put("简易升降机", "4870");
equipmentMap.put("叉车", "5110");
equipmentMap.put("峡谷漂流系列", "6D10");
equipmentMap.put("水滑梯系列", "6D20");
equipmentMap.put("碰碰船系列", "6D40");
equipmentMap.put("蹦极系列", "6E10");
equipmentMap.put("滑索系列", "6E20");
equipmentMap.put("空中飞人系列", "6E30");
equipmentMap.put("系留式观光气球系列", "6E40");
equipmentMap.put("工艺管道", "8310");
equipmentMap.put("动力管道", "8320");
equipmentMap.put("制冷管道", "8330");
equipmentMap.put("往复式客运架空索道", "9110");
equipmentMap.put("循环式客运架空索道", "9120");
equipmentMap.put("往复式客运缆车", "9210");
equipmentMap.put("循环式客运缆车", "9220");
equipmentMap.put("低位客运拖牵索道", "9310");
equipmentMap.put("高位客运拖牵索道", "9320");
equipmentMap.put("电动单梁起重机", "4170");
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
return equipmentMap.getOrDefault(cellValue, null);
}
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData("");
}
}
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class EquListConverter implements Converter<String> {
private static final Map<String, String> equipmentMap = new HashMap<>();
static {
// 填充映射关系
equipmentMap.put("起重机械", "4000");
equipmentMap.put("场内机动车辆", "5000");
equipmentMap.put("锅炉", "1000");
equipmentMap.put("压力容器", "2000");
equipmentMap.put("压力管道", "8000");
equipmentMap.put("大型游乐设施", "6000");
equipmentMap.put("客运索道", "9000");
}
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
return equipmentMap.getOrDefault(cellValue, null);
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData("");
}
}
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class ImportedConverter implements Converter<String> {
private static final String WHETHER = "是";
private static final String NOT = "否";
@Override
public Class<?> supportJavaTypeKey() {
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
// Excel中对应的CellData属性类型
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (WHETHER.equals(cellValue)) {
return "1";
} else if (NOT.equals(cellValue)) {
return "0";
}
return null;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("1")) {
return new CellData(WHETHER);
} else if (o.equals("0")) {
return new CellData(NOT);
}
return new CellData("");
}
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.yeejoin.amos.api.openapi.converter.*;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "西安数据对接-设备信息", description = "西安数据对接-设备信息")
public class XiAnEquipInfoExcelDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L;
//----------------------------------------------------------------------基本信息
@ApiModelProperty(value = "设备种类")
@ExcelProperty(value = "设备种类",converter = EquListConverter.class)
@NotBlank(message = "设备种类不能为空")
private String equList;
@ApiModelProperty(value = "设备类别")
@ExcelProperty(value = "设备类别",converter = EquCategoryConverter.class)
@NotBlank(message = "设备类别不能为空")
private String equCategory;
@ApiModelProperty(value = "设备品种")
@ExcelProperty(value = "设备品种",converter = EquDefineConverter.class)
private String equDefine;
@ApiModelProperty(value = "单位内编号")
@ExcelProperty(value = "单位内编号")
@NotBlank(message = "单位内编号不能为空")
private String useInnerCode;
@ApiModelProperty(value = "产品名称")
@ExcelProperty(value = "产品名称")
@NotBlank(message = "产品名称不能为空")
private String productName;
@ApiModelProperty(value = "设备型号")
@ExcelProperty(value = "设备型号")
@NotBlank(message = "设备型号不能为空")
private String equType;
@ApiModelProperty(value = "设备总价值(万元)")
@ExcelProperty(value = "设备总价值(万元)")
private String equPrice;
@ApiModelProperty(value = "有无设备代码")
@ExcelProperty(value = "有无设备代码", converter = EquCodeTypeConverter.class)
@NotBlank(message = "有无设备代码不能为空")
private String equCodeType;
@ApiModelProperty(value = "设备代码")
@ExcelProperty(value = "设备代码")
private String equCode;//判断是否必填和位数
//-----------------------------------------------------------------------使用信息
@ApiModelProperty(value = "使用单位统一社会信用代码")
@ExcelProperty(value = "使用单位统一社会信用代码")
@NotBlank(message = "使用单位统一社会信用代码不能为空")
private String useUnitCode;
@ApiModelProperty(value = "使用单位名称")
@ExcelProperty(value = "使用单位名称")
@NotBlank(message = "使用单位名称不能为空")
private String useUnit;
//-----------------------------------------------------------------------设计信息
@ApiModelProperty(value = "设计单位统一社会信用代码")
@ExcelProperty(value = "设计单位统一社会信用代码")
@NotBlank(message = "设计单位统一社会信用代码不能为空")
private String designUnitCreditCode;
@ApiModelProperty(value = "设计单位名称")
@ExcelProperty(value = "设计单位名称")
@NotBlank(message = "设计单位名称不能为空")
private String designUnitName;
@ApiModelProperty(value = "设计许可编号")
@ExcelProperty(value = "设计许可编号")
private String designLicenseNum;
@ApiModelProperty(value = "设计使用年限(年)")
@ExcelProperty(value = "设计使用年限(年)")
@NotBlank(message = "设计使用年限(年)不能为空")
private String designUseDate;
@ApiModelProperty(value = "设计日期")
@ExcelProperty(value = "设计日期")
@DateTimeFormat("yyyy-MM-dd")
@NotBlank(message = "设计日期不能为空")
private String designDate;
@ApiModelProperty(value = "总图图号")
@ExcelProperty(value = "总图图号")
private String drawingDo;
@ApiModelProperty(value = "设计文件鉴定单位")
@ExcelProperty(value = "设计文件鉴定单位")
private String appraisalUnit;
@ApiModelProperty(value = "设计文件鉴定日期")
@ExcelProperty(value = "设计文件鉴定日期")
@DateTimeFormat("yyyy-MM-dd")
private String appraisalDate;
//---------------------------------------------------------------制造信息
@ApiModelProperty(value = "制造单位统一社会信用代码")
@ExcelProperty(value = "制造单位统一社会信用代码")
@NotBlank(message = "制造单位统一社会信用代码不能为空")
private String produceUnitCreditCode;
@ApiModelProperty(value = "制造单位名称")
@ExcelProperty(value = "制造单位名称")
@NotBlank(message = "制造单位名称不能为空")
private String produceUnitName;
@ApiModelProperty(value = "制造许可编号")
@ExcelProperty(value = "制造许可编号")
@NotBlank(message = "制造许可编号不能为空")
private String produceLicenseNum;
@ApiModelProperty(value = "出厂编号/产品编码")
@ExcelProperty(value = "出厂编号/产品编码")
@NotBlank(message = "出厂编号/产品编码不能为空")
private String factoryNum;
@ApiModelProperty(value = "制造日期")
@ExcelProperty(value = "制造日期")
@NotBlank(message = "制造日期不能为空")
@DateTimeFormat("yyyy-MM-dd")
private String produceDate;
@ApiModelProperty(value = "是否进口")
@ExcelProperty(value = "是否进口", converter = ImportedConverter.class)
private String imported;
@ApiModelProperty(value = "制造国")
@ExcelProperty(value = "制造国")
private String produceCountry;
//--------------------------------------------------------起重机械----技术参数
@ExcelProperty(value = "额定起重量(t)")
@ApiModelProperty(value = "额定起重量(t)")
private String ratedLiftingCapacity;
@ExcelProperty(value = "悬臂长度(m)")
@ApiModelProperty(value = "悬臂长度(m)")
private String cantileverLength;
@ExcelProperty(value = "起升速度(m/min)")
@ApiModelProperty(value = "起升速度(m/min)")
private String liftingSpeed;
@ExcelProperty(value = "大车运行速度(m/min)")
@ApiModelProperty(value = "大车运行速度(m/min)")
private String bigcarRunSpeed;
@ExcelProperty(value = "起升高度(m)")
@ApiModelProperty(value = "起升高度(m)")
private String liftingHeight;
@ExcelProperty(value = "工作级别")
@ApiModelProperty(value = "工作级别")
private String workLevel;
@ExcelProperty(value = "燃爆物质")
@ApiModelProperty(value = "燃爆物质")
private String explosiveSubstance;
@ExcelProperty(value = "区域防爆等级")
@ApiModelProperty(value = "区域防爆等级")
private String explosionProofGrade;
@ExcelProperty(value = "小车运行速度(m/min)")
@ApiModelProperty(value = "小车运行速度(m/min)")
private String smallcarrunSpeed;
@ExcelProperty(value = "额定起重力矩(KN.m)")
@ApiModelProperty(value = "额定起重力矩(KN.m)")
private String ratedLiftingTorque;
@ExcelProperty(value = "工作幅度(m)")
@ApiModelProperty(value = "工作幅度(m)")
private String spanWorkingRange;
// @ExcelProperty(value = "跨度(m)")
// @ApiModelProperty(value = "跨度(m)")
// private String spanWorkingRange;
@ExcelProperty(value = "变幅速度(m/min)")
@ApiModelProperty(value = "变幅速度(m/min)")
private String derrickingSpeed;
@ExcelProperty(value = "监检结束高度(m)")
@ApiModelProperty(value = "监检结束高度(m)")
private String checkFinshedHeight;
@ExcelProperty(value = "最大起重量(t)")
@ApiModelProperty(value = "最大起重量(t)")
private String maxLiftingCapacity;
@ExcelProperty(value = "最大起重力矩(KN.m)")
@ApiModelProperty(value = "最大起重力矩(KN.m)")
private String maxLiftingTorque;
@ExcelProperty(value = "运行速度(m/min)")
@ApiModelProperty(value = "运行速度(m/min)")
private String runningSpeed;
@ExcelProperty(value = "额定载重量(Kg)")
@ApiModelProperty(value = "额定载重量(Kg)")
private String ratedLoadCapacity;
@ExcelProperty(value = "额定乘员数(人)")
@ApiModelProperty(value = "额定乘员数(人)")
private String aa;
@ExcelProperty(value = "额定提升速度(m/min)")
@ApiModelProperty(value = "额定提升速度(m/min)")
private String ratedMembers;
@ExcelProperty(value = "自由端高度(m)")
@ApiModelProperty(value = "自由端高度(m)")
private String heightFreeEnd;
@ExcelProperty(value = "监检结束时高度(m)")
@ApiModelProperty(value = "监检结束时高度(m)")
private String checkFinishedHeight;
@ExcelProperty(value = "吊笼数量(个)")
@ApiModelProperty(value = "吊笼数量(个)")
private String hangingCagesNumber;
@ExcelProperty(value = "存容量(辆)")
@ApiModelProperty(value = "存容量(辆)")
private String storageCapacity;
@ExcelProperty(value = "层数(层)")
@ApiModelProperty(value = "层数(层)")
private String numberStorey;
@ExcelProperty(value = "横移速度(m/min)")
@ApiModelProperty(value = "横移速度(m/min)")
private String ratedTraverseSpeed;
@ExcelProperty(value = "适停车辆尺寸(宽)(m)")
@ApiModelProperty(value = "适停车辆尺寸(宽)(m)")
private String parkingVehicleWeight;
@ExcelProperty(value = "升降速度(m/min)")
@ApiModelProperty(value = "升降速度(m/min)")
private String ratedLiftSpeed;
@ExcelProperty(value = "单车最大(出)时间(s)")
@ApiModelProperty(value = "单车最大(出)时间(s)")
private String bicycleMaxExitTime;
@ExcelProperty(value = "单车最大(进)时间(s)")
@ApiModelProperty(value = "单车最大(进)时间(s)")
private String bicycleMaxComeTime;
@ExcelProperty(value = "适停车辆尺寸(长)(m)")
@ApiModelProperty(value = "适停车辆尺寸(长)(m)")
private String parkingVehicleLength;
@ExcelProperty(value = "适停车辆尺寸(高)(m)")
@ApiModelProperty(value = "适停车辆尺寸(高)(m)")
private String parkingVehicleHeight;
@ExcelProperty(value = "吊笼工作行程(m)")
@ApiModelProperty(value = "吊笼工作行程(m)")
private String workStrokeCage;
//--------------------------------------------------------------场内机动车辆----技术参数
@ExcelProperty(value = "发动机(行走电机)编号")
@ApiModelProperty(value = "发动机(行走电机)编号")
private String engineNo;
@ExcelProperty(value = "车架(底盘)编号")
@ApiModelProperty(value = "车架(底盘)编号")
private String frameNo;
@ExcelProperty(value = "额定起重量(Kg)")
@ApiModelProperty(value = "额定起重量(Kg)")
private String liftingCapacity;
@ExcelProperty(value = "传动方式")
@ApiModelProperty(value = "传动方式")
private String transmissionMode;
@ExcelProperty(value = "自重(Kg)")
@ApiModelProperty(value = "自重(Kg)")
private String weight;
@ExcelProperty(value = "动力方式")
@ApiModelProperty(value = "动力方式")
private String powerMode;
@ExcelProperty(value = "最大运行速度(km/h)")
@ApiModelProperty(value = "最大运行速度(km/h)")
private String maxRunningSpeed;
@ExcelProperty(value = "空载最大起升高度(mm)")
@ApiModelProperty(value = "空载最大起升高度(mm)")
private String maxLiftingHeight;
@ExcelProperty(value = "防爆气体/粉尘组别")
@ApiModelProperty(value = "防爆气体/粉尘组别")
private String gasGroup;
@ExcelProperty(value = "车架结构")
@ApiModelProperty(value = "车架结构")
private String frameStructure;
@ExcelProperty(value = "驾驶方式")
@ApiModelProperty(value = "驾驶方式")
private String drivingMode;
@ExcelProperty(value = "空载最大运行速度(km/h)")
@ApiModelProperty(value = "空载最大运行速度(km/h)")
private String carryingIdlerMaxRunningSpeed;
@ExcelProperty(value = "防爆温度组别")
@ApiModelProperty(value = "防爆温度组别")
private String temperatureGroup;
@ExcelProperty(value = "防爆设备保护级别")
@ApiModelProperty(value = "防爆设备保护级别")
private String protectGrade;
@ExcelProperty(value = "额定载客人数(人)")
@ApiModelProperty(value = "额定载客人数(人)")
private String passengersNumber;
@ExcelProperty(value = "最大行驶坡度")
@ApiModelProperty(value = "最大行驶坡度")
private String maxDrivingSlope;
@ExcelProperty(value = "轴距(mm)")
@ApiModelProperty(value = "轴距(mm)")
private String wheelBase;
@ExcelProperty(value = "轮距(前)(mm)")
@ApiModelProperty(value = "轮距(前)(mm)")
private String trackWidthFront;
@ExcelProperty(value = "观光列车每节车厢座位数(个)")
@ApiModelProperty(value = "观光列车每节车厢座位数(个)")
private String seatNumber;
@ExcelProperty(value = "整车整备质量(Kg)")
@ApiModelProperty(value = "整车整备质量(Kg)")
private String vehicleMass;
@ExcelProperty(value = "观光列车车厢数(节)")
@ApiModelProperty(value = "观光列车车厢数(节)")
private String carsNumber;
@ExcelProperty(value = "轮距(后)(mm)")
@ApiModelProperty(value = "轮距(后)(mm)")
private String trackWidthBehind;
@ExcelProperty(value = "观光列车牵引车头座位数(个)")
@ApiModelProperty(value = "观光列车牵引车头座位数(个)")
private String tractorSeatNumber;
//--------------------------------------------------------------锅炉----技术参数
@ExcelProperty(value = "设备级别")
@ApiModelProperty(value = "设备级别")
private String deviceLevel;
@ExcelProperty(value = "额定蒸发量(热功率) (t/h(MW))")
@ApiModelProperty(value = "额定蒸发量(热功率) (t/h(MW))")
private String ratedEvaporationCapacityThermalPower;
@ExcelProperty(value = "额定工作压力(MPa)")
@ApiModelProperty(value = "额定工作压力(MPa)")
private String ratedWorkingPressure;
@ExcelProperty(value = "额定工作温度(℃)")
@ApiModelProperty(value = "额定工作温度(℃)")
private String ratedOperatingTemperature;
@ExcelProperty(value = "设计热效率(%)")
@ApiModelProperty(value = "设计热效率(%)")
private String designThermalEfficiency;
@ExcelProperty(value = "给水温度(℃)")
@ApiModelProperty(value = "给水温度(℃)")
private String feedwaterTemperature;
@ExcelProperty(value = "额定出/回水(油)温度(℃)")
@ApiModelProperty(value = "额定出/回水(油)温度(℃)")
private String ratedOutletReturnWaterOilTemperature;
@ExcelProperty(value = "锅炉本体水(油)容积 (L)")
@ApiModelProperty(value = "锅炉本体水(油)容积 (L)")
private String waterOilVolumeOfBoilerProper;
@ExcelProperty(value = "整装锅炉本体液压试验介质/压力 (MPa)")
@ApiModelProperty(value = "整装锅炉本体液压试验介质/压力 (MPa)")
private String hydraulicTestMediumPressureOfPackagedBoilerBody;
@ExcelProperty(value = "再热器进(出)口温度 (℃)")
@ApiModelProperty(value = "再热器进(出)口温度 (℃)")
private String inletOutletTemperatureOfReheater;
@ExcelProperty(value = "再热器进(出)口压力 (MPa)")
@ApiModelProperty(value = "再热器进(出)口压力 (MPa)")
private String reheaterInletOutletPressure;
@ExcelProperty(value = "再热蒸汽流量 (t/h)")
@ApiModelProperty(value = "再热蒸汽流量 (t/h)")
private String reheatSteamFlow;
@ExcelProperty(value = "有机热载体锅炉气密试验介质/压力 (MPa)")
@ApiModelProperty(value = "有机热载体锅炉气密试验介质/压力 (MPa)")
private String glAirtightTest;
@ExcelProperty(value = "燃烧方式")
@ApiModelProperty(value = "燃烧方式")
private String combustionMode;
@ExcelProperty(value = "燃料(热源)种类")
@ApiModelProperty(value = "燃料(热源)种类")
private String fuelType;
@ExcelProperty(value = "主要受压部件-名称")
@ApiModelProperty(value = "主要受压部件-名称")
private String nameOfPressureParts;
@ExcelProperty(value = "主要受压部件-材料")
@ApiModelProperty(value = "主要受压部件-材料")
private String materialOfPressureParts;
@ExcelProperty(value = "主要受压部件-壁厚(mm)")
@ApiModelProperty(value = "主要受压部件-壁厚(mm)")
private String wallThicknessOfPressureParts;
@ExcelProperty(value = "主要受压部件-无损检测方法")
@ApiModelProperty(value = "主要受压部件-无损检测方法")
private String nonDestructiveTestingMethodsForPressureParts;
@ExcelProperty(value = "主要受压部件-无损检测比例(%)")
@ApiModelProperty(value = "主要受压部件-无损检测比例(%)")
private String proportionOfNdtForPressureParts;
@ExcelProperty(value = "主要受压部件-热处理温度(℃)")
@ApiModelProperty(value = "主要受压部件-热处理温度(℃)")
private String heatTreatmentTemperatureOfPressureParts;
@ExcelProperty(value = "主要受压部件-热处理时间(h)")
@ApiModelProperty(value = "主要受压部件-热处理时间(h)")
private String heatTreatmentTimeOfPressureParts;
@ExcelProperty(value = "主要受压部件-水(耐)压试验介质")
@ApiModelProperty(value = "主要受压部件-水(耐)压试验介质")
private String hydrostaticTestMedium;
@ExcelProperty(value = "主要受压部件-水(耐)压试验压力(Mpa)")
@ApiModelProperty(value = "主要受压部件-水(耐)压试验压力(Mpa)")
private String hydrostaticTestPressure;
//--------------------------------------------------------------压力容器----技术参数
@ExcelProperty(value = "额定质量(kg)")
@ApiModelProperty(value = "额定质量(kg)")
private String ratedQuality;
@ExcelProperty(value = "型号")
@ApiModelProperty(value = "型号")
private String modelNumber;
@ExcelProperty(value = "外径")
@ApiModelProperty(value = "外径")
private String outsideDiameter;
@ExcelProperty(value = "材料(管路)")
@ApiModelProperty(value = "材料(管路)")
private String piping;
@ExcelProperty(value = "无损检测比例(管路)(%)")
@ApiModelProperty(value = "无损检测比例(管路)(%)")
private String glRatio;
@ExcelProperty(value = "耐压试验压力(管路)(MPa)")
@ApiModelProperty(value = "耐压试验压力(管路)(MPa)")
private String glPressure;
@ExcelProperty(value = "气密性试验压力(管路)(MPa)")
@ApiModelProperty(value = "气密性试验压力(管路)(MPa)")
private String glAirTightness;
@ExcelProperty(value = "使用环境温度(℃)")
@ApiModelProperty(value = "使用环境温度(℃)")
private String ambientTemperature;
@ExcelProperty(value = "壁厚")
@ApiModelProperty(value = "壁厚")
private String wallThickness;
@ExcelProperty(value = "无损检测方法(气瓶)")
@ApiModelProperty(value = "无损检测方法(气瓶)")
private String qpLossless;
@ExcelProperty(value = "无损检测比例(气瓶)(%)")
@ApiModelProperty(value = "无损检测比例(气瓶)(%)")
private String qpRatio;
@ExcelProperty(value = "气密性试验压力(气瓶)(MPa)")
@ApiModelProperty(value = "气密性试验压力(气瓶)(MPa)")
private String qpAirTightness;
@ExcelProperty(value = "气瓶安装位置")
@ApiModelProperty(value = "气瓶安装位置")
private String installationPosition;
@ExcelProperty(value = "瓶体内含氧量(%)")
@ApiModelProperty(value = "瓶体内含氧量(%)")
private String oxygen;
@ExcelProperty(value = "单瓶容积(L)")
@ApiModelProperty(value = "单瓶容积(L)")
private String singleBottleVolume;
@ExcelProperty(value = "充装介质")
@ApiModelProperty(value = "充装介质")
private String chargingMedium;
@ExcelProperty(value = "长度")
@ApiModelProperty(value = "长度")
private String length;
@ExcelProperty(value = "材料(瓶体)")
@ApiModelProperty(value = "材料(瓶体)")
private String bottleBody;
@ExcelProperty(value = "无损检测方法(管路)")
@ApiModelProperty(value = "无损检测方法(管路)")
private String glLossless;
@ExcelProperty(value = "气体置换后压力(MPa)")
@ApiModelProperty(value = "气体置换后压力(MPa)")
private String displacementPressure;
@ExcelProperty(value = "规格")
@ApiModelProperty(value = "规格")
private String specification;
@ExcelProperty(value = "公称工作压力(MPa)")
@ApiModelProperty(value = "公称工作压力(MPa)")
private String nominalWorkingPressure;
@ExcelProperty(value = "材料(端塞)")
@ApiModelProperty(value = "材料(端塞)")
private String endPlug;
@ExcelProperty(value = "耐压试验压力(气瓶)(MPa)")
@ApiModelProperty(value = "耐压试验压力(气瓶)(MPa)")
private String qpPressure;
@ExcelProperty(value = "热处理方式")
@ApiModelProperty(value = "热处理方式")
private String heatTreatmentMethod;
@ExcelProperty(value = "热处理温度(℃)")
@ApiModelProperty(value = "热处理温度(℃)")
private String qpHeatTreatmentTemperature;
@ExcelProperty(value = "容器容积(m³)")
@ApiModelProperty(value = "容器容积(m³)")
private String totalVolume;
@ExcelProperty(value = "材料(封头)")
@ApiModelProperty(value = "材料(封头)")
private String pressureMaterialHead;
@ExcelProperty(value = "厚度(封头)(mm)")
@ApiModelProperty(value = "厚度(封头)(mm)")
private String fixedHead;
@ExcelProperty(value = "盛装介质重量(kg)")
@ApiModelProperty(value = "盛装介质重量(kg)")
private String mediumWeight;
@ExcelProperty(value = "设计温度(壳程)(℃)")
@ApiModelProperty(value = "设计温度(壳程)(℃)")
private String temperatureShell;
@ExcelProperty(value = "介质(壳程)")
@ApiModelProperty(value = "介质(壳程)")
private String mediumShell;
@ExcelProperty(value = "介质(夹套)")
@ApiModelProperty(value = "介质(夹套)")
private String mediumJacket;
@ExcelProperty(value = "耐压试验种类")
@ApiModelProperty(value = "耐压试验种类")
private String withstandVoltage;
@ExcelProperty(value = "耐压试验压力(MPa)")
@ApiModelProperty(value = "耐压试验压力(MPa)")
private String withstandPressureTest;
@ExcelProperty(value = "容器内径(mm)")
@ApiModelProperty(value = "容器内径(mm)")
private String pressureVesselDiameter;
@ExcelProperty(value = "材料(衬里)")
@ApiModelProperty(value = "材料(衬里)")
private String pressureMaterialLining;
@ExcelProperty(value = "厚度(衬里)(mm)")
@ApiModelProperty(value = "厚度(衬里)(mm)")
private String fixedLining;
@ExcelProperty(value = "设计压力(壳程)")
@ApiModelProperty(value = "设计压力(壳程)")
private String pressureHousingPath;
@ExcelProperty(value = "设计温度(管程)(℃)")
@ApiModelProperty(value = "设计温度(管程)(℃)")
private String temperaturePipe;
@ExcelProperty(value = "介质(管程)")
@ApiModelProperty(value = "介质(管程)")
private String mediumPipe;
@ExcelProperty(value = "安装型式")
@ApiModelProperty(value = "安装型式")
private String installation;
@ExcelProperty(value = "泄漏试验种类")
@ApiModelProperty(value = "泄漏试验种类")
private String leakage;
@ExcelProperty(value = "泄漏试验压力(MPa)")
@ApiModelProperty(value = "泄漏试验压力(MPa)")
private String leakPressure;
@ExcelProperty(value = "容器高(长)(mm)")
@ApiModelProperty(value = "容器高(长)(mm)")
private String height;
@ExcelProperty(value = "材料(夹套)")
@ApiModelProperty(value = "材料(夹套)")
private String materialJacket;
@ExcelProperty(value = "厚度(夹套)(mm)")
@ApiModelProperty(value = "厚度(夹套)(mm)")
private String fixedJacket;
@ExcelProperty(value = "设计压力(管程)")
@ApiModelProperty(value = "设计压力(管程)")
private String pressurePipe;
@ExcelProperty(value = "设计温度(夹套)(℃)")
@ApiModelProperty(value = "设计温度(夹套)(℃)")
private String temperatureJacket;
@ExcelProperty(value = "最高允许工作压力(管程)")
@ApiModelProperty(value = "最高允许工作压力(管程)")
private String maxPressurePipe;
@ExcelProperty(value = "支座型式")
@ApiModelProperty(value = "支座型式")
private String support;
@ExcelProperty(value = "保温绝热方式")
@ApiModelProperty(value = "保温绝热方式")
private String insulation;
@ExcelProperty(value = "材料(筒体(球壳))")
@ApiModelProperty(value = "材料(筒体(球壳))")
private String materialCylinderShell;
@ExcelProperty(value = "厚度(筒体(球壳))(mm)")
@ApiModelProperty(value = "厚度(筒体(球壳))(mm)")
private String thickness;
@ExcelProperty(value = "容器自重(kg)")
@ApiModelProperty(value = "容器自重(kg)")
private String selfWeight;
@ExcelProperty(value = "设计压力(夹套)")
@ApiModelProperty(value = "设计压力(夹套)")
private String pressureJacket;
@ExcelProperty(value = "最高允许工作压力(夹套)")
@ApiModelProperty(value = "最高允许工作压力(夹套)")
private String maxPressureJacket;
@ExcelProperty(value = "最高允许工作压力(壳程)")
@ApiModelProperty(value = "最高允许工作压力(壳程)")
private String maxPressureShell;
@ExcelProperty(value = "主体结构型式")
@ApiModelProperty(value = "主体结构型式")
private String mainStructureType;
@ExcelProperty(value = "无损检测方法")
@ApiModelProperty(value = "无损检测方法")
private String checkLossless;
@ExcelProperty(value = "容器型号")
@ApiModelProperty(value = "容器型号")
private String container;
@ExcelProperty(value = "工作压力(MPa)")
@ApiModelProperty(value = "工作压力(MPa)")
private String workingPressure;
@ExcelProperty(value = "厚度(筒体)(mm)")
@ApiModelProperty(value = "厚度(筒体)(mm)")
private String thicknessCylinder;
@ExcelProperty(value = "罐车编号")
@ApiModelProperty(value = "罐车编号")
private String carNum;
@ExcelProperty(value = "设计温度(℃)")
@ApiModelProperty(value = "设计温度(℃)")
private String designTemperature;
@ExcelProperty(value = "腐蚀裕量(mm)")
@ApiModelProperty(value = "腐蚀裕量(mm)")
private String corrosionMargin;
@ExcelProperty(value = "容积(L)")
@ApiModelProperty(value = "容积(L)")
private String volume;
@ExcelProperty(value = "设计压力")
@ApiModelProperty(value = "设计压力")
private String designPressure;
@ExcelProperty(value = "材料(筒体)")
@ApiModelProperty(value = "材料(筒体)")
private String materialCylinder;
@ExcelProperty(value = "最大充装量(kg)")
@ApiModelProperty(value = "最大充装量(kg)")
private String maxFill;
@ExcelProperty(value = "工作温度(℃)")
@ApiModelProperty(value = "工作温度(℃)")
private String workTemperature;
@ExcelProperty(value = "介质")
@ApiModelProperty(value = "介质")
private String medium;
@ExcelProperty(value = "氧舱品种")
@ApiModelProperty(value = "氧舱品种")
private String oxygenChamber;
@ExcelProperty(value = "温度(℃)")
@ApiModelProperty(value = "温度(℃)")
private String temperature;
@ExcelProperty(value = "额定进舱人数(人)")
@ApiModelProperty(value = "额定进舱人数(人)")
private String ratedEntryCapacity;
@ExcelProperty(value = "压力介质")
@ApiModelProperty(value = "压力介质")
private String pressureMedium;
@ExcelProperty(value = "主体结构")
@ApiModelProperty(value = "主体结构")
private String chamberMain;
@ExcelProperty(value = "人均舱容(m³)")
@ApiModelProperty(value = "人均舱容(m³)")
private String perCapitaCabinCapacity;
@ExcelProperty(value = "压力(MPa)")
@ApiModelProperty(value = "压力(MPa)")
private String chamberPressure;
//--------------------------------------------------------------------压力管道----技术参数
@ExcelProperty(value = "管道类别")
@ApiModelProperty(value = "管道类别")
private String pipelineClass;
@ExcelProperty(value = "公称壁厚(mm)")
@ApiModelProperty(value = "公称壁厚(mm)")
private String wallThickness_YLGD;
@ExcelProperty(value = "公称直径(mm)")
@ApiModelProperty(value = "公称直径(mm)")
private String nominalDiameter;
@ExcelProperty(value = "管道长度(m)")
@ApiModelProperty(value = "管道长度(m)")
private String pipeLength;
@ExcelProperty(value = "压力(MPa)")
@ApiModelProperty(value = "压力(MPa)")
private String pressure;
@ExcelProperty(value = "介质")
@ApiModelProperty(value = "介质")
private String medium_YLGD;
@ExcelProperty(value = "起/始位置 (经纬度)")
@ApiModelProperty(value = "起/始位置 (经纬度)")
private String startePosition;
@ExcelProperty(value = "温度(℃)")
@ApiModelProperty(value = "温度(℃)")
private String temperature_YLGD;
@ExcelProperty(value = "管道编号")
@ApiModelProperty(value = "管道编号")
private String pipelineNumber;
@ExcelProperty(value = "管道级别")
@ApiModelProperty(value = "管道级别")
private String deviceLevel_YLGD;
@ExcelProperty(value = "备注")
@ApiModelProperty(value = "备注")
private String remarks;
//--------------------------------------------------------------大型游乐设施----技术参数
@ExcelProperty(value = "轨道高度(m)")
@ApiModelProperty(value = "轨道高度(m)")
private String trackHeight;
@ExcelProperty(value = "运行速度(km/h (m/s))")
@ApiModelProperty(value = "运行速度(km/h (m/s))")
private String runningSpeed_DXYLSS;
@ExcelProperty(value = "承载人数/车 (人)")
@ApiModelProperty(value = "承载人数/车 (人)")
private String numberOfPassengers;
@ExcelProperty(value = "滑道长度(m)")
@ApiModelProperty(value = "滑道长度(m)")
private String slideLength;
@ExcelProperty(value = "运行高度(m)")
@ApiModelProperty(value = "运行高度(m)")
private String operatingHeight;
@ExcelProperty(value = "蹦极绳长度(m)")
@ApiModelProperty(value = "蹦极绳长度(m)")
private String slideLength_DXYLSS;
// @ExcelProperty(value = "滑索长度(m)")
// @ApiModelProperty(value = "滑索长度(m)")
// private String slideLength_DXYLSS;
@ExcelProperty(value = "回转直径(m)")
@ApiModelProperty(value = "回转直径(m)")
private String rotaryDiameter;
@ExcelProperty(value = "单侧摆角(°)")
@ApiModelProperty(value = "单侧摆角(°)")
private String unilateralSwingAngle;
@ExcelProperty(value = "车辆数量 (个)")
@ApiModelProperty(value = "车辆数量 (个)")
private String numberOfVehicles;
@ExcelProperty(value = "设备高度(m)")
@ApiModelProperty(value = "设备高度(m)")
private String equipmentHeight;
@ExcelProperty(value = "运行高度(m)")
@ApiModelProperty(value = "运行高度(m)")
private String operatingHeight_DXYLSS;
@ExcelProperty(value = "回转速度(km/h (m/s))")
@ApiModelProperty(value = "回转速度(km/h (m/s))")
private String slewingSpeed;
@ExcelProperty(value = "倾角(°)")
@ApiModelProperty(value = "倾角(°)")
private String dip;
//--------------------------------------------------------------------客运索道----技术参数
@ExcelProperty(value = "平距(m)")
@ApiModelProperty(value = "平距(m)")
private String horizontalDistance;
@ExcelProperty(value = "支架数据(座)")
@ApiModelProperty(value = "支架数据(座)")
private String supportsCount;
@ExcelProperty(value = "斜长(m)")
@ApiModelProperty(value = "斜长(m)")
private String obliqueLength;
@ExcelProperty(value = "主电机型式")
@ApiModelProperty(value = "主电机型式")
private String mainMotorModel;
@ExcelProperty(value = "主电机功率(W)")
@ApiModelProperty(value = "主电机功率(W)")
private String mainMotorPower;
@ExcelProperty(value = "高差(m)")
@ApiModelProperty(value = "高差(m)")
private String altitudeDifference;
@ExcelProperty(value = "运量(p/h)")
@ApiModelProperty(value = "运量(p/h)")
private String freightVolume;
@ExcelProperty(value = "运载索")
@ApiModelProperty(value = "运载索")
private String carrierLine;
@ExcelProperty(value = "速度(m/s)")
@ApiModelProperty(value = "速度(m/s)")
private String speed;
@ExcelProperty(value = "承载索")
@ApiModelProperty(value = "承载索")
private String bearingCable;
@ExcelProperty(value = "索距(m)")
@ApiModelProperty(value = "索距(m)")
private String cablePitch;
@ExcelProperty(value = "张紧油压(重锤重量)(MPa)")
@ApiModelProperty(value = "张紧油压(重锤重量)(MPa)")
private String oilPressureHeavyHammer;
@ExcelProperty(value = "运载工具数量和类型")
@ApiModelProperty(value = "运载工具数量和类型")
private String numberAndTypeOfVehicles;
}
\ No newline at end of file
...@@ -2,20 +2,19 @@ package com.yeejoin.amos.api.openapi.feign; ...@@ -2,20 +2,19 @@ package com.yeejoin.amos.api.openapi.feign;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.api.openapi.dto.XiAnEquipInfoExcelDto;
import com.yeejoin.amos.api.openapi.face.model.ElevatorModel; import com.yeejoin.amos.api.openapi.face.model.ElevatorModel;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration; import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import com.yeejoin.amos.boot.module.cylinder.api.dto.PageParam; import com.yeejoin.amos.boot.module.cylinder.api.dto.PageParam;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@FeignClient(name = "TZS-JG", path = "/jg", configuration = {FeignConfiguration.class}) @FeignClient(name = "TZS-JG-htt", path = "/jg", configuration = {FeignConfiguration.class})
public interface TzsJgServiceFeignClient { public interface TzsJgServiceFeignClient {
/** /**
...@@ -30,6 +29,7 @@ public interface TzsJgServiceFeignClient { ...@@ -30,6 +29,7 @@ public interface TzsJgServiceFeignClient {
/** /**
* 字段列表查询 * 字段列表查询
*
* @param dictCode 字段类型 * @param dictCode 字段类型
* @return 列表 * @return 列表
*/ */
...@@ -38,6 +38,7 @@ public interface TzsJgServiceFeignClient { ...@@ -38,6 +38,7 @@ public interface TzsJgServiceFeignClient {
/** /**
* 根据时间范围查询 * 根据时间范围查询
*
* @param equCode 设备代码 * @param equCode 设备代码
* @param startTime 开始时间 * @param startTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
...@@ -51,6 +52,7 @@ public interface TzsJgServiceFeignClient { ...@@ -51,6 +52,7 @@ public interface TzsJgServiceFeignClient {
/** /**
* 根据时间范围查询液化石油气瓶档案 * 根据时间范围查询液化石油气瓶档案
*
* @param equCode 设备代码 * @param equCode 设备代码
* @param startTime 开始时间 * @param startTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
...@@ -64,6 +66,7 @@ public interface TzsJgServiceFeignClient { ...@@ -64,6 +66,7 @@ public interface TzsJgServiceFeignClient {
/** /**
* 查询气站信息 * 查询气站信息
*
* @return * @return
*/ */
@RequestMapping(value = "/equipment-register/getCylinderStationInfo", method = RequestMethod.GET) @RequestMapping(value = "/equipment-register/getCylinderStationInfo", method = RequestMethod.GET)
...@@ -71,4 +74,22 @@ public interface TzsJgServiceFeignClient { ...@@ -71,4 +74,22 @@ public interface TzsJgServiceFeignClient {
@RequestMapping(value = "/equipment-register/getVehicleCylinderInfo", method = RequestMethod.GET) @RequestMapping(value = "/equipment-register/getVehicleCylinderInfo", method = RequestMethod.GET)
List<Map<String, Object>> getVehicleCylinderInfo(String useCode); List<Map<String, Object>> getVehicleCylinderInfo(String useCode);
/**
* 批量保存西安上传的设备数据
*
* @param equipInfoExcelDtos
* @return
*/
@RequestMapping(value = "/xi-an/saveEquipmentData", method = RequestMethod.POST)
Object saveEquipmentData(@RequestBody List<XiAnEquipInfoExcelDto> equipInfoExcelDtos);
/**
* 设备代码唯一性检查
*
* @param equCode
* @return
*/
@RequestMapping(value = "/common/checkEquCodeUniqueness", method = RequestMethod.GET)
Boolean selectByEquCodeAndClaimStatus(@RequestParam("equCode") String equCode);
} }
package com.yeejoin.amos.api.openapi.service;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
import com.yeejoin.amos.api.openapi.dto.XiAnEquipInfoExcelDto;
import com.yeejoin.amos.api.openapi.feign.TzsJgServiceFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.io.InputStream;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Slf4j
@Service
public class XiAnDataDockServiceImpl {
private final TzsJgServiceFeignClient jgServiceFeignClient;
public XiAnDataDockServiceImpl(TzsJgServiceFeignClient jgServiceFeignClient) {
this.jgServiceFeignClient = jgServiceFeignClient;
}
// 自定义线程池
private final ExecutorService executorService = Executors.newFixedThreadPool(10);
private final String excelErrorStr = "Excel 第[%s]行";
private final Map<String, Object> resultError = new HashMap<>();
List<String> useInnerCodeList = new ArrayList<>();// 单位内部编号集合
List<String> equCodeList = new ArrayList<>();// 设备代码集合
List<String> factoryNumList = new ArrayList<>();// 出厂编码集合
/**
* 西安设备数据导入
*
* @param file excel 文件
* @return 导入结果
* @throws Exception 异常
*/
public Object importEquipmentData(MultipartFile file) {
List<XiAnEquipInfoExcelDto> equipInfoExcelDtos;
try {
// 1, 数据读取 + 格式、类型异常检查
equipInfoExcelDtos = this.dataHandler(file);
} catch (Exception e) {
return ResponseHelper.buildFailureResponse(e.getMessage(), "参数校验失败,详细请看返回信息", HttpStatus.BAD_REQUEST);
}
// 2, 分批保存设备数据
this.batchSaveEquipmentData(equipInfoExcelDtos);
return ResponseHelper.buildResponse("设备保存成功!");
}
/**
* 批量异步保存设备数据
*
* @param equipInfoExcelDtos
*/
public void batchSaveEquipmentData(List<XiAnEquipInfoExcelDto> equipInfoExcelDtos) {
int batchSize = 1000;
int totalSize = equipInfoExcelDtos.size();
List<CompletableFuture<Void>> futures = new ArrayList<>();
for (int i = 0; i < totalSize; i += batchSize) {
List<XiAnEquipInfoExcelDto> batch = equipInfoExcelDtos.subList(i, Math.min(totalSize, i + batchSize));
CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
try {
jgServiceFeignClient.saveEquipmentData(batch);
} catch (Exception e) {
log.error("西安数据上传,保存设备数据失败: ", e);
}
}, executorService);
futures.add(future);
}
// 等待所有异步任务完成
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
}
/**
* excel 文件读取,字段校验
*
* @param file excel 文件
* @return 设备数据
* @throws Exception 异常信息
*/
public List<XiAnEquipInfoExcelDto> dataHandler(MultipartFile file) {
List<XiAnEquipInfoExcelDto> dataList = new ArrayList<>();
resultError.clear();
useInnerCodeList.clear();
equCodeList.clear();
factoryNumList.clear();
try {
InputStream inputStream = file.getInputStream();
ExcelReader excelReader = EasyExcel.read(inputStream).build();
List<ReadSheet> sheetList = excelReader.excelExecutor().sheetList(); // 获取所有 sheet
for (ReadSheet readSheet : sheetList) {
String sheetName = readSheet.getSheetName();
int sheetNo = readSheet.getSheetNo();
// 忽略填充设备种类类别品种的三级联动sheet页
if (sheetName.contains("忽略")) {
continue;
}
Map<String, Object> sheetError = new HashMap<>();
EasyExcel.read(file.getInputStream(), XiAnEquipInfoExcelDto.class, new AnalysisEventListener<XiAnEquipInfoExcelDto>() {
// 每读一行都会执行
@Override
public void invoke(XiAnEquipInfoExcelDto data, AnalysisContext context) {
XiAnEquipInfoExcelDto fireExperts = new XiAnEquipInfoExcelDto();
BeanUtils.copyProperties(data, fireExperts);
// 数据检查
checkExcelData(sheetName, data, context, sheetError);
useInnerCodeList.add(data.getUseInnerCode());
equCodeList.add(data.getEquCode());
dataList.add(fireExperts);
}
// 每个sheet页读完都会执行
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
if (CollectionUtils.isEmpty(dataList)) {
resultError.put("allSheet", "你上传了一个空数据的Excel文档!");
throw new BadRequest("你上传了一个空数据的Excel文档!");
}
// 记录每一个sheet页的错误集
if (!ValidationUtil.isEmpty(sheetError)) {
resultError.put(String.format("%s sheet页", sheetName), sheetError);
}
}
}).headRowNumber(4).sheet(sheetNo, sheetName).doRead();
}
excelReader.finish(); // 关闭 reader,释放资源
// 检查 resultError中的每一项,若存在内容,则有错误信息,直接抛异常
if (!ValidationUtil.isEmpty(resultError)) {
throw new BadRequest(JSON.toJSONString(resultError));
}
return dataList;
} catch (Exception e) {
throw new BadRequest(e.getMessage());
}
}
/**
* excel数据字段校验
*
* @param sheetName sheet页名称
* @param data excel数据
* @param context
*/
public void checkExcelData(String sheetName, XiAnEquipInfoExcelDto data, AnalysisContext context, Map<String, Object> sheetError) {
ReadRowHolder readRowHolder = context.readRowHolder();
int rowIndex = readRowHolder.getRowIndex() + 1;
StringBuilder rowError = new StringBuilder();
// 是否起重机械
boolean isQZJX = !ValidationUtil.isEmpty(data.getEquList()) && "4000".equals(data.getEquList());
// 是否场内机动车辆
boolean isCNJDXL = !ValidationUtil.isEmpty(data.getEquList()) && "5000".equals(data.getEquList());
// 是否锅炉
boolean isGL = !ValidationUtil.isEmpty(data.getEquList()) && "1000".equals(data.getEquList());
// 是否压力容器
boolean isYLRQ = !ValidationUtil.isEmpty(data.getEquList()) && "2000".equals(data.getEquList());
// 是否压力管道
boolean isYLGD = !ValidationUtil.isEmpty(data.getEquList()) && "8000".equals(data.getEquList());
// 是否大型游乐设施
boolean isDXYNSS = !ValidationUtil.isEmpty(data.getEquList()) && "6000".equals(data.getEquList());
// 是否客运索道
boolean isKYSD = !ValidationUtil.isEmpty(data.getEquList()) && "9000".equals(data.getEquList());
try {
log.info("解析第{}行数据:{}", rowIndex, JSON.toJSONString(data));
// 通用字段检查 每一个sheet页都有的基本信息,设计信息,制造信息和使用信息
this.commonFieldCheck(data, rowError);
// 起重机械----技术参数 检查
if (isQZJX) {
this.QZJXTechnicalParamsCheck(data, rowError);
}
// 场内机动车辆----技术参数 检查
if (isCNJDXL) {
this.CNJDCLTechnicalParamsCheck(data, rowError);
}
// 锅炉----技术参数 检查
if (isGL) {
this.GLTechnicalParamsCheck(data, rowError);
}
// 压力容器----技术参数 检查
if (isYLRQ) {
this.YLRQTechnicalParamsCheck(data, rowError);
}
// 压力管道----技术参数 检查
if (isYLGD) {
this.YLGDTechnicalParamsCheck(data, rowError);
}
// 大型游乐设施----技术参数 检查
if (isDXYNSS) {
this.DXYLSSTechnicalParamsCheck(data, rowError);
}
// 客运索道----技术参数 检查
if (isKYSD) {
this.KYSDTechnicalParamsCheck(data, rowError);
}
if (!StringUtils.isBlank(rowError)) {
sheetError.put(String.format(excelErrorStr, rowIndex), rowError);
}
} catch (Exception e) {
log.error(String.format("sheet页:[%s] -> 对应行索引数: [%s] -> 失败的 Excel 数据: [%s]", sheetName, rowIndex, JSON.toJSONString(data)), e);
throw e;
}
}
/**
* 检查字段是否为空,如果为空则追加错误信息到result
*
* @param value 待检查字段
* @param errorMessage 错误信息
* @param rowError 结果集
*/
private void checkNotBlank(String value, String errorMessage, StringBuilder rowError) {
if (StringUtils.isBlank(value)) {
rowError.append(errorMessage);
}
}
/**
* 通用字段检查 每一个sheet页都有的基本信息,设计信息,制造信息和使用信息
*
* @param data 源数据
* @param rowError 错误集合
*/
private void commonFieldCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
// 基本信息
checkNotBlank(data.getEquList(), "设备种类不能为空;", rowError);
checkNotBlank(data.getEquCategory(), "设备类别不能为空;", rowError);
checkNotBlank(data.getUseInnerCode(), "单位内编号不能为空;", rowError);
if (useInnerCodeList.contains(data.getUseInnerCode())) {
rowError.append("单位内编号不能重复;");
}
checkNotBlank(data.getProductName(), "产品名称不能为空;", rowError);
checkNotBlank(data.getEquType(), "设备型号不能为空;", rowError);
checkNotBlank(data.getEquCodeType(), "是否有设备代码不能为空;", rowError);
if ("1".equals(data.getEquCodeType())) {
checkNotBlank(data.getEquCode(), "设备代码不能为空;", rowError);
String equCode = data.getEquCode();
if (equCode.matches("[a-zA-Z0-9]+")) {
if (equCode.length() <= 17) {
rowError.append("设备代码不能小于17位;");
}
if (equCode.length() >= 20) {
rowError.append("设备代码不能大于20位;");
}
} else {
rowError.append("设备代码不能包含特殊字符;");
}
if (equCodeList.contains(data.getEquCode())) {
rowError.append("设备代码不能重复;");
}
this.checkEquCodeUniqueness(data.getEquCode(), rowError);
} else {
data.setEquCode("");
}
// 使用信息
checkNotBlank(data.getUseUnitCode(), "使用单位统一社会信用代码不能为空;", rowError);
checkNotBlank(data.getUseUnit(), "使用单位名称不能为空;", rowError);
// 设计信息
checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
Optional.ofNullable(data.getDesignUseDate()).ifPresent(v -> checkDateFormatNumber(v, "设计使用年限不能为数字以外的其他类型;", rowError));
checkNotBlank(data.getDesignUseDate(), "设计日期不能为空;", rowError);
Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
Optional.ofNullable(data.getAppraisalDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计文件鉴定日期格式不正确;", rowError));
// 制造信息
checkNotBlank(data.getProduceUnitCreditCode(), "制造单位统一社会信用代码不能为空;", rowError);
checkNotBlank(data.getProduceUnitName(), "制造单位名称不能为空;", rowError);
checkNotBlank(data.getProduceLicenseNum(), "制造许可编号不能为空;", rowError);
checkNotBlank(data.getFactoryNum(), "出厂编号/产品编码不能为空;", rowError);
checkFactoryNumUniqueness(data.getFactoryNum(), null, rowError);//todo
checkNotBlank(data.getProduceDate(), "制造日期不能为空;", rowError);
Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确;", rowError));
}
/**
* 检查上传Excel中的日期格式是否正确
*
* @param date 待检查数据
* @param errorMessage 错误内容
* @param rowError 错误集
*/
private void checkDateFormatCorrect(String date, String errorMessage, StringBuilder rowError) {
if (!date.matches("\\d{4}-\\d{2}-\\d{2}")) {
rowError.append(errorMessage);
}
}
/**
* 检查上传Excel中的数字格式是否正确
*
* @param date 待检查数据
* @param errorMessage 错误内容
* @param rowError 错误集
*/
private void checkDateFormatNumber(String date, String errorMessage, StringBuilder rowError) {
if (!NumberUtils.isCreatable(date)) {
rowError.append(errorMessage);
}
}
private void checkFactoryNumUniqueness(String factoryNum, String sequenceNbr, StringBuilder rowError) {
// 车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)
// if (commonService.checkFactoryNumUniquenessForVehicleCylinder(factoryNum, sequenceNbr) > 0) {
// rowError.append("出厂编号/产品编码系统中已存在!");
// }
}
/**
* 根据设备代码检查唯一性
*
* @param equCode
* @param rowError
*/
private void checkEquCodeUniqueness(String equCode, StringBuilder rowError) {
Boolean bool = jgServiceFeignClient.selectByEquCodeAndClaimStatus(equCode);
if (bool) {
rowError.append("设备代码系统中已存在;");
}
}
/**
* 起重机械----技术参数 检查
*
* @param data
* @param rowError
*/
private void QZJXTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
}
/**
* 场内机动车辆----技术参数 检查
*
* @param data
* @param rowError
*/
private void CNJDCLTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
}
/**
* 锅炉----技术参数 检查
*
* @param data
* @param rowError
*/
private void GLTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
}
/**
* 压力容器----技术参数 检查
*
* @param data
* @param rowError
*/
private void YLRQTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
checkNotBlank(data.getSingleBottleVolume(), "单瓶容积不能为空;", rowError);
checkNotBlank(data.getChargingMedium(), "充装介质不能为空;", rowError);
checkNotBlank(data.getNominalWorkingPressure(), "公称工作压力不能为空;", rowError);
}
/**
* 压力管道----技术参数 检查
*
* @param data
* @param rowError
*/
private void YLGDTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
checkNotBlank(data.getWallThickness_YLGD(), "公称壁厚不能为空;", rowError);
checkNotBlank(data.getNominalDiameter(), "公称直径不能为空;", rowError);
checkNotBlank(data.getPipeLength(), "管道长度不能为空;", rowError);
checkNotBlank(data.getPressure(), "压力不能为空;", rowError);
checkNotBlank(data.getMedium_YLGD(), "介质不能为空;", rowError);
checkNotBlank(data.getTemperature_YLGD(), "温度不能为空;", rowError);
checkNotBlank(data.getPipelineNumber(), "管道编号不能为空;", rowError);
checkNotBlank(data.getDeviceLevel_YLGD(), "管道级别不能为空;", rowError);
}
/**
* 大型游乐设施----技术参数 检查
*
* @param data
* @param rowError
*/
private void DXYLSSTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
}
/**
* 客运索道----技术参数 检查
*
* @param data
* @param rowError
*/
private void KYSDTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
}
}
...@@ -25,6 +25,8 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> { ...@@ -25,6 +25,8 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
List<Map<String, Object>> getSecurityAdmin(String companyCode, List<String> post); List<Map<String, Object>> getSecurityAdmin(String companyCode, List<String> post);
Integer checkEquCodeUniqueness(String equCode);
Map<String, Object> getUserInfo(String sequenceNbr); Map<String, Object> getUserInfo(String sequenceNbr);
Map<String,Object> getEnterpriseInfo(String useCode); Map<String,Object> getEnterpriseInfo(String useCode);
......
...@@ -41,6 +41,13 @@ ...@@ -41,6 +41,13 @@
) )
</if> </if>
</select> </select>
<select id="checkEquCodeUniqueness" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM idx_biz_jg_register_info jri
JOIN idx_biz_jg_other_info joi ON jri.record = joi.record
WHERE jri.equ_code = #{equCode}
AND joi.claim_status = '已认领'
</select>
<select id="getUserInfo" resultType="java.util.Map"> <select id="getUserInfo" resultType="java.util.Map">
SELECT SELECT
phone, phone,
......
...@@ -626,4 +626,11 @@ public class CommonController extends BaseController { ...@@ -626,4 +626,11 @@ public class CommonController extends BaseController {
CompanyBo company = getSelectedOrgInfo().getCompany(); CompanyBo company = getSelectedOrgInfo().getCompany();
return ResponseHelper.buildResponse(commonService.getLatestJgUseRegistrationManage(company.getCompanyCode(), equDefineCode)); return ResponseHelper.buildResponse(commonService.getLatestJgUseRegistrationManage(company.getCompanyCode(), equDefineCode));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/checkEquCodeUniqueness")
@ApiOperation(httpMethod = "GET", value = "检查设备代码的唯一性", notes = "检查设备代码的唯一性")
public Boolean checkEquCodeUniqueness(@RequestParam("equCode") String equCode) {
return commonService.checkEquCodeUniqueness(equCode);
}
} }
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.XiAnDataDockServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
@RestController
@Api(tags = "西安数据对接 API")
@RequestMapping(value = "/xi-an")
public class XiAnDataDockController {
private final XiAnDataDockServiceImpl xiAnDataDockService;
public XiAnDataDockController(XiAnDataDockServiceImpl xiAnDataDockService) {
this.xiAnDataDockService = xiAnDataDockService;
}
/**
* 批量导入设备数据的接口
* @param equLists 设备数据集合
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/saveEquipmentData")
@ApiOperation(httpMethod = "POST", value = "设备批量导入", notes = "导入多个设备的数据文件")
public ResponseModel<?> saveEquipmentData(@RequestBody List<Map<?,?>> equLists) {
return ResponseHelper.buildResponse(xiAnDataDockService.saveEquipmentData(equLists));
}
}
...@@ -38,6 +38,7 @@ public interface ICommonService { ...@@ -38,6 +38,7 @@ public interface ICommonService {
/** /**
* 查询所有检验检测信息 * 查询所有检验检测信息
*
* @param type 类型 * @param type 类型
* @return list * @return list
*/ */
...@@ -57,7 +58,7 @@ public interface ICommonService { ...@@ -57,7 +58,7 @@ public interface ICommonService {
void generatePdfPrint(Map<String, Object> map, HttpServletResponse response); void generatePdfPrint(Map<String, Object> map, HttpServletResponse response);
byte[] generateSummaryOfCylinderInfo(Map<String, Object> map, String wordPath,String filePrefix); byte[] generateSummaryOfCylinderInfo(Map<String, Object> map, String wordPath, String filePrefix);
List<LinkedHashMap> creatApproveTree(); List<LinkedHashMap> creatApproveTree();
...@@ -207,7 +208,7 @@ public interface ICommonService { ...@@ -207,7 +208,7 @@ public interface ICommonService {
*/ */
CompanyBo getOneCompany(String companyCode); CompanyBo getOneCompany(String companyCode);
Integer checkFactoryNumUniquenessForVehicleCylinder(String factoryNum,String sequenceNbr); Integer checkFactoryNumUniquenessForVehicleCylinder(String factoryNum, String sequenceNbr);
/** /**
* 更新单位类型缓存 * 更新单位类型缓存
...@@ -219,4 +220,11 @@ public interface ICommonService { ...@@ -219,4 +220,11 @@ public interface ICommonService {
void historicalDataProcessingOfPressurePipeline(); void historicalDataProcessingOfPressurePipeline();
JgUseRegistrationManage getLatestJgUseRegistrationManage(String useUnitCreditCode, String equCategoryCode); JgUseRegistrationManage getLatestJgUseRegistrationManage(String useUnitCreditCode, String equCategoryCode);
/**
* 检查设备代码的唯一性
* @param equCode
* @return
*/
Boolean checkEquCodeUniqueness(String equCode);
} }
...@@ -809,7 +809,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -809,7 +809,7 @@ public class CommonServiceImpl implements ICommonService {
} }
List<String> post = new ArrayList<>(); List<String> post = new ArrayList<>();
if (type.equals("use")) { if (type.equals("use")) {
post.add("6617") ;//安全管理员 post.add("6617");//安全管理员
} }
if (type.equals("jyjc")) { if (type.equals("jyjc")) {
post.add("66151");//检验人员 post.add("66151");//检验人员
...@@ -946,6 +946,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -946,6 +946,7 @@ public class CommonServiceImpl implements ICommonService {
/** /**
* 使用登记证套打生成Word * 使用登记证套打生成Word
*
* @param map 参数 * @param map 参数
* @param response 返回值 * @param response 返回值
*/ */
...@@ -1209,13 +1210,13 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1209,13 +1210,13 @@ public class CommonServiceImpl implements ICommonService {
provideMap.put(YZBG_PAGE_ID, noticeObj); provideMap.put(YZBG_PAGE_ID, noticeObj);
JSONObject jsonObject = new JSONObject(provideMap); JSONObject jsonObject = new JSONObject(provideMap);
return jgChangeRegistrationTransferService.createTransfer(submitType, jsonObject, reginParams); return jgChangeRegistrationTransferService.createTransfer(submitType, jsonObject, reginParams);
}else if (type.equals(ApplicationFormTypeEnum.DWBG.getBusinessCode()) && !ObjectUtils.isEmpty(basicObj.get("equCategory")) && CylinderTypeEnum.SPECIAL_CYLINDER.getCode().equals(basicObj.get("equCategory").toString())) { } else if (type.equals(ApplicationFormTypeEnum.DWBG.getBusinessCode()) && !ObjectUtils.isEmpty(basicObj.get("equCategory")) && CylinderTypeEnum.SPECIAL_CYLINDER.getCode().equals(basicObj.get("equCategory").toString())) {
noticeObj.put("submit", submitType); noticeObj.put("submit", submitType);
noticeObj.put("formType", "add"); noticeObj.put("formType", "add");
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
JSONObject jsonObject = new JSONObject(noticeObj); JSONObject jsonObject = new JSONObject(noticeObj);
return jgChangeVehicleRegistrationUnitService.saveMessage(jsonObject, reginParams); return jgChangeVehicleRegistrationUnitService.saveMessage(jsonObject, reginParams);
}else if (type.equals(ApplicationFormTypeEnum.DWBG.getBusinessCode())) { } else if (type.equals(ApplicationFormTypeEnum.DWBG.getBusinessCode())) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
provideMap.put(DWBG_PAGE_ID, noticeObj); provideMap.put(DWBG_PAGE_ID, noticeObj);
JSONObject jsonObject = new JSONObject(provideMap); JSONObject jsonObject = new JSONObject(provideMap);
...@@ -1362,6 +1363,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1362,6 +1363,7 @@ public class CommonServiceImpl implements ICommonService {
/** /**
* 删除代办及中止流程 * 删除代办及中止流程
*
* @param businessId 业务seq * @param businessId 业务seq
* @param instanceId 业务流程id * @param instanceId 业务流程id
*/ */
...@@ -1369,13 +1371,14 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1369,13 +1371,14 @@ public class CommonServiceImpl implements ICommonService {
// 删除暂存的代办 // 删除暂存的代办
deleteTasksByRelationId(businessId); deleteTasksByRelationId(businessId);
// 删除流程中的代办 及 中止流程 // 删除流程中的代办 及 中止流程
if(!ObjectUtils.isEmpty(instanceId)){ if (!ObjectUtils.isEmpty(instanceId)) {
deleteTasksAndStopProcess(instanceId, "发起人主动删除业务单"); deleteTasksAndStopProcess(instanceId, "发起人主动删除业务单");
} }
} }
/** /**
* 删除代办 -根据任务关联 * 删除代办 -根据任务关联
*
* @param relationId * @param relationId
*/ */
public void deleteTasksByRelationId(String relationId) { public void deleteTasksByRelationId(String relationId) {
...@@ -2073,18 +2076,18 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2073,18 +2076,18 @@ public class CommonServiceImpl implements ICommonService {
List<JgUseRegistration> jgUseRegistrations = jgUseRegistrationServiceImpl.getBaseMapper().selectList(queryWrapper); List<JgUseRegistration> jgUseRegistrations = jgUseRegistrationServiceImpl.getBaseMapper().selectList(queryWrapper);
// 对应的历史表 // 对应的历史表
jgUseRegistrations.forEach(x->{ jgUseRegistrations.forEach(x -> {
LambdaQueryWrapper<JgRegistrationHistory> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgRegistrationHistory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(JgRegistrationHistory::getCurrentDocumentId, x.getSequenceNbr()); wrapper.eq(JgRegistrationHistory::getCurrentDocumentId, x.getSequenceNbr());
JgRegistrationHistory jgRegistrationHistory = jgRegistrationHistoryService.getBaseMapper().selectOne(wrapper); JgRegistrationHistory jgRegistrationHistory = jgRegistrationHistoryService.getBaseMapper().selectOne(wrapper);
try{ try {
if (jgRegistrationHistory.getChangeData().contains("8300")){ if (jgRegistrationHistory.getChangeData().contains("8300")) {
JSONObject mapData = JSONObject.parseObject(jgRegistrationHistory.getChangeData()); JSONObject mapData = JSONObject.parseObject(jgRegistrationHistory.getChangeData());
if (!ValidationUtil.isEmpty(mapData.get("equipmentLists"))){ if (!ValidationUtil.isEmpty(mapData.get("equipmentLists"))) {
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) mapData.get("equipmentLists"); List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) mapData.get("equipmentLists");
// 遍历 equipmentLists,将 pipeLength 从毫米转换为米 // 遍历 equipmentLists,将 pipeLength 从毫米转换为米
equipmentLists.forEach(equ -> { equipmentLists.forEach(equ -> {
String record =(String) equ.get("record"); String record = (String) equ.get("record");
EquipTechParamPipeline equipTechParamPipeline = equipTechParamPipelineMapper.queryTechParamInUse(record); EquipTechParamPipeline equipTechParamPipeline = equipTechParamPipelineMapper.queryTechParamInUse(record);
BigDecimal pipeLengthInM = Optional.ofNullable(equipTechParamPipeline) BigDecimal pipeLengthInM = Optional.ofNullable(equipTechParamPipeline)
.map(EquipTechParamPipeline::getPipeLength) .map(EquipTechParamPipeline::getPipeLength)
...@@ -2095,8 +2098,8 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2095,8 +2098,8 @@ public class CommonServiceImpl implements ICommonService {
jgRegistrationHistory.setChangeData(JSONObject.toJSONString(mapData)); jgRegistrationHistory.setChangeData(JSONObject.toJSONString(mapData));
jgRegistrationHistoryService.getBaseMapper().updateById(jgRegistrationHistory); jgRegistrationHistoryService.getBaseMapper().updateById(jgRegistrationHistory);
} }
}catch (Exception e){ } catch (Exception e) {
log.error("更新压力管道出现错误:{}",e.getMessage()); log.error("更新压力管道出现错误:{}", e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
}); });
...@@ -2104,12 +2107,13 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2104,12 +2107,13 @@ public class CommonServiceImpl implements ICommonService {
/** /**
* 生成使用登记证书唯一标识 * 生成使用登记证书唯一标识
*
* @param equType 包含有 设备种类 & 设备类别 & 设备品种 的map * @param equType 包含有 设备种类 & 设备类别 & 设备品种 的map
* @param date 生成证日期 (不传取当前时间) * @param date 生成证日期 (不传取当前时间)
* @param receiveCompanyCode 接收机构统一信用代码 * @param receiveCompanyCode 接收机构统一信用代码
* @return 使用登记证书唯一标识 * @return 使用登记证书唯一标识
*/ */
public String generateCertificateNo(Map<String,String> equType,Date date,String receiveCompanyCode){ public String generateCertificateNo(Map<String, String> equType, Date date, String receiveCompanyCode) {
String ym = ""; String ym = "";
try { try {
ym = Optional.of(DateUtils.dateFormat(date, DateUtils.DATE_PATTERN_MM)).orElse(DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN_MM)); ym = Optional.of(DateUtils.dateFormat(date, DateUtils.DATE_PATTERN_MM)).orElse(DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN_MM));
...@@ -2143,6 +2147,18 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2143,6 +2147,18 @@ public class CommonServiceImpl implements ICommonService {
} }
/** /**
* 根据设备代码检查唯一性
*
* @param equCode 设备代码
* @return
*/
@Override
public Boolean checkEquCodeUniqueness(String equCode) {
Integer count = commonMapper.checkEquCodeUniqueness(equCode);
return count > 0 ? Boolean.TRUE : Boolean.FALSE;
}
/**
* 使用登记证编号的全库唯一校验 * 使用登记证编号的全库唯一校验
* *
* @param useRegistrationCode 登记证编号 * @param useRegistrationCode 登记证编号
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl.EQU_LIST;
@Slf4j
@Service
public class XiAnDataDockServiceImpl {
@Autowired
private ESEquipmentCategory esEquipmentCategory;
@Autowired
private CategoryOtherInfoMapper categoryOtherInfoMapper;
@Autowired
private IIdxBizJgUseInfoService idxBizJgUseInfoService;
@Autowired
private IdxBizJgDesignInfoServiceImpl idxBizJgDesignInfoService;
@Autowired
private IdxBizJgFactoryInfoServiceImpl idxBizJgFactoryInfoService;
@Autowired
private IdxBizJgRegisterInfoServiceImpl idxBizJgRegisterInfoServiceImpl;
@Autowired
private IdxBizJgSupervisionInfoServiceImpl idxBizJgSupervisionInfoService;
@Autowired
private IdxBizJgOtherInfoServiceImpl idxBizJgOtherInfoService;
@Autowired
private EquipTechParamLiftingMapper equipTechParamLiftingMapper;
@Autowired
private EquipTechParamVehicleMapper equipTechParamVehicleMapper;
@Autowired
private EquipTechParamBoilerMapper equipTechParamBoilerMapper;
@Autowired
private EquipTechParamVesselMapper equipTechParamVesselMapper;
@Autowired
private EquipTechParamPipelineMapper equipTechParamPipelineMapper;
@Autowired
private EquipTechParamRidesMapper equipTechParamRidesMapper;
@Autowired
private EquipTechParamRopewayMapper equipTechParamRopewayMapper;
/**
* 保存设备信息
*
* @param equLists 数据集
* @return 保存结果
*/
public boolean saveEquipmentData(List<Map<?, ?>> equLists) {
equLists.forEach(equ -> {
// 设备的唯一编码
String record = UUID.randomUUID().toString();
// 设备种类
String equList = String.valueOf(equ.get(EQU_LIST));
// 是否起重机械
boolean isQZJX = EquipmentClassifityEnum.QZJX.getCode().equals(equList);
// 是否场内机动车辆
boolean isCNJDXL = EquipmentClassifityEnum.CC.getCode().equals(equList);
// 是否锅炉
boolean isGL = EquipmentClassifityEnum.GL.getCode().equals(equList);
// 是否压力容器
boolean isYLRQ = EquipmentClassifityEnum.YLRQ.getCode().equals(equList);
// 是否压力管道
boolean isYLGD = EquipmentClassifityEnum.YLGD.getCode().equals(equList);
// 是否大型游乐设施
boolean isDXYNSS = EquipmentClassifityEnum.YLSS.getCode().equals(equList);
// 是否客运索道
boolean isKYSD = EquipmentClassifityEnum.KYSD.getCode().equals(equList);
// 使用信息
IdxBizJgUseInfo useInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgUseInfo.class);
if (!ValidationUtil.isEmpty(useInfo)) {
useInfo.setRecDate(new Date());
useInfo.setRecord(record);
useInfo.setDataSource("jg_his_xx");
useInfo.setIsNotEs("1");
useInfo.setIsIntoManagement(Boolean.FALSE);
useInfo.setUseUnitCreditCode(String.valueOf(equ.get("useUnitCode")));
useInfo.setUseUnitName(String.valueOf(equ.get("useUnit")));
// if("8300".equals(equCategory)) { todo
// useInfo.setProjectContraption(((String) equipmentInfoForm.get("PROJECT_CONTRAPTION")).trim());
// }
idxBizJgUseInfoService.save(useInfo);
}
// 设计信息
IdxBizJgDesignInfo designInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgDesignInfo.class);
if (!ValidationUtil.isEmpty(designInfo)) {
designInfo.setRecord(record);
designInfo.setRecDate(new Date());
idxBizJgDesignInfoService.save(designInfo);
}
// 制造信息
IdxBizJgFactoryInfo factoryInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgFactoryInfo.class);
if (!ValidationUtil.isEmpty(factoryInfo)) {
factoryInfo.setRecord(record);
factoryInfo.setRecDate(new Date());
idxBizJgFactoryInfoService.save(factoryInfo);
}
// 注册登记信息
IdxBizJgRegisterInfo registerInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgRegisterInfo.class);
if (!ValidationUtil.isEmpty(registerInfo)) {
registerInfo.setRecord(record);
registerInfo.setRecDate(new Date());
registerInfo.setRegisterState("6045");
idxBizJgRegisterInfoServiceImpl.save(registerInfo);
}
// 监督管理
IdxBizJgSupervisionInfo supervisionInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgSupervisionInfo.class);
if (!ValidationUtil.isEmpty(supervisionInfo)) {
supervisionInfo.setRecord(record);
supervisionInfo.setRecDate(new Date());
idxBizJgSupervisionInfoService.save(supervisionInfo);
}
// 其他信息
IdxBizJgOtherInfo otherInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgOtherInfo.class);
if (!ValidationUtil.isEmpty(otherInfo)) {
otherInfo.setRecord(record);
otherInfo.setClaimStatus("已认领");
otherInfo.setRecDate(new Date());
idxBizJgOtherInfoService.save(otherInfo);
}
// 起重机械 技术参数
if (isQZJX) {
EquipTechParamLifting equipTechParamLifting = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamLifting.class);
equipTechParamLifting.setRecord(record);
equipTechParamLiftingMapper.insert(equipTechParamLifting);
}
// 场内机动车辆 技术参数
if (isCNJDXL) {
EquipTechParamVehicle equipTechParamVehicle = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamVehicle.class);
equipTechParamVehicle.setRecord(record);
equipTechParamVehicleMapper.insert(equipTechParamVehicle);
}
// 锅炉 技术参数
if (isGL) {
EquipTechParamBoiler equipTechParamBoiler = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamBoiler.class);
equipTechParamBoiler.setRecord(record);
equipTechParamBoilerMapper.insert(equipTechParamBoiler);
}
// 压力容器 技术参数
if (isYLRQ) {
EquipTechParamVessel equipTechParamVessel = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamVessel.class);
equipTechParamVessel.setRecord(record);
equipTechParamVesselMapper.insert(equipTechParamVessel);
}
// 压力管道 技术参数
if (isYLGD) {
EquipTechParamPipeline equipTechParamPipeline = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamPipeline.class);
equipTechParamPipeline.setRecord(record);
equipTechParamPipelineMapper.insert(equipTechParamPipeline);
}
// 大型游乐设施 技术参数
if (isDXYNSS) {
EquipTechParamRides equipTechParamRides = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamRides.class);
equipTechParamRides.setRecord(record);
equipTechParamRidesMapper.insert(equipTechParamRides);
}
// 客运索道 技术参数
if (isKYSD) {
EquipTechParamRopeway equipTechParamRopeway = JSON.parseObject(JSON.toJSONString(equ), EquipTechParamRopeway.class);
equipTechParamRopeway.setRecord(record);
equipTechParamRopewayMapper.insert(equipTechParamRopeway);
}
// 保存到es
saveEquInfoToEs(record);
});
return Boolean.TRUE;
}
/**
* 保存设备数据至es
*
* @param record 设备唯一编码
*/
private void saveEquInfoToEs(String record) {
Map<String, Object> map = categoryOtherInfoMapper.selectDataById(record);
ESEquipmentCategoryDto equipmentCategoryDto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
if (!ObjectUtils.isEmpty(equipmentCategoryDto)) {
long time = Timestamp.valueOf(map.get("REC_DATE").toString().substring(0, 19)).getTime();
equipmentCategoryDto.setREC_DATE(time);
esEquipmentCategory.save(equipmentCategoryDto);
}
}
}
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