add:统计变更
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ public class CsrfFilter implements Filter {
|
||||
// 获取来源
|
||||
String referurl = req.getHeader("Referer");
|
||||
// websocket 请求放过
|
||||
if(isWhiteReq(referurl) || url.contains("/websocket/") || url.contains("download")){
|
||||
if(isWhiteReq(referurl) || url.contains("/websocket/") || url.contains("download")||referurl==null){
|
||||
chain.doFilter(request, response);
|
||||
} else {
|
||||
String log = "";
|
||||
|
||||
+6
@@ -189,4 +189,10 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
||||
|
||||
List<PrincipalPeopleDetail> queryPageListForPrincipalDetailTwo(@Param("principalPeopleDetailSearch") PrincipalPeopleDetailSearch principalPeopleDetailSearch,@Param("ids") ArrayList<String> ids);
|
||||
|
||||
AllMoney queryPageList33(@Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
AllMoney queryPageListForCompany33(@Param("companyComeMoneySearch") CompanyComeMoneySearch companyComeMoneySearch, @Param("idList") List<String> idList);
|
||||
|
||||
AllMoney queryPageListForCompanyDetail33(@Param("CompanyComeMoneyDetailSearch") CompanyComeMoneyDetailSearch companyComeMoneyDetailSearch, @Param("idList") List<String> idList);
|
||||
|
||||
}
|
||||
|
||||
+1626
-377
File diff suppressed because it is too large
Load Diff
+30
-22
@@ -85,6 +85,10 @@
|
||||
AND pwg.working_group_project LIKE
|
||||
concat('%',concat(#{payWorkingGroupSubletSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.year != null and payWorkingGroupSubletSearch.year != ''">
|
||||
AND pwgs.create_time LIKE
|
||||
concat(#{payWorkingGroupSubletSearch.year},'%')
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.chargeUse != null and payWorkingGroupSubletSearch.chargeUse != ''">
|
||||
AND pwgs.charge_use=#{payWorkingGroupSubletSearch.chargeUse}
|
||||
</if>
|
||||
@@ -112,17 +116,17 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
group by pwgs.id) pwg1
|
||||
inner join
|
||||
(select pwgs.id as id,working_group_id,max(ppr.payment_date) as payment_date
|
||||
from pay_working_group_subitem pwgs
|
||||
left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
<if test="payWorkingGroupSubletSearch.year !='' and payWorkingGroupSubletSearch.year !=null">
|
||||
WHERE ppr.payment_date like concat('%',#{payWorkingGroupSubletSearch.year},'%')
|
||||
</if>
|
||||
GROUP BY pwgs.id
|
||||
) pwg2 on (pwg2.id=pwg1.id)
|
||||
order by pwg2.payment_date
|
||||
group by pwgs.id) pwg1 order by pwg1.create_time desc
|
||||
<!-- inner join-->
|
||||
<!-- (select pwgs.id as id,working_group_id,max(ppr.payment_date) as payment_date-->
|
||||
<!-- from pay_working_group_subitem pwgs-->
|
||||
<!-- left join pay_payment_record ppr on(pwgs.id=ppr.project_id)-->
|
||||
<!-- <if test="payWorkingGroupSubletSearch.year !='' and payWorkingGroupSubletSearch.year !=null">-->
|
||||
<!-- WHERE ppr.payment_date like concat('%',#{payWorkingGroupSubletSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- GROUP BY pwgs.id-->
|
||||
<!-- ) pwg2 on (pwg2.id=pwg1.id)-->
|
||||
<!-- order by pwg2.payment_date-->
|
||||
</select>
|
||||
|
||||
<!-- 工作组详情导出 -->
|
||||
@@ -147,6 +151,10 @@
|
||||
AND pwg.working_group_project LIKE
|
||||
concat('%',concat(#{payWorkingGroupSubletSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.year != null and payWorkingGroupSubletSearch.year != ''">
|
||||
AND pwgs.create_time LIKE
|
||||
concat(#{payWorkingGroupSubletSearch.year},'%')
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.chargeUse != null and payWorkingGroupSubletSearch.chargeUse != ''">
|
||||
AND pwgs.charge_use=#{payWorkingGroupSubletSearch.chargeUse}
|
||||
</if>
|
||||
@@ -174,17 +182,17 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
group by pwgs.id) pwg1
|
||||
inner join
|
||||
(select pwgs.id as id,working_group_id,max(ppr.payment_date) as payment_date
|
||||
from pay_working_group_subitem pwgs
|
||||
left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
<if test="payWorkingGroupSubletSearch.year !='' and payWorkingGroupSubletSearch.year !=null">
|
||||
WHERE ppr.payment_date like concat('%',#{payWorkingGroupSubletSearch.year},'%')
|
||||
</if>
|
||||
GROUP BY pwgs.id
|
||||
) pwg2 on (pwg2.id=pwg1.id)
|
||||
order by pwg2.payment_date
|
||||
group by pwgs.id) pwg1 order by pwg1.create_time desc
|
||||
<!-- inner join-->
|
||||
<!-- (select pwgs.id as id,working_group_id,max(ppr.payment_date) as payment_date-->
|
||||
<!-- from pay_working_group_subitem pwgs-->
|
||||
<!-- left join pay_payment_record ppr on(pwgs.id=ppr.project_id)-->
|
||||
<!-- <if test="payWorkingGroupSubletSearch.year !='' and payWorkingGroupSubletSearch.year !=null">-->
|
||||
<!-- WHERE ppr.payment_date like concat('%',#{payWorkingGroupSubletSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- GROUP BY pwgs.id-->
|
||||
<!-- ) pwg2 on (pwg2.id=pwg1.id)-->
|
||||
<!-- order by pwg2.payment_date-->
|
||||
</select>
|
||||
<select id="queryCompanyPageList" resultType="com.jero.project.entity.PayWorkingGroupSubItem">
|
||||
select pwgs.*,pwg.working_group_project as chargeProject from pay_working_group_subitem pwgs
|
||||
|
||||
+6
@@ -220,4 +220,10 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
|
||||
*/
|
||||
IPage<AllProjectStatistics> queryPageListForProject(Page<AllProjectStatistics> page, AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList);
|
||||
|
||||
AllMoney queryPageList33(AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
AllMoney queryPageListForCompany33(CompanyComeMoneySearch companyComeMoneySearch, List<String> idList);
|
||||
|
||||
|
||||
AllMoney queryPageListForCompanyDetail33(CompanyComeMoneyDetailSearch companyComeMoneyDetailSearch, List<String> idList);
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: pay_research_project
|
||||
* @Author: jeecg-boot
|
||||
* @Author: jeecg-boot<
|
||||
* @Date: 2021-12-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
|
||||
+15
@@ -564,6 +564,21 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
||||
return payWorkingGroupMapper.queryPageList3(page,allProjectStatisticsSearch,idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllMoney queryPageList33(AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payWorkingGroupMapper.queryPageList33(allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllMoney queryPageListForCompany33(CompanyComeMoneySearch companyComeMoneySearch,List<String> idList) {
|
||||
return payWorkingGroupMapper.queryPageListForCompany33(companyComeMoneySearch,idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllMoney queryPageListForCompanyDetail33(CompanyComeMoneyDetailSearch companyComeMoneyDetailSearch, List<String> idList) {
|
||||
return payWorkingGroupMapper.queryPageListForCompanyDetail33(companyComeMoneyDetailSearch,idList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description 校验是存在关联合同的项目
|
||||
|
||||
+22
-17
@@ -15,6 +15,7 @@ import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.statistics.entity.AllMoney;
|
||||
import com.jero.statistics.entity.AllProjectStatistics;
|
||||
import com.jero.statistics.entity.AllProjectStatisticsSearch;
|
||||
import com.jero.util.AmountUtil;
|
||||
@@ -96,12 +97,12 @@ public class AllProjectStatisticsController {
|
||||
Page<AllProjectStatistics> page = new Page<>(pageNo, pageSize);
|
||||
IPage<AllProjectStatistics> pageList = payWorkingGroupService.queryPageList(page,allProjectStatisticsSearch, null );
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
double sum=0;
|
||||
double sumTwo =0;
|
||||
if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
}
|
||||
// double sum=0;
|
||||
// double sumTwo =0;
|
||||
// if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
// sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
// sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
// }
|
||||
DecimalFormat df = new DecimalFormat("#,##0.00");
|
||||
if (pageList.getRecords() != null) {
|
||||
for(AllProjectStatistics s: pageList.getRecords()){
|
||||
@@ -120,8 +121,10 @@ public class AllProjectStatisticsController {
|
||||
}
|
||||
|
||||
}
|
||||
hashMap.put("sumOfMoney", sum==0.0?sum:df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sumTwo==0.0?sumTwo:df.format(sumTwo));
|
||||
AllMoney allMoney = payWorkingGroupService.queryPageList33(allProjectStatisticsSearch);
|
||||
|
||||
hashMap.put("sumOfMoney", allMoney.getAllMoney());
|
||||
hashMap.put("sumOfReallyMoney",allMoney.getComeAllMoney());
|
||||
hashMap.put("pageList",pageList);
|
||||
return Result.OK(hashMap);
|
||||
|
||||
@@ -170,13 +173,13 @@ public class AllProjectStatisticsController {
|
||||
Page<AllProjectStatistics> page = new Page<>(pageNo, pageSize);
|
||||
IPage<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListForProject(page,allProjectStatisticsSearch,idList);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
double sum=0;
|
||||
double sumTwo =0;
|
||||
if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
}
|
||||
DecimalFormat df = new DecimalFormat("#,##0.00");
|
||||
// double sum=0;
|
||||
// double sumTwo =0;
|
||||
// if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
// sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
// sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
// }
|
||||
// DecimalFormat df = new DecimalFormat("#,##0.00");
|
||||
if (pageList.getRecords() != null) {
|
||||
for(AllProjectStatistics s: pageList.getRecords()){
|
||||
String key = String.valueOf(s.getChargeUse());
|
||||
@@ -194,8 +197,10 @@ public class AllProjectStatisticsController {
|
||||
}
|
||||
|
||||
}
|
||||
hashMap.put("sumOfMoney", sum==0.0?sum:df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sumTwo==0.0?sumTwo:df.format(sumTwo));
|
||||
AllMoney allMoney = payWorkingGroupService.queryPageList33(allProjectStatisticsSearch);
|
||||
|
||||
hashMap.put("sumOfMoney", allMoney.getAllMoney());
|
||||
hashMap.put("sumOfReallyMoney",allMoney.getComeAllMoney());
|
||||
hashMap.put("pageList",pageList);
|
||||
return Result.OK(hashMap);
|
||||
|
||||
|
||||
+20
-17
@@ -86,12 +86,12 @@ public class CompanyComeMoneyStatisticsController {
|
||||
Page<CompanyComeMoneyList> page = new Page<>(pageNo, pageSize);
|
||||
IPage<CompanyComeMoneyList> pageList = payWorkingGroupService.queryPageListForCompany(page,companyComeMoneySearch,null);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
double sum=0;
|
||||
double sumTwo =0;
|
||||
if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
}
|
||||
// double sum=0;
|
||||
// double sumTwo =0;
|
||||
// if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
// sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
// sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
// }
|
||||
//处理为空数据为0
|
||||
for(CompanyComeMoneyList s: pageList.getRecords()){
|
||||
if(s.getAllMoney()== null || s.getAllMoney().equals("") ){
|
||||
@@ -103,8 +103,10 @@ public class CompanyComeMoneyStatisticsController {
|
||||
|
||||
}
|
||||
DecimalFormat df = new DecimalFormat("#,##0.00");
|
||||
hashMap.put("sumOfMoney", sum==0.0?sum:df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sumTwo==0.0?sumTwo:df.format(sumTwo));
|
||||
AllMoney allMoney = payWorkingGroupService.queryPageListForCompany33(companyComeMoneySearch,null);
|
||||
|
||||
hashMap.put("sumOfMoney",allMoney.getAllMoney());
|
||||
hashMap.put("sumOfReallyMoney", allMoney.getComeAllMoney());
|
||||
hashMap.put("pageList",pageList);
|
||||
return Result.OK(hashMap);
|
||||
|
||||
@@ -160,13 +162,13 @@ public class CompanyComeMoneyStatisticsController {
|
||||
s.setChargeCompanyName(byId.getCompanyName());
|
||||
}
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
double sum=0;
|
||||
double sumTwo =0;
|
||||
if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
}
|
||||
DecimalFormat df = new DecimalFormat("#,##0.00");
|
||||
// double sum=0;
|
||||
// double sumTwo =0;
|
||||
// if(ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||
// sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null || t.getAllMoney().equals("") ? "0" : t.getAllMoney())).sum() : 0;
|
||||
// sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
// }
|
||||
// DecimalFormat df = new DecimalFormat("#,##0.00");
|
||||
for(CompanyComeMoneyDetail s: pageList.getRecords()){
|
||||
String key = String.valueOf(s.getChargeUse());
|
||||
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
|
||||
@@ -181,8 +183,9 @@ public class CompanyComeMoneyStatisticsController {
|
||||
s.setComeAllMoney("0.00");
|
||||
}
|
||||
}
|
||||
hashMap.put("sumOfMoney", sum == 0.0 ? sum : df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sumTwo == 0.0 ? sumTwo : df.format(sumTwo));
|
||||
AllMoney allMoney = payWorkingGroupService.queryPageListForCompanyDetail33(companyComeMoneyDetailSearch,null);
|
||||
hashMap.put("sumOfMoney",allMoney.getAllMoney());
|
||||
hashMap.put("sumOfReallyMoney",allMoney.getComeAllMoney());
|
||||
hashMap.put("pageList", pageList);
|
||||
return Result.OK(hashMap);
|
||||
}
|
||||
|
||||
+17
-1
@@ -103,7 +103,7 @@ public class PrincipalPeopleStatisticsController {
|
||||
sumTwo = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null || t.getComeAllMoney().equals("") ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
}
|
||||
//处理为空数据为0
|
||||
for(PrincipalPeopleList s: Objects.requireNonNull(pageList.getRecords())) {
|
||||
for(PrincipalPeopleList s: pageList.getRecords()) {
|
||||
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
||||
s.setAllMoney("0.00");
|
||||
}
|
||||
@@ -207,6 +207,16 @@ public class PrincipalPeopleStatisticsController {
|
||||
return AmountUtil.exportListXls(objects, PrincipalPeopleList.class, "个人来款");
|
||||
}
|
||||
List<PrincipalPeopleList> pageList = payWorkingGroupService.queryPageListForPrincipalExcel(principalPeopleSearch, idList);
|
||||
//处理为空数据为0
|
||||
for(PrincipalPeopleList s: pageList) {
|
||||
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
||||
s.setAllMoney("0.00");
|
||||
}
|
||||
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
|
||||
s.setComeAllMoney("0.00");
|
||||
}
|
||||
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PrincipalPeopleList.class, "个人来款");
|
||||
|
||||
}
|
||||
@@ -229,6 +239,12 @@ public class PrincipalPeopleStatisticsController {
|
||||
String key = String.valueOf(s.getChargeUse());
|
||||
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
|
||||
s.setChargeUse_text(payment_charge_use);
|
||||
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
||||
s.setAllMoney("0.00");
|
||||
}
|
||||
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
|
||||
s.setComeAllMoney("0.00");
|
||||
}
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PrincipalPeopleDetail.class, "个人来款详情");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
@Data
|
||||
public class AllMoney {
|
||||
|
||||
private String allMoney;
|
||||
|
||||
private String comeAllMoney;
|
||||
}
|
||||
+3
@@ -25,4 +25,7 @@ public class CompanyComeMoneyList {
|
||||
@Excel(name = "实收总金额", width = 15)
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
@Excel(name = "实收完成率", width = 15)
|
||||
@ApiModelProperty(value = "实收完成率")
|
||||
private String finishRate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user