Commit 22448a8f authored by 李腾威's avatar 李腾威

任务 3661

parent 5c981e10
package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import lombok.Data;
import java.io.Serializable;
/**
* @author ZeHua Li
* @date 2020/9/8 13:46
* @since v2.0
*/
@Data
public class EquipmentDetailDownloadTemplateDto implements Serializable {
@ExcelProperty(value = "器材名称", index = 0)
// @Excel(name = "器材名称", width = 30, orderNum = "1")
private String name;
@ExcelProperty(value = "器材编码(从装备定义中获取)", index = 1)
//@Excel(name = "器材编码(从装备定义中获取)", width = 30, orderNum = "2")
private String code;
@ExcelProperty(value = "规格型号", index = 2)
//@Excel(name = "规格型号", width = 30, orderNum = "3")
private String standard;
@ExcelProperty(value = "品牌", index = 3)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private String brand;
@ExcelProperty(value = "生产厂家名称", index = 4)
//@Excel(name = "生产厂家名称", width = 30, orderNum = "5")
private String manufacturerName;
@ExcelProperty(value = "设备编码", index = 5)
//@Excel(name = "设备编码", width = 30, orderNum = "6")
private String systemCode;
@ExcelProperty(value = "物联编码", index = 6)
//@Excel(name = "物联编码", width = 30, orderNum = "7")
private String iotCode;
@ExcelProperty(value = "存放位置(货位编码)", index = 7)
//@Excel(name = "存放位置(货位编码)", width = 30, orderNum = "8")
private String warehouseStructCode;
@ExcelProperty(value = "位置信息", index = 8)
//@Excel(name = "位置信息", width = 30, orderNum = "9")
private String description;
@ExcelProperty(value = "消防系统编码", index = 9)
//@Excel(name = "消防系统编码", width = 30, orderNum = "10")
private String fightingSysCodes;
@ExplicitConstraint(indexNum = 10, sourceClass = RoleNameExplicitConstraint.class,method="getFireTeam") //动态下拉内容
@ExcelProperty(value = "所属队伍", index = 10)
//@Excel(name = "所属队伍",width = 30,orderNum = "11")
private String fireTeam;
//动态下拉内容
@ExplicitConstraint(indexNum = 11, sourceClass = RoleNameExplicitConstraint.class,method="getCompany") //动态下拉内容
@ExcelProperty(value = "所属单位", index = 11)
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private String companyName;
}
......@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
......@@ -306,6 +305,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "物联参数")
private WaterResourceIotDto waterResourceIotDto;
@ExcelIgnore
@ApiModelProperty("设施定义id")
private Long equipId;
......@@ -313,6 +313,7 @@ public class WaterResourceDto extends BaseDto {
@ExcelProperty(value = "设施定义名称", index = 44)
private String equipName;
@ExcelIgnore
@ApiModelProperty("设施分类id")
private Long equipCategoryId;
......
......@@ -24,7 +24,8 @@ public enum ExcelEnums {
RYZB ("人员值班", "人员值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto","RYZB"),//("RYZB","人员值班")
// BUG 2455 相关代码 bykongfm
TGRY ("特岗人员", "特岗人员", "com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto","TGRY"),//("TGRY","特岗人员")
JYZB ("救援装备", "救援装备", "com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto","JYZB");//("JYZB","救援装备")
JYZB ("救援装备", "救援装备", "com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto","JYZB"),//("JYZB","救援装备")
XFZB ("消防装备", "消防装备", "com.yeejoin.amos.boot.module.common.api.dto.EquipmentDetailDownloadTemplateDto","XFZB");//("XFZB","消防装备")
private String fileName;
private String sheetName;
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.netflix.discovery.converters.Auto;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -31,6 +33,9 @@ public class ExcelController extends BaseController {
@Autowired
ExcelServiceImpl excelService;
@Autowired
DataSourcesImpl dataSources;
private static final String NOT_DUTY = "休班";
......@@ -167,4 +172,17 @@ public class ExcelController extends BaseController {
throw new RuntimeException("系统异常!");
}
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出给提供设备接口")
@PostMapping("/exportForEquipment")
public ResponseModel<String[]> getFireStationFileByParams(@RequestParam(value = "type") String type,
@RequestParam(value = "method") String method) {
try {
return ResponseHelper.buildResponse(dataSources.selectList(type,method));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
}
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