Commit 80d4f91c authored by zhangsen's avatar zhangsen

装备模板导出和装备导入需求修改

parent bb3fccae
......@@ -59,19 +59,19 @@ public class EquipmentDetailDownloadTemplateDto implements Serializable {
//@Excel(name = "品牌", width = 30, orderNum = "4")
private Date productionDate;
@Excel(name = "报废年限",width = 30, orderNum = "14")
//@Excel(name = "品牌", width = 30, orderNum = "4")
private String expiryDate;
@Excel(name = "维保周期",width = 30, orderNum = "15")
//@Excel(name = "品牌", width = 30, orderNum = "4")
private BigDecimal maintenanceCycle ;
@Excel(name = "投运时间",width = 30, orderNum = "16")
// @Excel(name = "报废年限",width = 30, orderNum = "14")
// //@Excel(name = "品牌", width = 30, orderNum = "4")
// private String expiryDate;
//
// @Excel(name = "维保周期",width = 30, orderNum = "15")
// //@Excel(name = "品牌", width = 30, orderNum = "4")
// private BigDecimal maintenanceCycle ;
@Excel(name = "投运时间",width = 30, orderNum = "14")
//@Excel(name = "品牌", width = 30, orderNum = "4")
private Date deliveryDate;
@Excel(name = "所属系统",width = 30, orderNum = "17")
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private String systemName;
// @Excel(name = "所属系统",width = 30, orderNum = "17")
// //@Excel(name = "所属单位",width = 30,orderNum = "12")
// private String systemName;
}
......@@ -68,21 +68,21 @@ public class EquipmentDetailExcelSingleTemplateDto {
//@Excel(name = "品牌", width = 30, orderNum = "4")
private Date productionDate;
@ExcelProperty(value = "报废年限", index = 13)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private String expiryDate;
@ExcelProperty(value = "维保周期", index = 14)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private BigDecimal maintenanceCycle ;
@ExcelProperty(value = "投运时间", index = 15)
// @ExcelProperty(value = "报废年限", index = 13)
// //@Excel(name = "品牌", width = 30, orderNum = "4")
// private String expiryDate;
//
// @ExcelProperty(value = "维保周期", index = 14)
// //@Excel(name = "品牌", width = 30, orderNum = "4")
// private BigDecimal maintenanceCycle ;
@ExcelProperty(value = "投运时间", index = 13)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private Date deliveryDate;
//动态下拉内容
@ExplicitConstraint(indexNum = 16, sourceClass = RoleNameExplicitConstraint.class,method="getFireSystemList") //动态下拉内容
@ExcelProperty(value = "所属系统", index = 16)
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private String systemName;
// @ExplicitConstraint(indexNum = 16, sourceClass = RoleNameExplicitConstraint.class,method="getFireSystemList") //动态下拉内容
// @ExcelProperty(value = "所属系统", index = 16)
// //@Excel(name = "所属单位",width = 30,orderNum = "12")
// private String systemName;
}
......@@ -69,21 +69,21 @@ public class EquipmentDetailExcelTemplateDto implements Serializable {
//@Excel(name = "品牌", width = 30, orderNum = "4")
private Date productionDate;
@ExcelProperty(value = "报废年限", index = 13)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private String expiryDate;
@ExcelProperty(value = "维保周期", index = 14)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private BigDecimal maintenanceCycle ;
@ExcelProperty(value = "投运时间", index = 15)
// @ExcelProperty(value = "报废年限", index = 13)
// //@Excel(name = "品牌", width = 30, orderNum = "4")
// private String expiryDate;
//
// @ExcelProperty(value = "维保周期", index = 14)
// //@Excel(name = "品牌", width = 30, orderNum = "4")
// private BigDecimal maintenanceCycle ;
@ExcelProperty(value = "投运时间", index = 13)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private Date deliveryDate;
//动态下拉内容
@ExplicitConstraint(indexNum = 16, sourceClass = RoleNameExplicitConstraint.class,method="getFireSystemList") //动态下拉内容
@ExcelProperty(value = "所属系统", index = 16)
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private String systemName;
// @ExplicitConstraint(indexNum = 16, sourceClass = RoleNameExplicitConstraint.class,method="getFireSystemList") //动态下拉内容
// @ExcelProperty(value = "所属系统", index = 16)
// //@Excel(name = "所属单位",width = 30,orderNum = "12")
// private String systemName;
}
package com.yeejoin.equipmanage.service.impl;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
......@@ -8,6 +9,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.yeejoin.equipmanage.common.utils.*;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -609,8 +611,11 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
AtomicReference<String> fightSysIds = new AtomicReference<>("");
String fightingSysCodes = equipmentDetailDownloadVOS.getFightingSysCodes();
if (StringUtils.isNotBlank(fightingSysCodes)) {
String[] idsArr = fightingSysCodes.split("-");
List<FireFightingSystemEntity> fightingSystemList = fireFightingSystemService.getFightingSysByCodes(idsArr);
String[] codes = new String[]{};
String[] idsArr1 = fightingSysCodes.split("-");
String[] idsArr2 = fightingSysCodes.split(",");
codes = idsArr1.length >= idsArr2.length ? idsArr1 : idsArr2;
List<FireFightingSystemEntity> fightingSystemList = fireFightingSystemService.getFightingSysByCodes(codes);
if (!fightingSystemList.isEmpty()) {
fightingSystemList.stream().forEach(x -> {
String sysCodes = fightSysIds.get();
......@@ -640,9 +645,9 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
equipmentDetail.setName(equipmentDetailDownloadVOS.getName());
equipmentDetail.setArea(equipmentDetailDownloadVOS.getDescription());
equipmentDetail.setProductionDate(equipmentDetailDownloadVOS.getProductionDate());
equipmentDetail.setExpiryDate(equipmentDetailDownloadVOS.getExpiryDate());
equipmentDetail.setExpiryDate(ObjectUtils.isEmpty(equipment.getExpiryDate()) ? "" : String.valueOf(equipment.getExpiryDate()));
equipmentDetail.setDeliveryDate(equipmentDetailDownloadVOS.getDeliveryDate());
equipmentDetail.setMaintenanceCycle(equipmentDetailDownloadVOS.getMaintenanceCycle());
equipmentDetail.setMaintenanceCycle(ObjectUtils.isEmpty(equipment.getMaintenanceCycle()) ? null : BigDecimal.valueOf(equipment.getMaintenanceCycle()));
// 导入新增所属单位
......@@ -685,10 +690,10 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
}
if (StringUtils.isNotBlank(equipmentDetailDownloadVOS.getSystemName())) {
String[] SystemName = equipmentDetailDownloadVOS.getSystemName().split("@");
equipmentSpecific.setSystemId(SystemName[1]);
}
// if (StringUtils.isNotBlank(equipmentDetailDownloadVOS.getSystemName())) {
// String[] SystemName = equipmentDetailDownloadVOS.getSystemName().split("@");
// equipmentSpecific.setSystemId(SystemName[1]);
// }
equipmentSpecificMapper.insert(equipmentSpecific);
StockServiceImpl controllerProxy = SpringUtils.getBean(StockServiceImpl.class);
//添加对于装备类型统计数据的刷新
......
......@@ -4878,8 +4878,8 @@
max( CASE WHEN ei.equipment_index_key = 'FHS_PipePressureDetector_PipePressure' THEN DATE_FORMAT( ei.`update_date`, '%m-%d %H:%i:%S' ) END ),
'--'
) AS nowPressureDate,
max( CASE WHEN fi.field_name = 'lowLevel' THEN fi.field_value END ) AS minLevel,
max( CASE WHEN fi.field_name = 'highLevel' THEN fi.field_value END ) AS maxLevel
max( CASE WHEN fi.field_name = 'minPressure' THEN fi.field_value END ) AS minLevel,
max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END ) AS maxLevel
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
......
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