MDM公用文件
This commit is contained in:
parent
905df77c02
commit
a664a96cfe
|
@ -21,6 +21,24 @@ public class MdmModuleSourceEntity extends BaseEntity {
|
||||||
/** 公司id */
|
/** 公司id */
|
||||||
private String companyId;
|
private String companyId;
|
||||||
private String pluginCode;//插件编码
|
private String pluginCode;//插件编码
|
||||||
|
private String appType;//应用类型
|
||||||
|
private String dbCode;//数据源编码
|
||||||
|
|
||||||
|
public String getAppType() {
|
||||||
|
return appType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppType(String appType) {
|
||||||
|
this.appType = appType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDbCode() {
|
||||||
|
return dbCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDbCode(String dbCode) {
|
||||||
|
this.dbCode = dbCode;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPluginCode() {
|
public String getPluginCode() {
|
||||||
return pluginCode;
|
return pluginCode;
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="appType" column="app_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dbCode" column="db_code" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!-- 查询的字段-->
|
<!-- 查询的字段-->
|
||||||
<sql id = "MdmModuleSourceEntity_Base_Column_List">
|
<sql id = "MdmModuleSourceEntity_Base_Column_List">
|
||||||
|
@ -138,10 +140,26 @@
|
||||||
|
|
||||||
<!-- 根据数据来源内类型是插件的应用类型做分组 -->
|
<!-- 根据数据来源内类型是插件的应用类型做分组 -->
|
||||||
<select id="queryMdmModuleSourceentityGroupByType" resultMap="get-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
|
<select id="queryMdmModuleSourceentityGroupByType" resultMap="get-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
|
||||||
select plugin_code,plugin_name,source_name,source_code
|
SELECT
|
||||||
from mdm_module_source source
|
plug.plugin_code,
|
||||||
left join sys_application_plugin plug on plug.id=source.source_code
|
plug.plugin_name,
|
||||||
where source_type='1' and source.sts='Y' and plug.sts='Y'
|
source.source_name,
|
||||||
|
source.source_code ,
|
||||||
|
application.app_type,
|
||||||
|
applicationdatabase.source_code as db_code
|
||||||
|
FROM
|
||||||
|
mdm_module_source source
|
||||||
|
LEFT JOIN sys_application_plugin plug ON plug.id = source.source_code
|
||||||
|
LEFT JOIN sys_application application ON source.source_name = application.id
|
||||||
|
left join sys_application_database applicationdatabase on applicationdatabase.app_id = source.source_name
|
||||||
|
WHERE
|
||||||
|
source.source_type = '1'
|
||||||
|
AND source.sts = 'Y'
|
||||||
|
AND plug.sts = 'Y'
|
||||||
|
and application.sts = 'Y'
|
||||||
|
AND applicationdatabase.sts = 'Y'
|
||||||
|
AND applicationdatabase.db_status = '1'
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.hzya.frame.sysnew.comparison.masterData.dao;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||||
import com.hzya.frame.sysnew.comparison.entity.ComparisonEntity;
|
import com.hzya.frame.sysnew.comparison.entity.ComparisonEntity;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -20,4 +21,5 @@ public interface IMasterDataDao extends IBaseService<ComparisonEntity, String> {
|
||||||
* **/
|
* **/
|
||||||
@DS("swu8c")
|
@DS("swu8c")
|
||||||
List<HashMap<String, Object>> queryArchives(String str);
|
List<HashMap<String, Object>> queryArchives(String str);
|
||||||
|
List<HashMap<String, Object>> queryArchivesByDataSource(String str , MdmModuleSourceEntity entity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.hzya.frame.sysnew.comparison.masterData.dao.impl;
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
import com.hzya.frame.execsql.service.IExecSqlService;
|
import com.hzya.frame.execsql.service.IExecSqlService;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||||
import com.hzya.frame.sysnew.comparison.entity.ComparisonEntity;
|
import com.hzya.frame.sysnew.comparison.entity.ComparisonEntity;
|
||||||
import com.hzya.frame.sysnew.comparison.masterData.dao.IMasterDataDao;
|
import com.hzya.frame.sysnew.comparison.masterData.dao.IMasterDataDao;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -28,4 +29,15 @@ public class MasterDataDaoImpl extends BaseService<ComparisonEntity, String> imp
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<HashMap<String, Object>> queryArchivesByDataSource(String str, MdmModuleSourceEntity entity) {
|
||||||
|
try {
|
||||||
|
List<HashMap<String, Object>> hashMaps = execSqlService.execSelectSql(str, "");
|
||||||
|
return hashMaps;
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("U8C主数据档案用户档案没有需要同步中台的数据");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue