| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?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.chinaitop.agile.mapper.BgmxzMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.agile.model.Bgmxz">
- <id column="DataID" property="dataid" jdbcType="VARCHAR" />
- <result column="UnitID" property="unitid" jdbcType="CHAR" />
- <result column="ModifyDate" property="modifydate" jdbcType="TIMESTAMP" />
- <result column="lkmc" property="lkmc" jdbcType="VARCHAR" />
- <result column="ch" property="ch" jdbcType="INTEGER" />
- <result column="hwh" property="hwh" jdbcType="INTEGER" />
- <result column="pz" property="pz" jdbcType="CHAR" />
- <result column="rq" property="rq" jdbcType="TIMESTAMP" />
- <result column="wjh" property="wjh" jdbcType="VARCHAR" />
- <result column="srsl" property="srsl" jdbcType="DOUBLE" />
- <result column="zcsl" property="zcsl" jdbcType="DOUBLE" />
- <result column="kcsl" property="kcsl" jdbcType="DOUBLE" />
- <result column="jzr" property="jzr" jdbcType="VARCHAR" />
- <result column="lkbm" property="lkbm" jdbcType="VARCHAR" />
- <result column="mxpz" property="mxpz" jdbcType="CHAR" />
- <result column="dj" property="dj" jdbcType="CHAR" />
- <result column="cjsj" property="cjsj" jdbcType="TIMESTAMP" />
- <result column="hwxz" property="hwxz" jdbcType="CHAR" />
- <result column="zy" property="zy" jdbcType="VARCHAR" />
- <result column="Direction" property="direction" jdbcType="INTEGER" />
- <result column="hwcd" property="hwcd" jdbcType="CHAR" />
- <result column="scnf" property="scnf" jdbcType="CHAR" />
- <result column="srsjsl" property="srsjsl" jdbcType="DOUBLE" />
- <result column="zcsjsl" property="zcsjsl" jdbcType="DOUBLE" />
- <result column="kcsjsl" property="kcsjsl" jdbcType="DOUBLE" />
- <result column="ljsrsjsl" property="ljsrsjsl" jdbcType="DOUBLE" />
- <result column="ljzcsjsl" property="ljzcsjsl" jdbcType="DOUBLE" />
- <result column="sssh" property="sssh" jdbcType="DOUBLE" />
- <result column="bpsf" property="bpsf" jdbcType="DOUBLE" />
- <result column="bpzz" property="bpzz" jdbcType="DOUBLE" />
- <result column="pjsf" property="pjsf" jdbcType="DOUBLE" />
- <result column="pjzz" property="pjzz" jdbcType="DOUBLE" />
- <result column="zbszsl" property="zbszsl" jdbcType="DOUBLE" />
- <result column="lqss" property="lqss" jdbcType="VARCHAR" />
- <result column="tzdh" property="tzdh" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List">
- DataID, UnitID, ModifyDate, lkmc, ch, hwh, pz, rq, wjh, srsl, zcsl, kcsl,
- jzr, lkbm, mxpz, dj, cjsj, hwxz, zy, Direction, hwcd, scnf, srsjsl, zcsjsl,
- kcsjsl, ljsrsjsl, ljzcsjsl, sssh, bpsf, bpzz, pjsf, pjzz, zbszsl, lqss, tzdh
- </sql>
- <!-- 保管明细账(新) -->
- <select id="selectbgmxz" parameterType="java.util.Map" resultMap="BaseResultMap">
- select
- a.DataID,
- a.UnitID,
- a.ModifyDate,
- a.lkmc,
- a.ch,
- a.hwh,
- a.pz,
- a.rq,
- a.wjh,
- a.srsl,
- a.zcsl,
- a.kcsl,
- a.jzr,
- a.lkbm,
- a.mxpz,
- a.dj,
- a.cjsj,
- a.hwxz,
- a.zy,
- a.Direction,
- a.hwcd,
- a.scnf,
- a.srsjsl,
- a.zcsjsl,
- a.kcsjsl,
- a.ljsrsjsl,
- a.ljzcsjsl,
- a.sssh,
- a.bpsf,
- a.bpzz,
- a.pjsf,
- a.pjzz,
- a.zbszsl,
- c.lqss,
- b.tzdh,
- d.y_dataid ydataid
- from data_kcgl_fcbgz_default a
- left join data_kcgl_xckc_default b on b.dataid=a.dataid
- left join depot_qh.business_delivery_storage_notice c on c.bill_number=b.tzdh and c.org_id=b.unitid
- left join depot_qh.storage_keep_voucher d on d.y_dataid=a.DataID
- where 1=1 and (a.srsl > 0.0 or a.zcsl > 0.0) AND a.Direction = 1
- <if test="ch != null">
- and a.ch = #{ch}
- </if>
- <if test="hwh != null">
- and a.hwh = #{hwh}
- </if>
- <if test="pz != null">
- and a.pz = #{pz}
- </if>
- <if test="hwxz != null">
- and a.hwxz = #{hwxz}
- </if>
- <if test="startDate != null">
- and a.rq >= to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="endDate != null">
- and a.rq <= to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="orgId != null">
- and a.UnitID = #{orgId}
- </if>
- order by a.rq desc
- </select>
- </mapper>
|