Merge branch 'master' of 10.10.14.250:huanghai/dsMin

master
zhangjun 5 years ago
commit 5ed31ce0f5

@ -108,6 +108,10 @@
{ {
"col_name": "联系电话", "col_name": "联系电话",
"width": 20 "width": 20
},
{
"col_name": "人员ID",
"width": 0
} }
] ]
} }

@ -363,7 +363,7 @@ func ExportTeacherInfoExcel(targetPath string, bureauId string, ExportExcelStatu
} }
if ExportExcelStatus > 0 { if ExportExcelStatus > 0 {
//将现有数据填充到下载的模板中 //将现有数据填充到下载的模板中
sql := `select t2.org_name,t1.xm, sql := `select t1.person_id,t2.org_name,t1.xm,
t1.mzm,t1.zzmmm,t1.sfzjlxm, (case t1.sfzjh when '-1' then '' else t1.sfzjh end ) as sfzjh, t1.mzm,t1.zzmmm,t1.sfzjlxm, (case t1.sfzjh when '-1' then '' else t1.sfzjh end ) as sfzjh,
t1.xlm,t1.xwm,t1.zcm,t1.bzlbm,t1.stage_id,t1.subject_id,t1.gwzym,t1.lxdh,t1.dzxx 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 from t_base_teacher as t1 inner join t_base_teacher_org as t3 on t1.person_id=t3.person_id
@ -406,6 +406,10 @@ func ExportTeacherInfoExcel(targetPath string, bureauId string, ExportExcelStatu
cName = cName + strconv.Itoa(i+2+ExcelUtil.HiddenRows) cName = cName + strconv.Itoa(i+2+ExcelUtil.HiddenRows)
f.SetCellValue(SheetName, cName, list[i][colNames[j]]) f.SetCellValue(SheetName, cName, list[i][colNames[j]])
} }
//单独填充上person_id,为了能在没有身份号的唯一标识的情况下,确定是新增还是修改
cName := "N"
cName = cName + strconv.Itoa(i+2+ExcelUtil.HiddenRows)
f.SetCellValue(SheetName, cName, list[i]["person_id"])
} }
} }
// 根据指定路径保存文件 // 根据指定路径保存文件

@ -164,6 +164,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.0.0-20180707235734-242fa5aa1b45 h1:UW8VerkZA1zCt3uWhQ2wbMae76OLn7s7Utz8wyKtJUk= github.com/denisenkom/go-mssqldb v0.0.0-20180707235734-242fa5aa1b45 h1:UW8VerkZA1zCt3uWhQ2wbMae76OLn7s7Utz8wyKtJUk=
github.com/denisenkom/go-mssqldb v0.0.0-20180707235734-242fa5aa1b45/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= github.com/denisenkom/go-mssqldb v0.0.0-20180707235734-242fa5aa1b45/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc=
github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4 h1:YcpmyvADGYw5LqMnHqSkyIELsHCGF6PkrmM31V8rF7o=
github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
@ -492,6 +493,7 @@ github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f/go.mod
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 h1:Bvq8AziQ5jFF4BHGAEDSqwPW1NJS3XshxbRCxtjFAZc= github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 h1:Bvq8AziQ5jFF4BHGAEDSqwPW1NJS3XshxbRCxtjFAZc=
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042/go.mod h1:TPpsiPUEh0zFL1Snz4crhMlBe60PYxRHr5oFF3rRYg0= github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042/go.mod h1:TPpsiPUEh0zFL1Snz4crhMlBe60PYxRHr5oFF3rRYg0=
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v0.0.0-20180523175426-90697d60dd84/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@ -831,6 +833,7 @@ github.com/xuri/efp v0.0.0-20200605144744-ba689101faaf/go.mod h1:uBiSUepVYMhGTfD
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/ziutek/mymysql v0.0.0-20171217234033-ff6cc86d3d93 h1:9FTtvPTze9lEFGp6f+WHfrHeThK+RZ7OjGMg3nAURsY= github.com/ziutek/mymysql v0.0.0-20171217234033-ff6cc86d3d93 h1:9FTtvPTze9lEFGp6f+WHfrHeThK+RZ7OjGMg3nAURsY=
github.com/ziutek/mymysql v0.0.0-20171217234033-ff6cc86d3d93/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= github.com/ziutek/mymysql v0.0.0-20171217234033-ff6cc86d3d93/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
go.etcd.io/bbolt v1.3.1-etcd.8/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.1-etcd.8/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v3.3.13+incompatible h1:jCejD5EMnlGxFvcGRyEV4VGlENZc7oPQX6o0t7n3xbw= go.etcd.io/etcd v3.3.13+incompatible h1:jCejD5EMnlGxFvcGRyEV4VGlENZc7oPQX6o0t7n3xbw=

