update 打包项目维护-列表查询 新增总计
This commit is contained in:
+13
-7
@@ -26,6 +26,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
@@ -40,10 +41,7 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -110,8 +108,10 @@ public class PayPackCompanyProjectController extends JeroController<PayPackCompa
|
||||
input.setCompanyId(payPackCompany.getCompanyId());
|
||||
input.setPackYear(payPackCompany.getPackYear());
|
||||
List<PayCommonProject> list = payPackCompanyProjectService.queryListAll(input);
|
||||
BigDecimal sumOfReceivableAmount = BigDecimal.ZERO;
|
||||
BigDecimal sumOfPaidAmount = BigDecimal.ZERO;
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
list.forEach(p->{
|
||||
for (PayCommonProject p : list) {
|
||||
if(!StringUtils.isBlank(p.getPhone())){
|
||||
p.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
||||
}
|
||||
@@ -124,9 +124,15 @@ public class PayPackCompanyProjectController extends JeroController<PayPackCompa
|
||||
if(Objects.isNull(p.getPaidAmount())){
|
||||
p.setPaidAmount(new BigDecimal("0.00"));
|
||||
}
|
||||
});
|
||||
sumOfReceivableAmount = sumOfReceivableAmount.add(p.getReceivableAmount());
|
||||
sumOfPaidAmount = sumOfPaidAmount.add(p.getPaidAmount());
|
||||
}
|
||||
}
|
||||
return Result.OK(list);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("sumOfReceivableAmount", sumOfReceivableAmount);
|
||||
hashMap.put("sumOfPaidAmount", sumOfPaidAmount);
|
||||
hashMap.put("list", list);
|
||||
return Result.OK(hashMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user