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.

88 lines
2.5 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.udi.admin.dao.inout.ManuorderDao">
<insert id="insertManuorder" parameterType="java.util.List">
replace INTO mips_manu_order
(
OrderNo,
BatchNo,
OrderQty,
BeginTime,
EndTime,
DrugProductionDate,
DrugShelfLifeToDate,
DrugShelfLifeToDateMode,
CloseFlag,
CreateTime,
LastModifyTime,
Comments,
CodeLevel1Qty,
CodeLevel2Qty,
CodeLevel3Qty,
CodeLevel4Qty
)
VALUES
<foreach collection="manuorders" item="item" index="index"
separator=",">
(
#{item.OrderNo},
#{item.BatchNo},
#{item.OrderQty},
#{item.BeginTime},
#{item.EndTime},
#{item.DrugProductionDate},
#{item.DrugShelfLifeToDate},
#{item.DrugShelfLifeToDateMode},
#{item.CloseFlag},
#{item.CreateTime},
#{item.LastModifyTime},
#{item.Comments},
#{item.CodeLevel1Qty},
#{item.CodeLevel2Qty},
#{item.CodeLevel3Qty},
#{item.CodeLevel4Qty})
</foreach>
</insert>
<delete id="deleteAll">
delete from mips_manu_order;
</delete>
<delete id="deleteById" parameterType="Map">
DELETE FROM mips_manu_order WHERE id = #{id}
</delete>
<select id="filterList" parameterType="com.glxp.udi.admin.req.receipt.ProductFilterRequest"
resultType="com.glxp.udi.admin.entity.receipt.ManuOrderEntity">
SELECT * FROM mips_manu_order
<where>
<if test="BatchNo != ''">
AND BatchNo = #{BatchNo}
</if>
<if test="startTime!=null and startTime!=''">
<![CDATA[ and DATE_FORMAT(BeginTime, '%Y-%m-%d')>= DATE_FORMAT(#{startTime}, '%Y-%m-%d') ]]>
</if>
<if test="endTime!=null and endTime!=''">
<![CDATA[ and DATE_FORMAT(EndTime, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d') ]]>
</if>
</where>
</select>
<select id="isExit" parameterType="Map" resultType="java.lang.String">
SELECT 1
FROM mips_manu_order WHERE (
OrderNo = #{OrderNo} ) limit 1
</select>
</mapper>