Commit 86b7ecf2 authored by tangwei's avatar tangwei

解决冲突

parents 25a5bdc8 829077b8
......@@ -154,7 +154,7 @@ public class WaterResourceForExportDto extends BaseDto {
@ExcelProperty(value = "高度(cm)", index = 11)
@ApiModelProperty(value = "高度(cm)")
private Float height;
private Double height;
@ExcelIgnore
@ApiModelProperty(value = "水源可用状态类别代码")
......@@ -184,15 +184,15 @@ public class WaterResourceForExportDto extends BaseDto {
@ExcelProperty(value = "管网直径(cm)", index = 16)
@ApiModelProperty(value = "管网直径(cm)")
private Float pipeDiameter;
private Double pipeDiameter;
@ExcelProperty(value = "进水管直径(cm)", index = 17)
@ApiModelProperty(value = "进水管直径(cm)")
private Float inletPipeDiameter;
private Double inletPipeDiameter;
@ExcelProperty(value = "出水管直径(cm)", index = 18)
@ApiModelProperty(value = "出水管直径(cm)")
private Float outletPipeDiameter;
private Double outletPipeDiameter;
@ExcelProperty(value = "加水车道数量(个)", index = 19)
@ApiModelProperty(value = "加水车道数量(个)")
......@@ -257,11 +257,11 @@ public class WaterResourceForExportDto extends BaseDto {
@ExcelProperty(value = "容积(m³)", index = 28)
@ApiModelProperty(value = "容积(m³)")
private Float volume;
private Double volume;
@ExcelProperty(value = "面积(㎡)", index = 29)
@ApiModelProperty(value = "面积(㎡)")
private Float area;
private Double area;
@ExcelProperty(value = "水质情况", index = 30)
@ApiModelProperty(value = "水质情况")
......@@ -288,11 +288,11 @@ public class WaterResourceForExportDto extends BaseDto {
@ExcelProperty(value = "取水高度(cm)", index = 34)
@ApiModelProperty(value = "取水高度(cm)")
private Float intakeHeight;
private Double intakeHeight;
@ExcelProperty(value = "水源标高差(cm)", index = 35)
@ApiModelProperty(value = "水源标高差(cm)")
private Float elevationDifference;
private Double elevationDifference;
@ExcelProperty(value = "停车位置", index = 36)
@ApiModelProperty(value = "停车位置")
......@@ -342,7 +342,7 @@ public class WaterResourceForExportDto extends BaseDto {
// @ExplicitConstraint(indexNum = 42, sourceClass = CommonExplicitConstraint.class, method = "getEquipCategory")
// @ExcelProperty(value = "设施分类名称", index = 42)
private String equipCategoryName;
@ApiModelProperty("设施分类编码")
@ExcelIgnore
private String equipCategoryCode;
......@@ -376,11 +376,11 @@ public class WaterResourceForExportDto extends BaseDto {
@ExcelProperty(value = "最低报警水位(m)", index = 43)
@ApiModelProperty(value = "最低报警水位(m)")
private Float minWaterLevel;
private Double minWaterLevel;
@ExcelProperty(value = "最高报警水位(m)", index = 44)
@ApiModelProperty(value = "最高报警水位(m)")
private Float maxWaterLevel;
private Double maxWaterLevel;
@ExcelIgnore
@ApiModelProperty("水池液位显示装置id")
......
......@@ -484,6 +484,7 @@ public class ExcelServiceImpl {
}
@Transactional
public Object commonUpload(MultipartFile multipartFile, ExcelDto excelDto, String uuidString, HttpServletRequest equest) throws Exception {
switch (excelDto.getType()) {
......
......@@ -17,6 +17,25 @@
<artifactId>amos-boot-module-patrol-api</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.1.1</version>
<exclusions>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-rule</artifactId>
......
......@@ -12,6 +12,7 @@ import com.yeejoin.amos.patrol.business.dao.repository.IPointInputItemDao;
import com.yeejoin.amos.patrol.business.dto.InputItemDataDto;
import com.yeejoin.amos.patrol.business.dto.InputItemDataJsonlDto;
import com.yeejoin.amos.patrol.business.dto.InputItemExcelDto;
import com.yeejoin.amos.patrol.business.dto.InputItemExcelVo;
import com.yeejoin.amos.patrol.business.feign.JcsFeignClient;
import com.yeejoin.amos.patrol.business.param.InputItemPageParam;
import com.yeejoin.amos.patrol.business.param.InputItemParam;
......@@ -370,9 +371,9 @@ public class InputItemController extends AbstractBaseController {
@RequestMapping(value = "/exportData", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public void exportData(HttpServletResponse response) {
InputItemPageParam criterias = new InputItemPageParam();
List<InputItemExcelDto> content = inputItemMapper.getInputItemInfoExcelNew(criterias);
List<InputItemExcelVo> content = inputItemMapper.getInputItemInfoExcelNew(criterias);
//此处对数据做统一处理 拼接为易读内容
for (InputItemExcelDto inputItemExcelDto : content) {
for (InputItemExcelVo inputItemExcelDto : content) {
String text = "";
if (inputItemExcelDto.getItemType().equals("选择")&& !inputItemExcelDto.getDataJson().equals("[]")) {
List<Map> maps = JSONObject.parseArray(inputItemExcelDto.getDataJson(), Map.class);
......@@ -395,7 +396,7 @@ public class InputItemController extends AbstractBaseController {
}
}
ExcelUtil.createTemplate(response,"检查项","检查项",content,InputItemExcelDto.class,null,true);
ExcelUtil.createTemplate(response,"检查项","检查项",content,InputItemExcelVo.class,null,true);
}
......
......@@ -926,7 +926,7 @@ public class PointController extends AbstractBaseController {
} else {
downData.add(new String[0]);
}
String [] downRows = {"2","3","4", "8","11","12","13","14"}; //下拉的列序号数组(序号从0开始)
String [] downRows = {"2","3","4", "8","10","11","12","13"}; //下拉的列序号数组(序号从0开始)
try {
FileHelper.createExcelTemplate(fileName, handers, downData, downRows, response);
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.patrol.business.dto.InputItemExcelDto;
import com.yeejoin.amos.patrol.business.dto.InputItemExcelVo;
import com.yeejoin.amos.patrol.business.param.InputItemPageParam;
import com.yeejoin.amos.patrol.business.vo.InputItemVo;
import com.yeejoin.amos.patrol.business.vo.PointInputItemVo;
......@@ -31,7 +32,7 @@ public interface InputItemMapper extends BaseMapper<InputItem> {
public List<InputItemVo> getInputItemInfoNew(InputItemPageParam param);
public List<InputItemExcelDto> getInputItemInfoExcelNew(InputItemPageParam param);
public List<InputItemExcelVo> getInputItemInfoExcelNew(InputItemPageParam param);
Map<Long, Long> getAllCountInfo();
......
......@@ -71,7 +71,7 @@ public class InputItemExcelDto extends BaseDto {
@ExplicitConstraint(indexNum=11,source = {"是","否"})
@ExcelProperty(value = "是否必填", index = 11)
@ApiModelProperty(value = "是否必填")
private String isMust = "0";
private String isMust = "";
@ExplicitConstraint(indexNum=12,source = {"是","否"})
@ExcelProperty(value = "是否评分", index = 12)
......@@ -298,20 +298,27 @@ public class InputItemExcelDto extends BaseDto {
}
public String getKeyPartsType() {
return keyPartsType.equals("是")?"0":"1";
return keyPartsType;
// keyPartsType.equals("是")?"0":"1";
}
public void setKeyPartsType(String keyPartsType) {
this.keyPartsType = StringUtils.isEmpty(keyPartsType) ? "1":keyPartsType;
// this.keyPartsType = StringUtils.isEmpty(keyPartsType) ? "1":keyPartsType;
this.keyPartsType =StringUtils.isNotEmpty(keyPartsType) ? (keyPartsType.equals("是")?"0":"1") :keyPartsType;
}
public String getCustomType() {
return customType.equals("是")?"0":"1";
return customType;
}
public void setCustomType(String customType) {
/* public void setCustomType(String customType) {
this.customType = StringUtils.isEmpty(customType) ? "1":customType;
}*/
public void setCustomType(String customType) {
this.customType =StringUtils.isNotEmpty(customType) ? (customType.equals("是")?"0":"1") :customType;
}
public String getUnit() {
......@@ -347,11 +354,11 @@ public class InputItemExcelDto extends BaseDto {
}
public String getLevel() {
return level == null? null :String.valueOf(PointLevelEnum.getValue(level));
return level ;
}
public void setLevel(String level) {
this.level = level;
this.level = level == null? null :String.valueOf(PointLevelEnum.getValue(level));
}
public long getCatalogId() {
......
......@@ -179,6 +179,7 @@ public class PointServiceImpl implements IPointService {
}
@Override
@Transactional
public List<Long> addImportPoint(List<PointImportParam> list, String orgCode, String userId) {
List<Long> ids = new ArrayList<>();
......@@ -192,6 +193,21 @@ public class PointServiceImpl implements IPointService {
if (count > 0) {// 该单位已存在该编号的点
continue;
}
if (ObjectUtils.isEmpty(param.getChargePersonId())) {
throw new BadRequest("责任人不能为空");
}
if (!ObjectUtils.isEmpty(param.getName())) {
List<Point> result = iPointDao.findByName(param.getName(), null);
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(result)) {
throw new BadRequest(param.getName()+"该名称巡检点已存在");
}
}
if (!ObjectUtils.isEmpty(param.getPointNo())) {
List<Point> result = iPointDao.findByNo(param.getPointNo(), null);
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(result)) {
throw new BadRequest(param.getPointNo()+"该编号已存在");
}
}
point.setAddress(param.getAddress());
point.setCatalogId(param.getCatalogId() == null ? 0 : param.getCatalogId());
// 负责人
......
......@@ -388,8 +388,8 @@
</choose>
</select>
<select id="getInputItemInfoExcelNew" resultType="com.yeejoin.amos.patrol.business.dto.InputItemExcelDto">
SELECT
<select id="getInputItemInfoExcelNew" resultType="com.yeejoin.amos.patrol.business.dto.InputItemExcelVo">
SELECT
a.id,
a.name,
a.item_no,
......@@ -402,40 +402,29 @@
a.input_classify,
a.check_method,
(CASE a.equipment_type
WHEN a.equipment_type is not null and a.equipment_type = '-1'
WHEN '-1'
THEN '通用消防装备'
ELSE
(select name from wl_equipment_category where code = a.equipment_type AND industry_code = 2)
END) as equipment_type,
(CASE a.facilities_type
WHEN a.facilities_type is not null and a.facilities_type = '-1'
WHEN '-1'
THEN '通用消防设施'
ELSE (select name from wl_equipment_category where code = a.facilities_type AND industry_code = 2)
END) as facilities_type,
(CASE a.level
WHEN 1 THEN
'1级'
'级'
WHEN 2 THEN
'2级'
'级'
WHEN 3 THEN
'3级'
'级'
WHEN 4 THEN
'4级'
'级'
ELSE
'5级'
END )AS level,
(CASE a.key_parts_type
WHEN 0 THEN
'是'
WHEN 1 THEN
'否'
END )AS keyPartsType,
(CASE a.custom_type
WHEN 0 THEN
'是'
WHEN 1 THEN
'否'
END )AS customType,
'五级'
IFNULL(a.key_parts_type,1) AS keyPartsType,
IFNULL(a.custom_type,1) AS customType,
a.risk_desc,
a.data_json
from
......
......@@ -1082,9 +1082,6 @@
LEFT JOIN p_point_classify ppc ON ppc.point_id = p.id
<where>
p.is_delete = 0
<if test="orgCode !=null and orgCode !=''">
and p.org_code = #{orgCode}
</if>
<if test="bizOrgCode !=null and bizOrgCode !=''">
and p.biz_org_code like CONCAT(#{bizOrgCode},'%')
</if>
......
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