|
@@ -182,6 +182,7 @@ func SummaryInvoicePaymentByContractRegisterId(registerId int) {
|
|
|
ficcPaymentIds := make([]int, 0)
|
|
|
raiInvoiceIds := make([]int, 0)
|
|
|
raiPaymentIds := make([]int, 0)
|
|
|
+ noProductPaymentIds := make([]int, 0)
|
|
|
for i := range list {
|
|
|
if list[i].InvoiceType == fms.ContractInvoiceTypeMake {
|
|
|
if list[i].ServiceProductId == crm.CompanyProductFicc {
|
|
@@ -212,6 +213,8 @@ func SummaryInvoicePaymentByContractRegisterId(registerId int) {
|
|
|
ficcPaymentIds = append(ficcPaymentIds, list[i].ContractInvoiceId)
|
|
|
} else if list[i].ServiceProductId == crm.CompanyProductRai {
|
|
|
raiPaymentIds = append(raiPaymentIds, list[i].ContractInvoiceId)
|
|
|
+ } else {
|
|
|
+ noProductPaymentIds = append(noProductPaymentIds, list[i].ContractInvoiceId)
|
|
|
}
|
|
|
continue
|
|
|
}
|
|
@@ -220,6 +223,7 @@ func SummaryInvoicePaymentByContractRegisterId(registerId int) {
|
|
|
raiInvoiceLen := len(raiInvoiceIds)
|
|
|
ficcPaymentLen := len(ficcPaymentIds)
|
|
|
raiPaymentLen := len(raiPaymentIds)
|
|
|
+ noProductPaymentLen := len(noProductPaymentIds)
|
|
|
|
|
|
// 汇总数据
|
|
|
nowTime := time.Now().Local()
|
|
@@ -287,6 +291,16 @@ func SummaryInvoicePaymentByContractRegisterId(registerId int) {
|
|
|
summaryList = append(summaryList, v)
|
|
|
}
|
|
|
}
|
|
|
+ if noProductPaymentLen > 0 {
|
|
|
+ for i := range noProductPaymentIds {
|
|
|
+ v := new(fms.InvoicePaymentSummary)
|
|
|
+ v.RegisterId = registerId
|
|
|
+ v.PaymentId = noProductPaymentIds[i]
|
|
|
+ v.CreateTime = nowTime
|
|
|
+ v.ModifyTime = nowTime
|
|
|
+ summaryList = append(summaryList, v)
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 删除并新增汇总数据
|
|
|
summaryOB := new(fms.InvoicePaymentSummary)
|