caiaf 4 роки тому
батько
коміт
f467dd1b50

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

@@ -176,7 +176,7 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
      * @param   code            识别码类型
      * @param   zoneType        业务空间类型
      */
-    fun exportExcel(response: HttpServletResponse, projectId: String,relType: String, code: String = "对象ID", zoneType: String? = null,graphCode: String) {
+    fun  exportExcel(response: HttpServletResponse, projectId: String,relType: String, code: String = "对象ID", zoneType: String? = null,graphCode: String) {
         val workbook = XSSFWorkbook(RelationTypeProjectService::class.java.classLoader.getResourceAsStream("excel/relation-template.xlsx"))
         response.contentType = "application/octet-stream"
         response.setHeader("Content-disposition", "attachment;filename=relation-$relType.xlsx")

+ 0 - 1
datacenter/src/main/kotlin/com/persagy/server/datacenter/services/relation_calc/CalcSpecialService.kt

@@ -53,7 +53,6 @@ import com.persagy.service.models.responses.SBaseResponse
 import org.json.JSONObject
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.stereotype.Service
-import sun.java2d.pipe.LoopPipe
 import java.util.stream.Collectors
 import kotlin.math.pow
 import kotlin.math.sqrt

+ 2 - 2
datacenter/src/main/kotlin/com/persagy/server/datacenter/services/relation_calc/ManualRelationCalcService.kt

@@ -1264,7 +1264,7 @@ open class ManualRelationCalcService {
             val projectId = SPageContext.getHeader("projectId")
 
             var delete: Boolean = false
-            if(!manualRelationCalcDel.fromId.isNullOrEmpty()&&manualRelationCalcDel.toId.isNullOrEmpty()){
+            if(!manualRelationCalcDel.fromId.isNullOrEmpty()&& !manualRelationCalcDel.toId.isNullOrEmpty()){
 
                 try {
                     val relationTypeProjectService = SObjectService(SMybatisDao(RelationTypeProject::class.java))
@@ -1317,7 +1317,7 @@ open class ManualRelationCalcService {
                 }
             }else{
                 /** 主对象和从对象都不可以为空 */
-                return  SBaseResponse(SResponseType.failure)
+                return  SBaseResponse(SResponseType.failure,"主对象和从对象都不可以为空!")
             }
         } catch (e: Exception) {
             e.printStackTrace()

+ 2 - 2
datacenter/src/main/kotlin/com/persagy/server/datacenter/services/relation_calc/RelationCalcService.kt

@@ -1178,7 +1178,7 @@ open class RelationCalcService {
                                 for (connectedBlock in connectedBlocks) {
                                     val typeCode1 = connectedBlock.typeCode1
                                     val typeCode2 = connectedBlock.typeCode2
-                                    if(sourceList.contains(typeCode1) && connectedBlock.id1 == rEq2Sp.id1){
+                                    if(codeList.contains(typeCode2) && connectedBlock.id1 == rEq2Sp.id1){
                                         val fullREq2Sp = REq2Sp()
                                         fullREq2Sp.type = relType
                                         fullREq2Sp.graphCode = graphCode
@@ -1188,7 +1188,7 @@ open class RelationCalcService {
                                         fullREq2Sp.zoneType = rEq2Sp.zoneType
                                         fullREq2Sp.sign =2
                                         rEq2Sps.add(fullREq2Sp)
-                                    }else if(sourceList.contains(typeCode2)  && connectedBlock.id2 == rEq2Sp.id1){
+                                    }else if(codeList.contains(typeCode1)  && connectedBlock.id2 == rEq2Sp.id1){
                                         val fullREq2Sp = REq2Sp()
                                         fullREq2Sp.type = relType
                                         fullREq2Sp.graphCode = graphCode

+ 0 - 4
datacenter/src/main/kotlin/com/persagy/server/datacenter/wanda/a.java

@@ -1,4 +0,0 @@
-package com.persagy.server.wanda;
-
-public class a {
-}

+ 0 - 4
datacenter/src/main/kotlin/com/persagy/server/datacenter/wanda/controllers/b.java

@@ -1,4 +0,0 @@
-package com.persagy.server.wanda.controllers;
-
-public class b {
-}

+ 1 - 1
datacenter/src/main/kotlin/com/persagy/server/datacenter/wanda/controllers/relation/GraphicTypeController.kt

@@ -100,7 +100,7 @@ open class GraphicTypeController {
      */
     @Operation(summary="导出关系*", description="")
     @GetMapping(value = ["/export"])
-    fun exportExcel( response: HttpServletResponse, @RequestParam projectId: String,@RequestParam relType: String,@RequestParam(required = false) code: String = "对象ID", @RequestParam zoneType: String? = null,@RequestParam graphCode: String) {
+    fun exportExcel( response: HttpServletResponse, @RequestParam projectId: String,@RequestParam relType: String,@RequestParam code: String = "对象ID", @RequestParam zoneType: String? = null,@RequestParam graphCode: String) {
         RelationTypeProjectService.exportExcel(response, projectId,relType, code, zoneType,graphCode)
     } // Fun exportExcel
 

+ 14 - 0
template.yml

@@ -0,0 +1,14 @@
+ROSTemplateFormatVersion: '2015-09-01'
+Transform: Aliyun::Serverless-2018-04-03
+Resources:
+  192.168.64.17:
+    Type: Aliyun::Serverless::Service
+    datacenter:
+      Type: Aliyun::Serverless::Function
+      Properties:
+        Handler: example.App::handleRequest
+        Initializer: example.App::initialize
+        Runtime: java8
+        MemorySize: 512
+        CodeUri: 192.168.64.17/datacenter
+        Timeout: 60