response/target/classes/mapper/YpxxdataMapper.xml
2025-06-27 10:04:22 +08:00

282 lines
15 KiB
XML

<?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.example.demo.mapper.YpxxdataMapper">
<resultMap id="BaseResultMap" type="com.example.demo.domain.Ypxxdata">
<id property="jcId" column="JC_ID" jdbcType="VARCHAR"/>
<result property="yzhen" column="YZHEN" jdbcType="VARCHAR"/>
<result property="jczdw" column="JCZDW" jdbcType="VARCHAR"/>
<result property="jcz" column="JCZ" jdbcType="DOUBLE"/>
<result property="jczbz" column="JCZBZ" jdbcType="VARCHAR"/>
<result property="bzzdw" column="BZZDW" jdbcType="VARCHAR"/>
<result property="bzz" column="BZZ" jdbcType="VARCHAR"/>
<result property="pjbz" column="PJBZ" jdbcType="VARCHAR"/>
<result property="ffdlxdw" column="FFDLXDW" jdbcType="VARCHAR"/>
<result property="ffdlx" column="FFDLX" jdbcType="VARCHAR"/>
<result property="ffjcxdw" column="FFJCXDW" jdbcType="VARCHAR"/>
<result property="ffjcx" column="FFJCX" jdbcType="VARCHAR"/>
<result property="jcmc" column="JCMC" jdbcType="VARCHAR"/>
<result property="jcff" column="JCFF" jdbcType="VARCHAR"/>
<result property="jcbz" column="JCBZ" jdbcType="VARCHAR"/>
<result property="roleid" column="ROLEID" jdbcType="VARCHAR"/>
<result property="rolename" column="ROLENAME" jdbcType="VARCHAR"/>
<result property="type" column="TYPE" jdbcType="VARCHAR"/>
<result property="ypid" column="YPID" jdbcType="VARCHAR"/>
<result property="bcydwmc" column="BCYDWMC" jdbcType="VARCHAR"/>
<result property="bcydwqm" column="BCYDWQM" jdbcType="VARCHAR"/>
<result property="bcydwsj" column="BCYDWSJ" jdbcType="DATE"/>
<result property="bcyrmc" column="BCYRMC" jdbcType="VARCHAR"/>
<result property="bysl" column="BYSL" jdbcType="VARCHAR"/>
<result property="bzfl" column="BZFL" jdbcType="VARCHAR"/>
<result property="bzq" column="BZQ" jdbcType="VARCHAR"/>
<result property="cydbh" column="CYDBH" jdbcType="VARCHAR"/>
<result property="cydd" column="CYDD" jdbcType="VARCHAR"/>
<result property="cyddlx" column="CYDDLX" jdbcType="VARCHAR"/>
<result property="cydw" column="CYDW" jdbcType="VARCHAR"/>
<result property="cydwcz" column="CYDWCZ" jdbcType="VARCHAR"/>
<result property="cydwdh" column="CYDWDH" jdbcType="VARCHAR"/>
<result property="cydwdz" column="CYDWDZ" jdbcType="VARCHAR"/>
<result property="cydwlxr" column="CYDWLXR" jdbcType="VARCHAR"/>
<result property="cydwmc" column="CYDWMC" jdbcType="VARCHAR"/>
<result property="cydwyb" column="CYDWYB" jdbcType="VARCHAR"/>
<result property="cyfs" column="CYFS" jdbcType="VARCHAR"/>
<result property="cyjs" column="CYJS" jdbcType="VARCHAR"/>
<result property="cyrqm" column="CYRQM" jdbcType="VARCHAR"/>
<result property="cysj" column="CYSJ" jdbcType="DATE"/>
<result property="cysl" column="CYSL" jdbcType="VARCHAR"/>
<result property="cyypbz" column="CYYPBZ" jdbcType="VARCHAR"/>
<result property="cz" column="CZ" jdbcType="VARCHAR"/>
<result property="dh1" column="DH1" jdbcType="VARCHAR"/>
<result property="dj" column="DJ" jdbcType="VARCHAR"/>
<result property="dzH" column="DZ_H" jdbcType="VARCHAR"/>
<result property="dzN" column="DZ_N" jdbcType="VARCHAR"/>
<result property="dzQx" column="DZ_QX" jdbcType="VARCHAR"/>
<result property="dzS" column="DZ_S" jdbcType="VARCHAR"/>
<result property="dzS1" column="DZ_S1" jdbcType="VARCHAR"/>
<result property="dzZ" column="DZ_Z" jdbcType="VARCHAR"/>
<result property="frdb" column="FRDB" jdbcType="VARCHAR"/>
<result property="ggxh" column="GGXH" jdbcType="VARCHAR"/>
<result property="jcdw" column="JCDW" jdbcType="VARCHAR"/>
<result property="jieguo" column="JIEGUO" jdbcType="VARCHAR"/>
<result property="jsypdz" column="JSYPDZ" jdbcType="VARCHAR"/>
<result property="jyxkz" column="JYXKZ" jdbcType="VARCHAR"/>
<result property="lsh" column="LSH" jdbcType="VARCHAR"/>
<result property="lxdh" column="LXDH" jdbcType="VARCHAR"/>
<result property="lxr1" column="LXR1" jdbcType="VARCHAR"/>
<result property="newypfl" column="NEWYPFL" jdbcType="VARCHAR"/>
<result property="nxse" column="NXSE" jdbcType="VARCHAR"/>
<result property="oldypfl" column="OLDYPFL" jdbcType="VARCHAR"/>
<result property="qt" column="QT" jdbcType="VARCHAR"/>
<result property="qylx" column="QYLX" jdbcType="VARCHAR"/>
<result property="rwbh" column="RWBH" jdbcType="VARCHAR"/>
<result property="rwlx" column="RWLX" jdbcType="VARCHAR"/>
<result property="rwly" column="RWLY" jdbcType="VARCHAR"/>
<result property="rwnf" column="RWNF" jdbcType="VARCHAR"/>
<result property="rwxz" column="RWXZ" jdbcType="VARCHAR"/>
<result property="sb" column="SB" jdbcType="VARCHAR"/>
<result property="scjggjrq" column="SCJGGJRQ" jdbcType="DATE"/>
<result property="scxkzbh" column="SCXKZBH" jdbcType="VARCHAR"/>
<result property="sczdz" column="SCZDZ" jdbcType="VARCHAR"/>
<result property="sczdzQ" column="SCZDZ_Q" jdbcType="VARCHAR"/>
<result property="sczdzS" column="SCZDZ_S" jdbcType="VARCHAR"/>
<result property="sczdzSs" column="SCZDZ_SS" jdbcType="VARCHAR"/>
<result property="sczmc" column="SCZMC" jdbcType="VARCHAR"/>
<result property="sfck" column="SFCK" jdbcType="VARCHAR"/>
<result property="spDl" column="SP_DL" jdbcType="VARCHAR"/>
<result property="spPz" column="SP_PZ" jdbcType="VARCHAR"/>
<result property="spXl" column="SP_XL" jdbcType="VARCHAR"/>
<result property="spYl" column="SP_YL" jdbcType="VARCHAR"/>
<result property="ypcctj" column="YPCCTJ" jdbcType="VARCHAR"/>
<result property="ypjbzt" column="YPJBZT" jdbcType="VARCHAR"/>
<result property="ypjbzttype" column="YPJBZTTYPE" jdbcType="VARCHAR"/>
<result property="ypjzrq" column="YPJZRQ" jdbcType="VARCHAR"/>
<result property="yplx" column="YPLX" jdbcType="VARCHAR"/>
<result property="yply" column="YPLY" jdbcType="VARCHAR"/>
<result property="ypmc" column="YPMC" jdbcType="VARCHAR"/>
<result property="ypph" column="YPPH" jdbcType="VARCHAR"/>
<result property="yppjxx" column="YPPJXX" jdbcType="VARCHAR"/>
<result property="yppjxxtype" column="YPPJXXTYPE" jdbcType="VARCHAR"/>
<result property="ypsx" column="YPSX" jdbcType="VARCHAR"/>
<result property="ypxt" column="YPXT" jdbcType="VARCHAR"/>
<result property="yx" column="YX" jdbcType="VARCHAR"/>
<result property="yyzzh" column="YYZZH" jdbcType="VARCHAR"/>
<result property="zldj" column="ZLDJ" jdbcType="VARCHAR"/>
<result property="zxbz" column="ZXBZ" jdbcType="VARCHAR"/>
<result property="zxnyJs" column="ZXNY_JS" jdbcType="DATE"/>
<result property="zxnyKs" column="ZXNY_KS" jdbcType="DATE"/>
<result property="jcxm" column="JCXM" jdbcType="VARCHAR"/>
<result property="jcxl" column="JCXL" jdbcType="VARCHAR"/>
<result property="jcyl" column="JCYL" jdbcType="VARCHAR"/>
<result property="jcdl" column="JCDL" jdbcType="VARCHAR"/>
<result property="yznum" column="YZNUM" jdbcType="INTEGER"/>
<result property="sfjk" column="SFJK" jdbcType="VARCHAR"/>
<result property="ycd" column="YCD" jdbcType="VARCHAR"/>
<result property="jyjgjc" column="JYJGJC" jdbcType="VARCHAR"/>
<result property="wlptmc" column="WLPTMC" jdbcType="VARCHAR"/>
<result property="longitude" column="LONGITUDE" jdbcType="VARCHAR"/>
<result property="latitude" column="LATITUDE" jdbcType="VARCHAR"/>
<result property="jiedao" column="JIEDAO" jdbcType="VARCHAR"/>
<result property="dsfqymc" column="DSFQYMC" jdbcType="VARCHAR"/>
<result property="dsfqydz" column="DSFQYDZ" jdbcType="VARCHAR"/>
<result property="dsfqyxz" column="DSFQYXZ" jdbcType="VARCHAR"/>
<result property="dsfqyxkzbh" column="DSFQYXKZBH" jdbcType="VARCHAR"/>
<result property="wlptszds" column="WLPTSZDS" jdbcType="VARCHAR"/>
<result property="ptdz" column="PTDZ" jdbcType="VARCHAR"/>
<result property="ptwz" column="PTWZ" jdbcType="VARCHAR"/>
<result property="wdwz" column="WDWZ" jdbcType="VARCHAR"/>
<result property="ptddbh" column="PTDDBH" jdbcType="VARCHAR"/>
<result property="wd" column="WD" jdbcType="VARCHAR"/>
<result property="sd" column="SD" jdbcType="VARCHAR"/>
<result property="bgsbh" column="BGSBH" jdbcType="VARCHAR"/>
<result property="wlptyyzzh" column="WLPTYYZZH" jdbcType="VARCHAR"/>
<result property="bcydwgeo" column="BCYDWGEO" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
JC_ID,YZHEN,JCZDW,
JCZ,JCZBZ,BZZDW,
BZZ,PJBZ,FFDLXDW,
FFDLX,FFJCXDW,FFJCX,
JCMC,JCFF,JCBZ,
ROLEID,ROLENAME,TYPE,
YPID,BCYDWMC,BCYDWQM,
BCYDWSJ,BCYRMC,BYSL,
BZFL,BZQ,CYDBH,
CYDD,CYDDLX,CYDW,
CYDWCZ,CYDWDH,CYDWDZ,
CYDWLXR,CYDWMC,CYDWYB,
CYFS,CYJS,CYRQM,
CYSJ,CYSL,CYYPBZ,
CZ,DH1,DJ,
DZ_H,DZ_N,DZ_QX,
DZ_S,DZ_S1,DZ_Z,
FRDB,GGXH,JCDW,
JIEGUO,JSYPDZ,JYXKZ,
LSH,LXDH,LXR1,
NEWYPFL,NXSE,OLDYPFL,
QT,QYLX,RWBH,
RWLX,RWLY,RWNF,
RWXZ,SB,SCJGGJRQ,
SCXKZBH,SCZDZ,SCZDZ_Q,
SCZDZ_S,SCZDZ_SS,SCZMC,
SFCK,SP_DL,SP_PZ,
SP_XL,SP_YL,YPCCTJ,
YPJBZT,YPJBZTTYPE,YPJZRQ,
YPLX,YPLY,YPMC,
YPPH,YPPJXX,YPPJXXTYPE,
YPSX,YPXT,YX,
YYZZH,ZLDJ,ZXBZ,
ZXNY_JS,ZXNY_KS,JCXM,
JCXL,JCYL,JCDL,
YZNUM,SFJK,YCD,
JYJGJC,WLPTMC,LONGITUDE,
LATITUDE,JIEDAO,DSFQYMC,
DSFQYDZ,DSFQYXZ,DSFQYXKZBH,
WLPTSZDS,PTDZ,PTWZ,
WDWZ,PTDDBH,WD,
SD,BGSBH,WLPTYYZZH,
BCYDWGEO
</sql>
<select id="GetMaxId" resultType="java.lang.Integer">
select MAX(ID) as Id
from ${tableName};
</select>
<select id="getTertiaryByHJAndQX" resultType="com.example.demo.entity.TongJi.CjjcAll">
select b.SP_DL as tertiaryName,
COUNT(b.LSH) as choujianCount,
SUM((case when b.lsbuhegesum > 0 then 1 else 0 end)) as unHegeCount,
unHegeCount / choujianCount as unPassRate,
b.DZ_QX as countyName
from (select a.SP_DL, a.LSH, COUNT(*) as lscount, SUM(a.buhege) as lsbuhegesum, DZ_QX
from (select SP_DL,
LSH,
DZ_QX,
(case
when YZHEN = '不合格' then 1
else 0 end) as buhege
from YPXXDATA ${ew.customSqlSegment}) a
GROUP BY a.SP_DL, a.LSH, DZ_QX) b
GROUP BY b.DZ_QX, b.SP_DL
</select>
<select id="getTertiaryByHJAndJD" resultType="com.example.demo.entity.TongJi.CjjcAll">
select b.SP_DL as tertiaryName,
COUNT(b.LSH) as choujianCount,
SUM((case when b.lsbuhegesum > 0 then 1 else 0 end)) as unHegeCount,
unHegeCount / choujianCount as unPassRate,
b.DZ_QX as countyName,
b.SUOSHUJIEZHEN as street
from (select a.SP_DL, a.LSH, COUNT(*) as lscount, SUM(a.buhege) as lsbuhegesum, DZ_QX, SUOSHUJIEZHEN
from (select SP_DL,
LSH,
DZ_QX,
SUOSHUJIEZHEN,
(case
when YZHEN = '不合格' then 1
else 0 end) as buhege
from YPXXDATA ${ew.customSqlSegment}) a
GROUP BY a.SP_DL, a.LSH, DZ_QX, SUOSHUJIEZHEN) b
GROUP BY b.DZ_QX, b.SP_DL, b.SUOSHUJIEZHEN
</select>
<select id="getTertiaryByHj" resultType="com.example.demo.entity.TongJi.CjjcAll">
select b.SP_YL as tertiaryName,
COUNT(b.LSH) as choujianCount,
SUM((case when b.lsbuhegesum > 0 then 1 else 0 end)) as unHegeCount,
unHegeCount / choujianCount as unPassRate
from (select a.SP_YL, a.LSH, SUM(a.buhege) as lsbuhegesum
from (select SP_YL,
LSH,
(case when YZHEN = '不合格' then 1 else 0 end) as buhege
from YPXXDATA ${ew.customSqlSegment}) a
GROUP BY a.SP_YL, a.LSH) b
GROUP BY b.SP_YL
</select>
<select id="getQuQiYeCount" resultType="com.example.demo.entity.vo.CjjcQiyeCountVo">
select DZ_QX as countyName,
COUNT(DISTINCT (JYXKZ)) as qiyeCount
FROM YPXXDATA ${ew.customSqlSegment}
GROUP BY DZ_QX
</select>
<select id="getStreetQiYeCount" resultType="com.example.demo.entity.vo.CjjcQiyeCountVo">
select DZ_QX as countyName,
SUOSHUJIEZHEN as street,
COUNT(DISTINCT (JYXKZ)) as qiyeCount
FROM YPXXDATA ${ew.customSqlSegment}
GROUP BY DZ_QX,SUOSHUJIEZHEN
</select>
<select id="getQiYeCountByQu" resultType="com.example.demo.entity.vo.CjjcQiyeCountVo">
select COUNT(DISTINCT (JYXKZ)) as qiyeCount
FROM YPXXDATA ${ew.customSqlSegment}
</select>
<select id="getQiYeCount" resultType="com.example.demo.entity.vo.CjjcQiyeCountVo">
select COUNT(DISTINCT (JYXKZ)) as qiyeCount
FROM YPXXDATA ${ew.customSqlSegment}
</select>
<select id="getQuCjCount" resultType="com.example.demo.entity.vo.CjjcCjCountVo">
select DZ_QX as countyName,
COUNT(DISTINCT (LSH)) as cjCount
FROM YPXXDATA ${ew.customSqlSegment}
GROUP by DZ_QX
</select>
<select id="getCjCountByQu" resultType="com.example.demo.entity.vo.CjjcCjCountVo">
select COUNT(DISTINCT (LSH)) as cjCount
FROM YPXXDATA ${ew.customSqlSegment}
</select>
<select id="getCjCount" resultType="com.example.demo.entity.vo.CjjcCjCountVo">
select COUNT(DISTINCT (LSH)) as cjCount
FROM YPXXDATA ${ew.customSqlSegment}
</select>
</mapper>