1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?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.ghsc.partybuild.mapper.cquery.ReportDataCQuery">
- <select id="selectReportdataList" resultType="java.util.HashMap">
- select prd.reportid, prd.dzzdm, prd.year, prd.reportuserid, prd.reportusername, prd.recordstatus,
- prd.createtime, prd.createuserid, prd.createusername, prd.updatetime, prd.updateuserid, prd.updateusername
- ,zz.dzzmc,file.filenames from pt_reportdata prd
- inner join ZZ_ZZQKXX zz on prd.dzzdm = zz.DZZDM
- left join(
- select fl.FILEREFID, GROUP_CONCAT(FILENAME order by FILENAME SEPARATOR ', ') as filenames
- from cf_file fl
- group by fl.FILEREFID
- ) file on prd.reportId =file.FILEREFID
- <where>
- <if test="year != null">
- and prd.year = #{year}
- </if>
- <if test="dzzdm != null and dzzdm != ''">
- and prd.dzzdm like concat('%',#{dzzdm},'%')
- </if>
- <if test="reportUserName != null and reportUserName != ''">
- and prd.reportUserName =#{reportUserName}
- </if>
- <if test="reportUserId != null and reportUserId != ''">
- and prd.reportUserId =#{reportUserId}
- </if>
- </where>
- </select>
- <select id="selectReportDataFleList" resultType="java.util.HashMap" parameterType="java.lang.String">
- select prd.reportid, prd.dzzdm, prd.year, prd.reportuserid, prd.reportusername, prd.recordstatus,
- prd.createtime, prd.createuserid, prd.createusername, prd.updatetime, prd.updateuserid, prd.updateusername
- ,zz.dzzmc,cf.filename,cf.fileurl
- from pt_reportdata prd inner join ZZ_ZZQKXX zz on prd.dzzdm = zz.DZZDM
- left join cf_file cf on prd.reportid = cf.FILEREFID
- where prd.recordstatus=1
- <if test="year != null and year != ''">
- and prd.year = #{year}
- </if>
- </select>
- <select id="selectReportScoreList" resultType="java.util.HashMap">
- select prd.reportid, prd.dzzdm, prd.year, prd.reportuserid, prd.reportusername
- ,ifnull(prs.scoreid,UUID()) scoreid, prs.writtenscore, prs.scenescore, prs.dailyscore, ifnull(prs.total,0) total, prs.remark, prs.reportresult, prs.createtime, prs.createuserid, prs.createusername, prs.updatetime, prs.updateuserid, prs.updateusername
- ,zz.dzzmc,dic.DICVALUE as reportresultname from pt_reportdata prd
- inner join ZZ_ZZQKXX zz on prd.dzzdm = zz.DZZDM
- left join pt_reportScore prs on prd.reportId = prs.reportId
- left join CF_DICTIONARY dic on prs.reportResult=dic.DICKEY and dic.DICTYPEKEY='reportResult'
- <where>
- and prd.recordstatus=1
- <if test="year != null">
- and prd.year = #{year}
- </if>
- <if test="dzzdm != null and dzzdm != ''">
- and prd.dzzdm like concat('%',#{dzzdm},'%')
- </if>
- <if test="reportUserName != null and reportUserName != ''">
- and prd.reportUserName =#{reportUserName}
- </if>
- <if test="reportUserId != null and reportUserId != ''">
- and prd.reportUserId =#{reportUserId}
- </if>
- <if test="reportResult != null">
- and prs.reportResult = #{reportResult}
- </if>
- </where>
- </select>
- </mapper>
|