mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
1、首购记录无法记录可开票金额问题修复;2、审核开票相关购买记录无法显示问题修复;
This commit is contained in:
+5
-1
@@ -265,7 +265,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
|
|
||||||
// 查询关联的购买记录
|
// 查询关联的购买记录
|
||||||
List<PurchaseRecordDO> purchaseRecordDOS = purchaseRecordMapper.selectList(new LambdaQueryWrapper<PurchaseRecordDO>()
|
List<PurchaseRecordDO> purchaseRecordDOS = purchaseRecordMapper.selectList(new LambdaQueryWrapper<PurchaseRecordDO>()
|
||||||
.eq(PurchaseRecordDO::getOrganId, getUserOrganId())
|
.eq(PurchaseRecordDO::getOrganId, invoiceRecordsDO.getOrganId())
|
||||||
.in(PurchaseRecordDO::getId, purchaseIdList));
|
.in(PurchaseRecordDO::getId, purchaseIdList));
|
||||||
|
|
||||||
List<InvoicePurchaseRecord> invoicePurchaseRecords = new ArrayList<>();
|
List<InvoicePurchaseRecord> invoicePurchaseRecords = new ArrayList<>();
|
||||||
@@ -335,6 +335,10 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
purchaseRecordDOS.forEach(f -> f.setIsInvocing(InvoiceStatusEnum.INVOICABLE.getCode()));
|
purchaseRecordDOS.forEach(f -> f.setIsInvocing(InvoiceStatusEnum.INVOICABLE.getCode()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 更新开票人信息
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
invoiceRecordsDO.setInvoicePerson(loginUser.getNickname());
|
||||||
|
invoiceRecordsDO.setInvoicePersonId(loginUser.getId());
|
||||||
|
|
||||||
invoiceRecordsMapper.updateById(invoiceRecordsDO);
|
invoiceRecordsMapper.updateById(invoiceRecordsDO);
|
||||||
|
|
||||||
|
|||||||
+24
-3
@@ -14,9 +14,30 @@
|
|||||||
|
|
||||||
<!-- 查询机构下开票金额统计:可开票、开票中、已开票-->
|
<!-- 查询机构下开票金额统计:可开票、开票中、已开票-->
|
||||||
<select id="getOrgInvoiceAmountStatistics" resultType="com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceAmountRespVO">
|
<select id="getOrgInvoiceAmountStatistics" resultType="com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceAmountRespVO">
|
||||||
select sum(case when is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICABLE.code}' then account_balance_spent else 0 end) as invocable,
|
SELECT
|
||||||
sum(case when is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@PENDINGINVOICING.code}' then account_balance_spent else 0 end) as inTheInvoice,
|
SUM(
|
||||||
sum(case when is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICINGSUCCESSFUL.code}' then account_balance_spent else 0 end) as invoiced
|
CASE
|
||||||
|
WHEN is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICABLE.code}'
|
||||||
|
THEN CASE WHEN initial = TRUE THEN total_amount ELSE account_balance_spent END
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) AS invocable,
|
||||||
|
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@PENDINGINVOICING.code}'
|
||||||
|
THEN CASE WHEN initial = TRUE THEN total_amount ELSE account_balance_spent END
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) AS inTheInvoice,
|
||||||
|
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICINGSUCCESSFUL.code}'
|
||||||
|
THEN CASE WHEN initial = TRUE THEN total_amount ELSE account_balance_spent END
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) AS invoiced
|
||||||
from purchase_record
|
from purchase_record
|
||||||
where organ_id = #{organId} and deleted = false;
|
where organ_id = #{organId} and deleted = false;
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user