超管统计接口50%

This commit is contained in:
lym
2024-08-16 18:13:37 +08:00
26 changed files with 766 additions and 333 deletions
@@ -0,0 +1,40 @@
<?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.cf.imes.module.system.dal.mysql.machine.MachineBrandMapper">
<resultMap id="MachineMap" type="com.cf.imes.module.system.controller.admin.machine.vo.MachineBrandModelRespVO">
<result property="brandId" column="brandId"/>
<result property="brand" column="brand"/>
<collection property="machineSimpleRespVOS" ofType="com.cf.imes.module.system.controller.admin.machine.vo.MachineSimpleRespVO" resultMap="MachineSimpleMap"/>
</resultMap>
<resultMap id="MachineSimpleMap" type="com.cf.imes.module.system.controller.admin.machine.vo.MachineSimpleRespVO">
<result property="id" column="id"/>
<result property="name" column="name"/>
</resultMap>
<select id="selectMachineList" resultMap="MachineMap">
select smb.id as brandId,
smb.brand,
smt.id,
smt.name
from system_machine_brand smb
left join system_machine_template smt on smb.id = smt.brand_id
where smt.deleted = false and smb.machine_type = #{type}
</select>
</mapper>
@@ -0,0 +1,106 @@
<?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.cf.imes.module.system.dal.mysql.machinetemplate.MachineTemplateLimitMapper">
<resultMap id="MachineTemplateMap" type="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateResp">
<result property="organId" column="organId"/>
<result property="organName" column="organName"/>
<!-- <collection property="machineTemplateBrandReqVOS" ofType="com.cf.imes.module.system.controller.admin.machine.vo.MachineTemplateBrandReqVO" resultMap="TemplateBrandMap"/>-->
</resultMap>
<select id="selectMachinePage" resultMap="MachineTemplateMap">
select distinct
so.id as organId,
so.name as organName
from system_machine_template_limit smtl
join system_organization so on smtl.organ_id = so.id
join system_machine_template smt on smtl.machine_id = smt.id
<where>
so.status = 0
and so.deleted = false
and smtl.deleted = false
<if test="page.organName !=null ">
and so.name like concat('%', #{page.organName},'%')
</if>
<if test="page.templateName !=null ">
and smt.name like concat('%', #{page.templateName},'%')
</if>
</where>
</select>
<resultMap id="TemplateBrandMap" type="com.cf.imes.module.system.controller.admin.machine.vo.MachineTemplateBrandReqVO">
<result property="organId" column="organId"/>
<result property="machineType" column="machineType"/>
<result property="id" column="id"/>
<collection property="organMachineVOS" ofType="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateVO" resultMap="OrganMachineMap"/>
</resultMap>
<resultMap id="OrganMachineMap" type="com.cf.imes.module.system.controller.admin.machine.vo.OrganTemplateVO">
<result property="templateId" column="templateId"/>
<result property="brandId" column="id"/>
<result property="templateName" column="templateName"/>
<result property="machineType" column="machineType"/>
<result property="showPriorFacing" column="showPriorFacing"/>
<result property="showDualWorkstation" column="showDualWorkstation"/>
<result property="showAutoNotePrinter" column="showAutoNotePrinter"/>
</resultMap>
<select id="selectMachineList"
resultMap="TemplateBrandMap">
select distinct
smtl.organ_id as organId,
smt.machine_type as machineType,
smt.brand_id as id,
smtl.machine_id as templateId,
smt.name as templateName,
smtl.show_auto_note_printer as showAutoNotePrinter,
smtl.show_dual_workstation as showDualWorkstation,
smtl.show_prior_facing as showPriorFacing
from system_machine_template_limit smtl
join system_machine_template smt on smtl.machine_id = smt.id
<where>
smtl.deleted = false
and smtl.organ_id in
<foreach item="organIds" collection="organIds" open="(" separator="," close=")">
#{organIds}
</foreach>
<if test="templateName !=null ">
and smt.name like concat('%', #{templateName},'%')
</if>
</where>
</select>
</mapper>
@@ -1,7 +1,7 @@
<?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.cf.imes.module.system.dal.mysql.organ.OrganMapper">
<select id="selectOrgSilentCount" resultType="java.lang.Integer">
WITH NoLoginOrgs AS (
SELECT DISTINCT o.id
@@ -18,4 +18,18 @@
FROM NoLoginOrgs;
</select>
<select id="selectTestSQL" resultType="com.cf.imes.module.system.dal.dataobject.organ.OrganizationDO">
${sql}
</select>
</mapper>