提交 7181a5e9 authored 作者: zjm's avatar zjm

提交版本

上级 8b1af424
流水线 #167 已取消 于阶段
...@@ -97,5 +97,25 @@ ...@@ -97,5 +97,25 @@
</dependency> </dependency>
</dependencies> </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> </project>
...@@ -2,8 +2,16 @@ package com.zjty.tynotes.attendance; ...@@ -2,8 +2,16 @@ package com.zjty.tynotes.attendance;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication @SpringBootApplication
@ComponentScan(basePackages = {
"com.zjty.tynotes.misc",
"com.zjty.tynotes.pas",
"com.zjty.tynotes.search",
"com.zjty.tynotes.attendance"
})
public class NotesAttendanceApplication { public class NotesAttendanceApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -33,7 +33,7 @@ public class ApprovalInformation { ...@@ -33,7 +33,7 @@ public class ApprovalInformation {
private String userId; private String userId;
@ApiModelProperty(value = "提交审批用户姓名",example = "1") @ApiModelProperty(value = "提交审批用户姓名",example = "1")
private String name; private String userName;
@ApiModelProperty(value = "审批用户id1",example = "1") @ApiModelProperty(value = "审批用户id1",example = "1")
private String approvalUserIdOne; private String approvalUserIdOne;
......
...@@ -259,6 +259,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic ...@@ -259,6 +259,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic
}else{ }else{
totalPage = (approvalInformations.size())/pageSize + 1; totalPage = (approvalInformations.size())/pageSize + 1;
} }
if(end>=approvalInformations.size()){
approvalInformations.subList(start,approvalInformations.size());
}else{
approvalInformations.subList(start,end);
}
pageResponse.setRows(approvalInformations); pageResponse.setRows(approvalInformations);
pageResponse.setTotalCount(approvalInformations.size()); pageResponse.setTotalCount(approvalInformations.size());
}else { }else {
...@@ -346,6 +351,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic ...@@ -346,6 +351,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic
}else{ }else{
totalPage = (approvalInformationList.size())/pageSize + 1; totalPage = (approvalInformationList.size())/pageSize + 1;
} }
if(end>=approvalInformationList.size()){
approvalInformationList.subList(start,approvalInformationList.size());
}else{
approvalInformationList.subList(start,end);
}
pageResponse.setRows(approvalInformationList); pageResponse.setRows(approvalInformationList);
pageResponse.setTotalCount(approvalInformationList.size()); pageResponse.setTotalCount(approvalInformationList.size());
}else { }else {
...@@ -424,6 +434,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic ...@@ -424,6 +434,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic
}else{ }else{
totalPage = (workoverAppros.size())/pageSize + 1; totalPage = (workoverAppros.size())/pageSize + 1;
} }
if(end>=workoverAppros.size()){
workoverAppros.subList(start,workoverAppros.size());
}else{
workoverAppros.subList(start,end);
}
pageResponse.setRows(workoverAppros); pageResponse.setRows(workoverAppros);
pageResponse.setTotalCount(workoverAppros.size()); pageResponse.setTotalCount(workoverAppros.size());
}else { }else {
...@@ -480,7 +495,7 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic ...@@ -480,7 +495,7 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic
} }
}); });
} }
workoverApproList.addAll(workoverAppros);
} }
if(workoverApproList!=null){ if(workoverApproList!=null){
int currentPage = pageRequest.getCurrentPage(); int currentPage = pageRequest.getCurrentPage();
...@@ -493,6 +508,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic ...@@ -493,6 +508,11 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic
}else{ }else{
totalPage = (workoverApproList.size())/pageSize + 1; totalPage = (workoverApproList.size())/pageSize + 1;
} }
if(end>=workoverApproList.size()){
workoverApproList.subList(start,workoverApproList.size());
}else{
workoverApproList.subList(start,end);
}
pageResponse.setRows(workoverApproList); pageResponse.setRows(workoverApproList);
pageResponse.setTotalCount(workoverApproList.size()); pageResponse.setTotalCount(workoverApproList.size());
}else { }else {
......
...@@ -183,7 +183,6 @@ public class MyInit implements CommandLineRunner { ...@@ -183,7 +183,6 @@ public class MyInit implements CommandLineRunner {
if(user.getName().equals(user1.getUsername())){ if(user.getName().equals(user1.getUsername())){
dingUser2.setDingUserId(user.getUserid()); dingUser2.setDingUserId(user.getUserid());
dingUser2.setUserId(user1.getId()); dingUser2.setUserId(user1.getId());
logger.error("错误加入集合");
dingUserList.add(dingUser2); dingUserList.add(dingUser2);
} }
} }
......
...@@ -226,4 +226,14 @@ public class WorkController { ...@@ -226,4 +226,14 @@ public class WorkController {
return ResponseEntity.ok(workService.selectWorkToWorkOverTime(userId)); 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 { ...@@ -209,7 +209,7 @@ public class WorkServiceImpl implements WorkService {
ScoreCoefficient scoreCoefficient= scoreCoefficientService.findById(workId); ScoreCoefficient scoreCoefficient= scoreCoefficientService.findById(workId);
int workLoad= findBySuperoirIdCount(workId); int workLoad= findBySuperoirIdCount(workId);
DecimalFormat df=new DecimalFormat("#.##"); 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; double getWorkLoad=workLoad*coefficient;
scoreCoefficient.setEndWorkLoad(Double.valueOf(df.format(getWorkLoad))); scoreCoefficient.setEndWorkLoad(Double.valueOf(df.format(getWorkLoad)));
scoreCoefficientService.modify(scoreCoefficient); scoreCoefficientService.modify(scoreCoefficient);
......
...@@ -89,13 +89,13 @@ public class InternalServiceImpl implements InternalService { ...@@ -89,13 +89,13 @@ public class InternalServiceImpl implements InternalService {
countOngoing++; countOngoing++;
} }
if (work.getStatus().equals(WorkStatus.FINISHED)){ if (work.getStatus().equals(WorkStatus.FINISHED)||work.getStatus().equals(WorkStatus.DELETE)){
countFinished++; countFinished++;
ScoreCoefficient scoreCoefficient= scoreCoefficientRepository.findByWordId(work.getId()); if (work.getPWorkload()==1) {
countWork=countWork+scoreCoefficient.getEndWorkLoad(); ScoreCoefficient scoreCoefficient = scoreCoefficientRepository.findByWordId(work.getId());
countWork = countWork + scoreCoefficient.getEndWorkLoad();
countScore=countScore+(Integer.valueOf(scoreCoefficient.getJustScore4())+Integer.valueOf(scoreCoefficient.getViceScore3()))/2; countScore = countScore + (Integer.valueOf(scoreCoefficient.getJustScore4()) + Integer.valueOf(scoreCoefficient.getViceScore3())) / 2;
}
} }
} }
if (countFinished!=0){ if (countFinished!=0){
...@@ -127,13 +127,14 @@ public class InternalServiceImpl implements InternalService { ...@@ -127,13 +127,14 @@ public class InternalServiceImpl implements InternalService {
countOngoing++; countOngoing++;
} }
if (work.getStatus().equals(WorkStatus.FINISHED)){ if (work.getStatus().equals(WorkStatus.FINISHED)||work.getStatus().equals(WorkStatus.DELETE)){
countFinished++; countFinished++;
ScoreCoefficient scoreCoefficient= scoreCoefficientRepository.findByWordId(work.getId()); if (work.getPWorkload()==1) {
countWork=countWork+scoreCoefficient.getEndWorkLoad(); ScoreCoefficient scoreCoefficient = scoreCoefficientRepository.findByWordId(work.getId());
countWork = countWork + scoreCoefficient.getEndWorkLoad();
countScore=countScore+(Integer.valueOf(scoreCoefficient.getJustScore4())+Integer.valueOf(scoreCoefficient.getViceScore3()))/2; countScore = countScore + (Integer.valueOf(scoreCoefficient.getJustScore4()) + Integer.valueOf(scoreCoefficient.getViceScore3())) / 2;
} }
}
} }
if (countFinished!=0){ if (countFinished!=0){
userWorkData.setAverageScore(countScore/countFinished); userWorkData.setAverageScore(countScore/countFinished);
...@@ -143,7 +144,7 @@ public class InternalServiceImpl implements InternalService { ...@@ -143,7 +144,7 @@ public class InternalServiceImpl implements InternalService {
userWorkData.setAverageScore(0d); userWorkData.setAverageScore(0d);
userWorkData.setAverageWorkNum(0d); userWorkData.setAverageWorkNum(0d);
} }
userWorkData.setCompletedNum(countOngoing); userWorkData.setCompletedNum(countFinished);
userWorkData.setUnCompletedNum(countOngoing); userWorkData.setUnCompletedNum(countOngoing);
userWorkData.setUserId(userId); userWorkData.setUserId(userId);
return userWorkData; return userWorkData;
......
...@@ -327,6 +327,23 @@ public class UserServiceImpl implements IUserService { ...@@ -327,6 +327,23 @@ public class UserServiceImpl implements IUserService {
@Override @Override
public List<User> findUserList(String userId,String authoryName){ public List<User> findUserList(String userId,String authoryName){
List<String> departmentList = findDepartmentList(userId,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> all = pasUserDao.findAll();
List<User> users = new ArrayList<>(); List<User> users = new ArrayList<>();
List<UserRole> userRoleList = userRoleDao.findAllByUserId(userId); List<UserRole> userRoleList = userRoleDao.findAllByUserId(userId);
...@@ -797,6 +814,22 @@ public class UserServiceImpl implements IUserService { ...@@ -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.setMajordomos(majordomos);
jobLeads.setAssistantManagers(assistantManagers); jobLeads.setAssistantManagers(assistantManagers);
jobLeads.setGeneralManagers(generalManagers); jobLeads.setGeneralManagers(generalManagers);
......
...@@ -24,7 +24,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -24,7 +24,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
"com.zjty.tynotes.weekly", "com.zjty.tynotes.weekly",
"com.zjty.tynotes.misc", "com.zjty.tynotes.misc",
"com.zjty.tynotes.union" "com.zjty.tynotes.union"
// ,"com.zjty.tynotes.attendance" ,"com.zjty.tynotes.attendance"
}) })
@EnableCaching @EnableCaching
@EnableScheduling @EnableScheduling
......
...@@ -3,7 +3,7 @@ spring.application.name=workbook ...@@ -3,7 +3,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
...@@ -14,7 +14,7 @@ server.ssl.keyAlias= alias ...@@ -14,7 +14,7 @@ server.ssl.keyAlias= alias
#mongodb configuration #mongodb configuration
spring.data.mongodb.uri=mongodb://localhost:27017/notes2 spring.data.mongodb.uri=mongodb://localhost:27017/notes3
# servlet configuration # servlet configuration
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB spring.servlet.multipart.max-request-size=1000MB
......
...@@ -12,15 +12,15 @@ server.ssl.keyStoreType=PKCS12 ...@@ -12,15 +12,15 @@ server.ssl.keyStoreType=PKCS12
server.ssl.keyAlias= alias server.ssl.keyAlias= alias
#mongodb configuration #mongodb configuration
spring.data.mongodb.uri=mongodb://192.168.1.246:27017/notes2 spring.data.mongodb.uri=mongodb://localhost:27017/notes3
# servlet configuration # servlet configuration
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB spring.servlet.multipart.max-request-size=1000MB
spring.redis.host=192.168.1.246 spring.redis.host=localhost
spring.redis.port=6379 spring.redis.port=6379
spring.redis.timeout=5000ms spring.redis.timeout=5000ms
# es configuraiton # es configuraiton
es.ip=192.168.1.246 es.ip=localhost
logging.file=./log/note.log logging.file=./log/note.log
...@@ -3,7 +3,9 @@ package com.zjty.tynotes.weekly.subject.controller; ...@@ -3,7 +3,9 @@ package com.zjty.tynotes.weekly.subject.controller;
import com.zjty.tynotes.misc.config.AutoDocument; import com.zjty.tynotes.misc.config.AutoDocument;
import com.zjty.tynotes.pas.entity.User; import com.zjty.tynotes.pas.entity.User;
import com.zjty.tynotes.pas.entity.vo.PageRequest; import com.zjty.tynotes.pas.entity.vo.PageRequest;
import com.zjty.tynotes.pas.entity.vo.PageResponse;
import com.zjty.tynotes.weekly.subject.entity.vo.Problem; import com.zjty.tynotes.weekly.subject.entity.vo.Problem;
import com.zjty.tynotes.weekly.subject.entity.vo.UserVo;
import com.zjty.tynotes.weekly.subject.service.UserManageService; import com.zjty.tynotes.weekly.subject.service.UserManageService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -18,6 +20,8 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.text.ParseException;
import static org.springframework.http.ResponseEntity.ok; import static org.springframework.http.ResponseEntity.ok;
/** /**
...@@ -45,7 +49,15 @@ public class UserManageController { ...@@ -45,7 +49,15 @@ public class UserManageController {
@ApiOperation(value = "查询人员列表", response = User.class) @ApiOperation(value = "查询人员列表", response = User.class)
@PostMapping("/findUserList") @PostMapping("/findUserList")
public ResponseEntity findUserList(@RequestBody PageRequest pageRequest) { public ResponseEntity findUserList(@RequestBody PageRequest pageRequest) {
return ok(userManageService.findUserList(pageRequest)); PageResponse<UserVo> userList = null;
try {
userList = userManageService.findUserList(pageRequest);
return ok(userList);
} catch (ParseException e) {
e.printStackTrace();
logger.error("查询人员列表失败:{}",e.getMessage());
}
return ok("查询人员列表失败");
} }
@ApiOperation(value = "根据权限查询可查看部门列表", response = User.class) @ApiOperation(value = "根据权限查询可查看部门列表", response = User.class)
......
...@@ -7,6 +7,7 @@ import com.zjty.tynotes.pas.entity.vo.PageResponse; ...@@ -7,6 +7,7 @@ import com.zjty.tynotes.pas.entity.vo.PageResponse;
import com.zjty.tynotes.weekly.subject.entity.vo.Problem; import com.zjty.tynotes.weekly.subject.entity.vo.Problem;
import com.zjty.tynotes.weekly.subject.entity.vo.UserVo; import com.zjty.tynotes.weekly.subject.entity.vo.UserVo;
import java.text.ParseException;
import java.util.List; import java.util.List;
/** /**
...@@ -26,7 +27,7 @@ public interface UserManageService { ...@@ -26,7 +27,7 @@ public interface UserManageService {
* @param pageRequest * @param pageRequest
* @return * @return
*/ */
PageResponse<UserVo> findUserList(PageRequest pageRequest); PageResponse<UserVo> findUserList(PageRequest pageRequest) throws ParseException;
/** /**
* 根据用户id查询可管理的部门列表 * 根据用户id查询可管理的部门列表
......
...@@ -19,6 +19,8 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; ...@@ -19,6 +19,8 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
...@@ -87,7 +89,8 @@ public class UserManageServiceImpl implements UserManageService { ...@@ -87,7 +89,8 @@ public class UserManageServiceImpl implements UserManageService {
* @return * @return
*/ */
@Override @Override
public PageResponse<UserVo> findUserList(PageRequest pageRequest) { public PageResponse<UserVo> findUserList(PageRequest pageRequest) throws ParseException {
DecimalFormat df = new DecimalFormat("#.00");
List<UserVo> userVos = new ArrayList<>(); List<UserVo> userVos = new ArrayList<>();
PageResponse<UserVo> pageResponse = new PageResponse(); PageResponse<UserVo> pageResponse = new PageResponse();
String deId = pageRequest.getDeId(); String deId = pageRequest.getDeId();
...@@ -155,18 +158,18 @@ public class UserManageServiceImpl implements UserManageService { ...@@ -155,18 +158,18 @@ public class UserManageServiceImpl implements UserManageService {
UserWorkData userWorkData = userWorkDataMap.get(user.getId()); UserWorkData userWorkData = userWorkDataMap.get(user.getId());
if(userWorkData!=null){ if(userWorkData!=null){
userVo.setAverageScore(userWorkData.getAverageScore()); userVo.setAverageScore(df.parse(df.format(userWorkData.getAverageScore())).doubleValue());
userVo.setCompletedCount(userWorkData.getCompletedNum()); userVo.setCompletedCount(userWorkData.getCompletedNum());
userVo.setWorkingCount(userWorkData.getUnCompletedNum()); userVo.setWorkingCount(userWorkData.getUnCompletedNum());
userVo.setAverageWorkNum(userWorkData.getAverageWorkNum()); userVo.setAverageWorkNum(df.parse(df.format(userWorkData.getAverageWorkNum())).doubleValue());
} }
}else{ }else{
UserWorkData userWorkData = internalService.personnelWorkMsg(user.getId(), pageRequest.getStartTime(), pageRequest.getEndTime()); UserWorkData userWorkData = internalService.personnelWorkMsg(user.getId(), pageRequest.getStartTime(), pageRequest.getEndTime());
if(userWorkData!=null){ if(userWorkData!=null){
userVo.setAverageScore(userWorkData.getAverageScore()); userVo.setAverageScore(df.parse(df.format(userWorkData.getAverageScore())).doubleValue());
userVo.setCompletedCount(userWorkData.getCompletedNum()); userVo.setCompletedCount(userWorkData.getCompletedNum());
userVo.setWorkingCount(userWorkData.getUnCompletedNum()); userVo.setWorkingCount(userWorkData.getUnCompletedNum());
userVo.setAverageWorkNum(userWorkData.getAverageWorkNum()); userVo.setAverageWorkNum(df.parse(df.format(userWorkData.getAverageWorkNum())).doubleValue());
} }
} }
userVos.add(userVo); userVos.add(userVo);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论