补贴员工列表接口添加非空判断

master 22
hshansha 7 months ago
parent 634c4a3f78
commit aff95ee864

@ -1,14 +1,17 @@
/*
package com.ruoyi.test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
*/
/**
*
*
* @author Lion Li
*/
*//*
@DisplayName("断言单元测试案例")
public class AssertUnitTest {
@ -43,3 +46,4 @@ public class AssertUnitTest {
}
}
*/

@ -1,13 +1,16 @@
/*
package com.ruoyi.test;
import org.junit.jupiter.api.*;
import org.springframework.boot.test.context.SpringBootTest;
*/
/**
*
*
* @author Lion Li
*/
*//*
@SpringBootTest
@DisplayName("标签单元测试案例")
public class TagUnitTest {
@ -52,3 +55,4 @@ public class TagUnitTest {
}
*/

@ -151,6 +151,7 @@ public class PayButieEmplyeeController extends BaseController {
@SaCheckPermission("pay:butieEmplyee:list")
@GetMapping("/summary")
public TableDataInfo<ButieSummaryVo> summary(PayButieEmplyeeBo bo, PageQuery pageQuery) {
List<ButieSummaryVo> butieSummaryVos = new ArrayList<>();
String date;
if (null==(bo.getDate())) { // 默认查询本月的数据
date = DateUtil.format(new Date(), "yyyy-MM");
@ -161,12 +162,16 @@ public class PayButieEmplyeeController extends BaseController {
employeeInfo.setId(bo.getEmployeeId());
employeeInfo.setTenantId(bo.getTenantId());
TableDataInfo<PayEmployeeInfoVo> payEmployeeTableDataInfo = employeeInfoService.queryPageList(employeeInfo, pageQuery);
List<ButieSummaryVo> butieSummaryVos = this.buildEmployeeInfo(payEmployeeTableDataInfo.getRows(), date);
if(payEmployeeTableDataInfo.getRows()!=null&&payEmployeeTableDataInfo.getRows().size()>0){
butieSummaryVos = this.buildEmployeeInfo(payEmployeeTableDataInfo.getRows(), date);
}
return TableDataInfo.build(butieSummaryVos);
}
private List<ButieSummaryVo> buildEmployeeInfo(List<PayEmployeeInfoVo> list, String date) {
List<PayButieVo> sgrButies = butieService.queryList(new PayButieBo());
PayButieBo pb = new PayButieBo();
pb.setTenantId(list.get(0).getTenantId());
List<PayButieVo> sgrButies = butieService.queryList(pb);
ArrayList<ButieSummaryVo> summaryVos = new ArrayList<>();
list.parallelStream().forEachOrdered(emp -> {
ButieSummaryVo butieSummaryVo = new ButieSummaryVo();

Loading…
Cancel
Save