提交 f2b6a7c8 authored 作者: gongwenjie's avatar gongwenjie

Merge branch 'master' of git.yfzx.zjtys.com.cn:zjm/notes2.0

# Conflicts: # notes-attendance/src/main/java/com/zjty/tynotes/attendance/service/impl/ApprovalInformationServiceImpl.java # notes-union/src/main/java/com/zjty/tynotes/union/UnionApplication.java # notes-union/src/main/resources/application.properties # notes-weekly/src/main/java/com/zjty/tynotes/weekly/subject/service/impl/UserManageServiceImpl.java
......@@ -97,5 +97,25 @@
</dependency>
</dependencies>
<build>
<plugins>
<!--打包插件-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
<!--跳过测试插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<skipTests>true</skipTests> <!--默认关掉单元测试 -->
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -2,8 +2,16 @@ package com.zjty.tynotes.attendance;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan(basePackages = {
"com.zjty.tynotes.misc",
"com.zjty.tynotes.pas",
"com.zjty.tynotes.search",
"com.zjty.tynotes.attendance"
})
public class NotesAttendanceApplication {
public static void main(String[] args) {
......
......@@ -183,7 +183,6 @@ public class MyInit implements CommandLineRunner {
if(user.getName().equals(user1.getUsername())){
dingUser2.setDingUserId(user.getUserid());
dingUser2.setUserId(user1.getId());
logger.error("错误加入集合");
dingUserList.add(dingUser2);
}
}
......
......@@ -226,4 +226,14 @@ public class WorkController {
return ResponseEntity.ok(workService.selectWorkToWorkOverTime(userId));
}
//
// @GetMapping(value = "/select/WorkOverTime/{userId}")
// @ApiOperation(value = "转发任务接口",notes = "转发任务")
// public ResponseEntity<> selectWorkOverTimeWorkId(@PathVariable("userId") String userId){
//
//
// String workId = workService.add(work);
// businessTreeManagement.saveAction(userId, workId, Action.PUBLISH_WORK, new Date(), remarks);
// return ResponseEntity.ok(workService.selectWorkToWorkOverTime(userId));
// }
}
package com.zjty.tynotes.job.basic.entity.request;
public class ForwardingWork {
/**
* 转发任务量
*/
/**
* 转发人员id
*/
/**
* 转发任务id
*/
}
......@@ -209,7 +209,7 @@ public class WorkServiceImpl implements WorkService {
ScoreCoefficient scoreCoefficient= scoreCoefficientService.findById(workId);
int workLoad= findBySuperoirIdCount(workId);
DecimalFormat df=new DecimalFormat("#.##");
double coefficient= Double.parseDouble(scoreCoefficient.getJustScore4());
double coefficient= (Double.parseDouble(scoreCoefficient.getJustScore4())+Double.parseDouble(scoreCoefficient.getViceScore3()))/2/100;
double getWorkLoad=workLoad*coefficient;
scoreCoefficient.setEndWorkLoad(Double.valueOf(df.format(getWorkLoad)));
scoreCoefficientService.modify(scoreCoefficient);
......
......@@ -89,13 +89,13 @@ public class InternalServiceImpl implements InternalService {
countOngoing++;
}
if (work.getStatus().equals(WorkStatus.FINISHED)){
if (work.getStatus().equals(WorkStatus.FINISHED)||work.getStatus().equals(WorkStatus.DELETE)){
countFinished++;
ScoreCoefficient scoreCoefficient= scoreCoefficientRepository.findByWordId(work.getId());
countWork=countWork+scoreCoefficient.getEndWorkLoad();
countScore=countScore+(Integer.valueOf(scoreCoefficient.getJustScore4())+Integer.valueOf(scoreCoefficient.getViceScore3()))/2;
if (work.getPWorkload()==1) {
ScoreCoefficient scoreCoefficient = scoreCoefficientRepository.findByWordId(work.getId());
countWork = countWork + scoreCoefficient.getEndWorkLoad();
countScore = countScore + (Integer.valueOf(scoreCoefficient.getJustScore4()) + Integer.valueOf(scoreCoefficient.getViceScore3())) / 2;
}
}
}
if (countFinished!=0){
......@@ -127,13 +127,14 @@ public class InternalServiceImpl implements InternalService {
countOngoing++;
}
if (work.getStatus().equals(WorkStatus.FINISHED)){
if (work.getStatus().equals(WorkStatus.FINISHED)||work.getStatus().equals(WorkStatus.DELETE)){
countFinished++;
ScoreCoefficient scoreCoefficient= scoreCoefficientRepository.findByWordId(work.getId());
countWork=countWork+scoreCoefficient.getEndWorkLoad();
countScore=countScore+(Integer.valueOf(scoreCoefficient.getJustScore4())+Integer.valueOf(scoreCoefficient.getViceScore3()))/2;
}
if (work.getPWorkload()==1) {
ScoreCoefficient scoreCoefficient = scoreCoefficientRepository.findByWordId(work.getId());
countWork = countWork + scoreCoefficient.getEndWorkLoad();
countScore = countScore + (Integer.valueOf(scoreCoefficient.getJustScore4()) + Integer.valueOf(scoreCoefficient.getViceScore3())) / 2;
}
}
}
if (countFinished!=0){
userWorkData.setAverageScore(countScore/countFinished);
......@@ -143,7 +144,7 @@ public class InternalServiceImpl implements InternalService {
userWorkData.setAverageScore(0d);
userWorkData.setAverageWorkNum(0d);
}
userWorkData.setCompletedNum(countOngoing);
userWorkData.setCompletedNum(countFinished);
userWorkData.setUnCompletedNum(countOngoing);
userWorkData.setUserId(userId);
return userWorkData;
......
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.service.WorkService;
......@@ -778,25 +779,26 @@ public class TestServiceImpl implements TestService {
}
}
pushData(work.getAudit(), JacksonUtil.toJSon(statisticalRoleCount(list)));
// if (majordomos.size()!=0) {
// for (String uId:sumIds) {
// list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + uId, 0, -1);
// for (Object object : list) {
// RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
// if (redisPersonalWork.getWorkId().equals(work.getId())) {
// redisTemplate.opsForList().remove(Constants.REDIS_EVENT + uId, 1, redisPersonalWork);
// redisPersonalWork.setReadState(1);
// redisPersonalWork.setIsNotCommission(1);
// redisPersonalWork.setTime(time);
// redisPersonalWork.setLatestNews(latestNews);
// redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + uId, redisPersonalWork);
// asynchronousAddEs(Constants.REDIS_EVENT + uId, redisPersonalWork);
// }
// }
// pushData(uId,JacksonUtil.toJSon(statisticalRoleCount(list)));
// }
// }
majordomos.remove(work.getAudit());
if (majordomos.size()!=0) {
for (String uId:majordomos) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + uId, 0, -1);
for (Object object : list) {
RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
if (redisPersonalWork.getWorkId().equals(work.getId())) {
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + uId, 1, redisPersonalWork);
redisPersonalWork.setReadState(1);
redisPersonalWork.setIsNotCommission(1);
redisPersonalWork.setTime(time);
redisPersonalWork.setLatestNews(latestNews);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + uId, redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + uId, redisPersonalWork);
}
}
pushData(uId,JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(uId);
}
}
sumIds.remove(work.getExecutor());
sumIds.remove(work.getAudit());
......@@ -834,14 +836,35 @@ public class TestServiceImpl implements TestService {
}
}
pushData(work.getAudit(), JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(work.getAudit());
if (majordomos.size()!=0) {
for (String uId:majordomos) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + uId, 0, -1);
ScoreCoefficient scoreCoefficient= scoreCoefficientRepository.findByWordId(work.getId());
if ((scoreCoefficient.getDirectorScore2()!=null && scoreCoefficient.getGroupLeaderScore2()!=null) && (!scoreCoefficient.getDirectorScore2().equals("") && !scoreCoefficient.getGroupLeaderScore2().equals(""))) { for (String id:assistantManagers){
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + id, 0, -1);
assert list != null;
for (Object object : list) {
RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
if (redisPersonalWork.getWorkId().equals(work.getId())) {
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + uId, 1, redisPersonalWork);
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + id, 1, redisPersonalWork);
redisPersonalWork.setReadState(1);
redisPersonalWork.setTime(time);
redisPersonalWork.setIsNotCommission(1);
redisPersonalWork.setLatestNews(latestNews);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + id, redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + id, redisPersonalWork);
}
}
pushData(id, JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(id);
}
}else {
if (majordomos.size()!=0) {
for (String uId:majordomos) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + uId, 0, -1);
for (Object object : list) {
RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
if (redisPersonalWork.getWorkId().equals(work.getId())) {
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + uId, 1, redisPersonalWork);
if (uId.equals(work.getAudit())){
redisPersonalWork.setReadState(0);
}else {
......@@ -850,37 +873,17 @@ public class TestServiceImpl implements TestService {
redisPersonalWork.setIsNotCommission(1);
redisPersonalWork.setTime(time);
redisPersonalWork.setLatestNews(latestNews);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + uId, redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + uId, redisPersonalWork);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + uId, redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + uId, redisPersonalWork);
}
}
pushData(uId,JacksonUtil.toJSon(statisticalRoleCount(list)));
pushData(uId,JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(uId);
}
}
}
// ScoreCoefficient scoreCoefficient= scoreCoefficientRepository.findById(work.getId()).get();
// if (scoreCoefficient.getDirectorScore2()!=null && scoreCoefficient.getGroupLeaderScore2()!=null){
// for (String id:assistantManagers){
// list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + id, 0, -1);
// assert list != null;
// for (Object object : list) {
// RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
// if (redisPersonalWork.getWorkId().equals(work.getId())) {
// redisTemplate.opsForList().remove(Constants.REDIS_EVENT + id, 1, redisPersonalWork);
// redisPersonalWork.setReadState(1);
// redisPersonalWork.setTime(time);
// redisPersonalWork.setIsNotCommission(1);
// redisPersonalWork.setLatestNews(latestNews);
// redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + id, redisPersonalWork);
// asynchronousAddEs(Constants.REDIS_EVENT + id, redisPersonalWork);
// }
// }
// pushData(id, JacksonUtil.toJSon(statisticalRoleCount(list)));
// }
//
// }
sumIds.remove(work.getAudit());
sumIds.removeAll(majordomos);
if (sumIds.size()!=0) {
for (String uId:sumIds) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + uId, 0, -1);
......@@ -901,20 +904,6 @@ public class TestServiceImpl implements TestService {
}
break;
case 3:
// list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + work.getAudit(), 0, -1);
// assert list != null;
// for (Object object : list) {
// RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
// if (redisPersonalWork.getWorkId().equals(work.getId())) {
// redisTemplate.opsForList().remove(Constants.REDIS_EVENT + work.getAudit(), 1, redisPersonalWork);
// redisPersonalWork.setReadState(1);
// redisPersonalWork.setTime(time);
// redisPersonalWork.setLatestNews(latestNews);
// redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + work.getAudit(), redisPersonalWork);
// asynchronousAddEs(Constants.REDIS_EVENT + work.getAudit(), redisPersonalWork);
// }
// }
// pushData(work.getAudit(), JacksonUtil.toJSon(statisticalRoleCount(list)));
if (majordomos.size()!=0) {
for (String uId:majordomos) {
......@@ -937,31 +926,49 @@ public class TestServiceImpl implements TestService {
}
}
pushData(uId,JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(uId);
}
}
if (assistantManagers.size()!=0) {
for (String id : assistantManagers) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + id, 0, -1);
scoreCoefficient= scoreCoefficientRepository.findByWordId(work.getId());
if ((scoreCoefficient.getDirectorScore2()!=null && scoreCoefficient.getGroupLeaderScore2()!=null) && (!scoreCoefficient.getDirectorScore2().equals("") && !scoreCoefficient.getGroupLeaderScore2().equals(""))) {
for (String id : assistantManagers) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + id, 0, -1);
assert list != null;
for (Object object : list) {
RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
if (redisPersonalWork.getWorkId().equals(work.getId())) {
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + id, 1, redisPersonalWork);
redisPersonalWork.setReadState(1);
redisPersonalWork.setTime(time);
redisPersonalWork.setIsNotCommission(1);
redisPersonalWork.setLatestNews(latestNews);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + id, redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + id, redisPersonalWork);
}
}
pushData(id, JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(id);
}
}else {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + work.getAudit(), 0, -1);
assert list != null;
for (Object object : list) {
RedisPersonalWork redisPersonalWork = (RedisPersonalWork) object;
if (redisPersonalWork.getWorkId().equals(work.getId())) {
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + id, 1, redisPersonalWork);
redisTemplate.opsForList().remove(Constants.REDIS_EVENT + work.getAudit(), 1, redisPersonalWork);
redisPersonalWork.setReadState(1);
redisPersonalWork.setTime(time);
redisPersonalWork.setIsNotCommission(1);
redisPersonalWork.setTime(time);
redisPersonalWork.setLatestNews(latestNews);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + id, redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + id, redisPersonalWork);
redisTemplate.opsForList().leftPush(Constants.REDIS_EVENT + work.getAudit(), redisPersonalWork);
asynchronousAddEs(Constants.REDIS_EVENT + work.getAudit(), redisPersonalWork);
}
}
pushData(id, JacksonUtil.toJSon(statisticalRoleCount(list)));
pushData(work.getAudit(), JacksonUtil.toJSon(statisticalRoleCount(list)));
sumIds.remove(work.getAudit());
}
}
sumIds.removeAll(assistantManagers);
sumIds.removeAll(majordomos);
if (sumIds.size()!=0) {
for (String uId:sumIds) {
list = redisTemplate.opsForList().range(Constants.REDIS_EVENT + uId, 0, -1);
......
......@@ -327,6 +327,23 @@ public class UserServiceImpl implements IUserService {
@Override
public List<User> findUserList(String userId,String authoryName){
List<String> departmentList = findDepartmentList(userId,authoryName);
String auth = "分解任务";
List<String> departmentList1 = findDepartmentList(userId,auth);
if(departmentList1!=null){
for (String de : departmentList1) {
if(departmentList!=null){
if(!departmentList.contains(de)){
departmentList.add(de);
}
}else{
departmentList = new ArrayList<>();
departmentList.add(de);
}
}
}
List<User> all = pasUserDao.findAll();
List<User> users = new ArrayList<>();
List<UserRole> userRoleList = userRoleDao.findAllByUserId(userId);
......@@ -797,6 +814,22 @@ public class UserServiceImpl implements IUserService {
}
}
}
if(majordomos==null || majordomos.size()==0){
if(assistantManagers!=null){
assistantManagers.forEach(str ->{
if(!majordomos.contains(str)){
majordomos.add(str);
}
});
}
if(generalManagers!=null){
generalManagers.forEach(str ->{
if(!majordomos.contains(str)){
majordomos.add(str);
}
});
}
}
jobLeads.setMajordomos(majordomos);
jobLeads.setAssistantManagers(assistantManagers);
jobLeads.setGeneralManagers(generalManagers);
......
......@@ -24,7 +24,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
"com.zjty.tynotes.weekly",
"com.zjty.tynotes.misc",
"com.zjty.tynotes.union"
, "com.zjty.tynotes.attendance"
// , "com.zjty.tynotes.attendance"
})
@EnableCaching
@EnableScheduling
......
......@@ -3,7 +3,7 @@ spring.application.name=workbook
# https端口号.
server.port=8289
# 证书的路径.
## 证书的路径.
server.ssl.key-store=classpath:2586377_workbook.zjtys.com.cn.pfx
# 证书密码,请修改为您自己证书的密码.
server.ssl.key-store-password=bMEPW9BG
......@@ -14,7 +14,7 @@ server.ssl.keyAlias= alias
#mongodb configuration
spring.data.mongodb.uri=mongodb://localhost:27017/notes2
spring.data.mongodb.uri=mongodb://localhost:27017/notes3
# servlet configuration
spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB
......
......@@ -3,16 +3,16 @@ spring.application.name=workbook
## https端口号.
server.port=8289
# 证书的路径.
#server.ssl.key-store=classpath:2586377_workbook.zjtys.com.cn.pfx
## 证书密码,请修改为您自己证书的密码.
#server.ssl.key-store-password=bMEPW9BG
## 秘钥库类型
#server.ssl.keyStoreType=PKCS12
## 证书别名
#server.ssl.keyAlias= alias
server.ssl.key-store=classpath:2586377_workbook.zjtys.com.cn.pfx
# 证书密码,请修改为您自己证书的密码.
server.ssl.key-store-password=bMEPW9BG
# 秘钥库类型
server.ssl.keyStoreType=PKCS12
# 证书别名
server.ssl.keyAlias= alias
#mongodb configuration
spring.data.mongodb.uri=mongodb://localhost:27017/notes2
spring.data.mongodb.uri=mongodb://localhost:27017/notes3
# servlet configuration
spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论