1、科目对照新增补充字段:系统主键、系统编码、系统名称
This commit is contained in:
parent
4d8905f445
commit
8f20dc7668
|
@ -1411,6 +1411,26 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
}
|
||||
}
|
||||
}
|
||||
//查询sysPk,sysCode,sysName段是否存在 add by zyd 2025-06-09
|
||||
// boolean isSysPk = false;
|
||||
// boolean isSysCode = false;
|
||||
// boolean isSysName = false;
|
||||
for (MdmModuleDbFiledsEntity dbFiledsEntity : mdmModuleDbFiledsEntityList) {
|
||||
if ("Y".equals(dbFiledsEntity.getSysPk())) {
|
||||
// isSysPk = true;
|
||||
return BaseResult.getFailureMessageEntity("系统主键字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getSysCode())) {
|
||||
// isSysCode = true;
|
||||
return BaseResult.getFailureMessageEntity("系统code字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getSysName())) {
|
||||
// isSysName = true;
|
||||
return BaseResult.getFailureMessageEntity("系统name字段已存在,请修改");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
entity.setCreate();
|
||||
if ("1".equals(entity.getDbType())) {
|
||||
entity.setAddType("1");
|
||||
|
|
|
@ -216,5 +216,42 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否sys主键 系统主键(三方系统主键,同步中台之后,该字段作为主键)Y/N
|
||||
*/
|
||||
private String sysPk;
|
||||
/**
|
||||
* 是否sys编码 系统code(三方系统code,同步中台之后,该字段作为code)Y/N
|
||||
*/
|
||||
private String sysCode;
|
||||
/**
|
||||
* 是否sys名称 系统name(三方系统name,同步中台之后,该字段作为name)Y/N
|
||||
*/
|
||||
private String sysName;
|
||||
|
||||
public String getSysPk() {
|
||||
return sysPk;
|
||||
}
|
||||
|
||||
public void setSysPk(String sysPk) {
|
||||
this.sysPk = sysPk;
|
||||
}
|
||||
|
||||
public String getSysCode() {
|
||||
return sysCode;
|
||||
}
|
||||
|
||||
public void setSysCode(String sysCode) {
|
||||
this.sysCode = sysCode;
|
||||
}
|
||||
|
||||
public String getSysName() {
|
||||
return sysName;
|
||||
}
|
||||
|
||||
public void setSysName(String sysName) {
|
||||
this.sysName = sysName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
<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="sysPk" column="sys_pk" jdbcType="VARCHAR"/>
|
||||
<result property="sysCode" column="sys_code" jdbcType="VARCHAR"/>
|
||||
<result property="sysName" column="sys_name" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmModuleDbFiledsEntity_Base_Column_List">
|
||||
|
@ -48,6 +51,9 @@
|
|||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,sys_pk
|
||||
,sys_code
|
||||
,sys_name
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
|
@ -76,6 +82,9 @@
|
|||
<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="sysPk != null and sysPk != ''"> and sys_pk = #{sysPk} </if>
|
||||
<if test="sysCode != null and sysCode != ''"> and sys_code = #{sysCode} </if>
|
||||
<if test="sysName != null and sysName != ''"> and sys_name = #{sysName} </if>
|
||||
<if test="roletype != null and roletype != ''">
|
||||
and id in (
|
||||
select
|
||||
|
@ -115,6 +124,9 @@
|
|||
<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="sysPk != null and sysPk != ''"> and sys_pk = #{sysPk} </if>
|
||||
<if test="sysCode != null and sysCode != ''"> and sys_code = #{sysCode} </if>
|
||||
<if test="sysName != null and sysName != ''"> and sys_name = #{sysName} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
|
@ -148,6 +160,10 @@
|
|||
<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="sysPk != null and sysPk != ''"> and sys_pk like concat('%',#{sysPk},'%') </if>
|
||||
<if test="sysCode != null and sysCode != ''"> and sys_code like concat('%',#{sysCode},'%') </if>
|
||||
<if test="sysName != null and sysName != ''"> and sys_name like concat('%',#{sysName},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
|
@ -181,6 +197,11 @@
|
|||
<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="sysPk != null and sysPk != ''"> or sys_pk = #{sysPk} </if>
|
||||
<if test="sysCode != null and sysCode != ''"> or sys_code = #{sysCode} </if>
|
||||
<if test="sysName != null and sysName != ''"> or sys_name = #{sysName} </if>
|
||||
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
|
@ -212,6 +233,9 @@
|
|||
<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="sysPk != null and sysPk != ''"> sys_pk , </if>
|
||||
<if test="sysCode != null and sysCode != ''"> sys_code , </if>
|
||||
<if test="sysName != null and sysName != ''"> sys_name , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -237,6 +261,9 @@
|
|||
<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="sysPk != null and sysPk != ''"> #{sysPk} ,</if>
|
||||
<if test="sysCode != null and sysCode != ''"> #{sysCode} ,</if>
|
||||
<if test="sysName != null and sysName != ''"> #{sysName} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue