Browse Source

问题类型同步

yanguofeng 3 years ago
parent
commit
4c0f73f851

+ 36 - 0
adm-business/adm-server/pom.xml

@@ -44,4 +44,40 @@
             <version>1.16.1</version>
         </dependency>
     </dependencies>
+
+
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.mybatis.generator</groupId>-->
+<!--                <artifactId>mybatis-generator-maven-plugin</artifactId>-->
+<!--                <version>1.3.2</version>-->
+<!--                <configuration>-->
+<!--                    <configurationFile>src/main/resources/mybatis-generator/generatorConfig.xml</configurationFile>-->
+<!--                    <verbose>true</verbose>-->
+<!--                    <overwrite>true</overwrite>-->
+<!--                </configuration>-->
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <id>Generate MyBatis Artifacts</id>-->
+<!--                        <goals>-->
+<!--                            <goal>generate</goal>-->
+<!--                        </goals>-->
+<!--                    </execution>-->
+<!--                </executions>-->
+<!--                <dependencies>-->
+<!--                    <dependency>-->
+<!--                        <groupId>mysql</groupId>-->
+<!--                        <artifactId>mysql-connector-java</artifactId>-->
+<!--                        <version>8.0.15</version>-->
+<!--                    </dependency>-->
+<!--                    <dependency>-->
+<!--                        <groupId>org.mybatis.generator</groupId>-->
+<!--                        <artifactId>mybatis-generator-core</artifactId>-->
+<!--                        <version>1.3.2</version>-->
+<!--                    </dependency>-->
+<!--                </dependencies>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
 </project>

+ 7 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/dao/AdmDefineProblemTypeMapper.java

@@ -0,0 +1,7 @@
+package com.persagy.bdtp.adm.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.persagy.bdtp.adm.entity.db.AdmDefineProblemType;
+
+public interface AdmDefineProblemTypeMapper extends BaseMapper<AdmDefineProblemType> {
+}

+ 18 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/entity/db/AdmDefineProblemType.java

@@ -0,0 +1,18 @@
+package com.persagy.bdtp.adm.entity.db;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
+import lombok.Data;
+@Data
+@TableName(value = "adm_define_problem_type", autoResultMap = true)
+public class AdmDefineProblemType extends AuditableEntity {
+
+    private String objTypeCode;
+
+    private String objTypeName;
+
+    private String problemTypeCode;
+
+    private String problemTypeName;
+
+}

+ 2 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/service/IConfigService.java

@@ -26,4 +26,6 @@ public interface IConfigService {
 
 	ObjectNode queryRenameEquipTypes(String projectId);
 
+    List<AdmDefineProblemType> queryDefineProblemTypes();
+
 }

+ 7 - 1
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/service/impl/ConfigServiceImpl.java

