|
@@ -859,6 +859,16 @@ func SelfSupportForSchoolArrearsOrdList(req md.SelfSupportForSchoolArrearsOrdLis |
|
|
return nil, 0, err |
|
|
return nil, 0, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//查询出所有的设备 |
|
|
|
|
|
var deviceList []*model.Device |
|
|
|
|
|
err = db.Db.Where("enterprise_id != 0").Find(&deviceList) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return nil, 0, err |
|
|
|
|
|
} |
|
|
|
|
|
var deviceListMapping = map[string]model.Device{} |
|
|
|
|
|
for _, v := range deviceList { |
|
|
|
|
|
deviceListMapping[v.DeviceSn] = *v |
|
|
|
|
|
} |
|
|
for _, v := range m { |
|
|
for _, v := range m { |
|
|
resp = append(resp, md.SelfSupportForSchoolOrdListResp{ |
|
|
resp = append(resp, md.SelfSupportForSchoolOrdListResp{ |
|
|
EnterpriseId: v.UserIdentity.EnterpriseId, |
|
|
EnterpriseId: v.UserIdentity.EnterpriseId, |
|
@@ -878,6 +888,7 @@ func SelfSupportForSchoolArrearsOrdList(req md.SelfSupportForSchoolArrearsOrdLis |
|
|
Class: v.Class.Name, |
|
|
Class: v.Class.Name, |
|
|
ClassId: v.Class.Id, |
|
|
ClassId: v.Class.Id, |
|
|
DeviceSn: v.SelfSupportForSchoolOrd.DeviceSn, |
|
|
DeviceSn: v.SelfSupportForSchoolOrd.DeviceSn, |
|
|
|
|
|
ShopName: deviceListMapping[v.SelfSupportForSchoolOrd.DeviceSn].Name, |
|
|
CpMerchantId: v.SelfSupportForSchoolOrd.CpMerchantId, |
|
|
CpMerchantId: v.SelfSupportForSchoolOrd.CpMerchantId, |
|
|
DebtBusinessMsg: v.SelfSupportForSchoolOrd.DebtBusinessMsg, |
|
|
DebtBusinessMsg: v.SelfSupportForSchoolOrd.DebtBusinessMsg, |
|
|
}) |
|
|
}) |
|
|