123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675 |
- <?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.jsh.erp.datasource.mappers.DepotItemMapper">
- <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotItem">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="header_id" jdbcType="BIGINT" property="headerId" />
- <result column="material_id" jdbcType="BIGINT" property="materialId" />
- <result column="material_extend_id" jdbcType="BIGINT" property="materialExtendId" />
- <result column="material_unit" jdbcType="VARCHAR" property="materialUnit" />
- <result column="sku" jdbcType="VARCHAR" property="sku" />
- <result column="oper_number" jdbcType="DECIMAL" property="operNumber" />
- <result column="basic_number" jdbcType="DECIMAL" property="basicNumber" />
- <result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
- <result column="purchase_unit_price" jdbcType="DECIMAL" property="purchaseUnitPrice" />
- <result column="tax_unit_price" jdbcType="DECIMAL" property="taxUnitPrice" />
- <result column="all_price" jdbcType="DECIMAL" property="allPrice" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- <result column="depot_id" jdbcType="BIGINT" property="depotId" />
- <result column="another_depot_id" jdbcType="BIGINT" property="anotherDepotId" />
- <result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
- <result column="tax_money" jdbcType="DECIMAL" property="taxMoney" />
- <result column="tax_last_money" jdbcType="DECIMAL" property="taxLastMoney" />
- <result column="material_type" jdbcType="VARCHAR" property="materialType" />
- <result column="sn_list" jdbcType="VARCHAR" property="snList" />
- <result column="batch_number" jdbcType="VARCHAR" property="batchNumber" />
- <result column="expiration_date" jdbcType="TIMESTAMP" property="expirationDate" />
- <result column="link_id" jdbcType="BIGINT" property="linkId" />
- <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
- <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
- <result column="actual_quantity_in_storage" jdbcType="DECIMAL" property="actualQuantityInStorage" />
- <result column="warehousing_variance" jdbcType="DECIMAL" property="warehousingVariance" />
- <result column="reason_of_difference" jdbcType="VARCHAR" property="reasonOfDifference" />
- <result column="warehousing_user" jdbcType="VARCHAR" property="warehousingUser" />
- <result column="warehousing_time" jdbcType="DATE" property="warehousingTime" />
- </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, header_id, material_id, material_extend_id, material_unit, sku, oper_number,
- basic_number, unit_price, purchase_unit_price, tax_unit_price, all_price, remark,
- depot_id, another_depot_id, tax_rate, tax_money, tax_last_money, material_type, sn_list,
- batch_number, expiration_date, link_id, tenant_id, delete_flag
- </sql>
- <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from jsh_depot_item
- <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.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from jsh_depot_item
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from jsh_depot_item
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample">
- delete from jsh_depot_item
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotItem">
- insert into jsh_depot_item (id, header_id, material_id,
- material_extend_id, material_unit, sku,
- oper_number, basic_number, unit_price,
- purchase_unit_price, tax_unit_price, all_price,
- remark, depot_id, another_depot_id,
- tax_rate, tax_money, tax_last_money,
- material_type, sn_list, batch_number,
- expiration_date, link_id, tenant_id,
- delete_flag)
- values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT},
- #{materialExtendId,jdbcType=BIGINT}, #{materialUnit,jdbcType=VARCHAR}, #{sku,jdbcType=VARCHAR},
- #{operNumber,jdbcType=DECIMAL}, #{basicNumber,jdbcType=DECIMAL}, #{unitPrice,jdbcType=DECIMAL},
- #{purchaseUnitPrice,jdbcType=DECIMAL}, #{taxUnitPrice,jdbcType=DECIMAL}, #{allPrice,jdbcType=DECIMAL},
- #{remark,jdbcType=VARCHAR}, #{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT},
- #{taxRate,jdbcType=DECIMAL}, #{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL},
- #{materialType,jdbcType=VARCHAR}, #{snList,jdbcType=VARCHAR}, #{batchNumber,jdbcType=VARCHAR},
- #{expirationDate,jdbcType=TIMESTAMP}, #{linkId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
- #{deleteFlag,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem" useGeneratedKeys="true" keyProperty="id">
- insert into jsh_depot_item
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="headerId != null">
- header_id,
- </if>
- <if test="materialId != null">
- material_id,
- </if>
- <if test="materialExtendId != null">
- material_extend_id,
- </if>
- <if test="materialUnit != null">
- material_unit,
- </if>
- <if test="sku != null">
- sku,
- </if>
- <if test="operNumber != null">
- oper_number,
- </if>
- <if test="basicNumber != null">
- basic_number,
- </if>
- <if test="unitPrice != null">
- unit_price,
- </if>
- <if test="purchaseUnitPrice != null">
- purchase_unit_price,
- </if>
- <if test="taxUnitPrice != null">
- tax_unit_price,
- </if>
- <if test="allPrice != null">
- all_price,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="depotId != null">
- depot_id,
- </if>
- <if test="anotherDepotId != null">
- another_depot_id,
- </if>
- <if test="taxRate != null">
- tax_rate,
- </if>
- <if test="taxMoney != null">
- tax_money,
- </if>
- <if test="taxLastMoney != null">
- tax_last_money,
- </if>
- <if test="materialType != null">
- material_type,
- </if>
- <if test="snList != null">
- sn_list,
- </if>
- <if test="batchNumber != null">
- batch_number,
- </if>
- <if test="expirationDate != null">
- expiration_date,
- </if>
- <if test="linkId != null">
- link_id,
- </if>
- <if test="tenantId != null">
- tenant_id,
- </if>
- <if test="deleteFlag != null">
- delete_flag,
- </if>
- <if test="actualQuantityInStorage != null">
- actual_quantity_in_storage,
- </if>
- <if test="warehousingVariance != null">
- warehousing_variance,
- </if>
- <if test="reasonOfDifference != null">
- reason_of_difference,
- </if>
- <if test="warehousingUser != null">
- warehousing_user,
- </if>
- <if test="warehousingTime != null and warehousingTime != ''">
- warehousing_time,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="productionDate != null">
- production_date,
- </if>
- <if test="expiryNum != null">
- expiry_num,
- </if>
- <if test="position != null">
- position,
- </if>
- <if test="wholesaleDecimal != null">
- wholesale_decimal,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="headerId != null">
- #{headerId,jdbcType=BIGINT},
- </if>
- <if test="materialId != null">
- #{materialId,jdbcType=BIGINT},
- </if>
- <if test="materialExtendId != null">
- #{materialExtendId,jdbcType=BIGINT},
- </if>
- <if test="materialUnit != null">
- #{materialUnit,jdbcType=VARCHAR},
- </if>
- <if test="sku != null">
- #{sku,jdbcType=VARCHAR},
- </if>
- <if test="operNumber != null">
- #{operNumber,jdbcType=DECIMAL},
- </if>
- <if test="basicNumber != null">
- #{basicNumber,jdbcType=DECIMAL},
- </if>
- <if test="unitPrice != null">
- #{unitPrice,jdbcType=DECIMAL},
- </if>
- <if test="purchaseUnitPrice != null">
- #{purchaseUnitPrice,jdbcType=DECIMAL},
- </if>
- <if test="taxUnitPrice != null">
- #{taxUnitPrice,jdbcType=DECIMAL},
- </if>
- <if test="allPrice != null">
- #{allPrice,jdbcType=DECIMAL},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="depotId != null">
- #{depotId,jdbcType=BIGINT},
- </if>
- <if test="anotherDepotId != null">
- #{anotherDepotId,jdbcType=BIGINT},
- </if>
- <if test="taxRate != null">
- #{taxRate,jdbcType=DECIMAL},
- </if>
- <if test="taxMoney != null">
- #{taxMoney,jdbcType=DECIMAL},
- </if>
- <if test="taxLastMoney != null">
- #{taxLastMoney,jdbcType=DECIMAL},
- </if>
- <if test="materialType != null">
- #{materialType,jdbcType=VARCHAR},
- </if>
- <if test="snList != null">
- #{snList,jdbcType=VARCHAR},
- </if>
- <if test="batchNumber != null">
- #{batchNumber,jdbcType=VARCHAR},
- </if>
- <if test="expirationDate != null">
- #{expirationDate,jdbcType=TIMESTAMP},
- </if>
- <if test="linkId != null">
- #{linkId,jdbcType=BIGINT},
- </if>
- <if test="tenantId != null">
- #{tenantId,jdbcType=BIGINT},
- </if>
- <if test="deleteFlag != null">
- #{deleteFlag,jdbcType=VARCHAR},
- </if>
- <if test="actualQuantityInStorage != null">
- #{actualQuantityInStorage,jdbcType=DECIMAL},
- </if>
- <if test="warehousingVariance != null">
- #{warehousingVariance,jdbcType=DECIMAL},
- </if>
- <if test="reasonOfDifference != null">
- #{reasonOfDifference,jdbcType=VARCHAR},
- </if>
- <if test="warehousingUser != null">
- #{warehousingUser,jdbcType=BIGINT},
- </if>
- <if test="warehousingTime != null and warehousingTime != ''">
- #{warehousingTime,jdbcType=DATE},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=DATE},
- </if>
- <if test="productionDate != null">
- #{productionDate,jdbcType=TIMESTAMP},
- </if>
- <if test="expiryNum != null">
- #{expiryNum,jdbcType=INTEGER},
- </if>
- <if test="position != null">
- #{position,jdbcType=VARCHAR},
- </if>
- <if test="wholesaleDecimal != null">
- #{wholesaleDecimal,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="java.lang.Long">
- select count(*) from jsh_depot_item
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update jsh_depot_item
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=BIGINT},
- </if>
- <if test="record.headerId != null">
- header_id = #{record.headerId,jdbcType=BIGINT},
- </if>
- <if test="record.materialId != null">
- material_id = #{record.materialId,jdbcType=BIGINT},
- </if>
- <if test="record.materialExtendId != null">
- material_extend_id = #{record.materialExtendId,jdbcType=BIGINT},
- </if>
- <if test="record.materialUnit != null">
- material_unit = #{record.materialUnit,jdbcType=VARCHAR},
- </if>
- <if test="record.sku != null">
- sku = #{record.sku,jdbcType=VARCHAR},
- </if>
- <if test="record.operNumber != null">
- oper_number = #{record.operNumber,jdbcType=DECIMAL},
- </if>
- <if test="record.basicNumber != null">
- basic_number = #{record.basicNumber,jdbcType=DECIMAL},
- </if>
- <if test="record.unitPrice != null">
- unit_price = #{record.unitPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.purchaseUnitPrice != null">
- purchase_unit_price = #{record.purchaseUnitPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.taxUnitPrice != null">
- tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.allPrice != null">
- all_price = #{record.allPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.remark != null">
- remark = #{record.remark,jdbcType=VARCHAR},
- </if>
- <if test="record.depotId != null">
- depot_id = #{record.depotId,jdbcType=BIGINT},
- </if>
- <if test="record.anotherDepotId != null">
- another_depot_id = #{record.anotherDepotId,jdbcType=BIGINT},
- </if>
- <if test="record.taxRate != null">
- tax_rate = #{record.taxRate,jdbcType=DECIMAL},
- </if>
- <if test="record.taxMoney != null">
- tax_money = #{record.taxMoney,jdbcType=DECIMAL},
- </if>
- <if test="record.taxLastMoney != null">
- tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
- </if>
- <if test="record.materialType != null">
- material_type = #{record.materialType,jdbcType=VARCHAR},
- </if>
- <if test="record.snList != null">
- sn_list = #{record.snList,jdbcType=VARCHAR},
- </if>
- <if test="record.batchNumber != null">
- batch_number = #{record.batchNumber,jdbcType=VARCHAR},
- </if>
- <if test="record.expirationDate != null">
- expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.linkId != null">
- link_id = #{record.linkId,jdbcType=BIGINT},
- </if>
- <if test="record.tenantId != null">
- tenant_id = #{record.tenantId,jdbcType=BIGINT},
- </if>
- <if test="record.deleteFlag != null">
- delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update jsh_depot_item
- set id = #{record.id,jdbcType=BIGINT},
- header_id = #{record.headerId,jdbcType=BIGINT},
- material_id = #{record.materialId,jdbcType=BIGINT},
- material_extend_id = #{record.materialExtendId,jdbcType=BIGINT},
- material_unit = #{record.materialUnit,jdbcType=VARCHAR},
- sku = #{record.sku,jdbcType=VARCHAR},
- oper_number = #{record.operNumber,jdbcType=DECIMAL},
- basic_number = #{record.basicNumber,jdbcType=DECIMAL},
- unit_price = #{record.unitPrice,jdbcType=DECIMAL},
- purchase_unit_price = #{record.purchaseUnitPrice,jdbcType=DECIMAL},
- tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
- all_price = #{record.allPrice,jdbcType=DECIMAL},
- remark = #{record.remark,jdbcType=VARCHAR},
- depot_id = #{record.depotId,jdbcType=BIGINT},
- another_depot_id = #{record.anotherDepotId,jdbcType=BIGINT},
- tax_rate = #{record.taxRate,jdbcType=DECIMAL},
- tax_money = #{record.taxMoney,jdbcType=DECIMAL},
- tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
- material_type = #{record.materialType,jdbcType=VARCHAR},
- sn_list = #{record.snList,jdbcType=VARCHAR},
- batch_number = #{record.batchNumber,jdbcType=VARCHAR},
- expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
- link_id = #{record.linkId,jdbcType=BIGINT},
- tenant_id = #{record.tenantId,jdbcType=BIGINT},
- delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
- update jsh_depot_item
- <set>
- <if test="headerId != null">
- header_id = #{headerId,jdbcType=BIGINT},
- </if>
- <if test="materialId != null">
- material_id = #{materialId,jdbcType=BIGINT},
- </if>
- <if test="materialExtendId != null">
- material_extend_id = #{materialExtendId,jdbcType=BIGINT},
- </if>
- <if test="materialUnit != null">
- material_unit = #{materialUnit,jdbcType=VARCHAR},
- </if>
- <if test="sku != null">
- sku = #{sku,jdbcType=VARCHAR},
- </if>
- <if test="operNumber != null">
- oper_number = #{operNumber,jdbcType=DECIMAL},
- </if>
- <if test="basicNumber != null">
- basic_number = #{basicNumber,jdbcType=DECIMAL},
- </if>
- <if test="unitPrice != null">
- unit_price = #{unitPrice,jdbcType=DECIMAL},
- </if>
- <if test="purchaseUnitPrice != null">
- purchase_unit_price = #{purchaseUnitPrice,jdbcType=DECIMAL},
- </if>
- <if test="taxUnitPrice != null">
- tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
- </if>
- <if test="allPrice != null">
- all_price = #{allPrice,jdbcType=DECIMAL},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="depotId != null">
- depot_id = #{depotId,jdbcType=BIGINT},
- </if>
- <if test="anotherDepotId != null">
- another_depot_id = #{anotherDepotId,jdbcType=BIGINT},
- </if>
- <if test="taxRate != null">
- tax_rate = #{taxRate,jdbcType=DECIMAL},
- </if>
- <if test="taxMoney != null">
- tax_money = #{taxMoney,jdbcType=DECIMAL},
- </if>
- <if test="taxLastMoney != null">
- tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
- </if>
- <if test="materialType != null">
- material_type = #{materialType,jdbcType=VARCHAR},
- </if>
- <if test="snList != null">
- sn_list = #{snList,jdbcType=VARCHAR},
- </if>
- <if test="batchNumber != null">
- batch_number = #{batchNumber,jdbcType=VARCHAR},
- </if>
- <if test="expirationDate != null">
- expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
- </if>
- <if test="linkId != null">
- link_id = #{linkId,jdbcType=BIGINT},
- </if>
- <if test="tenantId != null">
- tenant_id = #{tenantId,jdbcType=BIGINT},
- </if>
- <if test="deleteFlag != null">
- delete_flag = #{deleteFlag,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotItem">
- update jsh_depot_item
- set header_id = #{headerId,jdbcType=BIGINT},
- material_id = #{materialId,jdbcType=BIGINT},
- material_extend_id = #{materialExtendId,jdbcType=BIGINT},
- material_unit = #{materialUnit,jdbcType=VARCHAR},
- sku = #{sku,jdbcType=VARCHAR},
- oper_number = #{operNumber,jdbcType=DECIMAL},
- basic_number = #{basicNumber,jdbcType=DECIMAL},
- unit_price = #{unitPrice,jdbcType=DECIMAL},
- purchase_unit_price = #{purchaseUnitPrice,jdbcType=DECIMAL},
- tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
- all_price = #{allPrice,jdbcType=DECIMAL},
- remark = #{remark,jdbcType=VARCHAR},
- depot_id = #{depotId,jdbcType=BIGINT},
- another_depot_id = #{anotherDepotId,jdbcType=BIGINT},
- tax_rate = #{taxRate,jdbcType=DECIMAL},
- tax_money = #{taxMoney,jdbcType=DECIMAL},
- tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
- material_type = #{materialType,jdbcType=VARCHAR},
- sn_list = #{snList,jdbcType=VARCHAR},
- batch_number = #{batchNumber,jdbcType=VARCHAR},
- expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
- link_id = #{linkId,jdbcType=BIGINT},
- tenant_id = #{tenantId,jdbcType=BIGINT},
- delete_flag = #{deleteFlag,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
- <select id="pdaList" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
- SELECT
- di.id AS id,
- m.`name` AS material_name,
- m.standard AS material_standard,
- me.batch_number AS batch_number,
- di.production_date AS production_date,
- di.position AS position,
- me.inventory AS inventory,
- me.bar_code AS bar_code,
- di.oper_number AS oper_number,
- me.commodity_unit AS commodity_unit,
- di.material_unit AS material_unit,
- di.actual_quantity_in_storage AS actual_quantity_in_storage,
- di.material_id AS material_id,
- m.img_name AS img_name,
- di.header_id,
- di.material_extend_id
- FROM
- jsh_depot_item di
- LEFT JOIN jsh_material m ON di.material_id = m.id
- LEFT JOIN jsh_material_extend me ON di.material_extend_id = me.id
- WHERE
- di.delete_flag = '0'
- AND di.header_id = #{id}
- </select>
- <select id="pdaDetail" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
- SELECT
- di.id AS id,
- m.`name` AS material_name,
- m.standard AS material_standard,
- mb.batch_number AS batch_number,
- di.production_date AS production_date,
- di.position AS position,
- me.inventory AS inventory,
- me.bar_code AS bar_code,
- di.oper_number AS oper_number,
- di.material_unit AS material_unit,
- me.create_time AS create_time,
- di.material_id AS material_id,
- m.img_name AS img_name
- FROM
- jsh_depot_item di
- LEFT JOIN jsh_material m ON di.material_id = m.id
- LEFT JOIN jsh_material_extend me ON di.material_extend_id = me.id
- LEFT JOIN material_batch mb ON (SELECT id FROM jsh_depot_item WHERE link_id = di.id LIMIT 1) = mb.depot_item_id
- WHERE
- di.delete_flag = '0'
- AND di.id = #{id}
- </select>
- <select id="materialDepotDetail" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
- SELECT
- di.id AS id,
- di.material_id AS material_id,
- m.`name` AS material_name,
- d.name AS depot_name,
- m.standard AS material_standard,
- di.oper_number AS actual_quantity_in_storage,
- dh.create_time AS warehousing_time,
- me.commodity_unit AS commodity_unit,
- m.img_name AS img_name
- FROM
- jsh_depot_item di
- LEFT JOIN jsh_depot_head dh ON di.header_id = dh.id
- LEFT JOIN jsh_material m ON di.material_id = m.id
- LEFT JOIN jsh_material_extend me ON di.material_extend_id = me.id
- LEFT JOIN jsh_depot d ON di.depot_id = d.id
- WHERE
- di.delete_flag = '0'
- AND dh.delete_flag = '0'
- AND dh.status in ('1','2','3')
- AND dh.type = #{type}
- AND di.material_id = #{materialId}
- </select>
- </mapper>
|