update 会所收入统计

This commit is contained in:
邝凯兴
2022-07-29 11:40:01 +08:00
parent d8be00fbf2
commit e224733e9c
6 changed files with 40 additions and 16 deletions
@@ -218,5 +218,5 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
AllMoney queryPageListDepartment33(@Param("departStatisticsSearch") DepartStatisticsSearch departStatisticsSearch, @Param("idList") List<String> idList);
IPage<AllProjectStatistics> queryPageListAllProjectMoney(Page<AllProjectStatistics> page, @Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch, @Param("idList") List<String> idList);
List<AllProjectStatistics> queryListAllProjectMoney(@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch, @Param("idList") List<String> idList);
}
@@ -2217,7 +2217,7 @@
</select>
<!-- 全所收入统计-->
<select id="queryPageListAllProjectMoney" resultType="com.jero.statistics.entity.AllProjectStatistics">
<select id="queryListAllProjectMoney" resultType="com.jero.statistics.entity.AllProjectStatistics">
select
sum(paidNoTaxAmount) as comeAllMoney,
sum(invoiceNoTaxAmount) as billMoney,
@@ -239,5 +239,5 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
AllMoney queryPageListDepartment33(DepartStatisticsSearch departStatisticsSearch, List<String> idList);
IPage<AllProjectStatistics> queryPageListAllProjectMoney(Page<AllProjectStatistics> page, AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList );
List<AllProjectStatistics> queryListAllProjectMoney(AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList );
}
@@ -632,7 +632,21 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
}
@Override
public IPage<AllProjectStatistics> queryPageListAllProjectMoney(Page<AllProjectStatistics> page, AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList) {
return payWorkingGroupMapper.queryPageListAllProjectMoney(page,allProjectStatisticsSearch,idList);
public List<AllProjectStatistics> queryListAllProjectMoney(AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList) {
List<AllProjectStatistics> list = payWorkingGroupMapper.queryListAllProjectMoney(allProjectStatisticsSearch,idList);
List<Integer> collect=list.stream()
.map(allProjectStatistics -> Integer.valueOf(allProjectStatistics.getPaymentDate().split("-")[1]))
.collect(Collectors.toList());
String paymentYear=allProjectStatisticsSearch.getPaymentYear();
for (int i=1; i <=12 ; i++) {
if(!collect.contains(i)){
StringBuilder stringBuilder = new StringBuilder().append(paymentYear);
AllProjectStatistics allProjectStatistics=new AllProjectStatistics("0.00","0.00","0.00",stringBuilder.append("-"+i).toString());
list.add(allProjectStatistics);
}
}
list.sort(Comparator.comparing(allProjectStatistics -> Integer.valueOf(allProjectStatistics.getPaymentDate().split("-")[1])));
return list;
}
}