| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838 |
- <?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.depot.keeperAccount.mapper.StorageFcbgzMapper">
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.keeperAccount.model.StorageFcbgz">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="org_id" jdbcType="VARCHAR" property="orgId" />
- <result column="ch" jdbcType="INTEGER" property="ch" />
- <result column="hwh" jdbcType="INTEGER" property="hwh" />
- <result column="pz" jdbcType="INTEGER" property="pz" />
- <result column="mxpz" jdbcType="INTEGER" property="mxpz" />
- <result column="lyxz" jdbcType="INTEGER" property="lyxz" />
- <result column="zcsl" jdbcType="DECIMAL" property="zcsl" />
- <result column="srsl" jdbcType="DECIMAL" property="srsl" />
- <result column="kcsl" jdbcType="DECIMAL" property="kcsl" />
- <result column="shsl" jdbcType="DECIMAL" property="shsl" />
- <result column="yysl" jdbcType="DECIMAL" property="yysl" />
- <result column="jzrq" jdbcType="TIMESTAMP" property="jzrq" />
- <result column="last_business_date" jdbcType="TIMESTAMP" property="lastBusinessDate" />
- <result column="jzr" jdbcType="VARCHAR" property="jzr" />
- <result column="jzsj" jdbcType="TIMESTAMP" property="jzsj" />
- <result column="shr" jdbcType="VARCHAR" property="shr" />
- <result column="shsj" jdbcType="TIMESTAMP" property="shsj" />
- <result column="jznd" jdbcType="VARCHAR" property="jznd" />
- <result column="jzpz" jdbcType="VARCHAR" property="jzpz" />
- <result column="jzzy" jdbcType="VARCHAR" property="jzzy" />
- <result column="sjfm" jdbcType="VARCHAR" property="sjfm" />
- <result column="data_status" jdbcType="VARCHAR" property="dataStatus" />
- <result column="data_type" jdbcType="VARCHAR" property="dataType" />
- <result column="ywlx" jdbcType="VARCHAR" property="ywlx" />
- <result column="cjsj" jdbcType="TIMESTAMP" property="cjsj" />
- <result column="is_show" jdbcType="VARCHAR" property="isShow" />
- <result column="sfjz" property="sfjz" jdbcType="VARCHAR" />
- <result column="ylorcpl" property="ylorcpl" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- id, org_id, ch, hwh, pz, mxpz, lyxz, zcsl, srsl, kcsl, shsl, yysl, jzrq, last_business_date,
- jzr, jzsj, shr, shsj, jznd, jzpz, jzzy, sjfm, data_status, data_type, ywlx, cjsj,
- is_show, ylorcpl
- </sql>
- <select id="selectByExample" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgzExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from storage_fcbgz
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from storage_fcbgz
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from storage_fcbgz
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgzExample">
- delete from storage_fcbgz
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgz">
- insert into storage_fcbgz (id, org_id, ch,
- hwh, pz, mxpz, lyxz,
- zcsl, srsl, kcsl, shsl,
- yysl, jzrq, last_business_date,
- jzr, jzsj, shr, shsj,
- jznd, jzpz, jzzy, sjfm,
- data_status, data_type, ywlx,
- cjsj, is_show, ylorcpl)
- values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{ch,jdbcType=INTEGER},
- #{hwh,jdbcType=INTEGER}, #{pz,jdbcType=INTEGER}, #{mxpz,jdbcType=INTEGER}, #{lyxz,jdbcType=INTEGER},
- #{zcsl,jdbcType=DECIMAL}, #{srsl,jdbcType=DECIMAL}, #{kcsl,jdbcType=DECIMAL}, #{shsl,jdbcType=DECIMAL},
- #{yysl,jdbcType=DECIMAL}, #{jzrq,jdbcType=TIMESTAMP}, #{lastBusinessDate,jdbcType=TIMESTAMP},
- #{jzr,jdbcType=VARCHAR}, #{jzsj,jdbcType=TIMESTAMP}, #{shr,jdbcType=VARCHAR}, #{shsj,jdbcType=TIMESTAMP},
- #{jznd,jdbcType=VARCHAR}, #{jzpz,jdbcType=VARCHAR}, #{jzzy,jdbcType=VARCHAR}, #{sjfm,jdbcType=VARCHAR},
- #{dataStatus,jdbcType=VARCHAR}, #{dataType,jdbcType=VARCHAR}, #{ywlx,jdbcType=VARCHAR},
- #{cjsj,jdbcType=TIMESTAMP}, #{isShow,jdbcType=VARCHAR}, #{ylorcpl,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgz">
- insert into storage_fcbgz
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="orgId != null">
- org_id,
- </if>
- <if test="ch != null">
- ch,
- </if>
- <if test="hwh != null">
- hwh,
- </if>
- <if test="pz != null">
- pz,
- </if>
- <if test="mxpz != null">
- mxpz,
- </if>
- <if test="lyxz != null">
- lyxz,
- </if>
- <if test="zcsl != null">
- zcsl,
- </if>
- <if test="srsl != null">
- srsl,
- </if>
- <if test="kcsl != null">
- kcsl,
- </if>
- <if test="shsl != null">
- shsl,
- </if>
- <if test="yysl != null">
- yysl,
- </if>
- <if test="jzrq != null">
- jzrq,
- </if>
- <if test="lastBusinessDate != null">
- last_business_date,
- </if>
- <if test="jzr != null">
- jzr,
- </if>
- <if test="jzsj != null">
- jzsj,
- </if>
- <if test="shr != null">
- shr,
- </if>
- <if test="shsj != null">
- shsj,
- </if>
- <if test="jznd != null">
- jznd,
- </if>
- <if test="jzpz != null">
- jzpz,
- </if>
- <if test="jzzy != null">
- jzzy,
- </if>
- <if test="sjfm != null">
- sjfm,
- </if>
- <if test="dataStatus != null">
- data_status,
- </if>
- <if test="dataType != null">
- data_type,
- </if>
- <if test="ywlx != null">
- ywlx,
- </if>
- <if test="cjsj != null">
- cjsj,
- </if>
- <if test="isShow != null">
- is_show,
- </if>
- <if test="ylorcpl != null">
- ylorcpl,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null">
- #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="ch != null">
- #{ch,jdbcType=INTEGER},
- </if>
- <if test="hwh != null">
- #{hwh,jdbcType=INTEGER},
- </if>
- <if test="pz != null">
- #{pz,jdbcType=INTEGER},
- </if>
- <if test="mxpz != null">
- #{mxpz,jdbcType=INTEGER},
- </if>
- <if test="lyxz != null">
- #{lyxz,jdbcType=INTEGER},
- </if>
- <if test="zcsl != null">
- #{zcsl,jdbcType=DECIMAL},
- </if>
- <if test="srsl != null">
- #{srsl,jdbcType=DECIMAL},
- </if>
- <if test="kcsl != null">
- #{kcsl,jdbcType=DECIMAL},
- </if>
- <if test="shsl != null">
- #{shsl,jdbcType=DECIMAL},
- </if>
- <if test="yysl != null">
- #{yysl,jdbcType=DECIMAL},
- </if>
- <if test="jzrq != null">
- #{jzrq,jdbcType=TIMESTAMP},
- </if>
- <if test="lastBusinessDate != null">
- #{lastBusinessDate,jdbcType=TIMESTAMP},
- </if>
- <if test="jzr != null">
- #{jzr,jdbcType=VARCHAR},
- </if>
- <if test="jzsj != null">
- #{jzsj,jdbcType=TIMESTAMP},
- </if>
- <if test="shr != null">
- #{shr,jdbcType=VARCHAR},
- </if>
- <if test="shsj != null">
- #{shsj,jdbcType=TIMESTAMP},
- </if>
- <if test="jznd != null">
- #{jznd,jdbcType=VARCHAR},
- </if>
- <if test="jzpz != null">
- #{jzpz,jdbcType=VARCHAR},
- </if>
- <if test="jzzy != null">
- #{jzzy,jdbcType=VARCHAR},
- </if>
- <if test="sjfm != null">
- #{sjfm,jdbcType=VARCHAR},
- </if>
- <if test="dataStatus != null">
- #{dataStatus,jdbcType=VARCHAR},
- </if>
- <if test="dataType != null">
- #{dataType,jdbcType=VARCHAR},
- </if>
- <if test="ywlx != null">
- #{ywlx,jdbcType=VARCHAR},
- </if>
- <if test="cjsj != null">
- #{cjsj,jdbcType=TIMESTAMP},
- </if>
- <if test="isShow != null">
- #{isShow,jdbcType=VARCHAR},
- </if>
- <if test="ylorcpl != null">
- #{ylorcpl,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgzExample" resultType="java.lang.Integer">
- select count(*) from storage_fcbgz
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update storage_fcbgz
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.orgId != null">
- org_id = #{record.orgId,jdbcType=VARCHAR},
- </if>
- <if test="record.ch != null">
- ch = #{record.ch,jdbcType=INTEGER},
- </if>
- <if test="record.hwh != null">
- hwh = #{record.hwh,jdbcType=INTEGER},
- </if>
- <if test="record.pz != null">
- pz = #{record.pz,jdbcType=INTEGER},
- </if>
- <if test="record.mxpz != null">
- mxpz = #{record.mxpz,jdbcType=INTEGER},
- </if>
- <if test="record.lyxz != null">
- lyxz = #{record.lyxz,jdbcType=INTEGER},
- </if>
- <if test="record.zcsl != null">
- zcsl = #{record.zcsl,jdbcType=DECIMAL},
- </if>
- <if test="record.srsl != null">
- srsl = #{record.srsl,jdbcType=DECIMAL},
- </if>
- <if test="record.kcsl != null">
- kcsl = #{record.kcsl,jdbcType=DECIMAL},
- </if>
- <if test="record.shsl != null">
- shsl = #{record.shsl,jdbcType=DECIMAL},
- </if>
- <if test="record.yysl != null">
- yysl = #{record.yysl,jdbcType=DECIMAL},
- </if>
- <if test="record.jzrq != null">
- jzrq = #{record.jzrq,jdbcType=TIMESTAMP},
- </if>
- <if test="record.lastBusinessDate != null">
- last_business_date = #{record.lastBusinessDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.jzr != null">
- jzr = #{record.jzr,jdbcType=VARCHAR},
- </if>
- <if test="record.jzsj != null">
- jzsj = #{record.jzsj,jdbcType=TIMESTAMP},
- </if>
- <if test="record.shr != null">
- shr = #{record.shr,jdbcType=VARCHAR},
- </if>
- <if test="record.shsj != null">
- shsj = #{record.shsj,jdbcType=TIMESTAMP},
- </if>
- <if test="record.jznd != null">
- jznd = #{record.jznd,jdbcType=VARCHAR},
- </if>
- <if test="record.jzpz != null">
- jzpz = #{record.jzpz,jdbcType=VARCHAR},
- </if>
- <if test="record.jzzy != null">
- jzzy = #{record.jzzy,jdbcType=VARCHAR},
- </if>
- <if test="record.sjfm != null">
- sjfm = #{record.sjfm,jdbcType=VARCHAR},
- </if>
- <if test="record.dataStatus != null">
- data_status = #{record.dataStatus,jdbcType=VARCHAR},
- </if>
- <if test="record.dataType != null">
- data_type = #{record.dataType,jdbcType=VARCHAR},
- </if>
- <if test="record.ywlx != null">
- ywlx = #{record.ywlx,jdbcType=VARCHAR},
- </if>
- <if test="record.cjsj != null">
- cjsj = #{record.cjsj,jdbcType=TIMESTAMP},
- </if>
- <if test="record.isShow != null">
- is_show = #{record.isShow,jdbcType=VARCHAR},
- </if>
- <if test="record.ylorcpl != null">
- ylorcpl = #{record.ylorcpl,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update storage_fcbgz
- set id = #{record.id,jdbcType=VARCHAR},
- org_id = #{record.orgId,jdbcType=VARCHAR},
- ch = #{record.ch,jdbcType=INTEGER},
- hwh = #{record.hwh,jdbcType=INTEGER},
- pz = #{record.pz,jdbcType=INTEGER},
- mxpz = #{record.mxpz,jdbcType=INTEGER},
- lyxz = #{record.lyxz,jdbcType=INTEGER},
- zcsl = #{record.zcsl,jdbcType=DECIMAL},
- srsl = #{record.srsl,jdbcType=DECIMAL},
- kcsl = #{record.kcsl,jdbcType=DECIMAL},
- shsl = #{record.shsl,jdbcType=DECIMAL},
- yysl = #{record.yysl,jdbcType=DECIMAL},
- jzrq = #{record.jzrq,jdbcType=TIMESTAMP},
- last_business_date = #{record.lastBusinessDate,jdbcType=TIMESTAMP},
- jzr = #{record.jzr,jdbcType=VARCHAR},
- jzsj = #{record.jzsj,jdbcType=TIMESTAMP},
- shr = #{record.shr,jdbcType=VARCHAR},
- shsj = #{record.shsj,jdbcType=TIMESTAMP},
- jznd = #{record.jznd,jdbcType=VARCHAR},
- jzpz = #{record.jzpz,jdbcType=VARCHAR},
- jzzy = #{record.jzzy,jdbcType=VARCHAR},
- sjfm = #{record.sjfm,jdbcType=VARCHAR},
- data_status = #{record.dataStatus,jdbcType=VARCHAR},
- data_type = #{record.dataType,jdbcType=VARCHAR},
- ywlx = #{record.ywlx,jdbcType=VARCHAR},
- cjsj = #{record.cjsj,jdbcType=TIMESTAMP},
- is_show = #{record.isShow,jdbcType=VARCHAR},
- ylorcpl = #{record.ylorcpl,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgz">
- update storage_fcbgz
- <set>
- <if test="orgId != null">
- org_id = #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="ch != null">
- ch = #{ch,jdbcType=INTEGER},
- </if>
- <if test="hwh != null">
- hwh = #{hwh,jdbcType=INTEGER},
- </if>
- <if test="pz != null">
- pz = #{pz,jdbcType=INTEGER},
- </if>
- <if test="mxpz != null">
- mxpz = #{mxpz,jdbcType=INTEGER},
- </if>
- <if test="lyxz != null">
- lyxz = #{lyxz,jdbcType=INTEGER},
- </if>
- <if test="zcsl != null">
- zcsl = #{zcsl,jdbcType=DECIMAL},
- </if>
- <if test="srsl != null">
- srsl = #{srsl,jdbcType=DECIMAL},
- </if>
- <if test="kcsl != null">
- kcsl = #{kcsl,jdbcType=DECIMAL},
- </if>
- <if test="shsl != null">
- shsl = #{shsl,jdbcType=DECIMAL},
- </if>
- <if test="yysl != null">
- yysl = #{yysl,jdbcType=DECIMAL},
- </if>
- <if test="jzrq != null">
- jzrq = #{jzrq,jdbcType=TIMESTAMP},
- </if>
- <if test="lastBusinessDate != null">
- last_business_date = #{lastBusinessDate,jdbcType=TIMESTAMP},
- </if>
- <if test="jzr != null">
- jzr = #{jzr,jdbcType=VARCHAR},
- </if>
- <if test="jzsj != null">
- jzsj = #{jzsj,jdbcType=TIMESTAMP},
- </if>
- <if test="shr != null">
- shr = #{shr,jdbcType=VARCHAR},
- </if>
- <if test="shsj != null">
- shsj = #{shsj,jdbcType=TIMESTAMP},
- </if>
- <if test="jznd != null">
- jznd = #{jznd,jdbcType=VARCHAR},
- </if>
- <if test="jzpz != null">
- jzpz = #{jzpz,jdbcType=VARCHAR},
- </if>
- <if test="jzzy != null">
- jzzy = #{jzzy,jdbcType=VARCHAR},
- </if>
- <if test="sjfm != null">
- sjfm = #{sjfm,jdbcType=VARCHAR},
- </if>
- <if test="dataStatus != null">
- data_status = #{dataStatus,jdbcType=VARCHAR},
- </if>
- <if test="dataType != null">
- data_type = #{dataType,jdbcType=VARCHAR},
- </if>
- <if test="ywlx != null">
- ywlx = #{ywlx,jdbcType=VARCHAR},
- </if>
- <if test="cjsj != null">
- cjsj = #{cjsj,jdbcType=TIMESTAMP},
- </if>
- <if test="isShow != null">
- is_show = #{isShow,jdbcType=VARCHAR},
- </if>
- <if test="ylorcpl != null">
- ylorcpl = #{ylorcpl,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.keeperAccount.model.StorageFcbgz">
- update storage_fcbgz
- set org_id = #{orgId,jdbcType=VARCHAR},
- ch = #{ch,jdbcType=INTEGER},
- hwh = #{hwh,jdbcType=INTEGER},
- pz = #{pz,jdbcType=INTEGER},
- mxpz = #{mxpz,jdbcType=INTEGER},
- lyxz = #{lyxz,jdbcType=INTEGER},
- zcsl = #{zcsl,jdbcType=DECIMAL},
- srsl = #{srsl,jdbcType=DECIMAL},
- kcsl = #{kcsl,jdbcType=DECIMAL},
- shsl = #{shsl,jdbcType=DECIMAL},
- yysl = #{yysl,jdbcType=DECIMAL},
- jzrq = #{jzrq,jdbcType=TIMESTAMP},
- last_business_date = #{lastBusinessDate,jdbcType=TIMESTAMP},
- jzr = #{jzr,jdbcType=VARCHAR},
- jzsj = #{jzsj,jdbcType=TIMESTAMP},
- shr = #{shr,jdbcType=VARCHAR},
- shsj = #{shsj,jdbcType=TIMESTAMP},
- jznd = #{jznd,jdbcType=VARCHAR},
- jzpz = #{jzpz,jdbcType=VARCHAR},
- jzzy = #{jzzy,jdbcType=VARCHAR},
- sjfm = #{sjfm,jdbcType=VARCHAR},
- data_status = #{dataStatus,jdbcType=VARCHAR},
- data_type = #{dataType,jdbcType=VARCHAR},
- ywlx = #{ywlx,jdbcType=VARCHAR},
- cjsj = #{cjsj,jdbcType=TIMESTAMP},
- is_show = #{isShow,jdbcType=VARCHAR},
- ylorcpl = #{ylorcpl,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <!-- 根据出入库分仓保管账表数据分组统计查询省级储备粮数据 -->
- <select id="queryCrkFcbgzGroupBySclData" parameterType="java.util.Map" resultMap="BaseResultMap">
- select
- a.rqs jzrq,
- case
- when a.lchjbm='5' then b.tzdh
- when a.lchjbm='11' then b.tzdh
- when a.lchjbm='kcbd_yc' then b.bizno
- when a.lchjbm='kcbd_yc' then b.bizno
- when a.lchjbm='kcbd_rk' then c.bddh
- when a.lchjbm='kcbd_ck' then c.bddh
- when a.lchjbm='kcbd_sy' and a.cazylx='1' then d.bddh
- when a.lchjbm='kcbd_sy' and a.cazylx='3' then c.bddh
- when a.lchjbm='kcbd_xzbh' and a.cazylx='3' then c.bddh
- when a.lchjbm='kcbd_xzbh' and a.cazylx='1' then d.bddh
- when a.lchjbm='qc' then 'qckc'
- else 'null'
- end jzpz,
- case
- when a.lchjbm='5' then '轮换入库'
- when a.lchjbm='11' then '轮换出库'
- when a.lchjbm='kcbd_yc' and a.cazylx='1' then '倒仓转入'
- when a.lchjbm='kcbd_yc' and a.cazylx='3' then '倒仓转出'
- when a.lchjbm='kcbd_rk' then '溢余'
- when a.lchjbm='kcbd_ck' then '损耗'
- when a.lchjbm='kcbd_sy' and a.cazylx='1' then '移库转入'
- when a.lchjbm='kcbd_sy' and a.cazylx='3' then '移库转出'
- when a.lchjbm='kcbd_xzbh' and a.cazylx='1' then '商品粮转入'
- when a.lchjbm='kcbd_xzbh' and a.cazylx='3' then '转商品粮'
- when a.lchjbm='qc' then '期初库存'
- else 'null'
- end jzzy,
- a.hwxz lyxz,
- a.pz pz,
- a.mxpz mxpz,
- a.zcsl,
- a.srsl,
- case when a.lchjbm='kcbd_ck' then c.bdsl else 0 end shsl,
- case when a.lchjbm='kcbd_rk' then c.bdsl else 0 end yysl,
- b.kcsl kcsl,
- a.org_id, a.ch, a.hwh, substr(a.rqs, 1, 4) jznd,
- '0' data_type,
- '1' data_status,
- '0' ywlx,
- b.rq last_business_date
- from (
- select
- org_id, ch, hwh, pz, mxpz, hwxz, rqs, cazylx, lchjbm,
- sum(srsl) srsl, sum(zcsl) zcsl
- from depot_yw_fcbgz_view_model
- where 1=1
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="hwxz != null">
- and hwxz=#{hwxz, jdbcType=VARCHAR}
- </if>
- <if test="rqs != null">
- and rqs=#{rqs, jdbcType=VARCHAR}
- </if>
- group by org_id, ch, hwh, pz, mxpz, hwxz, rqs, cazylx, lchjbm
- ) a
- inner join (
- select f.* from (
- select
- id,org_id, ch, hwh, hwxz, pz, mxpz, rqs, cazylx, lchjbm, kcsl, rq, bizno, tzdh,
- Row_Number() OVER (partition by org_id,ch,hwh,hwxz,pz,mxpz,rqs,cazylx,lchjbm order by rq desc) rank
- from depot_yw_fcbgz_view_model
- where 1=1
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="hwxz != null">
- and hwxz=#{hwxz, jdbcType=VARCHAR}
- </if>
- <if test="rqs != null">
- and rqs=#{rqs, jdbcType=VARCHAR}
- </if>
- ) as f
- where 1=1 and f.rank=1
- ) b on b.hwh=a.hwh
- left join lsreport_ts:data_kcgl_kcbd_default c on c.dataid=b.id
- left join lsreport_ts:data_kcgl_kcbd_default d on d.dataid=reverse(b.id)
- left join basic_enum e1 on e1.enumid=a.hwxz
- left join basic_enum e2 on e2.enumid=a.pz
- left join basic_enum e3 on e3.enumid=a.mxpz
- where b.rqs=a.rqs and b.mxpz=a.mxpz and b.org_id=a.org_id and b.cazylx=a.cazylx and b.lchjbm=a.lchjbm
- order by b.rq
- </select>
- <select id="selectFcbgzList" parameterType="java.util.Map" resultMap="BaseResultMap">
- select
- a.*,
- case when b.jz_num>0 then '1' else '0' end data_status,
- case when c.data_status='1' then '1' else '0' end sfjz
- from (
- select
- org_id, ch, hwh, pz, mxpz, lyxz, jznd, kcsl
- from (
- select org_id, ch, hwh, pz, mxpz, lyxz, jznd, kcsl, Row_Number() OVER (partition by org_id, ch, hwh, pz, mxpz, lyxz, jznd order by last_business_date desc) rank
- from storage_fcbgz
- where 1=1
- and data_type='0'
- and is_show='0'
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="mxpz != null">
- and mxpz=#{mxpz,jdbcType=INTEGER}
- </if>
- <if test="lyxz != null">
- and lyxz=#{lyxz,jdbcType=INTEGER}
- </if>
- <if test="jznd != null">
- and jznd=#{jznd,jdbcType=VARCHAR}
- </if>
- ) datas
- where datas.rank=1
- ) a
- left join (
- select
- org_id, ch, hwh, pz, mxpz, lyxz, jznd, count(1) jz_num
- from storage_fcbgz
- where 1=1
- and data_type in ('0','1')
- and is_show='0'
- and data_status='1'
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="mxpz != null">
- and mxpz=#{mxpz,jdbcType=INTEGER}
- </if>
- <if test="lyxz != null">
- and lyxz=#{lyxz,jdbcType=INTEGER}
- </if>
- <if test="jznd != null">
- and jznd=#{jznd,jdbcType=VARCHAR}
- </if>
- group by org_id, ch, hwh, pz, mxpz, lyxz, jznd
- ) b on b.hwh=a.hwh and b.mxpz=a.mxpz and b.lyxz=a.lyxz and b.jznd=a.jznd
- left join (
- select
- hwh, lyxz, jznd, data_status
- from storage_fcbgz
- where 1=1
- and data_type='2'
- and is_show='0'
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="jznd != null">
- and jznd=#{jznd,jdbcType=VARCHAR}
- </if>
- ) c on c.hwh=a.hwh and c.jznd=a.jznd
- where 1=1
- <if test="sfjz==1">
- and nvl(c.data_status, '')=''
- </if>
- <if test="sfjz==0">
- and nvl(c.data_status, '')!=''
- </if>
- <if test="dataStatus==1">
- and b.jz_num > 0
- </if>
- <if test="dataStatus==0">
- and b.jz_num = 0
- </if>
- order by a.ch
- </select>
- <select id="selectCrkDetail" parameterType="java.util.Map" resultType="java.util.Map">
- select
- a.tzdh, a.bizno, c.bddh, d.bddh, a.cphm, to_char(b.rq, 'yyyy-MM-dd HH24:mi:ss') rq, b.srsl, b.zcsl, b.kcsl, a.dj
- from lsreport_ts:data_kcgl_xckc_default a
- left join lsreport_ts:data_kcgl_fcbgz_default b on b.dataid=a.dataid
- left join lsreport_ts:data_kcgl_kcbd_default c on c.dataid=a.dataid
- left join lsreport_ts:data_kcgl_kcbd_default d on d.dataid=reverse(b.dataid)
- where 1=1
- and a.sjhw=#{hwh,jdbcType=VARCHAR}
- and a.hwxz=#{lsxz,jdbcType=VARCHAR}
- and a.mxpz=#{mxpz,jdbcType=VARCHAR}
- and b.rq between #{starttime,jdbcType=VARCHAR} and #{endtime,jdbcType=VARCHAR}
- and ${wer}
- order by b.rq
- </select>
- <!-- 根据出入库分仓保管账表数据分组统计查询商品粮数据 -->
- <select id="queryCrkFcbgzGroupBySplData" parameterType="java.util.Map" resultMap="BaseResultMap">
- select
- a.rqs jzrq,
- case
- when a.lchjbm='kcbd_xzbh' and a.cazylx='3' then c.bddh
- when a.lchjbm='kcbd_xzbh' and a.cazylx='1' then d.bddh
- when a.lchjbm='kcbd_rk' then c.bddh
- when a.lchjbm='kcbd_ck' then c.bddh
- when a.lchjbm='5' then b.tzdh
- when a.lchjbm='11' then b.tzdh
- else 'null'
- end jzpz,
- case
- when a.lchjbm='kcbd_xzbh' and a.cazylx='1' then '市储转入'
- when a.lchjbm='kcbd_xzbh' and a.cazylx='3' then '转市储'
- when a.lchjbm='kcbd_rk' then '溢余'
- when a.lchjbm='kcbd_ck' then '损耗'
- when a.lchjbm='5' then '入库'
- when a.lchjbm='11' then '出库'
- else 'null'
- end jzzy,
- a.hwxz lyxz,
- a.pz pz,
- a.mxpz mxpz,
- a.zcsl,
- a.srsl,
- case when a.lchjbm='kcbd_ck' then c.bdsl else 0 end shsl,
- case when a.lchjbm='kcbd_rk' then c.bdsl else 0 end yysl,
- b.kcsl kcsl,
- a.org_id, a.ch, a.hwh, substr(a.rqs, 1, 4) jznd,
- '0' data_type,
- '1' data_status,
- '2' ywlx,
- b.rq last_business_date
- from (
- select
- org_id, ch, hwh, pz, mxpz, hwxz, rqs, cazylx, lchjbm,
- sum(srsl) srsl, sum(zcsl) zcsl
- from depot_yw_fcbgz_view_model
- where 1=1
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="hwxz != null">
- and hwxz=#{hwxz, jdbcType=VARCHAR}
- </if>
- <if test="rqs != null">
- and rqs=#{rqs, jdbcType=VARCHAR}
- </if>
- group by org_id, ch, hwh, pz, mxpz, hwxz, rqs, cazylx, lchjbm
- ) a
- inner join (
- select f.* from (
- select
- id,org_id, ch, hwh, hwxz, pz, mxpz, rqs, cazylx, lchjbm, kcsl, rq, bizno, tzdh,
- Row_Number() OVER (partition by org_id,ch,hwh,hwxz,pz,mxpz,rqs,cazylx,lchjbm order by rq desc) rank
- from depot_yw_fcbgz_view_model
- where 1=1
- <if test="orgId != null">
- and org_id=#{orgId, jdbcType=VARCHAR}
- </if>
- <if test="hwxz != null">
- and hwxz=#{hwxz, jdbcType=VARCHAR}
- </if>
- <if test="rqs != null">
- and rqs=#{rqs, jdbcType=VARCHAR}
- </if>
- ) as f
- where 1=1 and f.rank=1
- ) b on b.hwh=a.hwh
- left join lsreport_ts:data_kcgl_kcbd_default c on c.dataid=b.id
- left join lsreport_ts:data_kcgl_kcbd_default d on d.dataid=reverse(b.id)
- left join basic_enum e1 on e1.enumid=a.hwxz
- left join basic_enum e2 on e2.enumid=a.pz
- left join basic_enum e3 on e3.enumid=a.mxpz
- where b.rqs=a.rqs and b.mxpz=a.mxpz and b.org_id=a.org_id and b.cazylx=a.cazylx and b.lchjbm=a.lchjbm
- order by b.rq
- </select>
- </mapper>
|