|
|
@@ -25,13 +25,13 @@
|
|
|
<result column="PU_STATUS" property="pu_status" jdbcType="VARCHAR" />
|
|
|
<result column="companyid" property="companyId" jdbcType="BIGINT" />
|
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
|
|
|
<result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
-
|
|
|
- <!--<result column="updater" jdbcType="VARCHAR" property="updater" />-->
|
|
|
<result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
|
|
|
- <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
- <!--<result column="creator" property="creator" jdbcType="VARCHAR" />-->
|
|
|
-
|
|
|
+ <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
|
|
|
+ <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="pu_auditman" property="pu_auditman" jdbcType="VARCHAR" />
|
|
|
+ <result column="pu_auditdate" property="pu_auditdate" jdbcType="TIMESTAMP" />
|
|
|
<result column="pu_text1" property="pu_text1" jdbcType="VARCHAR" />
|
|
|
<result column="pu_text2" property="pu_text2" jdbcType="VARCHAR" />
|
|
|
<result column="pu_text3" property="pu_text3" jdbcType="VARCHAR" />
|
|
|
@@ -46,8 +46,8 @@
|
|
|
pu_id, pu_code, pu_date, pu_vendid, PU_VENDCODE, PU_VENDNAME, PU_BUYERID, PU_BUYERCODE,
|
|
|
PU_BUYERNAME, PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, PU_REMARK, PU_TOTALUPPER, PU_INDATE,
|
|
|
PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, PU_ACCEPTSTATUS, PU_STATUSCODE,
|
|
|
- PU_STATUS, companyid, updaterId, updateTime,creatorid,createtime, pu_text1, pu_text2, pu_text3, pu_text4,
|
|
|
- pu_text5
|
|
|
+ PU_STATUS, companyid, updaterId,updaterName,updateTime,creatorid,creatorName,createtime, pu_text1, pu_text2, pu_text3, pu_text4,
|
|
|
+ pu_text5,pu_auditman,pu_auditdate
|
|
|
</sql>
|
|
|
<sql id="Blob_Column_List" >
|
|
|
PU_SHIPADDRESSCODE
|
|
|
@@ -137,12 +137,18 @@
|
|
|
<if test="updaterId != null" >
|
|
|
updaterId,
|
|
|
</if>
|
|
|
+ <if test="updaterName != null" >
|
|
|
+ updaterName,
|
|
|
+ </if>
|
|
|
<if test="updateTime != null" >
|
|
|
updateTime,
|
|
|
</if>
|
|
|
<if test="creatorId != null" >
|
|
|
creatorId,
|
|
|
</if>
|
|
|
+ <if test="creatorName != null" >
|
|
|
+ creatorName,
|
|
|
+ </if>
|
|
|
<if test="createTime != null" >
|
|
|
createTime,
|
|
|
</if>
|
|
|
@@ -232,15 +238,20 @@
|
|
|
<if test="updaterId != null" >
|
|
|
#{updaterId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="updaterName != null" >
|
|
|
+ #{updaterName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="updateTime != null" >
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
</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>
|
|
|
<if test="pu_text1 != null" >
|
|
|
#{pu_text1,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -333,6 +344,9 @@
|
|
|
<if test="updateTime != null" >
|
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="updaterName != null" >
|
|
|
+ updaterName = #{updaterName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="pu_text1 != null" >
|
|
|
pu_text1 = #{pu_text1,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -354,6 +368,39 @@
|
|
|
</set>
|
|
|
where pu_id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
|
|
|
+ update purchase
|
|
|
+ set pu_code = #{pu_code,jdbcType=VARCHAR},
|
|
|
+ pu_date = #{pu_date,jdbcType=TIMESTAMP},
|
|
|
+ pu_vendid = #{pu_vendid,jdbcType=INTEGER},
|
|
|
+ PU_VENDCODE = #{pu_vendcode,jdbcType=VARCHAR},
|
|
|
+ PU_VENDNAME = #{pu_vendname,jdbcType=VARCHAR},
|
|
|
+ PU_BUYERID = #{pu_buyerid,jdbcType=INTEGER},
|
|
|
+ PU_BUYERCODE = #{pu_buyercode,jdbcType=VARCHAR},
|
|
|
+ PU_BUYERNAME = #{pu_buyername,jdbcType=VARCHAR},
|
|
|
+ PU_DELIVERY = #{pu_delivery,jdbcType=TIMESTAMP},
|
|
|
+ PU_TAXTOTAL = #{pu_taxtotal,jdbcType=DOUBLE},
|
|
|
+ PU_TOTAL = #{pu_total,jdbcType=DOUBLE},
|
|
|
+ PU_REMARK = #{pu_remark,jdbcType=VARCHAR},
|
|
|
+ PU_TOTALUPPER = #{pu_totalupper,jdbcType=VARCHAR},
|
|
|
+ PU_INDATE = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ PU_PRINTSTATUS = #{pu_printstatus,jdbcType=VARCHAR},
|
|
|
+ PU_PRINTSTATUSCODE = #{pu_printstatuscode,jdbcType=VARCHAR},
|
|
|
+ PU_ACCEPTSTATUSCODE = #{pu_acceptstatuscode,jdbcType=VARCHAR},
|
|
|
+ PU_ACCEPTSTATUS = #{pu_acceptstatus,jdbcType=VARCHAR},
|
|
|
+ PU_STATUSCODE = #{pu_statuscode,jdbcType=VARCHAR},
|
|
|
+ PU_STATUS = #{pu_status,jdbcType=VARCHAR},
|
|
|
+ companyid = #{companyId,jdbcType=INTEGER},
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ updater = #{updater,jdbcType=VARCHAR},
|
|
|
+ pu_text1 = #{pu_text1,jdbcType=VARCHAR},
|
|
|
+ pu_text2 = #{pu_text2,jdbcType=VARCHAR},
|
|
|
+ pu_text3 = #{pu_text3,jdbcType=VARCHAR},
|
|
|
+ pu_text4 = #{pu_text4,jdbcType=VARCHAR},
|
|
|
+ pu_text5 = #{pu_text5,jdbcType=VARCHAR}
|
|
|
+ where pu_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
<select id="validateAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
|
|
|
select GROUP_CONCAT(pu_code) from purchase where pu_statuscode='AUDITED' and pu_id in
|
|
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
@@ -369,6 +416,13 @@
|
|
|
<select id="validateUnAudit" parameterType="long" resultType="java.lang.String">
|
|
|
select pu_code from purchase where pu_id = #{pu_id} and IFNULL(pu_statuscode,'UNAUDITED')='UNAUDITED'
|
|
|
</select>
|
|
|
+ <!--<select id="selectByTest" resultMap="BaseResultMap" parameterType="string" >
|
|
|
+ select * from purchase <where>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ ${value}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>-->
|
|
|
<select id="validateCodeWhenInsert" resultType="int">
|
|
|
select count(1) from purchase where pu_code = #{code} and companyId =#{companyId}
|
|
|
</select>
|
|
|
@@ -383,4 +437,9 @@
|
|
|
select count(1) from purchasedetail where PD_PUID=#{id} and PD_YQTY !=0;
|
|
|
</select>
|
|
|
|
|
|
+ <update id="updateCreator">
|
|
|
+ update purchase set creatorId = #{userId} , creatorName=#{userName} where pu_id=#{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|