You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
4.6 KiB
106 lines
4.6 KiB
<?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.dsic.gj_erp.mapper.pbsc.MpYlxxpMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.dsic.gj_erp.bean.pbsc.MpYlxxp">
|
|
<id column="ylsxh" property="ylsxh" />
|
|
<result column="SCRQ" property="scrq" />
|
|
<result column="SYRQ" property="syrq" />
|
|
<result column="DC_LPH" property="dcLph" />
|
|
<result column="GZZX" property="gzzx" />
|
|
<result column="YLCJBM" property="ylcjbm" />
|
|
<result column="YLKWH" property="ylkwh" />
|
|
<result column="DC_CH" property="dcCh" />
|
|
<result column="DC_PL" property="dcPl" />
|
|
<result column="DC_ZL" property="dcZl" />
|
|
<result column="JLDW" property="jldw" />
|
|
<result column="XGR" property="xgr" />
|
|
<result column="XGRQ" property="xgrq" />
|
|
<result column="tzbh1" property="tzbh1" />
|
|
<result column="ysrq" property="ysrq" />
|
|
<result column="zt" property="zt" />
|
|
<result column="hxbh" property="hxbh" />
|
|
<result column="ylzl" property="ylzl" />
|
|
<result column="dc_zl2" property="dcZl2" />
|
|
<result column="ylzd4" property="ylzd4" />
|
|
<result column="wpxh" property="wpxh" />
|
|
<result column="dc_pl2" property="dcPl2" />
|
|
<result column="t1" property="t1" />
|
|
<result column="ylbh" property="ylbh" />
|
|
<result column="ylzd1" property="ylzd1" />
|
|
<result column="dc_cs" property="dcCs" />
|
|
<result column="sl" property="sl" />
|
|
<result column="bzrq" property="bzrq" />
|
|
<result column="ylzd6" property="ylzd6" />
|
|
<result column="hxfl" property="hxfl" />
|
|
<result column="bz" property="bz" />
|
|
<result column="l" property="l" />
|
|
<result column="dc_tzbh2" property="dcTzbh2" />
|
|
<result column="ylzd3" property="ylzd3" />
|
|
<result column="SYBS" property="sybs" />
|
|
<result column="dc_hx" property="dcHx" />
|
|
<result column="xh" property="xh" />
|
|
<result column="ylzd2" property="ylzd2" />
|
|
<result column="bzry" property="bzry" />
|
|
<result column="tzbh" property="tzbh" />
|
|
<result column="ylzd5" property="ylzd5" />
|
|
<result column="wpgg" property="wpgg" />
|
|
<result column="b1" property="b1" />
|
|
<result column="dc_ch2" property="dcCh2" />
|
|
</resultMap>
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
SCRQ, SYRQ, DC_LPH, GZZX, YLCJBM, YLKWH, DC_CH, DC_PL, DC_ZL, JLDW, XGR, XGRQ, ylsxh, tzbh1, ysrq, zt, hxbh, ylzl, dc_zl2, ylzd4, wpxh, dc_pl2, t1, ylbh, ylzd1, dc_cs, sl, bzrq, ylzd6, hxfl, bz, l, dc_tzbh2, ylzd3, SYBS, dc_hx, xh, ylzd2, bzry, tzbh, ylzd5, wpgg, b1, dc_ch2
|
|
</sql>
|
|
|
|
<select id="czzjList" parameterType="map" resultType="map">
|
|
SELECT DISTINCT
|
|
RTRIM(MP_DHSJ.DHH) AS DHH,
|
|
RTRIM(MP_DHSJ.WPH) AS WPH,
|
|
MP_DHSJ.DHSL,
|
|
RTRIM(MP_DHSJ.DC_CH) as DC_CH,
|
|
RTRIM(MP_DHSJ.DC_PL) as DC_PL,
|
|
RTRIM(MP_DHSJ.DC_TH) as DC_TH,
|
|
RTRIM(MP_DHSJ.DC_PB) as DC_PB,
|
|
MP_DHSJ.DC_LPH,
|
|
RTRIM(MP_DHSJ.sjksrqg) as sjksrqg,
|
|
RTRIM(DM_WPJBP.WPMC) AS WPMC,
|
|
RTRIM(MP_DHSJ.dc_tpmc) AS WPGG,
|
|
RTRIM(MP_DHSJ.dc_tpbh) AS WPXH,
|
|
RTRIM(QC_ZBSDZP.ZBSH) AS ZBSH,
|
|
RTRIM(QC_ZBSDZP.GG) AS GG,
|
|
RTRIM(QC_ZBSDZP.CZ) AS CZ,
|
|
CASE WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >= 10 THEN 1 ELSE 0 END ZJZT,
|
|
CASE
|
|
WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >= 10
|
|
AND (RTRIM(MP_DHSJ.dc_tpmc) = RTRIM(QC_ZBSDZP.GG)
|
|
AND RTRIM(MP_DHSJ.dc_tpbh) = RTRIM(QC_ZBSDZP.CZ)) THEN '符合'
|
|
WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >= 10
|
|
AND (RTRIM(MP_DHSJ.dc_tpmc) <> RTRIM(QC_ZBSDZP.GG)
|
|
OR RTRIM(MP_DHSJ.dc_tpbh) <> RTRIM(QC_ZBSDZP.CZ)) THEN '不符'
|
|
WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) < 10 THEN ''
|
|
END FHZT,
|
|
'' as xz,
|
|
qc_zbsdzp.gdh,
|
|
qc_zbsdzp.ylzd2
|
|
FROM MP_DHSJ
|
|
LEFT JOIN DM_WPJBP ON MP_DHSJ.WPH = DM_WPJBP.WPH
|
|
LEFT JOIN QC_ZBSDZP ON MP_DHSJ.DC_LPH = QC_ZBSDZP.LPH
|
|
where 1=1
|
|
<if test=" dcch!=null and dcch!=''">
|
|
and MP_DHSJ.DC_CH=#{dcch}
|
|
</if>
|
|
|
|
<if test=" dcpl!=null and dcpl!='' and dcpl1!=null and dcpl1!='' ">
|
|
and MP_DHSJ.dc_pl>=#{dcpl} and MP_DHSJ.dc_pl<=#{dcpl1}
|
|
</if>
|
|
<if test=" dcpl!=null and dcpl!='' and (dcpl1==null or dcpl1=='') ">
|
|
and MP_DHSJ.dc_pl=#{dcpl}
|
|
</if>
|
|
order by MP_DHSJ.DC_PL ,MP_DHSJ.DC_TH,MP_DHSJ.WPH
|
|
</select>
|
|
|
|
</mapper>
|