master
huanghai 5 years ago
parent 3c45ab251e
commit 49c1bc3635

@ -205,6 +205,8 @@ func ExportTeacherAccountInfoExcel(in *BaseTeacherProto.ModelArg) ([]map[string]
myBuilder.Where(builder.Eq{"t1.b_use": 1}).
And(builder.Eq{"t2.b_use": 1}).
And(builder.Eq{"t3.b_use": 1}).
And(builder.Eq{"t4.b_use": 1}).
And(builder.Eq{"t4.is_main": 1}).
And(builder.Eq{"t3.bureau_id": in.BureauId}).And(builder.Eq{"t1.identity_id": 2})
myBuilder.OrderBy("t2.sort_id").OrderBy("t2.id_int")
sql, err := myBuilder.ToBoundSQL()
@ -296,7 +298,7 @@ func ExportTeacherInfoExcel(targetPath string, bureauId string, ExportExcelStatu
t1.xlm,t1.xwm,t1.zcm,t1.bzlbm,t1.stage_id,t1.subject_id,t1.gwzym,t1.lxdh,t1.dzxx
from t_base_teacher as t1 inner join t_base_teacher_org as t3 on t1.person_id=t3.person_id
inner join t_base_organization as t2 on t3.org_id=t2.org_id
where t3.bureau_id=? and t1.identity_id=2 and t1.b_use=1 order by t3.sort_id,t1.id_int`
where t3.bureau_id=? and t1.identity_id=2 and t1.b_use=1 and t3.b_use=1 and t3.is_main=1 order by t3.sort_id,t1.id_int`
list, _ := db.SQL(sql, bureauId).Query().List()
for i := range list {
record := list[i]

Loading…
Cancel
Save