统计报表修改
This commit is contained in:
+1
-1
@@ -180,7 +180,7 @@
|
||||
</select>
|
||||
<select id="getMeetingPackStatistics" resultType="com.jero.statistics.entity.MeetingPackStatistics">
|
||||
select
|
||||
${ew.customSqlSelect}
|
||||
${ew.sqlSelect}
|
||||
from pay_meeting_situation p1
|
||||
left join pay_meeting p2 on p1.meeting_id = p2.id
|
||||
left join pay_confirm_payment_record p3 on p3.project_id = p1.id
|
||||
|
||||
+18
-3
@@ -158,6 +158,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
private PayRandomCodeService randomCodeService;
|
||||
@Resource
|
||||
private PayMeetingGuestsFileMapper meetingGuestsFileMapper;
|
||||
@Resource
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
|
||||
private static final String[] CAN_MODIFY_LIST =
|
||||
@@ -1933,11 +1935,22 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
" p1.invoice_amount as billMoney,p1.paid_amount as comeAllMoney,p2.meeting_name,p2.meeting_type,DATE_FORMAT(p3.payment_date,'%Y') as payment_year");
|
||||
// 查看分页数据
|
||||
IPage<MeetingPackStatistics> pageList = payMeetingSituationMapper.getMeetingPackStatistics(page,query);
|
||||
List<MeetingPackStatistics> list = pageList.getRecords();
|
||||
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
for (MeetingPackStatistics obj : list) {
|
||||
String str = sysBaseAPI.translateDict("meeting_type",String.valueOf(obj.getMeetingType()));
|
||||
obj.setMeetingType_dictText(str);
|
||||
}
|
||||
}
|
||||
|
||||
// 查看汇总价格
|
||||
QueryWrapper<PayMeetingSituation> querySum = getPayMeetingSituationQueryWrapper(metingPackStatisticsSearch);
|
||||
querySum.select("sum(p1.amount_receivable) as allMoney,sum(p1.confirm_amount) as confirm_amount,\n" +
|
||||
"sum(p1.invoice_amount) as billMoney,sum(p1.paid_amount) as comeAllMoney");
|
||||
List<MeetingPackStatistics> sumList = payMeetingSituationMapper.getMeetingPackStatistics(query);
|
||||
querySum.select("case when sum( p1.amount_receivable ) is null then 0 else sum( p1.amount_receivable ) end AS allMoney,\n" +
|
||||
"\tcase when sum( p1.confirm_amount ) is null then 0 else sum( p1.confirm_amount ) end AS confirm_amount,\n" +
|
||||
"\tcase when sum( p1.invoice_amount ) is null then 0 else sum( p1.invoice_amount ) end AS billMoney,\n" +
|
||||
"\tcase when sum( p1.paid_amount ) is null then 0 else sum( p1.paid_amount ) end AS comeAllMoney ");
|
||||
List<MeetingPackStatistics> sumList = payMeetingSituationMapper.getMeetingPackStatistics(querySum);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("sumOfMoney", (CollectionUtils.isEmpty(sumList) || StringUtils.isBlank(sumList.get(0).getAllMoney())) ? 0 : sumList.get(0).getAllMoney());
|
||||
hashMap.put("sumOfReallyMoney", (CollectionUtils.isEmpty(sumList) || StringUtils.isBlank(sumList.get(0).getComeAllMoney())) ? 0 : sumList.get(0).getComeAllMoney());
|
||||
@@ -1950,6 +1963,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
@Override
|
||||
public ModelAndView excelMeetingPackStatistics(MeetingPackStatisticsSearch metingPackStatisticsSearch) {
|
||||
QueryWrapper<PayMeetingSituation> query = getPayMeetingSituationQueryWrapper(metingPackStatisticsSearch);
|
||||
query.select("p1.id,p1.meeting_id,p1.company_name,p1.company_contact_name,p1.amount_receivable as allMoney,p1.confirm_amount,\n" +
|
||||
"p1.invoice_amount as billMoney,p1.paid_amount as comeAllMoney,p2.meeting_name,p2.meeting_type,DATE_FORMAT(p3.payment_date,'%Y') as payment_year");
|
||||
List<MeetingPackStatistics> list = payMeetingSituationMapper.getMeetingPackStatistics(query);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
|
||||
+3
-2
@@ -1,6 +1,5 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
@@ -28,7 +27,6 @@ public class MeetingPackStatistics implements Serializable {
|
||||
|
||||
@Excel(name = "会议类型", width = 15, dicCode = "meeting_type")
|
||||
@ApiModelProperty(value = "会议类型")
|
||||
@Dict(dicCode = "meeting_type")
|
||||
private Integer meetingType;
|
||||
|
||||
@Excel(name = "来款单位", width = 15)
|
||||
@@ -59,5 +57,8 @@ public class MeetingPackStatistics implements Serializable {
|
||||
@ApiModelProperty(value = "确认年份")
|
||||
private BigDecimal paymentYear;
|
||||
|
||||
@ApiModelProperty(value = "会议类型")
|
||||
private String meetingType_dictText;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user