Merge branch 'dev' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into yingdesai
This commit is contained in:
commit
dfab9aa128
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.dao;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 客户银行(mdm_customer_bank: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public interface IMdmCustomerBankDao extends IBaseDao<MdmCustomerBankEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.dao.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.dao.IMdmCustomerBankDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankDaoImpl extends MybatisGenericDao<MdmCustomerBankEntity, String> implements IMdmCustomerBankDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankEntity extends BaseEntity {
|
||||
|
||||
/** formmain_id */
|
||||
private String formmainId;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 银行 */
|
||||
private String bank;
|
||||
/** 开户银行 */
|
||||
private String pkBankdoc;
|
||||
/** 账号 */
|
||||
private String accnum;
|
||||
/** 联行号 */
|
||||
private String combinenum;
|
||||
|
||||
|
||||
public String getFormmainId() {
|
||||
return formmainId;
|
||||
}
|
||||
|
||||
public void setFormmainId(String formmainId) {
|
||||
this.formmainId = formmainId;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getBank() {
|
||||
return bank;
|
||||
}
|
||||
|
||||
public void setBank(String bank) {
|
||||
this.bank = bank;
|
||||
}
|
||||
|
||||
public String getPkBankdoc() {
|
||||
return pkBankdoc;
|
||||
}
|
||||
|
||||
public void setPkBankdoc(String pkBankdoc) {
|
||||
this.pkBankdoc = pkBankdoc;
|
||||
}
|
||||
|
||||
public String getAccnum() {
|
||||
return accnum;
|
||||
}
|
||||
|
||||
public void setAccnum(String accnum) {
|
||||
this.accnum = accnum;
|
||||
}
|
||||
|
||||
public String getCombinenum() {
|
||||
return combinenum;
|
||||
}
|
||||
|
||||
public void setCombinenum(String combinenum) {
|
||||
this.combinenum = combinenum;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,267 @@
|
|||
<?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.plugin.masterData.customer.bank.dao.impl.MdmCustomerBankDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmCustomerBankEntity-result" type="com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="formmainId" column="formmain_id" jdbcType="VARCHAR"/>
|
||||
<result property="dataStatus" column="data_status" 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"/>
|
||||
<result property="bank" column="bank" jdbcType="VARCHAR"/>
|
||||
<result property="pkBankdoc" column="pk_bankdoc" jdbcType="VARCHAR"/>
|
||||
<result property="accnum" column="accnum" jdbcType="VARCHAR"/>
|
||||
<result property="combinenum" column="combinenum" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmCustomerBankEntity_Base_Column_List">
|
||||
id
|
||||
,formmain_id
|
||||
,data_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,bank
|
||||
,pk_bankdoc
|
||||
,accnum
|
||||
,combinenum
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmCustomerBankEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select
|
||||
<include refid="MdmCustomerBankEntity_Base_Column_List" />
|
||||
from mdm_customer_bank
|
||||
<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="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </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>
|
||||
<if test="bank != null and bank != ''"> and bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum = #{combinenum} </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.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select count(1) from mdm_customer_bank
|
||||
<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="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </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>
|
||||
<if test="bank != null and bank != ''"> and bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum = #{combinenum} </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-MdmCustomerBankEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select
|
||||
<include refid="MdmCustomerBankEntity_Base_Column_List" />
|
||||
from mdm_customer_bank
|
||||
<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="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </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>
|
||||
<if test="bank != null and bank != ''"> and bank like concat('%',#{bank},'%') </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc like concat('%',#{pkBankdoc},'%') </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum like concat('%',#{accnum},'%') </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum like concat('%',#{combinenum},'%') </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="MdmCustomerBankentity_list_or" resultMap="get-MdmCustomerBankEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select
|
||||
<include refid="MdmCustomerBankEntity_Base_Column_List" />
|
||||
from mdm_customer_bank
|
||||
<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="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </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>
|
||||
<if test="bank != null and bank != ''"> or bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> or pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> or accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> or combinenum = #{combinenum} </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.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer_bank(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </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="bank != null and bank != ''"> bank , </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> pk_bankdoc , </if>
|
||||
<if test="accnum != null and accnum != ''"> accnum , </if>
|
||||
<if test="combinenum != null and combinenum != ''"> combinenum , </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="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</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="bank != null and bank != ''"> #{bank} ,</if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> #{pkBankdoc} ,</if>
|
||||
<if test="accnum != null and accnum != ''"> #{accnum} ,</if>
|
||||
<if test="combinenum != null and combinenum != ''"> #{combinenum} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_customer_bank a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer_bank(formmain_id, data_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bank, pk_bankdoc, accnum, combinenum, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.dataStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.bank},#{entity.pkBankdoc},#{entity.accnum},#{entity.combinenum}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer_bank(formmain_id, data_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bank, pk_bankdoc, accnum, combinenum)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.dataStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.bank},#{entity.pkBankdoc},#{entity.accnum},#{entity.combinenum})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
formmain_id = values(formmain_id),
|
||||
data_status = values(data_status),
|
||||
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),
|
||||
bank = values(bank),
|
||||
pk_bankdoc = values(pk_bankdoc),
|
||||
accnum = values(accnum),
|
||||
combinenum = values(combinenum)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
update mdm_customer_bank set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id = #{formmainId},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</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>
|
||||
<if test="bank != null and bank != ''"> bank = #{bank},</if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> pk_bankdoc = #{pkBankdoc},</if>
|
||||
<if test="accnum != null and accnum != ''"> accnum = #{accnum},</if>
|
||||
<if test="combinenum != null and combinenum != ''"> combinenum = #{combinenum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
update mdm_customer_bank 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.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
update mdm_customer_bank 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="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </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>
|
||||
<if test="bank != null and bank != ''"> and bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum = #{combinenum} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_customer_bank where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.plugin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmCustomerBankPluginInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmCustomerBankPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmCustomerBankPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmCustomerBankPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
logger.info("执行业务代码逻辑");
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.service;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public interface IMdmCustomerBankService extends IBaseService<MdmCustomerBankEntity, String>{
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.service.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.dao.IMdmCustomerBankDao;
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.service.IMdmCustomerBankService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankServiceImpl extends BaseService<MdmCustomerBankEntity, String> implements IMdmCustomerBankService {
|
||||
|
||||
private IMdmCustomerBankDao mdmCustomerBankDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmCustomerBankDao(IMdmCustomerBankDao dao) {
|
||||
this.mdmCustomerBankDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.dao;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 客户档案(mdm_customer: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public interface IMdmCustomerDao extends IBaseDao<MdmCustomerEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.dao.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.dao.IMdmCustomerDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerDaoImpl extends MybatisGenericDao<MdmCustomerEntity, String> implements IMdmCustomerDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerEntity extends BaseEntity {
|
||||
|
||||
/** 单据规则 */
|
||||
private String documentRule;
|
||||
/** 单据规则流水号 */
|
||||
private Long documentRuleNum;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 新增数据状态 0待下发 1已下发 */
|
||||
private String addStatus;
|
||||
/** 修改数据状态 0待下发 1已下发 */
|
||||
private String updateStatus;
|
||||
/** 删除数据状态 0待下发 1已下发 */
|
||||
private String deleteStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 客户编码 */
|
||||
private String code;
|
||||
/** 客户类型 */
|
||||
private String custprop;
|
||||
/** 客户状态 */
|
||||
private String custstate;
|
||||
/** 启用状态 */
|
||||
private String enablestate;
|
||||
/** 客户名称 */
|
||||
private String name;
|
||||
/** 国家/地区 */
|
||||
private String pkCountry;
|
||||
/** 客户基本分类 */
|
||||
private String pkCustclass;
|
||||
/** 所属集团 */
|
||||
private String pkGroup;
|
||||
/** 所属组织 */
|
||||
private String pkOrg;
|
||||
/** 纳税人登记号 */
|
||||
private String taxpayerid;
|
||||
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Long getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getAddStatus() {
|
||||
return addStatus;
|
||||
}
|
||||
|
||||
public void setAddStatus(String addStatus) {
|
||||
this.addStatus = addStatus;
|
||||
}
|
||||
|
||||
public String getUpdateStatus() {
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(String updateStatus) {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
public String getDeleteStatus() {
|
||||
return deleteStatus;
|
||||
}
|
||||
|
||||
public void setDeleteStatus(String deleteStatus) {
|
||||
this.deleteStatus = deleteStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCustprop() {
|
||||
return custprop;
|
||||
}
|
||||
|
||||
public void setCustprop(String custprop) {
|
||||
this.custprop = custprop;
|
||||
}
|
||||
|
||||
public String getCuststate() {
|
||||
return custstate;
|
||||
}
|
||||
|
||||
public void setCuststate(String custstate) {
|
||||
this.custstate = custstate;
|
||||
}
|
||||
|
||||
public String getEnablestate() {
|
||||
return enablestate;
|
||||
}
|
||||
|
||||
public void setEnablestate(String enablestate) {
|
||||
this.enablestate = enablestate;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPkCountry() {
|
||||
return pkCountry;
|
||||
}
|
||||
|
||||
public void setPkCountry(String pkCountry) {
|
||||
this.pkCountry = pkCountry;
|
||||
}
|
||||
|
||||
public String getPkCustclass() {
|
||||
return pkCustclass;
|
||||
}
|
||||
|
||||
public void setPkCustclass(String pkCustclass) {
|
||||
this.pkCustclass = pkCustclass;
|
||||
}
|
||||
|
||||
public String getPkGroup() {
|
||||
return pkGroup;
|
||||
}
|
||||
|
||||
public void setPkGroup(String pkGroup) {
|
||||
this.pkGroup = pkGroup;
|
||||
}
|
||||
|
||||
public String getPkOrg() {
|
||||
return pkOrg;
|
||||
}
|
||||
|
||||
public void setPkOrg(String pkOrg) {
|
||||
this.pkOrg = pkOrg;
|
||||
}
|
||||
|
||||
public String getTaxpayerid() {
|
||||
return taxpayerid;
|
||||
}
|
||||
|
||||
public void setTaxpayerid(String taxpayerid) {
|
||||
this.taxpayerid = taxpayerid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,377 @@
|
|||
<?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.plugin.masterData.customer.dao.impl.MdmCustomerDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmCustomerEntity-result" type="com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||
<result property="deleteStatus" column="delete_status" 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"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="custprop" column="custprop" jdbcType="VARCHAR"/>
|
||||
<result property="custstate" column="custstate" jdbcType="VARCHAR"/>
|
||||
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="pkCountry" column="pk_country" jdbcType="VARCHAR"/>
|
||||
<result property="pkCustclass" column="pk_custclass" jdbcType="VARCHAR"/>
|
||||
<result property="pkGroup" column="pk_group" jdbcType="VARCHAR"/>
|
||||
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
|
||||
<result property="taxpayerid" column="taxpayerid" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmCustomerEntity_Base_Column_List">
|
||||
id
|
||||
,document_rule
|
||||
,document_rule_num
|
||||
,data_status
|
||||
,add_status
|
||||
,update_status
|
||||
,delete_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,code
|
||||
,custprop
|
||||
,custstate
|
||||
,enablestate
|
||||
,name
|
||||
,pk_country
|
||||
,pk_custclass
|
||||
,pk_group
|
||||
,pk_org
|
||||
,taxpayerid
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select
|
||||
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||
from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </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.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select count(1) from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </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-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select
|
||||
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||
from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </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>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop like concat('%',#{custprop},'%') </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate like concat('%',#{custstate},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country like concat('%',#{pkCountry},'%') </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass like concat('%',#{pkCustclass},'%') </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group like concat('%',#{pkGroup},'%') </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org like concat('%',#{pkOrg},'%') </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid like concat('%',#{taxpayerid},'%') </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="MdmCustomerentity_list_or" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select
|
||||
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||
from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </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>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> or custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> or custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> or name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> or pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> or pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> or pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> or pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> or taxpayerid = #{taxpayerid} </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.plugin.masterData.customer.entity.MdmCustomerEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
||||
<if test="documentRuleNum != null"> document_rule_num , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </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="code != null and code != ''"> code , </if>
|
||||
<if test="custprop != null and custprop != ''"> custprop , </if>
|
||||
<if test="custstate != null and custstate != ''"> custstate , </if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
||||
<if test="name != null and name != ''"> name , </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> pk_country , </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass , </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> pk_group , </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> pk_org , </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid , </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="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
||||
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</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="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="custprop != null and custprop != ''"> #{custprop} ,</if>
|
||||
<if test="custstate != null and custstate != ''"> #{custstate} ,</if>
|
||||
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
||||
<if test="name != null and name != ''"> #{name} ,</if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> #{pkCountry} ,</if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> #{pkCustclass} ,</if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> #{pkGroup} ,</if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> #{pkOrg} ,</if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> #{taxpayerid} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_customer a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
document_rule = values(document_rule),
|
||||
document_rule_num = values(document_rule_num),
|
||||
data_status = values(data_status),
|
||||
add_status = values(add_status),
|
||||
update_status = values(update_status),
|
||||
delete_status = values(delete_status),
|
||||
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),
|
||||
code = values(code),
|
||||
custprop = values(custprop),
|
||||
custstate = values(custstate),
|
||||
enablestate = values(enablestate),
|
||||
name = values(name),
|
||||
pk_country = values(pk_country),
|
||||
pk_custclass = values(pk_custclass),
|
||||
pk_group = values(pk_group),
|
||||
pk_org = values(pk_org),
|
||||
taxpayerid = values(taxpayerid)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
update mdm_customer set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
||||
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</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>
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="custprop != null and custprop != ''"> custprop = #{custprop},</if>
|
||||
<if test="custstate != null and custstate != ''"> custstate = #{custstate},</if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
||||
<if test="name != null and name != ''"> name = #{name},</if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> pk_country = #{pkCountry},</if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass = #{pkCustclass},</if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> pk_group = #{pkGroup},</if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> pk_org = #{pkOrg},</if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid = #{taxpayerid},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
update mdm_customer 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.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
update mdm_customer 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="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_customer where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.plugin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmCustomerPluginInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmCustomerPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmCustomerPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmCustomerPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
logger.info("执行业务代码逻辑");
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.service;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public interface IMdmCustomerService extends IBaseService<MdmCustomerEntity, String>{
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.service.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.dao.IMdmCustomerDao;
|
||||
import com.hzya.frame.plugin.masterData.customer.service.IMdmCustomerService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerServiceImpl extends BaseService<MdmCustomerEntity, String> implements IMdmCustomerService {
|
||||
|
||||
private IMdmCustomerDao mdmCustomerDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmCustomerDao(IMdmCustomerDao dao) {
|
||||
this.mdmCustomerDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.org.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity;
|
||||
|
||||
/**
|
||||
* 组织档案(mdm_org: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public interface IMdmOrgDao extends IBaseDao<MdmOrgEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.plugin.masterData.org.dao.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.org.dao.IMdmOrgDao;
|
||||
import com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 组织档案(MdmOrg)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public class MdmOrgDaoImpl extends MybatisGenericDao<MdmOrgEntity, String> implements IMdmOrgDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
package com.hzya.frame.plugin.masterData.org.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 组织档案(MdmOrg)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public class MdmOrgEntity extends BaseEntity {
|
||||
|
||||
/** 单据规则 */
|
||||
private String documentRule;
|
||||
/** 单据规则流水号 */
|
||||
private Long documentRuleNum;
|
||||
/** 组织编码 */
|
||||
private String orgCode;
|
||||
/** 组织名称 */
|
||||
private String orgName;
|
||||
/** 地址 */
|
||||
private String orgAddress;
|
||||
/** 国家地区 */
|
||||
private String orgCountryzone;
|
||||
/** 内部编码 */
|
||||
private String orgInnercode;
|
||||
/** 说明 */
|
||||
private String orgMemo;
|
||||
/** 助记码 */
|
||||
private String orgMnecode;
|
||||
/** 所属行业 */
|
||||
private String orgNcindustry;
|
||||
/** 上级业务单元 */
|
||||
private String orgFatherorg;
|
||||
/** 负责人 */
|
||||
private String orgPrincipal;
|
||||
/** 电话 */
|
||||
private String orgTel;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 新增数据状态 0待下发 1已下发 */
|
||||
private String addStatus;
|
||||
/** 修改数据状态 0待下发 1已下发 */
|
||||
private String updateStatus;
|
||||
/** 删除数据状态 0待下发 1已下发 */
|
||||
private String deleteStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Long getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getOrgCode() {
|
||||
return orgCode;
|
||||
}
|
||||
|
||||
public void setOrgCode(String orgCode) {
|
||||
this.orgCode = orgCode;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return orgName;
|
||||
}
|
||||
|
||||
public void setOrgName(String orgName) {
|
||||
this.orgName = orgName;
|
||||
}
|
||||
|
||||
public String getOrgAddress() {
|
||||
return orgAddress;
|
||||
}
|
||||
|
||||
public void setOrgAddress(String orgAddress) {
|
||||
this.orgAddress = orgAddress;
|
||||
}
|
||||
|
||||
public String getOrgCountryzone() {
|
||||
return orgCountryzone;
|
||||
}
|
||||
|
||||
public void setOrgCountryzone(String orgCountryzone) {
|
||||
this.orgCountryzone = orgCountryzone;
|
||||
}
|
||||
|
||||
public String getOrgInnercode() {
|
||||
return orgInnercode;
|
||||
}
|
||||
|
||||
public void setOrgInnercode(String orgInnercode) {
|
||||
this.orgInnercode = orgInnercode;
|
||||
}
|
||||
|
||||
public String getOrgMemo() {
|
||||
return orgMemo;
|
||||
}
|
||||
|
||||
public void setOrgMemo(String orgMemo) {
|
||||
this.orgMemo = orgMemo;
|
||||
}
|
||||
|
||||
public String getOrgMnecode() {
|
||||
return orgMnecode;
|
||||
}
|
||||
|
||||
public void setOrgMnecode(String orgMnecode) {
|
||||
this.orgMnecode = orgMnecode;
|
||||
}
|
||||
|
||||
public String getOrgNcindustry() {
|
||||
return orgNcindustry;
|
||||
}
|
||||
|
||||
public void setOrgNcindustry(String orgNcindustry) {
|
||||
this.orgNcindustry = orgNcindustry;
|
||||
}
|
||||
|
||||
public String getOrgFatherorg() {
|
||||
return orgFatherorg;
|
||||
}
|
||||
|
||||
public void setOrgFatherorg(String orgFatherorg) {
|
||||
this.orgFatherorg = orgFatherorg;
|
||||
}
|
||||
|
||||
public String getOrgPrincipal() {
|
||||
return orgPrincipal;
|
||||
}
|
||||
|
||||
public void setOrgPrincipal(String orgPrincipal) {
|
||||
this.orgPrincipal = orgPrincipal;
|
||||
}
|
||||
|
||||
public String getOrgTel() {
|
||||
return orgTel;
|
||||
}
|
||||
|
||||
public void setOrgTel(String orgTel) {
|
||||
this.orgTel = orgTel;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getAddStatus() {
|
||||
return addStatus;
|
||||
}
|
||||
|
||||
public void setAddStatus(String addStatus) {
|
||||
this.addStatus = addStatus;
|
||||
}
|
||||
|
||||
public String getUpdateStatus() {
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(String updateStatus) {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
public String getDeleteStatus() {
|
||||
return deleteStatus;
|
||||
}
|
||||
|
||||
public void setDeleteStatus(String deleteStatus) {
|
||||
this.deleteStatus = deleteStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,388 @@
|
|||
<?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.plugin.masterData.org.dao.impl.MdmOrgDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmOrgEntity-result" type="com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
|
||||
<result property="orgName" column="org_name" jdbcType="VARCHAR"/>
|
||||
<result property="orgAddress" column="org_address" jdbcType="VARCHAR"/>
|
||||
<result property="orgCountryzone" column="org_countryzone" jdbcType="VARCHAR"/>
|
||||
<result property="orgInnercode" column="org_innercode" jdbcType="VARCHAR"/>
|
||||
<result property="orgMemo" column="org_memo" jdbcType="VARCHAR"/>
|
||||
<result property="orgMnecode" column="org_mnecode" jdbcType="VARCHAR"/>
|
||||
<result property="orgNcindustry" column="org_ncindustry" jdbcType="VARCHAR"/>
|
||||
<result property="orgFatherorg" column="org_fatherorg" jdbcType="VARCHAR"/>
|
||||
<result property="orgPrincipal" column="org_principal" jdbcType="VARCHAR"/>
|
||||
<result property="orgTel" column="org_tel" jdbcType="VARCHAR"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||
<result property="deleteStatus" column="delete_status" 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 = "MdmOrgEntity_Base_Column_List">
|
||||
id
|
||||
,document_rule
|
||||
,document_rule_num
|
||||
,org_code
|
||||
,org_name
|
||||
,org_address
|
||||
,org_countryzone
|
||||
,org_innercode
|
||||
,org_memo
|
||||
,org_mnecode
|
||||
,org_ncindustry
|
||||
,org_fatherorg
|
||||
,org_principal
|
||||
,org_tel
|
||||
,data_status
|
||||
,add_status
|
||||
,update_status
|
||||
,delete_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmOrgEntity-result" parameterType = "com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity">
|
||||
select
|
||||
<include refid="MdmOrgEntity_Base_Column_List" />
|
||||
from mdm_org
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode} </if>
|
||||
<if test="orgName != null and orgName != ''"> and org_name = #{orgName} </if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> and org_address = #{orgAddress} </if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> and org_countryzone = #{orgCountryzone} </if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> and org_innercode = #{orgInnercode} </if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> and org_memo = #{orgMemo} </if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> and org_mnecode = #{orgMnecode} </if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> and org_ncindustry = #{orgNcindustry} </if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> and org_fatherorg = #{orgFatherorg} </if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> and org_principal = #{orgPrincipal} </if>
|
||||
<if test="orgTel != null and orgTel != ''"> and org_tel = #{orgTel} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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.plugin.masterData.org.entity.MdmOrgEntity">
|
||||
select count(1) from mdm_org
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode} </if>
|
||||
<if test="orgName != null and orgName != ''"> and org_name = #{orgName} </if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> and org_address = #{orgAddress} </if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> and org_countryzone = #{orgCountryzone} </if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> and org_innercode = #{orgInnercode} </if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> and org_memo = #{orgMemo} </if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> and org_mnecode = #{orgMnecode} </if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> and org_ncindustry = #{orgNcindustry} </if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> and org_fatherorg = #{orgFatherorg} </if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> and org_principal = #{orgPrincipal} </if>
|
||||
<if test="orgTel != null and orgTel != ''"> and org_tel = #{orgTel} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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-MdmOrgEntity-result" parameterType = "com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity">
|
||||
select
|
||||
<include refid="MdmOrgEntity_Base_Column_List" />
|
||||
from mdm_org
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
||||
<if test="orgCode != null and orgCode != ''"> and org_code like concat('%',#{orgCode},'%') </if>
|
||||
<if test="orgName != null and orgName != ''"> and org_name like concat('%',#{orgName},'%') </if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> and org_address like concat('%',#{orgAddress},'%') </if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> and org_countryzone like concat('%',#{orgCountryzone},'%') </if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> and org_innercode like concat('%',#{orgInnercode},'%') </if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> and org_memo like concat('%',#{orgMemo},'%') </if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> and org_mnecode like concat('%',#{orgMnecode},'%') </if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> and org_ncindustry like concat('%',#{orgNcindustry},'%') </if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> and org_fatherorg like concat('%',#{orgFatherorg},'%') </if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> and org_principal like concat('%',#{orgPrincipal},'%') </if>
|
||||
<if test="orgTel != null and orgTel != ''"> and org_tel like concat('%',#{orgTel},'%') </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </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="MdmOrgentity_list_or" resultMap="get-MdmOrgEntity-result" parameterType = "com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity">
|
||||
select
|
||||
<include refid="MdmOrgEntity_Base_Column_List" />
|
||||
from mdm_org
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="orgCode != null and orgCode != ''"> or org_code = #{orgCode} </if>
|
||||
<if test="orgName != null and orgName != ''"> or org_name = #{orgName} </if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> or org_address = #{orgAddress} </if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> or org_countryzone = #{orgCountryzone} </if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> or org_innercode = #{orgInnercode} </if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> or org_memo = #{orgMemo} </if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> or org_mnecode = #{orgMnecode} </if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> or org_ncindustry = #{orgNcindustry} </if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> or org_fatherorg = #{orgFatherorg} </if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> or org_principal = #{orgPrincipal} </if>
|
||||
<if test="orgTel != null and orgTel != ''"> or org_tel = #{orgTel} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </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.plugin.masterData.org.entity.MdmOrgEntity" >
|
||||
insert into mdm_org(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
||||
<if test="documentRuleNum != null"> document_rule_num , </if>
|
||||
<if test="orgCode != null and orgCode != ''"> org_code , </if>
|
||||
<if test="orgName != null and orgName != ''"> org_name , </if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> org_address , </if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> org_countryzone , </if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> org_innercode , </if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> org_memo , </if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> org_mnecode , </if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> org_ncindustry , </if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> org_fatherorg , </if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> org_principal , </if>
|
||||
<if test="orgTel != null and orgTel != ''"> org_tel , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </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="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
||||
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
||||
<if test="orgCode != null and orgCode != ''"> #{orgCode} ,</if>
|
||||
<if test="orgName != null and orgName != ''"> #{orgName} ,</if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> #{orgAddress} ,</if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> #{orgCountryzone} ,</if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> #{orgInnercode} ,</if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> #{orgMemo} ,</if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> #{orgMnecode} ,</if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> #{orgNcindustry} ,</if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> #{orgFatherorg} ,</if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> #{orgPrincipal} ,</if>
|
||||
<if test="orgTel != null and orgTel != ''"> #{orgTel} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</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_org a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_org(document_rule, document_rule_num, org_code, org_name, org_address, org_countryzone, org_innercode, org_memo, org_mnecode, org_ncindustry, org_fatherorg, org_principal, org_tel, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.orgCode},#{entity.orgName},#{entity.orgAddress},#{entity.orgCountryzone},#{entity.orgInnercode},#{entity.orgMemo},#{entity.orgMnecode},#{entity.orgNcindustry},#{entity.orgFatherorg},#{entity.orgPrincipal},#{entity.orgTel},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{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 mdm_org(document_rule, document_rule_num, org_code, org_name, org_address, org_countryzone, org_innercode, org_memo, org_mnecode, org_ncindustry, org_fatherorg, org_principal, org_tel, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.orgCode},#{entity.orgName},#{entity.orgAddress},#{entity.orgCountryzone},#{entity.orgInnercode},#{entity.orgMemo},#{entity.orgMnecode},#{entity.orgNcindustry},#{entity.orgFatherorg},#{entity.orgPrincipal},#{entity.orgTel},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{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
|
||||
document_rule = values(document_rule),
|
||||
document_rule_num = values(document_rule_num),
|
||||
org_code = values(org_code),
|
||||
org_name = values(org_name),
|
||||
org_address = values(org_address),
|
||||
org_countryzone = values(org_countryzone),
|
||||
org_innercode = values(org_innercode),
|
||||
org_memo = values(org_memo),
|
||||
org_mnecode = values(org_mnecode),
|
||||
org_ncindustry = values(org_ncindustry),
|
||||
org_fatherorg = values(org_fatherorg),
|
||||
org_principal = values(org_principal),
|
||||
org_tel = values(org_tel),
|
||||
data_status = values(data_status),
|
||||
add_status = values(add_status),
|
||||
update_status = values(update_status),
|
||||
delete_status = values(delete_status),
|
||||
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.plugin.masterData.org.entity.MdmOrgEntity" >
|
||||
update mdm_org set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
||||
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
||||
<if test="orgCode != null and orgCode != ''"> org_code = #{orgCode},</if>
|
||||
<if test="orgName != null and orgName != ''"> org_name = #{orgName},</if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> org_address = #{orgAddress},</if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> org_countryzone = #{orgCountryzone},</if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> org_innercode = #{orgInnercode},</if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> org_memo = #{orgMemo},</if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> org_mnecode = #{orgMnecode},</if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> org_ncindustry = #{orgNcindustry},</if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> org_fatherorg = #{orgFatherorg},</if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> org_principal = #{orgPrincipal},</if>
|
||||
<if test="orgTel != null and orgTel != ''"> org_tel = #{orgTel},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</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.plugin.masterData.org.entity.MdmOrgEntity" >
|
||||
update mdm_org 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.plugin.masterData.org.entity.MdmOrgEntity" >
|
||||
update mdm_org 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="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode} </if>
|
||||
<if test="orgName != null and orgName != ''"> and org_name = #{orgName} </if>
|
||||
<if test="orgAddress != null and orgAddress != ''"> and org_address = #{orgAddress} </if>
|
||||
<if test="orgCountryzone != null and orgCountryzone != ''"> and org_countryzone = #{orgCountryzone} </if>
|
||||
<if test="orgInnercode != null and orgInnercode != ''"> and org_innercode = #{orgInnercode} </if>
|
||||
<if test="orgMemo != null and orgMemo != ''"> and org_memo = #{orgMemo} </if>
|
||||
<if test="orgMnecode != null and orgMnecode != ''"> and org_mnecode = #{orgMnecode} </if>
|
||||
<if test="orgNcindustry != null and orgNcindustry != ''"> and org_ncindustry = #{orgNcindustry} </if>
|
||||
<if test="orgFatherorg != null and orgFatherorg != ''"> and org_fatherorg = #{orgFatherorg} </if>
|
||||
<if test="orgPrincipal != null and orgPrincipal != ''"> and org_principal = #{orgPrincipal} </if>
|
||||
<if test="orgTel != null and orgTel != ''"> and org_tel = #{orgTel} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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_org where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.hzya.frame.plugin.masterData.org.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.sysnew.comparison.masterData.service.impl.MasterDataOrgsServiceImpl;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 组织档案(MdmOrg)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:05
|
||||
*/
|
||||
public class MdmOrgPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmOrgPluginInitializer.class);
|
||||
@Autowired
|
||||
private MasterDataOrgsServiceImpl masterDataOrgsService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmOrgPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmOrgPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmOrgPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行主数据档案组织档案同步========");
|
||||
return masterDataOrgsService.queryOrgsArchives(requestJson);
|
||||
}catch (Exception e){
|
||||
logger.info("======执行主数据档案组织档案同步失败:{}========",e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.plugin.masterData.org.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity;
|
||||
|
||||
/**
|
||||
* 组织档案(MdmOrg)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:05
|
||||
*/
|
||||
public interface IMdmOrgService extends IBaseService<MdmOrgEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.plugin.masterData.org.service.impl;
|
||||
|
||||
|
||||
import com.hzya.frame.plugin.masterData.org.dao.IMdmOrgDao;
|
||||
import com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity;
|
||||
import com.hzya.frame.plugin.masterData.org.service.IMdmOrgService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 组织档案(MdmOrg)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:05
|
||||
*/
|
||||
public class MdmOrgServiceImpl extends BaseService<MdmOrgEntity, String> implements IMdmOrgService {
|
||||
|
||||
private IMdmOrgDao mdmOrgDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmOrgDao(IMdmOrgDao dao) {
|
||||
this.mdmOrgDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.plugin.masterData.project.dao;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity;
|
||||
|
||||
/**
|
||||
* 项目档案(mdm_project: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:29:23
|
||||
*/
|
||||
public interface IMdmProjectDao extends IBaseDao<MdmProjectEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.plugin.masterData.project.dao.impl;
|
||||
|
||||
|
||||
import com.hzya.frame.plugin.masterData.project.dao.IMdmProjectDao;
|
||||
import com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 项目档案(MdmProject)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:29:23
|
||||
*/
|
||||
public class MdmProjectDaoImpl extends MybatisGenericDao<MdmProjectEntity, String> implements IMdmProjectDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
package com.hzya.frame.plugin.masterData.project.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 项目档案(MdmProject)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:29:23
|
||||
*/
|
||||
public class MdmProjectEntity extends BaseEntity {
|
||||
|
||||
/** 单据规则 */
|
||||
private String documentRule;
|
||||
/** 单据规则流水号 */
|
||||
private Long documentRuleNum;
|
||||
/** 项目编码 */
|
||||
private String projectCode;
|
||||
/** 项目名称 */
|
||||
private String projectName;
|
||||
/** 单据类型 */
|
||||
private String projectBillType;
|
||||
/** 备注 */
|
||||
private String projectMemo;
|
||||
/** 币种 */
|
||||
private String projectCurrtype;
|
||||
/** 责任人 */
|
||||
private String projectDutier;
|
||||
/** 责任部门 */
|
||||
private String projectDutyDept;
|
||||
/** 管理组织 */
|
||||
private String projectOrg;
|
||||
/** 父项目 */
|
||||
private String projectParentpro;
|
||||
/** 项目简称 */
|
||||
private String projectShName;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 新增数据状态 0待下发 1已下发 */
|
||||
private String addStatus;
|
||||
/** 修改数据状态 0待下发 1已下发 */
|
||||
private String updateStatus;
|
||||
/** 删除数据状态 0待下发 1已下发 */
|
||||
private String deleteStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Long getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getProjectCode() {
|
||||
return projectCode;
|
||||
}
|
||||
|
||||
public void setProjectCode(String projectCode) {
|
||||
this.projectCode = projectCode;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getProjectBillType() {
|
||||
return projectBillType;
|
||||
}
|
||||
|
||||
public void setProjectBillType(String projectBillType) {
|
||||
this.projectBillType = projectBillType;
|
||||
}
|
||||
|
||||
public String getProjectMemo() {
|
||||
return projectMemo;
|
||||
}
|
||||
|
||||
public void setProjectMemo(String projectMemo) {
|
||||
this.projectMemo = projectMemo;
|
||||
}
|
||||
|
||||
public String getProjectCurrtype() {
|
||||
return projectCurrtype;
|
||||
}
|
||||
|
||||
public void setProjectCurrtype(String projectCurrtype) {
|
||||
this.projectCurrtype = projectCurrtype;
|
||||
}
|
||||
|
||||
public String getProjectDutier() {
|
||||
return projectDutier;
|
||||
}
|
||||
|
||||
public void setProjectDutier(String projectDutier) {
|
||||
this.projectDutier = projectDutier;
|
||||
}
|
||||
|
||||
public String getProjectDutyDept() {
|
||||
return projectDutyDept;
|
||||
}
|
||||
|
||||
public void setProjectDutyDept(String projectDutyDept) {
|
||||
this.projectDutyDept = projectDutyDept;
|
||||
}
|
||||
|
||||
public String getProjectOrg() {
|
||||
return projectOrg;
|
||||
}
|
||||
|
||||
public void setProjectOrg(String projectOrg) {
|
||||
this.projectOrg = projectOrg;
|
||||
}
|
||||
|
||||
public String getProjectParentpro() {
|
||||
return projectParentpro;
|
||||
}
|
||||
|
||||
public void setProjectParentpro(String projectParentpro) {
|
||||
this.projectParentpro = projectParentpro;
|
||||
}
|
||||
|
||||
public String getProjectShName() {
|
||||
return projectShName;
|
||||
}
|
||||
|
||||
public void setProjectShName(String projectShName) {
|
||||
this.projectShName = projectShName;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getAddStatus() {
|
||||
return addStatus;
|
||||
}
|
||||
|
||||
public void setAddStatus(String addStatus) {
|
||||
this.addStatus = addStatus;
|
||||
}
|
||||
|
||||
public String getUpdateStatus() {
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(String updateStatus) {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
public String getDeleteStatus() {
|
||||
return deleteStatus;
|
||||
}
|
||||
|
||||
public void setDeleteStatus(String deleteStatus) {
|
||||
this.deleteStatus = deleteStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,377 @@
|
|||
<?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.plugin.masterData.project.dao.impl.MdmProjectDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmProjectEntity-result" type="com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||
<result property="projectCode" column="project_code" jdbcType="VARCHAR"/>
|
||||
<result property="projectName" column="project_name" jdbcType="VARCHAR"/>
|
||||
<result property="projectBillType" column="project_bill_type" jdbcType="VARCHAR"/>
|
||||
<result property="projectMemo" column="project_memo" jdbcType="VARCHAR"/>
|
||||
<result property="projectCurrtype" column="project_currtype" jdbcType="VARCHAR"/>
|
||||
<result property="projectDutier" column="project_dutier" jdbcType="VARCHAR"/>
|
||||
<result property="projectDutyDept" column="project_duty_dept" jdbcType="VARCHAR"/>
|
||||
<result property="projectOrg" column="project_org" jdbcType="VARCHAR"/>
|
||||
<result property="projectParentpro" column="project_parentpro" jdbcType="VARCHAR"/>
|
||||
<result property="projectShName" column="project_sh_name" jdbcType="VARCHAR"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||
<result property="deleteStatus" column="delete_status" 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 = "MdmProjectEntity_Base_Column_List">
|
||||
id
|
||||
,document_rule
|
||||
,document_rule_num
|
||||
,project_code
|
||||
,project_name
|
||||
,project_bill_type
|
||||
,project_memo
|
||||
,project_currtype
|
||||
,project_dutier
|
||||
,project_duty_dept
|
||||
,project_org
|
||||
,project_parentpro
|
||||
,project_sh_name
|
||||
,data_status
|
||||
,add_status
|
||||
,update_status
|
||||
,delete_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmProjectEntity-result" parameterType = "com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity">
|
||||
select
|
||||
<include refid="MdmProjectEntity_Base_Column_List" />
|
||||
from mdm_project
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="projectCode != null and projectCode != ''"> and project_code = #{projectCode} </if>
|
||||
<if test="projectName != null and projectName != ''"> and project_name = #{projectName} </if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> and project_bill_type = #{projectBillType} </if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> and project_memo = #{projectMemo} </if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> and project_currtype = #{projectCurrtype} </if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> and project_dutier = #{projectDutier} </if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> and project_duty_dept = #{projectDutyDept} </if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> and project_org = #{projectOrg} </if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> and project_parentpro = #{projectParentpro} </if>
|
||||
<if test="projectShName != null and projectShName != ''"> and project_sh_name = #{projectShName} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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.plugin.masterData.project.entity.MdmProjectEntity">
|
||||
select count(1) from mdm_project
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="projectCode != null and projectCode != ''"> and project_code = #{projectCode} </if>
|
||||
<if test="projectName != null and projectName != ''"> and project_name = #{projectName} </if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> and project_bill_type = #{projectBillType} </if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> and project_memo = #{projectMemo} </if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> and project_currtype = #{projectCurrtype} </if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> and project_dutier = #{projectDutier} </if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> and project_duty_dept = #{projectDutyDept} </if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> and project_org = #{projectOrg} </if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> and project_parentpro = #{projectParentpro} </if>
|
||||
<if test="projectShName != null and projectShName != ''"> and project_sh_name = #{projectShName} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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-MdmProjectEntity-result" parameterType = "com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity">
|
||||
select
|
||||
<include refid="MdmProjectEntity_Base_Column_List" />
|
||||
from mdm_project
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
||||
<if test="projectCode != null and projectCode != ''"> and project_code like concat('%',#{projectCode},'%') </if>
|
||||
<if test="projectName != null and projectName != ''"> and project_name like concat('%',#{projectName},'%') </if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> and project_bill_type like concat('%',#{projectBillType},'%') </if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> and project_memo like concat('%',#{projectMemo},'%') </if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> and project_currtype like concat('%',#{projectCurrtype},'%') </if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> and project_dutier like concat('%',#{projectDutier},'%') </if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> and project_duty_dept like concat('%',#{projectDutyDept},'%') </if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> and project_org like concat('%',#{projectOrg},'%') </if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> and project_parentpro like concat('%',#{projectParentpro},'%') </if>
|
||||
<if test="projectShName != null and projectShName != ''"> and project_sh_name like concat('%',#{projectShName},'%') </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </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="MdmProjectentity_list_or" resultMap="get-MdmProjectEntity-result" parameterType = "com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity">
|
||||
select
|
||||
<include refid="MdmProjectEntity_Base_Column_List" />
|
||||
from mdm_project
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="projectCode != null and projectCode != ''"> or project_code = #{projectCode} </if>
|
||||
<if test="projectName != null and projectName != ''"> or project_name = #{projectName} </if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> or project_bill_type = #{projectBillType} </if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> or project_memo = #{projectMemo} </if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> or project_currtype = #{projectCurrtype} </if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> or project_dutier = #{projectDutier} </if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> or project_duty_dept = #{projectDutyDept} </if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> or project_org = #{projectOrg} </if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> or project_parentpro = #{projectParentpro} </if>
|
||||
<if test="projectShName != null and projectShName != ''"> or project_sh_name = #{projectShName} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </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.plugin.masterData.project.entity.MdmProjectEntity" >
|
||||
insert into mdm_project(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
||||
<if test="documentRuleNum != null"> document_rule_num , </if>
|
||||
<if test="projectCode != null and projectCode != ''"> project_code , </if>
|
||||
<if test="projectName != null and projectName != ''"> project_name , </if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> project_bill_type , </if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> project_memo , </if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> project_currtype , </if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> project_dutier , </if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> project_duty_dept , </if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> project_org , </if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> project_parentpro , </if>
|
||||
<if test="projectShName != null and projectShName != ''"> project_sh_name , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </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="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
||||
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
||||
<if test="projectCode != null and projectCode != ''"> #{projectCode} ,</if>
|
||||
<if test="projectName != null and projectName != ''"> #{projectName} ,</if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> #{projectBillType} ,</if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> #{projectMemo} ,</if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> #{projectCurrtype} ,</if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> #{projectDutier} ,</if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> #{projectDutyDept} ,</if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> #{projectOrg} ,</if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> #{projectParentpro} ,</if>
|
||||
<if test="projectShName != null and projectShName != ''"> #{projectShName} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</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_project a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_project(document_rule, document_rule_num, project_code, project_name, project_bill_type, project_memo, project_currtype, project_dutier, project_duty_dept, project_org, project_parentpro, project_sh_name, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.projectCode},#{entity.projectName},#{entity.projectBillType},#{entity.projectMemo},#{entity.projectCurrtype},#{entity.projectDutier},#{entity.projectDutyDept},#{entity.projectOrg},#{entity.projectParentpro},#{entity.projectShName},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{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 mdm_project(document_rule, document_rule_num, project_code, project_name, project_bill_type, project_memo, project_currtype, project_dutier, project_duty_dept, project_org, project_parentpro, project_sh_name, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.projectCode},#{entity.projectName},#{entity.projectBillType},#{entity.projectMemo},#{entity.projectCurrtype},#{entity.projectDutier},#{entity.projectDutyDept},#{entity.projectOrg},#{entity.projectParentpro},#{entity.projectShName},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{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
|
||||
document_rule = values(document_rule),
|
||||
document_rule_num = values(document_rule_num),
|
||||
project_code = values(project_code),
|
||||
project_name = values(project_name),
|
||||
project_bill_type = values(project_bill_type),
|
||||
project_memo = values(project_memo),
|
||||
project_currtype = values(project_currtype),
|
||||
project_dutier = values(project_dutier),
|
||||
project_duty_dept = values(project_duty_dept),
|
||||
project_org = values(project_org),
|
||||
project_parentpro = values(project_parentpro),
|
||||
project_sh_name = values(project_sh_name),
|
||||
data_status = values(data_status),
|
||||
add_status = values(add_status),
|
||||
update_status = values(update_status),
|
||||
delete_status = values(delete_status),
|
||||
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.plugin.masterData.project.entity.MdmProjectEntity" >
|
||||
update mdm_project set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
||||
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
||||
<if test="projectCode != null and projectCode != ''"> project_code = #{projectCode},</if>
|
||||
<if test="projectName != null and projectName != ''"> project_name = #{projectName},</if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> project_bill_type = #{projectBillType},</if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> project_memo = #{projectMemo},</if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> project_currtype = #{projectCurrtype},</if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> project_dutier = #{projectDutier},</if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> project_duty_dept = #{projectDutyDept},</if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> project_org = #{projectOrg},</if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> project_parentpro = #{projectParentpro},</if>
|
||||
<if test="projectShName != null and projectShName != ''"> project_sh_name = #{projectShName},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</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.plugin.masterData.project.entity.MdmProjectEntity" >
|
||||
update mdm_project 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.plugin.masterData.project.entity.MdmProjectEntity" >
|
||||
update mdm_project 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="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="projectCode != null and projectCode != ''"> and project_code = #{projectCode} </if>
|
||||
<if test="projectName != null and projectName != ''"> and project_name = #{projectName} </if>
|
||||
<if test="projectBillType != null and projectBillType != ''"> and project_bill_type = #{projectBillType} </if>
|
||||
<if test="projectMemo != null and projectMemo != ''"> and project_memo = #{projectMemo} </if>
|
||||
<if test="projectCurrtype != null and projectCurrtype != ''"> and project_currtype = #{projectCurrtype} </if>
|
||||
<if test="projectDutier != null and projectDutier != ''"> and project_dutier = #{projectDutier} </if>
|
||||
<if test="projectDutyDept != null and projectDutyDept != ''"> and project_duty_dept = #{projectDutyDept} </if>
|
||||
<if test="projectOrg != null and projectOrg != ''"> and project_org = #{projectOrg} </if>
|
||||
<if test="projectParentpro != null and projectParentpro != ''"> and project_parentpro = #{projectParentpro} </if>
|
||||
<if test="projectShName != null and projectShName != ''"> and project_sh_name = #{projectShName} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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_project where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.hzya.frame.plugin.masterData.project.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.sysnew.comparison.masterData.service.impl.MasterDataProjectServiceImpl;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 项目档案(MdmProject)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:29:23
|
||||
*/
|
||||
public class MdmProjectPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmProjectPluginInitializer.class);
|
||||
|
||||
@Autowired
|
||||
private MasterDataProjectServiceImpl masterDataProjectService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmProjectPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmProjectPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmProjectPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("=====开始执行主数据档案项目档案同步=======");
|
||||
JsonResultEntity jsonResultEntity = masterDataProjectService.queryProjectArchives(requestJson);
|
||||
return jsonResultEntity;
|
||||
}catch (Exception e){
|
||||
logger.info("======执行主数据档案项目档案同步失败:{}",e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.plugin.masterData.project.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity;
|
||||
|
||||
/**
|
||||
* 项目档案(MdmProject)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:29:23
|
||||
*/
|
||||
public interface IMdmProjectService extends IBaseService<MdmProjectEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.plugin.masterData.project.service.impl;
|
||||
|
||||
|
||||
import com.hzya.frame.plugin.masterData.project.dao.IMdmProjectDao;
|
||||
import com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity;
|
||||
import com.hzya.frame.plugin.masterData.project.service.IMdmProjectService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 项目档案(MdmProject)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:29:23
|
||||
*/
|
||||
public class MdmProjectServiceImpl extends BaseService<MdmProjectEntity, String> implements IMdmProjectService {
|
||||
|
||||
private IMdmProjectDao mdmProjectDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmProjectDao(IMdmProjectDao dao) {
|
||||
this.mdmProjectDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.user.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity;
|
||||
|
||||
/**
|
||||
* 用户档案(mdm_user: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 14:52:30
|
||||
*/
|
||||
public interface IMdmUserDao extends IBaseDao<MdmUserEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.user.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.plugin.masterData.user.dao.IMdmUserDao;
|
||||
import com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity;
|
||||
/**
|
||||
* 用户档案(MdmUser)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 14:52:30
|
||||
*/
|
||||
public class MdmUserDaoImpl extends MybatisGenericDao<MdmUserEntity, String> implements IMdmUserDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
package com.hzya.frame.plugin.masterData.user.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 用户档案(MdmUser)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 14:52:30
|
||||
*/
|
||||
public class MdmUserEntity extends BaseEntity {
|
||||
|
||||
/** 单据规则 */
|
||||
private String documentRule;
|
||||
/** 单据规则流水号 */
|
||||
private Long documentRuleNum;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 新增数据状态 0待下发 1已下发 */
|
||||
private String addStatus;
|
||||
/** 修改数据状态 0待下发 1已下发 */
|
||||
private String updateStatus;
|
||||
/** 删除数据状态 0待下发 1已下发 */
|
||||
private String deleteStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 用户名称 */
|
||||
private String userName;
|
||||
/** 用户编码 */
|
||||
private String userCode;
|
||||
/** 用户密码 */
|
||||
private String userPassword;
|
||||
/** 密码安全级别 */
|
||||
private String pwdlevelcode;
|
||||
/** 密码参数 */
|
||||
private String pwdparam;
|
||||
/** 备注 */
|
||||
private String userNote;
|
||||
/** 生效日期 */
|
||||
private String abledate;
|
||||
/** 失效日期 */
|
||||
private String disabledate;
|
||||
/** 锁定 */
|
||||
private String islocked;
|
||||
/** 用户类型 */
|
||||
private String userType;
|
||||
/** 身份类型 */
|
||||
private String baseDocType;
|
||||
/** 身份 */
|
||||
private String pkBaseDoc;
|
||||
/** 认证类型 */
|
||||
private String identityverifycode;
|
||||
/** 所属组织 */
|
||||
private String pkOrg;
|
||||
/** 数据格式 */
|
||||
private String format;
|
||||
/** CA用户 */
|
||||
private String isca;
|
||||
/** 启用状态 */
|
||||
private String enablestate;
|
||||
/** 内容语种 */
|
||||
private String contentlang;
|
||||
/** 用户编码 */
|
||||
private String userCodeQ;
|
||||
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Long getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getAddStatus() {
|
||||
return addStatus;
|
||||
}
|
||||
|
||||
public void setAddStatus(String addStatus) {
|
||||
this.addStatus = addStatus;
|
||||
}
|
||||
|
||||
public String getUpdateStatus() {
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(String updateStatus) {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
public String getDeleteStatus() {
|
||||
return deleteStatus;
|
||||
}
|
||||
|
||||
public void setDeleteStatus(String deleteStatus) {
|
||||
this.deleteStatus = deleteStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserCode() {
|
||||
return userCode;
|
||||
}
|
||||
|
||||
public void setUserCode(String userCode) {
|
||||
this.userCode = userCode;
|
||||
}
|
||||
|
||||
public String getUserPassword() {
|
||||
return userPassword;
|
||||
}
|
||||
|
||||
public void setUserPassword(String userPassword) {
|
||||
this.userPassword = userPassword;
|
||||
}
|
||||
|
||||
public String getPwdlevelcode() {
|
||||
return pwdlevelcode;
|
||||
}
|
||||
|
||||
public void setPwdlevelcode(String pwdlevelcode) {
|
||||
this.pwdlevelcode = pwdlevelcode;
|
||||
}
|
||||
|
||||
public String getPwdparam() {
|
||||
return pwdparam;
|
||||
}
|
||||
|
||||
public void setPwdparam(String pwdparam) {
|
||||
this.pwdparam = pwdparam;
|
||||
}
|
||||
|
||||
public String getUserNote() {
|
||||
return userNote;
|
||||
}
|
||||
|
||||
public void setUserNote(String userNote) {
|
||||
this.userNote = userNote;
|
||||
}
|
||||
|
||||
public String getAbledate() {
|
||||
return abledate;
|
||||
}
|
||||
|
||||
public void setAbledate(String abledate) {
|
||||
this.abledate = abledate;
|
||||
}
|
||||
|
||||
public String getDisabledate() {
|
||||
return disabledate;
|
||||
}
|
||||
|
||||
public void setDisabledate(String disabledate) {
|
||||
this.disabledate = disabledate;
|
||||
}
|
||||
|
||||
public String getIslocked() {
|
||||
return islocked;
|
||||
}
|
||||
|
||||
public void setIslocked(String islocked) {
|
||||
this.islocked = islocked;
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getBaseDocType() {
|
||||
return baseDocType;
|
||||
}
|
||||
|
||||
public void setBaseDocType(String baseDocType) {
|
||||
this.baseDocType = baseDocType;
|
||||
}
|
||||
|
||||
public String getPkBaseDoc() {
|
||||
return pkBaseDoc;
|
||||
}
|
||||
|
||||
public void setPkBaseDoc(String pkBaseDoc) {
|
||||
this.pkBaseDoc = pkBaseDoc;
|
||||
}
|
||||
|
||||
public String getIdentityverifycode() {
|
||||
return identityverifycode;
|
||||
}
|
||||
|
||||
public void setIdentityverifycode(String identityverifycode) {
|
||||
this.identityverifycode = identityverifycode;
|
||||
}
|
||||
|
||||
public String getPkOrg() {
|
||||
return pkOrg;
|
||||
}
|
||||
|
||||
public void setPkOrg(String pkOrg) {
|
||||
this.pkOrg = pkOrg;
|
||||
}
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
public String getIsca() {
|
||||
return isca;
|
||||
}
|
||||
|
||||
public void setIsca(String isca) {
|
||||
this.isca = isca;
|
||||
}
|
||||
|
||||
public String getEnablestate() {
|
||||
return enablestate;
|
||||
}
|
||||
|
||||
public void setEnablestate(String enablestate) {
|
||||
this.enablestate = enablestate;
|
||||
}
|
||||
|
||||
public String getContentlang() {
|
||||
return contentlang;
|
||||
}
|
||||
|
||||
public void setContentlang(String contentlang) {
|
||||
this.contentlang = contentlang;
|
||||
}
|
||||
|
||||
public String getUserCodeQ() {
|
||||
return userCodeQ;
|
||||
}
|
||||
|
||||
public void setUserCodeQ(String userCodeQ) {
|
||||
this.userCodeQ = userCodeQ;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,476 @@
|
|||
<?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.plugin.masterData.user.dao.impl.MdmUserDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmUserEntity-result" type="com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||
<result property="deleteStatus" column="delete_status" 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"/>
|
||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||
<result property="userCode" column="user_code" jdbcType="VARCHAR"/>
|
||||
<result property="userPassword" column="user_password" jdbcType="VARCHAR"/>
|
||||
<result property="pwdlevelcode" column="pwdlevelcode" jdbcType="VARCHAR"/>
|
||||
<result property="pwdparam" column="pwdparam" jdbcType="VARCHAR"/>
|
||||
<result property="userNote" column="user_note" jdbcType="VARCHAR"/>
|
||||
<result property="abledate" column="abledate" jdbcType="VARCHAR"/>
|
||||
<result property="disabledate" column="disabledate" jdbcType="VARCHAR"/>
|
||||
<result property="islocked" column="islocked" jdbcType="VARCHAR"/>
|
||||
<result property="userType" column="user_type" jdbcType="VARCHAR"/>
|
||||
<result property="baseDocType" column="base_doc_type" jdbcType="VARCHAR"/>
|
||||
<result property="pkBaseDoc" column="pk_base_doc" jdbcType="VARCHAR"/>
|
||||
<result property="identityverifycode" column="identityverifycode" jdbcType="VARCHAR"/>
|
||||
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
|
||||
<result property="format" column="format" jdbcType="VARCHAR"/>
|
||||
<result property="isca" column="isca" jdbcType="VARCHAR"/>
|
||||
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
||||
<result property="contentlang" column="contentlang" jdbcType="VARCHAR"/>
|
||||
<result property="userCodeQ" column="user_code_q" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmUserEntity_Base_Column_List">
|
||||
id
|
||||
,document_rule
|
||||
,document_rule_num
|
||||
,data_status
|
||||
,add_status
|
||||
,update_status
|
||||
,delete_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,user_name
|
||||
,user_code
|
||||
,user_password
|
||||
,pwdlevelcode
|
||||
,pwdparam
|
||||
,user_note
|
||||
,abledate
|
||||
,disabledate
|
||||
,islocked
|
||||
,user_type
|
||||
,base_doc_type
|
||||
,pk_base_doc
|
||||
,identityverifycode
|
||||
,pk_org
|
||||
,format
|
||||
,isca
|
||||
,enablestate
|
||||
,contentlang
|
||||
,user_code_q
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmUserEntity-result" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
||||
select
|
||||
<include refid="MdmUserEntity_Base_Column_List" />
|
||||
from mdm_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
||||
<if test="userCode != null and userCode != ''"> and user_code = #{userCode} </if>
|
||||
<if test="userPassword != null and userPassword != ''"> and user_password = #{userPassword} </if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode = #{pwdlevelcode} </if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> and pwdparam = #{pwdparam} </if>
|
||||
<if test="userNote != null and userNote != ''"> and user_note = #{userNote} </if>
|
||||
<if test="abledate != null and abledate != ''"> and abledate = #{abledate} </if>
|
||||
<if test="disabledate != null and disabledate != ''"> and disabledate = #{disabledate} </if>
|
||||
<if test="islocked != null and islocked != ''"> and islocked = #{islocked} </if>
|
||||
<if test="userType != null and userType != ''"> and user_type = #{userType} </if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type = #{baseDocType} </if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc = #{pkBaseDoc} </if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode = #{identityverifycode} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="format != null and format != ''"> and format = #{format} </if>
|
||||
<if test="isca != null and isca != ''"> and isca = #{isca} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="contentlang != null and contentlang != ''"> and contentlang = #{contentlang} </if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q = #{userCodeQ} </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.plugin.masterData.user.entity.MdmUserEntity">
|
||||
select count(1) from mdm_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
||||
<if test="userCode != null and userCode != ''"> and user_code = #{userCode} </if>
|
||||
<if test="userPassword != null and userPassword != ''"> and user_password = #{userPassword} </if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode = #{pwdlevelcode} </if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> and pwdparam = #{pwdparam} </if>
|
||||
<if test="userNote != null and userNote != ''"> and user_note = #{userNote} </if>
|
||||
<if test="abledate != null and abledate != ''"> and abledate = #{abledate} </if>
|
||||
<if test="disabledate != null and disabledate != ''"> and disabledate = #{disabledate} </if>
|
||||
<if test="islocked != null and islocked != ''"> and islocked = #{islocked} </if>
|
||||
<if test="userType != null and userType != ''"> and user_type = #{userType} </if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type = #{baseDocType} </if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc = #{pkBaseDoc} </if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode = #{identityverifycode} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="format != null and format != ''"> and format = #{format} </if>
|
||||
<if test="isca != null and isca != ''"> and isca = #{isca} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="contentlang != null and contentlang != ''"> and contentlang = #{contentlang} </if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q = #{userCodeQ} </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-MdmUserEntity-result" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
||||
select
|
||||
<include refid="MdmUserEntity_Base_Column_List" />
|
||||
from mdm_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </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>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%',#{userName},'%') </if>
|
||||
<if test="userCode != null and userCode != ''"> and user_code like concat('%',#{userCode},'%') </if>
|
||||
<if test="userPassword != null and userPassword != ''"> and user_password like concat('%',#{userPassword},'%') </if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode like concat('%',#{pwdlevelcode},'%') </if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> and pwdparam like concat('%',#{pwdparam},'%') </if>
|
||||
<if test="userNote != null and userNote != ''"> and user_note like concat('%',#{userNote},'%') </if>
|
||||
<if test="abledate != null and abledate != ''"> and abledate like concat('%',#{abledate},'%') </if>
|
||||
<if test="disabledate != null and disabledate != ''"> and disabledate like concat('%',#{disabledate},'%') </if>
|
||||
<if test="islocked != null and islocked != ''"> and islocked like concat('%',#{islocked},'%') </if>
|
||||
<if test="userType != null and userType != ''"> and user_type like concat('%',#{userType},'%') </if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type like concat('%',#{baseDocType},'%') </if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc like concat('%',#{pkBaseDoc},'%') </if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode like concat('%',#{identityverifycode},'%') </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org like concat('%',#{pkOrg},'%') </if>
|
||||
<if test="format != null and format != ''"> and format like concat('%',#{format},'%') </if>
|
||||
<if test="isca != null and isca != ''"> and isca like concat('%',#{isca},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="contentlang != null and contentlang != ''"> and contentlang like concat('%',#{contentlang},'%') </if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q like concat('%',#{userCodeQ},'%') </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="MdmUserentity_list_or" resultMap="get-MdmUserEntity-result" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
||||
select
|
||||
<include refid="MdmUserEntity_Base_Column_List" />
|
||||
from mdm_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </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>
|
||||
<if test="userName != null and userName != ''"> or user_name = #{userName} </if>
|
||||
<if test="userCode != null and userCode != ''"> or user_code = #{userCode} </if>
|
||||
<if test="userPassword != null and userPassword != ''"> or user_password = #{userPassword} </if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> or pwdlevelcode = #{pwdlevelcode} </if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> or pwdparam = #{pwdparam} </if>
|
||||
<if test="userNote != null and userNote != ''"> or user_note = #{userNote} </if>
|
||||
<if test="abledate != null and abledate != ''"> or abledate = #{abledate} </if>
|
||||
<if test="disabledate != null and disabledate != ''"> or disabledate = #{disabledate} </if>
|
||||
<if test="islocked != null and islocked != ''"> or islocked = #{islocked} </if>
|
||||
<if test="userType != null and userType != ''"> or user_type = #{userType} </if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> or base_doc_type = #{baseDocType} </if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> or pk_base_doc = #{pkBaseDoc} </if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> or identityverifycode = #{identityverifycode} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> or pk_org = #{pkOrg} </if>
|
||||
<if test="format != null and format != ''"> or format = #{format} </if>
|
||||
<if test="isca != null and isca != ''"> or isca = #{isca} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
||||
<if test="contentlang != null and contentlang != ''"> or contentlang = #{contentlang} </if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> or user_code_q = #{userCodeQ} </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.plugin.masterData.user.entity.MdmUserEntity" >
|
||||
insert into mdm_user(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
||||
<if test="documentRuleNum != null"> document_rule_num , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </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="userName != null and userName != ''"> user_name , </if>
|
||||
<if test="userCode != null and userCode != ''"> user_code , </if>
|
||||
<if test="userPassword != null and userPassword != ''"> user_password , </if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> pwdlevelcode , </if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> pwdparam , </if>
|
||||
<if test="userNote != null and userNote != ''"> user_note , </if>
|
||||
<if test="abledate != null and abledate != ''"> abledate , </if>
|
||||
<if test="disabledate != null and disabledate != ''"> disabledate , </if>
|
||||
<if test="islocked != null and islocked != ''"> islocked , </if>
|
||||
<if test="userType != null and userType != ''"> user_type , </if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> base_doc_type , </if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> pk_base_doc , </if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> identityverifycode , </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> pk_org , </if>
|
||||
<if test="format != null and format != ''"> format , </if>
|
||||
<if test="isca != null and isca != ''"> isca , </if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
||||
<if test="contentlang != null and contentlang != ''"> contentlang , </if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> user_code_q , </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="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
||||
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</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="userName != null and userName != ''"> #{userName} ,</if>
|
||||
<if test="userCode != null and userCode != ''"> #{userCode} ,</if>
|
||||
<if test="userPassword != null and userPassword != ''"> #{userPassword} ,</if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> #{pwdlevelcode} ,</if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> #{pwdparam} ,</if>
|
||||
<if test="userNote != null and userNote != ''"> #{userNote} ,</if>
|
||||
<if test="abledate != null and abledate != ''"> #{abledate} ,</if>
|
||||
<if test="disabledate != null and disabledate != ''"> #{disabledate} ,</if>
|
||||
<if test="islocked != null and islocked != ''"> #{islocked} ,</if>
|
||||
<if test="userType != null and userType != ''"> #{userType} ,</if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> #{baseDocType} ,</if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> #{pkBaseDoc} ,</if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> #{identityverifycode} ,</if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> #{pkOrg} ,</if>
|
||||
<if test="format != null and format != ''"> #{format} ,</if>
|
||||
<if test="isca != null and isca != ''"> #{isca} ,</if>
|
||||
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
||||
<if test="contentlang != null and contentlang != ''"> #{contentlang} ,</if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> #{userCodeQ} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_user a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_user(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, user_name, user_code, user_password, pwdlevelcode, pwdparam, user_note, abledate, disabledate, islocked, user_type, base_doc_type, pk_base_doc, identityverifycode, pk_org, format, isca, enablestate, contentlang, user_code_q, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.userName},#{entity.userCode},#{entity.userPassword},#{entity.pwdlevelcode},#{entity.pwdparam},#{entity.userNote},#{entity.abledate},#{entity.disabledate},#{entity.islocked},#{entity.userType},#{entity.baseDocType},#{entity.pkBaseDoc},#{entity.identityverifycode},#{entity.pkOrg},#{entity.format},#{entity.isca},#{entity.enablestate},#{entity.contentlang},#{entity.userCodeQ}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into mdm_user(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, user_name, user_code, user_password, pwdlevelcode, pwdparam, user_note, abledate, disabledate, islocked, user_type, base_doc_type, pk_base_doc, identityverifycode, pk_org, format, isca, enablestate, contentlang, user_code_q)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.userName},#{entity.userCode},#{entity.userPassword},#{entity.pwdlevelcode},#{entity.pwdparam},#{entity.userNote},#{entity.abledate},#{entity.disabledate},#{entity.islocked},#{entity.userType},#{entity.baseDocType},#{entity.pkBaseDoc},#{entity.identityverifycode},#{entity.pkOrg},#{entity.format},#{entity.isca},#{entity.enablestate},#{entity.contentlang},#{entity.userCodeQ})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
document_rule = values(document_rule),
|
||||
document_rule_num = values(document_rule_num),
|
||||
data_status = values(data_status),
|
||||
add_status = values(add_status),
|
||||
update_status = values(update_status),
|
||||
delete_status = values(delete_status),
|
||||
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),
|
||||
user_name = values(user_name),
|
||||
user_code = values(user_code),
|
||||
user_password = values(user_password),
|
||||
pwdlevelcode = values(pwdlevelcode),
|
||||
pwdparam = values(pwdparam),
|
||||
user_note = values(user_note),
|
||||
abledate = values(abledate),
|
||||
disabledate = values(disabledate),
|
||||
islocked = values(islocked),
|
||||
user_type = values(user_type),
|
||||
base_doc_type = values(base_doc_type),
|
||||
pk_base_doc = values(pk_base_doc),
|
||||
identityverifycode = values(identityverifycode),
|
||||
pk_org = values(pk_org),
|
||||
format = values(format),
|
||||
isca = values(isca),
|
||||
enablestate = values(enablestate),
|
||||
contentlang = values(contentlang),
|
||||
user_code_q = values(user_code_q)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
||||
update mdm_user set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
||||
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</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>
|
||||
<if test="userName != null and userName != ''"> user_name = #{userName},</if>
|
||||
<if test="userCode != null and userCode != ''"> user_code = #{userCode},</if>
|
||||
<if test="userPassword != null and userPassword != ''"> user_password = #{userPassword},</if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> pwdlevelcode = #{pwdlevelcode},</if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> pwdparam = #{pwdparam},</if>
|
||||
<if test="userNote != null and userNote != ''"> user_note = #{userNote},</if>
|
||||
<if test="abledate != null and abledate != ''"> abledate = #{abledate},</if>
|
||||
<if test="disabledate != null and disabledate != ''"> disabledate = #{disabledate},</if>
|
||||
<if test="islocked != null and islocked != ''"> islocked = #{islocked},</if>
|
||||
<if test="userType != null and userType != ''"> user_type = #{userType},</if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> base_doc_type = #{baseDocType},</if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> pk_base_doc = #{pkBaseDoc},</if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> identityverifycode = #{identityverifycode},</if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> pk_org = #{pkOrg},</if>
|
||||
<if test="format != null and format != ''"> format = #{format},</if>
|
||||
<if test="isca != null and isca != ''"> isca = #{isca},</if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
||||
<if test="contentlang != null and contentlang != ''"> contentlang = #{contentlang},</if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> user_code_q = #{userCodeQ},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
||||
update mdm_user 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.plugin.masterData.user.entity.MdmUserEntity" >
|
||||
update mdm_user 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="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </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>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
||||
<if test="userCode != null and userCode != ''"> and user_code = #{userCode} </if>
|
||||
<if test="userPassword != null and userPassword != ''"> and user_password = #{userPassword} </if>
|
||||
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode = #{pwdlevelcode} </if>
|
||||
<if test="pwdparam != null and pwdparam != ''"> and pwdparam = #{pwdparam} </if>
|
||||
<if test="userNote != null and userNote != ''"> and user_note = #{userNote} </if>
|
||||
<if test="abledate != null and abledate != ''"> and abledate = #{abledate} </if>
|
||||
<if test="disabledate != null and disabledate != ''"> and disabledate = #{disabledate} </if>
|
||||
<if test="islocked != null and islocked != ''"> and islocked = #{islocked} </if>
|
||||
<if test="userType != null and userType != ''"> and user_type = #{userType} </if>
|
||||
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type = #{baseDocType} </if>
|
||||
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc = #{pkBaseDoc} </if>
|
||||
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode = #{identityverifycode} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="format != null and format != ''"> and format = #{format} </if>
|
||||
<if test="isca != null and isca != ''"> and isca = #{isca} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="contentlang != null and contentlang != ''"> and contentlang = #{contentlang} </if>
|
||||
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q = #{userCodeQ} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.hzya.frame.plugin.masterData.user.plugin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 用户档案(MdmUser)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 14:52:30
|
||||
*/
|
||||
public class MdmUserPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmUserPluginInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmUserPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmUserPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmUserPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
logger.info("执行业务代码逻辑");
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.plugin.masterData.user.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity;
|
||||
|
||||
/**
|
||||
* 用户档案(MdmUser)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 14:52:30
|
||||
*/
|
||||
public interface IMdmUserService extends IBaseService<MdmUserEntity, String>{
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.hzya.frame.plugin.masterData.user.service.impl;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.plugin.masterData.user.dao.IMdmUserDao;
|
||||
import com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity;
|
||||
import com.hzya.frame.plugin.masterData.user.service.IMdmUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
/**
|
||||
* 用户档案(MdmUser)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 14:52:30
|
||||
*/
|
||||
public class MdmUserServiceImpl extends BaseService<MdmUserEntity, String> implements IMdmUserService {
|
||||
|
||||
private IMdmUserDao mdmUserDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmUserDao(IMdmUserDao dao) {
|
||||
this.mdmUserDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -19,5 +19,5 @@ spring:
|
|||
savefile:
|
||||
# 文件保存路径
|
||||
path: E:\yongansystem\file
|
||||
ax:
|
||||
zt:
|
||||
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -6,18 +6,22 @@ logging:
|
|||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
path: D:\yongansystem\kangarooDataCenter\v3\logs
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# username: root
|
||||
# password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
ax:
|
||||
path: D:\yongansystem\kangarooDataCenter\v3\logs
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -24,5 +24,5 @@ spring:
|
|||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
ax:
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -19,5 +19,5 @@ spring:
|
|||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
ax:
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -19,5 +19,5 @@ spring:
|
|||
savefile:
|
||||
# 文件保存路径
|
||||
path: E:\yongansystem\log
|
||||
ax:
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -90,7 +90,7 @@ mybatis-plus:
|
|||
global-config:
|
||||
db-config:
|
||||
id-type: auto # 主键策略
|
||||
ax:
|
||||
zt:
|
||||
url:
|
||||
# 积木报表工具
|
||||
#JimuReport[minidao配置]
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmCustomerBankPlugin</id>
|
||||
<name>MdmCustomerBankPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerBankDao" class="com.hzya.frame.plugin.masterData.customer.bank.dao.impl.MdmCustomerBankDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerBankInitializer" class="com.hzya.frame.plugin.masterData.customer.bank.plugin.MdmCustomerBankPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerBankService" class="com.hzya.frame.plugin.masterData.customer.bank.service.impl.MdmCustomerBankServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmCustomerPlugin</id>
|
||||
<name>MdmCustomerPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerDao" class="com.hzya.frame.plugin.masterData.customer.dao.impl.MdmCustomerDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerInitializer" class="com.hzya.frame.plugin.masterData.customer.plugin.MdmCustomerPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerService" class="com.hzya.frame.plugin.masterData.customer.service.impl.MdmCustomerServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmProjectPlugin</id>
|
||||
<name>MdmProjectPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmProjectDao" class="com.hzya.frame.plugin.masterData.project.dao.impl.MdmProjectDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmProjectInitializer" class="com.hzya.frame.plugin.masterData.project.plugin.MdmProjectPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmProjectService" class="com.hzya.frame.plugin.masterData.project.service.impl.MdmProjectServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmUserPlugin</id>
|
||||
<name>MdmUserPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmUserDao" class="com.hzya.frame.plugin.masterData.user.dao.impl.MdmUserDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmUserInitializer" class="com.hzya.frame.plugin.masterData.user.plugin.MdmUserPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmUserService" class="com.hzya.frame.plugin.masterData.user.service.impl.MdmUserServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmOrgPlugin</id>
|
||||
<name>MdmOrgPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmOrgDao" class="com.hzya.frame.plugin.masterData.org.dao.impl.MdmOrgDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmOrgInitializer" class="com.hzya.frame.plugin.masterData.org.plugin.MdmOrgPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmOrgService" class="com.hzya.frame.plugin.masterData.org.service.impl.MdmOrgServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmModulePlugin</id>
|
||||
<name>MdmModulePlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmModuleInitializer" class="com.hzya.frame.plugin.mdmDistribute.plugin.MdmModulePluginInitializer" />
|
||||
</beans>
|
|
@ -2,6 +2,7 @@ package com.hzya.frame;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.plugin.mdmDistribute.plugin.MdmModulePluginInitializer;
|
||||
import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
|
||||
import com.hzya.frame.util.AESUtil;
|
||||
import org.junit.Test;
|
||||
|
@ -23,6 +24,8 @@ public class temButtom {
|
|||
|
||||
@Resource
|
||||
SeeyonExtPluginInitializer seeyonExtPluginInitializer;
|
||||
@Resource
|
||||
MdmModulePluginInitializer mdmModulePluginInitializer;
|
||||
@Test
|
||||
public void seeyonExtTest(){
|
||||
JSONObject jsonStr = new JSONObject();
|
||||
|
@ -36,12 +39,23 @@ public class temButtom {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mdm(){
|
||||
JSONObject jsonStr = new JSONObject();
|
||||
jsonStr.put("integration_task_living_details_id","123123123123");
|
||||
try {
|
||||
mdmModulePluginInitializer.executeBusiness(jsonStr);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test01() {
|
||||
String a = AESUtil.encrypt("hzya@1314");
|
||||
System.out.println(a);
|
||||
|
||||
//String sa= "{\n \\"status\\": \\"success\\",\n \\"data\\": \\"[{\\\\"pk_corp\\\\":\\\\"1001\\\\",\\\\"unitcode\\\\":\\\\"01\\\\",\\\\"unitname\\\\":\\\\"临安奥星电子股份有限公司\\\\",\\\\"createdate\\\\":\\\\"2024-04-24\\\\",\\\\"deptattr\\\\":\\\\"1\\\\",\\\\"deptname\\\\":\\\\"DEV测试一级部门\\\\",\\\\"deptcode\\\\":\\\\"99\\\\",\\\\"pk_deptdoc\\\\":\\\\"1001F1100000000067AS\\\\"}]\\",\n \\"taskNumber\\": \\"202404250041\\"\n}";
|
||||
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
|
||||
System.out.println(b);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ public interface IBaseDao<E extends Serializable, PK extends Serializable> {
|
|||
* @return
|
||||
*/
|
||||
int delete(String paramString, Object paramObject);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param paramString sqlMapperID
|
||||
|
@ -178,6 +177,8 @@ public interface IBaseDao<E extends Serializable, PK extends Serializable> {
|
|||
*/
|
||||
Integer getCount(E paramE);
|
||||
|
||||
Integer getCount(String statement,Object baseEntity);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param paramString mapperID
|
||||
|
|
|
@ -276,6 +276,11 @@ public abstract class MybatisGenericDao<E extends Serializable, PK extends Seria
|
|||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCount(String statement,Object baseEntity) {
|
||||
Integer totalCount = this.sqlSession.selectOne(statement, baseEntity);
|
||||
return totalCount;
|
||||
}
|
||||
public List<E> query(Object baseEntity) {
|
||||
|
||||
Assert.notNull(baseEntity, "query baseEntity :不能为NULL");
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ExecSqlServiceImpl implements IExecSqlService {
|
|||
public List<HashMap<String, Object>> execSelectSql(ExecSqlEntity entity) throws RuntimeException {
|
||||
List<HashMap<String, Object>> list = new ArrayList<>();
|
||||
logger.info("=============进入execSelectSql方法============");
|
||||
if (null != entity && ObjectUtils.isEmpty(entity.getSql())) {
|
||||
if (null != entity && null!=entity.getSql()) {
|
||||
//sqlsession
|
||||
// SqlSession sqlSession = getSqlSession(entity.getDatasource_code());
|
||||
// SqlSession sqlSession = new DataSourceUtil().getDefaultSqlSession();
|
||||
|
@ -61,7 +61,7 @@ public class ExecSqlServiceImpl implements IExecSqlService {
|
|||
logger.info("=============execSelectSql方法要执行的sql:============" + select_sql);
|
||||
if (!select_sql.contains("update") && !select_sql.contains("delete")
|
||||
&& !select_sql.contains("insert") && !select_sql.contains("create")) {
|
||||
list = sqlSession.selectList("com.hzya.frame.sysnew.execsql.entity.ExecSqlEntity.ExecSqlEntity_execsql", entity);
|
||||
list = sqlSession.selectList("com.hzya.frame.execsql.entity.ExecSqlEntity.ExecSqlEntity_execsql", entity);
|
||||
logger.info("===========execSelectSql方法返回的结果条数=============" + list.size());
|
||||
}
|
||||
//sqlSession.close();
|
||||
|
|
26
pom.xml
26
pom.xml
|
@ -244,12 +244,12 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加dm8 jdbc jar 包依赖-->
|
||||
<dependency>
|
||||
<groupId>com.dameng</groupId>
|
||||
<artifactId>Dm8JdbcDriver18</artifactId>
|
||||
<version>8.1.1.49</version>
|
||||
</dependency>
|
||||
<!-- <!– 添加dm8 jdbc jar 包依赖–>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.dameng</groupId>-->
|
||||
<!-- <artifactId>Dm8JdbcDriver18</artifactId>-->
|
||||
<!-- <version>8.1.1.49</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<dependency>
|
||||
|
@ -338,20 +338,6 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JimuReport 积木报表 -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot-starter</artifactId>
|
||||
<version>${jimureport.version}</version>
|
||||
</dependency>
|
||||
<!-- minio oss-->
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>${minio.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- postgresql驱动 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DbFiledsDto {
|
||||
|
||||
/**
|
||||
* 1新增 2、修改
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 中文名
|
||||
*/
|
||||
private String chName;
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
private String enName;
|
||||
/**
|
||||
* 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME
|
||||
*/
|
||||
private String filedType;
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private String filedLength;
|
||||
|
||||
public DbFiledsDto() {
|
||||
}
|
||||
|
||||
public DbFiledsDto(String dataType,String chName, String enName, String filedType, String filedLength) {
|
||||
this.dataType = dataType;
|
||||
this.chName = chName;
|
||||
this.enName = enName;
|
||||
this.filedType = filedType;
|
||||
this.filedLength = filedLength;
|
||||
}
|
||||
|
||||
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 String getFiledType() {
|
||||
return filedType;
|
||||
}
|
||||
|
||||
public void setFiledType(String filedType) {
|
||||
this.filedType = filedType;
|
||||
}
|
||||
|
||||
public String getFiledLength() {
|
||||
return filedLength;
|
||||
}
|
||||
|
||||
public void setFiledLength(String filedLength) {
|
||||
this.filedLength = filedLength;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
public class MdmDbFiledVo {
|
||||
private String id;
|
||||
private String name;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public MdmDbFiledVo() {
|
||||
}
|
||||
|
||||
public MdmDbFiledVo(String id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.hzya.frame.mdm.entity;
|
|||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -12,11 +13,50 @@ public class MdmDto {
|
|||
private Long mdmCode;
|
||||
//单据编码规则
|
||||
private List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList;
|
||||
//字段规则
|
||||
private List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities;
|
||||
//主数据主表
|
||||
private MdmModuleDbEntity mainMdmModuleDb;
|
||||
//主数据子表
|
||||
private List<MdmModuleDbEntity> sublistMdmModuleDb;
|
||||
|
||||
|
||||
//id
|
||||
private String id;
|
||||
//id
|
||||
private String fieldId;
|
||||
//id
|
||||
private String dbId;
|
||||
//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 +88,149 @@ 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;
|
||||
}
|
||||
|
||||
public List<MdmModuleDbFiledsRuleEntity> getMdmModuleDbFiledsRuleEntities() {
|
||||
return mdmModuleDbFiledsRuleEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleDbFiledsRuleEntities(List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities) {
|
||||
this.mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleEntities;
|
||||
}
|
||||
|
||||
public String getFieldId() {
|
||||
return fieldId;
|
||||
}
|
||||
|
||||
public void setFieldId(String fieldId) {
|
||||
this.fieldId = fieldId;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmModuleViewDto {
|
||||
|
||||
private Long mdmCode;
|
||||
//模版
|
||||
private MdmModuleViewEntity mdmModuleViewEntity;
|
||||
//新增
|
||||
private List<MdmDbFiledVo> addFiled;
|
||||
//修改
|
||||
private List<MdmDbFiledVo> editFiled;
|
||||
//查看
|
||||
private List<MdmDbFiledVo> showFiled;
|
||||
//查询
|
||||
private List<MdmDbFiledVo> queryFiled;
|
||||
//列表
|
||||
private List<MdmDbFiledVo> listFiled;
|
||||
//按钮
|
||||
private List<MdmModuleViewButtonEntity> dbButtonFiled;
|
||||
|
||||
public MdmModuleViewEntity getMdmModuleViewEntity() {
|
||||
return mdmModuleViewEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
|
||||
this.mdmModuleViewEntity = mdmModuleViewEntity;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getAddFiled() {
|
||||
return addFiled;
|
||||
}
|
||||
|
||||
public void setAddFiled(List<MdmDbFiledVo> addFiled) {
|
||||
this.addFiled = addFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getEditFiled() {
|
||||
return editFiled;
|
||||
}
|
||||
|
||||
public void setEditFiled(List<MdmDbFiledVo> editFiled) {
|
||||
this.editFiled = editFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getShowFiled() {
|
||||
return showFiled;
|
||||
}
|
||||
|
||||
public void setShowFiled(List<MdmDbFiledVo> showFiled) {
|
||||
this.showFiled = showFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getQueryFiled() {
|
||||
return queryFiled;
|
||||
}
|
||||
|
||||
public void setQueryFiled(List<MdmDbFiledVo> queryFiled) {
|
||||
this.queryFiled = queryFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getListFiled() {
|
||||
return listFiled;
|
||||
}
|
||||
|
||||
public void setListFiled(List<MdmDbFiledVo> listFiled) {
|
||||
this.listFiled = listFiled;
|
||||
}
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewButtonEntity> getDbButtonFiled() {
|
||||
return dbButtonFiled;
|
||||
}
|
||||
|
||||
public void setDbButtonFiled(List<MdmModuleViewButtonEntity> dbButtonFiled) {
|
||||
this.dbButtonFiled = dbButtonFiled;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmModuleViewVo {
|
||||
|
||||
|
||||
/** 主数据模版ID */
|
||||
private String mdmId;
|
||||
/** 类型1、查询2、列表3、新增4、修改 5、查看 */
|
||||
private String viewType;
|
||||
//模版
|
||||
private MdmModuleViewEntity mdmModuleViewEntity;
|
||||
//新增
|
||||
private List<MdmDbFiledVo> addFiled;
|
||||
//修改
|
||||
private List<MdmDbFiledVo> editFiled;
|
||||
//查看
|
||||
private List<MdmDbFiledVo> showFiled;
|
||||
//查询
|
||||
private List<MdmDbFiledVo> queryFiled;
|
||||
//列表
|
||||
private List<MdmDbFiledVo> listFiled;
|
||||
|
||||
//新增
|
||||
private List<MdmModuleViewDetailEntity> dbAddFiled;
|
||||
//修改
|
||||
private List<MdmModuleViewDetailEntity> dbEditFiled;
|
||||
//查看
|
||||
private List<MdmModuleViewDetailEntity> dbShowFiled;
|
||||
//查询
|
||||
private List<MdmModuleViewDetailEntity> dbQueryFiled;
|
||||
//列表
|
||||
private List<MdmModuleViewDetailEntity> dbListFiled;
|
||||
//按钮
|
||||
private List<MdmModuleViewButtonEntity> dbButtonFiled;
|
||||
|
||||
public List<MdmDbFiledVo> getAddFiled() {
|
||||
return addFiled;
|
||||
}
|
||||
|
||||
public void setAddFiled(List<MdmDbFiledVo> addFiled) {
|
||||
this.addFiled = addFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getEditFiled() {
|
||||
return editFiled;
|
||||
}
|
||||
|
||||
public void setEditFiled(List<MdmDbFiledVo> editFiled) {
|
||||
this.editFiled = editFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getShowFiled() {
|
||||
return showFiled;
|
||||
}
|
||||
|
||||
public void setShowFiled(List<MdmDbFiledVo> showFiled) {
|
||||
this.showFiled = showFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getQueryFiled() {
|
||||
return queryFiled;
|
||||
}
|
||||
|
||||
public void setQueryFiled(List<MdmDbFiledVo> queryFiled) {
|
||||
this.queryFiled = queryFiled;
|
||||
}
|
||||
|
||||
public List<MdmDbFiledVo> getListFiled() {
|
||||
return listFiled;
|
||||
}
|
||||
|
||||
public void setListFiled(List<MdmDbFiledVo> listFiled) {
|
||||
this.listFiled = listFiled;
|
||||
}
|
||||
|
||||
public MdmModuleViewEntity getMdmModuleViewEntity() {
|
||||
return mdmModuleViewEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
|
||||
this.mdmModuleViewEntity = mdmModuleViewEntity;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewDetailEntity> getDbAddFiled() {
|
||||
return dbAddFiled;
|
||||
}
|
||||
|
||||
public void setDbAddFiled(List<MdmModuleViewDetailEntity> dbAddFiled) {
|
||||
this.dbAddFiled = dbAddFiled;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewDetailEntity> getDbEditFiled() {
|
||||
return dbEditFiled;
|
||||
}
|
||||
|
||||
public void setDbEditFiled(List<MdmModuleViewDetailEntity> dbEditFiled) {
|
||||
this.dbEditFiled = dbEditFiled;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewDetailEntity> getDbShowFiled() {
|
||||
return dbShowFiled;
|
||||
}
|
||||
|
||||
public void setDbShowFiled(List<MdmModuleViewDetailEntity> dbShowFiled) {
|
||||
this.dbShowFiled = dbShowFiled;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewDetailEntity> getDbQueryFiled() {
|
||||
return dbQueryFiled;
|
||||
}
|
||||
|
||||
public void setDbQueryFiled(List<MdmModuleViewDetailEntity> dbQueryFiled) {
|
||||
this.dbQueryFiled = dbQueryFiled;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewDetailEntity> getDbListFiled() {
|
||||
return dbListFiled;
|
||||
}
|
||||
|
||||
public void setDbListFiled(List<MdmModuleViewDetailEntity> dbListFiled) {
|
||||
this.dbListFiled = dbListFiled;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewButtonEntity> getDbButtonFiled() {
|
||||
return dbButtonFiled;
|
||||
}
|
||||
|
||||
public void setDbButtonFiled(List<MdmModuleViewButtonEntity> dbButtonFiled) {
|
||||
this.dbButtonFiled = dbButtonFiled;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getViewType() {
|
||||
return viewType;
|
||||
}
|
||||
|
||||
public void setViewType(String viewType) {
|
||||
this.viewType = viewType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.sys.entity.TemplateKeyValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmQuery {
|
||||
|
||||
//分页
|
||||
private Integer pageNum;
|
||||
//分页
|
||||
private Long mdmCode;
|
||||
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;
|
||||
}
|
||||
|
||||
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,8 +1,15 @@
|
|||
package com.hzya.frame.mdm.mdmModule.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.sys.entity.FormmainDeleteDto;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -19,6 +26,34 @@ public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {
|
|||
MdmModuleEntity getByMdmCode(Long mdmCode);
|
||||
|
||||
Integer checkTable(Map<String, String> maps);
|
||||
Integer createTable(Map<String, Object> maps);
|
||||
Integer alterTable(Map<String, Object> maps);
|
||||
Integer alterTableField(MdmModuleDbFiledsEntity entity);
|
||||
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);
|
||||
|
||||
Integer deleteMdmModuleEntity(MdmModuleEntity entity);
|
||||
|
||||
Integer queryMainCount(MdmQuery mdmQuery);
|
||||
|
||||
Integer deleteTable(Map<String, Object> maps);
|
||||
|
||||
|
||||
JSONObject queryMdmST(Map<String, Object> maps);
|
||||
List<JSONObject> queryMdmSTDetail(Map<String, String> maps);
|
||||
|
||||
List<JSONObject> queryMdmSTs(Map<String, Object> map);
|
||||
|
||||
void updateMdmSTs(Map<String, Object> updateMap);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
package com.hzya.frame.mdm.mdmModule.dao.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
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 +32,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,5 +42,132 @@ 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 deleteMdmModuleEntity(MdmModuleEntity entity) {
|
||||
Integer o = (Integer) super.delete(getSqlIdPrifx() + "deleteMdmModuleEntity", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer queryMainCount(MdmQuery entity) {
|
||||
Integer o = (Integer) super.getCount(getSqlIdPrifx() + "queryMainCount", 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);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteTable(Map<String, Object> maps) {
|
||||
Integer o = (Integer) super.delete(getSqlIdPrifx() + "deleteTable", maps);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Integer alterTable(Map<String, Object> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "alterTable", maps);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public Integer alterTableField(MdmModuleDbFiledsEntity entity) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "alterTableField", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer alterTableName(Map<String, String> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "alterTableName", maps);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryMdmST(Map<String, Object> maps) {
|
||||
JSONObject o = (JSONObject) super.selectOne(getSqlIdPrifx() + "queryMdmST", maps);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public List<JSONObject> queryMdmSTs(Map<String, Object> maps) {
|
||||
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryMdmST", maps);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMdmSTs(Map<String, Object> maps) {
|
||||
super.update(getSqlIdPrifx() + "updateMdmSTs", maps);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryMdmSTDetail(Map<String, String> maps) {
|
||||
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryMdmSTDetail", maps);
|
||||
return o;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
from mdm_module where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List"/>
|
||||
from mdm_module
|
||||
|
@ -94,7 +95,8 @@
|
|||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List"/>
|
||||
from mdm_module
|
||||
|
@ -106,9 +108,13 @@
|
|||
<if test="mdmType != null and mdmType != ''">and mdm_type like concat('%',#{mdmType},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</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_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_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>
|
||||
|
@ -120,7 +126,8 @@
|
|||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleentity_list_or" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
<select id="MdmModuleentity_list_or" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List"/>
|
||||
from mdm_module
|
||||
|
@ -189,15 +196,18 @@
|
|||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch">
|
||||
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time,
|
||||
modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{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 mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time,
|
||||
modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
|
@ -214,7 +224,8 @@
|
|||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
update mdm_module set
|
||||
|
@ -259,8 +270,13 @@ update mdm_module set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #
|
|||
<delete id="entity_delete">
|
||||
delete from mdm_module where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTable" >
|
||||
DROP TABLE ${tableName}
|
||||
</delete>
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryMdm" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
<select id="queryMdm" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
a.id as id,
|
||||
a.mdm_name as mdm_name,
|
||||
|
@ -305,5 +321,567 @@ update mdm_module set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #
|
|||
TABLE_SCHEMA = 'businesscenter'
|
||||
and TABLE_NAME = #{tableName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="createTable" resultType="java.lang.Integer">
|
||||
CREATE TABLE ${tableName} (
|
||||
<choose>
|
||||
<when test="tableType == '1'.toString()">
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
`document_rule` varchar(50) DEFAULT NULL COMMENT '单据规则',
|
||||
`document_rule_num` bigint DEFAULT NULL COMMENT '单据规则流水号',
|
||||
`data_status` varchar(1) DEFAULT NULL COMMENT '数据状态 Y正常 N删除 F修改',
|
||||
`add_status` varchar(1) DEFAULT NULL COMMENT '新增数据状态 0待下发 1已下发',
|
||||
`update_status` varchar(1) DEFAULT NULL COMMENT '修改数据状态 0待下发 1已下发',
|
||||
`delete_status` varchar(1) DEFAULT NULL COMMENT '删除数据状态 0待下发 1已下发',
|
||||
`sorts` bigint NOT NULL AUTO_INCREMENT COMMENT '排序',
|
||||
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
|
||||
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`sts` varchar(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
|
||||
`company_id` varchar(50) DEFAULT NULL COMMENT '公司id',
|
||||
</when>
|
||||
<when test="tableType == '2'.toString()">
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
`formmain_id` varchar(50) DEFAULT NULL COMMENT 'formmain_id',
|
||||
`data_status` varchar(1) DEFAULT NULL COMMENT '数据状态 Y正常 N删除 F修改',
|
||||
`sorts` bigint NOT NULL AUTO_INCREMENT COMMENT '排序',
|
||||
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
|
||||
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`sts` varchar(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
|
||||
`company_id` varchar(50) DEFAULT NULL COMMENT '公司id',
|
||||
</when>
|
||||
<when test="tableType == '3'.toString()">
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
`formmain_id` varchar(50) DEFAULT NULL COMMENT 'formmain_id',
|
||||
`source_name` varchar(255) DEFAULT NULL COMMENT '来源名称',
|
||||
`code` varchar(255) DEFAULT NULL COMMENT '编码',
|
||||
`source_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '源数据',
|
||||
`option_type` varchar(255) DEFAULT NULL COMMENT '操作类型',
|
||||
`option_name` varchar(255) DEFAULT NULL COMMENT '操作人',
|
||||
`sorts` bigint NOT NULL AUTO_INCREMENT COMMENT '排序',
|
||||
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
|
||||
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`sts` varchar(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
|
||||
`company_id` varchar(50) DEFAULT NULL COMMENT '公司id',
|
||||
</when>
|
||||
<when test="tableType == '4'.toString()">
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
`formmain_id` varchar(50) DEFAULT NULL COMMENT 'formmain_id',
|
||||
`target_app` varchar(255) DEFAULT NULL COMMENT '目标应用',
|
||||
`target_api` varchar(255) DEFAULT NULL COMMENT '目标api',
|
||||
`source_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '源数据',
|
||||
`option_type` varchar(255) DEFAULT NULL COMMENT '操作类型',
|
||||
`sorts` bigint NOT NULL AUTO_INCREMENT COMMENT '排序',
|
||||
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
|
||||
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`sts` varchar(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
|
||||
`company_id` varchar(50) DEFAULT NULL COMMENT '公司id',
|
||||
</when>
|
||||
</choose>
|
||||
PRIMARY KEY (`sorts`,`id`) USING BTREE
|
||||
) ENGINE = INNODB DEFAULT CHARSET = utf8mb4
|
||||
<if test="tableRemark != null and tableRemark != ''"> COMMENT = #{tableRemark} </if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="alterTable" resultType="java.lang.Integer">
|
||||
ALTER TABLE ${tableName}
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<foreach collection="databaseFields" item="item" index="index">
|
||||
<choose>
|
||||
<when test="item.filedType == '3'.toString()">
|
||||
<choose>
|
||||
<when test="item.dataType == '1'.toString()">
|
||||
MODIFY COLUMN ${item.enName} varchar(${item.filedLength}) DEFAULT NULL
|
||||
COMMENT #{item.chName},
|
||||
</when>
|
||||
<otherwise>
|
||||
add COLUMN ${item.enName} varchar(${item.filedLength}) DEFAULT NULL COMMENT
|
||||
#{item.chName},
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="item.filedType == '1'.toString()">
|
||||
<choose>
|
||||
<when test="item.dataType == '1'.toString()">
|
||||
MODIFY COLUMN ${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT
|
||||
#{item.chName},
|
||||
</when>
|
||||
<otherwise>
|
||||
add COLUMN ${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT
|
||||
#{item.chName},
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="item.filedType == '2'.toString()">
|
||||
<choose>
|
||||
<when test="item.dataType == '1'.toString()">
|
||||
MODIFY COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
|
||||
#{item.chName},
|
||||
</when>
|
||||
<otherwise>
|
||||
add COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
|
||||
#{item.chName},
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="item.filedType == '4'.toString()">
|
||||
<choose>
|
||||
<when test="item.dataType == '1'.toString()">
|
||||
MODIFY COLUMN ${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
<otherwise>
|
||||
add COLUMN ${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="alterTableField" resultType="java.lang.Integer">
|
||||
|
||||
ALTER TABLE ${dbName}
|
||||
<choose>
|
||||
<when test="filedType == '1'.toString()">
|
||||
<choose>
|
||||
<when test="dataType == '1'.toString()">
|
||||
add COLUMN ${enName} bigint(${filedLength}) DEFAULT NULL COMMENT
|
||||
#{chName}
|
||||
</when>
|
||||
<when test="dataType == '3'.toString()">
|
||||
drop COLUMN ${enName}
|
||||
</when>
|
||||
<otherwise>
|
||||
MODIFY COLUMN ${enName} bigint(${filedLength}) DEFAULT NULL COMMENT
|
||||
#{chName}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="filedType == '3'.toString()">
|
||||
<choose>
|
||||
<when test="dataType == '1'.toString()">
|
||||
add COLUMN ${enName} varchar(${filedLength}) DEFAULT NULL
|
||||
COMMENT #{chName}
|
||||
</when>
|
||||
<when test="dataType == '3'.toString()">
|
||||
drop COLUMN ${enName}
|
||||
</when>
|
||||
<otherwise>
|
||||
MODIFY COLUMN ${enName} varchar(${filedLength}) DEFAULT NULL COMMENT
|
||||
#{chName}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
|
||||
<when test="filedType == '2'.toString()">
|
||||
<choose>
|
||||
<when test="dataType == '1'.toString()">
|
||||
add COLUMN ${enName} decimal(${filedLength}) DEFAULT NULL COMMENT
|
||||
#{chName}
|
||||
</when>
|
||||
<when test="dataType == '3'.toString()">
|
||||
drop COLUMN ${enName}
|
||||
</when>
|
||||
<otherwise>
|
||||
MODIFY COLUMN ${enName} decimal(${filedLength}) DEFAULT NULL COMMENT
|
||||
#{chName}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="filedType == '4'.toString()">
|
||||
<choose>
|
||||
<when test="dataType == '1'.toString()">
|
||||
add COLUMN ${enName} datetime DEFAULT NULL COMMENT #{chName}
|
||||
</when>
|
||||
<when test="dataType == '3'.toString()">
|
||||
drop COLUMN ${enName}
|
||||
</when>
|
||||
<otherwise>
|
||||
MODIFY COLUMN ${enName} datetime DEFAULT NULL COMMENT #{chName}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--通过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' and a.data_status != 'N'
|
||||
<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' and data_status != 'N'
|
||||
</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' and data_status != 'N'
|
||||
</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' and data_status != 'N'
|
||||
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' )) ) <= ${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' )) ) <= ${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
|
||||
data_status ='N',modify_time = now(),modify_user_id = #{loginId}
|
||||
<if test="formmain_id == null ">,delete_status = '0' </if>
|
||||
<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
|
||||
data_status='N',modify_time = now(),modify_user_id = #{loginId},delete_status = '0'
|
||||
<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>
|
||||
|
||||
<!--通过mdmCode删除-->
|
||||
<delete id="deleteMdmModuleEntity" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
delete from mdm_module where mdm_code = #{mdmCode}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="queryMainCount" resultType="Integer" parameterType="com.hzya.frame.mdm.entity.MdmQuery">
|
||||
select count(1) from ${tableName} where sts='Y'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryMdmST" resultType="com.alibaba.fastjson.JSONObject"
|
||||
parameterType="java.util.HashMap">
|
||||
select * from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="documentRule != null and documentRule !='' ">and document_rule = #{documentRule}</if>
|
||||
<if test="dataStatus != null and dataStatus !='' ">and data_status = #{dataStatus}</if>
|
||||
<if test="addStatus != null and addStatus !='' ">and add_status = #{addStatus}</if>
|
||||
<if test="updateStatus != null and updateStatus !='' ">and update_status = #{updateStatus}</if>
|
||||
<if test="deleteStatus != null and deleteStatus !='' ">and delete_status = #{deleteStatus}</if>
|
||||
<if test="id != null and id !='' ">and id = #{id}</if>
|
||||
<if test="mdmModuleDistributeDetailEntities != null and mdmModuleDistributeDetailEntities.size>0">
|
||||
AND
|
||||
<foreach collection="mdmModuleDistributeDetailEntities" item="item" index="index" open="(" close=")" >
|
||||
${item.leftBracket} ${item.filedName}
|
||||
<choose>
|
||||
<when test="item.compareType == '1'.toString() ">
|
||||
=
|
||||
</when>
|
||||
<when test="item.compareType == '2'.toString() ">
|
||||
!=
|
||||
</when>
|
||||
<when test="item.compareType == '3'.toString() ">
|
||||
>
|
||||
</when>
|
||||
<when test="item.compareType == '4'.toString() ">
|
||||
<
|
||||
</when>
|
||||
</choose>
|
||||
#{item.filedVaule}
|
||||
<choose>
|
||||
<when test="item.connectionSymbol == '1'.toString() ">
|
||||
<choose>
|
||||
<when test="item.rightParenthesis == ')'.toString() ">
|
||||
${item.rightParenthesis} and
|
||||
</when>
|
||||
<otherwise>
|
||||
${item.rightParenthesis}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="item.connectionSymbol == '2'.toString() ">
|
||||
<choose>
|
||||
<when test="item.rightParenthesis == ')'.toString() ">
|
||||
${item.rightParenthesis} or
|
||||
</when>
|
||||
<otherwise>
|
||||
${item.rightParenthesis}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<otherwise>
|
||||
${item.rightParenthesis}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="ids != null and ids.size>0">
|
||||
AND id in
|
||||
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
and sts = 'Y'
|
||||
<if test="size != null and size !='' ">limit #{size}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryMdmSTDetail" resultType="com.alibaba.fastjson.JSONObject"
|
||||
parameterType="java.util.HashMap">
|
||||
select * from ${tableName} where sts='Y' and formmain_id = #{formmainId}
|
||||
</select>
|
||||
|
||||
<update id="updateMdmSTs" parameterType="java.util.HashMap">
|
||||
update ${tableName} set
|
||||
<trim prefixOverrides=",">
|
||||
<if test="addStatus != null and addStatus !='' ">, add_status = #{addStatus}</if>
|
||||
,modify_time = now()
|
||||
</trim>
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">and id = #{id}</if>
|
||||
<if test="dataStatus != null and dataStatus !='' ">and data_status = #{dataStatus}</if>
|
||||
</trim>
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.hzya.frame.mdm.mdmModule.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* 主数据模版(MdmModule)表服务接口
|
||||
*
|
||||
|
@ -9,4 +12,389 @@ import com.hzya.frame.basedao.service.IBaseService;
|
|||
* @since 2024-06-03 08:46:29
|
||||
*/
|
||||
public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String>{
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 查询所有主数据
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdm(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 删除主数据
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity deleteMdm(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-基本信息获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity getMdm(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-基本信息新增
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveMdm(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-基本信息修改(同步修改菜单名称)
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdm(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-单据规则获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity getMdmTableCodeRule(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-单据规则新增或修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveOrUpdateMdmTableCodeRule(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDb(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表新增
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveMdmDb(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdmDb(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表删除
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity deleteMdmDb(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDbField(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段明细
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDbFieldDetail(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段新增
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveMdmDbField(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdmDbField(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段删除
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity deleteMdmDbField(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段规则获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDbFieldRule(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-数据表字段规则修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdmDbFieldRule(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示类型获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmView(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示类型保存
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveMdmView(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示类型修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdmView(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示字段获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmViewField(JSONObject jsonObject);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示字段设置保存
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveOrUpdateMdmViewField(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示按钮获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmViewButton(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-显示信息-显示按钮保存
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveOrUpdateMdmViewButton(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据来源-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmSource(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据来源保存
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveMdmSource(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据来源获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity getMdmSource(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据来源修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdmSource(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据来源删除
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity deleteMdmSource(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDistribute(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置保存
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity saveMdmDistribute(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity getMdmDistribute(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置修改
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity updateMdmDistribute(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置删除
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity deleteMdmDistribute(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-写入日志-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmOptionLogPage(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-下发日志-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDistributeLogPage(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-服务获取(只获取主表)
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmService(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-服务字段获取(只获取主表)
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmServiceField(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发-只获取主表
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmMainDB(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-数据源-只获取主表字段
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmMainDBField(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDistributeByMdmCode(JSONObject jsonObject);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,10 @@ package com.hzya.frame.mdm.mdmModuleDb.dao;
|
|||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
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,10 @@ 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);
|
||||
|
||||
int deleteMdmModuleDb(MdmModuleDbEntity mdmModuleDbEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,31 @@ 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;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteMdmModuleDb(MdmModuleDbEntity entity) {
|
||||
Integer o = (Integer) super.delete(getSqlIdPrifx() + "deleteMdmModuleDb", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List"/>
|
||||
from mdm_module_db
|
||||
|
@ -59,7 +60,8 @@
|
|||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
<select id="entity_count" resultType="Integer"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select count(1) from mdm_module_db
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
|
@ -82,7 +84,8 @@
|
|||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleDbEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List"/>
|
||||
from mdm_module_db
|
||||
|
@ -93,9 +96,13 @@
|
|||
<if test="dbType != null and dbType != ''">and db_type like concat('%',#{dbType},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</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_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_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>
|
||||
|
@ -107,7 +114,8 @@
|
|||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleDbentity_list_or" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
<select id="MdmModuleDbentity_list_or" resultMap="get-MdmModuleDbEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List"/>
|
||||
from mdm_module_db
|
||||
|
@ -171,15 +179,18 @@
|
|||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch">
|
||||
insert into mdm_module_db(mdm_id, db_name, db_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
insert into mdm_module_db(mdm_id, db_name, db_type, remark, 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.dbName},#{entity.dbType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{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 mdm_module_db(mdm_id, db_name, db_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
insert into mdm_module_db(mdm_id, db_name, db_type, remark, 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.dbName},#{entity.dbType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
|
@ -195,7 +206,8 @@
|
|||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
update mdm_module_db set
|
||||
|
@ -220,7 +232,8 @@ update mdm_module_db set sts= 'N' ,modify_time = #{modify_time},modify_user_id
|
|||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
|
||||
<update id="entity_logicDelete_Multi_Condition"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
update mdm_module_db 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>
|
||||
|
@ -238,6 +251,70 @@ 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>
|
||||
|
||||
<!--通过mdmCode删除-->
|
||||
<delete id="deleteMdmModuleDb" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
delete from mdm_module_db where mdm_id = #{mdmId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -11,5 +11,6 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
*/
|
||||
public interface IMdmModuleDbFiledsDao extends IBaseDao<MdmModuleDbFiledsEntity, String> {
|
||||
|
||||
int deleteMdmModuleDbFileds(MdmModuleDbFiledsEntity entity);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,5 +13,10 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
@Repository(value = "MdmModuleDbFiledsDaoImpl")
|
||||
public class MdmModuleDbFiledsDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsDao{
|
||||
|
||||
@Override
|
||||
public int deleteMdmModuleDbFileds(MdmModuleDbFiledsEntity entity) {
|
||||
Integer o = (Integer) super.delete(getSqlIdPrifx() + "deleteMdmModuleDbFileds", entity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFileds.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 模版数据库字段表(MdmModuleDbFileds)实体类
|
||||
*
|
||||
|
@ -13,6 +13,8 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
*/
|
||||
public class MdmModuleDbFiledsEntity extends BaseEntity {
|
||||
|
||||
/** 主数据模版ID */
|
||||
private String dbName;
|
||||
/** 主数据模版ID */
|
||||
private String mdmId;
|
||||
/** 模版数据库id */
|
||||
|
@ -41,8 +43,20 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
private String companyId;
|
||||
/** 数据类型 1、新增 2、修改 */
|
||||
private String dataType;
|
||||
/** 类型 1、主表 2、明细 3、操作日志 4、下发日志 */
|
||||
private String dbType;
|
||||
/**
|
||||
* roletype
|
||||
*/
|
||||
private String roletype;
|
||||
/**
|
||||
* roletype
|
||||
*/
|
||||
private String roleValue;
|
||||
private List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules;
|
||||
|
||||
//1、查询2、列表3、新增4、修改 5、查看
|
||||
private String fieldType;
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
@ -162,5 +176,45 @@ 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;
|
||||
}
|
||||
|
||||
public String getDbName() {
|
||||
return dbName;
|
||||
}
|
||||
|
||||
public void setDbName(String dbName) {
|
||||
this.dbName = dbName;
|
||||
}
|
||||
|
||||
public String getFieldType() {
|
||||
return fieldType;
|
||||
}
|
||||
|
||||
public void setFieldType(String fieldType) {
|
||||
this.fieldType = fieldType;
|
||||
}
|
||||
|
||||
public String getDbType() {
|
||||
return dbType;
|
||||
}
|
||||
|
||||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,14 @@
|
|||
<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>
|
||||
<if test="roletype != null and roletype != ''">
|
||||
and id in (
|
||||
select
|
||||
filed_id
|
||||
from mdm_module_db_fileds_rule
|
||||
where sts='Y' and rule_code = #{roletype} and rule_value = #{roleValue}
|
||||
)
|
||||
</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
|
@ -326,6 +334,9 @@ update mdm_module_db_fileds set sts= 'N' ,modify_time = #{modify_time},modify_u
|
|||
<delete id="entity_delete">
|
||||
delete from mdm_module_db_fileds where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!--通过mdmCode删除-->
|
||||
<delete id="deleteMdmModuleDbFileds" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
delete from mdm_module_db_fileds where mdm_id = #{mdmId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -11,5 +11,6 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
*/
|
||||
public interface IMdmModuleDbFiledsRuleDao extends IBaseDao<MdmModuleDbFiledsRuleEntity, String> {
|
||||
|
||||
Integer queryUserMdm(MdmModuleDbFiledsRuleEntity queryCount);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,5 +13,10 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
@Repository(value = "MdmModuleDbFiledsRuleDaoImpl")
|
||||
public class MdmModuleDbFiledsRuleDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsRuleEntity, String> implements IMdmModuleDbFiledsRuleDao{
|
||||
|
||||
@Override
|
||||
public Integer queryUserMdm(MdmModuleDbFiledsRuleEntity queryCount) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "queryUserMdm", queryCount);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -283,5 +283,17 @@ update mdm_module_db_fileds_rule set sts= 'N' ,modify_time = #{modify_time},mod
|
|||
delete from mdm_module_db_fileds_rule where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="queryUserMdm" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity">
|
||||
select count(1) from mdm_module_db_fileds_rule
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id != #{mdmId} </if>
|
||||
<if test="ruleCode != null and ruleCode != ''"> and rule_code = #{ruleCode} </if>
|
||||
<if test="ruleValue != null and ruleValue != ''"> and rule_value = #{ruleValue} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
* 主数据功能应用分发表(mdm_module_distribute: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-03 08:47:33
|
||||
* @since 2024-06-18 11:39:46
|
||||
*/
|
||||
public interface IMdmModuleDistributeDao extends IBaseDao<MdmModuleDistributeEntity, String> {
|
||||
|
||||
Integer queryCountUse(MdmModuleDistributeEntity mdmModuleDistributeEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,14 +4,22 @@ import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
|||
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 主数据功能应用分发表(MdmModuleDistribute)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-03 08:47:33
|
||||
* @since 2024-06-18 11:39:46
|
||||
*/
|
||||
@Repository(value = "MdmModuleDistributeDaoImpl")
|
||||
public class MdmModuleDistributeDaoImpl extends MybatisGenericDao<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeDao{
|
||||
|
||||
@Override
|
||||
public Integer queryCountUse(MdmModuleDistributeEntity mdmModuleDistributeEntity) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "queryCountUse", mdmModuleDistributeEntity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
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)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-03 08:47:33
|
||||
* @since 2024-06-18 11:39:46
|
||||
*/
|
||||
public class MdmModuleDistributeEntity extends BaseEntity {
|
||||
|
||||
|
@ -14,17 +17,38 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
private String mdmId;
|
||||
/** 应用id */
|
||||
private String appId;
|
||||
/** 应用id */
|
||||
private Long mdmCode;
|
||||
/** 触发类型 0、手动1、自动 */
|
||||
private String enabledType;
|
||||
/** 修改接口 */
|
||||
private String updateApi;
|
||||
/** 修改插件 */
|
||||
private String updateScript;
|
||||
/** 新增接口 */
|
||||
private String addApi;
|
||||
/** 新增插件 */
|
||||
private String addScript;
|
||||
/** 删除接口 */
|
||||
private String deleteApi;
|
||||
/** 删除插件 */
|
||||
private String deleteScript;
|
||||
/** 启用停用 0、停用1、启用 */
|
||||
private String enabledState;
|
||||
/** 主表ID */
|
||||
private String dbId;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 公司id */
|
||||
private List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities;
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
@ -42,6 +66,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getEnabledType() {
|
||||
return enabledType;
|
||||
}
|
||||
|
||||
public void setEnabledType(String enabledType) {
|
||||
this.enabledType = enabledType;
|
||||
}
|
||||
|
||||
public String getUpdateApi() {
|
||||
return updateApi;
|
||||
}
|
||||
|
@ -50,6 +82,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.updateApi = updateApi;
|
||||
}
|
||||
|
||||
public String getUpdateScript() {
|
||||
return updateScript;
|
||||
}
|
||||
|
||||
public void setUpdateScript(String updateScript) {
|
||||
this.updateScript = updateScript;
|
||||
}
|
||||
|
||||
public String getAddApi() {
|
||||
return addApi;
|
||||
}
|
||||
|
@ -58,6 +98,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.addApi = addApi;
|
||||
}
|
||||
|
||||
public String getAddScript() {
|
||||
return addScript;
|
||||
}
|
||||
|
||||
public void setAddScript(String addScript) {
|
||||
this.addScript = addScript;
|
||||
}
|
||||
|
||||
public String getDeleteApi() {
|
||||
return deleteApi;
|
||||
}
|
||||
|
@ -66,6 +114,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.deleteApi = deleteApi;
|
||||
}
|
||||
|
||||
public String getDeleteScript() {
|
||||
return deleteScript;
|
||||
}
|
||||
|
||||
public void setDeleteScript(String deleteScript) {
|
||||
this.deleteScript = deleteScript;
|
||||
}
|
||||
|
||||
public String getEnabledState() {
|
||||
return enabledState;
|
||||
}
|
||||
|
@ -74,6 +130,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.enabledState = enabledState;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
@ -82,5 +146,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public List<MdmModuleDistributeDetailEntity> getMdmModuleDistributeDetailEntities() {
|
||||
return mdmModuleDistributeDetailEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleDistributeDetailEntities(List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities) {
|
||||
this.mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailEntities;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue