主数据修改

This commit is contained in:
lvleigang 2024-06-07 11:19:57 +08:00 committed by 476474485@qq.com
parent 7b1a18747c
commit 9054c6b9ee
16 changed files with 2055 additions and 1126 deletions

View File

@ -0,0 +1,69 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import java.util.List;
public class MdmDataDto {
private String id;
private String tableName;
private String documentRule;
private Integer documentRuleNum;
/**
* 类型 1主表 2明细
*/
private String dbType;
private List<MdmDataFiledDto> mdmDataFiledDtos;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public List<MdmDataFiledDto> getMdmDataFiledDtos() {
return mdmDataFiledDtos;
}
public void setMdmDataFiledDtos(List<MdmDataFiledDto> mdmDataFiledDtos) {
this.mdmDataFiledDtos = mdmDataFiledDtos;
}
public String getDocumentRule() {
return documentRule;
}
public void setDocumentRule(String documentRule) {
this.documentRule = documentRule;
}
public Integer getDocumentRuleNum() {
return documentRuleNum;
}
public void setDocumentRuleNum(Integer documentRuleNum) {
this.documentRuleNum = documentRuleNum;
}
public String getDbType() {
return dbType;
}
public void setDbType(String dbType) {
this.dbType = dbType;
}
}

View File

@ -0,0 +1,29 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import java.util.List;
public class MdmDataFiledDto {
private String filedsName;
private String filedsValue;
public String getFiledsName() {
return filedsName;
}
public void setFiledsName(String filedsName) {
this.filedsName = filedsName;
}
public String getFiledsValue() {
return filedsValue;
}
public void setFiledsValue(String filedsValue) {
this.filedsValue = filedsValue;
}
}

View File

@ -0,0 +1,41 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import java.util.List;
public class MdmDetailViewVo {
//模版信息
private MdmModuleEntity mdmModuleEntity;
//主数据主表
private MdmModuleDbEntity mainMdmModuleDb;
//主数据子表
private List<MdmModuleDbEntity> sublistMdmModuleDb;
public MdmModuleEntity getMdmModuleEntity() {
return mdmModuleEntity;
}
public void setMdmModuleEntity(MdmModuleEntity mdmModuleEntity) {
this.mdmModuleEntity = mdmModuleEntity;
}
public MdmModuleDbEntity getMainMdmModuleDb() {
return mainMdmModuleDb;
}
public void setMainMdmModuleDb(MdmModuleDbEntity mainMdmModuleDb) {
this.mainMdmModuleDb = mainMdmModuleDb;
}
public List<MdmModuleDbEntity> getSublistMdmModuleDb() {
return sublistMdmModuleDb;
}
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
this.sublistMdmModuleDb = sublistMdmModuleDb;
}
}

View File

