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.

128 lines
5.5 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.jcsj.DmBclqmxpMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.dsic.gj_erp.bean.jcsj.DmBclqmxp">
<id column="XH" property="xh" />
<result column="WPH" property="wph" />
<result column="WPXH" property="wpxh" />
<result column="WPGG" property="wpgg" />
<result column="SL" property="sl" />
<result column="LQZL" property="lqzl" />
<result column="SHZL" property="shzl" />
<result column="YLZL" property="ylzl" />
<result column="QPYLD" property="qpyld" />
<result column="YLZD11" property="ylzd11" />
<result column="lqms" property="lqms" />
<result column="shms" property="shms" />
<result column="WPMC" property="wpmc" />
<result column="LJZL" property="ljzl" />
<result column="qgrq" property="qgrq" />
<result column="qgsl" property="qgsl" />
<result column="LQLB_z" property="lqlbZ" />
<result column="DC_PL_z" property="dcPlZ" />
<result column="DC_ZL_z" property="dcZlZ" />
<result column="DC_CH_z" property="dcChZ" />
<result column="DC_CM_z" property="dcCmZ" />
<result column="DC_FD_z" property="dcFdZ" />
<result column="DELX_z" property="delxZ" />
<result column="DERQ_z" property="derqZ" />
<result column="XMBH_z" property="xmbhZ" />
<result column="YBZS_z" property="ybzsZ" />
<result column="LQZL_z" property="lqzlZ" />
<result column="SHZL_z" property="shzlZ" />
<result column="YLZL_z" property="ylzlZ" />
<result column="QPYLD_z" property="qpyldZ" />
<result column="ZXDW_z" property="zxdwZ" />
<result column="LQMJ_z" property="lqmjZ" />
<result column="CJDQ_z" property="cjdqZ" />
<result column="XL_z" property="xlZ" />
<result column="ZDR_z" property="zdrZ" />
<result column="ZDRQ_z" property="zdrqZ" />
<result column="JSMS_z" property="jsmsZ" />
<result column="SHMS_z" property="shmsZ" />
<result column="LJZL_z" property="ljzlZ" />
<result column="ZZCJ_z" property="zzcjZ" />
<result column="drcs" property="drcs" />
<result column="YLZD12" property="ylzd12" />
<result column="XGRQ" property="xgrq" />
<result column="BZ_z" property="bzZ" />
<result column="YLZD9" property="ylzd9" />
<result column="YLZD10" property="ylzd10" />
<result column="BZ" property="bz" />
<result column="YLZD7" property="ylzd7" />
<result column="XGR" property="xgr" />
<result column="YLZD8" property="ylzd8" />
<result column="sysl" property="sysl" />
<result column="LQBH" property="lqbh" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
XH, WPH, WPXH, WPGG, SL, LQZL, SHZL, YLZL, QPYLD, YLZD11, lqms, shms, WPMC, LJZL, qgrq, qgsl, LQLB_z, DC_PL_z, DC_ZL_z, DC_CH_z, DC_CM_z, DC_FD_z, DELX_z, DERQ_z, XMBH_z, YBZS_z, LQZL_z, SHZL_z, YLZL_z, QPYLD_z, ZXDW_z, LQMJ_z, CJDQ_z, XL_z, ZDR_z, ZDRQ_z, JSMS_z, SHMS_z, LJZL_z, ZZCJ_z, drcs, YLZD12, XGRQ, BZ_z, YLZD9, YLZD10, BZ, YLZD7, XGR, YLZD8, sysl, LQBH
</sql>
<select id="getBcLQlList" parameterType="map" resultType="com.dsic.gj_erp.bean.jcsj.DmBclqmxp">
SELECT DM_BCLQMXP.LQBH,
DM_BCLQMXP.XH,
DM_BCLQMXP.WPH,
DM_BCLQMXP.WPXH,
DM_BCLQMXP.WPGG,
isnull(DM_BCLQMXP.SL,0) as SL ,
isnull(DM_BCLQMXP.LQZL,0) as LQZL,
isnull( DM_BCLQMXP.SHZL,0) as shzl,
DM_BCLQMXP.YLZL,
DM_BCLQMXP.QPYLD,
DM_BCLQMXP.wpmc,
isnull( DM_BCLQMXP.ljzl,0) as ljzl,
DM_BCLQMXP.BZ,
DM_BCLQMXP.XGR,
DM_BCLQMXP.XGRQ,
DM_BCLQMXP.lqms,
DM_BCLQMXP.shms,
DM_BCLQMXP.ylzd11,
DM_BCLQMXP.zdr_z as zdrZ,
DM_BCLQMXP.zdrq_z AS zdrqZ,
DM_WPJBP.WPMC,
RTRIM(DM_BCLQJBP.zzcj) AS zzcjZ,
RTRIM(DM_BCLQJBP.LQLB) AS lqLbZ,
RTRIM(DM_BCLQJBP.DC_PL) AS dcPlZ,
RTRIM(DM_BCLQJBP.DC_ZL) AS dcZlZ,
RTRIM(DM_BCLQJBP.DC_CH) AS dcChZ,
RTRIM(DM_BCLQJBP.DC_CM) AS dcCmZ,
RTRIM(DM_BCLQJBP.DC_FD) AS dcFdZ,
DM_BCLQJBP.qpyld as qpyldZ,
DM_BCLQJBP.ljzl as ljzlZ,
DM_BCLQJBP.ybzs as ybzsZ,
DM_BCLQJBP.lqzl as lqzlZ,
DM_BCLQJBP.shzl as shzlZ,
DM_BCLQJBP.ylzl as ylzlZ
FROM DM_BCLQJBP,DM_BCLQMXP left join DM_WPJBP on DM_BCLQMXP.WPH = DM_WPJBP.WPH
WHERE
DM_BCLQMXP.LQBH = DM_BCLQJBP.LQBH
<if test=" dcpl!=null and dcpl!=''">
and DM_BCLQJBP.dc_pl=#{dcpl}
</if>
<if test=" dcch!=null and dcch!=''">
and DM_BCLQJBP.DC_CH=#{dcch}
</if>
<if test=" dczl!=null and dczl!=''">
and DM_BCLQJBP.DC_ZL=#{dczl}
</if>
<if test=" zzcj!=null and zzcj!=''">
and DM_BCLQJBP.zzcj=#{zzcj}
</if>
<if test=" delx!=null and delx!=''">
and DM_BCLQJBP.DELX=#{delx}
</if>
order by DM_BCLQJBP.dc_ch,DM_BCLQJBP.dc_pl,DM_BCLQJBP.dc_zl,DM_BCLQJBP.lqlb,DM_BCLQJBP.zzcj
</select>
</mapper>