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
2c9d0bc9
Commit
2c9d0bc9
authored
May 07, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通过审核接口增加更改子任务及排课任务状态的判断,发布排课接口
parent
13e0fa98
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
114 additions
and
14 deletions
+114
-14
BArrangeController.java
...soft/business/barrange/controller/BArrangeController.java
+14
-2
BSubAgencyRepository.java
...g/rcisoft/business/barrange/dao/BSubAgencyRepository.java
+11
-0
BSubtaskRepository.java
...org/rcisoft/business/barrange/dao/BSubtaskRepository.java
+11
-0
BArrange.java
...n/java/org/rcisoft/business/barrange/entity/BArrange.java
+4
-0
BSubtask.java
...n/java/org/rcisoft/business/barrange/entity/BSubtask.java
+5
-0
BArrangeService.java
...rg/rcisoft/business/barrange/service/BArrangeService.java
+2
-0
BArrangeServiceImpl.java
...t/business/barrange/service/impl/BArrangeServiceImpl.java
+14
-0
BCompany.java
...n/java/org/rcisoft/business/bcompany/entity/BCompany.java
+5
-0
BCompanyServiceImpl.java
...t/business/bcompany/service/impl/BCompanyServiceImpl.java
+1
-1
BOpinionController.java
...soft/business/bopinion/controller/BOpinionController.java
+6
-6
BOpinionRepository.java
...org/rcisoft/business/bopinion/dao/BOpinionRepository.java
+2
-0
BOpinionService.java
...rg/rcisoft/business/bopinion/service/BOpinionService.java
+2
-2
BOpinionServiceImpl.java
...t/business/bopinion/service/impl/BOpinionServiceImpl.java
+34
-3
BSlScheduleRepository.java
...isoft/business/bslschedule/dao/BSlScheduleRepository.java
+3
-0
No files found.
src/main/java/org/rcisoft/business/barrange/controller/BArrangeController.java
View file @
2c9d0bc9
...
...
@@ -108,7 +108,7 @@ public class BArrangeController extends PaginationController<BArrange> {
data
.
getInfluenceReason
());
}
@ApiOperation
(
value
=
"
查看 集合"
,
notes
=
"查看单 集合
"
)
@ApiOperation
(
value
=
"
列表视图,通过教学单位code进行查询"
,
notes
=
"列表视图,通过教学单位code进行查询
"
)
@GetMapping
(
value
=
"/findDtoBybSubtaskId"
)
public
Result
findDtoBybSubtaskId
(
String
bSubtaskId
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
...
...
@@ -118,7 +118,7 @@ public class BArrangeController extends PaginationController<BArrange> {
}
@ApiOperation
(
value
=
"
查看 集合"
,
notes
=
"查看单 集合
"
)
@ApiOperation
(
value
=
"
列表视图,查询全部"
,
notes
=
"列表视图,查询全部
"
)
@GetMapping
(
value
=
"/findDtoByMany"
)
public
Result
findDtoByMany
(
String
agencyCode
,
String
name
,
String
termCode
,
String
teacherCode
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
...
...
@@ -138,4 +138,16 @@ public class BArrangeController extends PaginationController<BArrange> {
}
@ApiOperation
(
value
=
"发布"
,
notes
=
"发布"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
),})
@PostMapping
(
"/release"
)
public
Result
release
(
String
businessId
)
{
PersistModel
data
=
bArrangeServiceImpl
.
release
(
businessId
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
}
src/main/java/org/rcisoft/business/barrange/dao/BSubAgencyRepository.java
View file @
2c9d0bc9
package
org
.
rcisoft
.
business
.
barrange
.
dao
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.business.barrange.entity.BSubAgency
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
BSubAgencyRepository
extends
BaseMapper
<
BSubAgency
>
{
@Select
(
"SELECT DISTINCT(`status`) from b_sub_agency "
+
"where subtask_id = "
+
"(SELECT subtask_id FROM b_sub_agency where business_id = #{subAgencyId})"
)
List
<
String
>
querySubAgencyStatusBySubAgencyId
(
String
subAgencyId
);
@Select
(
"SELECT subtask_id FROM b_sub_agency where business_id = #{subAgencyId}"
)
String
querySubTaskIdBySubAgencyId
(
String
subAgencyId
);
}
src/main/java/org/rcisoft/business/barrange/dao/BSubtaskRepository.java
View file @
2c9d0bc9
package
org
.
rcisoft
.
business
.
barrange
.
dao
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.business.barrange.entity.BSubtask
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
BSubtaskRepository
extends
BaseMapper
<
BSubtask
>
{
@Select
(
"SELECT DISTINCT(`status`) from b_subtask\n"
+
"where arrange_id = \n"
+
"(SELECT arrange_id FROM b_subtask where business_id = #{subTaskId})"
)
List
<
String
>
querySubTaskStatusById
(
String
subTaskId
);
@Select
(
"SELECT arrange_id FROM b_subtask where business_id = #{subTaskId}"
)
String
queryArrangeIdById
(
String
subTaskId
);
}
src/main/java/org/rcisoft/business/barrange/entity/BArrange.java
View file @
2c9d0bc9
...
...
@@ -46,5 +46,9 @@ public class BArrange extends IdEntity<BArrange> {
@Transient
private
List
<
BSubtask
>
childList
;
public
BArrange
(
String
businessId
,
String
status
)
{
this
.
businessId
=
businessId
;
this
.
status
=
status
;
}
}
src/main/java/org/rcisoft/business/barrange/entity/BSubtask.java
View file @
2c9d0bc9
...
...
@@ -38,5 +38,10 @@ public class BSubtask extends IdEntity<BSubtask> {
@Transient
private
String
agencyCode
;
public
BSubtask
(
String
businessId
,
String
status
)
{
this
.
businessId
=
businessId
;
this
.
status
=
status
;
}
}
src/main/java/org/rcisoft/business/barrange/service/BArrangeService.java
View file @
2c9d0bc9
...
...
@@ -52,4 +52,6 @@ public interface BArrangeService {
List
<
ScheduleDto
>
queryDtoByMany
(
String
agencyCode
,
String
name
,
String
termCode
,
String
teacherCode
);
int
changeArrangeToSl
(
String
businessId
,
String
subTaskId
,
String
termCode
);
PersistModel
release
(
String
businessId
);
}
src/main/java/org/rcisoft/business/barrange/service/impl/BArrangeServiceImpl.java
View file @
2c9d0bc9
...
...
@@ -215,6 +215,8 @@ public class BArrangeServiceImpl implements BArrangeService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
PersistModel
importExcel
(
HSSFWorkbook
hwb
,
String
token
,
String
subAgencyId
)
{
//先将原来的excel数据删除
ArrayList
<
ScheduleDto
>
scheduleDtos
=
new
ArrayList
<
ScheduleDto
>();
String
[]
headers
=
{
"方案计划名"
,
"方案人数"
,
"方案课组"
,
"课程号"
,
"课程名"
,
"开课院系"
,
"课程属性"
,
"总学分"
,
"总学时"
,
...
...
@@ -304,6 +306,9 @@ public class BArrangeServiceImpl implements BArrangeService {
BSubAgency
bSubAgency
=
new
BSubAgency
(
subAgencyId
,
"1"
);
bSubAgencyRepository
.
updateByPrimaryKeySelective
(
bSubAgency
);
//修改sl_schedule表状态为保存
bSlScheduleRepository
.
updateStatusBySubAgencyId
(
subAgencyId
,
"1"
);
}
...
...
@@ -399,6 +404,8 @@ public class BArrangeServiceImpl implements BArrangeService {
//复制章节及文件目录
chapterService
.
addBslFormLesson
(
null
,
sl
.
getLessonCode
(),
sl
.
getBusinessId
());
}
BSubtask
bSubtask
=
new
BSubtask
(
subTaskId
,
"5"
);
bSubtaskRepository
.
updateByPrimaryKeySelective
(
bSubtask
);
//将子任务状态置为已开课
bTermRepository
.
MaxSlCodeByTermCode
(
termCode
,
String
.
valueOf
(
maxSlCode
));
//将该学期的开课序号存入
bDirectionRepository
.
insertList
(
bLessonDirections
);
//批量插入课程方向
//批量插入
...
...
@@ -407,4 +414,11 @@ public class BArrangeServiceImpl implements BArrangeService {
return
result
;
}
@Override
public
PersistModel
release
(
String
businessId
)
{
BArrange
bArrange
=
new
BArrange
(
businessId
,
"2"
);
int
line
=
bArrangeRepository
.
updateByPrimaryKeySelective
(
bArrange
);
return
new
PersistModel
(
line
);
}
}
src/main/java/org/rcisoft/business/bcompany/entity/BCompany.java
View file @
2c9d0bc9
...
...
@@ -44,4 +44,9 @@ public class BCompany extends IdEntity<BCompany>{
this
.
flag
=
flag
;
}
public
BCompany
(
String
businessId
,
String
delFlag
)
{
this
.
businessId
=
businessId
;
this
.
delFlag
=
delFlag
;
}
}
src/main/java/org/rcisoft/business/bcompany/service/impl/BCompanyServiceImpl.java
View file @
2c9d0bc9
...
...
@@ -106,7 +106,7 @@ public class BCompanyServiceImpl implements BCompanyService{
@Override
public
PersistModel
stopOrStartUser
(
String
businessId
)
{
String
status
=
"1"
;
BCompany
nowStatus
=
bCompanyRepository
.
selectOne
(
new
BCompany
(
businessId
,
"0"
,
"1"
));
BCompany
nowStatus
=
bCompanyRepository
.
selectOne
(
new
BCompany
(
businessId
,
"0"
));
if
(
nowStatus
.
getFlag
().
equals
(
"1"
)){
status
=
"0"
;
}
...
...
src/main/java/org/rcisoft/business/bopinion/controller/BOpinionController.java
View file @
2c9d0bc9
...
...
@@ -38,10 +38,10 @@ public class BOpinionController extends PaginationController<BOpinion> {
}
@ApiOperation
(
value
=
"审核通过"
,
notes
=
"根据排课ID通过审核"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"
businessId"
,
value
=
"子任务
ID(1-50)"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"
subAgencyId"
,
value
=
"子任务中对应的教学单位
ID(1-50)"
,
required
=
true
,
dataType
=
"varchar"
)})
@PutMapping
(
value
=
"/auditPass"
)
public
Result
auditPass
(
@RequestParam
String
business
Id
){
PersistModel
data
=
bOpinionService
.
auditPass
(
business
Id
);
public
Result
auditPass
(
@RequestParam
String
subAgency
Id
){
PersistModel
data
=
bOpinionService
.
auditPass
(
subAgency
Id
);
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
...
...
@@ -49,11 +49,11 @@ public class BOpinionController extends PaginationController<BOpinion> {
}
@ApiOperation
(
value
=
"审核驳回"
,
notes
=
"审核驳回,填写审核意见"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"
i
d"
,
value
=
"子任务ID(1-50)"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"
subAgencyI
d"
,
value
=
"子任务ID(1-50)"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"opinion"
,
value
=
"审核意见(1-200)"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
"/auditFail"
)
public
Result
auditFail
(
String
opinion
,
String
i
d
){
PersistModel
data
=
bOpinionService
.
save
(
opinion
,
i
d
);
public
Result
auditFail
(
String
opinion
,
String
subAgencyI
d
){
PersistModel
data
=
bOpinionService
.
save
(
opinion
,
subAgencyI
d
);
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
...
...
src/main/java/org/rcisoft/business/bopinion/dao/BOpinionRepository.java
View file @
2c9d0bc9
...
...
@@ -6,12 +6,14 @@ import org.apache.ibatis.annotations.Update;
import
org.rcisoft.business.barrange.entity.BSubtask
;
import
org.rcisoft.business.bopinion.entity.BOpinion
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* Created by Administrator on 2017/12/21.
*/
@Repository
public
interface
BOpinionRepository
extends
BaseMapper
<
BOpinion
>
{
@Select
(
"select * from b_opinion where sl_id = #{slId} order by create_date DESC"
)
...
...
src/main/java/org/rcisoft/business/bopinion/service/BOpinionService.java
View file @
2c9d0bc9
...
...
@@ -12,8 +12,8 @@ public interface BOpinionService {
List
<
BOpinion
>
queryOpinionBySlId
(
String
slId
);
PersistModel
auditPass
(
String
business
Id
);
PersistModel
auditPass
(
String
subAgency
Id
);
PersistModel
save
(
String
opinion
,
String
i
d
);
PersistModel
save
(
String
opinion
,
String
subAgencyI
d
);
}
src/main/java/org/rcisoft/business/bopinion/service/impl/BOpinionServiceImpl.java
View file @
2c9d0bc9
package
org
.
rcisoft
.
business
.
bopinion
.
service
.
impl
;
import
org.rcisoft.business.barrange.dao.BArrangeRepository
;
import
org.rcisoft.business.barrange.dao.BSubAgencyRepository
;
import
org.rcisoft.business.barrange.dao.BSubtaskRepository
;
import
org.rcisoft.business.barrange.entity.BArrange
;
import
org.rcisoft.business.barrange.entity.BSubtask
;
import
org.rcisoft.business.bopinion.dao.BOpinionRepository
;
import
org.rcisoft.business.bopinion.entity.BOpinion
;
...
...
@@ -26,6 +30,15 @@ public class BOpinionServiceImpl implements BOpinionService{
@Autowired
private
BOpinionRepository
bOpinionRepository
;
@Autowired
private
BSubAgencyRepository
bSubAgencyRepository
;
@Autowired
private
BSubtaskRepository
bSubtaskRepository
;
@Autowired
private
BArrangeRepository
bArrangeRepository
;
@Override
public
List
<
BOpinion
>
queryOpinionBySlId
(
String
slId
)
{
return
bOpinionRepository
.
queryOpinionBySlId
(
slId
);
...
...
@@ -33,13 +46,31 @@ public class BOpinionServiceImpl implements BOpinionService{
/**
* 审核通过
* @param
business
Id
* @param
subAgency
Id
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
auditPass
(
String
businessId
)
{
int
line
=
bOpinionRepository
.
changeSubtaskStatus
(
businessId
);
public
PersistModel
auditPass
(
String
subAgencyId
)
{
//根据subTaskId查询
int
line
=
bOpinionRepository
.
changeSubtaskStatus
(
subAgencyId
);
//获得子任务id
String
subTaskId
=
bSubAgencyRepository
.
querySubTaskIdBySubAgencyId
(
subAgencyId
);
//根据subAgencyId查询子任务下每个教学单位的审核状态
List
<
String
>
subAgencyStatus
=
bSubAgencyRepository
.
querySubAgencyStatusBySubAgencyId
(
subAgencyId
);
if
(
subAgencyStatus
.
size
()==
1
&&
subAgencyStatus
.
get
(
0
).
equals
(
"3"
)){
//审核全部通过,将子任务状态置为通过
BSubtask
bSubtask
=
new
BSubtask
(
subTaskId
,
"3"
);
bSubtaskRepository
.
updateByPrimaryKeySelective
(
bSubtask
);
}
//查询该排课任务下所有子任务的状态
String
arrangeId
=
bSubtaskRepository
.
queryArrangeIdById
(
subTaskId
);
List
<
String
>
subTaskStatus
=
bSubtaskRepository
.
querySubTaskStatusById
(
subTaskId
);
if
(
subTaskStatus
.
size
()==
1
&&
subTaskStatus
.
get
(
0
).
equals
(
"3"
)){
//审核全部通过,将排课任务状态置为完成
BArrange
bArrange
=
new
BArrange
(
arrangeId
,
"3"
);
bArrangeRepository
.
updateByPrimaryKeySelective
(
bArrange
);
}
return
new
PersistModel
(
line
);
}
...
...
src/main/java/org/rcisoft/business/bslschedule/dao/BSlScheduleRepository.java
View file @
2c9d0bc9
...
...
@@ -44,5 +44,8 @@ public interface BSlScheduleRepository extends BaseMapper<BSlSchedule> {
@Update
(
"update b_sl_schedule set sl_id = #{slId} where sub_agency_id = #{subAgencyId} and del_flag = 0 and glag = 1"
)
int
updateSlIdBySubAgencyId
(
@Param
(
"slId"
)
String
slId
,
@Param
(
"subAgencyId"
)
String
subAgencyId
);
@Update
(
"update b_sl_schedule set status = #{status} where sub_agency_id = #{subAgencyId} and del_flag = 0 and glag = 1"
)
int
updateStatusBySubAgencyId
(
@Param
(
"subAgencyId"
)
String
subAgencyId
,
@Param
(
"status"
)
String
status
);
}
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