123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?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.bz.smart_city.dao.pay.PayInvoicePrintMapper">
- <insert id="insert" parameterType="com.bz.smart_city.entity.pay.PayInvoiceprinted" useGeneratedKeys="true" keyProperty="id">
- INSERT INTO pay_invoice_printed(
- print_no,
- old_invoice_code,
- old_invoice_no,
- payseriesno,
- account_id,
- total_print_amount,
- total_amount,
- invoice_amount,
- invoice_code,
- invoice_no,
- ciphertext,
- check_code,
- print_date,
- state,
- invoice_type,
- type,
- create_by,
- create_date,
- update_by,
- update_date,
- remarks,
- del_flag,
- message,
- order_no,
- pdf_url,
- jpg_url,
- buyername,
- taxnum,
- canceltime,
- invoice_line,
- fpqqlsh,
- sendtype,
- site_id,
- customer_id,
- usercode,
- cancelinvoice_id,
- saleidentity
- ) VALUES (
- #{printNo},
- #{oldInvoiceCode},
- #{oldInvoiceNo},
- #{payseriesno},
- #{accountId},
- #{totalPrintAmount},
- #{totalAmount},
- #{invoiceAmount},
- #{invoiceCode},
- #{invoiceNo},
- #{ciphertext},
- #{checkCode},
- #{printDate},
- #{state},
- #{invoiceType},
- #{type},
- #{createBy},
- #{createDate},
- #{updateBy},
- #{updateDate},
- #{remarks},
- #{delFlag},
- #{message},
- #{orderNo},
- #{pdfUrl},
- #{jpgUrl},
- #{buyername},
- #{taxnum},
- #{canceltime},
- #{invoiceLine},
- #{fpqqlsh},
- #{sendtype},
- #{siteId},
- #{customerId},
- #{userCode},
- #{cancelInvoiceId},
- #{saleIdentity}
- )
- </insert>
- <select id="findInvoiceByPayseriesno" resultType="com.bz.smart_city.entity.pay.PayInvoiceprinted">
- select a.id, a.invoice_code as invoiceCode,a.invoice_no as invoiceNo,a.payseriesno
- from pay_invoice_printed a
- where a.id=#{invoicePrintId} and a.state=1 and a.site_id=#{siteId} and a.customer_id=#{customerId}
- limit 1
- </select>
- <update id="update">
- update pay_invoice_printed
- <set>
- <if test="payInvoiceprinted.state != null"> state=#{payInvoiceprinted.state},</if>
- <if test="payInvoiceprinted.orderNo != null">order_no=#{payInvoiceprinted.orderNo},</if>
- <if test="payInvoiceprinted.invoiceCode != null">invoice_code=#{payInvoiceprinted.invoiceCode},</if>
- <if test="payInvoiceprinted.printDate != null">print_date=#{payInvoiceprinted.printDate},</if>
- <if test="payInvoiceprinted.invoiceNo != null">invoice_no=#{payInvoiceprinted.invoiceNo},</if>
- <if test="payInvoiceprinted.message != null">message=#{payInvoiceprinted.message},</if>
- <if test="payInvoiceprinted.totalAmount != null">total_amount=#{payInvoiceprinted.totalAmount},</if>
- <if test="payInvoiceprinted.invoiceAmount != null">invoice_amount=#{payInvoiceprinted.invoiceAmount},</if>
- <if test="payInvoiceprinted.totalPrintAmount != null">total_print_amount=#{payInvoiceprinted.totalPrintAmount},</if>
- <if test="payInvoiceprinted.checkCode != null">check_code=#{payInvoiceprinted.checkCode},</if>
- <if test="payInvoiceprinted.pdfUrl != null">pdf_url=#{payInvoiceprinted.pdfUrl},</if>
- <if test="payInvoiceprinted.jpgUrl != null">jpg_url=#{payInvoiceprinted.jpgUrl},</if>
- <if test="payInvoiceprinted.remarks != null">remarks=#{payInvoiceprinted.remarks},</if>
- <if test="payInvoiceprinted.buyername != null">buyername=#{payInvoiceprinted.buyername},</if>
- <if test="payInvoiceprinted.taxnum != null">taxnum=#{payInvoiceprinted.taxnum},</if>
- </set>
- where id=#{payInvoiceprinted.id,jdbcType=BIGINT}
- </update>
- <select id="findListByState" resultType="com.bz.smart_city.entity.pay.PayInvoiceprinted">
- SELECT a.invoice_code as invoiceCode,a.invoice_no as invoiceNo,a.id as id,a.usercode as userCode,
- a.cancelinvoice_id as cancelInvoiceId,a.fpqqlsh as fpqqlsh,a.saleidentity as saleIdentity,
- a.invoice_type as invoiceType,customer_id as customerId
- from pay_invoice_printed a
- where a.state=0 or a.state=2
- </select>
- <update id="updateReceivedIsPrint">
- update pay_pay_received set isprint=#{isPrint}
- where payseriesno=#{payseriesno} and customer_id=#{customerId}
- </update>
- </mapper>
|