Преглед изворни кода

**********************************wx*************************
适配设备类型

weixinVSjinlai пре 4 година
родитељ
комит
d9cc12fdf0

+ 12 - 1
datacenter/src/main/kotlin/com/persagy/server/Swagger3Config.kt

@@ -146,8 +146,19 @@ open class Swagger3Config {
             val projectId = Parameter().`in`(ParameterIn.HEADER.toString())
                 .name("projectId").description("项目 id")
                 .schema(StringSchema()).required(false)
+            val groupCode = Parameter().`in`(ParameterIn.HEADER.toString())
+                    .name("groupCode").description("集团编码")
+                    .schema(StringSchema()).required(false)
+            val appId = Parameter().`in`(ParameterIn.HEADER.toString())
+                    .name("appId").description("应用id")
+                    .schema(StringSchema()).required(false)
+            val userId = Parameter().`in`(ParameterIn.HEADER.toString())
+                    .name("userId").description("用户id")
+                    .schema(StringSchema()).required(false)
             operation.addParametersItem(projectId)
-
+            operation.addParametersItem(groupCode)
+            operation.addParametersItem(appId)
+            operation.addParametersItem(userId)
             return operation
         }
     }

+ 2 - 2
datacenter/src/main/kotlin/com/persagy/server/services/dict/dictnew/DictDefClassService.kt

@@ -114,7 +114,7 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
                         dictSchemeCategoryList = defClassService.select(
                             SFilter.eq("parentCode","equipment"),
                             SFilter.eq("projectId",projectId!!)
-                        ).exec()
+                        ).order("code").exec()
 
                     }
                     "component" -> {
@@ -125,7 +125,7 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
                         dictSchemeCategoryList = defClassService.select(
                             SFilter.eq("parentCode","component"),
                             SFilter.eq("projectId",projectId!!)
-                        ).exec()
+                        ).order("code").exec()
                     }
                     "system" -> {
 //                    queryBuilder = select(SFilter.eq(SLength("id"), 2), SFilter.not(SFilter.eq("parentId","AllProfessionalSystemEquipment")))

+ 1 - 1
scanbuilding/src/main/kotlin/com/persagy/server/controller/UserController.kt

@@ -147,7 +147,7 @@ open class UserController {
     open fun switchProject(@Validated @RequestBody body: ProjectChangeRequest): BaseResponse {
         try {
 //            val user: cn.sagacloud.server.scanbuilding.entities.User? = userService.changeProject(body.projId!!, body.phone!!) ?: return BaseResponse()
-            val user = UserService.select(SFilter.eq("projId", body.projId!!), SFilter.eq("phone", body.phone!!)).entity()?: return BaseResponse()
+            val user = UserService.select(SFilter.eq("projectId", body.projId!!), SFilter.eq("phone", body.phone!!)).entity()?: return BaseResponse()
 //            userLogService.write(body.comming!!, body.projId, user!!.userId,"用户登录", null, body.toLog())
             return UserResponse(user)
         } catch (e: Exception) {

+ 1 - 1
scanbuilding/src/main/kotlin/com/persagy/server/services/UserService.kt

@@ -174,7 +174,7 @@ object UserService : SObjectService<User>(SMybatisDao(User::class.java)) {
                 for (user in userList){
                     idList.add(user.projectId!!)
                 }
-                val projectList = projectService.select(SFilter.inList("projId", idList)).exec()
+                val projectList = projectService.select(SFilter.inList("id", idList)).exec()
                 for (project in projectList){
                     val select = buildService.select(SFilter.eq("projectId", project.id!!)).exec()
                     project.buildList = select

+ 0 - 3
scanbuilding/src/main/kotlin/com/persagy/server/services/task/EquipScanTaskService.kt

@@ -260,9 +260,6 @@ object EquipScanTaskService : RService<EquipScanTask>(SMybatisDao(EquipScanTask:
                 equipScanTask.buildingId = equipment!!.buildingId
                 equipScanTask.floorId = equipment!!.floorId
                 equipScanTask.cadId = equipment!!.cadId
-                equipScanTask.supplier = equipment!!.dpSupplierId
-                equipScanTask.specification = equipment!!.dpManufacturerId
-                equipScanTask.manufacturer = equipment!!.dpMaintainerId
                 equipScanTask.bimLocation = equipment.bimLocation
                 equipScanTask.taskParentId = task.id
                 if (equipment.codeType!=null){

+ 2 - 2
scanbuilding/src/main/resources/application-dev.yml

@@ -6,8 +6,8 @@ spring:
 #    url:                                jdbc:postgresql://172.16.44.234:5432/datacenter
 #    username:                           postgres
 #    password:                           123456
-#    url:                                jdbc:postgresql://39.102.40.239:5432/datacenterlabsl
-    url:                                jdbc:postgresql://60.205.177.43:5432/datacenterlabsl
+    url:                                jdbc:postgresql://39.102.40.239:5432/datacenter
+#    url:                                jdbc:postgresql://60.205.177.43:5432/datacenterlabsl
     username:                           postgres
     #    password:                           persagy_2020qwe!@#
     password:                           cGVyc2FneV8yMDIwcXdlIUAj

+ 2 - 2
scanbuilding/src/main/resources/application-prod.yml

@@ -6,8 +6,8 @@ spring:
     #    url:                                jdbc:postgresql://data-center:5432/datacenter
     #    username:                           postgres
     #    password:                           123qwe!@#
-#    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
-    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
+    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
+#    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
     username:                           postgres
     #    password:                           persagy_2020qwe!@#
     password:                           cGVyc2FneV8yMDIwcXdlIUAj