@ -17,6 +17,39 @@ public class MdmDto {
//主数据子表
private List<MdmModuleDbEntity> sublistMdmModuleDb;
//id
private String id;
//3新增4修改 5查看
private String showType;
//分页
private Integer pageNum;
private Integer pageSize;
/**
* 显示字段
*/
private String viewFiled;
/**
* 上级id字段
*/
private String upIdFiled;
//主数据名称
private String mdmName;
//主数据类型
private String mdmType;
//描述
private String remark;
//描述
private String[] ids;
private String tableName;
private String value;
private String label;
private String lableValue;
private String upId;
public Long getMdmCode() {
return mdmCode;
}
@ -48,5 +81,125 @@ public class MdmDto {
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
this.sublistMdmModuleDb = sublistMdmModuleDb;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getShowType() {
return showType;
}
public void setShowType(String showType) {
this.showType = showType;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public String getViewFiled() {
return viewFiled;
}
public void setViewFiled(String viewFiled) {
this.viewFiled = viewFiled;
}
public String getUpIdFiled() {
return upIdFiled;
}
public void setUpIdFiled(String upIdFiled) {
this.upIdFiled = upIdFiled;
}
public String getMdmName() {
return mdmName;
}
public void setMdmName(String mdmName) {
this.mdmName = mdmName;
}
public String getMdmType() {
return mdmType;
}
public void setMdmType(String mdmType) {
this.mdmType = mdmType;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String[] getIds() {
return ids;
}
public void setIds(String[] ids) {
this.ids = ids;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getLableValue() {
return lableValue;
}
public void setLableValue(String lableValue) {
this.lableValue = lableValue;
}
public String getUpId() {
return upId;
}
public void setUpId(String upId) {
this.upId = upId;
}
}

View File

@ -0,0 +1,69 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.sys.entity.TemplateKeyValue;
import java.util.List;
public class MdmQuery {
//分页
private Integer pageNum;
private Integer pageSize;
//表名
private String tableName;
//查询条件
private List<TemplateKeyValue> queryCondition;
//返回字段
private List<String> returnField;
//明细表查询条件
private List<MdmQuery> detailQueryCondition;
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public List<TemplateKeyValue> getQueryCondition() {
return queryCondition;
}
public void setQueryCondition(List<TemplateKeyValue> queryCondition) {
this.queryCondition = queryCondition;
}
public List<String> getReturnField() {
return returnField;
}
public void setReturnField(List<String> returnField) {
this.returnField = returnField;
}
public List<MdmQuery> getDetailQueryCondition() {
return detailQueryCondition;
}
public void setDetailQueryCondition(List<MdmQuery> detailQueryCondition) {
this.detailQueryCondition = detailQueryCondition;
}
}

View File

@ -1,8 +1,13 @@
package com.hzya.frame.mdm.mdmModule.dao;
import com.hzya.frame.mdm.entity.MdmDataDto;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.entity.MdmQuery;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.sys.entity.FormmainDeleteDto;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -22,5 +27,17 @@ public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {
Integer createTable(Map<String, Object> maps);
Integer alterTable(Map<String, Object> maps);
Integer alterTableName(Map<String, String> maps);
List<HashMap<String, Object>> queryMdmShowData(MdmQuery entity);
List<HashMap<String, Object>> queryTemplateDataMore(MdmDto entity);
HashMap<String, Object> queryTemplateDataOne(MdmDto entity);
Integer checkData(Map<String, String> map);
Integer updateForm(MdmDataDto mdmDataDto);
Integer saveForm(MdmDataDto mdmDataDto);
Integer deleteTemplateById(FormmainDeleteDto formmainDeleteDto);
Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
List<HashMap<String, Object>> querySelectData(MdmDto entity);
List<HashMap<String, Object>> queryDataAll(MdmDto entity);
}

View File

@ -1,10 +1,15 @@
package com.hzya.frame.mdm.mdmModule.dao.impl;
import com.hzya.frame.mdm.entity.MdmDataDto;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.entity.MdmQuery;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
import com.hzya.frame.sys.entity.FormmainDeleteDto;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -25,7 +30,7 @@ public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String>
@Override
public MdmModuleEntity getByMdmCode(Long mdmCode) {
MdmModuleEntity mdmModuleEntity = (MdmModuleEntity) super.query(getSqlIdPrifx() + "getByMdmCode",mdmCode);
MdmModuleEntity mdmModuleEntity = (MdmModuleEntity) super.selectOne(getSqlIdPrifx() + "getByMdmCode",mdmCode);
return mdmModuleEntity;
}
@ -35,8 +40,66 @@ public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String>
return o;
}
@Override
public List<HashMap<String, Object>> queryDataAll(MdmDto entity) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryDataAll", entity);
return o;
}
@Override
public Integer checkData(Map<String, String> maps) {
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "checkData", maps);
return o;
}
@Override
public Integer updateForm(MdmDataDto mdmDataDto) {
Integer o = super.update(getSqlIdPrifx() + "updateForm", mdmDataDto);
return o;
}
@Override
public List<HashMap<String, Object>> querySelectData(MdmDto entity) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "querySelectData", entity);
return o;
}
@Override
public Integer deleteChilder(FormmainDeleteDto entity) {
Integer o = super.delete(getSqlIdPrifx() + "deleteChilder", entity);
return o;
}
@Override
public Integer deleteTemplateById(FormmainDeleteDto entity) {
Integer o = super.delete(getSqlIdPrifx() + "deleteTemplateById", entity);
return o;
}
@Override
public Integer saveForm(MdmDataDto mdmDataDto) {
Integer o = super.update(getSqlIdPrifx() + "saveForm", mdmDataDto);
return o;
}
@Override
public List<HashMap<String, Object>> queryTemplateDataMore(MdmDto entity) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryTemplateDataMore", entity);
return o;
}
@Override
public HashMap<String, Object> queryTemplateDataOne(MdmDto entity) {
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "queryTemplateDataOne", entity);
return o;
}
@Override
public List<HashMap<String, Object>> queryMdmShowData(MdmQuery entity) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryMdmShowData", entity);
return o;
}
@Override
public Integer createTable(Map<String, Object> maps) {
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "createTable", maps);

