2025-12-25 20:14:19 +08:00
|
|
|
<?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.czlis.liswork.mapper.xtwh.ComReportInstrMapper">
|
|
|
|
|
<resultMap type="com.czlis.common.core.domain.entity.lis.ComReportInstr" id="ComReportInstrResult">
|
|
|
|
|
<id property="reportId" column="report_id" />
|
|
|
|
|
<result property="reportYq" column="report_yq" />
|
|
|
|
|
<result property="reportBgdh" column="report_bgdh" />
|
|
|
|
|
<result property="reportSize" column="report_size" />
|
|
|
|
|
<result property="reportType" column="report_type" />
|
|
|
|
|
<result property="reportRows" column="report_rows" />
|
|
|
|
|
<result property="reportMinrows" column="report_minrows" />
|
|
|
|
|
<result property="reportMaxrows" column="report_maxrows" />
|
|
|
|
|
<result property="reportItems" column="report_items" />
|
|
|
|
|
<result property="reportSort" column="report_sort" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="reportName" column="report_name" />
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="selectComReportInstrVo">
|
|
|
|
|
select report_id,report_type,report_yq,report_size,report_bgdh,report_sort,
|
|
|
|
|
report_rows,report_minrows,report_maxrows,report_items,
|
|
|
|
|
status,create_by,create_time,update_by,update_time,remark from com_report_instr
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectComReportInstrList" resultMap="ComReportInstrResult" parameterType="com.czlis.common.core.domain.entity.lis.ComReportInstr" >
|
|
|
|
|
<include refid="selectComReportInstrVo"></include>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="reportId != null and reportId != 0">
|
|
|
|
|
and report_id = #{reportId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="reportBgdh != null and reportBgdh != 0">
|
|
|
|
|
and report_bgdh = #{reportBgdh}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="reportType != null and reportType != ''">
|
|
|
|
|
and report_type = #{reportType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="reportYq != null and reportYq != ''">
|
|
|
|
|
and report_yq = #{reportYq}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="reportSize != null and reportSize != ''">
|
|
|
|
|
and report_size = #{reportSize}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
and status = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by report_sort ASC
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getCountById" resultType="Long">
|
|
|
|
|
select count(1) from com_report_instr where report_id = #{reportId}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectComReportInstrAll" resultMap="ComReportInstrResult">
|
|
|
|
|
<include refid="selectComReportInstrVo"/>
|
|
|
|
|
order by report_sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectComReportInstrById" parameterType="Long" resultMap="ComReportInstrResult">
|
|
|
|
|
<include refid="selectComReportInstrVo"/>
|
|
|
|
|
where report_id = #{reportId}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectComReportInstrByInstr" parameterType="String" resultMap="ComReportInstrResult">
|
|
|
|
|
select com_report_instr.*,com_report_dict.report_name
|
2025-12-26 17:30:33 +08:00
|
|
|
from com_report_instr left join com_report_dict on com_report_instr.report_bgdh=com_report_dict.report_bgdh
|
2025-12-25 20:14:19 +08:00
|
|
|
where com_report_instr.report_yq = #{reportYq}
|
|
|
|
|
order by com_report_instr.report_sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertComReportInstr" parameterType="com.czlis.common.core.domain.entity.lis.ComReportInstr" useGeneratedKeys="true" keyProperty="reportId">
|
|
|
|
|
insert into com_report_instr(
|
|
|
|
|
<if test="reportId != null and reportId != 0">report_id,</if>
|
|
|
|
|
<if test="reportType != null and reportType != ''">report_type,</if>
|
|
|
|
|
<if test="reportYq != null and reportYq != ''">report_yq,</if>
|
|
|
|
|
<if test="reportBgdh != null and reportBgdh != 0">report_bgdh,</if>
|
|
|
|
|
<if test="reportSize != null and reportSize != ''">report_size,</if>
|
|
|
|
|
<if test="reportRows != null and reportRows != 0">report_rows,</if>
|
|
|
|
|
<if test="reportMinrows != null and reportMinrows != 0">report_minrows,</if>
|
|
|
|
|
<if test="reportMaxrows != null and reportMaxrows != 0">report_maxrows,</if>
|
|
|
|
|
<if test="reportItems != null and reportItems != ''">report_items,</if>
|
|
|
|
|
<if test="reportSort != null">report_sort,</if>
|
|
|
|
|
<if test="status != null and status != ''">status,</if>
|
|
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
create_time
|
|
|
|
|
)values(
|
|
|
|
|
<if test="reportId != null and reportId != 0">#{reportId},</if>
|
|
|
|
|
<if test="reportType != null and reportType != ''">#{reportType},</if>
|
|
|
|
|
<if test="reportYq != null and reportYq != ''">#{reportYq},</if>
|
|
|
|
|
<if test="reportBgdh != null and reportBgdh != 0">#{reportBgdh},</if>
|
|
|
|
|
<if test="reportSize != null and reportSize != ''">#{reportSize},</if>
|
|
|
|
|
<if test="reportRows != null and reportRows != 0">#{reportRows},</if>
|
|
|
|
|
<if test="reportMinrows != null and reportMinrows != 0">#{reportMinrows},</if>
|
|
|
|
|
<if test="reportMaxrows != null and reportMaxrows != 0">#{reportMaxrows},</if>
|
|
|
|
|
<if test="reportItems != null and reportItems != ''">#{reportItems},</if>
|
|
|
|
|
<if test="reportSort != null">#{reportSort},</if>
|
|
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
getdate()
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<delete id="delComReportInstrById" parameterType="Long">
|
|
|
|
|
delete from com_report_instr where report_id = #{reportId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="delComReportInstrByIds" parameterType="Long">
|
|
|
|
|
delete from com_report_instr where report_id in
|
|
|
|
|
<foreach collection="array" item="reportId" open="(" separator="," close=")">
|
|
|
|
|
#{reportId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<update id="updateComReportInstr" parameterType="com.czlis.common.core.domain.entity.lis.ComReportInstr">
|
|
|
|
|
update com_report_instr
|
2025-12-30 15:42:35 +08:00
|
|
|
set report_type = #{reportType},
|
|
|
|
|
report_yq = #{reportYq},
|
|
|
|
|
report_bgdh = #{reportBgdh},
|
|
|
|
|
report_size = #{reportSize},
|
|
|
|
|
report_rows = #{reportRows},
|
|
|
|
|
report_minrows = #{reportMinrows},
|
|
|
|
|
report_maxrows = #{reportMaxrows},
|
|
|
|
|
report_items = #{reportItems},
|
|
|
|
|
report_sort = #{reportSort},
|
|
|
|
|
status = #{status},
|
|
|
|
|
remark = #{remark},
|
|
|
|
|
update_by = #{updateBy},
|
|
|
|
|
update_time = getdate()
|
2025-12-25 20:14:19 +08:00
|
|
|
where report_id = #{reportId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|