Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resource_api
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高宇
tea_resource_api
Commits
11727b7b
Commit
11727b7b
authored
Sep 03, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了bug
parent
d125e9f8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
34 deletions
+96
-34
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+3
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+27
-21
UnitServiceImpl.java
...cisoft/business/sysunit/service/impl/UnitServiceImpl.java
+2
-2
InitPasswordExcel.java
...soft/business/sysuser/entity/excel/InitPasswordExcel.java
+18
-0
PCSysUserServiceImpl.java
...t/business/sysuser/service/impl/PCSysUserServiceImpl.java
+21
-2
BLessonMapper.xml
...esources/mapper/business/blesson/mapper/BLessonMapper.xml
+3
-3
PCSysUserRepository.xml
...es/mapper/business/sysuser/mapper/PCSysUserRepository.xml
+22
-6
No files found.
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
11727b7b
...
...
@@ -286,6 +286,9 @@ public class BLesson extends CyIdEntity<BLesson> {
//前沿课堂分类标签
@TableField
(
exist
=
false
)
private
String
courseTypeLabels
;
//前沿课堂分类标签
@TableField
(
exist
=
false
)
private
String
courseTypeCLabels
;
@TableField
(
exist
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
beginTime
;
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
11727b7b
...
...
@@ -344,9 +344,9 @@ public class BLessonServiceImpl extends ServiceImpl<BLessonRepository, BLesson>
}
else
if
(
"1"
.
equals
(
model
.
getLessonType
()))
{
model
.
setLessonType
(
null
);
model
.
setLessonTypeSchool
(
"1"
);
//将课程类型给学校
model
.
setCourseTypeC
(
model
.
getCourseType
());
model
.
setCourseType
(
model
.
getCourseType
());
//
//将课程类型给学校
//
model.setCourseTypeC(model.getCourseType());
//
model.setCourseType(model.getCourseType());
}
else
if
(
"2"
.
equals
(
model
.
getLessonType
()))
{
model
.
setLessonType
(
"1"
);
model
.
setLessonTypeSchool
(
"1"
);
...
...
@@ -1147,6 +1147,11 @@ public class BLessonServiceImpl extends ServiceImpl<BLessonRepository, BLesson>
List
<
String
>
courseTypeLabels
=
getStrings
(
courseType
,
courseTypeList
);
bLesson
.
setCourseTypeLabels
(
String
.
join
(
","
,
courseTypeLabels
));
// 将名称集合拼接成逗号分隔的字符串,设置到 bLesson 对象中
}
String
courseTypeC
=
bLesson
.
getCourseTypeC
();
if
(
courseTypeC
!=
null
&&
!
courseTypeC
.
isEmpty
())
{
List
<
String
>
courseTypeCLabels
=
getStrings
(
courseTypeC
,
courseTypeList
);
bLesson
.
setCourseTypeCLabels
(
String
.
join
(
","
,
courseTypeCLabels
));
// 将名称集合拼接成逗号分隔的字符串,设置到 bLesson 对象中
}
String
courseDimensions
=
bLesson
.
getEnterpriseCourseDimensions
();
if
(
courseDimensions
!=
null
&&
!
courseDimensions
.
isEmpty
())
{
List
<
String
>
courseDimensionsLabels
=
getStrings
(
courseDimensions
,
courseDimensionsList
);
...
...
@@ -1932,31 +1937,32 @@ public class BLessonServiceImpl extends ServiceImpl<BLessonRepository, BLesson>
public
void
updateLessonAuditPrimary
(
BLesson
bLesson
)
{
String
auditState
=
bLesson
.
getAuditState
();
if
(
auditState
.
equals
(
"6"
))
{
//一级审核通过 二级审核通过 直接转成3 提交审核时直接进入二级审核
//一级审核通过 二级审核
未
通过 直接转成3 提交审核时直接进入二级审核
bLesson
.
setAuditState
(
"3"
);
//修改课程
bLessonRepository
.
updateById
(
bLesson
);
}
else
{
//修改课程
bLessonRepository
.
updateById
(
bLesson
);
//添加记录
AuditLogs
auditLogs
=
new
AuditLogs
();
//添加课程id
auditLogs
.
setLessonId
(
bLesson
.
getBusinessId
());
//审核时间
auditLogs
.
setAuditTime
(
new
Date
());
//审核结果
auditLogs
.
setAuditState
(
bLesson
.
getAuditState
());
//审核意见
if
(
"1"
.
equals
(
bLesson
.
getAuditState
()))
{
auditLogs
.
setAuditOpinion
(
"提交审核申请"
);
}
else
{
auditLogs
.
setAuditOpinion
(
"撤销提交审核申请"
);
}
//提交人id
auditLogs
.
setAuditUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
auditLogsRepository
.
insert
(
auditLogs
);
}
//添加记录
AuditLogs
auditLogs
=
new
AuditLogs
();
//添加课程id
auditLogs
.
setLessonId
(
bLesson
.
getBusinessId
());
//审核时间
auditLogs
.
setAuditTime
(
new
Date
());
//审核结果
auditLogs
.
setAuditState
(
bLesson
.
getAuditState
());
//审核意见
if
(
"1"
.
equals
(
bLesson
.
getAuditState
()))
{
auditLogs
.
setAuditOpinion
(
"提交审核申请"
);
}
else
{
auditLogs
.
setAuditOpinion
(
"撤销提交审核申请"
);
}
//提交人id
auditLogs
.
setAuditUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
auditLogsRepository
.
insert
(
auditLogs
);
}
}
src/main/java/org/rcisoft/business/sysunit/service/impl/UnitServiceImpl.java
View file @
11727b7b
...
...
@@ -120,8 +120,8 @@ public class UnitServiceImpl extends ServiceImpl<UnitRepository, SysUnit> implem
}
if
(
""
.
equals
(
sysUnit
.
getLessonType
())){
//都没选
sysUnit
.
setLessonType
(
"
0
"
);
sysUnit
.
setLessonTypeSchool
(
"
0
"
);
sysUnit
.
setLessonType
(
""
);
sysUnit
.
setLessonTypeSchool
(
""
);
}
else
if
(
"0"
.
equals
(
sysUnit
.
getLessonType
()))
{
//技术端
sysUnit
.
setLessonType
(
"1"
);
...
...
src/main/java/org/rcisoft/business/sysuser/entity/excel/InitPasswordExcel.java
View file @
11727b7b
...
...
@@ -18,4 +18,22 @@ public class InitPasswordExcel {
//密码
@Excel
(
name
=
"初始密码"
,
orderNum
=
"3"
,
width
=
20
)
private
String
password
;
//密码
@Excel
(
name
=
"性别"
,
orderNum
=
"4"
,
width
=
20
)
private
String
sex
;
//密码
@Excel
(
name
=
"手机号"
,
orderNum
=
"5"
,
width
=
20
)
private
String
phone
;
//密码
@Excel
(
name
=
"职位"
,
orderNum
=
"6"
,
width
=
20
)
private
String
position
;
//密码
@Excel
(
name
=
"状态"
,
orderNum
=
"7"
,
width
=
20
)
private
String
flag
;
//密码
@Excel
(
name
=
"角色"
,
orderNum
=
"8"
,
width
=
20
)
private
String
roleName
;
//密码
@Excel
(
name
=
"小组"
,
orderNum
=
"9"
,
width
=
20
)
private
String
groupName
;
}
src/main/java/org/rcisoft/business/sysuser/service/impl/PCSysUserServiceImpl.java
View file @
11727b7b
...
...
@@ -792,6 +792,8 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
List
<
String
>
roleNameIncorrect
=
new
ArrayList
<>();
//小组名称
List
<
String
>
groupNameIncorrect
=
new
ArrayList
<>();
//角色和小组名称都填了
List
<
String
>
choseNameIncorrect
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
pcUserImportDTOS
))
{
...
...
@@ -813,18 +815,26 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
if
(
StringUtils
.
isEmpty
(
pcUserImportDTO
.
getName
())
||
pcUserImportDTO
.
getName
().
length
()
>
20
)
{
errorNum
+=
1
;
nameIsIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
continue
;
}
//角色名称和小组名称只能填一个
if
(
StringUtils
.
isNotEmpty
(
pcUserImportDTO
.
getRoleNames
())
&&
StringUtils
.
isNotEmpty
(
pcUserImportDTO
.
getGroupNames
())){
//都填了
errorNum
+=
1
;
choseNameIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
continue
;
}
//角色名称长度
if
(
StringUtils
.
is
Empty
(
pcUserImportDTO
.
getRoleNames
())
||
pcUserImportDTO
.
getRoleNames
().
length
()
>
100
)
{
if
(
StringUtils
.
is
NotEmpty
(
pcUserImportDTO
.
getRoleNames
())
&&
pcUserImportDTO
.
getRoleNames
().
length
()
>
100
)
{
errorNum
+=
1
;
roleNameIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
continue
;
}
//小组名称长度
if
(
StringUtils
.
is
Empty
(
pcUserImportDTO
.
getGroupNames
())
||
pcUserImportDTO
.
getGroupNames
().
length
()
>
20
)
{
if
(
StringUtils
.
is
NotEmpty
(
pcUserImportDTO
.
getGroupNames
())
&&
pcUserImportDTO
.
getGroupNames
().
length
()
>
20
)
{
errorNum
+=
1
;
groupNameIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
...
...
@@ -988,6 +998,11 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
if
(
groupNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
groupNameIncorrect
)
+
"】条小组名称数据有问题"
));
}
//小组名称和角色名称都选了
if
(
choseNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
groupNameIncorrect
)
+
"】条角色和小组名称数据有问题"
));
}
return
successNum
+
"条数据导入成功,"
+
errorMessage
;
}
else
{
//list判断将登录名重复的拼接成stirng.stream流
...
...
@@ -1019,6 +1034,10 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
if
(
groupNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
groupNameIncorrect
)
+
"】条小组名称数据有问题"
));
}
//小组名称和角色名称都选了
if
(
choseNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
choseNameIncorrect
)
+
"】条角色和小组名称数据有问题"
));
}
throw
new
CyServiceException
(
"导入失败:"
+
errorMessage
);
}
}
else
{
...
...
src/main/resources/mapper/business/blesson/mapper/BLessonMapper.xml
View file @
11727b7b
...
...
@@ -74,9 +74,9 @@
<if
test=
"entity.courseType !=null and entity.courseType != '' "
>
and tln.course_type like concat('%',#{entity.courseType},'%')
</if>
<!-- <if test="entity.courseTypeC !=null and entity.courseTypeC != '' ">--
>
<!-- and tln.course_type_c like concat('%',#{entity.courseTypeC},'%')-->
<!-- </if>--
>
<if
test=
"entity.courseTypeC !=null and entity.courseTypeC != '' "
>
and tln.course_type_c like concat('%',#{entity.courseTypeC},'%')
</if
>
<if
test=
"entity.classPlan !=null and entity.classPlan != '' "
>
AND tln.class_plan like concat('%',#{entity.classPlan},'%')
</if>
...
...
src/main/resources/mapper/business/sysuser/mapper/PCSysUserRepository.xml
View file @
11727b7b
...
...
@@ -1797,13 +1797,29 @@
AND is_appraisal = 0
</select>
<select
id=
"exportInitPassword"
resultType=
"org.rcisoft.business.sysuser.entity.excel.InitPasswordExcel"
>
select username as username, name as name, init_password as password
from sys_user
select su.username,
su.name,
su.init_password,
CASE
WHEN su.sex = 0 THEN '男'
WHEN su.sex = 1 THEN '女'
ELSE '未知'
END AS sex,
su.phone,
su.position,
su.flag,
sr.role_name,
pg.name as group_name
from sys_user su
LEFT JOIN sys_user_role sur ON sur.user_id = su.business_id
LEFT JOIN sys_role sr ON sr.business_id = sur.role_id
LEFT JOIN pc_group_user pgu ON pgu.user_id = su.business_id
LEFT JOIN pc_group pg ON pgu.group_id = pg.business_id
where 1 = 1
and del_flag = 0
and dept_id = #{authenDept}
AND init_password is NOT NULL
and (
update_password = 0 or
update_password = 1)
and
su.
del_flag = 0
and
su.
dept_id = #{authenDept}
AND
su.
init_password is NOT NULL
and (
su.update_password = 0 or su.
update_password = 1)
</select>
<select
id=
"queryUnitCommonUser"
resultType=
"org.rcisoft.business.sysuser.dto.PCUnitUserDTO"
>
...
...
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