万材erp项目
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.
 
 
 
 

335 lines
21 KiB

<?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.finance.mapper.CustomerMapper">
<resultMap type="Customer" id="CustomerResult">
<result property="pCode" column="P_Code" />
<result property="pName" column="P_Name" />
<result property="pEnName" column="P_EN_NAME" />
<result property="pAddress" column="P_Address" />
<result property="pPost" column="P_Post" />
<result property="pCountry" column="P_Country" />
<result property="pCeo" column="P_CEO" />
<result property="pLinkman" column="P_LinkMan" />
<result property="pTel" column="P_TEL" />
<result property="pFax" column="P_FAX" />
<result property="pEmail" column="P_EMAIL" />
<result property="pHttp" column="P_HTTP" />
<result property="pCiqCode" column="P_CIQ_CODE" />
<result property="pComCode" column="P_COM_CODE" />
<result property="pHyCode" column="P_HY_CODE" />
<result property="pType" column="P_TYPE" />
<result property="pCreatDate" column="P_Creat_Date" />
<result property="pJhbank" column="P_JHbank" />
<result property="pJhbankCode" column="P_JHbank_code" />
<result property="pBank" column="P_bank" />
<result property="pBankCode" column="P_bank_code" />
<result property="pRmbMoney" column="P_RMB_MONEY" />
<result property="pWbType" column="P_WB_TYPE" />
<result property="pWbMoney" column="P_WB_MONEY" />
<result property="memoText" column="memo_text" />
<result property="moral" column="moral" />
<result property="comfirmFlag" column="comfirm_flag" />
<result property="comfirmMan" column="comfirm_man" />
<result property="comfirmDate" column="comfirm_DATE" />
<result property="writeMan" column="write_man" />
<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="writeDate" column="write_date" />
<result property="memotext" column="memotext" />
<result property="creditAmt" column="Credit_Amt" />
<result property="PID" column="PID" />
<result property="NWX" column="NWX" />
<result property="ordernoLen" column="OrderNO_Len" />
<result property="sendcpReportname" column="SendCP_ReportName" />
<result property="saler" column="saler" />
<result property="dWaterNo" column="d_water_no" />
<result property="sWaterName" column="S_Water_Name" />
<result property="sWaterNo" column="S_Water_NO" />
<result property="comCode" column="Com_Code" />
<result property="crlName" column="Crl_Name" />
<result property="pCountryCode" column="P_Country_Code" />
<result property="CID" column="CID" />
<result property="senduseConfirm" column="SendUse_Confirm" />
<result property="taxPercent" column="TAX_Percent" />
<result property="senddw" column="senddw" />
<result property="taxFlag" column="tax_flag" />
</resultMap>
<sql id="selectCustomerVo">
select P_Code, P_Name, P_EN_NAME, P_Address, P_Post, P_Country, P_CEO, P_LinkMan, P_TEL, P_FAX, P_EMAIL, P_HTTP, P_CIQ_CODE, P_COM_CODE, P_HY_CODE, P_TYPE, P_Creat_Date, P_JHbank, P_JHbank_code, P_bank, P_bank_code, P_RMB_MONEY, P_WB_TYPE, P_WB_MONEY, memo_text, moral, comfirm_flag, comfirm_man, comfirm_DATE, write_man, Auditing_Flag, Auditing_man, Auditing_Date, Approve_flag, Approve_man, Approve_date, write_date, memotext, Credit_Amt, PID, NWX, OrderNO_Len, SendCP_ReportName, saler, d_water_no, S_Water_Name, S_Water_NO, Com_Code, Crl_Name, P_Country_Code, CID, SendUse_Confirm, TAX_Percent, senddw, tax_flag from customer
</sql>
<select id="selectCustomerList" parameterType="Customer" resultMap="CustomerResult">
<include refid="selectCustomerVo"/>
<where>
<if test="pCode != null and pCode != ''"> and P_Code = #{pCode}</if>
<if test="pName != null and pName != ''"> and P_Name like concat('%', #{pName}, '%')</if>
<if test="pEnName != null and pEnName != ''"> and P_EN_NAME like concat('%', #{pEnName}, '%')</if>
<if test="pAddress != null and pAddress != ''"> and P_Address = #{pAddress}</if>
<if test="pPost != null and pPost != ''"> and P_Post = #{pPost}</if>
<if test="pCountry != null and pCountry != ''"> and P_Country = #{pCountry}</if>
<if test="pCeo != null and pCeo != ''"> and P_CEO = #{pCeo}</if>
<if test="pLinkman != null and pLinkman != ''"> and P_LinkMan = #{pLinkman}</if>
<if test="pTel != null and pTel != ''"> and P_TEL = #{pTel}</if>
<if test="pFax != null and pFax != ''"> and P_FAX = #{pFax}</if>
<if test="pEmail != null and pEmail != ''"> and P_EMAIL = #{pEmail}</if>
<if test="pHttp != null and pHttp != ''"> and P_HTTP = #{pHttp}</if>
<if test="pCiqCode != null and pCiqCode != ''"> and P_CIQ_CODE = #{pCiqCode}</if>
<if test="pComCode != null and pComCode != ''"> and P_COM_CODE = #{pComCode}</if>
<if test="pHyCode != null and pHyCode != ''"> and P_HY_CODE = #{pHyCode}</if>
<if test="pType != null and pType != ''"> and P_TYPE = #{pType}</if>
<if test="pCreatDate != null "> and P_Creat_Date = #{pCreatDate}</if>
<if test="pJhbank != null and pJhbank != ''"> and P_JHbank = #{pJhbank}</if>
<if test="pJhbankCode != null and pJhbankCode != ''"> and P_JHbank_code = #{pJhbankCode}</if>
<if test="pBank != null and pBank != ''"> and P_bank = #{pBank}</if>
<if test="pBankCode != null and pBankCode != ''"> and P_bank_code = #{pBankCode}</if>
<if test="pRmbMoney != null "> and P_RMB_MONEY = #{pRmbMoney}</if>
<if test="pWbType != null and pWbType != ''"> and P_WB_TYPE = #{pWbType}</if>
<if test="pWbMoney != null "> and P_WB_MONEY = #{pWbMoney}</if>
<if test="memoText != null and memoText != ''"> and memo_text = #{memoText}</if>
<if test="moral != null and moral != ''"> and moral = #{moral}</if>
<if test="comfirmFlag != null "> and comfirm_flag = #{comfirmFlag}</if>
<if test="comfirmMan != null and comfirmMan != ''"> and comfirm_man = #{comfirmMan}</if>
<if test="comfirmDate != null "> and comfirm_DATE = #{comfirmDate}</if>
<if test="writeMan != null and writeMan != ''"> and write_man = #{writeMan}</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="writeDate != null "> and write_date = #{writeDate}</if>
<if test="memotext != null and memotext != ''"> and memotext = #{memotext}</if>
<if test="creditAmt != null "> and Credit_Amt = #{creditAmt}</if>
<if test="PID != null and PID != ''"> and PID = #{PID}</if>
<if test="NWX != null and NWX != ''"> and NWX = #{NWX}</if>
<if test="ordernoLen != null "> and OrderNO_Len = #{ordernoLen}</if>
<if test="sendcpReportname != null and sendcpReportname != ''"> and SendCP_ReportName like concat('%', #{sendcpReportname}, '%')</if>
<if test="saler != null and saler != ''"> and saler = #{saler}</if>
<if test="dWaterNo != null and dWaterNo != ''"> and d_water_no = #{dWaterNo}</if>
<if test="sWaterName != null and sWaterName != ''"> and S_Water_Name like concat('%', #{sWaterName}, '%')</if>
<if test="sWaterNo != null and sWaterNo != ''"> and S_Water_NO = #{sWaterNo}</if>
<if test="comCode != null and comCode != ''"> and Com_Code = #{comCode}</if>
<if test="crlName != null and crlName != ''"> and Crl_Name like concat('%', #{crlName}, '%')</if>
<if test="pCountryCode != null and pCountryCode != ''"> and P_Country_Code = #{pCountryCode}</if>
<if test="CID != null and CID != ''"> and CID = #{CID}</if>
<if test="senduseConfirm != null and senduseConfirm != ''"> and SendUse_Confirm = #{senduseConfirm}</if>
<if test="taxPercent != null "> and TAX_Percent = #{taxPercent}</if>
<if test="senddw != null and senddw != ''"> and senddw = #{senddw}</if>
<if test="taxFlag != null "> and tax_flag = #{taxFlag}</if>
</where>
</select>
<select id="selectCustomerById" parameterType="String" resultMap="CustomerResult">
<include refid="selectCustomerVo"/>
where P_Code = #{pCode}
</select>
<select id="selectNnm" resultType="java.lang.Integer" >
select count(*) num from customer
</select>
<insert id="insertCustomer" parameterType="Customer">
insert into customer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pCode != null and pCode != ''">P_Code,</if>
<if test="pName != null and pName != ''">P_Name,</if>
<if test="pEnName != null">P_EN_NAME,</if>
<if test="pAddress != null">P_Address,</if>
<if test="pPost != null">P_Post,</if>
<if test="pCountry != null">P_Country,</if>
<if test="pCeo != null">P_CEO,</if>
<if test="pLinkman != null">P_LinkMan,</if>
<if test="pTel != null">P_TEL,</if>
<if test="pFax != null">P_FAX,</if>
<if test="pEmail != null">P_EMAIL,</if>
<if test="pHttp != null">P_HTTP,</if>
<if test="pCiqCode != null">P_CIQ_CODE,</if>
<if test="pComCode != null">P_COM_CODE,</if>
<if test="pHyCode != null">P_HY_CODE,</if>
<if test="pType != null">P_TYPE,</if>
<if test="pCreatDate != null">P_Creat_Date,</if>
<if test="pJhbank != null">P_JHbank,</if>
<if test="pJhbankCode != null">P_JHbank_code,</if>
<if test="pBank != null">P_bank,</if>
<if test="pBankCode != null">P_bank_code,</if>
<if test="pRmbMoney != null">P_RMB_MONEY,</if>
<if test="pWbType != null">P_WB_TYPE,</if>
<if test="pWbMoney != null">P_WB_MONEY,</if>
<if test="memoText != null">memo_text,</if>
<if test="moral != null">moral,</if>
<if test="comfirmFlag != null">comfirm_flag,</if>
<if test="comfirmMan != null">comfirm_man,</if>
<if test="comfirmDate != null">comfirm_DATE,</if>
<if test="writeMan != null">write_man,</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="writeDate != null">write_date,</if>
<if test="memotext != null">memotext,</if>
<if test="creditAmt != null">Credit_Amt,</if>
<if test="PID != null">PID,</if>
<if test="NWX != null">NWX,</if>
<if test="ordernoLen != null">OrderNO_Len,</if>
<if test="sendcpReportname != null">SendCP_ReportName,</if>
<if test="saler != null">saler,</if>
<if test="dWaterNo != null">d_water_no,</if>
<if test="sWaterName != null">S_Water_Name,</if>
<if test="sWaterNo != null">S_Water_NO,</if>
<if test="comCode != null">Com_Code,</if>
<if test="crlName != null">Crl_Name,</if>
<if test="pCountryCode != null">P_Country_Code,</if>
<if test="CID != null">CID,</if>
<if test="senduseConfirm != null">SendUse_Confirm,</if>
<if test="taxPercent != null">TAX_Percent,</if>
<if test="senddw != null">senddw,</if>
<if test="taxFlag != null">tax_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pCode != null and pCode != ''">#{pCode},</if>
<if test="pName != null and pName != ''">#{pName},</if>
<if test="pEnName != null">#{pEnName},</if>
<if test="pAddress != null">#{pAddress},</if>
<if test="pPost != null">#{pPost},</if>
<if test="pCountry != null">#{pCountry},</if>
<if test="pCeo != null">#{pCeo},</if>
<if test="pLinkman != null">#{pLinkman},</if>
<if test="pTel != null">#{pTel},</if>
<if test="pFax != null">#{pFax},</if>
<if test="pEmail != null">#{pEmail},</if>
<if test="pHttp != null">#{pHttp},</if>
<if test="pCiqCode != null">#{pCiqCode},</if>
<if test="pComCode != null">#{pComCode},</if>
<if test="pHyCode != null">#{pHyCode},</if>
<if test="pType != null">#{pType},</if>
<if test="pCreatDate != null">#{pCreatDate},</if>
<if test="pJhbank != null">#{pJhbank},</if>
<if test="pJhbankCode != null">#{pJhbankCode},</if>
<if test="pBank != null">#{pBank},</if>
<if test="pBankCode != null">#{pBankCode},</if>
<if test="pRmbMoney != null">#{pRmbMoney},</if>
<if test="pWbType != null">#{pWbType},</if>
<if test="pWbMoney != null">#{pWbMoney},</if>
<if test="memoText != null">#{memoText},</if>
<if test="moral != null">#{moral},</if>
<if test="comfirmFlag != null">#{comfirmFlag},</if>
<if test="comfirmMan != null">#{comfirmMan},</if>
<if test="comfirmDate != null">#{comfirmDate},</if>
<if test="writeMan != null">#{writeMan},</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="writeDate != null">#{writeDate},</if>
<if test="memotext != null">#{memotext},</if>
<if test="creditAmt != null">#{creditAmt},</if>
<if test="PID != null">#{PID},</if>
<if test="NWX != null">#{NWX},</if>
<if test="ordernoLen != null">#{ordernoLen},</if>
<if test="sendcpReportname != null">#{sendcpReportname},</if>
<if test="saler != null">#{saler},</if>
<if test="dWaterNo != null">#{dWaterNo},</if>
<if test="sWaterName != null">#{sWaterName},</if>
<if test="sWaterNo != null">#{sWaterNo},</if>
<if test="comCode != null">#{comCode},</if>
<if test="crlName != null">#{crlName},</if>
<if test="pCountryCode != null">#{pCountryCode},</if>
<if test="CID != null">#{CID},</if>
<if test="senduseConfirm != null">#{senduseConfirm},</if>
<if test="taxPercent != null">#{taxPercent},</if>
<if test="senddw != null">#{senddw},</if>
<if test="taxFlag != null">#{taxFlag},</if>
</trim>
</insert>
<update id="updateCustomer" parameterType="Customer">
update customer
<trim prefix="SET" suffixOverrides=",">
<if test="pName != null and pName != ''">P_Name = #{pName},</if>
<if test="pEnName != null">P_EN_NAME = #{pEnName},</if>
<if test="pAddress != null">P_Address = #{pAddress},</if>
<if test="pPost != null">P_Post = #{pPost},</if>
<if test="pCountry != null">P_Country = #{pCountry},</if>
<if test="pCeo != null">P_CEO = #{pCeo},</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="pEmail != null">P_EMAIL = #{pEmail},</if>
<if test="pHttp != null">P_HTTP = #{pHttp},</if>
<if test="pCiqCode != null">P_CIQ_CODE = #{pCiqCode},</if>
<if test="pComCode != null">P_COM_CODE = #{pComCode},</if>
<if test="pHyCode != null">P_HY_CODE = #{pHyCode},</if>
<if test="pType != null">P_TYPE = #{pType},</if>
<if test="pCreatDate != null">P_Creat_Date = #{pCreatDate},</if>
<if test="pJhbank != null">P_JHbank = #{pJhbank},</if>
<if test="pJhbankCode != null">P_JHbank_code = #{pJhbankCode},</if>
<if test="pBank != null">P_bank = #{pBank},</if>
<if test="pBankCode != null">P_bank_code = #{pBankCode},</if>
<if test="pRmbMoney != null">P_RMB_MONEY = #{pRmbMoney},</if>
<if test="pWbType != null">P_WB_TYPE = #{pWbType},</if>
<if test="pWbMoney != null">P_WB_MONEY = #{pWbMoney},</if>
<if test="memoText != null">memo_text = #{memoText},</if>
<if test="moral != null">moral = #{moral},</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="writeMan != null">write_man = #{writeMan},</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="writeDate != null">write_date = #{writeDate},</if>
<if test="memotext != null">memotext = #{memotext},</if>
<if test="creditAmt != null">Credit_Amt = #{creditAmt},</if>
<if test="PID != null">PID = #{PID},</if>
<if test="NWX != null">NWX = #{NWX},</if>
<if test="ordernoLen != null">OrderNO_Len = #{ordernoLen},</if>
<if test="sendcpReportname != null">SendCP_ReportName = #{sendcpReportname},</if>
<if test="saler != null">saler = #{saler},</if>
<if test="dWaterNo != null">d_water_no = #{dWaterNo},</if>
<if test="sWaterName != null">S_Water_Name = #{sWaterName},</if>
<if test="sWaterNo != null">S_Water_NO = #{sWaterNo},</if>
<if test="comCode != null">Com_Code = #{comCode},</if>
<if test="crlName != null">Crl_Name = #{crlName},</if>
<if test="pCountryCode != null">P_Country_Code = #{pCountryCode},</if>
<if test="CID != null">CID = #{CID},</if>
<if test="senduseConfirm != null">SendUse_Confirm = #{senduseConfirm},</if>
<if test="taxPercent != null">TAX_Percent = #{taxPercent},</if>
<if test="senddw != null">senddw = #{senddw},</if>
<if test="taxFlag != null">tax_flag = #{taxFlag},</if>
</trim>
where P_Code = #{pCode}
</update>
<update id="customerComfirm" parameterType="com.ruoyi.finance.domain.productpriceCAA">
UPDATE customer SET comfirm_flag = '1',comfirm_man = #{Name},comfirm_DATE = #{Date} WHERE P_Code = #{Id}
</update>
<delete id="deleteCustomerById" parameterType="String">
delete from customer where P_Code = #{pCode}
</delete>
<delete id="deleteCustomerByIds" parameterType="String">
delete from customer where P_Code in
<foreach item="pCode" collection="array" open="(" separator="," close=")">
#{pCode}
</foreach>
</delete>
<select id="selectNameAndCode" resultMap="CustomerResult" resultType="Customer">select P_Name,P_Code from customer </select>
</mapper>