master
huanghai 5 years ago
parent ac42d03608
commit dc4821eb0f

@ -17,7 +17,7 @@
"width": 30
},
{
"col_name": "姓名",
"col_name": "学生姓名",
"col_field": "person_name",
"width": 30
},

@ -7,17 +7,17 @@
"width": 20
},
{
"col_name": "部门",
"col_name": "所属部门",
"col_field": "org_name",
"width": 30
},
{
"col_name": "姓名",
"col_name": "教职工姓名",
"col_field": "person_name",
"width": 20
},
{
"col_name": "登录",
"col_name": "登录账号",
"col_field": "login_name",
"width": 30
},

@ -1,5 +1,5 @@
{
"title": "学生信息导入",
"title": "学生信息",
"level_1_sql": [
"select dict_value from t_sys_dict where dict_kind =? order by sort_id"
],

@ -1,5 +1,5 @@
{
"title": "教工信息导入",
"title": "教工信息",
"level_1_sql": [
"select dict_value from t_sys_dict where dict_kind =? order by sort_id"
],

@ -63,7 +63,7 @@ func UpdateBaseStudent(model models.TBaseStudent, ForceUpdateFields []string) (i
var ids = []string{model.PersonId}
var selector = SqlKit.GetBean("t_base_student")
SqlKit.DeleteCacheByIds(ids, selector)
//更改登录表中的教师姓名
//更改登录表中的学生姓名
SysLoginpersonDao.UpdatePersonName(model.PersonId, model.Xm)
//2、计算本次操作有哪些字段需要更新
NeedUpdateFields := CommonUtil.GetNeedUpdateFields(model)
@ -144,7 +144,7 @@ func ExportStudentAccountInfoExcel(in *BaseStudentProto.ModelArg) ([]map[string]
classIds = append(classIds, in.ClassId)
myBuilder.And(builder.In("t3.class_id", classIds))
}
myBuilder.OrderBy("t3.stage_id").OrderBy("t3.id_int")
myBuilder.OrderBy("t3.stage_id").OrderBy("t3.id_int").OrderBy("t2.id_int")
sql, err := myBuilder.ToBoundSQL()
if err != nil {
return nil, 0, err

@ -51,7 +51,7 @@ func (s *Rpc) AddBaseStudent(ctx context.Context, in *BaseStudentProto.ModelArg)
//是不是重复
if !SysLoginpersonDao.IsValidIdCardNo(in.Sfzjh, "") {
reply.Success = false
reply.Message = "唯一身份标识在系统中已存在,无法创建!"
reply.Message = "证件号在系统中已存在,无法创建!"
return &reply, nil
}
//==========================================
@ -84,7 +84,7 @@ func (s *Rpc) AddBaseStudent(ctx context.Context, in *BaseStudentProto.ModelArg)
model.Xbm = xbm
} else {
model.Csrq = DateUtil.ConvertDate(in.Csrq)
model.Xbm = "1"
model.Xbm = in.Xbm
}
//民族 (有字典)
model.Mzm = in.Mzm
@ -245,7 +245,7 @@ func (s *Rpc) UpdateBaseStudent(ctx context.Context, in *BaseStudentProto.ModelA
//是不是重复
if !SysLoginpersonDao.IsValidIdCardNo(in.Sfzjh, in.PersonId) {
reply.Success = false
reply.Message = "唯一身份标识在系统中已存在,无法创建!"
reply.Message = "证件号在系统中已存在,无法创建!"
return &reply, nil
}
//==========================================

@ -55,7 +55,7 @@ func (s *Rpc) AddBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelArg)
//是不是重复
if !SysLoginpersonDao.IsValidIdCardNo(in.Sfzjh, "") {
reply.Success = false
reply.Message = "唯一身份标识在系统中已存在,无法创建!"
reply.Message = "证件号在系统中已存在,无法创建!"
return &reply, nil
}
//==========================================
@ -228,7 +228,7 @@ func (s *Rpc) UpdateBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelA
//是不是重复
if !SysLoginpersonDao.IsValidIdCardNo(in.Sfzjh, in.PersonId) {
reply.Success = false
reply.Message = "唯一身份标识在系统中已存在,无法创建!"
reply.Message = "证件号在系统中已存在,无法创建!"
return &reply, nil
}

@ -13,8 +13,8 @@ func TestStyle(t *testing.T) {
tPath := `E:\Work\dsMin\dsBaseRpc\Config\ImportExcelTemplate\teacher2222.xlsx`
f, _ := excelize.OpenFile(excelPath)
style, _ := f.GetCellStyle("教工信息导入", Const.RedCell)
f.SetCellStyle("教工信息导入", "A202", "A202", style)
style, _ := f.GetCellStyle("教工信息", Const.RedCell)
f.SetCellStyle("教工信息", "A202", "A202", style)
if err := f.SaveAs(tPath); err != nil {
println(err.Error())

Loading…
Cancel
Save