Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
notes2.0
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zjm
notes2.0
Commits
54bf77fb
提交
54bf77fb
authored
3月 08, 2020
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
d554338d
流水线
#50
已取消 于阶段
变更
5
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
25 行增加
和
5 行删除
+25
-5
ScController.java
...a/com/zjty/tynotes/job/basic/controller/ScController.java
+9
-0
ScoreCoefficientRepository.java
...otes/job/basic/repository/ScoreCoefficientRepository.java
+4
-1
ScoreCoefficientService.java
...ty/tynotes/job/basic/service/ScoreCoefficientService.java
+1
-1
ScoreCoefficientServiceImpl.java
...s/job/basic/service/impl/ScoreCoefficientServiceImpl.java
+10
-2
BusinessTreeManagementImpl.java
...s/job/status/service/impl/BusinessTreeManagementImpl.java
+1
-1
没有找到文件。
notes-job/src/main/java/com/zjty/tynotes/job/basic/controller/ScController.java
浏览文件 @
54bf77fb
...
...
@@ -47,6 +47,15 @@ public class ScController {
return
ok
(
new
JobResponse
(
saveId
));
}
@PostMapping
(
"/select"
)
@ApiOperation
(
value
=
"新增考评信息."
,
notes
=
"新增不可在数据中附带id.成功时返回新增数据保存的id."
)
public
ResponseEntity
<
ScoreCoefficient
>
add1
(
@RequestParam
String
workId
)
{
return
ok
(
scoreCoefficientService
.
findById
(
workId
));
}
@PutMapping
(
"/upDate"
)
@ApiOperation
(
value
=
"考评信息修改."
,
notes
=
"修改必须在数据中附带id."
)
public
ResponseEntity
<
JobResponse
>
modify
(
@RequestBody
ScoreCoefficient
scoreCoefficient
,
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/repository/ScoreCoefficientRepository.java
浏览文件 @
54bf77fb
...
...
@@ -3,8 +3,11 @@ package com.zjty.tynotes.job.basic.repository;
import
com.zjty.tynotes.job.basic.entity.database.ScoreCoefficient
;
import
org.springframework.data.mongodb.repository.MongoRepository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
ScoreCoefficientRepository
extends
MongoRepository
<
ScoreCoefficient
,
String
>
{
ScoreCoefficient
findByWordId
(
String
workId
);
List
<
ScoreCoefficient
>
findByWordId
(
String
workId
);
}
notes-job/src/main/java/com/zjty/tynotes/job/basic/service/ScoreCoefficientService.java
浏览文件 @
54bf77fb
...
...
@@ -33,7 +33,7 @@ public interface ScoreCoefficientService {
/**
* 查找指定id的
Work
* 查找指定id的
考评信息
*
* @param id 指定id
* @return ScoreCoefficient 对象
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/service/impl/ScoreCoefficientServiceImpl.java
浏览文件 @
54bf77fb
...
...
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Optional
;
import
static
java
.
util
.
Objects
.
isNull
;
...
...
@@ -59,7 +60,14 @@ public class ScoreCoefficientServiceImpl implements ScoreCoefficientService {
@Override
public
ScoreCoefficient
findById
(
String
id
)
{
Optional
<
ScoreCoefficient
>
scoreOptional
=
scoreCoefficientRepository
.
findById
(
id
);
return
scoreOptional
.
orElseThrow
(()
->
new
BadRequestException
(
String
.
format
(
"[job] 考评id为 %s 的数据不存在."
,
id
)));
List
<
ScoreCoefficient
>
scoreCoefficients
=
scoreCoefficientRepository
.
findByWordId
(
id
);
if
(
scoreCoefficients
.
size
()==
0
){
String
msg
=
"[job] 没有考评信息"
;
log
.
error
(
msg
);
throw
new
BadRequestException
(
msg
);
}
else
{
return
scoreCoefficients
.
get
(
0
);
}
}
}
notes-job/src/main/java/com/zjty/tynotes/job/status/service/impl/BusinessTreeManagementImpl.java
浏览文件 @
54bf77fb
...
...
@@ -180,7 +180,7 @@ public class BusinessTreeManagementImpl implements BusinessTreeManagement {
break
;
case
9
:
ScoreCoefficient
scoreCoefficient
=
scoreCoefficientRepository
.
findByWordId
(
noteResource
.
getTaskId
());
ScoreCoefficient
scoreCoefficient
=
scoreCoefficientRepository
.
findByWordId
(
noteResource
.
getTaskId
())
.
get
(
0
)
;
String
actionMsg
=
""
;
if
(
scoreCoefficient
.
getScore1
()!=
null
){
actionMsg
=
name
+
"对任务进行了自我评价"
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论