@@ -36,6 +36,9 @@ public class ConfigServiceImpl implements IConfigService {
 	@Autowired
 	private AdmContainerConfigMapper containerConfigMapper;
 
+	@Autowired
+	AdmDefineProblemTypeMapper admDefineProblemTypeMapper;
+
 	@Override
 	public List<AdmM2dEquip> queryM2dEquip(String projectId) {
 		return m2dEquipMapper.selectList(null);
@@ -102,5 +105,8 @@ public class ConfigServiceImpl implements IConfigService {
 		return null;
 	}
 
-
+	@Override
+	public List<AdmDefineProblemType> queryDefineProblemTypes() {
+		return admDefineProblemTypeMapper.selectList(null);
+	}
 }

+ 4 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/service/impl/SyncAppImpl.java

@@ -18,6 +18,7 @@ import com.persagy.bdtp.adm.dao.*;
 import com.persagy.bdtp.adm.datatx.ObjectMapper4Tx;
 import com.persagy.bdtp.adm.entity.*;
 import com.persagy.bdtp.adm.entity.db.*;
+import com.persagy.bdtp.adm.entity.db.AdmDefineProblemType;
 import com.persagy.bdtp.adm.service.*;
 import com.persagy.bdtp.adm.util.DataExtrasUtil;
 import com.persagy.dmp.basic.model.QueryCriteria;
@@ -161,6 +162,8 @@ public class SyncAppImpl implements ISyncApp {
 		List<AdmConfig> config = configService.queryCommonConfig(projectId);
 		List<AdmComponent> component = configService.queryComponent(projectId);
 		List<AdmContainerConfig> containerConfig = configService.queryContainerConfig(projectId);
+		// 下载问题类型
+		List<AdmDefineProblemType> admDefineProblemTypes = configService.queryDefineProblemTypes();
 
 		HashMap<String, Object> data = new HashMap<>();
 		data.put("m2dTypes", m2dTypes);
@@ -170,6 +173,7 @@ public class SyncAppImpl implements ISyncApp {
 		data.put("config", config);
 		data.put("component", component);
 		data.put("containerConfig", containerConfig);
+		data.put("problemTypeConfig",admDefineProblemTypes);
 
 		return data;
 	}

+ 6 - 6
adm-business/adm-server/src/main/resources/application-dev.yml

@@ -12,12 +12,12 @@ spring:
 #          username: root
 #          password: Bdtp@1qaz@WSX
 #          url: jdbc:mysql://cd-cdb-nboe1rje.sql.tencentcdb.com:61955/adm-poc?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
-  rabbitmq:
-    host: develop.ysbdtp.com
-    port: 32436
-    username: admin
-    password: bdtp123456
-    virtualHost: /test
+#  rabbitmq:
+#    host: develop.ysbdtp.com
+#    port: 32436
+#    username: admin
+#    password: bdtp123456
+#    virtualHost: /test
 persagy:
   common:
     file:

+ 56 - 51
adm-business/adm-server/src/main/resources/mybatis-generator/generatorConfig.xml

@@ -16,7 +16,7 @@
                         password="adm"/>
 
         <javaModelGenerator targetPackage="com.persagy.bdtp.adm.entity"
-                            targetProject="D:/IdeaProjects/adm/src/main/java">
+                            targetProject="D:\projects\digital-delivery\adm-business\adm-server\src\main\java">
             <property name="enableSubPackages" value="true"/>
             <property name="trimStrings" value="true"/>
         </javaModelGenerator>
@@ -31,57 +31,62 @@
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>-->
 
-        <table tableName="adm_rels_config" domainObjectName="AdmRelsConfig"
+        <table tableName="adm_define_problem_type" domainObjectName="AdmDefineProblemType"
                enableCountByExample="false" enableUpdateByExample="false"
                enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-            <!--<columnRenamingRule searchString="^D_"
-                                replaceString=""/>-->
-        </table>
-        <table tableName="adm_relation" domainObjectName="AdmRelation"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_problem_equip" domainObjectName="AdmProblemEquip"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_problem_arch" domainObjectName="AdmProblemArch"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_pipe_config" domainObjectName="AdmPipeConfig"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_m2d_equip" domainObjectName="AdmM2dEquip"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_job_space" domainObjectName="AdmJobSpace"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_infos_config" domainObjectName="AdmInfosConfig"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_file" domainObjectName="AdmFile"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
-        <table tableName="adm_config" domainObjectName="AdmConfig"
-               enableCountByExample="false" enableUpdateByExample="false"
-               enableDeleteByExample="false" enableSelectByExample="false"
-               selectByExampleQueryId="false">
-        </table>
+               selectByExampleQueryId="false"></table>
+
+<!--        <table tableName="adm_rels_config" domainObjectName="AdmRelsConfig"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--            &lt;!&ndash;<columnRenamingRule searchString="^D_"-->
+<!--                                replaceString=""/>&ndash;&gt;-->
+<!--        </table>-->
+<!--        <table tableName="adm_relation" domainObjectName="AdmRelation"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_problem_equip" domainObjectName="AdmProblemEquip"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_problem_arch" domainObjectName="AdmProblemArch"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_pipe_config" domainObjectName="AdmPipeConfig"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_m2d_equip" domainObjectName="AdmM2dEquip"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_job_space" domainObjectName="AdmJobSpace"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_infos_config" domainObjectName="AdmInfosConfig"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_file" domainObjectName="AdmFile"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
+<!--        <table tableName="adm_config" domainObjectName="AdmConfig"-->
+<!--               enableCountByExample="false" enableUpdateByExample="false"-->
+<!--               enableDeleteByExample="false" enableSelectByExample="false"-->
+<!--               selectByExampleQueryId="false">-->
+<!--        </table>-->
     </context>
 </generatorConfiguration>