DengBiao 7 meses atrás
pai
commit
400e2ce594
1 arquivos alterados com 7 adições e 1 exclusões
  1. +7
    -1
      app/admin/svc/svc_data_statisstics.go

+ 7
- 1
app/admin/svc/svc_data_statisstics.go Ver arquivo

@@ -391,7 +391,8 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
}

var m []*db.SelfSupportForSchoolOrdWithUserIdentityV2
sess := db.Db.Desc("self_support_for_school_ord.id").Where("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess)
eg := db.Db
sess := eg.Desc("self_support_for_school_ord.id").Where("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess)
if req.EnterpriseId != 0 {
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId)
}
@@ -417,7 +418,12 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
var data = map[string]map[string]map[string]map[string]map[string]float64{}
for _, vv := range m {
device := deviceListMapping[vv.SelfSupportForSchoolOrd.DeviceSn]
ordCreateAt, _ := time.ParseInLocation("2006-01-02 15:04:05", vv.SelfSupportForSchoolOrd.CreateAt, time.Local)
merchantCreateAt, _ := time.ParseInLocation("2006-01-02 15:04:05", merchantListMapping[device.MerchantId].CreateAt, time.Local)
shopName := merchantListMapping[device.MerchantId].Name
if ordCreateAt.Before(merchantCreateAt) {
shopName = "设备已更换商户"
}
deviceName := device.Name
if data[vv.Enterprise.Name] == nil {
data[vv.Enterprise.Name] = make(map[string]map[string]map[string]map[string]float64)


Carregando…
Cancelar
Salvar