Prechádzať zdrojové kódy

********************WX******************
处理问题

zhangweixin 4 rokov pred
rodič
commit
13925ac098

+ 2 - 2
datacenter/src/main/kotlin/com/persagy/server/controllers/graphtype/GraphicTypeController.kt

@@ -179,8 +179,8 @@ open class GraphicTypeController {
      * @return  导入状态
      */
     @Operation(summary = "导入excel-点表", description = "")
-    @PostMapping("/import/point")
-    fun importExcelPointLocalId(@RequestParam("file") file: MultipartFile) : SBaseResponse{
+    @PostMapping("/import/point",consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])
+    fun importExcelPointLocalId(@RequestPart("file") file: MultipartFile) : SBaseResponse{
         try {
             return RelationTypeProjectService.importExcelPoint(file)
         }catch (e : Exception){

+ 6 - 2
datacenter/src/main/kotlin/com/persagy/server/services/assistant/SchemeService.kt

@@ -186,8 +186,12 @@ open class SchemeService {
 
                val update = FloorService.update(floorEntity, null, list)
                if (update){
-                   rabbitMqService.sendObjects(projectId!!, Opt.UPDATE,floorEntity.id!!)
-                   rabbitMqService.sendObjects(projectId!!, "equip",floorEntity.id!!)
+                   try {
+                       rabbitMqService.sendObjects(projectId!!, Opt.UPDATE,floorEntity.id!!)
+                       rabbitMqService.sendObjects(projectId!!, "equip",floorEntity.id!!)
+                   } catch (e: Exception) {
+                       e.printStackTrace()
+                   }
                }
            }
            return rUpDateEquipAndSapce

+ 3 - 3
datacenter/src/main/kotlin/com/persagy/server/services/graphtype/RelationTypeProjectService.kt

@@ -710,8 +710,8 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
                         }else if (equipmentList.size>1) {
                             row.createCell(4).setCellValue("本地编码重复")
                         }else {
-                            val entity = dictDefFuncId.select(SFilter.eq("type", equipmentList[0].classCode!!), SFilter.eq("code", id1)).entity()
-                            if (entity == null) {
+                            val entity = dictDefFuncId.select(SFilter.eq("classCode", equipmentList[0].classCode!!), SFilter.eq("code", id1)).entity()
+                            if (entity == null ) {
                                 row.createCell(4).setCellValue("信息点不存在")
                             }else {
                                 val equip = equipUpdate(equipmentList[0], id1, id2, id3)
@@ -744,7 +744,7 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
     } // Fun readExcelRelation()
 
     fun equipUpdate(equipment: Equipment,id1: String,id2: String,id3: String):Equipment {
-        val entity = dictDefFuncId.select(SFilter.eq("type", equipment.classCode!!), SFilter.eq("code", id1)).entity()
+        val entity = dictDefFuncId.select(SFilter.eq("classCode", equipment.classCode!!), SFilter.eq("code", id1)).entity()
         logger.debug("信息点1=${equipment.classCode}")
         logger.debug("信息点=${entity?.toJson()}")
         if (entity!=null) {