You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
181 lines
6.4 KiB
XML
181 lines
6.4 KiB
XML
<?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.glxp.sale.admin.dao.inout.MyErpOrderDao">
|
|
|
|
<select id="filterMyErpOrder" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
select * from erporder
|
|
<where>
|
|
<if test="docid != '' and docid!=null">
|
|
and docid = #{docid}
|
|
</if>
|
|
<if test="goodsname != '' and goodsname!=null">
|
|
and GOODSNAME = #{goodsname}
|
|
</if>
|
|
<if test="orderId != '' and orderId!=null">
|
|
and orderIdFk = #{orderId}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="findByStockCheck" parameterType="java.util.List"
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
select * from erporder where orderIdFk in
|
|
<foreach item="item" index="index" collection="orderids" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</select>
|
|
|
|
<select id="filterMyErpMainOrder" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
select * from erporder
|
|
<where>
|
|
<if test="docid != '' and docid!=null">
|
|
and docid = #{docid}
|
|
</if>
|
|
<if test="goodsname != '' and goodsname!=null">
|
|
and GOODSNAME = #{goodsname}
|
|
</if>
|
|
</where>
|
|
group by orderIdFk,docid
|
|
</select>
|
|
|
|
|
|
<select id="filterMyErpDetailOrder" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
select * from erporder
|
|
<where>
|
|
<if test="docid != '' and docid!=null">
|
|
and docid = #{docid}
|
|
</if>
|
|
<if test="goodsname != '' and goodsname!=null">
|
|
and GOODSNAME = #{goodsname}
|
|
</if>
|
|
<if test="orderIdFk != '' and orderIdFk!=null">
|
|
and orderIdFk = #{orderIdFk}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
|
|
<select id="findAllByDocids" parameterType="java.util.List"
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
|
|
select * from erporder where docid in
|
|
<foreach item="item" index="index" collection="docids" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
|
|
</select>
|
|
<select id="selectAllIds" parameterType="java.util.List"
|
|
resultType="java.lang.String">
|
|
select docid from erporder where
|
|
docid in (
|
|
<foreach collection="docids" item="item" index="index"
|
|
separator=",">
|
|
#{item}
|
|
</foreach>
|
|
)
|
|
GROUP BY docid
|
|
</select>
|
|
|
|
<select id="filterAllDocid" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
resultType="java.lang.String">
|
|
select docid from erporder
|
|
<where>
|
|
<if test="orderId != '' and orderId!=null">
|
|
and orderIdFk = #{orderId}
|
|
</if>
|
|
</where>
|
|
group by docid
|
|
</select>
|
|
<!-- and dtlgoodsqty=count-->
|
|
<select id="filterAllDocidE" parameterType="com.glxp.sale.admin.entity.inout.FilterErpOrderRequest"
|
|
resultType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
select docid,orderIdFk from erporder
|
|
<where>
|
|
|
|
<if test="orderId != '' and orderId!=null">
|
|
and orderIdFk <![CDATA[ <> ]]> #{orderId}
|
|
</if>
|
|
|
|
</where>
|
|
group by docid
|
|
</select>
|
|
|
|
<insert id="insertErpOrder" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
replace INTO erporder(id,
|
|
companyid,docid,iodtlid,inoutid,goodsunit,goodsid,lotid,goodsname,companyname,
|
|
lotno,dtlgoodsqty,credate,nameCode,productCompany,
|
|
coName,authCode,packSpec,packRatio,bhzxxsbzsl,zxxsbzbhsydysl,orderIdFk,count,reCount,warehouseCode)
|
|
values(
|
|
#{id},
|
|
#{companyid},
|
|
#{docid},
|
|
#{iodtlid},
|
|
#{inoutid},
|
|
#{goodsunit},
|
|
#{goodsid},
|
|
#{lotid},
|
|
#{goodsname},
|
|
#{companyname},
|
|
#{lotno},
|
|
#{dtlgoodsqty},
|
|
#{credate},
|
|
#{nameCode},#{productCompany},#{coName},#{authCode},#{packSpec},#{packRatio},
|
|
#{bhzxxsbzsl},#{zxxsbzbhsydysl},#{orderIdFk},#{count},#{reCount},#{warehouseCode}
|
|
)
|
|
</insert>
|
|
|
|
<insert id="insertErpOrders" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
replace INTO erporder(id,
|
|
companyid,docid,iodtlid,inoutid,goodsunit,goodsid,lotid,goodsname,companyname,
|
|
lotno,dtlgoodsqty,credate,nameCode,productCompany,
|
|
coName,authCode,packSpec,packRatio,bhzxxsbzsl,zxxsbzbhsydysl,orderIdFk,count,reCount,warehouseCode)
|
|
values
|
|
<foreach collection="erpOrderEntities" item="item" index="index"
|
|
separator=",">
|
|
|
|
(
|
|
#{item.id},
|
|
#{item.companyid},
|
|
#{item.docid},
|
|
#{item.iodtlid},
|
|
#{item.inoutid},
|
|
#{item.goodsunit},
|
|
#{item.goodsid},
|
|
#{item.lotid},
|
|
#{item.goodsname},
|
|
#{item.companyname},
|
|
#{item.lotno},
|
|
#{item.dtlgoodsqty}, #{item.credate},
|
|
#{item.nameCode}, #{item.productCompany}, #{item.coName}, #{item.authCode}, #{item.packSpec},
|
|
#{item.packRatio}, #{item.bhzxxsbzsl},
|
|
#{item.zxxsbzbhsydysl}, #{item.orderIdFk}, #{item.count},#{item.reCount},#{item.warehouseCode})
|
|
</foreach>
|
|
|
|
</insert>
|
|
<update id="updateErpOrder" parameterType="com.glxp.sale.admin.entity.inout.ErpOrderEntity">
|
|
UPDATE erporder
|
|
<set>
|
|
<if test="count != null">count=#{count},</if>
|
|
<if test="reCount != null">reCount=#{reCount},</if>
|
|
</set>
|
|
WHERE id = #{id}
|
|
</update>
|
|
<delete id="deleteById" parameterType="Map">
|
|
DELETE FROM erporder WHERE docid = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteByPrimiyId" parameterType="Map">
|
|
DELETE FROM erporder WHERE id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteByOrderId" parameterType="Map">
|
|
DELETE FROM erporder WHERE orderIdFk = #{id}
|
|
</delete>
|
|
|
|
|
|
</mapper> |