|
@@ -436,13 +436,13 @@ public class DeptAssessmentDeclarationController {
|
|
|
* @param startTime 开始时间
|
|
|
* @param endTime 结束时间
|
|
|
* @param deptId 部门主键
|
|
|
- * @param employeeId 人员主键
|
|
|
+ * @param employeeNo 人员编号
|
|
|
*/
|
|
|
@GetMapping(value = "/statisticalSummary")
|
|
|
public R statisticalSummary(@RequestParam(value = "startTime") String startTime,
|
|
|
@RequestParam(value = "endTime") String endTime,
|
|
|
@RequestParam(value = "deptId") String deptId,
|
|
|
- @RequestParam(value = "employeeId") String employeeId) {
|
|
|
+ @RequestParam(value = "employeeNo") String employeeNo) {
|
|
|
List<SummaryInformationDTO> summaryInformationDTOList = new ArrayList<>();
|
|
|
String[] startTimeArr = new String[2];
|
|
|
String[] endTimeArr = new String[2];
|
|
@@ -469,12 +469,13 @@ public class DeptAssessmentDeclarationController {
|
|
|
EvaluationDept evaluationDept = evaluationDeptService.getOne(qwDept);
|
|
|
List<DeptAssessmentDeclarationContent> deptAssessmentDeclarationContentList = deptAssessmentDeclarationContentService.detailsList(deptAssessmentDeclaration.getId());
|
|
|
for (DeptAssessmentDeclarationContent deptAssessmentDeclarationContent : deptAssessmentDeclarationContentList) {
|
|
|
- if (StringUtils.isNotEmpty(employeeId)) {
|
|
|
- if (employeeId.equals(deptAssessmentDeclarationContent.getEmployeeId())) {
|
|
|
+ if (StringUtils.isNotEmpty(employeeNo)) {
|
|
|
+ if (employeeNo.equals(deptAssessmentDeclarationContent.getEmployeeNo())) {
|
|
|
SummaryInformationDTO summaryInformationDTO = new SummaryInformationDTO();
|
|
|
summaryInformationDTO.setEmployeeNo(deptAssessmentDeclarationContent.getEmployeeNo());
|
|
|
summaryInformationDTO.setEmployeeName(deptAssessmentDeclarationContent.getEmployeeName());
|
|
|
summaryInformationDTO.setSuggestedValue(deptAssessmentDeclarationContent.getSuggestedValue());
|
|
|
+ summaryInformationDTO.setDeclarationMonth(deptAssessmentDeclaration.getDeclarationMonth());
|
|
|
summaryInformationDTO.setReportingDepartment(deptAssessmentDeclaration.getDeptName());
|
|
|
summaryInformationDTO.setDeclarationLevel(deptAssessmentDeclaration.getRatingGrade());
|
|
|
if (null != evaluationDept) {
|
|
@@ -487,6 +488,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
summaryInformationDTO.setEmployeeNo(deptAssessmentDeclarationContent.getEmployeeNo());
|
|
|
summaryInformationDTO.setEmployeeName(deptAssessmentDeclarationContent.getEmployeeName());
|
|
|
summaryInformationDTO.setSuggestedValue(deptAssessmentDeclarationContent.getSuggestedValue());
|
|
|
+ summaryInformationDTO.setDeclarationMonth(deptAssessmentDeclaration.getDeclarationMonth());
|
|
|
summaryInformationDTO.setReportingDepartment(deptAssessmentDeclaration.getDeptName());
|
|
|
summaryInformationDTO.setDeclarationLevel(deptAssessmentDeclaration.getRatingGrade());
|
|
|
if (null != evaluationDept) {
|
|
@@ -499,10 +501,13 @@ public class DeptAssessmentDeclarationController {
|
|
|
List<SummaryInformationDTO> list = new ArrayList<>();
|
|
|
Map<String, List<SummaryInformationDTO>> map = summaryInformationDTOList.stream().collect(Collectors.groupingBy(SummaryInformationDTO::getEmployeeNo));
|
|
|
map.forEach((key, value) -> {
|
|
|
- for (SummaryInformationDTO summaryInformationDTO : value) {
|
|
|
- summaryInformationDTO.setDeclarationsNumber(String.valueOf(value.size()));
|
|
|
- }
|
|
|
- list.addAll(value);
|
|
|
+ Map<Integer, List<SummaryInformationDTO>> map1 = value.stream().collect(Collectors.groupingBy(SummaryInformationDTO::getDeclarationMonth));
|
|
|
+ map1.forEach((key1, value1) -> {
|
|
|
+ for (SummaryInformationDTO summaryInformationDTO : value1) {
|
|
|
+ summaryInformationDTO.setDeclarationsNumber(String.valueOf(value1.size()));
|
|
|
+ }
|
|
|
+ list.addAll(value1);
|
|
|
+ });
|
|
|
});
|
|
|
list.sort(Comparator.comparing(SummaryInformationDTO::getSerialNumber, Comparator.nullsLast(Integer::compareTo)));
|
|
|
return R.ok().data(list);
|
|
@@ -514,7 +519,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
* @param startTime 开始时间
|
|
|
* @param endTime 结束时间
|
|
|
* @param deptId 部门主键
|
|
|
- * @param employeeId 人员主键
|
|
|
+ * @param employeeNo 人员编号
|
|
|
* @param response response
|
|
|
* @throws Exception 异常
|
|
|
*/
|
|
@@ -522,7 +527,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
public void generateStatisticalSummaryReports(@RequestParam(value = "startTime") String startTime,
|
|
|
@RequestParam(value = "endTime") String endTime,
|
|
|
@RequestParam(value = "deptId") String deptId,
|
|
|
- @RequestParam(value = "employeeId") String employeeId,
|
|
|
+ @RequestParam(value = "employeeNo") String employeeNo,
|
|
|
HttpServletResponse response) throws Exception {
|
|
|
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
|
|
response.setHeader("Content-disposition", "attachment; filename=".concat(URLEncoder.encode("绩效结果考核申报汇总表.xlsx", "UTF-8")));
|
|
@@ -555,12 +560,13 @@ public class DeptAssessmentDeclarationController {
|
|
|
EvaluationDept evaluationDept = evaluationDeptService.getOne(qwDept);
|
|
|
List<DeptAssessmentDeclarationContent> deptAssessmentDeclarationContentList = deptAssessmentDeclarationContentService.detailsList(deptAssessmentDeclaration.getId());
|
|
|
for (DeptAssessmentDeclarationContent deptAssessmentDeclarationContent : deptAssessmentDeclarationContentList) {
|
|
|
- if (StringUtils.isNotEmpty(employeeId)) {
|
|
|
- if (employeeId.equals(deptAssessmentDeclarationContent.getEmployeeId())) {
|
|
|
+ if (StringUtils.isNotEmpty(employeeNo)) {
|
|
|
+ if (employeeNo.equals(deptAssessmentDeclarationContent.getEmployeeNo())) {
|
|
|
SummaryInformationDTO summaryInformationDTO = new SummaryInformationDTO();
|
|
|
summaryInformationDTO.setEmployeeNo(deptAssessmentDeclarationContent.getEmployeeNo());
|
|
|
summaryInformationDTO.setEmployeeName(deptAssessmentDeclarationContent.getEmployeeName());
|
|
|
summaryInformationDTO.setSuggestedValue(deptAssessmentDeclarationContent.getSuggestedValue());
|
|
|
+ summaryInformationDTO.setDeclarationMonth(deptAssessmentDeclaration.getDeclarationMonth());
|
|
|
summaryInformationDTO.setReportingDepartment(deptAssessmentDeclaration.getDeptName());
|
|
|
summaryInformationDTO.setDeclarationLevel(deptAssessmentDeclaration.getRatingGrade());
|
|
|
if (null != evaluationDept) {
|
|
@@ -573,6 +579,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
summaryInformationDTO.setEmployeeNo(deptAssessmentDeclarationContent.getEmployeeNo());
|
|
|
summaryInformationDTO.setEmployeeName(deptAssessmentDeclarationContent.getEmployeeName());
|
|
|
summaryInformationDTO.setSuggestedValue(deptAssessmentDeclarationContent.getSuggestedValue());
|
|
|
+ summaryInformationDTO.setDeclarationMonth(deptAssessmentDeclaration.getDeclarationMonth());
|
|
|
summaryInformationDTO.setReportingDepartment(deptAssessmentDeclaration.getDeptName());
|
|
|
summaryInformationDTO.setDeclarationLevel(deptAssessmentDeclaration.getRatingGrade());
|
|
|
if (null != evaluationDept) {
|
|
@@ -585,10 +592,13 @@ public class DeptAssessmentDeclarationController {
|
|
|
List<SummaryInformationDTO> list = new ArrayList<>();
|
|
|
Map<String, List<SummaryInformationDTO>> map = summaryInformationDTOList.stream().collect(Collectors.groupingBy(SummaryInformationDTO::getEmployeeNo));
|
|
|
map.forEach((key, value) -> {
|
|
|
- for (SummaryInformationDTO summaryInformationDTO : value) {
|
|
|
- summaryInformationDTO.setDeclarationsNumber(String.valueOf(value.size()));
|
|
|
- }
|
|
|
- list.addAll(value);
|
|
|
+ Map<Integer, List<SummaryInformationDTO>> map1 = value.stream().collect(Collectors.groupingBy(SummaryInformationDTO::getDeclarationMonth));
|
|
|
+ map1.forEach((key1, value1) -> {
|
|
|
+ for (SummaryInformationDTO summaryInformationDTO : value1) {
|
|
|
+ summaryInformationDTO.setDeclarationsNumber(String.valueOf(value1.size()));
|
|
|
+ }
|
|
|
+ list.addAll(value1);
|
|
|
+ });
|
|
|
});
|
|
|
list.sort(Comparator.comparing(SummaryInformationDTO::getSerialNumber, Comparator.nullsLast(Integer::compareTo)));
|
|
|
ExcelUtils.createCollectExcel(list, startTimeArr[0], startTimeArr[1], endTimeArr[0], endTimeArr[1], response.getOutputStream());
|
|
@@ -602,11 +612,20 @@ public class DeptAssessmentDeclarationController {
|
|
|
*/
|
|
|
@GetMapping(value = "/participantsNumber/{id}")
|
|
|
public R participantsNumber(@PathVariable String id) {
|
|
|
- QueryWrapper<DeptAssessmentDeclarationContent> qw = new QueryWrapper<>();
|
|
|
+ QueryWrapper<DeptAssessmentDeclarationComplete> qwComplete = new QueryWrapper<>();
|
|
|
if (StringUtils.isNotEmpty(id)) {
|
|
|
- qw.lambda().like(DeptAssessmentDeclarationContent::getAssessmentDeclarationId, id);
|
|
|
+ qwComplete.lambda().eq(DeptAssessmentDeclarationComplete::getAssessmentDeclarationId, id);
|
|
|
+ }
|
|
|
+ int countComplete = deptAssessmentDeclarationCompleteService.list(qwComplete).size();
|
|
|
+ if (countComplete > 0) {
|
|
|
+ QueryWrapper<DeptAssessmentDeclarationContent> qwContent = new QueryWrapper<>();
|
|
|
+ if (StringUtils.isNotEmpty(id)) {
|
|
|
+ qwContent.lambda().eq(DeptAssessmentDeclarationContent::getAssessmentDeclarationId, id);
|
|
|
+ }
|
|
|
+ int countContent = deptAssessmentDeclarationContentService.list(qwContent).size();
|
|
|
+ return R.ok().data(countContent);
|
|
|
+ } else {
|
|
|
+ return R.error("未添加工作完成情况!");
|
|
|
}
|
|
|
- int count = deptAssessmentDeclarationContentService.list(qw).size();
|
|
|
- return R.ok().data(count);
|
|
|
}
|
|
|
}
|