Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
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
李丛阳
education
Commits
daa195a0
Commit
daa195a0
authored
May 16, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'V2.0.3' of
http://103.249.252.28:90/lcy/education
into V2.0.3
parents
6db006ee
9a97ed2e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
14 deletions
+45
-14
BArrangeRepository.java
...org/rcisoft/business/barrange/dao/BArrangeRepository.java
+2
-0
BRoomsServiceImpl.java
...isoft/business/brooms/service/impl/BRoomsServiceImpl.java
+36
-7
BSlScheduleRepository.java
...isoft/business/bslschedule/dao/BSlScheduleRepository.java
+3
-0
ResultServiceEnums.java
...main/java/org/rcisoft/core/result/ResultServiceEnums.java
+2
-0
SysRoleServiceImpl.java
...org/rcisoft/sys/role/service/impl/SysRoleServiceImpl.java
+2
-7
brooms.xls
src/main/resources/excel-template/brooms.xls
+0
-0
room.xls
src/main/resources/excel-template/room.xls
+0
-0
No files found.
src/main/java/org/rcisoft/business/barrange/dao/BArrangeRepository.java
View file @
daa195a0
...
...
@@ -149,5 +149,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
@Update
(
"update b_arrange set del_flag = 1 where business_id = #{0}"
)
int
deleteArrange
(
String
businessId
);
@Select
(
"select count(*) from b_schedule_dto where room_code = ( select `code` from b_rooms where business_id = #{businessId})"
)
int
countThisRoomNum
(
String
businessId
);
}
src/main/java/org/rcisoft/business/brooms/service/impl/BRoomsServiceImpl.java
View file @
daa195a0
package
org
.
rcisoft
.
business
.
brooms
.
service
.
impl
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.rcisoft.business.barrange.dao.BArrangeRepository
;
import
org.rcisoft.business.brooms.utils.Upload2DataBase
;
import
org.rcisoft.business.bslschedule.dao.BSlScheduleRepository
;
import
org.rcisoft.business.bslschedule.entity.BSlSchedule
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.result.Result
;
...
...
@@ -39,6 +42,11 @@ public class BRoomsServiceImpl implements BRoomsService {
@Autowired
private
BRoomsRepository
bRoomsRepository
;
@Autowired
private
BSlScheduleRepository
bSlScheduleRepository
;
@Autowired
private
BArrangeRepository
bArrangeRepository
;
/**
* 保存 bRooms
...
...
@@ -70,12 +78,17 @@ public class BRoomsServiceImpl implements BRoomsService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
remove
(
BRooms
bRooms
){
UserUtil
.
setCurrentMergeOperation
(
bRooms
);
bRooms
.
setDeleted
();
int
line
=
bRoomsRepository
.
logicalDelete
(
bRooms
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
bRooms
.
getToken
(),
UserUtil
.
USER_USERNAME
)+
"逻辑删除了ID为"
+
bRooms
.
getBusinessId
()+
"的信息"
);
return
new
PersistModel
(
line
);
if
(
bArrangeRepository
.
countThisRoomNum
(
bRooms
.
getBusinessId
())
!=
0
||
bSlScheduleRepository
.
countThisRoomNum
(
bRooms
.
getBusinessId
())
!=
0
){
throw
new
ServiceException
(
ResultServiceEnums
.
ROOM_HAS_USED
);
}
else
{
UserUtil
.
setCurrentMergeOperation
(
bRooms
);
bRooms
.
setDeleted
();
int
line
=
bRoomsRepository
.
logicalDelete
(
bRooms
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
bRooms
.
getToken
(),
UserUtil
.
USER_USERNAME
)+
"逻辑删除了ID为"
+
bRooms
.
getBusinessId
()+
"的信息"
);
return
new
PersistModel
(
line
);
}
}
/**
...
...
@@ -135,6 +148,17 @@ public class BRoomsServiceImpl implements BRoomsService {
result
+=
"编号 "
+
value
[
1
]
+
" 在表中重复 "
;
continue
;
}
//Int最大值为2147483648,所以不能超过9位数
if
(
value
[
5
].
length
()
>=
9
){
result
+=
"编号 "
+
value
[
1
]
+
" 的数据座位数不合法 "
;
continue
;
}
try
{
int
seat
=
Integer
.
valueOf
(
value
[
5
]);
}
catch
(
Exception
e
){
result
+=
"编号 "
+
value
[
1
]
+
" 的数据座位数不合法 "
;
continue
;
}
BRooms
bRooms
=
new
BRooms
();
String
classroomName
=
""
;
if
(
value
[
0
].
equals
(
"校本部"
)){
...
...
@@ -179,13 +203,18 @@ public class BRoomsServiceImpl implements BRoomsService {
currentlyCode
.
add
(
value
[
1
]);
list
.
add
(
bRooms
);
}
int
flag
=
1
;
if
(!
result
.
equals
(
""
)){
flag
=
0
;
}
if
(
list
.
size
()
!=
0
){
int
i
=
bRoomsRepository
.
addExcel
(
list
);
result
+=
"成功插入了 "
+
i
+
"条数据"
;
}
else
{
result
+=
"没有输入被插入"
;
}
return
new
PersistModel
(
1
,
result
);
return
new
PersistModel
(
flag
,
result
);
}
}
src/main/java/org/rcisoft/business/bslschedule/dao/BSlScheduleRepository.java
View file @
daa195a0
...
...
@@ -51,5 +51,8 @@ public interface BSlScheduleRepository extends BaseMapper<BSlSchedule> {
int
updateStatusBySubAgencyId
(
@Param
(
"subAgencyId"
)
String
subAgencyId
,
@Param
(
"status"
)
String
status
);
int
countStudentNum
(
String
classesId
);
@Select
(
"select count(*) from b_sl_schedule where room_code = ( select `code` from b_rooms where business_id = #{businessId})"
)
int
countThisRoomNum
(
String
businessId
);
}
src/main/java/org/rcisoft/core/result/ResultServiceEnums.java
View file @
daa195a0
...
...
@@ -181,6 +181,8 @@ public enum ResultServiceEnums {
EXISE_ROOM_CODE
(
96
,
"此教室编号已存在,添加失败"
),
CURRENT_TERM
(
97
,
"当前学期不可删除"
),
ROOM_HAS_USED
(
98
,
"当前教室正在被使用,不可删除"
),
;
private
Integer
code
;
...
...
src/main/java/org/rcisoft/sys/role/service/impl/SysRoleServiceImpl.java
View file @
daa195a0
...
...
@@ -3,7 +3,6 @@ package org.rcisoft.sys.role.service.impl;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.DelStatus
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.ResultServiceEnums
;
...
...
@@ -74,12 +73,8 @@ public class SysRoleServiceImpl implements SysRoleService {
//删除该角色所有的关联信息
sysRoleRepository
.
deleteRoleMenuByRoleId
(
id
);
sysRoleRepository
.
deleteUserRoleByRoleId
(
id
);
SysRole
sysRole
=
sysRoleRepository
.
selectByPrimaryKey
(
id
);
sysRole
.
setDelFlag
(
DelStatus
.
DELETED
.
getStatus
());
UserUtil
.
setCurrentMergeOperation
(
sysRole
);
int
line
=
sysRoleRepository
.
updateByPrimaryKeySelective
(
sysRole
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
token
,
UserUtil
.
USER_USERNAME
)+
"删除了ID为"
+
sysRole
.
getBusinessId
()+
"的角色信息"
);
int
line
=
sysRoleRepository
.
deleteByPrimaryKey
(
id
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
token
,
UserUtil
.
USER_USERNAME
)+
"删除了ID为"
+
id
+
"的角色信息"
);
return
line
;
}
}
...
...
src/main/resources/excel-template/brooms.xls
deleted
100644 → 0
View file @
6db006ee
File deleted
src/main/resources/excel-template/room.xls
View file @
daa195a0
No preview for this file type
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