|
@@ -273,4 +273,30 @@
|
|
ORDER BY ppli.update_date DESC
|
|
ORDER BY ppli.update_date DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="selectInvoiceFlag" resultType="string">
|
|
|
|
+ select
|
|
|
|
+ case
|
|
|
|
+ when ff.status = '1' then '开票中'
|
|
|
|
+ when ff.status = '2' then '开票中'
|
|
|
|
+ when ff.status = '3' then '开票中'
|
|
|
|
+ when ff.status = '4' then '开票中'
|
|
|
|
+ when ff.status = '5' then '已开票'
|
|
|
|
+ when ff.status = '6' then '已开票'
|
|
|
|
+ when ff.status = '7' then '已开票'
|
|
|
|
+ when ff.status = '8' then '已开票'
|
|
|
|
+ else '' end
|
|
|
|
+ from
|
|
|
|
+ (select
|
|
|
|
+ fib.program_name as program_name,
|
|
|
|
+ fi.`status` as status,
|
|
|
|
+ fib.program_id as program_id,
|
|
|
|
+ fi.create_date as create_date
|
|
|
|
+ from finance_invoice_base fib
|
|
|
|
+ inner join finance_invoice fi on fi.id = fib.invoice_id and fi.del_flag = '0'
|
|
|
|
+ where fib.del_flag = '0' and fi.status != '9'
|
|
|
|
+ order by fi.create_date desc) ff
|
|
|
|
+ where ff.program_id = #{id}
|
|
|
|
+ limit 1
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|