|
@@ -42,24 +42,26 @@
|
|
|
production_fund_id, title, type, tax_no, plan_amount, real_amount, plan_make_date, real_make_date, state, reason, apply_id, checker_id, maker_id, bank_name, bank_account, bank_address, bank_tel, make_item, item_quantity, item_unit, tax_rate, tax_amount, remark
|
|
|
</sql>
|
|
|
|
|
|
- <select id="getPage" parameterType="com.dayou.entity.FinanceInvoice" resultType="com.dayou.vo.FinanceInvoiceVo">
|
|
|
+ <!--开票列表查询Sql-->
|
|
|
+ <sql id="getPageSql">
|
|
|
SELECT
|
|
|
- fi.*,
|
|
|
- (case orf.business_type when 'ASSET_BUSINESS' THEN '资产业务' WHEN 'MAJOR_BUSINESS' THEN '大中型业务' else '个贷业务' end) as businessType,
|
|
|
- orf.order_id,
|
|
|
- orf.order_name,
|
|
|
- (orf.should_amount=orf.real_amount) as isPayAll,
|
|
|
- u.name AS applyName,
|
|
|
+ fi.*,
|
|
|
+ fi.created AS createTime,
|
|
|
+ (case orf.business_type when 'ASSET_BUSINESS' THEN '资产业务' WHEN 'MAJOR_BUSINESS' THEN '大中型业务' else '个贷业务' end) as businessType,
|
|
|
+ orf.order_id,
|
|
|
+ orf.order_name,
|
|
|
+ (orf.should_amount=orf.real_amount) as isPayAll,
|
|
|
+ u.name AS applyName,
|
|
|
pf.production_no
|
|
|
FROM
|
|
|
- finance_invoice fi
|
|
|
- LEFT JOIN order_fund orf ON fi.order_fund_id = orf.id
|
|
|
- LEFT JOIN user u ON u.id = fi.apply_id
|
|
|
+ finance_invoice fi
|
|
|
+ LEFT JOIN order_fund orf ON fi.order_fund_id = orf.id
|
|
|
+ LEFT JOIN user u ON u.id = fi.apply_id
|
|
|
left join production_fund pf on pf.id = fi.production_fund_id
|
|
|
where fi.deleted = 0 and orf.deleted = 0
|
|
|
- <if test="vo!=null and vo.state!=null and vo.state!='' and vo.state=='审核中' ">
|
|
|
- and (fi.state = '申请作废' or fi.state = '审核中')
|
|
|
- </if>
|
|
|
+ <if test="vo!=null and vo.state!=null and vo.state!='' and vo.state=='审核中' ">
|
|
|
+ and (fi.state = '申请作废' or fi.state = '审核中')
|
|
|
+ </if>
|
|
|
<if test="vo!=null and vo.state!=null and vo.state!='' and vo.state!='审核中' ">
|
|
|
and fi.state = #{vo.state}
|
|
|
</if>
|
|
@@ -91,6 +93,16 @@
|
|
|
and fi.created <= #{vo.aEndDate}
|
|
|
</if>
|
|
|
order by fi.created DESC
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--开票分页查询-->
|
|
|
+ <select id="getPage" parameterType="com.dayou.entity.FinanceInvoice" resultType="com.dayou.vo.FinanceInvoiceVo">
|
|
|
+ <include refid="getPageSql" />
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--开票信息导出-->
|
|
|
+ <select id="exportPage" resultType="com.dayou.vo.FinanceInvoiceVo">
|
|
|
+ <include refid="getPageSql" />
|
|
|
</select>
|
|
|
|
|
|
<select id="getInvoiceAmountInfo" parameterType="com.dayou.dto.MajorProductionSimpleDTO" resultType="com.dayou.vo.FinanceInvoiceVo">
|