|
@@ -1584,7 +1584,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
return
|
|
|
}
|
|
|
trialTotal = total
|
|
|
- condition += " GROUP BY a.contract_invoice_id ORDER BY a.invoice_time DESC "
|
|
|
+ condition += " GROUP BY a.contract_invoice_id ORDER BY a.invoice_time DESC ,a.contract_register_id DESC "
|
|
|
listFmsData, err := fms.GetContractRegisterList(condition, pars, startSize, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取数据信息失败"
|
|
@@ -1595,7 +1595,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
for _, v := range listFmsData {
|
|
|
item := new(statistic_report.RaiDataSummaryDetailResp)
|
|
|
item.CompanyName = v.CompanyName
|
|
|
- item.SellerName = v.RaiSellerName
|
|
|
+ item.SellerName = v.SellerName
|
|
|
item.ContractCode = v.ContractCode
|
|
|
item.InvoicedAmount = v.Amount
|
|
|
item.CreateTime = v.InvoiceTime
|
|
@@ -1616,7 +1616,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
return
|
|
|
}
|
|
|
trialTotal = total
|
|
|
- condition += " GROUP BY a.contract_invoice_id ORDER BY invoice_time DESC "
|
|
|
+ condition += " GROUP BY a.contract_invoice_id ORDER BY invoice_time DESC ,a.contract_register_id DESC "
|
|
|
listFmsData, err := fms.GetContractRegisterList(condition, pars, startSize, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取数据信息失败"
|
|
@@ -1627,7 +1627,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
for _, v := range listFmsData {
|
|
|
item := new(statistic_report.RaiDataSummaryDetailResp)
|
|
|
item.CompanyName = v.CompanyName
|
|
|
- item.SellerName = v.RaiSellerName
|
|
|
+ item.SellerName = v.SellerName
|
|
|
item.ContractCode = v.ContractCode
|
|
|
item.PaymentAmount = v.Amount
|
|
|
item.CreateTime = v.InvoiceTime
|
|
@@ -1679,7 +1679,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
return
|
|
|
}
|
|
|
trialTotal = total
|
|
|
- condition += " GROUP BY a.contract_invoice_id ORDER BY a.invoice_time DESC "
|
|
|
+ condition += " GROUP BY a.contract_invoice_id ORDER BY a.invoice_time DESC ,a.contract_register_id DESC "
|
|
|
listFmsData, err := fms.GetContractRegisterList(condition, pars, startSize, pageSize)
|
|
|
|
|
|
if err != nil {
|
|
@@ -1691,7 +1691,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
for _, v := range listFmsData {
|
|
|
item := new(statistic_report.RaiDataSummaryDetailResp)
|
|
|
item.CompanyName = v.CompanyName
|
|
|
- item.SellerName = v.RaiSellerName
|
|
|
+ item.SellerName = v.SellerName
|
|
|
item.ContractCode = v.ContractCode
|
|
|
item.InvoicedAmount = v.Amount
|
|
|
item.CreateTime = v.InvoiceTime
|
|
@@ -1707,7 +1707,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
if sellerId != "" {
|
|
|
condition += ` AND a.seller_id IN (` + sellerId + `) `
|
|
|
}
|
|
|
- condition += ` AND b.is_deleted = 0 AND b.contract_type = 1 AND a.invoice_type IN (2,4) AND a.invoice_time >= ? AND a.invoice_time <= ? `
|
|
|
+ condition += ` AND b.is_deleted = 0 AND b.contract_type = 1 AND a.invoice_type IN (2,4) AND a.invoice_time >= ? AND a.invoice_time <= ? `
|
|
|
pars = append(pars, startDate, endDate)
|
|
|
total, err := fms.GetContractInvoiceCount(condition, pars)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -1716,7 +1716,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
return
|
|
|
}
|
|
|
trialTotal = total
|
|
|
- condition += ` GROUP BY a.contract_invoice_id ORDER BY a.invoice_time DESC `
|
|
|
+ condition += ` GROUP BY a.contract_invoice_id ORDER BY a.invoice_time DESC ,a.contract_register_id DESC `
|
|
|
listFmsData, err := fms.GetContractRegisterList(condition, pars, startSize, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取数据信息失败"
|
|
@@ -1727,7 +1727,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
|
|
|
for _, v := range listFmsData {
|
|
|
item := new(statistic_report.RaiDataSummaryDetailResp)
|
|
|
item.CompanyName = v.CompanyName
|
|
|
- item.SellerName = v.RaiSellerName
|
|
|
+ item.SellerName = v.SellerName
|
|
|
item.ContractCode = v.ContractCode
|
|
|
item.PaymentAmount = v.Amount
|
|
|
item.CreateTime = v.InvoiceTime
|