View File

@ -404,5 +404,258 @@ update mdm_module set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #
<select id="alterTableName" resultType="java.lang.Integer">
ALTER TABLE ${tableName} COMMENT = #{tableRemark}
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryMdmShowData" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmQuery">
select
<if test="returnField != null and returnField.size>0">
<trim suffixOverrides=",">
<foreach collection="returnField" item="returnField">
a.${returnField} as ${returnField} ,
</foreach>
</trim>
</if>
<if test="returnField == null or returnField.size == 0">
a.*
</if>
from ${tableName} a
<trim prefix="where" prefixOverrides="and">
<if test="queryCondition != null and queryCondition.size>0">
<foreach collection="queryCondition" item="item" index="index">
${item.getValueByType('a.')}
</foreach>
</if>
and a.sts='Y'
<if test="detailQueryCondition != null and detailQueryCondition.size>0">
<foreach collection="detailQueryCondition" item="item" index="index">
AND a.id IN (
SELECT
formmain_id
FROM
${item.tableName}
<trim prefix="where" prefixOverrides="and">
sts = 'Y'
<if test="item.queryCondition != null and item.queryCondition.size>0">
<foreach collection="item.queryCondition" item="itema" index="index">
${itema.getValueByType('')}
</foreach>
</if>
</trim>
)
</foreach>
</if>
</trim>
order by a.sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryTemplateDataMore" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
${value} as id,
${label} as label,
${upId} as upID
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="ids != null and ids.length >0">
and id in (
<trim suffix="" suffixOverrides=",">
<foreach collection="ids" item="item" index="index">
#{item},
</foreach>
</trim>
)
</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryTemplateDataOne" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
${value} as id,
${label} as label,
${upId} as upID
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryDataAll" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
id as qsdfg,
${label},
${upId}
from ${tableName}
where sts = 'Y'
order by sorts asc
</select>
<!-- 查询符合条件的数量 -->
<select id="checkData" resultType="Integer" >
SELECT
count(*)
from
${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="filedName != null and filedName !='' and filedValue != null and filedValue !='' ">
and ${filedName} = #{filedValue}
</if>
<if test="id != null and id !='' ">and id != #{id}</if>
and sts = 'Y'
</trim>
</select>
<update id="updateForm" parameterType="com.hzya.frame.mdm.entity.MdmDataDto">
update ${tableName} set
<trim suffix="" suffixOverrides=",">
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
<foreach collection="mdmDataFiledDtos" item="item" index="index">
<if test="item.filedsName != 'logid'.toString() ">
${item.filedsName} = #{item.filedsValue},
</if>
<if test="item.filedsName == 'logid'.toString() ">
modify_user_id = #{item.filedsValue},
</if>
</foreach>
</if>
modify_time = now(),
</trim>
where id = #{id}
</update>
<insert id="saveForm" parameterType="com.hzya.frame.mdm.entity.MdmDataDto">
insert into ${tableName}(
<trim suffix="" suffixOverrides=",">
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
<foreach collection="mdmDataFiledDtos" item="item" index="index">
<if test="item.filedsName != 'logid'.toString() ">
${item.filedsName},
</if>
<if test="item.filedsName == 'logid'.toString() ">
create_user_id,
modify_user_id,
</if>
</foreach>
</if>
create_time,
modify_time,
sts,
<if test="dbType == '1'.toString()">
document_rule,
document_rule_num,
</if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
<foreach collection="mdmDataFiledDtos" item="item" index="index">
<if test="item.filedsName != 'logid'.toString() ">
#{item.filedsValue},
</if>
<if test="item.filedsName == 'logid'.toString() ">
#{item.filedsValue},
#{item.filedsValue},
</if>
</foreach>
</if>
now(),
now(),
'Y',
<if test="dbType == '1'.toString()">
( concat(#{documentRule},
(SELECT
IF
(
LENGTH( (SELECT
IFNULL(MAX(b.document_rule_num),0)+1
FROM
${tableName} b
WHERE
DATE_FORMAT( b.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )) ) &lt;= ${documentRuleNum},
LPAD( (SELECT
IFNULL(MAX(c.document_rule_num),0)+1
FROM
${tableName} c
WHERE
DATE_FORMAT( c.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )), ${documentRuleNum}, '0' ),
(SELECT
IFNULL(MAX(d.document_rule_num),0)+1
FROM
${tableName} d
WHERE
DATE_FORMAT( d.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' ))
)
)
)),
(SELECT
IF
(
LENGTH( (SELECT
IFNULL(MAX(e.document_rule_num),0)+1
FROM
${tableName} e
WHERE
DATE_FORMAT( e.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )) ) &lt;= ${documentRuleNum},
LPAD( (SELECT
IFNULL(MAX(f.document_rule_num),0)+1
FROM
${tableName} f
WHERE
DATE_FORMAT( f.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )), ${documentRuleNum}, '0' ),
(SELECT
IFNULL(MAX(g.document_rule_num),0)+1
FROM
${tableName} g
WHERE
DATE_FORMAT( g.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' ))
)
)
</if>
</trim>
)
</insert>
<update id="deleteTemplateById" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
update ${tableName} set
sts='N',modify_time = now(),modify_user_id = #{loginId}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
<if test="formmain_id != null and formmain_id !='' ">and formmain_id = #{formmain_id}</if>
and sts='Y'
</trim>
</update>
<update id="deleteChilder" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
update ${tableName} set
sts='N',modify_time = now(),modify_user_id = #{loginId}
<trim prefix="where" prefixOverrides="and">
<if test="upIdFiled != null and upIdFiled !='' and upIdFiledValue != null and upIdFiledValue !=''">
and ${upIdFiled} like concat(#{upIdFiledValue},'%')
</if>
and sts='Y'
</trim>
</update>
<!-- 分页查询列表 采用like格式 -->
<select id="querySelectData" resultType="java.util.HashMap" parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
${value},
${label}
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and ${value} = #{id}</if>
<if test="lableValue != null and lableValue !='' ">and ${label} like concat('%',#{lableValue},'%')</if>
and sts = 'Y'
and ${label} is not null
</trim>
order by sorts asc
</select>
</mapper>

View File

@ -1,7 +1,11 @@
package com.hzya.frame.mdm.mdmModuleDb.dao;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 模版数据库表(mdm_module_db: table)表数据库访问层
@ -10,6 +14,8 @@ import com.hzya.frame.basedao.dao.IBaseDao;
* @since 2024-06-03 08:46:48
*/
public interface IMdmModuleDbDao extends IBaseDao<MdmModuleDbEntity, String> {
HashMap<String, Object> getServiceDataById(Map<String, Object> queryData);
List<HashMap<String, Object>> getServiceByFormmainId(Map<String, Object> queryData);
List<HashMap<String, Object>> getServiceByDistributeId(Map<String, Object> queryData);
}

View File

@ -4,6 +4,11 @@ import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 模版数据库表(MdmModuleDb)表数据库访问层
*
@ -12,6 +17,25 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
*/
@Repository(value = "MdmModuleDbDaoImpl")
public class MdmModuleDbDaoImpl extends MybatisGenericDao<MdmModuleDbEntity, String> implements IMdmModuleDbDao{
@Override
public HashMap<String, Object> getServiceDataById(Map<String, Object> maps) {
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "getServiceDataById", maps);
return o;
}
@Override
public List<HashMap<String, Object>> getServiceByFormmainId(Map<String, Object> maps) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "getServiceByFormmainId", maps);
return o;
}
@Override
public List<HashMap<String, Object>> getServiceByDistributeId(Map<String, Object> maps) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "getServiceByDistributeId", maps);
return o;
}
}

View File

@ -238,6 +238,66 @@ update mdm_module_db set sts= 'N' ,modify_time = #{modify_time},modify_user_id
<delete id="entity_delete">
delete from mdm_module_db where id = #{id}
</delete>
<select id="getServiceDataById" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select
*
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="detailFlag">
and formmain_id = #{id}
</if>
<if test="!detailFlag">
and id = #{id}
</if>
and sts = 'Y'
</trim>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="getServiceByFormmainId" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select
*
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="detailFlag">
and formmain_id = #{id}
</if>
<if test="!detailFlag">
and id = #{id}
</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="getServiceByDistributeId" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select
id,
formmain_id,
app_id,
CASE
status
WHEN '1' THEN '发送成功'
WHEN '2' THEN '发送中'
WHEN '3' THEN '发送失败'
ELSE ''
END status,
msg,
sorts,
create_user_id,
create_time,
modify_user_id,
modify_time,
sts,
org_id
from ${tableName}
<trim prefix="where" prefixOverrides="and">
and formmain_id = #{id}
and sts = 'Y'
</trim>
order by sorts asc
</select>
</mapper>

View File

@ -41,6 +41,14 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
private String companyId;
/** 数据类型 1、新增 2、修改 */
private String dataType;
/**
* roletype
*/
private String roletype;
/**
* roletype
*/
private String roleValue;
private List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules;
public String getMdmId() {
@ -162,5 +170,21 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getRoletype() {
return roletype;
}
public void setRoletype(String roletype) {
this.roletype = roletype;
}
public String getRoleValue() {
return roleValue;
}
public void setRoleValue(String roleValue) {
this.roleValue = roleValue;
}
}

View File

@ -50,7 +50,7 @@ public interface IMdmService {
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据基本信息保存
* @Description 主数据基本信息修改
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity doSaveMdmModule(JSONObject jsonObject);
@ -63,31 +63,31 @@ public interface IMdmService {
**/
JsonResultEntity queryMdmModuleDb(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据设置查询数据源的服务
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmModuleServer(JSONObject jsonObject);
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据设置查询数据源字段的服务
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmModuleServerFiled(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据设置查询主表字段
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmModuleServerMainFiled(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据设置查询数据源的服务
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmModuleServer(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据设置查询数据源字段的服务
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmModuleServerFiled(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据设置查询主表字段
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmModuleServerMainFiled(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
@ -233,30 +233,30 @@ public interface IMdmService {
**/
JsonResultEntity queryMdmShow(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据查询所有字段
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmShowAll(JSONObject jsonObject);
///**
// * @Author lvleigang
// * @Description 查询模版数据list 或者 分页
// * @Date 1:33 下午 2023/7/12
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// **/
//JsonResultEntity queryTemplateData(JSONObject jsonObject);
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据列表显示 业务数据
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmShowData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据查询所有字段
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmShowAll(JSONObject jsonObject);
/**
* @Author lvleigang
* @Description 查询模版数据list 或者 分页
* @Date 1:33 下午 2023/7/12
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity queryTemplateData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据列表显示 业务数据
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmShowData(JSONObject jsonObject);
//
///**
// * @param jsonObject
@ -266,14 +266,14 @@ public interface IMdmService {
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmShowDistribute(JSONObject jsonObject);
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据业务数据树结构
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmShowTreeData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据业务数据树结构
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmShowTreeData(JSONObject jsonObject);
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
@ -283,49 +283,49 @@ public interface IMdmService {
// **/
//JsonResultEntity queryMdmOptionData(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据详情 区分类型 新增修改查看
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmShowDetails(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据详情 区分类型 新增修改查看
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmShowDetails(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据详情数据 区分类型 新增修改查看
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity queryMdmShowDetailsData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据详情数据 区分类型 新增修改查看
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity queryMdmShowDetailsData(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据详情数据修改
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity updateMdmShowDetailsData(JSONObject jsonObject);
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据详情数据新增
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity saveMdmShowDetailsData(JSONObject jsonObject);
//
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 主数据删除业务数据
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity deleteMdmShowDetailsData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据详情数据修改
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity updateMdmShowDetailsData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据详情数据新增
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity saveMdmShowDetailsData(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据删除业务数据
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity deleteMdmShowDetailsData(JSONObject jsonObject);
//
///**
// * @param jsonObject

View File

@ -30,14 +30,33 @@ public interface IMdmServiceCache {
* @return com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity
**/
MdmModuleEntity getMdmModuleEntity(Long mdmCode);
/**
* @Author lvleigang
* @Description 获取模版单据编码规则
* @Date 10:13 上午 2024/6/3
* @param mdmTableCodeRuleEntity
* @return com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity
**/
List<MdmTableCodeRuleEntity> queryMdmTableCodeRuleEntity(MdmTableCodeRuleEntity mdmTableCodeRuleEntity);
/**
* @Author lvleigang
* @Description 获取模版表数据
* @Date 10:13 上午 2024/6/3
* @param queryDb
* @return com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity
**/
List<MdmModuleDbEntity> queryMdmModuleDb(MdmModuleDbEntity queryDb);
/**
* @Author lvleigang
* @Description 获取模版字段表数据
* @Date 10:13 上午 2024/6/3
* @param queryDbFiled
* @return com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity
**/
List<MdmModuleDbFiledsEntity> queryMdmModuleDbFileds(MdmModuleDbFiledsEntity queryDbFiled);
void updateMdmModuleEntity(MdmModuleEntity entity);
List<MdmTableCodeRuleEntity> queryMdmTableCodeRuleEntity(MdmTableCodeRuleEntity mdmTableCodeRuleEntity);
List<MdmModuleDbEntity> queryMdmModuleDb(MdmModuleDbEntity queryDb);
List<MdmModuleDbFiledsEntity> queryMdmModuleDbFileds(MdmModuleDbFiledsEntity queryDbFiled);
List<MdmModuleDbFiledsRuleEntity> queryMdmModuleDbFiledsRule(MdmModuleDbFiledsRuleEntity queryDbFiledRule);

View File

@ -87,7 +87,7 @@ public class MdmServiceCache implements IMdmServiceCache {
}
@Override
@Cacheable(cacheNames="mdmTableCodeRule",key = "#mdmId")
@Cacheable(cacheNames="mdmTableCodeRule",key = "#entity.mdmId")
public List<MdmTableCodeRuleEntity> queryMdmTableCodeRuleEntity(MdmTableCodeRuleEntity entity) {
List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList = mdmTableCodeRuleDao.queryBase(entity);
return mdmTableCodeRuleEntityList;
@ -95,21 +95,21 @@ public class MdmServiceCache implements IMdmServiceCache {
@Override
@Cacheable(cacheNames="mdmModuleDb",key = "#mdmId")
@Cacheable(cacheNames="mdmModuleDb",key = "#entity.mdmId")
public List<MdmModuleDbEntity> queryMdmModuleDb(MdmModuleDbEntity entity) {
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmModuleDbDao.queryBase(entity);
return mdmModuleDbEntities;
}
@Override
@Cacheable(cacheNames="mdmModuleDbFileds",key = "#mdmId")
@Cacheable(cacheNames="mdmModuleDbFileds",key = "#entity.mdmId")
public List<MdmModuleDbFiledsEntity> queryMdmModuleDbFileds(MdmModuleDbFiledsEntity entity) {
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = mdmModuleDbFiledsDao.queryBase(entity);
return mdmModuleDbFiledsEntities;
}
@Override
@Cacheable(cacheNames="mdmModuleDbFiledsRule",key = "#mdmId")
@Cacheable(cacheNames="mdmModuleDbFiledsRule",key = "#entity.mdmId")
public List<MdmModuleDbFiledsRuleEntity> queryMdmModuleDbFiledsRule(MdmModuleDbFiledsRuleEntity entity) {
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(entity);
return mdmModuleDbFiledsRuleEntities;
@ -176,23 +176,23 @@ public class MdmServiceCache implements IMdmServiceCache {
}
@Override
@Cacheable(cacheNames="mdmModuleViewDetail",key = "#mdmId")
public List<MdmModuleViewDetailEntity> queryMdmModuleViewDetail(MdmModuleViewDetailEntity mdmModuleViewDetailEntity) {
List<MdmModuleViewDetailEntity> mdmModuleViewDetailEntities = mdmModuleViewDetailDao.queryBase(mdmModuleViewDetailEntity);
@Cacheable(cacheNames="mdmModuleViewDetail",key = "#entity.mdmId")
public List<MdmModuleViewDetailEntity> queryMdmModuleViewDetail(MdmModuleViewDetailEntity entity) {
List<MdmModuleViewDetailEntity> mdmModuleViewDetailEntities = mdmModuleViewDetailDao.queryBase(entity);
return mdmModuleViewDetailEntities;
}
@Override
@Cacheable(cacheNames="mdmModuleView",key = "#mdmId")
public List<MdmModuleViewEntity> queryMdmModuleView(MdmModuleViewEntity mdmModuleViewEntity) {
List<MdmModuleViewEntity> moduleViewEntities = mdmModuleViewDao.queryBase(mdmModuleViewEntity);
@Cacheable(cacheNames="mdmModuleView",key = "#entity.mdmId")
public List<MdmModuleViewEntity> queryMdmModuleView(MdmModuleViewEntity entity) {
List<MdmModuleViewEntity> moduleViewEntities = mdmModuleViewDao.queryBase(entity);
return moduleViewEntities;
}
@Override
@Cacheable(cacheNames="mdmModuleViewButton",key = "#mdmId")
public List<MdmModuleViewButtonEntity> queryMdmModuleViewButton(MdmModuleViewButtonEntity mdmModuleViewButtonEntity) {
List<MdmModuleViewButtonEntity> mdmModuleViewButtonEntities = mdmModuleViewButtonDao.queryBase(mdmModuleViewButtonEntity);
@Cacheable(cacheNames="mdmModuleViewButton",key = "#entity.mdmId")
public List<MdmModuleViewButtonEntity> queryMdmModuleViewButton(MdmModuleViewButtonEntity entity) {
List<MdmModuleViewButtonEntity> mdmModuleViewButtonEntities = mdmModuleViewButtonDao.queryBase(entity);
return mdmModuleViewButtonEntities;
}
@ -263,9 +263,9 @@ public class MdmServiceCache implements IMdmServiceCache {
return mdmModuleDistributeEntities;
}
@Override
@Cacheable(cacheNames="mdmModuleDistributeDetail",key = "#mdmId")
public List<MdmModuleDistributeDetailEntity> queryMdmModuleDistributeDetail(MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity){
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
@Cacheable(cacheNames="mdmModuleDistributeDetail",key = "#entity.mdmId")
public List<MdmModuleDistributeDetailEntity> queryMdmModuleDistributeDetail(MdmModuleDistributeDetailEntity entity){
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(entity);
return mdmModuleDistributeDetailEntities;
}
@ -312,9 +312,9 @@ public class MdmServiceCache implements IMdmServiceCache {
}
@Override
@Cacheable(cacheNames="mdmModuleSource",key = "#mdmId")
public List<MdmModuleSourceEntity> queryMdmModuleSource(MdmModuleSourceEntity mdmModuleSourceEntity) {
List<MdmModuleSourceEntity> mdmModuleSourceEntities = mdmModuleSourceDao.queryBase(mdmModuleSourceEntity);
@Cacheable(cacheNames="mdmModuleSource",key = "#entity.mdmId")
public List<MdmModuleSourceEntity> queryMdmModuleSource(MdmModuleSourceEntity entity) {
List<MdmModuleSourceEntity> mdmModuleSourceEntities = mdmModuleSourceDao.queryBase(entity);
return mdmModuleSourceEntities;
}