主数据修改
This commit is contained in:
parent
b429c40153
commit
8b78ebd555
|
@ -0,0 +1,31 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDistributeDto {
|
||||
|
||||
|
||||
//主数据编码
|
||||
private Long mdmCode;
|
||||
|
||||
private List<MdmModuleDistributeEntity> mdmModuleDistributeEntities;
|
||||
|
||||
public List<MdmModuleDistributeEntity> getMdmModuleDistributeEntities() {
|
||||
return mdmModuleDistributeEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleDistributeEntities(List<MdmModuleDistributeEntity> mdmModuleDistributeEntities) {
|
||||
this.mdmModuleDistributeEntities = mdmModuleDistributeEntities;
|
||||
}
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmSourceDto {
|
||||
|
||||
|
||||
//主数据编码
|
||||
private Long mdmCode;
|
||||
|
||||
private List<MdmModuleSourceEntity> mdmModuleSourceEntities;
|
||||
|
||||
|
||||
public List<MdmModuleSourceEntity> getMdmModuleSourceEntities() {
|
||||
return mdmModuleSourceEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleSourceEntities(List<MdmModuleSourceEntity> mdmModuleSourceEntities) {
|
||||
this.mdmModuleSourceEntities = mdmModuleSourceEntities;
|
||||
}
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmViewFiledVo {
|
||||
|
||||
//字段id
|
||||
private String id;
|
||||
//表名
|
||||
private String dbName;
|
||||
//类型 1、主表 2、明细
|
||||
private String dbType;
|
||||
//主数据模版ID
|
||||
private String mdmId;
|
||||
//模版数据库id
|
||||
private String dbId;
|
||||
//中文名
|
||||
private String chName;
|
||||
//英文名
|
||||
private String enName;
|
||||
//排序
|
||||
private Integer sorts;
|
||||
/**
|
||||
* 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME
|
||||
*/
|
||||
private String filedType;
|
||||
//字段规则
|
||||
private List<MdmModuleDbFiledsRuleEntity> ruleList;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDbName() {
|
||||
return dbName;
|
||||
}
|
||||
|
||||
public void setDbName(String dbName) {
|
||||
this.dbName = dbName;
|
||||
}
|
||||
|
||||
public String getDbType() {
|
||||
return dbType;
|
||||
}
|
||||
|
||||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
|
||||
public String getChName() {
|
||||
return chName;
|
||||
}
|
||||
|
||||
public void setChName(String chName) {
|
||||
this.chName = chName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public List<MdmModuleDbFiledsRuleEntity> getRuleList() {
|
||||
return ruleList;
|
||||
}
|
||||
|
||||
public void setRuleList(List<MdmModuleDbFiledsRuleEntity> ruleList) {
|
||||
this.ruleList = ruleList;
|
||||
}
|
||||
|
||||
public Integer getSorts() {
|
||||
return sorts;
|
||||
}
|
||||
|
||||
public void setSorts(Integer sorts) {
|
||||
this.sorts = sorts;
|
||||
}
|
||||
|
||||
public String getFiledType() {
|
||||
return filedType;
|
||||
}
|
||||
|
||||
public void setFiledType(String filedType) {
|
||||
this.filedType = filedType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class MdmViewVo {
|
||||
|
||||
private String id;
|
||||
//模版信息
|
||||
private MdmModuleEntity mdmModuleEntity;
|
||||
//模版展示信息
|
||||
private MdmModuleViewEntity mdmModuleViewEntity;
|
||||
//查询条件
|
||||
private List<MdmViewFiledVo> queryList;
|
||||
//列表
|
||||
private List<MdmViewFiledVo> listList;
|
||||
|
||||
public List<MdmViewFiledVo> getQueryList() {
|
||||
return queryList;
|
||||
}
|
||||
|
||||
public void setQueryList(List<MdmViewFiledVo> queryList) {
|
||||
this.queryList = queryList;
|
||||
}
|
||||
|
||||
public List<MdmViewFiledVo> getListList() {
|
||||
return listList;
|
||||
}
|
||||
|
||||
public void setListList(List<MdmViewFiledVo> listList) {
|
||||
this.listList = listList;
|
||||
}
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public MdmModuleEntity getMdmModuleEntity() {
|
||||
return mdmModuleEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleEntity(MdmModuleEntity mdmModuleEntity) {
|
||||
this.mdmModuleEntity = mdmModuleEntity;
|
||||
}
|
||||
|
||||
public MdmModuleViewEntity getMdmModuleViewEntity() {
|
||||
return mdmModuleViewEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
|
||||
this.mdmModuleViewEntity = mdmModuleViewEntity;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDistribute.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 主数据功能应用分发表(MdmModuleDistribute)实体类
|
||||
|
@ -24,7 +27,7 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
private String enabledState;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
private List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities;
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
@ -82,5 +85,12 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public List<MdmModuleDistributeDetailEntity> getMdmModuleDistributeDetailEntities() {
|
||||
return mdmModuleDistributeDetailEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleDistributeDetailEntities(List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities) {
|
||||
this.mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailEntities;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.mdm.mdmModuleOptionLog.dao;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 主数据模版(mdm_module_option_log: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 16:10:31
|
||||
*/
|
||||
public interface IMdmModuleOptionLogDao extends IBaseDao<MdmModuleOptionLogEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.mdm.mdmModuleOptionLog.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleOptionLog.dao.IMdmModuleOptionLogDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 主数据模版(MdmModuleOptionLog)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 16:10:31
|
||||
*/
|
||||
@Repository(value = "MdmModuleOptionLogDaoImpl")
|
||||
public class MdmModuleOptionLogDaoImpl extends MybatisGenericDao<MdmModuleOptionLogEntity, String> implements IMdmModuleOptionLogDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.hzya.frame.mdm.mdmModuleOptionLog.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 主数据模版(MdmModuleOptionLog)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 16:10:32
|
||||
*/
|
||||
public class MdmModuleOptionLogEntity extends BaseEntity {
|
||||
//主数据表名
|
||||
private String tableName;
|
||||
//主数据编码
|
||||
private Long mdmCode;
|
||||
/** 主表id */
|
||||
private String formmainId;
|
||||
/** 来源名称 */
|
||||
private String sourceName;
|
||||
/** 编码 */
|
||||
private String code;
|
||||
/** source_data */
|
||||
private String sourceData;
|
||||
/** 操作类型 */
|
||||
private String optionType;
|
||||
/** 操作人 */
|
||||
private String optionName;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getFormmainId() {
|
||||
return formmainId;
|
||||
}
|
||||
|
||||
public void setFormmainId(String formmainId) {
|
||||
this.formmainId = formmainId;
|
||||
}
|
||||
|
||||
public String getSourceName() {
|
||||
return sourceName;
|
||||
}
|
||||
|
||||
public void setSourceName(String sourceName) {
|
||||
this.sourceName = sourceName;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getSourceData() {
|
||||
return sourceData;
|
||||
}
|
||||
|
||||
public void setSourceData(String sourceData) {
|
||||
this.sourceData = sourceData;
|
||||
}
|
||||
|
||||
public String getOptionType() {
|
||||
return optionType;
|
||||
}
|
||||
|
||||
public void setOptionType(String optionType) {
|
||||
this.optionType = optionType;
|
||||
}
|
||||
|
||||
public String getOptionName() {
|
||||
return optionName;
|
||||
}
|
||||
|
||||
public void setOptionName(String optionName) {
|
||||
this.optionName = optionName;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,272 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleOptionLog.dao.impl.MdmModuleOptionLogDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleOptionLogEntity-result" type="com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="formmainId" column="formmain_id" jdbcType="VARCHAR"/>
|
||||
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="sourceData" column="source_data" jdbcType="VARCHAR"/>
|
||||
<result property="optionType" column="option_type" jdbcType="VARCHAR"/>
|
||||
<result property="optionName" column="option_name" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmModuleOptionLogEntity_Base_Column_List">
|
||||
id
|
||||
,formmain_id
|
||||
,source_name
|
||||
,code
|
||||
,source_data
|
||||
,option_type
|
||||
,option_name
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<select id="entity_get" resultMap="get-MdmModuleOptionLogEntity-result">
|
||||
select
|
||||
<include refid="MdmModuleOptionLogEntity_Base_Column_List" />
|
||||
from ${tableName} where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleOptionLogEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity">
|
||||
select
|
||||
<include refid="MdmModuleOptionLogEntity_Base_Column_List" />
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity">
|
||||
select count(1) from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleOptionLogEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity">
|
||||
select
|
||||
<include refid="MdmModuleOptionLogEntity_Base_Column_List" />
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id like concat('%',#{formmainId},'%') </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data like concat('%',#{sourceData},'%') </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type like concat('%',#{optionType},'%') </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name like concat('%',#{optionName},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleOptionLogentity_list_or" resultMap="get-MdmModuleOptionLogEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity">
|
||||
select
|
||||
<include refid="MdmModuleOptionLogEntity_Base_Column_List" />
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> or formmain_id = #{formmainId} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> or source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> or option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> or option_name = #{optionName} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity" >
|
||||
insert into ${tableName}(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id , </if>
|
||||
<if test="sourceName != null and sourceName != ''"> source_name , </if>
|
||||
<if test="code != null and code != ''"> code , </if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data , </if>
|
||||
<if test="optionType != null and optionType != ''"> option_type , </if>
|
||||
<if test="optionName != null and optionName != ''"> option_name , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="formmainId != null and formmainId != ''"> #{formmainId} ,</if>
|
||||
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
|
||||
<if test="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="sourceData != null and sourceData != ''"> #{sourceData} ,</if>
|
||||
<if test="optionType != null and optionType != ''"> #{optionType} ,</if>
|
||||
<if test="optionName != null and optionName != ''"> #{optionName} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ${tableName} a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into ${tableName}(formmain_id, source_name, code, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.sourceName},#{entity.code},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into ${tableName}(formmain_id, source_name, code, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.sourceName},#{entity.code},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
formmain_id = values(formmain_id),
|
||||
source_name = values(source_name),
|
||||
code = values(code),
|
||||
source_data = values(source_data),
|
||||
option_type = values(option_type),
|
||||
option_name = values(option_name),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity" >
|
||||
update ${tableName} set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id = #{formmainId},</if>
|
||||
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data = #{sourceData},</if>
|
||||
<if test="optionType != null and optionType != ''"> option_type = #{optionType},</if>
|
||||
<if test="optionName != null and optionName != ''"> option_name = #{optionName},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity" >
|
||||
update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity" >
|
||||
update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from ${tableName} where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSendLog.dao;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 主数据模版(mdm_module_send_log: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 16:11:09
|
||||
*/
|
||||
public interface IMdmModuleSendLogDao extends IBaseDao<MdmModuleSendLogEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSendLog.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 主数据模版(MdmModuleSendLog)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 16:11:09
|
||||
*/
|
||||
@Repository(value = "MdmModuleSendLogDaoImpl")
|
||||
public class MdmModuleSendLogDaoImpl extends MybatisGenericDao<MdmModuleSendLogEntity, String> implements IMdmModuleSendLogDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSendLog.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 主数据模版(MdmModuleSendLog)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 16:11:10
|
||||
*/
|
||||
public class MdmModuleSendLogEntity extends BaseEntity {
|
||||
//主数据表名
|
||||
private String tableName;
|
||||
//主数据编码
|
||||
private Long mdmCode;
|
||||
/** 主表id */
|
||||
private String formmainId;
|
||||
/** 目标应用 */
|
||||
private String targetApp;
|
||||
/** 目标api */
|
||||
private String targetApi;
|
||||
/** 源数据 */
|
||||
private String sourceData;
|
||||
/** 操作类型 */
|
||||
private String optionType;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getFormmainId() {
|
||||
return formmainId;
|
||||
}
|
||||
|
||||
public void setFormmainId(String formmainId) {
|
||||
this.formmainId = formmainId;
|
||||
}
|
||||
|
||||
public String getTargetApp() {
|
||||
return targetApp;
|
||||
}
|
||||
|
||||
public void setTargetApp(String targetApp) {
|
||||
this.targetApp = targetApp;
|
||||
}
|
||||
|
||||
public String getTargetApi() {
|
||||
return targetApi;
|
||||
}
|
||||
|
||||
public void setTargetApi(String targetApi) {
|
||||
this.targetApi = targetApi;
|
||||
}
|
||||
|
||||
public String getSourceData() {
|
||||
return sourceData;
|
||||
}
|
||||
|
||||
public void setSourceData(String sourceData) {
|
||||
this.sourceData = sourceData;
|
||||
}
|
||||
|
||||
public String getOptionType() {
|
||||
return optionType;
|
||||
}
|
||||
|
||||
public void setOptionType(String optionType) {
|
||||
this.optionType = optionType;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,262 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleSendLog.dao.impl.MdmModuleSendLogDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleSendLogEntity-result" type="com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="formmainId" column="formmain_id" jdbcType="VARCHAR"/>
|
||||
<result property="targetApp" column="target_app" jdbcType="VARCHAR"/>
|
||||
<result property="targetApi" column="target_api" jdbcType="VARCHAR"/>
|
||||
<result property="sourceData" column="source_data" jdbcType="VARCHAR"/>
|
||||
<result property="optionType" column="option_type" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmModuleSendLogEntity_Base_Column_List">
|
||||
id
|
||||
,formmain_id
|
||||
,target_app
|
||||
,target_api
|
||||
,source_data
|
||||
,option_type
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-MdmModuleSendLogEntity-result">
|
||||
select
|
||||
<include refid="MdmModuleSendLogEntity_Base_Column_List" />
|
||||
from ${tableName} where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleSendLogEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity">
|
||||
select
|
||||
<include refid="MdmModuleSendLogEntity_Base_Column_List" />
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="targetApp != null and targetApp != ''"> and target_app = #{targetApp} </if>
|
||||
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity">
|
||||
select count(1) from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="targetApp != null and targetApp != ''"> and target_app = #{targetApp} </if>
|
||||
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleSendLogEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity">
|
||||
select
|
||||
<include refid="MdmModuleSendLogEntity_Base_Column_List" />
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id like concat('%',#{formmainId},'%') </if>
|
||||
<if test="targetApp != null and targetApp != ''"> and target_app like concat('%',#{targetApp},'%') </if>
|
||||
<if test="targetApi != null and targetApi != ''"> and target_api like concat('%',#{targetApi},'%') </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data like concat('%',#{sourceData},'%') </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type like concat('%',#{optionType},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleSendLogentity_list_or" resultMap="get-MdmModuleSendLogEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity">
|
||||
select
|
||||
<include refid="MdmModuleSendLogEntity_Base_Column_List" />
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> or formmain_id = #{formmainId} </if>
|
||||
<if test="targetApp != null and targetApp != ''"> or target_app = #{targetApp} </if>
|
||||
<if test="targetApi != null and targetApi != ''"> or target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> or source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> or option_type = #{optionType} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity" >
|
||||
insert into ${tableName}(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id , </if>
|
||||
<if test="targetApp != null and targetApp != ''"> target_app , </if>
|
||||
<if test="targetApi != null and targetApi != ''"> target_api , </if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data , </if>
|
||||
<if test="optionType != null and optionType != ''"> option_type , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="formmainId != null and formmainId != ''"> #{formmainId} ,</if>
|
||||
<if test="targetApp != null and targetApp != ''"> #{targetApp} ,</if>
|
||||
<if test="targetApi != null and targetApi != ''"> #{targetApi} ,</if>
|
||||
<if test="sourceData != null and sourceData != ''"> #{sourceData} ,</if>
|
||||
<if test="optionType != null and optionType != ''"> #{optionType} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ${tableName} a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
formmain_id = values(formmain_id),
|
||||
target_app = values(target_app),
|
||||
target_api = values(target_api),
|
||||
source_data = values(source_data),
|
||||
option_type = values(option_type),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity" >
|
||||
update ${tableName} set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id = #{formmainId},</if>
|
||||
<if test="targetApp != null and targetApp != ''"> target_app = #{targetApp},</if>
|
||||
<if test="targetApi != null and targetApi != ''"> target_api = #{targetApi},</if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data = #{sourceData},</if>
|
||||
<if test="optionType != null and optionType != ''"> option_type = #{optionType},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity" >
|
||||
update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity" >
|
||||
update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="targetApp != null and targetApp != ''"> and target_app = #{targetApp} </if>
|
||||
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from ${tableName} where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity" >
|
||||
insert into mdm_module_source(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
|
@ -172,7 +172,7 @@
|
|||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_module_source(mdm_id, source_type, source_name, source_code, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
|
@ -180,7 +180,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into mdm_module_source(mdm_id, source_type, source_name, source_code, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
|
|
|
@ -135,32 +135,103 @@ public interface IMdmService {
|
|||
//JsonResultEntity doSaveMdmModuleRule(JSONObject jsonObject);
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @param jsonObject
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 主数据设置查询分发设置
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//JsonResultEntity queryMdmModuleDistribute(JSONObject jsonObject);
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置查询分发设置
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity queryMdmModuleDistribute(JSONObject jsonObject);
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置保存分发设置
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity doSaveMdmModuleDistribute(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置查询数据来源
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity queryMdmModuleSource(JSONObject jsonObject);
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置保存数据来源
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity doSaveMdmModuleSource(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 查询下发日志
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity querySendEntityPage(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 获取下发日志
|
||||
* @Date 2:36 下午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity getSendEntity(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 删除下发日志
|
||||
* @Date 2:37 下午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity deleteSendEntity(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 查询操作日志
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity queryOptionEntityPage(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 获取操作日志
|
||||
* @Date 2:36 下午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity getOptionEntity(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 删除操作日志
|
||||
* @Date 2:37 下午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity deleteOptionEntity(JSONObject jsonObject);
|
||||
//
|
||||
///**
|
||||
// * @param jsonObject
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 主数据设置保存分发设置
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//JsonResultEntity doSaveMdmModuleDistribute(JSONObject jsonObject);
|
||||
//
|
||||
///**
|
||||
// * @param jsonObject
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 主数据列表显示 树、查询条件、列表字段、按钮
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//JsonResultEntity queryMdmShow(JSONObject jsonObject);
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据列表显示 树、查询条件、列表字段、按钮
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity queryMdmShow(JSONObject jsonObject);
|
||||
//
|
||||
///**
|
||||
// * @param jsonObject
|
||||
|
|
|
@ -5,6 +5,9 @@ import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
|||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
|
||||
|
@ -57,4 +60,14 @@ public interface IMdmServiceCache {
|
|||
void saveMdmModuleViewDetail(String id, List<MdmModuleViewDetailEntity> mdmModuleViewDetailEntities);
|
||||
|
||||
void saveMdmModuleViewButton(String id, List<MdmModuleViewButtonEntity> mdmModuleViewButtonEntities);
|
||||
|
||||
List<MdmModuleDistributeEntity> queryMdmModuleDistribute(String id,MdmModuleDistributeEntity mdmModuleDistributeEntity);
|
||||
|
||||
void saveMdmModuleDistribute(String id, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities);
|
||||
|
||||
List<MdmModuleSourceEntity> queryMdmModuleSource(MdmModuleSourceEntity mdmModuleSourceEntity);
|
||||
|
||||
void saveMdmModuleSource(String id, List<MdmModuleSourceEntity> mdmModuleSourceEntities);
|
||||
|
||||
List<MdmModuleDistributeDetailEntity> queryMdmModuleDistributeDetail(MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,11 @@ import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
|||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.dao.IMdmModuleDbFiledsRuleDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.dao.IMdmModuleSourceDao;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.dao.IMdmModuleViewDao;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.dao.IMdmModuleViewButtonDao;
|
||||
|
@ -25,6 +29,7 @@ import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
|
|||
import com.hzya.frame.mdm.service.IMdmService;
|
||||
import com.hzya.frame.mdm.service.IMdmServiceCache;
|
||||
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -34,6 +39,7 @@ import org.springframework.cache.annotation.Cacheable;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -57,6 +63,8 @@ public class MdmServiceCache implements IMdmServiceCache {
|
|||
@Resource
|
||||
private IMdmModuleDistributeDetailDao mdmModuleDistributeDetailDao;
|
||||
@Resource
|
||||
private IMdmModuleSourceDao mdmModuleSourceDao;
|
||||
@Resource
|
||||
private IMdmModuleViewDao mdmModuleViewDao;
|
||||
@Resource
|
||||
private IMdmModuleViewButtonDao mdmModuleViewButtonDao;
|
||||
|
@ -229,5 +237,110 @@ public class MdmServiceCache implements IMdmServiceCache {
|
|||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@Cacheable(cacheNames="mdmModuleDistribute",key = "#mdmId")
|
||||
public List<MdmModuleDistributeEntity> queryMdmModuleDistribute(String mdmId,MdmModuleDistributeEntity mdmModuleDistributeEntity) {
|
||||
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(mdmModuleDistributeEntity);
|
||||
//查询模块下的应用列表
|
||||
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity();
|
||||
mdmModuleDistributeDetailEntity.setSts("Y");
|
||||
mdmModuleDistributeDetailEntity.setMdmId(mdmId);
|
||||
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
|
||||
|
||||
if(mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0){
|
||||
for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
||||
List<MdmModuleDistributeDetailEntity> moduleDistributeDetailEntities = new ArrayList<>();
|
||||
if(mdmModuleDistributeDetailEntities != null && mdmModuleDistributeDetailEntities.size() > 0){
|
||||
for (int i1 = 0; i1 < mdmModuleDistributeDetailEntities.size(); i1++) {
|
||||
if(mdmModuleDistributeEntities.get(i).getId().equals(mdmModuleDistributeDetailEntities.get(i1).getDistributeId())){
|
||||
moduleDistributeDetailEntities.add(mdmModuleDistributeDetailEntities.get(i1));
|
||||
}
|
||||
}
|
||||
}
|
||||
mdmModuleDistributeEntities.get(i).setMdmModuleDistributeDetailEntities(moduleDistributeDetailEntities);
|
||||
}
|
||||
}
|
||||
return mdmModuleDistributeEntities;
|
||||
}
|
||||
@Override
|
||||
@Cacheable(cacheNames="mdmModuleDistributeDetail",key = "#mdmId")
|
||||
public List<MdmModuleDistributeDetailEntity> queryMdmModuleDistributeDetail(MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity){
|
||||
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
|
||||
return mdmModuleDistributeDetailEntities;
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames="mdmModuleDistribute",key = "#mdmId")
|
||||
public void saveMdmModuleDistribute(String mdmId, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities) {
|
||||
//先删除
|
||||
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||
mdmModuleDistributeEntity.setMdmId(mdmId);
|
||||
mdmModuleDistributeEntity.setUpdate();
|
||||
mdmModuleDistributeDao.logicRemoveMultiCondition(mdmModuleDistributeEntity);
|
||||
//保存主数据
|
||||
if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0) {
|
||||
for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
||||
MdmModuleDistributeEntity moduleDistributeEntity = mdmModuleDistributeEntities.get(i);
|
||||
moduleDistributeEntity.setMdmId(mdmId);
|
||||
if (moduleDistributeEntity.getId() != null && !"".equals(moduleDistributeEntity.getId())) {
|
||||
moduleDistributeEntity.setUpdate();
|
||||
//修改
|
||||
mdmModuleDistributeDao.update(moduleDistributeEntity);
|
||||
} else {
|
||||
//新增
|
||||
moduleDistributeEntity.setCreate();
|
||||
mdmModuleDistributeDao.save(moduleDistributeEntity);
|
||||
}
|
||||
if(moduleDistributeEntity.getMdmModuleDistributeDetailEntities() != null && moduleDistributeEntity.getMdmModuleDistributeDetailEntities().size() > 0){
|
||||
for (int i1 = 0; i1 < moduleDistributeEntity.getMdmModuleDistributeDetailEntities().size(); i1++) {
|
||||
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = moduleDistributeEntity.getMdmModuleDistributeDetailEntities().get(i1);
|
||||
mdmModuleDistributeDetailEntity.setMdmId(mdmId);
|
||||
mdmModuleDistributeDetailEntity.setDistributeId(moduleDistributeEntity.getId());
|
||||
if (mdmModuleDistributeDetailEntity.getId() != null && !"".equals(mdmModuleDistributeDetailEntity.getId())) {
|
||||
mdmModuleDistributeDetailEntity.setUpdate();
|
||||
//修改
|
||||
mdmModuleDistributeDetailDao.update(mdmModuleDistributeDetailEntity);
|
||||
} else {
|
||||
//新增
|
||||
mdmModuleDistributeDetailEntity.setCreate();
|
||||
mdmModuleDistributeDetailDao.save(mdmModuleDistributeDetailEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Cacheable(cacheNames="mdmModuleSource",key = "#mdmId")
|
||||
public List<MdmModuleSourceEntity> queryMdmModuleSource(MdmModuleSourceEntity mdmModuleSourceEntity) {
|
||||
List<MdmModuleSourceEntity> mdmModuleSourceEntities = mdmModuleSourceDao.queryBase(mdmModuleSourceEntity);
|
||||
return mdmModuleSourceEntities;
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames="mdmModuleSource",key = "#mdmId")
|
||||
public void saveMdmModuleSource(String mdmId, List<MdmModuleSourceEntity> mdmModuleSourceEntities) {
|
||||
//先删除
|
||||
MdmModuleSourceEntity mdmModuleSourceEntity = new MdmModuleSourceEntity();
|
||||
mdmModuleSourceEntity.setMdmId(mdmId);
|
||||
mdmModuleSourceEntity.setUpdate();
|
||||
mdmModuleSourceDao.logicRemoveMultiCondition(mdmModuleSourceEntity);
|
||||
//保存主数据
|
||||
if (mdmModuleSourceEntities != null && mdmModuleSourceEntities.size() > 0) {
|
||||
for (int i = 0; i < mdmModuleSourceEntities.size(); i++) {
|
||||
MdmModuleSourceEntity mdmModuleSourceEntity1 = mdmModuleSourceEntities.get(i);
|
||||
mdmModuleSourceEntity1.setMdmId(mdmId);
|
||||
if (mdmModuleSourceEntity1.getId() != null && !"".equals(mdmModuleSourceEntity1.getId())) {
|
||||
mdmModuleSourceEntity1.setUpdate();
|
||||
//修改
|
||||
mdmModuleSourceDao.update(mdmModuleSourceEntity1);
|
||||
} else {
|
||||
//新增
|
||||
mdmModuleSourceEntity1.setCreate();
|
||||
mdmModuleSourceDao.save(mdmModuleSourceEntity1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
package com.hzya.frame.mdm.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.mdm.entity.DbFiledsDto;
|
||||
import com.hzya.frame.mdm.entity.MdmDbFiledVo;
|
||||
import com.hzya.frame.mdm.entity.MdmDbVo;
|
||||
import com.hzya.frame.mdm.entity.MdmDistributeDto;
|
||||
import com.hzya.frame.mdm.entity.MdmDto;
|
||||
import com.hzya.frame.mdm.entity.MdmModuleViewDto;
|
||||
import com.hzya.frame.mdm.entity.MdmModuleViewVo;
|
||||
import com.hzya.frame.mdm.entity.MdmSourceDto;
|
||||
import com.hzya.frame.mdm.entity.MdmViewFiledVo;
|
||||
import com.hzya.frame.mdm.entity.MdmViewVo;
|
||||
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
|
||||
|
@ -23,7 +25,11 @@ import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEnti
|
|||
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleOptionLog.dao.IMdmModuleOptionLogDao;
|
||||
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
||||
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.dao.IMdmModuleViewDao;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.dao.IMdmModuleViewButtonDao;
|
||||
|
@ -34,19 +40,15 @@ import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
|
|||
import com.hzya.frame.mdm.service.IMdmService;
|
||||
|
||||
import com.hzya.frame.mdm.service.IMdmServiceCache;
|
||||
import com.hzya.frame.sys.entity.FormmainDeleteDto;
|
||||
import com.hzya.frame.sys.entity.ModuleDto;
|
||||
import com.hzya.frame.sys.module.entity.Module;
|
||||
import com.hzya.frame.sys.roleModule.entity.RoleModule;
|
||||
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
||||
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
||||
import com.hzya.frame.sysnew.menuConfig.dao.ISysMenuConfigDao;
|
||||
import com.hzya.frame.sysnew.menuConfig.entity.SysMenuConfigEntity;
|
||||
import com.hzya.frame.sysnew.popedomOperate.dao.ISysPopedomOperateDao;
|
||||
import com.hzya.frame.sysnew.popedomOperate.entity.SysPopedomOperateEntity;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
|
||||
import com.hzya.frame.sysnew.userCompany.entity.SysUserCompanyEntity;
|
||||
import com.hzya.frame.sysnew.userRoles.entity.SysUserRolesEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -54,14 +56,10 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -74,6 +72,10 @@ public class MdmServiceImpl implements IMdmService {
|
|||
@Resource
|
||||
private IMdmModuleDao mdmModuleDao;
|
||||
@Resource
|
||||
private IMdmModuleSendLogDao mdmModuleSendLogDao;
|
||||
@Resource
|
||||
private IMdmModuleOptionLogDao mdmModuleOptionLogDao;
|
||||
@Resource
|
||||
private IMdmServiceCache mdmServiceCache;
|
||||
@Resource
|
||||
private ISysMenuConfigDao sysMenuConfigDao;
|
||||
|
@ -1515,6 +1517,366 @@ public class MdmServiceImpl implements IMdmService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置查询分发设置
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryMdmModuleDistribute(JSONObject object) {
|
||||
MdmDto entity = getData("jsonStr", object, MdmDto.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//查询模块下的应用列表
|
||||
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||
mdmModuleDistributeEntity.setSts("Y");
|
||||
mdmModuleDistributeEntity.setMdmId(mdmModuleEntity.getId());
|
||||
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmServiceCache.queryMdmModuleDistribute(mdmModuleEntity.getId(),mdmModuleDistributeEntity);
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", mdmModuleDistributeEntities);
|
||||
}
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置保存分发设置
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity doSaveMdmModuleDistribute(JSONObject object) {
|
||||
MdmDistributeDto entity = getData("jsonStr", object, MdmDistributeDto.class);
|
||||
//判断是否有数据
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
mdmServiceCache.saveMdmModuleDistribute(mdmModuleEntity.getId(),entity.getMdmModuleDistributeEntities());
|
||||
return BaseResult.getSuccessMessageEntity("保存发布设置成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置查询数据来源
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryMdmModuleSource(JSONObject object) {
|
||||
MdmDto entity = getData("jsonStr", object, MdmDto.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//查询模块下的应用列表
|
||||
MdmModuleSourceEntity mdmModuleSourceEntity = new MdmModuleSourceEntity();
|
||||
mdmModuleSourceEntity.setSts("Y");
|
||||
mdmModuleSourceEntity.setMdmId(mdmModuleEntity.getId());
|
||||
List<MdmModuleSourceEntity> mdmModuleSourceEntities = mdmServiceCache.queryMdmModuleSource(mdmModuleSourceEntity);
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", mdmModuleSourceEntities);
|
||||
}
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据设置保存数据来源
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity doSaveMdmModuleSource(JSONObject object) {
|
||||
MdmSourceDto entity = getData("jsonStr", object, MdmSourceDto.class);
|
||||
//判断是否有数据
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
mdmServiceCache.saveMdmModuleSource(mdmModuleEntity.getId(),entity.getMdmModuleSourceEntities());
|
||||
return BaseResult.getSuccessMessageEntity("保存发布设置成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 查询下发日志
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity querySendEntityPage(JSONObject jsonObject) {
|
||||
MdmModuleSendLogEntity entity = getData("jsonStr", jsonObject, MdmModuleSendLogEntity.class);
|
||||
//判断分页
|
||||
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
|
||||
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if(mdmModuleDbEntities != null && mdmModuleDbEntities.size() > 0 ){
|
||||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
|
||||
entity.setTableName(mdmModuleDbEntities.get(i).getDbName()+"_send_log");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("请先设置数据源");
|
||||
}
|
||||
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
|
||||
List<MdmModuleSendLogEntity> list = mdmModuleSendLogDao.queryByLike(entity);
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 获取下发日志
|
||||
* @Date 2:36 下午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity getSendEntity(JSONObject jsonObject) {
|
||||
MdmModuleSendLogEntity entity = getData("jsonStr", jsonObject, MdmModuleSendLogEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if(mdmModuleDbEntities != null && mdmModuleDbEntities.size() > 0 ){
|
||||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
|
||||
entity.setTableName(mdmModuleDbEntities.get(i).getDbName()+"_send_log");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("请先设置数据源");
|
||||
}
|
||||
entity = mdmModuleSendLogDao.get(entity.getId());
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("获取日志失败");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("获取日志成功", entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 删除下发日志
|
||||
* @Date 2:37 下午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity deleteSendEntity(JSONObject jsonObject) {
|
||||
MdmModuleSendLogEntity entity = getData("jsonStr", jsonObject, MdmModuleSendLogEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if(mdmModuleDbEntities != null && mdmModuleDbEntities.size() > 0 ){
|
||||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
|
||||
entity.setTableName(mdmModuleDbEntities.get(i).getDbName()+"_send_log");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("请先设置数据源");
|
||||
}
|
||||
entity.setUpdate();
|
||||
mdmModuleSendLogDao.logicRemove(entity);
|
||||
return BaseResult.getSuccessMessageEntity("删除日志成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 查询操作日志
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryOptionEntityPage(JSONObject jsonObject) {
|
||||
MdmModuleOptionLogEntity entity = getData("jsonStr", jsonObject, MdmModuleOptionLogEntity.class);
|
||||
//判断分页
|
||||
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
|
||||
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if(mdmModuleDbEntities != null && mdmModuleDbEntities.size() > 0 ){
|
||||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
|
||||
entity.setTableName(mdmModuleDbEntities.get(i).getDbName()+"_send_log");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("请先设置数据源");
|
||||
}
|
||||
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
|
||||
List<MdmModuleOptionLogEntity> list = mdmModuleOptionLogDao.queryByLike(entity);
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 获取操作日志
|
||||
* @Date 2:36 下午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity getOptionEntity(JSONObject jsonObject) {
|
||||
MdmModuleOptionLogEntity entity = getData("jsonStr", jsonObject, MdmModuleOptionLogEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if(mdmModuleDbEntities != null && mdmModuleDbEntities.size() > 0 ){
|
||||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
|
||||
entity.setTableName(mdmModuleDbEntities.get(i).getDbName()+"_send_log");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("请先设置数据源");
|
||||
}
|
||||
entity = mdmModuleOptionLogDao.get(entity.getId());
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("获取日志失败");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("获取日志成功", entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 删除操作日志
|
||||
* @Date 2:37 下午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity deleteOptionEntity(JSONObject jsonObject) {
|
||||
MdmModuleOptionLogEntity entity = getData("jsonStr", jsonObject, MdmModuleOptionLogEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if(mdmModuleDbEntities != null && mdmModuleDbEntities.size() > 0 ){
|
||||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
|
||||
entity.setTableName(mdmModuleDbEntities.get(i).getDbName()+"_send_log");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("请先设置数据源");
|
||||
}
|
||||
entity.setUpdate();
|
||||
mdmModuleOptionLogDao.logicRemove(entity);
|
||||
return BaseResult.getSuccessMessageEntity("删除日志成功");
|
||||
}
|
||||
///**
|
||||
// * @param object
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
|
@ -2066,266 +2428,83 @@ public class MdmServiceImpl implements IMdmService {
|
|||
// return BaseResult.getSuccessMessageEntity("保存成功");
|
||||
//}
|
||||
//
|
||||
///**
|
||||
// * @param object
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 主数据设置查询分发设置
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//@Override
|
||||
//public JsonResultEntity queryMdmModuleDistribute(JSONObject object) {
|
||||
// MdmDto entity = getData("jsonStr", object, MdmDto.class);
|
||||
// if (entity == null) {
|
||||
// return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
// }
|
||||
// if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// //查询模块下的应用列表
|
||||
// MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||
// mdmModuleDistributeEntity.setSts("Y");
|
||||
// mdmModuleDistributeEntity.setMdmId(entity.getId());
|
||||
// List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(mdmModuleDistributeEntity);
|
||||
// if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0) {
|
||||
// MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity();
|
||||
// mdmModuleDistributeDetailEntity.setSts("Y");
|
||||
// mdmModuleDistributeDetailEntity.setMdmId(entity.getId());
|
||||
// List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
|
||||
// if (mdmModuleDistributeDetailEntities != null && mdmModuleDistributeDetailEntities.size() > 0) {
|
||||
// for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
||||
// List<MdmModuleDistributeDetailEntity> addlist = new ArrayList<>();
|
||||
// List<MdmModuleDistributeDetailEntity> deletelist = new ArrayList<>();
|
||||
// for (int i1 = 0; i1 < mdmModuleDistributeDetailEntities.size(); i1++) {
|
||||
// if (mdmModuleDistributeEntities.get(i).getAddApi().equals(mdmModuleDistributeDetailEntities.get(i1).getApiId())
|
||||
// && mdmModuleDistributeEntities.get(i).getId().equals(mdmModuleDistributeDetailEntities.get(i1).getDistributeId())) {
|
||||
// addlist.add(mdmModuleDistributeDetailEntities.get(i1));
|
||||
// }
|
||||
// if (mdmModuleDistributeEntities.get(i).getDeleteApi().equals(mdmModuleDistributeDetailEntities.get(i1).getApiId())
|
||||
// && mdmModuleDistributeEntities.get(i).getId().equals(mdmModuleDistributeDetailEntities.get(i1).getDistributeId())) {
|
||||
// deletelist.add(mdmModuleDistributeDetailEntities.get(i1));
|
||||
// }
|
||||
// }
|
||||
// mdmModuleDistributeEntities.get(i).setAddList(addlist);
|
||||
// mdmModuleDistributeEntities.get(i).setDeleteList(deletelist);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return BaseResult.getSuccessMessageEntity("查询成功", mdmModuleDistributeEntities);
|
||||
//}
|
||||
|
||||
//
|
||||
///**
|
||||
// * @param object
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 主数据设置保存分发设置
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//@Override
|
||||
//public JsonResultEntity doSaveMdmModuleDistribute(JSONObject object) {
|
||||
// MdmDistributeDto entity = getData("jsonStr", object, MdmDistributeDto.class);
|
||||
// //判断是否有数据
|
||||
// if (entity == null) {
|
||||
// return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
// }
|
||||
// if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// //if(entity.getMdmModuleDistributeEntities() == null ){
|
||||
// // return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
// //}
|
||||
// //先删除
|
||||
// MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||
// mdmModuleDistributeEntity.setMdmId(entity.getId());
|
||||
// mdmModuleDistributeEntity.setSts("Y");
|
||||
// mdmModuleDistributeEntity.setModify_user_id(StpUtil.getLoginIdAsString());
|
||||
// mdmModuleDistributeEntity.setModify_time(new Date());
|
||||
// mdmModuleDistributeDao.logicRemoveMultiCondition(mdmModuleDistributeEntity);
|
||||
|
||||
//
|
||||
// MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity();
|
||||
// mdmModuleDistributeDetailEntity.setMdmId(entity.getId());
|
||||
// mdmModuleDistributeDetailEntity.setSts("Y");
|
||||
// mdmModuleDistributeDetailEntity.setModify_user_id(StpUtil.getLoginIdAsString());
|
||||
// mdmModuleDistributeDetailEntity.setModify_time(new Date());
|
||||
// mdmModuleDistributeDetailDao.logicRemoveMultiCondition(mdmModuleDistributeDetailEntity);
|
||||
//
|
||||
// //保存主数据
|
||||
// List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = entity.getMdmModuleDistributeEntities();
|
||||
//
|
||||
// if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0) {
|
||||
// for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
||||
// MdmModuleDistributeEntity moduleDistributeEntity = mdmModuleDistributeEntities.get(i);
|
||||
// moduleDistributeEntity.setMdmId(entity.getId());
|
||||
// moduleDistributeEntity.setSts("Y");
|
||||
// moduleDistributeEntity.setModify_user_id(StpUtil.getLoginIdAsString());
|
||||
// moduleDistributeEntity.setModify_time(new Date());
|
||||
// if (moduleDistributeEntity.getId() != null && !"".equals(moduleDistributeEntity.getId())) {
|
||||
// //修改
|
||||
// mdmModuleDistributeDao.update(moduleDistributeEntity);
|
||||
// } else {
|
||||
// //新增
|
||||
// moduleDistributeEntity.setId(UUIDUtils.getUUID());
|
||||
// moduleDistributeEntity.setCreate_user_id(StpUtil.getLoginIdAsString());
|
||||
// moduleDistributeEntity.setCreate_time(new Date());
|
||||
// mdmModuleDistributeDao.save(moduleDistributeEntity);
|
||||
// }
|
||||
// if (moduleDistributeEntity.getAddList() != null && moduleDistributeEntity.getAddList().size() > 0) {
|
||||
// for (int i1 = 0; i1 < moduleDistributeEntity.getAddList().size(); i1++) {
|
||||
// MdmModuleDistributeDetailEntity moduleDistributeDetailEntity = moduleDistributeEntity.getAddList().get(i1);
|
||||
// moduleDistributeDetailEntity.setMdmId(entity.getId());
|
||||
// moduleDistributeDetailEntity.setSts("Y");
|
||||
// moduleDistributeDetailEntity.setApiId(moduleDistributeEntity.getAddApi());
|
||||
// moduleDistributeDetailEntity.setDistributeId(moduleDistributeEntity.getId());
|
||||
// moduleDistributeDetailEntity.setModify_user_id(StpUtil.getLoginIdAsString());
|
||||
// moduleDistributeDetailEntity.setModify_time(new Date());
|
||||
// if (moduleDistributeDetailEntity.getId() != null && !"".equals(moduleDistributeDetailEntity.getId())) {
|
||||
// //修改
|
||||
// mdmModuleDistributeDetailDao.update(moduleDistributeDetailEntity);
|
||||
// } else {
|
||||
// //新增
|
||||
// moduleDistributeDetailEntity.setId(UUIDUtils.getUUID());
|
||||
// moduleDistributeDetailEntity.setCreate_user_id(StpUtil.getLoginIdAsString());
|
||||
// moduleDistributeDetailEntity.setCreate_time(new Date());
|
||||
// mdmModuleDistributeDetailDao.save(moduleDistributeDetailEntity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (moduleDistributeEntity.getDeleteList() != null && moduleDistributeEntity.getDeleteList().size() > 0) {
|
||||
// for (int i1 = 0; i1 < moduleDistributeEntity.getDeleteList().size(); i1++) {
|
||||
// MdmModuleDistributeDetailEntity moduleDistributeDetailEntity = moduleDistributeEntity.getDeleteList().get(i1);
|
||||
// moduleDistributeDetailEntity.setMdmId(entity.getId());
|
||||
// moduleDistributeDetailEntity.setSts("Y");
|
||||
// moduleDistributeDetailEntity.setApiId(moduleDistributeEntity.getDeleteApi());
|
||||
// moduleDistributeDetailEntity.setDistributeId(moduleDistributeEntity.getId());
|
||||
// moduleDistributeDetailEntity.setModify_user_id(StpUtil.getLoginIdAsString());
|
||||
// moduleDistributeDetailEntity.setModify_time(new Date());
|
||||
// if (moduleDistributeDetailEntity.getId() != null && !"".equals(moduleDistributeDetailEntity.getId())) {
|
||||
// //修改
|
||||
// mdmModuleDistributeDetailDao.update(moduleDistributeDetailEntity);
|
||||
// } else {
|
||||
// //新增
|
||||
// moduleDistributeDetailEntity.setId(UUIDUtils.getUUID());
|
||||
// moduleDistributeDetailEntity.setCreate_user_id(StpUtil.getLoginIdAsString());
|
||||
// moduleDistributeDetailEntity.setCreate_time(new Date());
|
||||
// mdmModuleDistributeDetailDao.save(moduleDistributeDetailEntity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return BaseResult.getSuccessMessageEntity("保存发布设置成功");
|
||||
//}
|
||||
//
|
||||
///**
|
||||
// * @param object
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 主数据列表显示 树、查询条件、列表字段、按钮
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//@Override
|
||||
//public JsonResultEntity queryMdmShow(JSONObject object) {
|
||||
// MdmDto entity = getData("jsonStr", object, MdmDto.class);
|
||||
// if (entity == null) {
|
||||
// return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
// }
|
||||
// if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// //查询模版
|
||||
// MdmModuleEntity mdmModuleEntity = new MdmModuleEntity();
|
||||
// mdmModuleEntity.setMdmCode(entity.getMdmCode());
|
||||
// mdmModuleEntity.setSts("Y");
|
||||
// List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(mdmModuleEntity);
|
||||
// if (mdmModuleEntities == null || mdmModuleEntities.size() != 1) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
//
|
||||
// MdmViewVo mdmViewVo = new MdmViewVo();
|
||||
// mdmModuleEntity = mdmModuleEntities.get(0);
|
||||
// mdmViewVo.setMdmModuleEntity(mdmModuleEntity);
|
||||
// //查询展示类型
|
||||
// MdmModuleViewEntity mdmModuleViewEntity = new MdmModuleViewEntity();
|
||||
// mdmModuleViewEntity.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleViewEntity.setSts("Y");
|
||||
// List<MdmModuleViewEntity> moduleViewEntityList = mdmModuleViewDao.queryBase(mdmModuleViewEntity);
|
||||
// if (moduleViewEntityList == null || moduleViewEntityList.size() != 1) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// mdmModuleViewEntity = moduleViewEntityList.get(0);
|
||||
// mdmViewVo.setMdmModuleViewEntity(mdmModuleViewEntity);
|
||||
//
|
||||
// //查询数据源主表
|
||||
// MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
// mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleDbEntity.setSts("Y");
|
||||
// List<MdmModuleDbEntity> mdmModuleDbEntityList = mdmModuleDbDao.queryBase(mdmModuleDbEntity);
|
||||
// if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// //查询数据源表下面的字段
|
||||
// MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||
// mdmModuleDbFiledsEntity.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleDbFiledsEntity.setSts("Y");
|
||||
// List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmModuleDbFiledsDao.queryBase(mdmModuleDbFiledsEntity);
|
||||
// if (mdmModuleDbFiledsEntityList == null || mdmModuleDbFiledsEntityList.size() == 0) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// //查询字段下的规则
|
||||
// MdmModuleDbFiledsRuleEntity mdmModuleDbFiledsRuleEntity = new MdmModuleDbFiledsRuleEntity();
|
||||
// mdmModuleDbFiledsRuleEntity.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleDbFiledsRuleEntity.setSts("Y");
|
||||
// List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntityList = mdmModuleDbFiledsRuleDao.queryBase(mdmModuleDbFiledsRuleEntity);
|
||||
// if (mdmModuleDbFiledsRuleEntityList == null || mdmModuleDbFiledsRuleEntityList.size() == 0) {
|
||||
// return BaseResult.getFailureMessageEntity("系统错误");
|
||||
// }
|
||||
// //查询设置的查询字段
|
||||
// MdmModuleViewDetailEntity mdmModuleViewDetailEntity = new MdmModuleViewDetailEntity();
|
||||
// mdmModuleViewDetailEntity.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleViewDetailEntity.setSts("Y");
|
||||
// mdmModuleViewDetailEntity.setViewType("1");
|
||||
// List<MdmModuleViewDetailEntity> queryList = mdmModuleViewDetailDao.queryBase(mdmModuleViewDetailEntity);
|
||||
// //设置字段
|
||||
// List<MdmViewFiledVo> queryListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, queryList, false);
|
||||
// mdmViewVo.setQueryList(queryListVo);
|
||||
//
|
||||
// //查询用户设置字段
|
||||
// MdmModuleUserViewEntity mdmModuleUserViewEntity = new MdmModuleUserViewEntity();
|
||||
// mdmModuleUserViewEntity.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleUserViewEntity.setSts("Y");
|
||||
// mdmModuleUserViewEntity.setUserId(StpUtil.getLoginIdAsString());
|
||||
// List<MdmModuleUserViewEntity> mdmModuleUserViewEntities = mdmModuleUserViewDao.queryBase(mdmModuleUserViewEntity);
|
||||
//
|
||||
// //查询设置的查询字段
|
||||
// MdmModuleViewDetailEntity mdmModuleViewDetailEntity1 = new MdmModuleViewDetailEntity();
|
||||
// mdmModuleViewDetailEntity1.setMdmId(mdmModuleEntity.getId());
|
||||
// mdmModuleViewDetailEntity1.setSts("Y");
|
||||
// mdmModuleViewDetailEntity1.setViewType("2");
|
||||
// List<MdmModuleViewDetailEntity> listList = mdmModuleViewDetailDao.queryBase(mdmModuleViewDetailEntity1);
|
||||
// List<MdmModuleViewDetailEntity> dolistList = new ArrayList<>();
|
||||
//
|
||||
// if (mdmModuleUserViewEntities != null && mdmModuleUserViewEntities.size() > 0) {
|
||||
// dolistList = getDolist(listList, mdmModuleUserViewEntities);
|
||||
// if (dolistList == null || dolistList.size() == 0) {
|
||||
// dolistList = listList;
|
||||
// }
|
||||
// } else {
|
||||
// dolistList = listList;
|
||||
// }
|
||||
// List<MdmViewFiledVo> listListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, dolistList, true);
|
||||
// mdmViewVo.setListList(listListVo);
|
||||
//
|
||||
// List<MdmViewButtonVo> buttonList = new ArrayList<>();
|
||||
// buttonList.add(new MdmViewButtonVo("new", "新建"));
|
||||
// buttonList.add(new MdmViewButtonVo("resize", "重置"));
|
||||
// buttonList.add(new MdmViewButtonVo("search", "查询"));
|
||||
// buttonList.add(new MdmViewButtonVo("edit", "修改"));
|
||||
// buttonList.add(new MdmViewButtonVo("dele", "删除"));
|
||||
// buttonList.add(new MdmViewButtonVo("view", "查看"));
|
||||
// buttonList.add(new MdmViewButtonVo("send", "下发"));
|
||||
// mdmViewVo.setButtonList(buttonList);
|
||||
// return BaseResult.getSuccessMessageEntity("获取字段成功", mdmViewVo);
|
||||
//}
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据列表显示 树、查询条件、列表字段、按钮
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryMdmShow(JSONObject object) {
|
||||
MdmDto entity = getData("jsonStr", object, MdmDto.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//查询模版
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
if(mdmModuleEntity == null || mdmModuleEntity.getId() == null){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
|
||||
//设置模版
|
||||
MdmViewVo mdmViewVo = new MdmViewVo();
|
||||
mdmViewVo.setMdmModuleEntity(mdmModuleEntity);
|
||||
//查询展示类型
|
||||
MdmModuleViewEntity mdmModuleViewEntity = new MdmModuleViewEntity();
|
||||
mdmModuleViewEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleViewEntity.setSts("Y");
|
||||
List<MdmModuleViewEntity> moduleViewEntityList = mdmServiceCache.queryMdmModuleView(mdmModuleViewEntity);
|
||||
if (moduleViewEntityList == null || moduleViewEntityList.size() != 1) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
mdmModuleViewEntity = moduleViewEntityList.get(0);
|
||||
mdmViewVo.setMdmModuleViewEntity(mdmModuleViewEntity);
|
||||
|
||||
//查询数据源主表
|
||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||
mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbEntity.setSts("Y");
|
||||
List<MdmModuleDbEntity> mdmModuleDbEntityList = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
|
||||
if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//查询数据源表下面的字段
|
||||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||
mdmModuleDbFiledsEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbFiledsEntity.setSts("Y");
|
||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmServiceCache.queryMdmModuleDbFileds(mdmModuleDbFiledsEntity);
|
||||
if (mdmModuleDbFiledsEntityList == null || mdmModuleDbFiledsEntityList.size() == 0) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//查询字段下的规则
|
||||
MdmModuleDbFiledsRuleEntity mdmModuleDbFiledsRuleEntity = new MdmModuleDbFiledsRuleEntity();
|
||||
mdmModuleDbFiledsRuleEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleDbFiledsRuleEntity.setSts("Y");
|
||||
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntityList = mdmServiceCache.queryMdmModuleDbFiledsRule(mdmModuleDbFiledsRuleEntity);
|
||||
if (mdmModuleDbFiledsRuleEntityList == null || mdmModuleDbFiledsRuleEntityList.size() == 0) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
|
||||
|
||||
//查询设置的查询字段
|
||||
MdmModuleViewDetailEntity mdmModuleViewDetailEntity = new MdmModuleViewDetailEntity();
|
||||
mdmModuleViewDetailEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleViewDetailEntity.setSts("Y");
|
||||
List<MdmModuleViewDetailEntity> mdmModuleViewDetailEntities = mdmServiceCache.queryMdmModuleViewDetail(mdmModuleViewDetailEntity);
|
||||
|
||||
|
||||
|
||||
|
||||
return BaseResult.getSuccessMessageEntity("获取字段成功", mdmViewVo);
|
||||
}
|
||||
//
|
||||
///**
|
||||
// * @param object
|
||||
|
|
Loading…
Reference in New Issue