@ -6,19 +6,19 @@ type TBaseStudentImportExcel struct {
StageId string `xorm:"not null comment('学部ID') CHAR(1)"` StageId string `xorm:"not null comment('学部ID') CHAR(1)"`
Rxnf int32 `xorm:"not null comment('入学年份') INT(11)"` Rxnf int32 `xorm:"not null comment('入学年份') INT(11)"`
Bh int32 `xorm:"not null comment('班号') INT(11)"` Bh int32 `xorm:"not null comment('班号') INT(11)"`
ClassId string `xorm:"not null comment('班级号') CHAR(36)"` ClassId string `xorm:"not null comment('班级号') index(class_id) CHAR(36)"`
Xm string `xorm:"not null default '''' comment('学生姓名') VARCHAR(100)"` Xm string `xorm:"not null default '''' comment('学生姓名') VARCHAR(100)"`
Mzm string `xorm:"not null default '''' comment('民族码') CHAR(2)"` Mzm string `xorm:"not null default '''' comment('民族码') CHAR(2)"`
Zzmmm string `xorm:"not null default '''' comment('政治面貌码') CHAR(2)"` Zzmmm string `xorm:"not null default '''' comment('政治面貌码') CHAR(2)"`
Sfzjlxm string `xorm:"not null default '''' comment('身份证件类型码') CHAR(1)"` Sfzjlxm string `xorm:"not null default '''' comment('身份证件类型码') CHAR(1)"`
Sfzjh string `xorm:"not null default '''' comment('身份证件号') VARCHAR(100)"` Sfzjh string `xorm:"not null default '''' comment('身份证件号') index(sfzjh) VARCHAR(100)"`
Dszybz int32 `xorm:"not null comment('独生子女') INT(11)"` Dszybz int32 `xorm:"not null comment('独生子女') INT(11)"`
Sqznbz int32 `xorm:"not null comment('随迁子女') INT(11)"` Sqznbz int32 `xorm:"not null comment('随迁子女') INT(11)"`
Jcwgrysqznbz int32 `xorm:"not null comment('进城务工人员子女') INT(11)"` Jcwgrysqznbz int32 `xorm:"not null comment('进城务工人员子女') INT(11)"`
Gebz int32 `xorm:"not null comment('孤儿') INT(11)"` Gebz int32 `xorm:"not null comment('孤儿') INT(11)"`
Lsetbz int32 `xorm:"not null comment('留守儿童') INT(11)"` Lsetbz int32 `xorm:"not null comment('留守儿童') INT(11)"`
Cjbz int32 `xorm:"not null comment('残疾儿童') INT(11)"` Cjbz int32 `xorm:"not null comment('残疾儿童') INT(11)"`
BatchId string `xorm:"not null comment('批次ID') CHAR(36)"` BatchId string `xorm:"not null comment('批次ID') index(class_id) index(sfzjh) CHAR(36)"`
RowNumber int32 `xorm:"not null default 0 comment('对应的EXCEL是第几行的数据') INT(11)"` RowNumber int32 `xorm:"not null default 0 comment('对应的EXCEL是第几行的数据') INT(11)"`
InsertOrUpdate int32 `xorm:"not null default 1 comment('是新增加还是修改1新增2:修改') INT(11)"` InsertOrUpdate int32 `xorm:"not null default 1 comment('是新增加还是修改1新增2:修改') INT(11)"`
} }

@ -26,6 +26,6 @@ type TBaseTeacher struct {
Gwzym string `xorm:"not null default '''' comment('岗位 (有字典)') CHAR(2)"` Gwzym string `xorm:"not null default '''' comment('岗位 (有字典)') CHAR(2)"`
Lxdh string `xorm:"not null default '''' comment('联系电话') index(lxdh) index(person_id_2) VARCHAR(100)"` Lxdh string `xorm:"not null default '''' comment('联系电话') index(lxdh) index(person_id_2) VARCHAR(100)"`
Dzxx string `xorm:"not null default '''' comment('电子信箱') index(dzxx) index(person_id_3) VARCHAR(100)"` Dzxx string `xorm:"not null default '''' comment('电子信箱') index(dzxx) index(person_id_3) VARCHAR(100)"`
BUse int32 `xorm:"not null default 1 comment('是否启用 0未启用 1启用') index(bureau_id) index(dzxx) index(lxdh) index(org_id) index(person_id) index(person_id_2) index(person_id_3) index(sfzjh) TINYINT(1)"` BUse int32 `xorm:"not null default 1 comment('是否启用 0未启用 1启用') index index(dzxx) index(lxdh) index index(person_id) index(person_id_2) index(person_id_3) index(sfzjh) TINYINT(1)"`
StateId int32 `xorm:"not null default 0 comment('教师状态码') INT(11)"` StateId int32 `xorm:"not null default 0 comment('教师状态码') INT(11)"`
} }

