|
|
@ -8,7 +8,6 @@
|
|
|
|
select io_order_detail.* ,basic_corp.name supName from io_order_detail
|
|
|
|
select io_order_detail.* ,basic_corp.name supName from io_order_detail
|
|
|
|
left join basic_corp on io_order_detail.supId = basic_corp.erpId
|
|
|
|
left join basic_corp on io_order_detail.supId = basic_corp.erpId
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
io_order_detail.delFlag = false
|
|
|
|
|
|
|
|
<if test="erpOrderId != '' and erpOrderId!=null">
|
|
|
|
<if test="erpOrderId != '' and erpOrderId!=null">
|
|
|
|
and io_order_detail.erpOrderId = #{erpOrderId}
|
|
|
|
and io_order_detail.erpOrderId = #{erpOrderId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -31,14 +30,12 @@
|
|
|
|
<foreach item="item" index="index" collection="orderids" open="(" separator="," close=")">
|
|
|
|
<foreach item="item" index="index" collection="orderids" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
and delFlag = false
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterMyErpMainOrder" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
|
|
<select id="filterMyErpMainOrder" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
select * from io_order_detail
|
|
|
|
select * from io_order_detail
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
delFlag = false
|
|
|
|
|
|
|
|
<if test="erpOrderId != '' and erpOrderId!=null">
|
|
|
|
<if test="erpOrderId != '' and erpOrderId!=null">
|
|
|
|
and erpOrderId = #{erpOrderId}
|
|
|
|
and erpOrderId = #{erpOrderId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -54,7 +51,6 @@
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
select * from io_order_detail
|
|
|
|
select * from io_order_detail
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
delFlag = false
|
|
|
|
|
|
|
|
<if test="erpOrderId != '' and erpOrderId!=null">
|
|
|
|
<if test="erpOrderId != '' and erpOrderId!=null">
|
|
|
|
and erpOrderId = #{erpOrderId}
|
|
|
|
and erpOrderId = #{erpOrderId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -75,7 +71,6 @@
|
|
|
|
<foreach item="item" index="index" collection="docids" open="(" separator="," close=")">
|
|
|
|
<foreach item="item" index="index" collection="docids" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
and delFlag = false
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectAllIds" parameterType="java.util.List"
|
|
|
|
<select id="selectAllIds" parameterType="java.util.List"
|
|
|
|
resultType="java.lang.String">
|
|
|
|
resultType="java.lang.String">
|
|
|
@ -86,7 +81,6 @@
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
and delFlag = false
|
|
|
|
|
|
|
|
GROUP BY erpOrderId
|
|
|
|
GROUP BY erpOrderId
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
@ -94,7 +88,6 @@
|
|
|
|
resultType="java.lang.String">
|
|
|
|
resultType="java.lang.String">
|
|
|
|
select erpOrderId from io_order_detail
|
|
|
|
select erpOrderId from io_order_detail
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
delFlag = false
|
|
|
|
|
|
|
|
<if test="orderId != '' and orderId!=null">
|
|
|
|
<if test="orderId != '' and orderId!=null">
|
|
|
|
and orderIdFk = #{orderId}
|
|
|
|
and orderIdFk = #{orderId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -106,7 +99,6 @@
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
select erpOrderId,orderIdFk from io_order_detail
|
|
|
|
select erpOrderId,orderIdFk from io_order_detail
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
delFlag = false
|
|
|
|
|
|
|
|
<if test="orderId != '' and orderId!=null">
|
|
|
|
<if test="orderId != '' and orderId!=null">
|
|
|
|
and orderIdFk <![CDATA[ <> ]]> #{orderId}
|
|
|
|
and orderIdFk <![CDATA[ <> ]]> #{orderId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -122,7 +114,7 @@
|
|
|
|
batchNo,erpCount,credate,nameCode,productCompany,
|
|
|
|
batchNo,erpCount,credate,nameCode,productCompany,
|
|
|
|
coName,authCode,packSpec,packRatio,bhzxxsbzsl,
|
|
|
|
coName,authCode,packSpec,packRatio,bhzxxsbzsl,
|
|
|
|
zxxsbzbhsydysl,orderIdFk,`count`,reCount,productDate,expireDate,bindStatus,bindRlFk,uuidFk,supId,bindSupStatus
|
|
|
|
zxxsbzbhsydysl,orderIdFk,`count`,reCount,productDate,expireDate,bindStatus,bindRlFk,uuidFk,supId,bindSupStatus
|
|
|
|
,ylqxzcrbarmc,secSalesListNo,firstSalesInvNo,secSalesInvNo,invoiceDate,price,delFlag)
|
|
|
|
,ylqxzcrbarmc,secSalesListNo,firstSalesInvNo,secSalesInvNo,invoiceDate,price)
|
|
|
|
values(
|
|
|
|
values(
|
|
|
|
#{id},
|
|
|
|
#{id},
|
|
|
|
#{companyid},
|
|
|
|
#{companyid},
|
|
|
@ -149,8 +141,7 @@
|
|
|
|
#{count},
|
|
|
|
#{count},
|
|
|
|
#{reCount},
|
|
|
|
#{reCount},
|
|
|
|
#{productDate},
|
|
|
|
#{productDate},
|
|
|
|
#{expireDate}
|
|
|
|
#{expireDate},
|
|
|
|
,
|
|
|
|
|
|
|
|
#{bindStatus},
|
|
|
|
#{bindStatus},
|
|
|
|
#{bindRlFk},
|
|
|
|
#{bindRlFk},
|
|
|
|
#{uuidFk},
|
|
|
|
#{uuidFk},
|
|
|
@ -161,8 +152,7 @@
|
|
|
|
#{firstSalesInvNo},
|
|
|
|
#{firstSalesInvNo},
|
|
|
|
#{secSalesInvNo},
|
|
|
|
#{secSalesInvNo},
|
|
|
|
#{invoiceDate},
|
|
|
|
#{invoiceDate},
|
|
|
|
#{price},
|
|
|
|
#{price}
|
|
|
|
#{delFlag}
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
@ -171,7 +161,7 @@
|
|
|
|
companyid,erpOrderId,iodtlId,inoutId,goodsunit,goodsid,batchNoId,goodsname,companyname,
|
|
|
|
companyid,erpOrderId,iodtlId,inoutId,goodsunit,goodsid,batchNoId,goodsname,companyname,
|
|
|
|
batchNo,erpCount,credate,nameCode,productCompany,
|
|
|
|
batchNo,erpCount,credate,nameCode,productCompany,
|
|
|
|
coName,authCode,packSpec,packRatio,bhzxxsbzsl,zxxsbzbhsydysl,orderIdFk,count,reCount,productDate,expireDate
|
|
|
|
coName,authCode,packSpec,packRatio,bhzxxsbzsl,zxxsbzbhsydysl,orderIdFk,count,reCount,productDate,expireDate
|
|
|
|
,bindStatus,bindRlFk,uuidFk,supId,bindSupStatus,ylqxzcrbarmc,secSalesListNo,firstSalesInvNo,secSalesInvNo,invoiceDate,price,delFlag)
|
|
|
|
,bindStatus,bindRlFk,uuidFk,supId,bindSupStatus,ylqxzcrbarmc,secSalesListNo,firstSalesInvNo,secSalesInvNo,invoiceDate,price)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="erpOrderEntities" item="item" index="index"
|
|
|
|
<foreach collection="erpOrderEntities" item="item" index="index"
|
|
|
|
separator=",">
|
|
|
|
separator=",">
|
|
|
@ -198,7 +188,7 @@
|
|
|
|
#{item.secSalesListNo},
|
|
|
|
#{item.secSalesListNo},
|
|
|
|
#{item.firstSalesInvNo},
|
|
|
|
#{item.firstSalesInvNo},
|
|
|
|
#{item.secSalesInvNo},
|
|
|
|
#{item.secSalesInvNo},
|
|
|
|
#{item.invoiceDate},#{item.price}, #{item.delFlag}
|
|
|
|
#{item.invoiceDate},#{item.price}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
|
|
|
@ -226,7 +216,6 @@
|
|
|
|
<if test="invoiceDate != null">invoiceDate=#{invoiceDate},</if>
|
|
|
|
<if test="invoiceDate != null">invoiceDate=#{invoiceDate},</if>
|
|
|
|
<if test="productCompany != null">productCompany=#{productCompany},</if>
|
|
|
|
<if test="productCompany != null">productCompany=#{productCompany},</if>
|
|
|
|
<if test="bindSupStatus != null">bindSupStatus=#{bindSupStatus},</if>
|
|
|
|
<if test="bindSupStatus != null">bindSupStatus=#{bindSupStatus},</if>
|
|
|
|
<if test="delFlag != null">delFlag=#{delFlag},</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
WHERE id = #{id}
|
|
|
|
WHERE id = #{id}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
@ -255,10 +244,23 @@
|
|
|
|
WHERE `id` = #{id}
|
|
|
|
WHERE `id` = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateDelFlag">
|
|
|
|
<select id="selectByNameCodeAndOrderId" resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
update io_order_detail
|
|
|
|
select *
|
|
|
|
set delFlag = #{delFlag}
|
|
|
|
from io_order_detail
|
|
|
|
where orderIdFk = #{orderIdFk}
|
|
|
|
where nameCode = #{nameCode}
|
|
|
|
</update>
|
|
|
|
and orderIdFk = #{orderId}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByOrderIdAndNameCode">
|
|
|
|
|
|
|
|
delete from io_order_detail
|
|
|
|
|
|
|
|
where orderIdFk = #{orderId}
|
|
|
|
|
|
|
|
and nameCode = #{nameCode}
|
|
|
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="countByOrderId" resultType="int">
|
|
|
|
|
|
|
|
select count(*)
|
|
|
|
|
|
|
|
from io_order_detail
|
|
|
|
|
|
|
|
where orderIdFk = #{orderId}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|