You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
4.4 KiB

package BaseStudentService
import (
"dsBaseWeb/Business/BaseStudent/BaseStudentProto"
"dsBaseWeb/Business/SysDict/SysDictProto"
"dsBaseWeb/Business/SysDict/SysDictService"
"dsBaseWeb/Utils/CommonUtil"
"strings"
)
func PageStudentInfo(page int32, limit int32, classId string, xm string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := PageBaseStudent(BaseStudentProto.QueryArg{Page: page, Limit: limit, ClassId: classId, Xm: xm, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
if Reply.List != "[]" {
codeArr := CommonUtil.ListCollectAttributes(Reply.List, "xbm")
DictReply, _ := SysDictService.PageSysDictMultipleDictCode(SysDictProto.MultipleQueryArg{DictKind: "xbm", MultipleDictCode: codeArr, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
handleListStr := CommonUtil.ListMerge(Reply.List, DictReply.List, "xbm", "dict_code", "xb_name", "dict_value")
Reply.List = handleListStr
}
return Reply, err
}
func GetStudentInfo(personId string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := GetBaseStudent(BaseStudentProto.ModelArg{PersonId: personId, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func AddStudentInfo(xm string, xbm string, csrq string, mzm string, zzmmm string, sfzjlxm string, sfzjh string, dszybz int32, sqznbz int32, jcwgrysqznbz int32, gebz int32, lsetbz int32, cjbz int32, classId string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := AddBaseStudent(BaseStudentProto.ModelArg{Xm: xm, Xbm: xbm, Csrq: csrq, Mzm: mzm, Zzmmm: zzmmm, Sfzjlxm: sfzjlxm, Sfzjh: sfzjh, Dszybz: dszybz, Sqznbz: sqznbz, Jcwgrysqznbz: jcwgrysqznbz, Gebz: gebz, Lsetbz: lsetbz, Cjbz: cjbz, ClassId: classId, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func DeleteStudentInfo(ids string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
idsArr := strings.Split(ids, ",")
Reply, err := DeleteBaseStudent(BaseStudentProto.DeleteIdsArg{Ids: idsArr, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func UpdateStudentInfo(personId string, xm string, xbm string, csrq string, mzm string, zzmmm string, sfzjlxm string, sfzjh string, dszybz int32, sqznbz int32, jcwgrysqznbz int32, gebz int32, lsetbz int32, cjbz int32, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := UpdateBaseStudent(BaseStudentProto.ModelArg{PersonId: personId, Xm: xm, Xbm: xbm, Csrq: csrq, Mzm: mzm, Zzmmm: zzmmm, Sfzjlxm: sfzjlxm, Sfzjh: sfzjh, Dszybz: dszybz, Sqznbz: sqznbz, Jcwgrysqznbz: jcwgrysqznbz, Gebz: gebz, Lsetbz: lsetbz, Cjbz: cjbz, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func ExportStudentAccountExcel(bureauId string, classId string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := ExportStudentAccountInfoExcel(BaseStudentProto.ModelArg{BureauId: bureauId, ClassId: classId, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func ExportStudentExcel(bureauId string, classId string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := ExportStudentInfoExcel(BaseStudentProto.ModelArg{BureauId: bureauId, ClassId: classId, ExportExcelStatus: 1, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func DownLoadStudentTemplateExcel(bureauId string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := ExportStudentInfoExcel(BaseStudentProto.ModelArg{BureauId: bureauId, ExportExcelStatus: 0, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func ImportStudentExcel(bureauId string, excelPath string, actionPersonId string, actionIpAddress string) (*BaseStudentProto.Reply, error) {
Reply, err := ImportStudentInfoExcel(BaseStudentProto.ImportArg{BureauId: bureauId, ExcelPath: excelPath, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress})
return Reply, err
}
func StudentTransferInfo(classId string, personId string) (*BaseStudentProto.Reply, error) {
Reply, err := StudentTransfer(BaseStudentProto.StudentTransferArg{PersonId: personId, ClassId: classId})
return Reply, err
}