@ -1,12 +1,12 @@
package models package models
type TBaseTeacherImportExcel struct { type TBaseTeacherImportExcel struct {
Id string `xorm:"not null pk comment('ID') CHAR(36)"` Id string `xorm:"not null pk default ''0'' comment('ID') CHAR(36)"`
Xm string `xorm:"not null default '''' comment('教师姓名') VARCHAR(100)"` Xm string `xorm:"not null default '''' comment('教师姓名') VARCHAR(100)"`
Mzm string `xorm:"not null default '''' comment('民族码') CHAR(2)"` Mzm string `xorm:"not null default '''' comment('民族码') CHAR(2)"`
Zzmmm string `xorm:"not null default '''' comment('政治面貌码') CHAR(2)"` Zzmmm string `xorm:"not null default '''' comment('政治面貌码') CHAR(2)"`
Sfzjlxm string `xorm:"not null default '''' comment('身份证件类型码') CHAR(1)"` Sfzjlxm string `xorm:"not null default '''' comment('身份证件类型码') CHAR(1)"`
Sfzjh string `xorm:"not null default '''' comment('身份证件号') index(sfzjlxm) VARCHAR(100)"` Sfzjh string `xorm:"not null default '''' comment('身份证件号') index index(sfzjlxm) VARCHAR(100)"`
Xlm string `xorm:"not null default '''' comment('学历码') CHAR(2)"` Xlm string `xorm:"not null default '''' comment('学历码') CHAR(2)"`
Xwm string `xorm:"not null default '''' comment('学位码') CHAR(1)"` Xwm string `xorm:"not null default '''' comment('学位码') CHAR(1)"`
Zcm string `xorm:"not null default '''' comment('职称码') CHAR(1)"` Zcm string `xorm:"not null default '''' comment('职称码') CHAR(1)"`
@ -14,11 +14,12 @@ type TBaseTeacherImportExcel struct {
StageId string `xorm:"not null default '''' comment('主要任课学段') CHAR(1)"` StageId string `xorm:"not null default '''' comment('主要任课学段') CHAR(1)"`
SubjectId string `xorm:"not null default '''' comment('主要任课学科') CHAR(2)"` SubjectId string `xorm:"not null default '''' comment('主要任课学科') CHAR(2)"`
Gwzym string `xorm:"not null default '''' comment('岗位') CHAR(2)"` Gwzym string `xorm:"not null default '''' comment('岗位') CHAR(2)"`
Lxdh string `xorm:"not null default '''' comment('联系电话') VARCHAR(100)"` Lxdh string `xorm:"not null default '''' comment('联系电话') index VARCHAR(100)"`
Dzxx string `xorm:"not null default '''' comment('电子信箱') VARCHAR(100)"` Dzxx string `xorm:"not null default '''' comment('电子信箱') index VARCHAR(100)"`
OrgId string `xorm:"not null comment('部门ID') index(org_id) CHAR(36)"` OrgId string `xorm:"not null default '''' comment('部门ID') index(org_id) CHAR(36)"`
OrgName string `xorm:"not null comment('部门名称') index(org_name) VARCHAR(100)"` OrgName string `xorm:"not null default '''' comment('部门名称') index(org_name) VARCHAR(100)"`
BatchId string `xorm:"not null comment('批次ID') index index(org_id) index(org_name) index(sfzjlxm) CHAR(36)"` BatchId string `xorm:"not null default '''' comment('批次ID') index index(batch_id_2) index(org_id) index(org_name) index index(sfzjlxm) CHAR(36)"`
RowNumber int32 `xorm:"not null default 0 comment('对应的EXCEL是第几行的数据') INT(11)"` RowNumber int32 `xorm:"not null default 0 comment('对应的EXCEL是第几行的数据') INT(11)"`
InsertOrUpdate int32 `xorm:"not null default 1 comment('是新增加还是修改1新增2:修改') INT(11)"` InsertOrUpdate int32 `xorm:"not null default 1 comment('是新增加还是修改1新增2:修改') index(batch_id_2) INT(11)"`
PersonId string `xorm:"not null default '''' comment('人员ID') CHAR(36)"`
} }

Loading…
Cancel
Save