浏览代码

Merge branch 'new_2.6'

ziwen 1 年之前
父节点
当前提交
7704f12f73
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11 5
      controller/census/invoice_payment.go

+ 11 - 5
controller/census/invoice_payment.go

@@ -1691,8 +1691,15 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
 			}
 
 			noSummaryCond += ` AND b.is_deleted = 0 AND b.contract_status <> 4 `
-			noSummaryCond += ` AND b.contract_register_id IN ? AND b.contract_register_id NOT IN ?`
-			noSummaryPars = append(noSummaryPars, queryRegisterIds, notQueryRegisterIds)
+			if len(notQueryRegisterIds) >0 {
+				noSummaryCond += ` AND b.contract_register_id IN ? AND b.contract_register_id NOT IN ?`
+				noSummaryPars = append(noSummaryPars, queryRegisterIds, notQueryRegisterIds)
+			} else {
+				noSummaryCond += ` AND b.contract_register_id IN ? `
+				noSummaryPars = append(noSummaryPars, queryRegisterIds)
+			}
+
+
 			noSummaryData, e := fms.GetNoInvoicePaymentCensusData(noSummaryCond, noSummaryPars)
 			if e != nil {
 				resp.FailMsg("获取失败", "GetNoInvoicePaymentCensusData, Err: "+e.Error(), c)
@@ -1715,8 +1722,8 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
 				//fmt.Println("ProductIds:", v.ProductIds)
 				//fmt.Println("ContractRegisterId:", v.ContractRegisterId)
 				//fmt.Println("ServiceProductId:", v.ServiceProductId)
-				//fmt.Println("RegisterId:", v.RegisterId)
-				//fmt.Println("len(NotInvoiceSummaryMap[v.RegisterId]):", len(NotInvoiceSummaryMap[v.ContractRegisterId]))
+				fmt.Println("RegisterId:", v.RegisterId)
+				fmt.Println("len(NotInvoiceSummaryMap[v.RegisterId]):", len(NotInvoiceSummaryMap[v.ContractRegisterId]))
 				if (v.ProductIds == "1,2" || v.ProductIds == "2,1") && len(NotInvoiceSummaryMap[v.ContractRegisterId]) == 1 {
 					if v.ServiceProductId == 1 {
 						if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
@@ -1770,7 +1777,6 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
 
 						NotInvoiceSummaryMap[v.ContractRegisterId] = append(NotInvoiceSummaryMap[v.ContractRegisterId], &item2)
 					}
-
 				} else if v.ProductIds == "1" && len(NotInvoiceSummaryMap[v.ContractRegisterId]) == 0 {
 					if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
 						item1 := fms.NotInvoicePaymentSummaryItem{