bug修改

This commit is contained in:
赵辉
2026-07-03 22:05:37 +08:00
parent fb4c508873
commit 553e0eebee
5 changed files with 40 additions and 7 deletions
@@ -420,6 +420,28 @@ public class BillManageApplicationService {
newBill.setUpdateByName(loginUser.getUserPo().getUserName());
newBill.setUpdateTime(new Date());
newBill.setDelFlag(1);
// 复制后重置状态字段为初始值
// 账单状态、对账状态、发票状态重置
newBill.setBillState(1); // 1-未确认
newBill.setBillStep(1); // 1-发起对账
newBill.setReconciliationStatus(0); // 1-暂未确认
newBill.setIsInvoice(0); // 0-未索取
// 实收=0,未收=账单金额
newBill.setActualReceivedAmount(BigDecimal.ZERO);
newBill.setBillAmountUnsettled(newBill.getBillAmount());
newBill.setBillAmountSettlement(BigDecimal.ZERO);
// NC同步状态重置
newBill.setSynchronousStatus(0); // 0-未同步
newBill.setSkSynchronousStatus(0); // 0-未同步
// 清空发票、收款、推送相关字段
newBill.setApplyNumber(null); // 发票申请单号
newBill.setSettlementTime(null); // 收款时间
newBill.setSynchronousTime(null); // 应收单推送时间
newBill.setSkSynchronousTime(null); // 收款单推送时间
newBill.setInvoiceId(null); // 发票表ID
newBill.setInvoiceMakeTime(null); // 开票时间
newBill.setNcId(null); // nc唯一标识(应收)
newBill.setSkNcId(null); // nc唯一标识(收款)
// 保存新账单
boolean flag = billManageDomainService.saveEntity(newBill);
if (!flag) {
@@ -198,7 +198,13 @@
and a.main_role = #{settlementCustomersDO.mainRole}
</if>
<if test="settlementCustomersDO.organizationId != null">
and a.organization_id = #{settlementCustomersDO.organizationId}
AND (
a.organization_id = #{settlementCustomersDO.organizationId}
OR b.org_code LIKE concat('%"code":"', #{settlementCustomersDO.organizationId}, '"%')
OR b.org_code LIKE concat('%code:', #{settlementCustomersDO.organizationId}, '%')
OR b.org_code LIKE concat('%code: ', #{settlementCustomersDO.organizationId}, '%')
OR b.org_code LIKE concat('%"code":', #{settlementCustomersDO.organizationId}, '%')
)
</if>
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
and a.top_organization_id = #{settlementCustomersDO.topOrganizationId}