Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
23814581
Commit
23814581
authored
Feb 28, 2025
by
wangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2025-02-28
parent
a0a988c3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
6 deletions
+83
-6
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolTeacherBasicInformation.java
+11
-4
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolTeacherBasicInformationVo.java
+7
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolTeacherBasiclnExport.java
+7
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolNewTeacherDzdn/SchoolTeacherBasichlnformationServicelmpl.java
+37
-0
smart-campus/src/main/resources/file/教师基础信息导入模板.xlsx
+0
-0
smart-campus/src/main/resources/mapper/schoolNewTeacherDzdn/SchoolTeacherBasiclnformationMapper.xml
+21
-2
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolTeacherBasicInformation.java
View file @
23814581
...
...
@@ -48,7 +48,7 @@ public class SchoolTeacherBasicInformation extends BaseEntity {
* 档案出生日期 (年月)
*/
@Excel
(
name
=
"档案出生日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM
-dd
"
)
private
Date
fileBirthDate
;
...
...
@@ -57,6 +57,13 @@ public class SchoolTeacherBasicInformation extends BaseEntity {
*/
// private Integer fileAge;
/** 退休日期 (年月日) */
@Excel
(
name
=
"退休日期"
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
txDate
;
// /** 退休年龄 */
// @Excel(name = "退休年龄")
// private Integer txAge;
/**
* 出生年月
...
...
@@ -221,7 +228,7 @@ public class SchoolTeacherBasicInformation extends BaseEntity {
* 毕业时间1 年月
*/
@Excel
(
name
=
"毕业时间1"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM
-dd
"
)
private
Date
graduationTime1
;
/**
...
...
@@ -240,7 +247,7 @@ public class SchoolTeacherBasicInformation extends BaseEntity {
* 毕业时间2年月
*/
@Excel
(
name
=
"毕业时间2"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM
-dd
"
)
private
Date
graduationTime2
;
/**
...
...
@@ -259,7 +266,7 @@ public class SchoolTeacherBasicInformation extends BaseEntity {
* 毕业时间3 年月
*/
@Excel
(
name
=
"毕业时间3"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM
-dd
"
)
private
Date
graduationTime3
;
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolTeacherBasicInformationVo.java
View file @
23814581
...
...
@@ -63,6 +63,13 @@ public class SchoolTeacherBasicInformationVo extends BaseEntity {
@Excel
(
name
=
"档案年龄"
)
private
Integer
fileAge
;
/** 退休日期 (年月日) */
@Excel
(
name
=
"退休日期"
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
txDate
;
/** 退休年龄 */
@Excel
(
name
=
"退休年龄"
)
private
Integer
txAge
;
/**
* 出生年月
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolTeacherBasiclnExport.java
View file @
23814581
...
...
@@ -57,6 +57,13 @@ public class SchoolTeacherBasiclnExport {
@Excel
(
name
=
"档案年龄"
)
private
Integer
fileAge
;
/** 退休日期 (年月日) */
@Excel
(
name
=
"退休日期"
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
txDate
;
/** 退休年龄 */
@Excel
(
name
=
"退休年龄"
)
private
Integer
txAge
;
/**
* 出生年月
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolNewTeacherDzdn/SchoolTeacherBasichlnformationServicelmpl.java
View file @
23814581
...
...
@@ -85,6 +85,11 @@ public class SchoolTeacherBasichlnformationServicelmpl extends ServiceImpl<Schoo
date
.
setToSecondAge
(
gl
);
}
//4.计算退休年龄
if
(
null
!=
date
.
getFileBirthDate
()
&&
null
!=
date
.
getTxDate
()){
int
age
=
this
.
getTxAge
(
date
.
getFileBirthDate
(),
date
.
getTxDate
());
date
.
setTxAge
(
age
);
}
}
return
list
;
}
...
...
@@ -500,6 +505,13 @@ public class SchoolTeacherBasichlnformationServicelmpl extends ServiceImpl<Schoo
int
gl
=
this
.
workAge
(
sdf
.
parse
(
format
),
schoolTeacherBasicInformation
.
getLengthOfServiceTime
());
schoolTeacherBasicInformation
.
setSeniority
(
gl
);
}
//5.计算退休年龄
if
(
null
!=
schoolTeacherBasicInformation
.
getFileBirthDate
()
&&
null
!=
schoolTeacherBasicInformation
.
getTxDate
()){
int
age
=
this
.
getTxAge
(
schoolTeacherBasicInformation
.
getFileBirthDate
(),
schoolTeacherBasicInformation
.
getTxDate
());
schoolTeacherBasicInformation
.
setTxAge
(
age
);
}
return
schoolTeacherBasicInformation
;
}
...
...
@@ -1155,6 +1167,31 @@ public class SchoolTeacherBasichlnformationServicelmpl extends ServiceImpl<Schoo
return
age
;
}
//计算退休年龄
private
int
getTxAge
(
Date
birth
,
Date
txDate
){
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
txDate
);
int
txYear
=
cal
.
get
(
Calendar
.
YEAR
);
int
txMonth
=
cal
.
get
(
Calendar
.
MONTH
);
cal
.
setTime
(
birth
);
int
birthYear
=
cal
.
get
(
Calendar
.
YEAR
);
int
birthMonth
=
cal
.
get
(
Calendar
.
MONTH
);
int
age
=
txYear
-
birthYear
;
// 未足月
if
(
txMonth
<=
birthMonth
)
{
// 当月
if
(
txMonth
==
birthMonth
)
{
}
else
{
age
--;
}
}
return
age
;
}
//计算工龄
public
int
workAge
(
Date
nowTime
,
Date
workTime
)
throws
ParseException
{
int
year
=
0
;
...
...
smart-campus/src/main/resources/file/教师基础信息导入模板.xlsx
View file @
23814581
No preview for this file type
smart-campus/src/main/resources/mapper/schoolNewTeacherDzdn/SchoolTeacherBasiclnformationMapper.xml
View file @
23814581
...
...
@@ -4,11 +4,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationMapper"
>
<sql
id=
"selectSchoolTeacherBasicInformationVo"
>
select id, name, id_card, sex, file_birth_date, birth_date, hometown, nation, political_landscape, party_membership_time, teaching_subject, current_professional_title, current_professional_title_time, current_hiring_professional_title, current_hiring_professional_title_time, current_position, current_job_level, current_job_level_appointment_time, duties, teacher_qualification_type, teacher_qualification_certificate_num, working_hours, to_second_middle_school_time, length_of_teacher_time, length_of_service_time, on_duty_situation, current_situation, graduation_institution1, major1, graduation_time1, graduation_institution2, major2, graduation_time2, graduation_institution3, major3, graduation_time3, first_degree, last_degree, degree, work_experience, remark, photo_name, photo_url, dd_phone, del_flag from school_teacher_basic_information
select id, name, id_card, sex, file_birth_date, birth_date, hometown, nation, political_landscape,
party_membership_time, teaching_subject, current_professional_title, current_professional_title_time,
current_hiring_professional_title, current_hiring_professional_title_time, current_position,
current_job_level, current_job_level_appointment_time, duties, teacher_qualification_type,
teacher_qualification_certificate_num, working_hours, to_second_middle_school_time,
length_of_teacher_time, length_of_service_time, on_duty_situation, current_situation,
graduation_institution1, major1, graduation_time1, graduation_institution2, major2,
graduation_time2, graduation_institution3, major3, graduation_time3, first_degree, last_degree,
degree, work_experience, remark, photo_name, photo_url, dd_phone, del_flag, tx_date
from school_teacher_basic_information
</sql>
<select
id=
"list"
resultType=
"yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolTeacherBasicInformationVo"
parameterType=
"yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolTeacherBasicInformationVo"
>
select id, name, id_card, sex, file_birth_date, birth_date, hometown, nation, political_landscape, party_membership_time, teaching_subject, current_professional_title, current_professional_title_time, current_hiring_professional_title, current_hiring_professional_title_time, current_position, current_job_level, current_job_level_appointment_time, duties, teacher_qualification_type, teacher_qualification_certificate_num, working_hours, to_second_middle_school_time, length_of_teacher_time, length_of_service_time, on_duty_situation, current_situation, graduation_institution1, major1, graduation_time1, graduation_institution2, major2, graduation_time2, graduation_institution3, major3, graduation_time3, first_degree, last_degree, degree, work_experience, remark, photo_name, photo_url, dd_phone, del_flag from school_teacher_basic_information
select id, name, id_card, sex, file_birth_date, birth_date, hometown, nation, political_landscape,
party_membership_time, teaching_subject, current_professional_title, current_professional_title_time,
current_hiring_professional_title, current_hiring_professional_title_time, current_position,
current_job_level, current_job_level_appointment_time, duties, teacher_qualification_type,
teacher_qualification_certificate_num, working_hours, to_second_middle_school_time,
length_of_teacher_time, length_of_service_time, on_duty_situation, current_situation,
graduation_institution1, major1, graduation_time1, graduation_institution2, major2,
graduation_time2, graduation_institution3, major3, graduation_time3, first_degree, last_degree,
degree, work_experience, remark, photo_name, photo_url, dd_phone, del_flag, tx_date
from school_teacher_basic_information
where del_flag = 0
<if
test=
"teachingSubject != null "
>
and teaching_subject = #{teachingSubject}
</if>
<if
test=
"name != null "
>
...
...
@@ -105,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"photoUrl != null"
>
photo_url = #{photoUrl},
</if>
<if
test=
"ddPhone != null"
>
dd_phone = #{ddPhone},
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
del_flag = #{delFlag},
</if>
<if
test=
"txDate != null"
>
tx_date = #{txDate},
</if>
</trim>
where id = #{id}
</update>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment