主数据修改
This commit is contained in:
parent
860a8336b5
commit
ce8f2063b2
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSource.dao;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 主数据数据来源(mdm_module_source: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 11:42:56
|
||||
*/
|
||||
public interface IMdmModuleSourceDao extends IBaseDao<MdmModuleSourceEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSource.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.dao.IMdmModuleSourceDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 主数据数据来源(MdmModuleSource)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 11:42:56
|
||||
*/
|
||||
@Repository(value = "MdmModuleSourceDaoImpl")
|
||||
public class MdmModuleSourceDaoImpl extends MybatisGenericDao<MdmModuleSourceEntity, String> implements IMdmModuleSourceDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSource.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 主数据数据来源(MdmModuleSource)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 11:42:57
|
||||
*/
|
||||
public class MdmModuleSourceEntity extends BaseEntity {
|
||||
|
||||
/** 主数据模版ID */
|
||||
private String mdmId;
|
||||
/** 来源类型 */
|
||||
private String sourceType;
|
||||
/** 来源名称 */
|
||||
private String sourceName;
|
||||
/** 来源编码 */
|
||||
private String sourceCode;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setSourceType(String sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public String getSourceName() {
|
||||
return sourceName;
|
||||
}
|
||||
|
||||
public void setSourceName(String sourceName) {
|
||||
this.sourceName = sourceName;
|
||||
}
|
||||
|
||||
public String getSourceCode() {
|
||||
return sourceCode;
|
||||
}
|
||||
|
||||
public void setSourceCode(String sourceCode) {
|
||||
this.sourceCode = sourceCode;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
<?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.mdmModuleSource.dao.impl.MdmModuleSourceDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleSourceEntity-result" type="com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="sourceType" column="source_type" jdbcType="VARCHAR"/>
|
||||
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
|
||||
<result property="sourceCode" column="source_code" 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 = "MdmModuleSourceEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_id
|
||||
,source_type
|
||||
,source_name
|
||||
,source_code
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
|
||||
select
|
||||
<include refid="MdmModuleSourceEntity_Base_Column_List" />
|
||||
from mdm_module_source
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> and source_code = #{sourceCode} </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.mdmModuleSource.entity.MdmModuleSourceEntity">
|
||||
select count(1) from mdm_module_source
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> and source_code = #{sourceCode} </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-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
|
||||
select
|
||||
<include refid="MdmModuleSourceEntity_Base_Column_List" />
|
||||
from mdm_module_source
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="sourceType != null and sourceType != ''"> and source_type like concat('%',#{sourceType},'%') </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> and source_code like concat('%',#{sourceCode},'%') </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="MdmModuleSourceentity_list_or" resultMap="get-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
|
||||
select
|
||||
<include refid="MdmModuleSourceEntity_Base_Column_List" />
|
||||
from mdm_module_source
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||
<if test="sourceType != null and sourceType != ''"> or source_type = #{sourceType} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> or source_code = #{sourceCode} </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.mdmModuleSource.entity.MdmModuleSourceEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_source(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="sourceType != null and sourceType != ''"> source_type , </if>
|
||||
<if test="sourceName != null and sourceName != ''"> source_name , </if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> source_code , </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="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||
<if test="sourceType != null and sourceType != ''"> #{sourceType} ,</if>
|
||||
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> #{sourceCode} ,</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 mdm_module_source a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
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=",">
|
||||
(#{entity.mdmId},#{entity.sourceType},#{entity.sourceName},#{entity.sourceCode},#{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" keyProperty="id" useGeneratedKeys="true">
|
||||
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=",">
|
||||
(#{entity.mdmId},#{entity.sourceType},#{entity.sourceName},#{entity.sourceCode},#{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
|
||||
mdm_id = values(mdm_id),
|
||||
source_type = values(source_type),
|
||||
source_name = values(source_name),
|
||||
source_code = values(source_code),
|
||||
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.mdmModuleSource.entity.MdmModuleSourceEntity" >
|
||||
update mdm_module_source set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="sourceType != null and sourceType != ''"> source_type = #{sourceType},</if>
|
||||
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> source_code = #{sourceCode},</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.mdmModuleSource.entity.MdmModuleSourceEntity" >
|
||||
update mdm_module_source 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.mdmModuleSource.entity.MdmModuleSourceEntity" >
|
||||
update mdm_module_source 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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="sourceCode != null and sourceCode != ''"> and source_code = #{sourceCode} </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 mdm_module_source where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSource.service;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 主数据数据来源(MdmModuleSource)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 11:42:57
|
||||
*/
|
||||
public interface IMdmModuleSourceService extends IBaseService<MdmModuleSourceEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.mdm.mdmModuleSource.service.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.dao.IMdmModuleSourceDao;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.service.IMdmModuleSourceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 主数据数据来源(MdmModuleSource)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-05 11:42:57
|
||||
*/
|
||||
@Service(value = "mdmModuleSourceService")
|
||||
public class MdmModuleSourceServiceImpl extends BaseService<MdmModuleSourceEntity, String> implements IMdmModuleSourceService {
|
||||
|
||||
private IMdmModuleSourceDao mdmModuleSourceDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmModuleSourceDao(IMdmModuleSourceDao dao) {
|
||||
this.mdmModuleSourceDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -1387,12 +1387,133 @@ public class MdmServiceImpl implements IMdmService {
|
|||
* @return void
|
||||
**/
|
||||
private void doMdmModuleButton(SysMenuConfigEntity module,List<MdmModuleViewButtonEntity> mdmModuleViewButtonEntities, List<SysButtonConfigEntity> sysButtonConfigEntities, List<SysPopedomOperateEntity> sysPopedomOperateEntities) {
|
||||
//循环设置的按钮,再循环菜单的按钮,如果有把原先的修改状态,如果没有新增
|
||||
if(mdmModuleViewButtonEntities != null && mdmModuleViewButtonEntities.size() > 0){
|
||||
for (int i = 0; i < mdmModuleViewButtonEntities.size(); i++) {
|
||||
boolean flag = false;
|
||||
if(sysButtonConfigEntities != null && sysButtonConfigEntities.size() > 0){
|
||||
for (int i1 = 0; i1 < sysButtonConfigEntities.size(); i1++) {
|
||||
if(mdmModuleViewButtonEntities.get(i).getButtonValue().equals(sysButtonConfigEntities.get(i1).getCode())){
|
||||
flag = true;
|
||||
sysButtonConfigEntities.get(i1).setSts("Y");
|
||||
sysButtonConfigEntities.get(i1).setUpdate();
|
||||
sysButtonConfigDao.update(sysButtonConfigEntities.get(i1));
|
||||
if(sysPopedomOperateEntities != null && sysPopedomOperateEntities.size() > 0){
|
||||
for (int i2 = 0; i2 < sysPopedomOperateEntities.size(); i2++) {
|
||||
if(sysPopedomOperateEntities.get(i2).getOperate().equals(sysButtonConfigEntities.get(i1).getId())){
|
||||
sysPopedomOperateEntities.get(i2).setSts("Y");
|
||||
sysPopedomOperateEntities.get(i2).setUpdate();
|
||||
sysPopedomOperateDao.update(sysPopedomOperateEntities.get(i2));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//原先没有需要新增
|
||||
if(!flag){
|
||||
if("new".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())){
|
||||
SysButtonConfigEntity xz = new SysButtonConfigEntity();
|
||||
xz.setCode("new");
|
||||
xz.setNameCh("新建");
|
||||
xz.setNameEn("new");
|
||||
xz.setMenuId(module.getId());
|
||||
xz.setIconName("");
|
||||
xz.setStyles("");
|
||||
xz.setBtnFunction("new");
|
||||
xz.setRemark("主数据新建按钮");
|
||||
xz.setCreate();
|
||||
sysButtonConfigDao.save(xz);
|
||||
}
|
||||
if("resize".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())){
|
||||
|
||||
//循环查看按钮
|
||||
|
||||
|
||||
SysButtonConfigEntity cz = new SysButtonConfigEntity();
|
||||
cz.setCode("resize");
|
||||
cz.setNameCh("重置");
|
||||
cz.setNameEn("resize");
|
||||
cz.setMenuId(module.getId());
|
||||
cz.setIconName("");
|
||||
cz.setStyles("");
|
||||
cz.setBtnFunction("resize");
|
||||
cz.setRemark("主数据重置按钮");
|
||||
cz.setCreate();
|
||||
sysButtonConfigDao.save(cz);
|
||||
}
|
||||
if("search".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())) {
|
||||
|
||||
SysButtonConfigEntity cx = new SysButtonConfigEntity();
|
||||
cx.setCode("search");
|
||||
cx.setNameCh("查询");
|
||||
cx.setNameEn("search");
|
||||
cx.setMenuId(module.getId());
|
||||
cx.setIconName("");
|
||||
cx.setStyles("");
|
||||
cx.setBtnFunction("search");
|
||||
cx.setRemark("主数据查询按钮");
|
||||
cx.setCreate();
|
||||
sysButtonConfigDao.save(cx);
|
||||
}
|
||||
if("edit".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())) {
|
||||
|
||||
SysButtonConfigEntity xg = new SysButtonConfigEntity();
|
||||
xg.setCode("edit");
|
||||
xg.setNameCh("修改");
|
||||
xg.setNameEn("edit");
|
||||
xg.setMenuId(module.getId());
|
||||
xg.setIconName("");
|
||||
xg.setStyles("");
|
||||
xg.setBtnFunction("edit");
|
||||
xg.setRemark("主数据修改按钮");
|
||||
xg.setCreate();
|
||||
sysButtonConfigDao.save(xg);
|
||||
}
|
||||
if("dele".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())) {
|
||||
|
||||
SysButtonConfigEntity sc = new SysButtonConfigEntity();
|
||||
sc.setCode("dele");
|
||||
sc.setNameCh("删除");
|
||||
sc.setNameEn("dele");
|
||||
sc.setMenuId(module.getId());
|
||||
sc.setIconName("");
|
||||
sc.setStyles("");
|
||||
sc.setBtnFunction("dele");
|
||||
sc.setRemark("主数据删除按钮");
|
||||
sc.setCreate();
|
||||
sysButtonConfigDao.save(sc);
|
||||
}
|
||||
if("view".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())) {
|
||||
|
||||
SysButtonConfigEntity ck = new SysButtonConfigEntity();
|
||||
ck.setCode("view");
|
||||
ck.setNameCh("查看");
|
||||
ck.setNameEn("view");
|
||||
ck.setMenuId(module.getId());
|
||||
ck.setIconName("");
|
||||
ck.setStyles("");
|
||||
ck.setBtnFunction("view");
|
||||
ck.setRemark("主数据查看按钮");
|
||||
ck.setCreate();
|
||||
sysButtonConfigDao.save(ck);
|
||||
}
|
||||
if("send".equals(mdmModuleViewButtonEntities.get(i).getButtonValue())) {
|
||||
SysButtonConfigEntity xf = new SysButtonConfigEntity();
|
||||
xf.setCode("send");
|
||||
xf.setNameCh("下发");
|
||||
xf.setNameEn("send");
|
||||
xf.setMenuId(module.getId());
|
||||
xf.setIconName("");
|
||||
xf.setStyles("");
|
||||
xf.setBtnFunction("send");
|
||||
xf.setRemark("主数据下发按钮");
|
||||
xf.setCreate();
|
||||
sysButtonConfigDao.save(xf);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
///**
|
||||
// * @param object
|
||||
|
|
Loading…
Reference in New Issue