diff --git a/das/src/main/java/com/das/modules/equipment/controller/SysIotModelController.java b/das/src/main/java/com/das/modules/equipment/controller/SysIotModelController.java index 26fac91f..ab1e7d6b 100644 --- a/das/src/main/java/com/das/modules/equipment/controller/SysIotModelController.java +++ b/das/src/main/java/com/das/modules/equipment/controller/SysIotModelController.java @@ -196,7 +196,7 @@ public class SysIotModelController { return R.success(sysIotModelService.updateSysIotModelService(sysIotModelServiceDto)); } - /** 物模型属性删除 */ + /** 物模型属性动作删除 */ @PostMapping("/service/delete") public R deleteSysIotModelService(@RequestBody SysIotModelServiceDto sysIotModelServiceDto) { diff --git a/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java b/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java index a671a9c2..c9be0752 100644 --- a/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java +++ b/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java @@ -142,12 +142,12 @@ public class SysEquipmentServiceImpl implements SysEquipmentService { List sysEquipmentList = sysEquipmentMapper.queryInfoById(sysEquipmentDto); //自定义别名 别名的key和实体类中的名称要对应上!! LinkedHashMap map = new LinkedHashMap<>(); - map.put("tag", "标识"); - map.put("objectType", "设备类型编码(10001:风电场,10002:机组)"); - map.put("iotModelName", "所属物模型名称"); + map.put("tag", "*标识(I:新增,U:修改,D:删除)"); + map.put("objectType", "*设备类型编码(10001:风电场,10002:机组)"); map.put("iotModelCode", "所属物模型编码"); - map.put("code", "设备编码"); - map.put("name", "设备名称"); + map.put("iotModelName", "所属物模型名称"); + map.put("code", "*设备编码"); + map.put("name", "*设备名称"); map.put("madeinFactory", "制造商"); map.put("model", "型号规格"); map.put("location", "安装位置"); @@ -155,13 +155,13 @@ public class SysEquipmentServiceImpl implements SysEquipmentService { map.put("latitude", "纬度"); map.put("installDate", "安装时间"); map.put("remarks", "备注"); + map.put("mrid", "机构编码"); map.put("orgName", "机构名称"); + map.put("parentEquipmentCode", "上级设备编码"); map.put("parentEquipmentName", "上级设备名称"); map.put("belongLine", "所属线路"); map.put("standard", "是否为标杆机组(0:否,1:是)"); map.put("nominalCapacity", "额定容量MW"); - map.put("mrid", "机构编码"); - map.put("parentEquipmentCode", "上级设备编码"); ExcelWriter writer = new ExcelWriter(); writer.setHeaderAlias(map); @@ -203,14 +203,13 @@ public class SysEquipmentServiceImpl implements SysEquipmentService { // 遍历 for (List row : list) { SysEquipment field = new SysEquipment(); - // 根据编码获取物模型id - if (StringUtils.hasText(row.get(3).toString())) { + if (StringUtils.hasText(row.get(2).toString())) { Long iotModelId = sysIotModelMapper.queryIotModelIdByName(row.get(3).toString()); field.setIotModelId(iotModelId); } - if (StringUtils.hasText(row.get(18).toString())) { - Long orgId = sysOrgMapper.queryOrgIdByName(row.get(18).toString()); + if (StringUtils.hasText(row.get(13).toString())) { + Long orgId = sysOrgMapper.queryOrgIdByName(row.get(13).toString()); field.setOrgId(orgId); } // 转换成字符串 @@ -231,10 +230,10 @@ public class SysEquipmentServiceImpl implements SysEquipmentService { field.setInstallDate(sf.parse(row.get(11).toString())); } field.setRemarks(row.get(12).toString()); - field.setBelongLine(row.get(15).toString()); - field.setStandard(Integer.valueOf(row.get(16).toString())); - if (StringUtils.hasText(row.get(17).toString())) { - field.setNominalCapacity(Double.valueOf(row.get(17).toString())); + field.setBelongLine(row.get(17).toString()); + field.setStandard(Integer.valueOf(row.get(18).toString())); + if (StringUtils.hasText(row.get(19).toString())) { + field.setNominalCapacity(Double.valueOf(row.get(19).toString())); } field.setParentEquipmentId(Long.valueOf(parentEquipmentId)); diff --git a/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java b/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java index b2f0a642..5707e1c7 100644 --- a/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java +++ b/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java @@ -264,16 +264,16 @@ public class SysIotModelServiceImpl implements SysIotModelService { LinkedHashMap map = new LinkedHashMap<>(); SheetInfoBean sheetDTO = new SheetInfoBean(); map.put("tag", "标识"); - map.put("iotModelName", "所属物模型名称"); map.put("iotModelCode", "所属物模型编码"); - map.put("attributeCode", "物模型属性编码"); - map.put("attributeName", "物模型属性名称"); - map.put("attributeType", "属性类型(138:模拟量,139:累积量,140:离散量)"); - map.put("porder", "测点序号"); + map.put("iotModelName", "所属物模型名称"); + map.put("attributeCode", "*物模型属性编码"); + map.put("attributeName", "*物模型属性名称"); + map.put("attributeType", "*属性类型(138:模拟量,139:累积量,140:离散量)"); + map.put("porder", "*测点序号"); map.put("subSystem", "子系統"); map.put("dataType", "数据类型"); map.put("visible", "是否可见(0:不可见,1:可见)"); - map.put("highSpeed", "属性频度:0低频属性,1高频属性"); + map.put("highSpeed", "属性频度(0低频属性,1高频属性)"); sheetDTO.setSheetName("物模型属性"); sheetDTO.setFieldAndAlias(map); sheetDTO.setCollection(sysIotModelFieldVoList); @@ -283,12 +283,12 @@ public class SysIotModelServiceImpl implements SysIotModelService { LinkedHashMap map1= new LinkedHashMap<>(); SheetInfoBean sheetDTO1 = new SheetInfoBean(); map1.put("tag", "标识"); - map1.put("iotModelName", "所属物模型名称"); map1.put("iotModelCode", "所属物模型编码"); - map1.put("serviceCode", "物模型动作编码"); - map1.put("serviceName", "物模型动作名称"); - map1.put("serviceType", "动作类型(146:遥控,147:遥调)"); - map1.put("porder", "测点序号"); + map1.put("iotModelName", "所属物模型名称"); + map1.put("serviceCode", "*物模型动作编码"); + map1.put("serviceName", "*物模型动作名称"); + map1.put("serviceType", "*动作类型(146:遥控,147:遥调)"); + map1.put("porder", "*测点序号"); sheetDTO1.setSheetName("物模型动作"); sheetDTO1.setFieldAndAlias(map1); sheetDTO1.setCollection(sysIotModelServiceVoList);