1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
| <?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.system.mapper.LegacyInvoiceMapper">
|
| <insert id="insertLegacyInvoice" parameterType="Map" useGeneratedKeys="true" keyProperty="InvoiceID">
| INSERT INTO InvoiceData (
| ServiceOrderIDPK, InvoiceType, InvoiceName, InvoiceMakeout,
| InvoiceCompanyPhone, InvoiceCompanyID, InvoiceCompanyAdd,
| InvoiceCompanyBank, InvoiceCompanyBankNo, InvoiceZipCode,
| Invoice_strAdd, Invoice_strName, Invoice_strPhone, Invoice_strEmail,
| ApplicationTime, AuditStatus, InvoiceMoney, ApplyOAID
| ) VALUES (
| #{ServiceOrderIDPK}, #{InvoiceType}, #{InvoiceName}, #{InvoiceMakeout},
| #{InvoiceCompanyPhone}, #{InvoiceCompanyID}, #{InvoiceCompanyAdd},
| #{InvoiceCompanyBank}, #{InvoiceCompanyBankNo}, #{InvoiceZipCode},
| #{Invoice_strAdd}, #{Invoice_strName}, #{Invoice_strPhone}, #{Invoice_strEmail},
| GETDATE(), 0, #{InvoiceMoney}, #{ApplyOAID}
| )
| </insert>
|
| <select id="selectUpdatedInvoices" parameterType="String" resultType="Map">
| SELECT
| InvoiceID, ServiceOrderIDPK, AuditStatus, AuditTime, AuditMakeout,
| InvoiceNo, InvoiceURL, InvoiceOddNo, EleCloud_PDF, EleCloud_Time
| FROM InvoiceData
| WHERE AuditTime > #{lastSyncTime} OR EleCloud_Time > #{lastSyncTime}
| </select>
|
| <select id="selectLegacyInvoiceByServiceOrderId" parameterType="Long" resultType="Map">
| SELECT * FROM InvoiceData WHERE ServiceOrderIDPK = #{serviceOrderId}
| </select>
| </mapper>
|
|