|
@@ -9,9 +9,11 @@
|
|
<result column="paymentOrdinaryId" property="paymentOrdinaryId"/>
|
|
<result column="paymentOrdinaryId" property="paymentOrdinaryId"/>
|
|
<result column="paymentId" property="paymentId"/>
|
|
<result column="paymentId" property="paymentId"/>
|
|
|
|
|
|
|
|
+ <result column="organizationId" property="organizationId"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="projectItemTargetRoomIds" property="projectItemTargetRoomIds"/>
|
|
<result column="projectItemTargetRoomIds" property="projectItemTargetRoomIds"/>
|
|
<result column="type" property="type"/>
|
|
<result column="type" property="type"/>
|
|
|
|
+ <result column="invoiceType" property="invoiceType"/>
|
|
<result column="status" property="status"/>
|
|
<result column="status" property="status"/>
|
|
<result column="code" property="code"/>
|
|
<result column="code" property="code"/>
|
|
<result column="number" property="number"/>
|
|
<result column="number" property="number"/>
|
|
@@ -30,9 +32,12 @@
|
|
<result column="paymentOrdinaryId" property="paymentOrdinaryId"/>
|
|
<result column="paymentOrdinaryId" property="paymentOrdinaryId"/>
|
|
<result column="paymentId" property="paymentId"/>
|
|
<result column="paymentId" property="paymentId"/>
|
|
|
|
|
|
|
|
+ <result column="organizationId" property="organizationId"/>
|
|
|
|
+ <result column="organizationName" property="organizationName"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="projectItemTargetRoomIds" property="projectItemTargetRoomIds"/>
|
|
<result column="projectItemTargetRoomIds" property="projectItemTargetRoomIds"/>
|
|
<result column="type" property="type"/>
|
|
<result column="type" property="type"/>
|
|
|
|
+ <result column="invoiceType" property="invoiceType"/>
|
|
<result column="status" property="status"/>
|
|
<result column="status" property="status"/>
|
|
<result column="code" property="code"/>
|
|
<result column="code" property="code"/>
|
|
<result column="number" property="number"/>
|
|
<result column="number" property="number"/>
|
|
@@ -50,10 +55,10 @@
|
|
|
|
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.PaymentInvoice" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.PaymentInvoice" useGeneratedKeys="true" keyProperty="id">
|
|
INSERT INTO payment_invoice (`paymentOrdinaryId`, `paymentId`,
|
|
INSERT INTO payment_invoice (`paymentOrdinaryId`, `paymentId`,
|
|
- `projectId`, `projectItemTargetRoomIds`, `type`, `status`, `code`, `number`, `payMerchantId`, `payClientId`, `cargoName`,
|
|
|
|
|
|
+ `organizationId`, `projectId`, `projectItemTargetRoomIds`, `invoiceType`, `type`, `status`, `code`, `number`, `payMerchantId`, `payClientId`, `cargoName`,
|
|
`name`, `date`, `attachment`, `data`)
|
|
`name`, `date`, `attachment`, `data`)
|
|
VALUES (#{paymentOrdinaryId}, #{paymentId},
|
|
VALUES (#{paymentOrdinaryId}, #{paymentId},
|
|
- #{projectId}, #{projectItemTargetRoomIds}, #{type}, #{status}, #{code}, #{number}, #{payMerchantId}, #{payClientId}, #{cargoName},
|
|
|
|
|
|
+ #{organizationId}, #{projectId}, #{projectItemTargetRoomIds}, #{invoiceType}, #{type}, #{status}, #{code}, #{number}, #{payMerchantId}, #{payClientId}, #{cargoName},
|
|
#{name}, #{date}, #{attachment}, #{data})
|
|
#{name}, #{date}, #{attachment}, #{data})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -68,9 +73,11 @@
|
|
<if test="paymentOrdinaryId!=0">paymentOrdinaryId=#{paymentOrdinaryId},</if>
|
|
<if test="paymentOrdinaryId!=0">paymentOrdinaryId=#{paymentOrdinaryId},</if>
|
|
<if test="paymentId!=0">paymentId=#{paymentId},</if>
|
|
<if test="paymentId!=0">paymentId=#{paymentId},</if>
|
|
|
|
|
|
|
|
+ <if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
<if test="projectId!=0">projectId=#{projectId},</if>
|
|
<if test="projectId!=0">projectId=#{projectId},</if>
|
|
<if test="projectItemTargetRoomIds!=null">projectItemTargetRoomIds=#{projectItemTargetRoomIds},</if>
|
|
<if test="projectItemTargetRoomIds!=null">projectItemTargetRoomIds=#{projectItemTargetRoomIds},</if>
|
|
<if test="type!=null">type=#{type},</if>
|
|
<if test="type!=null">type=#{type},</if>
|
|
|
|
+ <if test="invoiceType!=null">invoiceType=#{invoiceType},</if>
|
|
<if test="status!=null">status=#{status},</if>
|
|
<if test="status!=null">status=#{status},</if>
|
|
<if test="code!=null">code=#{code},</if>
|
|
<if test="code!=null">code=#{code},</if>
|
|
<if test="number!=null">number=#{number},</if>
|
|
<if test="number!=null">number=#{number},</if>
|
|
@@ -93,9 +100,11 @@
|
|
<if test="paymentOrdinaryId!=0">and paymentOrdinaryId=#{paymentOrdinaryId}</if>
|
|
<if test="paymentOrdinaryId!=0">and paymentOrdinaryId=#{paymentOrdinaryId}</if>
|
|
<if test="paymentId!=0">and paymentId=#{paymentId}</if>
|
|
<if test="paymentId!=0">and paymentId=#{paymentId}</if>
|
|
|
|
|
|
|
|
+ <if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
<if test="projectId!=0">and projectId=#{projectId}</if>
|
|
<if test="projectId!=0">and projectId=#{projectId}</if>
|
|
<if test="projectItemTargetRoomIds!=null">and projectItemTargetRoomIds=#{projectItemTargetRoomIds}</if>
|
|
<if test="projectItemTargetRoomIds!=null">and projectItemTargetRoomIds=#{projectItemTargetRoomIds}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
|
|
+ <if test="invoiceType!=null">and invoiceType=#{invoiceType}</if>
|
|
<if test="status!=null">and status=#{status}</if>
|
|
<if test="status!=null">and status=#{status}</if>
|
|
<if test="code!=null">and code=#{code}</if>
|
|
<if test="code!=null">and code=#{code}</if>
|
|
<if test="number!=null">and number=#{number},</if>
|
|
<if test="number!=null">and number=#{number},</if>
|
|
@@ -111,7 +120,8 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<sql id="query">
|
|
<sql id="query">
|
|
- SELECT a.*, c.name as payMerchantName, d.name as payClientName FROM payment_invoice a
|
|
|
|
|
|
+ SELECT a.*, b.name as organizationName, c.name as payMerchantName, d.name as payClientName FROM payment_invoice a
|
|
|
|
+ LEFT JOIN mgr_organization b ON a.organizationId = b.id
|
|
LEFT JOIN merchant c ON a.payMerchantId = c.id
|
|
LEFT JOIN merchant c ON a.payMerchantId = c.id
|
|
LEFT JOIN mgr_client d ON a.payClientId = d.id
|
|
LEFT JOIN mgr_client d ON a.payClientId = d.id
|
|
</sql>
|
|
</sql>
|
|
@@ -122,9 +132,11 @@
|
|
<if test="p.paymentOrdinaryId!=0">and a.paymentOrdinaryId=#{p.paymentOrdinaryId}</if>
|
|
<if test="p.paymentOrdinaryId!=0">and a.paymentOrdinaryId=#{p.paymentOrdinaryId}</if>
|
|
<if test="p.paymentId!=0">and a.paymentId=#{p.paymentId}</if>
|
|
<if test="p.paymentId!=0">and a.paymentId=#{p.paymentId}</if>
|
|
|
|
|
|
|
|
+ <if test="p.organizationId!=0">and a.organizationId=#{p.organizationId}</if>
|
|
<if test="p.projectId!=0">and a.projectId=#{p.projectId}</if>
|
|
<if test="p.projectId!=0">and a.projectId=#{p.projectId}</if>
|
|
<if test="p.projectItemTargetRoomIds!=null">and a.projectItemTargetRoomIds=#{p.projectItemTargetRoomIds}</if>
|
|
<if test="p.projectItemTargetRoomIds!=null">and a.projectItemTargetRoomIds=#{p.projectItemTargetRoomIds}</if>
|
|
<if test="p.type!=null">and a.type=#{p.type}</if>
|
|
<if test="p.type!=null">and a.type=#{p.type}</if>
|
|
|
|
+ <if test="p.invoiceType!=null">and a.invoiceType=#{p.invoiceType}</if>
|
|
<if test="p.status!=null">and a.status=#{p.status}</if>
|
|
<if test="p.status!=null">and a.status=#{p.status}</if>
|
|
<if test="p.code!=null">and a.code=#{p.code}</if>
|
|
<if test="p.code!=null">and a.code=#{p.code}</if>
|
|
<if test="p.number!=null">and a.number=#{p.number},</if>
|
|
<if test="p.number!=null">and a.number=#{p.number},</if>
|
|
@@ -146,9 +158,11 @@
|
|
<if test="paymentOrdinaryId!=0">and paymentOrdinaryId=#{paymentOrdinaryId}</if>
|
|
<if test="paymentOrdinaryId!=0">and paymentOrdinaryId=#{paymentOrdinaryId}</if>
|
|
<if test="paymentId!=0">and paymentId=#{paymentId}</if>
|
|
<if test="paymentId!=0">and paymentId=#{paymentId}</if>
|
|
|
|
|
|
|
|
+ <if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
<if test="projectId!=0">and projectId=#{projectId}</if>
|
|
<if test="projectId!=0">and projectId=#{projectId}</if>
|
|
<if test="projectItemTargetRoomIds!=null">and projectItemTargetRoomIds=#{projectItemTargetRoomIds}</if>
|
|
<if test="projectItemTargetRoomIds!=null">and projectItemTargetRoomIds=#{projectItemTargetRoomIds}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
|
|
+ <if test="invoiceType!=null">and invoiceType=#{invoiceType}</if>
|
|
<if test="status!=null">and status=#{status}</if>
|
|
<if test="status!=null">and status=#{status}</if>
|
|
<if test="code!=null">and code=#{code}</if>
|
|
<if test="code!=null">and code=#{code}</if>
|
|
<if test="number!=null">and number=#{number},</if>
|
|
<if test="number!=null">and number=#{number},</if>
|