lin 4 лет назад
Родитель
Сommit
502f8ddf97

+ 4 - 4
smart-city-platform/src/main/java/com/bz/smart_city/async/AsyncInstallPlanDownloadTask.java

@@ -185,7 +185,7 @@ public class AsyncInstallPlanDownloadTask {
                 }
             }
 
-            InputStream in = this.getClass().getClassLoader().getResourceAsStream("excel/installPlanTemplate.xlsm");   //得到文档的路径
+            InputStream in = this.getClass().getClassLoader().getResourceAsStream("excel/installPlanTemplate20200709.xlsx");   //得到文档的路径
 
             //列表数据将存储到指定的excel文件路径
             FileOutputStream out = new FileOutputStream(filePath);
@@ -211,7 +211,7 @@ public class AsyncInstallPlanDownloadTask {
         ZipStreamEntity zipStreamEntity = new ZipStreamEntity();
         DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
         LocalDateTime date = LocalDateTime.now();
-        String fileName = building.getName() + "水表安装计划单模板" + "-" + date.format(f) + ".xlsm";
+        String fileName = building.getName() + "水表安装计划单模板" + "-" + date.format(f) + ".xlsx";
         zipStreamEntity.setName(fileName);
         zipStreamEntity.setFilePath(filePath);
         return zipStreamEntity;
@@ -243,7 +243,7 @@ public class AsyncInstallPlanDownloadTask {
             //5、获取安装计划清单数据
 
 
-            InputStream in = this.getClass().getClassLoader().getResourceAsStream("excel/installPlanTemplate.xlsm");   //得到文档的路径
+            InputStream in = this.getClass().getClassLoader().getResourceAsStream("excel/installPlanTemplate20200709.xlsx");   //得到文档的路径
 
             //列表数据将存储到指定的excel文件路径
             FileOutputStream out = new FileOutputStream(filePath);
@@ -274,7 +274,7 @@ public class AsyncInstallPlanDownloadTask {
         ZipStreamEntity zipStreamEntity = new ZipStreamEntity();
         DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
         LocalDateTime date = LocalDateTime.now();
-        String fileName = "水表安装计划单模板" + "-" + date.format(f) + ".xlsm";
+        String fileName = "水表安装计划单模板" + "-" + date.format(f) + ".xlsx";
         zipStreamEntity.setName(fileName);
         zipStreamEntity.setFilePath(filePath);
         return zipStreamEntity;

+ 2 - 0
smart-city-platform/src/main/java/com/bz/smart_city/dao/DeviceTypeMapper.java

@@ -44,4 +44,6 @@ public interface DeviceTypeMapper {
     DeviceTypeDto getByName(@Param("deviceTypeName") String deviceTypeName, @Param("deviceTypeModel") String deviceTypeModel);
 
     DeviceTypeDto getById(@Param("id") Integer id);
+
+    DeviceTypeDto findByDeviceTypeId(@Param("deviceTypeId") Integer deviceTypeId);
 }

+ 2 - 1
smart-city-platform/src/main/java/com/bz/smart_city/entity/DeviceMeasuringPoint.java

@@ -6,11 +6,12 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
 import java.time.LocalDateTime;
 
 @Data
 @ApiModel("设备测点")
-public class DeviceMeasuringPoint {
+public class DeviceMeasuringPoint implements Serializable {
     @ApiModelProperty(value = "id",position = 1)
     private Integer id;
 

+ 3 - 0
smart-city-platform/src/main/java/com/bz/smart_city/entity/assistant/InstallList.java

@@ -139,4 +139,7 @@ public class InstallList {
 
     @ApiModelProperty(value = "客户信息ID")
     private BigInteger accountId;
+
+    @ApiModelProperty(value = "身份证号")
+    private String idCard;
 }

+ 2 - 0
smart-city-platform/src/main/java/com/bz/smart_city/service/DeviceTypeService.java

@@ -38,4 +38,6 @@ public interface DeviceTypeService {
     boolean isWaterChannel(Integer channelId);
 
     DeviceTypeDto getByName(String deviceTypeName,String deviceTypeModel);
+
+    DeviceTypeDto findById(Integer deviceTypeId);
 }

+ 2 - 2
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/DeviceServiceImpl.java

@@ -355,7 +355,7 @@ public  class DeviceServiceImpl implements DeviceService {
 
         //新增udip平台集成元
         DeviceTypeDto deviceTypeDto = deviceTypeMapper.getById(deviceDataDto.getDeviceType());
-        String udipId = udipUnitService.saveUdipUnit(deviceDataDto.getDeviceNo(),deviceDataDto.getCustomerId(),deviceTypeDto);
+        //String udipId = udipUnitService.saveUdipUnit(deviceDataDto.getDeviceNo(),deviceDataDto.getCustomerId(),deviceTypeDto);
 
         Device device = new Device();
         device.setId(idWorker.nextId());
@@ -376,7 +376,7 @@ public  class DeviceServiceImpl implements DeviceService {
         device.setWaterMeterFileNo(deviceDataDto.getWaterMeterFileNo());
         device.setCustomerId(deviceDataDto.getCustomerId());
         device.setWaterMeterNo(deviceDataDto.getWaterMeterNo());
-        device.setUdipId(udipId);
+        //device.setUdipId(udipId);
         int result = this.insert(device);
 
 

+ 7 - 0
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/DeviceTypeServiceImpl.java

@@ -237,4 +237,11 @@ public class DeviceTypeServiceImpl implements DeviceTypeService {
     public DeviceTypeDto getByName(String deviceTypeName,String deviceTypeModel) {
         return deviceTypeMapper.getByName(deviceTypeName,deviceTypeModel);
     }
+
+
+    @Override
+    @Cacheable(value = "deviceTypeId", key = "#deviceTypeId")
+    public DeviceTypeDto findById(Integer deviceTypeId) {
+        return deviceTypeMapper.findByDeviceTypeId(deviceTypeId);
+    }
 }

+ 0 - 9
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/assistant/InstallManagerServiceImpl.java

@@ -704,11 +704,6 @@ public class InstallManagerServiceImpl implements InstallManagerService, Initial
 		
 		// 4,保存设备信息
 		DeviceDto d = convertInstallList(dto);
-
-		//5,新增udip平台集成元
-		DeviceTypeDto deviceTypeDto = deviceTypeMapper.getById(d.getDeviceType());
-		String udipId = udipUnitService.saveUdipUnit(d.getDeviceNo(),d.getCustomerId(),deviceTypeDto);
-		d.setUdipId(udipId);
 		d.setDateCreate(LocalDateTime.now());
 		deviceMapper.insert(d);
 		// 6,保存设备维度信息
@@ -761,10 +756,6 @@ public class InstallManagerServiceImpl implements InstallManagerService, Initial
 				}
 			}
 			DeviceDto d = convertInstallList(dto);
-			//3,新增udip平台集成元
-			DeviceTypeDto deviceTypeDto = deviceTypeMapper.getById(d.getDeviceType());
-			String udipId = udipUnitService.saveUdipUnit(d.getDeviceNo(),d.getCustomerId(),deviceTypeDto);
-			d.setUdipId(udipId);
 			d.setDateCreate(LocalDateTime.now());
 			deviceMapper.insert(d);
 			saveDeviceDimInfo(d);

+ 118 - 100
smart-city-platform/src/main/java/com/bz/smart_city/service/importfile/AsyncTaskImportService.java

@@ -126,157 +126,177 @@ public class AsyncTaskImportService {
                 Workbook hssfWorkbook = null;
                 hssfWorkbook = new XSSFWorkbook(inputStream);//Excel 2007
 
+                FormulaEvaluator evaluator = hssfWorkbook.getCreationHelper().createFormulaEvaluator();
+
                 // 循环工作表Sheet
                 for (int numSheet = 0; numSheet < hssfWorkbook.getNumberOfSheets(); numSheet++) {
                     Sheet hssfSheet = hssfWorkbook.getSheetAt(numSheet);
                     if (hssfSheet == null) {
                         continue;
                     }
-                    if (!StringUtils.equals("水表安装计划模板", hssfSheet.getSheetName())) {
+                    if (!StringUtils.equals("安装计划模板", hssfSheet.getSheetName())) {
                         continue;
                     }
-                    // 1,处理表头,解析客户、小区、户数、建筑
-                    Row r_cust = hssfSheet.getRow(1); // 客户行
-                    String customerName = r_cust.getCell(3).getStringCellValue();
-                    Customer customer = customerMapper.findCustomerByName(siteId, customerName);
-                    if(customer == null ) {
-                        //throw new ServiceException(ResultStatus.CUSTOMER_IS_NOT_EXISTED);
+                    // 1,处理表头,解析客户、户数
+                    Row customerIdRow = hssfSheet.getRow(2); // 客户Id行
+                    Cell customerIdCell =  customerIdRow.getCell(7);
+                    if(customerIdCell == null ) {
                         messageContent.append("导入失败,");
                         messageContent.append(ResultStatus.CUSTOMER_IS_NOT_EXISTED.getMessage());
                         continue;
                     }
-                    dto.setCustomerId(customer.getId());
+                    CellValue customerIdCellValue = evaluator.evaluate(customerIdCell);
+                    Integer customerId =   (int) customerIdCellValue.getNumberValue();
+                    dto.setCustomerId(customerId);
 
-                    Row r_community = hssfSheet.getRow(2); // 小区行
-                    String communityName = r_community.getCell(3).getStringCellValue();
-                    Community community = communityMapper.findByName(siteId, communityName);
-                    if(community == null) {
-                        //throw new ServiceException(ResultStatus.COMMUNITY_IS_NOT_EXISTED);
-                        messageContent.append("导入失败,");
-                        messageContent.append(ResultStatus.COMMUNITY_IS_NOT_EXISTED.getMessage());
-                        continue;
-                    }
-                    dto.setCommunityId(community.getId());
-                    dto.setCommunityName(communityName);
-
-                    Row r_building = hssfSheet.getRow(3); // 建筑行
-                    String buildingName = r_building.getCell(3).getStringCellValue();
-                    Building building = buildingMapper.findByName(siteId, buildingName);
-                    if(building == null) {
-                        //throw new ServiceException(ResultStatus.BUILDING_IS_NOT_EXISTED);
-                        messageContent.append("导入失败,");
-                        messageContent.append(ResultStatus.BUILDING_IS_NOT_EXISTED.getMessage());
-                        continue;
-                    }
-                    dto.setBuildingId(building.getId());
-                    dto.setBuildingName(buildingName);
 
+                    Row numberRow = hssfSheet.getRow(3); // 安装数字,只处理指定安装户数的数据
+                    Cell numberCell = numberRow.getCell(7);
 
-                    Row r_number = hssfSheet.getRow(4); // 安装数字,只处理指定安装户数的数据
-                    int number = (int)r_number.getCell(3).getNumericCellValue();
+                    numberCell.setCellType(CellType.NUMERIC);
+                    int number = ((Double)numberCell.getNumericCellValue()).intValue();
                     if(number < 0 || number > 5000) {
-                        //throw new ServiceException(ResultStatus.NUMBER_IS_OUT_RANGE);
                         messageContent.append("导入失败,");
                         messageContent.append(ResultStatus.NUMBER_IS_OUT_RANGE.getMessage());
                         continue;
                     }
+
                     // 2,处理明细行数据
                     for (int rowNum = 9; rowNum < 9+number ; rowNum++) {
                         Row row = hssfSheet.getRow(rowNum);
                         if (row != null) {
 
-                            Cell c_id = row.getCell(1) ; // 编号
-                            Cell c_doorNo = row.getCell(2);
-                            Cell c_deviceType = row.getCell(3);
-                            Cell c_electronicNo = row.getCell(4);
-                            Cell c_deviceNo = row.getCell(5);
-                            Cell c_fileNo = row.getCell(6);
-                            Cell c_newMeterStart = row.getCell(7);
-                            Cell c_oldMeterEnd = row.getCell(8);
-                            Cell c_userName = row.getCell(9);
-                            Cell c_userPhone = row.getCell(10);
-                            Cell c_remark = row.getCell(11);
-
-                            Double idVal = c_id.getNumericCellValue();
-                            if(c_id !=null && idVal != null)
+                            Cell idCell = row.getCell(1) ; // 编号
+                            Cell communityCell = row.getCell(2);
+                            Cell communityIdCell = row.getCell(3);
+                            Cell buildingCell = row.getCell(4);
+                            Cell buildingIdCell = row.getCell(5);
+                            Cell doorNoCell = row.getCell(6);
+                            Cell deviceTypeCell = row.getCell(7);
+                            Cell deviceTypeIdCell = row.getCell(8);
+                            Cell electronicNoCell = row.getCell(9);
+                            Cell deviceNoCell = row.getCell(10);
+                            Cell fileNoCell = row.getCell(11);
+                            Cell newMeterStartCell = row.getCell(12);
+                            Cell oldMeterEndCell = row.getCell(13);
+                            Cell userNameCell = row.getCell(14);
+                            Cell userPhoneCell = row.getCell(15);
+                            Cell idCardCell = row.getCell(16);
+                            Cell remarkCell = row.getCell(17);
+
+
+                            if(idCell !=null){
+                                Double idVal = idCell.getNumericCellValue();
                                 dto.setId(idVal.intValue());
-                            String doorNo;
-                            if (c_doorNo.getCellTypeEnum() == CellType.NUMERIC) {
-                                doorNo = String.format("%.0f", c_doorNo.getNumericCellValue());
-                            } else {
-                                doorNo = c_doorNo.getStringCellValue().trim();
                             }
-                            if(StringUtils.isBlank(doorNo)) {
+
+                            communityCell.setCellType(CellType.STRING);
+                            if (StringUtils.equals("", communityCell.getStringCellValue())) {
+                                continue;
+                            }
+                            if (communityIdCell != null) {
+                                CellValue communityIdCellValue = evaluator.evaluate(communityIdCell);
+                                Integer communityId =   ((Double) communityIdCellValue.getNumberValue()).intValue();
+                                if(communityId==0){
+                                    continue;
+                                }
+                                dto.setCommunityId(communityId);
+                            }
+
+                            buildingCell.setCellType(CellType.STRING);
+                            if (StringUtils.equals("", buildingCell.getStringCellValue())) {
                                 continue;
                             }
-                            dto.setDoorNo(doorNo);
-                            dto.setLocation(doorNo);
+                            if (buildingIdCell != null) {
+                                CellValue buildingIdCellValue = evaluator.evaluate(buildingIdCell);
+                                Integer buildingId =   ((Double) buildingIdCellValue.getNumberValue()).intValue();
+                                if(buildingId==0){
+                                    continue;
+                                }
+                                dto.setBuildingId(buildingId);
+                            }
 
-                            String deviceTypeNameTemp = c_deviceType.getStringCellValue();
-                            if(StringUtils.isBlank(deviceTypeNameTemp)) {
+                            doorNoCell.setCellType(CellType.STRING);
+                            if (!StringUtils.equals("", doorNoCell.getStringCellValue())) {
+                                String doorNo = doorNoCell.getStringCellValue().trim();
+                                dto.setDoorNo(doorNo);
+                                dto.setLocation(doorNo);
+                            }else {
                                 continue;
                             }
-                            String[] temp = deviceTypeNameTemp.split("/");
-                            String deviceTypeName = temp[1];
-                            String deviceTypeModel = temp[2];
-                            DeviceTypeDto dt = deviceTypeService.getByName(deviceTypeName,deviceTypeModel);
-                            if(dt == null) {
-                                //throw new ServiceException(ResultStatus.DEVICE_TYPE_NOT_EXISTED);
-                                failTime++ ;
-                                c_remark.setCellValue(ResultStatus.DEVICE_TYPE_NOT_EXISTED.getMessage());
+
+
+                            deviceTypeCell.setCellType(CellType.STRING);
+                            if (StringUtils.equals("", deviceTypeCell.getStringCellValue())) {
+                                continue;
+                            }
+                            if (deviceTypeIdCell != null) {
+                                CellValue deviceTypeIdCellValue = evaluator.evaluate(customerIdCell);
+                                Integer deviceTypeId =   ((Double) deviceTypeIdCellValue.getNumberValue()).intValue();
+                                if(deviceTypeId==0){
+                                    continue;
+                                }
+                                DeviceTypeDto dt = deviceTypeService.findById(deviceTypeId);
+                                if(dt == null) {
+                                    failTime++ ;
+                                    remarkCell.setCellValue(ResultStatus.DEVICE_TYPE_NOT_EXISTED.getMessage());
+                                }else {
+                                    dto.setDeviceTypeId(dt.getId());
+                                    dto.setFactoryId(dt.getManufacturerId());
+                                }
                             }
-                            dto.setDeviceTypeId(dt.getId());
-                            dto.setFactoryId(dt.getManufacturerId());
 
-                            c_electronicNo.setCellType(CellType.STRING);
-                            String electronicNo = c_electronicNo.getStringCellValue();
+
+                            electronicNoCell.setCellType(CellType.STRING);
+                            String electronicNo = electronicNoCell.getStringCellValue().trim();
                             if(StringUtils.isBlank(electronicNo)) {
                                 continue;
                             }
                             dto.setElectronicNo(electronicNo);
 
-                            c_deviceNo.setCellType(CellType.STRING);
-                            String deviceNo = c_deviceNo.getStringCellValue();
+                            deviceNoCell.setCellType(CellType.STRING);
+                            String deviceNo = deviceNoCell.getStringCellValue().trim();
                             if(StringUtils.isBlank(deviceNo)) {
                                 continue;
                             }
                             dto.setDeviceNo(deviceNo);
 
-                            if(c_fileNo != null){
-                                c_fileNo.setCellType(CellType.STRING);
-                                String fileNo = c_fileNo.getStringCellValue();
+                            if(fileNoCell != null){
+                                fileNoCell.setCellType(CellType.STRING);
+                                String fileNo = fileNoCell.getStringCellValue().trim();
                                 if(!StringUtils.equals("",fileNo)) {
                                     dto.setFileNo(fileNo);
                                 }
                             }
 
 
-                            String newMeterStart;
-                            if (c_newMeterStart.getCellTypeEnum() == CellType.NUMERIC) {
-                                newMeterStart = Double.toString(c_newMeterStart.getNumericCellValue());
-                            } else {
-                                newMeterStart = c_newMeterStart.getStringCellValue();
-                            }
+                            newMeterStartCell.setCellType(CellType.STRING);
+                            String newMeterStart = newMeterStartCell.getStringCellValue().trim();
                             if(StringUtils.isBlank(newMeterStart)) {
                                 continue;
                             }
                             dto.setNewMeterStart(newMeterStart);
 
-
-                            String oldMeterEnd  = c_oldMeterEnd.getStringCellValue();
+                            oldMeterEndCell.setCellType(CellType.STRING);
+                            String oldMeterEnd  = oldMeterEndCell.getStringCellValue().trim();
                             dto.setOldMeterEnd(oldMeterEnd);
-                            String userName = c_userName.getStringCellValue();
+
+                            userNameCell.setCellType(CellType.STRING);
+                            String userName = userNameCell.getStringCellValue().trim();
                             dto.setUserName(userName);
 
-                            if(c_userPhone.getCellTypeEnum() == CellType.NUMERIC){
-                                String userPhone = Double.toString(c_userPhone.getNumericCellValue());
-                                dto.setUserPhone(userPhone);
-                            }else {
-                                String userPhone = c_userPhone.getStringCellValue();
-                                dto.setUserPhone(userPhone);
-                            }
+                            userPhoneCell.setCellType(CellType.STRING);
+                            String userPhone = userPhoneCell.getStringCellValue().trim();
+                            dto.setUserPhone(userPhone);
+
+                            //身份证号
+                            idCardCell.setCellType(CellType.STRING);
+                            String idCard = idCardCell.getStringCellValue().trim();
+                            dto.setIdCard(idCard);
+
 
                             dto.setChannelId(-99);
+                            System.out.println(JSON.toJSONString(dto));
                             try {
                                 //保存安装信息
                                 boolean isOk = installManagerService.saveInstallInfo(dto);
@@ -285,18 +305,18 @@ public class AsyncTaskImportService {
                                     successTime++ ;
                                 }else {
                                     failTime++ ;
-                                    c_remark.setCellValue(ResultStatus.DELETE_AND_DOOR_EXISTED.getMessage());
+                                    remarkCell.setCellValue(ResultStatus.DELETE_AND_DOOR_EXISTED.getMessage());
                                 }
                             } catch (ServiceException e){
                                 if(e.getStatus() == ResultStatus.DEVICE_NO_IS_EXISTED.getStatus()){
                                     failTime++ ;
-                                    c_remark.setCellValue(e.getMessage());
+                                    remarkCell.setCellValue(e.getMessage());
                                 }else {
                                     failTime++ ;
                                 }
                             }catch (Exception e){
                                 failTime++ ;
-                                c_remark.setCellValue("导入异常");
+                                remarkCell.setCellValue("导入异常");
                             }
                         }
 
@@ -321,6 +341,7 @@ public class AsyncTaskImportService {
                     messageContent.append(failTime);
                     messageContent.append("条。");
                 }
+
                 if(failTime > 0){
                     String FailFilePath = this.getFilePath();
                     FileOutputStream os = new FileOutputStream(FailFilePath);
@@ -340,9 +361,9 @@ public class AsyncTaskImportService {
                 isDownload = true;
 
             } catch (Exception e) {
+                e.printStackTrace();
                 log.error("read excel error", e);
                 messageContent.append("导入失败,读取文件错误。");
-                //throw new ServiceException(-900, "读取文件错误!");
             } finally {
                 FileUtil.deleteFile(record.getImportFilePath());
             }
@@ -356,7 +377,7 @@ public class AsyncTaskImportService {
 
 
         //更新完成生成消息
-        Message message = new Message();
+        /*Message message = new Message();
         message.setSiteId(record.getUserId());
         message.setUserId(record.getUserId());
         message.setMessageType(record.getType());
@@ -368,7 +389,7 @@ public class AsyncTaskImportService {
 
         message.setObjId(record.getId());
         message.setRead(0);
-        messageService.insertSelective(message);
+        messageService.insertSelective(message);*/
 
         log.info("end executeAsyncInstallTask!");
     }
@@ -486,11 +507,8 @@ public class AsyncTaskImportService {
                                     }
                                 }
 
-                                //新增udip平台集成元
                                 DeviceTypeDto deviceType = deviceTypeMapper.getById(device.getDeviceType());
-                                String udipId = udipUnitService.saveUdipUnit(device.getDeviceNo(),device.getCustomerId(),deviceType);
 
-                                device.setUdipId(udipId);
                                 //DeviceType deviceType = deviceTypeMapper.findByid(device.getDeviceType());
                                 device.setManufacturerId(deviceType.getManufacturerId());
                                 device.setDeviceStatus(5);//未启用

+ 1 - 1
smart-city-platform/src/main/java/com/bz/smart_city/service/udip/UdipUnitService.java

@@ -92,7 +92,7 @@ public class UdipUnitService {
                 throw new ServiceException(-900, "新增集成元错误");
             }
         }else {
-            return null;
+            return saveUdipUnit(identifier,customerId,deviceType);
         }
 
     }

BIN
smart-city-platform/src/main/resources/excel/installPlanTemplate20200703.xlsx


BIN
smart-city-platform/src/main/resources/excel/installPlanTemplate20200709.xlsx


+ 10 - 2
smart-city-platform/src/main/resources/mapper/DeviceTypeMapper.xml

@@ -296,9 +296,12 @@
 	</select>
 
     <select id="findByIds" resultType="com.bz.smart_city.dto.DeviceTypeDto">
-        select id,equipment_type,model,manufacturer_id,device_type from sc_device_type where status = 1
+        select sdt.id,sdt.equipment_type,sdt.model,sdt.manufacturer_id,sdt.device_type,sdm.name as manufacturer_name
+        from sc_device_type sdt
+        left join sc_device_manufacturer sdm on (sdm.id = sdt.manufacturer_id and sdm.status = 1)
+        where sdt.status = 1
         <if test="deviceTypeIds != null and deviceTypeIds.size() != 0">
-            and id in
+            and sdt.id in
             <foreach collection="deviceTypeIds" item="item" open="(" separator="," close=")">#{item}</foreach>
         </if>
     </select>
@@ -315,5 +318,10 @@
         left join sc_device_manufacturer sdm on (sdm.id = sdt.manufacturer_id and sdm.status = 1)
         where sdt.status = 1 and sdt.id = #{id}
     </select>
+
+    <select id="findByDeviceTypeId" resultMap="lazyLoadMeasuringPoint">
+        select id,equipment_type,model,manufacturer_id,device_type from sc_device_type where status = 1
+        and id = #{deviceTypeId}
+    </select>
 </mapper>
 

+ 9 - 0
smart-city-platform/src/main/resources/mapper/InstallListMapper.xml

@@ -183,6 +183,9 @@
       <if test="floor != null">
         `floor`,
       </if>
+      <if test="idCard != null">
+        id_card,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="siteId != null">
@@ -281,6 +284,9 @@
       <if test="floor != null">
         #{floor},
       </if>
+      <if test="idCard != null">
+        #{idCard},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.bz.smart_city.entity.assistant.InstallList">
@@ -383,6 +389,9 @@
       <if test="floor != null">
         `floor` = #{floor},
       </if>
+      <if test="idCard != null">
+        id_card = #{idCard},
+      </if>
     </set>
     where id = #{id}
   </update>