|
|
@@ -2,69 +2,70 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
<mapper namespace="com.usoftchina.saas.document.mapper.ProductMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Product">
|
|
|
- <id column="pr_id" property="id" jdbcType="INTEGER" />
|
|
|
- <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
|
|
|
- <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER" />
|
|
|
- <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
|
|
|
- <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE" />
|
|
|
- <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE" />
|
|
|
- <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE" />
|
|
|
- <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER" />
|
|
|
- <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
|
|
|
- <result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
- <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
- <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
- <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_text5" property="pr_text5" jdbcType="VARCHAR" />
|
|
|
+ <id column="pr_id" property="id" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_code" property="pr_code" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_whid" property="pr_whid" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_status" property="pr_status" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="companyId" property="companyId" jdbcType="INTEGER"/>
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER"/>
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text5" property="pr_text5" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
<resultMap id="ProductDTOResultMapper" type="com.usoftchina.saas.document.dto.ProductDTO">
|
|
|
- <id column="pr_id" property="id" jdbcType="INTEGER" />
|
|
|
- <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
|
|
|
- <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
|
|
|
+ <id column="pr_id" property="id" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_code" property="pr_code" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_whid" property="pr_whid" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR"/>
|
|
|
<!--productonhand-->
|
|
|
- <result column="po_onhand" property="po_onhand" jdbcType="DOUBLE" />
|
|
|
+ <result column="po_onhand" property="po_onhand" jdbcType="DOUBLE"/>
|
|
|
<!--productonhand-->
|
|
|
- <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
|
|
|
- <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_status" property="pr_status" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
<!--查询所有物料信息-->
|
|
|
- <select id="getProductsByCondition" resultMap="ProductDTOResultMapper" parameterType="com.usoftchina.saas.commons.dto.DocReqDTO">
|
|
|
+ <select id="getProductsByCondition" resultMap="ProductDTOResultMapper"
|
|
|
+ parameterType="com.usoftchina.saas.commons.dto.DocReqDTO">
|
|
|
SELECT * FROM PRODUCT left join productonhand on pr_id = po_prodid
|
|
|
- and PRODUCT.companyid = productonhand.companyid
|
|
|
+ and PRODUCT.companyid = productonhand.companyid
|
|
|
<where>
|
|
|
<if test="con != null">
|
|
|
${con}
|
|
|
</if>
|
|
|
<if test="companyId != null">
|
|
|
- and PRODUCT.companyid = #{companyId}
|
|
|
+ and PRODUCT.companyid = #{companyId}
|
|
|
</if>
|
|
|
</where>
|
|
|
ORDER BY PR_ID DESC
|
|
|
@@ -83,31 +84,31 @@
|
|
|
<select id="validateCodeWhenInsert" resultType="int">
|
|
|
select count(*) from PRODUCT where PR_CODE = #{code} and companyId =#{companyId}
|
|
|
</select>
|
|
|
- <select id="validateCodeWhenUpdate" resultType="int" >
|
|
|
+ <select id="validateCodeWhenUpdate" resultType="int">
|
|
|
select count(*) from PRODUCT where PR_CODE = #{code} and PR_ID != #{id} and companyId =#{companyId}
|
|
|
</select>
|
|
|
<select id="getCodeById" resultType="string">
|
|
|
SELECT PR_CODE FROM PRODUCT WHERE PR_ID=#{id}
|
|
|
</select>
|
|
|
|
|
|
- <sql id="Base_Column_List" >
|
|
|
+ <sql id="Base_Column_List">
|
|
|
pr_id, pr_code, pr_detail, pr_spec, pr_unit, pr_kind, pr_orispeccode, pr_whid, pr_whcode,
|
|
|
pr_whname, pr_zxbzs, pr_leadtime, pr_brand, pr_standardprice, pr_purcprice, pr_saleprice,
|
|
|
pr_vendid, pr_vendcode, pr_vendname, pr_status,
|
|
|
pr_statuscode, companyId, updaterId, updateTime, pr_text1, pr_text2, pr_text3,
|
|
|
pr_text4, pr_text5
|
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
|
|
select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from product
|
|
|
where pr_id = #{id}
|
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
delete from product
|
|
|
where pr_id = #{id}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Product" >
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Product">
|
|
|
<selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
SELECT LAST_INSERT_ID() AS ID
|
|
|
</selectKey>
|
|
|
@@ -132,275 +133,293 @@
|
|
|
#{pr_text1,jdbcType=VARCHAR}, #{pr_text2,jdbcType=VARCHAR}, #{pr_text3,jdbcType=VARCHAR},
|
|
|
#{pr_text4,jdbcType=VARCHAR}, #{pr_text5,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Product" >
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Product">
|
|
|
<selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
SELECT LAST_INSERT_ID() AS ID
|
|
|
</selectKey>
|
|
|
insert into product
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
- <if test="pr_code != null" >
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pr_code != null">
|
|
|
pr_code,
|
|
|
</if>
|
|
|
- <if test="pr_detail != null" >
|
|
|
+ <if test="pr_detail != null">
|
|
|
pr_detail,
|
|
|
</if>
|
|
|
- <if test="pr_spec != null" >
|
|
|
+ <if test="pr_spec != null">
|
|
|
pr_spec,
|
|
|
</if>
|
|
|
- <if test="pr_unit != null" >
|
|
|
+ <if test="pr_unit != null">
|
|
|
pr_unit,
|
|
|
</if>
|
|
|
- <if test="pr_kind != null" >
|
|
|
+ <if test="pr_kind != null">
|
|
|
pr_kind,
|
|
|
</if>
|
|
|
- <if test="pr_orispeccode != null" >
|
|
|
+ <if test="pr_orispeccode != null">
|
|
|
pr_orispeccode,
|
|
|
</if>
|
|
|
- <if test="pr_whid != null" >
|
|
|
+ <if test="pr_whid != null">
|
|
|
pr_whid,
|
|
|
</if>
|
|
|
- <if test="pr_whcode != null" >
|
|
|
+ <if test="pr_whcode != null">
|
|
|
pr_whcode,
|
|
|
</if>
|
|
|
- <if test="pr_whname != null" >
|
|
|
+ <if test="pr_whname != null">
|
|
|
pr_whname,
|
|
|
</if>
|
|
|
- <if test="pr_zxbzs != null" >
|
|
|
+ <if test="pr_zxbzs != null">
|
|
|
pr_zxbzs,
|
|
|
</if>
|
|
|
- <if test="pr_leadtime != null" >
|
|
|
+ <if test="pr_leadtime != null">
|
|
|
pr_leadtime,
|
|
|
</if>
|
|
|
- <if test="pr_brand != null" >
|
|
|
+ <if test="pr_brand != null">
|
|
|
pr_brand,
|
|
|
</if>
|
|
|
- <if test="pr_standardprice != null" >
|
|
|
+ <if test="pr_standardprice != null">
|
|
|
pr_standardprice,
|
|
|
</if>
|
|
|
- <if test="pr_purcprice != null" >
|
|
|
+ <if test="pr_purcprice != null">
|
|
|
pr_purcprice,
|
|
|
</if>
|
|
|
- <if test="pr_saleprice != null" >
|
|
|
+ <if test="pr_saleprice != null">
|
|
|
pr_saleprice,
|
|
|
</if>
|
|
|
- <if test="pr_vendid != null" >
|
|
|
+ <if test="pr_vendid != null">
|
|
|
pr_vendid,
|
|
|
</if>
|
|
|
- <if test="pr_vendcode != null" >
|
|
|
+ <if test="pr_vendcode != null">
|
|
|
pr_vendcode,
|
|
|
</if>
|
|
|
- <if test="pr_vendname != null" >
|
|
|
+ <if test="pr_vendname != null">
|
|
|
pr_vendname,
|
|
|
</if>
|
|
|
- <if test="pr_status != null" >
|
|
|
+ <if test="pr_status != null">
|
|
|
pr_status,
|
|
|
</if>
|
|
|
- <if test="pr_statuscode != null" >
|
|
|
+ <if test="pr_statuscode != null">
|
|
|
pr_statuscode,
|
|
|
</if>
|
|
|
- <if test="companyId != null" >
|
|
|
+ <if test="companyId != null">
|
|
|
companyId,
|
|
|
</if>
|
|
|
- <if test="updaterId != null" >
|
|
|
+ <if test="updaterId != null">
|
|
|
updaterId,
|
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
+ <if test="updateTime != null">
|
|
|
updateTime,
|
|
|
</if>
|
|
|
- <if test="pr_text1 != null" >
|
|
|
+ <if test="pr_text1 != null">
|
|
|
pr_text1,
|
|
|
</if>
|
|
|
- <if test="pr_text2 != null" >
|
|
|
+ <if test="pr_text2 != null">
|
|
|
pr_text2,
|
|
|
</if>
|
|
|
- <if test="pr_text3 != null" >
|
|
|
+ <if test="pr_text3 != null">
|
|
|
pr_text3,
|
|
|
</if>
|
|
|
- <if test="pr_text4 != null" >
|
|
|
+ <if test="pr_text4 != null">
|
|
|
pr_text4,
|
|
|
</if>
|
|
|
- <if test="pr_text5 != null" >
|
|
|
+ <if test="pr_text5 != null">
|
|
|
pr_text5,
|
|
|
</if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ creatorId,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ createTime,
|
|
|
+ </if>
|
|
|
+ <if test="creatorName != null" >
|
|
|
+ creatorName,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
- <if test="pr_code != null" >
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pr_code != null">
|
|
|
#{pr_code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_detail != null" >
|
|
|
+ <if test="pr_detail != null">
|
|
|
#{pr_detail,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_spec != null" >
|
|
|
+ <if test="pr_spec != null">
|
|
|
#{pr_spec,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_unit != null" >
|
|
|
+ <if test="pr_unit != null">
|
|
|
#{pr_unit,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_kind != null" >
|
|
|
+ <if test="pr_kind != null">
|
|
|
#{pr_kind,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_orispeccode != null" >
|
|
|
+ <if test="pr_orispeccode != null">
|
|
|
#{pr_orispeccode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_whid != null" >
|
|
|
+ <if test="pr_whid != null">
|
|
|
#{pr_whid,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_whcode != null" >
|
|
|
+ <if test="pr_whcode != null">
|
|
|
#{pr_whcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_whname != null" >
|
|
|
+ <if test="pr_whname != null">
|
|
|
#{pr_whname,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_zxbzs != null" >
|
|
|
+ <if test="pr_zxbzs != null">
|
|
|
#{pr_zxbzs,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_leadtime != null" >
|
|
|
+ <if test="pr_leadtime != null">
|
|
|
#{pr_leadtime,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_brand != null" >
|
|
|
+ <if test="pr_brand != null">
|
|
|
#{pr_brand,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_standardprice != null" >
|
|
|
+ <if test="pr_standardprice != null">
|
|
|
#{pr_standardprice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_purcprice != null" >
|
|
|
+ <if test="pr_purcprice != null">
|
|
|
#{pr_purcprice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_saleprice != null" >
|
|
|
+ <if test="pr_saleprice != null">
|
|
|
#{pr_saleprice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_vendid != null" >
|
|
|
+ <if test="pr_vendid != null">
|
|
|
#{pr_vendid,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_vendcode != null" >
|
|
|
+ <if test="pr_vendcode != null">
|
|
|
#{pr_vendcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_vendname != null" >
|
|
|
+ <if test="pr_vendname != null">
|
|
|
#{pr_vendname,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_status != null" >
|
|
|
+ <if test="pr_status != null">
|
|
|
#{pr_status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_statuscode != null" >
|
|
|
+ <if test="pr_statuscode != null">
|
|
|
#{pr_statuscode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyId != null" >
|
|
|
+ <if test="companyId != null">
|
|
|
#{companyId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="updaterId != null" >
|
|
|
+ <if test="updaterId != null">
|
|
|
#{updaterId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
+ <if test="updateTime != null">
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="pr_text1 != null" >
|
|
|
+ <if test="pr_text1 != null">
|
|
|
#{pr_text1,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text2 != null" >
|
|
|
+ <if test="pr_text2 != null">
|
|
|
#{pr_text2,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text3 != null" >
|
|
|
+ <if test="pr_text3 != null">
|
|
|
#{pr_text3,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text4 != null" >
|
|
|
+ <if test="pr_text4 != null">
|
|
|
#{pr_text4,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text5 != null" >
|
|
|
+ <if test="pr_text5 != null">
|
|
|
#{pr_text5,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ #{creatorId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="creatorName != null" >
|
|
|
+ #{creatorName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Product" >
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Product">
|
|
|
update product
|
|
|
- <set >
|
|
|
- <if test="pr_code != null" >
|
|
|
+ <set>
|
|
|
+ <if test="pr_code != null">
|
|
|
pr_code = #{pr_code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_detail != null" >
|
|
|
+ <if test="pr_detail != null">
|
|
|
pr_detail = #{pr_detail,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_spec != null" >
|
|
|
+ <if test="pr_spec != null">
|
|
|
pr_spec = #{pr_spec,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_unit != null" >
|
|
|
+ <if test="pr_unit != null">
|
|
|
pr_unit = #{pr_unit,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_kind != null" >
|
|
|
+ <if test="pr_kind != null">
|
|
|
pr_kind = #{pr_kind,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_orispeccode != null" >
|
|
|
+ <if test="pr_orispeccode != null">
|
|
|
pr_orispeccode = #{pr_orispeccode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_whid != null" >
|
|
|
+ <if test="pr_whid != null">
|
|
|
pr_whid = #{pr_whid,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_whcode != null" >
|
|
|
+ <if test="pr_whcode != null">
|
|
|
pr_whcode = #{pr_whcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_whname != null" >
|
|
|
+ <if test="pr_whname != null">
|
|
|
pr_whname = #{pr_whname,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_zxbzs != null" >
|
|
|
+ <if test="pr_zxbzs != null">
|
|
|
pr_zxbzs = #{pr_zxbzs,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_leadtime != null" >
|
|
|
+ <if test="pr_leadtime != null">
|
|
|
pr_leadtime = #{pr_leadtime,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_brand != null" >
|
|
|
+ <if test="pr_brand != null">
|
|
|
pr_brand = #{pr_brand,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_standardprice != null" >
|
|
|
+ <if test="pr_standardprice != null">
|
|
|
pr_standardprice = #{pr_standardprice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_purcprice != null" >
|
|
|
+ <if test="pr_purcprice != null">
|
|
|
pr_purcprice = #{pr_purcprice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_saleprice != null" >
|
|
|
+ <if test="pr_saleprice != null">
|
|
|
pr_saleprice = #{pr_saleprice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_vendid != null" >
|
|
|
+ <if test="pr_vendid != null">
|
|
|
pr_vendid = #{pr_vendid,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="pr_vendcode != null" >
|
|
|
+ <if test="pr_vendcode != null">
|
|
|
pr_vendcode = #{pr_vendcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_vendname != null" >
|
|
|
+ <if test="pr_vendname != null">
|
|
|
pr_vendname = #{pr_vendname,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_status != null" >
|
|
|
+ <if test="pr_status != null">
|
|
|
pr_status = #{pr_status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_statuscode != null" >
|
|
|
+ <if test="pr_statuscode != null">
|
|
|
pr_statuscode = #{pr_statuscode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyId != null" >
|
|
|
+ <if test="companyId != null">
|
|
|
companyId = #{companyId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="updaterId != null" >
|
|
|
+ <if test="updaterId != null">
|
|
|
updaterId = #{updaterId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
+ <if test="updateTime != null">
|
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="pr_text1 != null" >
|
|
|
+ <if test="pr_text1 != null">
|
|
|
pr_text1 = #{pr_text1,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text2 != null" >
|
|
|
+ <if test="pr_text2 != null">
|
|
|
pr_text2 = #{pr_text2,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text3 != null" >
|
|
|
+ <if test="pr_text3 != null">
|
|
|
pr_text3 = #{pr_text3,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text4 != null" >
|
|
|
+ <if test="pr_text4 != null">
|
|
|
pr_text4 = #{pr_text4,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="pr_text5 != null" >
|
|
|
+ <if test="pr_text5 != null">
|
|
|
pr_text5 = #{pr_text5,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where pr_id = #{id}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Product" >
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Product">
|
|
|
update product
|
|
|
set pr_code = #{pr_code,jdbcType=VARCHAR},
|
|
|
pr_detail = #{pr_detail,jdbcType=VARCHAR},
|
|
|
@@ -434,26 +453,26 @@
|
|
|
</update>
|
|
|
|
|
|
<resultMap id="ProdReserveCostResultMap" type="com.usoftchina.saas.document.dto.ProductReserveCostDTO">
|
|
|
- <result column="pr_code" property="rc_prodCode" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_spec" property="rc_prodSpec" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_detail" property="rc_prodDetail" jdbcType="VARCHAR" />
|
|
|
- <result column="pr_unit" property="rc_prodUnit" jdbcType="VARCHAR" />
|
|
|
- <result column="wh_code" property="rc_whCode" jdbcType="VARCHAR" />
|
|
|
- <result column="wh_description" property="rc_whName" jdbcType="VARCHAR" />
|
|
|
- <result column="pw_onhand" property="rc_number" jdbcType="DOUBLE" />
|
|
|
- <result column="pw_avprice" property="rc_price" jdbcType="DOUBLE" />
|
|
|
- <result column="pw_amount" property="rc_amount" jdbcType="DOUBLE" />
|
|
|
+ <result column="pr_code" property="rc_prodCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_spec" property="rc_prodSpec" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_detail" property="rc_prodDetail" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_unit" property="rc_prodUnit" jdbcType="VARCHAR"/>
|
|
|
+ <result column="wh_code" property="rc_whCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="wh_description" property="rc_whName" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pw_onhand" property="rc_number" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pw_avprice" property="rc_price" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pw_amount" property="rc_amount" jdbcType="DOUBLE"/>
|
|
|
</resultMap>
|
|
|
<select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
|
|
|
select * from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
|
|
|
<where>
|
|
|
- <if test="con!=null">
|
|
|
- ${con}
|
|
|
- </if>
|
|
|
- <if test="companyId!=null">
|
|
|
- and tab.companyId=#{companyId} and Product.companyId=#{companyId} and warehouse.companyId=#{companyId}
|
|
|
- and pw_onhand!=0
|
|
|
- </if>
|
|
|
+ <if test="con!=null">
|
|
|
+ ${con}
|
|
|
+ </if>
|
|
|
+ <if test="companyId!=null">
|
|
|
+ and tab.companyId=#{companyId} and Product.companyId=#{companyId} and warehouse.companyId=#{companyId}
|
|
|
+ and pw_onhand!=0
|
|
|
+ </if>
|
|
|
</where>
|
|
|
ORDER BY PR_ID DESC
|
|
|
</select>
|
|
|
@@ -521,15 +540,6 @@
|
|
|
<if test="pi_total != null">
|
|
|
pi_total,
|
|
|
</if>
|
|
|
- <if test="pi_recordmanid != null">
|
|
|
- pi_recordmanid,
|
|
|
- </if>
|
|
|
- <if test="pi_recordman != null">
|
|
|
- pi_recordman,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- pi_recorddate,
|
|
|
- </if>
|
|
|
<if test="pi_status != null">
|
|
|
pi_status,
|
|
|
</if>
|
|
|
@@ -578,6 +588,15 @@
|
|
|
<if test="pi_remark != null">
|
|
|
pi_remark,
|
|
|
</if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ creatorId,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ createTime,
|
|
|
+ </if>
|
|
|
+ <if test="creatorName != null" >
|
|
|
+ creatorName,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
@@ -623,15 +642,6 @@
|
|
|
<if test="pi_total != null">
|
|
|
#{pi_total,jdbcType=DOUBLE},
|
|
|
</if>
|
|
|
- <if test="pi_recordmanid != null">
|
|
|
- #{pi_recordmanid,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="pi_recordman != null">
|
|
|
- #{pi_recordman,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
<if test="pi_status != null">
|
|
|
#{pi_status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -680,10 +690,19 @@
|
|
|
<if test="pi_remark != null">
|
|
|
#{pi_remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ #{creatorId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="creatorName != null" >
|
|
|
+ #{creatorName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
- <insert id="batchInsertDetail" parameterType="java.util.List" >
|
|
|
+ <insert id="batchInsertDetail" parameterType="java.util.List">
|
|
|
insert into prodiodetail (pd_piid, pd_inoutno,
|
|
|
pd_piclass, pd_pdno, pd_ordercode,
|
|
|
pd_orderdetno, pd_prodid, pd_prodcode,
|
|
|
@@ -697,7 +716,8 @@
|
|
|
updatetime, pd_text1, pd_text2,
|
|
|
pd_text3, pd_text4, pd_text5,
|
|
|
pd_ym, pd_yqty, pd_ioid,
|
|
|
- pd_remark) VALUES
|
|
|
+ pd_remark,
|
|
|
+ creatorId,createTime,creatorName) VALUES
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=",">
|
|
|
(
|
|
|
#{item.pd_piid,jdbcType=INTEGER},
|
|
|
@@ -738,118 +758,120 @@
|
|
|
#{item.pd_ym,jdbcType=INTEGER},
|
|
|
#{item.pd_yqty,jdbcType=DOUBLE},
|
|
|
#{item.pd_remark,jdbcType=LONGVARCHAR},
|
|
|
- #{item.pd_ioid,jdbcType=INTEGER})
|
|
|
+ #{item.pd_ioid,jdbcType=INTEGER},
|
|
|
+ #{item.creatorId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.creatorName,jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
- <update id="batchUpdateDetail" parameterType="com.usoftchina.saas.document.entities.ProdIODetail" >
|
|
|
+ <update id="batchUpdateDetail" parameterType="com.usoftchina.saas.document.entities.ProdIODetail">
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
- update prodiodetail <set>
|
|
|
- <if test="item.pd_piid !=null">
|
|
|
- pd_piid = #{item.pd_piid},
|
|
|
- </if>
|
|
|
- <if test="item.pd_inoutno !=null">
|
|
|
- pd_inoutno = #{item.pd_inoutno},
|
|
|
- </if>
|
|
|
- <if test="item.pd_piclass !=null">
|
|
|
- pd_piclass = #{item.pd_piclass},
|
|
|
- </if>
|
|
|
- <if test="item.pd_pdno !=null">
|
|
|
- pd_pdno = #{item.pd_pdno},
|
|
|
- </if>
|
|
|
- <if test="item.pd_ordercode !=null">
|
|
|
- pd_ordercode = #{item.pd_ordercode},
|
|
|
- </if>
|
|
|
- <if test="item.pd_orderdetno !=null">
|
|
|
- pd_orderdetno = #{item.pd_orderdetno},
|
|
|
- </if>
|
|
|
- <if test="item.pd_prodid !=null">
|
|
|
- pd_prodid = #{item.pd_prodid},
|
|
|
- </if>
|
|
|
- <if test="item.pd_prodcode !=null">
|
|
|
- pd_prodcode = #{item.pd_prodcode},
|
|
|
- </if>
|
|
|
- <if test="item.pd_unit !=null">
|
|
|
- pd_unit = #{item.pd_unit},
|
|
|
- </if>
|
|
|
- <if test="item.pd_inqty !=null">
|
|
|
- pd_inqty = #{item.pd_inqty},
|
|
|
- </if>
|
|
|
- <if test="item.pd_outqty !=null">
|
|
|
- pd_outqty = #{item.pd_outqty},
|
|
|
- </if>
|
|
|
- <if test="item.pd_orderprice !=null">
|
|
|
- pd_orderprice = #{item.pd_orderprice},
|
|
|
- </if>
|
|
|
- <if test="item.pd_sendprice !=null">
|
|
|
- pd_sendprice = #{item.pd_sendprice},
|
|
|
- </if>
|
|
|
- <if test="item.pd_price !=null">
|
|
|
- pd_price = #{item.pd_price},
|
|
|
- </if>
|
|
|
- <if test="item.pd_total !=null">
|
|
|
- pd_total = #{item.pd_total},
|
|
|
- </if>
|
|
|
- <if test="item.pd_taxrate !=null">
|
|
|
- pd_taxrate = #{item.pd_taxrate},
|
|
|
- </if>
|
|
|
- <if test="item.pd_netprice !=null">
|
|
|
- pd_netprice = #{item.pd_netprice},
|
|
|
- </if>
|
|
|
- <if test="item.pd_nettotal !=null">
|
|
|
- pd_nettotal = #{item.pd_nettotal},
|
|
|
- </if>
|
|
|
- <if test="item.pd_whid !=null">
|
|
|
- pd_whid = #{item.pd_whid},
|
|
|
- </if>
|
|
|
- <if test="item.pd_whcode !=null">
|
|
|
- pd_whcode = #{item.pd_whcode},
|
|
|
- </if>
|
|
|
- <if test="item.pd_whname !=null">
|
|
|
- pd_whname = #{item.pd_whname},
|
|
|
- </if>
|
|
|
- <if test="item.pd_inwhid !=null">
|
|
|
- pd_inwhid = #{item.pd_inwhid},
|
|
|
- </if>
|
|
|
- <if test="item.pd_inwhcode !=null">
|
|
|
- pd_inwhcode = #{item.pd_inwhcode},
|
|
|
- </if>
|
|
|
- <if test="item.pd_inwhname !=null">
|
|
|
- pd_inwhname = #{item.pd_inwhname},
|
|
|
- </if>
|
|
|
- <if test="item.pd_orderid !=null">
|
|
|
- pd_orderid = #{item.pd_orderid},
|
|
|
- </if>
|
|
|
- <if test="item.pd_sdid !=null">
|
|
|
- pd_sdid = #{item.pd_sdid},
|
|
|
- </if>
|
|
|
- <if test="item.pd_status !=null">
|
|
|
- pd_status = #{item.pd_status},
|
|
|
- </if>
|
|
|
- <if test="item.pd_remark !=null">
|
|
|
- pd_remark = #{item.pd_remark},
|
|
|
- </if>
|
|
|
- <if test="item.companyId!=null">
|
|
|
- companyId = #{item.companyId},
|
|
|
- </if>
|
|
|
- <if test="item.updaterId!=null">
|
|
|
- updaterId = #{item.updaterId},
|
|
|
- </if>
|
|
|
- <if test="item.updateTime!=null">
|
|
|
- updateTime = #{item.updateTime},
|
|
|
- </if>
|
|
|
- pd_text1 = #{item.pd_text1},
|
|
|
- pd_text2 = #{item.pd_text2},
|
|
|
- pd_text3 = #{item.pd_text3},
|
|
|
- pd_text4 = #{item.pd_text4},
|
|
|
- pd_text5 = #{item.pd_text5},
|
|
|
- <if test="item.pd_ym!=null">
|
|
|
- pd_ym = #{item.pd_ym},
|
|
|
- </if>
|
|
|
- <if test="item.pd_yqty!=null">
|
|
|
- pd_yqty = #{item.pd_yqty},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
+ update prodiodetail
|
|
|
+ <set>
|
|
|
+ <if test="item.pd_piid !=null">
|
|
|
+ pd_piid = #{item.pd_piid},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_inoutno !=null">
|
|
|
+ pd_inoutno = #{item.pd_inoutno},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_piclass !=null">
|
|
|
+ pd_piclass = #{item.pd_piclass},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_pdno !=null">
|
|
|
+ pd_pdno = #{item.pd_pdno},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_ordercode !=null">
|
|
|
+ pd_ordercode = #{item.pd_ordercode},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_orderdetno !=null">
|
|
|
+ pd_orderdetno = #{item.pd_orderdetno},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_prodid !=null">
|
|
|
+ pd_prodid = #{item.pd_prodid},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_prodcode !=null">
|
|
|
+ pd_prodcode = #{item.pd_prodcode},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_unit !=null">
|
|
|
+ pd_unit = #{item.pd_unit},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_inqty !=null">
|
|
|
+ pd_inqty = #{item.pd_inqty},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_outqty !=null">
|
|
|
+ pd_outqty = #{item.pd_outqty},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_orderprice !=null">
|
|
|
+ pd_orderprice = #{item.pd_orderprice},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_sendprice !=null">
|
|
|
+ pd_sendprice = #{item.pd_sendprice},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_price !=null">
|
|
|
+ pd_price = #{item.pd_price},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_total !=null">
|
|
|
+ pd_total = #{item.pd_total},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_taxrate !=null">
|
|
|
+ pd_taxrate = #{item.pd_taxrate},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_netprice !=null">
|
|
|
+ pd_netprice = #{item.pd_netprice},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_nettotal !=null">
|
|
|
+ pd_nettotal = #{item.pd_nettotal},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_whid !=null">
|
|
|
+ pd_whid = #{item.pd_whid},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_whcode !=null">
|
|
|
+ pd_whcode = #{item.pd_whcode},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_whname !=null">
|
|
|
+ pd_whname = #{item.pd_whname},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_inwhid !=null">
|
|
|
+ pd_inwhid = #{item.pd_inwhid},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_inwhcode !=null">
|
|
|
+ pd_inwhcode = #{item.pd_inwhcode},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_inwhname !=null">
|
|
|
+ pd_inwhname = #{item.pd_inwhname},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_orderid !=null">
|
|
|
+ pd_orderid = #{item.pd_orderid},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_sdid !=null">
|
|
|
+ pd_sdid = #{item.pd_sdid},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_status !=null">
|
|
|
+ pd_status = #{item.pd_status},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_remark !=null">
|
|
|
+ pd_remark = #{item.pd_remark},
|
|
|
+ </if>
|
|
|
+ <if test="item.companyId!=null">
|
|
|
+ companyId = #{item.companyId},
|
|
|
+ </if>
|
|
|
+ <if test="item.updaterId!=null">
|
|
|
+ updaterId = #{item.updaterId},
|
|
|
+ </if>
|
|
|
+ <if test="item.updateTime!=null">
|
|
|
+ updateTime = #{item.updateTime},
|
|
|
+ </if>
|
|
|
+ pd_text1 = #{item.pd_text1},
|
|
|
+ pd_text2 = #{item.pd_text2},
|
|
|
+ pd_text3 = #{item.pd_text3},
|
|
|
+ pd_text4 = #{item.pd_text4},
|
|
|
+ pd_text5 = #{item.pd_text5},
|
|
|
+ <if test="item.pd_ym!=null">
|
|
|
+ pd_ym = #{item.pd_ym},
|
|
|
+ </if>
|
|
|
+ <if test="item.pd_yqty!=null">
|
|
|
+ pd_yqty = #{item.pd_yqty},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
where PD_ID = #{item.id,jdbcType=BIGINT}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
@@ -873,7 +895,7 @@
|
|
|
WHERE PRODIODETAIL.COMPANYID = #{companyId} AND PD_PRODID = #{id} and pd_piclass != '库存初始化';
|
|
|
</select>
|
|
|
|
|
|
- <delete id="deleteProdIOByCode" >
|
|
|
+ <delete id="deleteProdIOByCode">
|
|
|
DELETE FROM PRODINOUT WHERE PI_INOUTNO=#{code} AND COMPANYID = #{companyId}
|
|
|
</delete>
|
|
|
<delete id="deleteProdIODetailByCode">
|