|
@@ -231,7 +231,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta |
|
|
|
|
|
|
|
|
//查询数据 |
|
|
//查询数据 |
|
|
var m []*db.SelfSupportForSchoolOrdWithUserIdentity |
|
|
var m []*db.SelfSupportForSchoolOrdWithUserIdentity |
|
|
sess := db.Db.Desc("self_support_for_school_ord.id") |
|
|
|
|
|
|
|
|
sess := db.Db.Desc("self_support_for_school_ord.id").Where("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess) |
|
|
if req.EnterpriseId != 0 { |
|
|
if req.EnterpriseId != 0 { |
|
|
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) |
|
|
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) |
|
|
} |
|
|
} |
|
@@ -545,7 +545,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta |
|
|
//} |
|
|
//} |
|
|
|
|
|
|
|
|
var m []*db.SelfSupportForSchoolOrdWithUserIdentity |
|
|
var m []*db.SelfSupportForSchoolOrdWithUserIdentity |
|
|
sess := db.Db.Desc("self_support_for_school_ord.id") |
|
|
|
|
|
|
|
|
sess := db.Db.Desc("self_support_for_school_ord.id").Where("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess) |
|
|
if req.EnterpriseId != 0 { |
|
|
if req.EnterpriseId != 0 { |
|
|
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) |
|
|
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) |
|
|
} |
|
|
} |
|
@@ -696,7 +696,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta |
|
|
for _, v := range deviceList { |
|
|
for _, v := range deviceList { |
|
|
deviceListMapping[v.DeviceSn] = *v |
|
|
deviceListMapping[v.DeviceSn] = *v |
|
|
var m []*db.SelfSupportForSchoolOrdWithUserIdentityV2 |
|
|
var m []*db.SelfSupportForSchoolOrdWithUserIdentityV2 |
|
|
sess := db.Db.Where("device_sn = ?", v.DeviceSn).And("enterprise_id =?", req.EnterpriseId).Desc("self_support_for_school_ord.id") |
|
|
|
|
|
|
|
|
sess := db.Db.Where("device_sn = ?", v.DeviceSn).And("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess).And("enterprise_id =?", req.EnterpriseId).Desc("self_support_for_school_ord.id") |
|
|
if req.EnterpriseId != 0 { |
|
|
if req.EnterpriseId != 0 { |
|
|
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) |
|
|
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) |
|
|
} |
|
|
} |
|
|