Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
notes2.0
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zjm
notes2.0
Commits
8b1efe10
提交
8b1efe10
authored
4月 10, 2020
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加了人员管理需要的service
上级
d9a4c59b
流水线
#128
已取消 于阶段
变更
9
流水线
1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
86 行增加
和
17 行删除
+86
-17
ScoreCoefficientRepository.java
...otes/job/basic/repository/ScoreCoefficientRepository.java
+1
-1
WorkRepository.java
...com/zjty/tynotes/job/basic/repository/WorkRepository.java
+15
-0
ScoreCoefficientServiceImpl.java
...s/job/basic/service/impl/ScoreCoefficientServiceImpl.java
+3
-8
InternalService.java
.../com/zjty/tynotes/job/status/service/InternalService.java
+9
-4
InternalServiceImpl.java
.../tynotes/job/status/service/impl/InternalServiceImpl.java
+54
-2
RepairServiceImpl.java
...ty/tynotes/job/status/service/impl/RepairServiceImpl.java
+2
-0
TestServiceImpl.java
...zjty/tynotes/job/status/service/impl/TestServiceImpl.java
+0
-0
Task.java
notes-job/src/main/java/com/zjty/tynotes/job/task/Task.java
+1
-1
application.properties
notes-union/src/main/resources/application.properties
+1
-1
没有找到文件。
notes-job/src/main/java/com/zjty/tynotes/job/basic/repository/ScoreCoefficientRepository.java
浏览文件 @
8b1efe10
...
@@ -8,7 +8,7 @@ import java.util.List;
...
@@ -8,7 +8,7 @@ import java.util.List;
@Repository
@Repository
public
interface
ScoreCoefficientRepository
extends
MongoRepository
<
ScoreCoefficient
,
String
>
{
public
interface
ScoreCoefficientRepository
extends
MongoRepository
<
ScoreCoefficient
,
String
>
{
List
<
ScoreCoefficient
>
findByWordId
(
String
workId
);
ScoreCoefficient
findByWordId
(
String
workId
);
List
<
ScoreCoefficient
>
findAllByGroupLeaderScore2IsNullOrDirectorScore2IsNull
();
List
<
ScoreCoefficient
>
findAllByGroupLeaderScore2IsNullOrDirectorScore2IsNull
();
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/repository/WorkRepository.java
浏览文件 @
8b1efe10
...
@@ -32,4 +32,19 @@ public interface WorkRepository extends MongoRepository<Work, String> {
...
@@ -32,4 +32,19 @@ public interface WorkRepository extends MongoRepository<Work, String> {
List
<
Work
>
findByAuditTimeBefore
(
Date
auditTime
);
List
<
Work
>
findByAuditTimeBefore
(
Date
auditTime
);
/**
* 根据人员id以及时间范围查询开始时间在范围里的任务
* @param id 人员id
* @param sTime 开始时间
* @param eTime 结束时间
* @return 集合
*/
List
<
Work
>
findAllByExecutorAndStateTimeBetween
(
String
id
,
Date
sTime
,
Date
eTime
);
/**
* 根据人员id以及的任务
* @param id 人员id
* @return 集合
*/
List
<
Work
>
findAllByExecutor
(
String
id
);
}
}
notes-job/src/main/java/com/zjty/tynotes/job/basic/service/impl/ScoreCoefficientServiceImpl.java
浏览文件 @
8b1efe10
...
@@ -60,14 +60,9 @@ public class ScoreCoefficientServiceImpl implements ScoreCoefficientService {
...
@@ -60,14 +60,9 @@ public class ScoreCoefficientServiceImpl implements ScoreCoefficientService {
@Override
@Override
public
ScoreCoefficient
findById
(
String
id
)
{
public
ScoreCoefficient
findById
(
String
id
)
{
List
<
ScoreCoefficient
>
scoreCoefficients
=
scoreCoefficientRepository
.
findByWordId
(
id
);
if
(
scoreCoefficients
.
size
()==
0
){
return
scoreCoefficientRepository
.
findByWordId
(
id
);
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/InternalService.java
浏览文件 @
8b1efe10
...
@@ -25,12 +25,17 @@ public interface InternalService {
...
@@ -25,12 +25,17 @@ public interface InternalService {
/**
/**
* 根据时间区间查找人员任务信息
* 根据时间区间查找人员任务信息
* @param userId
* @param userId
人员id
* @param startTime
* @param startTime
开始时间
* @param endTime
* @param endTime
结束时间
* @return
* @return
人员的任务信息
*/
*/
UserWorkData
personnelWorkMsg
(
String
userId
,
Date
startTime
,
Date
endTime
);
UserWorkData
personnelWorkMsg
(
String
userId
,
Date
startTime
,
Date
endTime
);
/**
* 查找人员id任务信息
* @param userId 人员id
* @return 人员的任务信息
*/
UserWorkData
personnelWorkMsgAll
(
String
userId
);
UserWorkData
personnelWorkMsgAll
(
String
userId
);
}
}
notes-job/src/main/java/com/zjty/tynotes/job/status/service/impl/InternalServiceImpl.java
浏览文件 @
8b1efe10
package
com
.
zjty
.
tynotes
.
job
.
status
.
service
.
impl
;
package
com
.
zjty
.
tynotes
.
job
.
status
.
service
.
impl
;
import
com.zjty.tynotes.job.basic.entity.database.ScoreCoefficient
;
import
com.zjty.tynotes.job.basic.entity.database.Work
;
import
com.zjty.tynotes.job.basic.repository.ScoreCoefficientRepository
;
import
com.zjty.tynotes.job.basic.repository.WorkRepository
;
import
com.zjty.tynotes.job.common.Constants
;
import
com.zjty.tynotes.job.common.Constants
;
import
com.zjty.tynotes.job.common.constant.WorkStatus
;
import
com.zjty.tynotes.job.common.constant.WorkStatus
;
import
com.zjty.tynotes.job.common.exception.WorkAttribution
;
import
com.zjty.tynotes.job.common.exception.WorkAttribution
;
...
@@ -11,6 +15,7 @@ import com.zjty.tynotes.job.status.service.InternalService;
...
@@ -11,6 +15,7 @@ import com.zjty.tynotes.job.status.service.InternalService;
import
com.zjty.tynotes.pas.service.IUserService
;
import
com.zjty.tynotes.pas.service.IUserService
;
import
com.zjty.tynotes.search.subject.service.EsUtil
;
import
com.zjty.tynotes.search.subject.service.EsUtil
;
import
com.zjty.tynotes.sms.service.MessageTemplateService
;
import
com.zjty.tynotes.sms.service.MessageTemplateService
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -26,6 +31,11 @@ public class InternalServiceImpl implements InternalService {
...
@@ -26,6 +31,11 @@ public class InternalServiceImpl implements InternalService {
@Autowired
@Autowired
IUserService
iUserService
;
IUserService
iUserService
;
@ApiModelProperty
WorkRepository
workRepository
;
@Autowired
ScoreCoefficientRepository
scoreCoefficientRepository
;
@Override
@Override
public
List
<
Personnel
>
personnels
(
List
<
String
>
list
)
{
public
List
<
Personnel
>
personnels
(
List
<
String
>
list
)
{
List
<
Personnel
>
personnels
=
new
ArrayList
<>();
List
<
Personnel
>
personnels
=
new
ArrayList
<>();
...
@@ -67,11 +77,53 @@ public class InternalServiceImpl implements InternalService {
...
@@ -67,11 +77,53 @@ public class InternalServiceImpl implements InternalService {
@Override
@Override
public
UserWorkData
personnelWorkMsg
(
String
userId
,
Date
startTime
,
Date
endTime
)
{
public
UserWorkData
personnelWorkMsg
(
String
userId
,
Date
startTime
,
Date
endTime
)
{
return
null
;
UserWorkData
userWorkData
=
new
UserWorkData
();
int
countOngoing
=
0
;
int
countFinished
=
0
;
Double
countScore
=
0
d
;
List
<
Work
>
works
=
workRepository
.
findAllByExecutorAndStateTimeBetween
(
userId
,
startTime
,
endTime
);
for
(
Work
work:
works
){
if
(
work
.
getStatus
().
equals
(
WorkStatus
.
ONGOING
)){
countOngoing
++;
}
if
(
work
.
getStatus
().
equals
(
WorkStatus
.
FINISHED
)){
countFinished
++;
ScoreCoefficient
scoreCoefficient
=
scoreCoefficientRepository
.
findByWordId
(
work
.
getId
());
countScore
=
countScore
+
scoreCoefficient
.
getEndWorkLoad
();
}
}
userWorkData
.
setAverageScore
(
countScore
/
countFinished
);
userWorkData
.
setCompletedNum
(
countOngoing
);
userWorkData
.
setUnCompletedNum
(
countOngoing
);
userWorkData
.
setUserId
(
userId
);
return
userWorkData
;
}
}
@Override
@Override
public
UserWorkData
personnelWorkMsgAll
(
String
userId
)
{
public
UserWorkData
personnelWorkMsgAll
(
String
userId
)
{
return
null
;
UserWorkData
userWorkData
=
new
UserWorkData
();
int
countOngoing
=
0
;
int
countFinished
=
0
;
Double
countScore
=
0
d
;
List
<
Work
>
works
=
workRepository
.
findAllByExecutor
(
userId
);
for
(
Work
work:
works
){
if
(
work
.
getStatus
().
equals
(
WorkStatus
.
ONGOING
)){
countOngoing
++;
}
if
(
work
.
getStatus
().
equals
(
WorkStatus
.
FINISHED
)){
countFinished
++;
ScoreCoefficient
scoreCoefficient
=
scoreCoefficientRepository
.
findByWordId
(
work
.
getId
());
countScore
=
countScore
+
scoreCoefficient
.
getEndWorkLoad
();
}
}
userWorkData
.
setAverageScore
(
countScore
/
countFinished
);
userWorkData
.
setCompletedNum
(
countOngoing
);
userWorkData
.
setUnCompletedNum
(
countOngoing
);
userWorkData
.
setUserId
(
userId
);
return
userWorkData
;
}
}
}
}
notes-job/src/main/java/com/zjty/tynotes/job/status/service/impl/RepairServiceImpl.java
浏览文件 @
8b1efe10
...
@@ -23,6 +23,7 @@ import java.util.List;
...
@@ -23,6 +23,7 @@ import java.util.List;
@Service
@Service
public
class
RepairServiceImpl
implements
RepairService
{
public
class
RepairServiceImpl
implements
RepairService
{
@Autowired
@Autowired
private
RedisTemplate
<
String
,
Object
>
redisTemplate
;
private
RedisTemplate
<
String
,
Object
>
redisTemplate
;
...
@@ -37,6 +38,7 @@ public class RepairServiceImpl implements RepairService {
...
@@ -37,6 +38,7 @@ public class RepairServiceImpl implements RepairService {
@Autowired
@Autowired
ScoreCoefficientService
scoreCoefficientService
;
ScoreCoefficientService
scoreCoefficientService
;
@Autowired
@Autowired
IUserService
iUserService
;
IUserService
iUserService
;
@Override
@Override
...
...
notes-job/src/main/java/com/zjty/tynotes/job/status/service/impl/TestServiceImpl.java
浏览文件 @
8b1efe10
差异被折叠。
点击展开。
notes-job/src/main/java/com/zjty/tynotes/job/task/Task.java
浏览文件 @
8b1efe10
...
@@ -81,7 +81,7 @@ public class Task {
...
@@ -81,7 +81,7 @@ public class Task {
sc
->{
sc
->{
Work
work
=
workService
.
findById
(
sc
.
getWordId
());
Work
work
=
workService
.
findById
(
sc
.
getWordId
());
if
(
sc
.
getTime
().
getTime
()<
finalTime1
){
if
(
sc
.
getTime
().
getTime
()<
finalTime1
){
String
score3
=
String
.
valueOf
(
Integer
.
valueOf
(
sc
.
getDirectorScore2
())+
Integer
.
valueOf
(
sc
.
getGroupLeaderScore2
())
);
String
score3
=
String
.
valueOf
(
(
Integer
.
valueOf
(
sc
.
getDirectorScore2
())+
Integer
.
valueOf
(
sc
.
getGroupLeaderScore2
()))/
2
);
sc
.
setViceScore3
(
score3
);
sc
.
setViceScore3
(
score3
);
sc
.
setTime
(
new
Date
());
sc
.
setTime
(
new
Date
());
businessTreeManagement
.
saveAction
(
work
.
getAssistantManagers
().
get
(
0
),
sc
.
getWordId
(),
Action
.
APPRAISAL_WORD
,
new
Date
(),
"副总经理评价"
);
businessTreeManagement
.
saveAction
(
work
.
getAssistantManagers
().
get
(
0
),
sc
.
getWordId
(),
Action
.
APPRAISAL_WORD
,
new
Date
(),
"副总经理评价"
);
...
...
notes-union/src/main/resources/application.properties
浏览文件 @
8b1efe10
...
@@ -2,7 +2,7 @@ spring.application.name=workbook
...
@@ -2,7 +2,7 @@ spring.application.name=workbook
## https端口号.
## https端口号.
server.port
=
8289
server.port
=
8289
#
#
证书的路径.
# 证书的路径.
server.ssl.key-store
=
classpath:2586377_workbook.zjtys.com.cn.pfx
server.ssl.key-store
=
classpath:2586377_workbook.zjtys.com.cn.pfx
# 证书密码,请修改为您自己证书的密码.
# 证书密码,请修改为您自己证书的密码.
server.ssl.key-store-password
=
bMEPW9BG
server.ssl.key-store-password
=
bMEPW9BG
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论