基础数据批量更新接口

This commit is contained in:
liss
2025-09-25 17:46:30 +08:00
parent a2699537d9
commit 17f73bd5c2
39 changed files with 357 additions and 89 deletions

View File

@@ -9,23 +9,37 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="getPageByReq" resultType="com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO">
<select id="getPageByReq" resultType="com.zt.plat.module.base.dal.dataobject.base.CompanyRelaDeptDO">
select
c.NUM as erpNumber,
c.NAME as erpName,
d.NAME as companyName,
d.ID as deptId,
d.LEADER_USER_ID as leaderUserId,
d.IS_COMPANY,
d.IS_GROUP,
d.PHONE,
d.EMAIL,
d.STATUS,
d.CREATOR
from
SPLY_CPN_REL r
left join SYSTEM_DEPT d on r.COMPANY_ID = d.ID
left join SPLY_ERP_CPN c on r.ERP_NUM = c.NUM
where r.DELETED = 0
d.ID as id,
d.PARENT_ID as parentId,
r.ID as relId,
c.NUM as erpNumber,
c.NAME as erpName,
d.NAME as companyName,
d.CODE as deptId,
d.LEADER_USER_ID as leaderUserId,
d.IS_COMPANY as isCompany ,
d.IS_GROUP as isGroup,
d.PHONE as phone,
d.EMAIL as email,
d.STATUS as status,
d.CREATOR as creator
from SYSTEM_DEPT d
left join SPLY_CPN_REL r on r.NUM = d.CODE
left join SPLY_ERP_CPN c on r.ERP_NUM = c.NUM
where d.DELETED = 0
<if test="name != null">
and d.NAME = #{name}
</if>
<if test="erpName != null">
and c.NAME = #{erpName}
</if>
<if test="manager != null">
and d.LEADER_USER_ID = #{manager}
</if>
<if test="departmentSource != null">
and d.DEPT_SOURCE = #{departmentSource}
</if>
</select>
</mapper>