You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
225 lines
14 KiB
225 lines
14 KiB
2 years ago
|
<?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.ruoyi.buyorderHead.mapper.BuyorderHeadMapper">
|
||
|
|
||
|
<resultMap type="BuyorderHead" id="BuyorderHeadResult">
|
||
|
<result property="poId" column="PO_ID" />
|
||
|
<result property="poNo" column="PO_NO" />
|
||
|
<result property="pCode" column="P_CODE" />
|
||
|
<result property="pName" column="P_Name" />
|
||
|
<result property="pLinkman" column="P_LinkMan" />
|
||
|
<result property="pTel" column="P_TEL" />
|
||
|
<result property="pFax" column="P_FAX" />
|
||
|
<result property="sendAddress" column="Send_Address" />
|
||
|
<result property="GetMoneyMemo" column="GetMoneyMemo" />
|
||
|
<result property="Sendmemo" column="Sendmemo" />
|
||
|
<result property="Sendway" column="Sendway" />
|
||
|
<result property="poDate" column="PO_date" />
|
||
|
<result property="poClass" column="PO_Class" />
|
||
|
<result property="poMan" column="PO_man" />
|
||
|
<result property="bzMemo" column="BZ_memo" />
|
||
|
<result property="endFlag" column="End_flag" />
|
||
|
<result property="chinaInOrOut" column="China_in_or_out" />
|
||
|
<result property="isDelete" column="Is_delete" />
|
||
|
<result property="TaxPercent" column="TaxPercent" />
|
||
|
<result property="appId" column="APP_ID" />
|
||
|
<result property="comfirmFlag" column="Comfirm_Flag" />
|
||
|
<result property="comfirmMan" column="Comfirm_man" />
|
||
|
<result property="comfirmDate" column="Comfirm_date" />
|
||
|
<result property="auditingFlag" column="Auditing_Flag" />
|
||
|
<result property="auditingMan" column="Auditing_MAN" />
|
||
|
<result property="auditingDate" column="Auditing_DATE" />
|
||
|
<result property="approveFlag" column="Approve_Flag" />
|
||
|
<result property="approveMan" column="Approve_MAN" />
|
||
|
<result property="approveDate" column="Approve_DATE" />
|
||
|
<result property="poPName" column="PO_P_NAME" />
|
||
|
<result property="jaMan" column="JA_MAN" />
|
||
|
<result property="jaTime" column="JA_TIME" />
|
||
|
<result property="applyId" column="Apply_ID" />
|
||
|
<result property="SaleOrderNO" column="SaleOrderNO" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectBuyorderHeadVo">
|
||
|
select PO_ID, PO_NO, P_CODE, P_Name, P_LinkMan, P_TEL, P_FAX, Send_Address, GetMoneyMemo, Sendmemo, Sendway, PO_date, PO_Class, PO_man, BZ_memo, End_flag, China_in_or_out, Is_delete, TaxPercent, APP_ID, Comfirm_Flag, Comfirm_man, Comfirm_date, Auditing_Flag, Auditing_MAN, Auditing_DATE, Approve_Flag, Approve_MAN, Approve_DATE, PO_P_NAME, JA_MAN, JA_TIME, Apply_ID, SaleOrderNO from buyorder_head
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectBuyorderHeadList" parameterType="BuyorderHead" resultMap="BuyorderHeadResult">
|
||
|
<include refid="selectBuyorderHeadVo"/>
|
||
|
<where>
|
||
|
<if test="poId != null and poId != ''"> and PO_ID like concat('%', #{poId}, '%')</if>
|
||
|
<if test="poNo != null and poNo != ''"> and PO_NO like concat('%', #{poNo}, '%')</if>
|
||
|
<if test="pCode != null and pCode != ''"> and P_CODE like concat('%', #{pCode}, '%')</if>
|
||
|
<if test="pName != null and pName != ''"> and P_Name like concat('%', #{pName}, '%')</if>
|
||
|
<if test="pLinkman != null and pLinkman != ''"> and P_LinkMan like concat('%', #{pLinkman}, '%')</if>
|
||
|
<if test="pTel != null and pTel != ''"> and P_TEL like concat('%', #{pTel}, '%')</if>
|
||
|
<if test="pFax != null and pFax != ''"> and P_FAX like concat('%', #{pFax}, '%')</if>
|
||
|
<if test="sendAddress != null and sendAddress != ''"> and Send_Address like concat('%', #{sendAddress}, '%')</if>
|
||
|
<if test="GetMoneyMemo != null and GetMoneyMemo != ''"> and GetMoneyMemo like concat('%', #{GetMoneyMemo}, '%')</if>
|
||
|
<if test="Sendmemo != null and Sendmemo != ''"> and Sendmemo like concat('%', #{Sendmemo}, '%')</if>
|
||
|
<if test="Sendway != null and Sendway != ''"> and Sendway like concat('%', #{Sendway}, '%')</if>
|
||
|
<if test="poClass != null and poClass != ''"> and PO_Class like concat('%', #{poClass}, '%')</if>
|
||
|
<if test="poMan != null and poMan != ''"> and PO_man like concat('%', #{poMan}, '%')</if>
|
||
|
<if test="bzMemo != null and bzMemo != ''"> and BZ_memo like concat('%', #{bzMemo}, '%')</if>
|
||
|
<if test="endFlag != null "> and End_flag = #{endFlag}</if>
|
||
|
<if test="chinaInOrOut != null "> and China_in_or_out like concat('%', #{chinaInOrOut}, '%')</if>
|
||
|
<if test="isDelete != null "> and Is_delete = #{isDelete}</if>
|
||
|
<if test="TaxPercent != null "> and TaxPercent like concat('%', #{TaxPercent}, '%')</if>
|
||
|
<if test="appId != null and appId != ''"> and APP_ID like concat('%', #{appId}, '%')</if>
|
||
|
<if test="comfirmFlag != null "> and Comfirm_Flag = #{comfirmFlag}</if>
|
||
|
<if test="comfirmMan != null and comfirmMan != ''"> and Comfirm_man like concat('%', #{comfirmMan}, '%')</if>
|
||
|
<if test="comfirmDate != null "> and Comfirm_date = #{comfirmDate}</if>
|
||
|
<if test="auditingFlag != null "> and Auditing_Flag = #{auditingFlag}</if>
|
||
|
<if test="auditingMan != null and auditingMan != ''"> and Auditing_MAN = #{auditingMan}</if>
|
||
|
<if test="auditingDate != null "> and Auditing_DATE = #{auditingDate}</if>
|
||
|
<if test="approveFlag != null "> and Approve_Flag = #{approveFlag}</if>
|
||
|
<if test="approveMan != null and approveMan != ''"> and Approve_MAN = #{approveMan}</if>
|
||
|
<if test="approveDate != null "> and Approve_DATE = #{approveDate}</if>
|
||
|
<if test="poPName != null and poPName != ''"> and PO_P_NAME like concat('%', #{poPName}, '%')</if>
|
||
|
<if test="jaMan != null and jaMan != ''"> and JA_MAN = #{jaMan}</if>
|
||
|
<if test="jaTime != null and jaTime != ''"> and JA_TIME = #{jaTime}</if>
|
||
|
<if test="applyId != null and applyId != ''"> and Apply_ID = #{applyId}</if>
|
||
|
<if test="SaleOrderNO != null and SaleOrderNO != ''"> and SaleOrderNO = #{SaleOrderNO}</if>
|
||
|
<if test="params.beginPoDate != null and params.beginPoDate !=''"> and PO_date >= #{params.beginPoDate}</if>
|
||
|
<if test="params.endPoDate != null and params.endPoDate != ''">and #{params.endPoDate} >= PO_date</if>
|
||
|
</where>
|
||
|
order by PO_date desc
|
||
|
</select>
|
||
|
|
||
|
<select id="selectBuyorderHeadById" parameterType="String" resultMap="BuyorderHeadResult">
|
||
|
<include refid="selectBuyorderHeadVo"/>
|
||
|
where PO_ID = #{poId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertBuyorderHead" parameterType="BuyorderHead">
|
||
|
insert into buyorder_head
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="poId != null">PO_ID,</if>
|
||
|
<if test="poNo != null">PO_NO,</if>
|
||
|
<if test="pCode != null">P_CODE,</if>
|
||
|
<if test="pName != null">P_Name,</if>
|
||
|
<if test="pLinkman != null">P_LinkMan,</if>
|
||
|
<if test="pTel != null">P_TEL,</if>
|
||
|
<if test="pFax != null">P_FAX,</if>
|
||
|
<if test="sendAddress != null">Send_Address,</if>
|
||
|
<if test="GetMoneyMemo != null">GetMoneyMemo,</if>
|
||
|
<if test="Sendmemo != null">Sendmemo,</if>
|
||
|
<if test="Sendway != null">Sendway,</if>
|
||
|
<if test="poDate != null">PO_date,</if>
|
||
|
<if test="poClass != null">PO_Class,</if>
|
||
|
<if test="poMan != null">PO_man,</if>
|
||
|
<if test="bzMemo != null">BZ_memo,</if>
|
||
|
<if test="endFlag != null">End_flag,</if>
|
||
|
<if test="chinaInOrOut != null">China_in_or_out,</if>
|
||
|
<if test="isDelete != null">Is_delete,</if>
|
||
|
<if test="TaxPercent != null">TaxPercent,</if>
|
||
|
<if test="appId != null">APP_ID,</if>
|
||
|
<if test="comfirmFlag != null">Comfirm_Flag,</if>
|
||
|
<if test="comfirmMan != null">Comfirm_man,</if>
|
||
|
<if test="comfirmDate != null">Comfirm_date,</if>
|
||
|
<if test="auditingFlag != null">Auditing_Flag,</if>
|
||
|
<if test="auditingMan != null">Auditing_MAN,</if>
|
||
|
<if test="auditingDate != null">Auditing_DATE,</if>
|
||
|
<if test="approveFlag != null">Approve_Flag,</if>
|
||
|
<if test="approveMan != null">Approve_MAN,</if>
|
||
|
<if test="approveDate != null">Approve_DATE,</if>
|
||
|
<if test="poPName != null">PO_P_NAME,</if>
|
||
|
<if test="jaMan != null">JA_MAN,</if>
|
||
|
<if test="jaTime != null">JA_TIME,</if>
|
||
|
<if test="applyId != null">Apply_ID,</if>
|
||
|
<if test="SaleOrderNO != null">SaleOrderNO,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="poId != null">#{poId},</if>
|
||
|
<if test="poNo != null">#{poNo},</if>
|
||
|
<if test="pCode != null">#{pCode},</if>
|
||
|
<if test="pName != null">#{pName},</if>
|
||
|
<if test="pLinkman != null">#{pLinkman},</if>
|
||
|
<if test="pTel != null">#{pTel},</if>
|
||
|
<if test="pFax != null">#{pFax},</if>
|
||
|
<if test="sendAddress != null">#{sendAddress},</if>
|
||
|
<if test="GetMoneyMemo != null">#{GetMoneyMemo},</if>
|
||
|
<if test="Sendmemo != null">#{Sendmemo},</if>
|
||
|
<if test="Sendway != null">#{Sendway},</if>
|
||
|
<if test="poDate != null">#{poDate},</if>
|
||
|
<if test="poClass != null">#{poClass},</if>
|
||
|
<if test="poMan != null">#{poMan},</if>
|
||
|
<if test="bzMemo != null">#{bzMemo},</if>
|
||
|
<if test="endFlag != null">#{endFlag},</if>
|
||
|
<if test="chinaInOrOut != null">#{chinaInOrOut},</if>
|
||
|
<if test="isDelete != null">#{isDelete},</if>
|
||
|
<if test="TaxPercent != null">#{TaxPercent},</if>
|
||
|
<if test="appId != null">#{appId},</if>
|
||
|
<if test="comfirmFlag != null">#{comfirmFlag},</if>
|
||
|
<if test="comfirmMan != null">#{comfirmMan},</if>
|
||
|
<if test="comfirmDate != null">#{comfirmDate},</if>
|
||
|
<if test="auditingFlag != null">#{auditingFlag},</if>
|
||
|
<if test="auditingMan != null">#{auditingMan},</if>
|
||
|
<if test="auditingDate != null">#{auditingDate},</if>
|
||
|
<if test="approveFlag != null">#{approveFlag},</if>
|
||
|
<if test="approveMan != null">#{approveMan},</if>
|
||
|
<if test="approveDate != null">#{approveDate},</if>
|
||
|
<if test="poPName != null">#{poPName},</if>
|
||
|
<if test="jaMan != null">#{jaMan},</if>
|
||
|
<if test="jaTime != null">#{jaTime},</if>
|
||
|
<if test="applyId != null">#{applyId},</if>
|
||
|
<if test="SaleOrderNO != null">#{SaleOrderNO},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateBuyorderHead" parameterType="BuyorderHead">
|
||
|
update buyorder_head
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="poNo != null">PO_NO = #{poNo},</if>
|
||
|
<if test="pCode != null">P_CODE = #{pCode},</if>
|
||
|
<if test="pName != null">P_Name = #{pName},</if>
|
||
|
<if test="pLinkman != null">P_LinkMan = #{pLinkman},</if>
|
||
|
<if test="pTel != null">P_TEL = #{pTel},</if>
|
||
|
<if test="pFax != null">P_FAX = #{pFax},</if>
|
||
|
<if test="sendAddress != null">Send_Address = #{sendAddress},</if>
|
||
|
<if test="GetMoneyMemo != null">GetMoneyMemo = #{GetMoneyMemo},</if>
|
||
|
<if test="Sendmemo != null">Sendmemo = #{Sendmemo},</if>
|
||
|
<if test="Sendway != null">Sendway = #{Sendway},</if>
|
||
|
<if test="poDate != null">PO_date = #{poDate},</if>
|
||
|
<if test="poClass != null">PO_Class = #{poClass},</if>
|
||
|
<if test="poMan != null">PO_man = #{poMan},</if>
|
||
|
<if test="bzMemo != null">BZ_memo = #{bzMemo},</if>
|
||
|
<if test="endFlag != null">End_flag = #{endFlag},</if>
|
||
|
<if test="chinaInOrOut != null">China_in_or_out = #{chinaInOrOut},</if>
|
||
|
<if test="isDelete != null">Is_delete = #{isDelete},</if>
|
||
|
<if test="TaxPercent != null">TaxPercent = #{TaxPercent},</if>
|
||
|
<if test="appId != null">APP_ID = #{appId},</if>
|
||
|
<if test="comfirmFlag != null">Comfirm_Flag = #{comfirmFlag},</if>
|
||
|
<if test="comfirmMan != null">Comfirm_man = #{comfirmMan},</if>
|
||
|
<if test="comfirmDate != null">Comfirm_date = #{comfirmDate},</if>
|
||
|
<if test="auditingFlag != null">Auditing_Flag = #{auditingFlag},</if>
|
||
|
<if test="auditingMan != null">Auditing_MAN = #{auditingMan},</if>
|
||
|
<if test="auditingDate != null">Auditing_DATE = #{auditingDate},</if>
|
||
|
<if test="approveFlag != null">Approve_Flag = #{approveFlag},</if>
|
||
|
<if test="approveMan != null">Approve_MAN = #{approveMan},</if>
|
||
|
<if test="approveDate != null">Approve_DATE = #{approveDate},</if>
|
||
|
<if test="poPName != null">PO_P_NAME = #{poPName},</if>
|
||
|
<if test="jaMan != null">JA_MAN = #{jaMan},</if>
|
||
|
<if test="jaTime != null">JA_TIME = #{jaTime},</if>
|
||
|
<if test="applyId != null">Apply_ID = #{applyId},</if>
|
||
|
<if test="SaleOrderNO != null">SaleOrderNO = #{SaleOrderNO},</if>
|
||
|
</trim>
|
||
|
where PO_ID = #{poId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteBuyorderHeadById" parameterType="String">
|
||
|
delete from buyorder_head where PO_ID = #{poId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteBuyorderHeadByIds" parameterType="String">
|
||
|
delete from buyorder_head where PO_ID in
|
||
|
<foreach item="poId" collection="array" open="(" separator="," close=")">
|
||
|
#{poId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
<select id="selectCountByDay" resultType="Integer">
|
||
|
select count(*) from buyorder_head where to_days(PO_Date) = to_days(now());
|
||
|
</select>
|
||
|
</mapper>
|