Jelajahi Sumber

代码优化

hlf 1 tahun lalu
induk
melakukan
85d815a259

+ 5 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptAssessmentDeclarationController.java

@@ -442,7 +442,7 @@ public class DeptAssessmentDeclarationController {
 	 * @throws Exception 异常
 	 */
 	@GetMapping(value = "/generateStatisticalSummaryReports/{annual}/{month}")
-	public void generateStatisticalSummaryReports(@PathVariable("annual") String annual, @PathVariable("month") String month, HttpServletResponse response) throws Exception {
+	public void generateStatisticalSummaryReports(@PathVariable("annual") Integer annual, @PathVariable("month") Integer month, 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")));
 		response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
@@ -450,11 +450,11 @@ public class DeptAssessmentDeclarationController {
 		response.setDateHeader("Expires", 0);
 		List<SummaryInformationDTO> summaryInformationDTOList = new ArrayList<>();
 		QueryWrapper<DeptAssessmentDeclaration> qw = new QueryWrapper<>();
-		if (StringUtils.isNotEmpty(annual)) {
-			qw.lambda().like(DeptAssessmentDeclaration::getAnnual, annual);
+		if (null != annual) {
+			qw.lambda().eq(DeptAssessmentDeclaration::getAnnual, annual);
 		}
-		if (StringUtils.isNotEmpty(month)) {
-			qw.lambda().like(DeptAssessmentDeclaration::getDeclarationMonth, month);
+		if (null != month) {
+			qw.lambda().eq(DeptAssessmentDeclaration::getDeclarationMonth, month);
 		}
 		List<DeptAssessmentDeclaration> deptAssessmentDeclarationList = deptAssessmentDeclarationService.list(qw);
 		for (DeptAssessmentDeclaration deptAssessmentDeclaration : deptAssessmentDeclarationList) {

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/util/ExcelUtils.java

@@ -257,7 +257,7 @@ public class ExcelUtils {
 	 * @param outputStream              输出流
 	 * @throws IOException 异常
 	 */
-	public static void createCollectExcel(List<SummaryInformationDTO> summaryInformationDTOList, String annual, String month, OutputStream outputStream) throws IOException {
+	public static void createCollectExcel(List<SummaryInformationDTO> summaryInformationDTOList, Integer annual, Integer month, OutputStream outputStream) throws IOException {
 		Workbook workbook = new XSSFWorkbook();
 		Sheet sheet = workbook.createSheet("Sheet1");