productInBoundId, productInBoundCode, factoryCode, factoryName, customerCode, customerName,
storageAreaId, documentDate, originDocCode, referenceCode, orderTotal,
status, createUserId, updateUserId, createDate, updateDate, version
insert into PM_ProductInBound (productInBoundId, productInBoundCode,
factoryCode, factoryName, customerCode,
customerName, storageAreaId, documentDate,
originDocCode, referenceCode, orderTotal, status,
createUserId, updateUserId, createDate,
updateDate, postDate, version)
values (#{productInBoundId,jdbcType=VARCHAR}, #{productInBoundCode,jdbcType=VARCHAR},
#{factoryCode,jdbcType=VARCHAR}, #{factoryName,jdbcType=VARCHAR}, #{customerCode,jdbcType=VARCHAR},
#{customerName,jdbcType=VARCHAR}, #{storageAreaId}, #{documentDate,jdbcType=TIMESTAMP}, #{originDocCode,jdbcType=VARCHAR},
#{referenceCode,jdbcType=VARCHAR}, #{orderTotal,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER},
#{createUserId,jdbcType=VARCHAR}, #{updateUserId,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},
#{updateDate,jdbcType=TIMESTAMP}, #{postDate}, #{version,jdbcType=INTEGER})
update PM_ProductInBound
productInBoundCode = #{productInBoundCode,jdbcType=VARCHAR},
factoryCode = #{factoryCode,jdbcType=VARCHAR},
factoryName = #{factoryName,jdbcType=VARCHAR},
where productInBoundId = #{productInBoundId,jdbcType=VARCHAR}
update PM_ProductInBound
status = #{status},
updateUserId = #{updateUserId},
updateDate = #{updateDate},
version = #{version} + 1
where productInBoundId = #{productInBoundId}
and version = #{version}
ORDER BY ${orderByCondition} DESC
limit #{offset},#{limit}
and pro.productInBoundCode LIKE #{productInBoundCodeCon}
and pro.referenceCode LIKE #{referenceCodeCon}
AND pro.storageAreaId IN
#{storageAreaId}
= #{startDate}]]>