mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
新增组织模板分页,组织模板配置接口
This commit is contained in:
+78
@@ -13,6 +13,28 @@
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="orgMap" type="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateResp">
|
||||
<result property="organId" column="organId"/>
|
||||
<result property="organName" column="organName"/>
|
||||
<result property="updateTime" column="updateTime"/>
|
||||
<collection property="authTemplateList" javaType="java.util.List" ofType="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateVO"
|
||||
select="selectOrganTemplateList" column="{organId=organId, templateName = templateName}" notNullColumn="templateId" >
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="xxMap" type="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateResp">
|
||||
<result property="organId" column="organId"/>
|
||||
<result property="organName" column="organName"/>
|
||||
<result property="updateTime" column="updateTime"/>
|
||||
<collection property="authTemplateList" javaType="java.util.List" ofType="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateVO"
|
||||
select="selectOrganTemplateList" column="{organId=organId, templateName = templateName}" notNullColumn="templateId" >
|
||||
</collection>
|
||||
<!--<collection property="authTemplateList" javaType="java.util.List" ofType="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateVO">
|
||||
<result property="templateName" column="templateName"/>
|
||||
<result property="templateId" column="templateId"/>
|
||||
</collection>-->
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAuthTemplatePage" resultMap="map" parameterType="com.cf.imes.module.system.controller.admin.machine.vo.AuthTemplatePage">
|
||||
select a.id AS userId, a.nickname, a.organ_id, max(b.create_time) as updateTime, f.name as organName,
|
||||
case when ('${vo.templateName}' != '') then '${vo.templateName}' else '' end as templateName
|
||||
@@ -43,4 +65,60 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrganTemplatePage" resultMap="orgMap">
|
||||
select a.id as organId, a.name as organName, max(b.create_time) as updateTime,
|
||||
case when ('${vo.templateName}' != '') then '${vo.templateName}' else '' end as templateName
|
||||
from system_organization a, system_organ_machine b
|
||||
<where>
|
||||
a.id = b.organ_id
|
||||
<if test="vo.organId != null">
|
||||
and a.id = #{vo.organId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY organId
|
||||
order by updateTime desc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectOrganTemplateList"
|
||||
resultType="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateVO">
|
||||
select b.organ_id organId, b.show_prior_facing, b.show_dual_workstation, b.show_auto_note_printer,
|
||||
c.name AS templateName, c.id AS templateId, c.machine_type
|
||||
from system_organ_machine b
|
||||
inner join system_machine_template c on b.machine_id = c.id and c.deleted = 0
|
||||
<where>
|
||||
b.organ_id = #{organId}
|
||||
<if test="templateName != null and templateName != ''">
|
||||
and c.name like concat('%',#{templateName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="xxselectOrganTemplatePage" resultMap="xxMap">
|
||||
select * from (
|
||||
select a.id as organId, a.name as organName, max(b.create_time) as updateTime,
|
||||
case when ('${vo.templateName}' != '') then '${vo.templateName}' else '' end as templateName
|
||||
from system_organization a, system_organ_machine b
|
||||
<where>
|
||||
a.id = b.organ_id
|
||||
<if test="vo.organId !=null">
|
||||
and a.id = #{vo.organId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY organId
|
||||
) t1
|
||||
LEFT JOIN (
|
||||
select b.organ_id t2_organId
|
||||
from system_organ_machine b inner join system_machine_template c on b.machine_id = c.id and c.deleted = 0
|
||||
<where>
|
||||
<if test="vo.templateName !=null and vo.templateName !='' " >
|
||||
c.name like concat('%',#{vo.templateName},'%')
|
||||
</if>
|
||||
</where>
|
||||
) t2 on t1.organId = t2.t2_organId
|
||||
where t2.t2_organId is not null
|
||||
GROUP BY organId
|
||||
order by updateTime desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user