统计模块-会议打包统计
This commit is contained in:
+10
-3
@@ -2,13 +2,16 @@ package com.jero.meeting.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.meeting.vo.MeetingSituationContractVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.meeting.entity.PayMeetingSituation;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.meeting.vo.MeetingSituationContractVO;
|
||||
import com.jero.statistics.entity.MeetingPackStatistics;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 会议报名信息
|
||||
@@ -27,4 +30,8 @@ public interface PayMeetingSituationMapper extends BaseMapper<PayMeetingSituatio
|
||||
@Param(Constants.WRAPPER) QueryWrapper<PayMeetingSituation> queryWrapper);
|
||||
|
||||
Integer standardsCheckPhone(@Param("meetingId") String meetingId, @Param("phone") String phone);
|
||||
|
||||
IPage<MeetingPackStatistics> getMeetingPackStatistics(Page<PayMeetingSituation> page,@Param(Constants.WRAPPER) QueryWrapper<PayMeetingSituation> query);
|
||||
|
||||
List<MeetingPackStatistics> getMeetingPackStatistics(@Param(Constants.WRAPPER) QueryWrapper<PayMeetingSituation> query);
|
||||
}
|
||||
|
||||
+10
-1
@@ -178,4 +178,13 @@
|
||||
and pms.check_result = 1
|
||||
and pms.register_check_result = 1
|
||||
</select>
|
||||
</mapper>
|
||||
<select id="getMeetingPackStatistics" resultType="com.jero.statistics.entity.MeetingPackStatistics">
|
||||
select
|
||||
p1.id,p1.meeting_id,p1.company_name,p1.company_contact_name,p1.amount_receivable as allMoney,p1.confirm_amount,
|
||||
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
|
||||
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
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+10
-1
@@ -3,13 +3,16 @@ package com.jero.meeting.service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.meeting.entity.PayMeeting;
|
||||
import com.jero.meeting.entity.PayMeetingGuestsFile;
|
||||
import com.jero.meeting.entity.PayMeetingSituation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.meeting.vo.*;
|
||||
import com.jero.statistics.entity.MeetingPackStatistics;
|
||||
import com.jero.statistics.entity.MeetingPackStatisticsSearch;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
@@ -102,4 +105,10 @@ public interface IPayMeetingSituationService extends IService<PayMeetingSituatio
|
||||
List<PayMeetingGuestsFile> guestsUploadFileList(GuestsUploadFileVO guestsUploadFileVO);
|
||||
|
||||
void guestsDeleteFile(GuestsUploadFileVO guestsUploadFileVO);
|
||||
|
||||
IPage<MeetingPackStatistics> getMeetingPackStatistics(MeetingPackStatisticsSearch metingPackStatisticsSearch,
|
||||
Integer pageNo,
|
||||
Integer pageSize);
|
||||
|
||||
ModelAndView excelMeetingPackStatistics(MeetingPackStatisticsSearch metingPackStatisticsSearch);
|
||||
}
|
||||
|
||||
+49
@@ -1,4 +1,5 @@
|
||||
package com.jero.meeting.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
@@ -72,16 +73,23 @@ import com.jero.project.entity.PayWorkingGroupSubItemContacts;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.standards.memberinfo.service.IMemberInfoService;
|
||||
import com.jero.statistics.entity.MeetingPackStatistics;
|
||||
import com.jero.statistics.entity.MeetingPackStatisticsSearch;
|
||||
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
|
||||
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
||||
import com.jero.util.ObjRecordUtil;
|
||||
import com.jero.util.module.ObjRecordUtilModule;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -1914,4 +1922,45 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
meetingService.update(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<MeetingPackStatistics> getMeetingPackStatistics(MeetingPackStatisticsSearch metingPackStatisticsSearch,
|
||||
Integer pageNo,
|
||||
Integer pageSize) {
|
||||
QueryWrapper<PayMeetingSituation> query = getPayMeetingSituationQueryWrapper(metingPackStatisticsSearch);
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
return payMeetingSituationMapper.getMeetingPackStatistics(page,query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAndView excelMeetingPackStatistics(MeetingPackStatisticsSearch metingPackStatisticsSearch) {
|
||||
QueryWrapper<PayMeetingSituation> query = getPayMeetingSituationQueryWrapper(metingPackStatisticsSearch);
|
||||
List<MeetingPackStatistics> list = payMeetingSituationMapper.getMeetingPackStatistics(query);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "会议打包统计"); //此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.CLASS, MeetingPackStatistics.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams("会议打包统计", "会议打包统计");
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, list);
|
||||
return mv;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private QueryWrapper<PayMeetingSituation> getPayMeetingSituationQueryWrapper(MeetingPackStatisticsSearch metingPackStatisticsSearch) {
|
||||
QueryWrapper<PayMeetingSituation> query = new QueryWrapper<>();
|
||||
if (!StringUtils.isBlank(metingPackStatisticsSearch.getCompanyName())) {
|
||||
query.lambda().like(PayMeetingSituation::getCompanyName, metingPackStatisticsSearch.getCompanyName());
|
||||
}
|
||||
if (!StringUtils.isBlank(metingPackStatisticsSearch.getPayMode())) {
|
||||
query.lambda().in(PayMeetingSituation::getPayMode, Arrays.asList(metingPackStatisticsSearch.getPayMode().split(",")));
|
||||
}
|
||||
if (!StringUtils.isBlank(metingPackStatisticsSearch.getPaymentYear())) {
|
||||
query.eq("DATE_FORMAT(p3.payment_date,'%Y')", metingPackStatisticsSearch.getPaymentYear());
|
||||
}
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.jero.statistics.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.meeting.service.IPayMeetingService;
|
||||
import com.jero.meeting.service.IPayMeetingSituationService;
|
||||
import com.jero.payment.service.impl.PayConfirmPaymentRecordService;
|
||||
import com.jero.statistics.entity.MeetingPackStatisticsSearch;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/20 21:00:00
|
||||
*/
|
||||
@Api(tags = "会议打包统计")
|
||||
@RestController
|
||||
@RequestMapping("/statistics/meetingPackStatistics")
|
||||
@Slf4j
|
||||
public class MeetingPackStatisticsController {
|
||||
@Resource
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Resource
|
||||
private IPayMeetingService payMeetingService;
|
||||
@Resource
|
||||
private PayConfirmPaymentRecordService payConfirmPaymentRecordService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param metingPackStatisticsSearch 会议打包统计
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
*/
|
||||
// @RequiresPermissions("individualPaymentStatistics:search")
|
||||
@ApiOperation(value = "会议打包统计-分页列表查询", notes = "会议打包统计-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> list(MeetingPackStatisticsSearch metingPackStatisticsSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return Result.OK(payMeetingSituationService.getMeetingPackStatistics(metingPackStatisticsSearch, pageNo, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*
|
||||
* @param metingPackStatisticsSearch
|
||||
*/
|
||||
@AutoLog(value = "会议打包统计-导出统计")
|
||||
@ApiOperation(value = "会议打包统计-导出统计", notes = "会议打包统计-导出统计")
|
||||
@GetMapping(value = "/excelMeetingPackStatistics")
|
||||
public ModelAndView excelMeetingPackStatistics(MeetingPackStatisticsSearch metingPackStatisticsSearch) {
|
||||
return payMeetingSituationService.excelMeetingPackStatistics(metingPackStatisticsSearch);
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
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;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lqt
|
||||
* @version 1.0
|
||||
* @date 2023/12/27 17:53
|
||||
*/
|
||||
@Data
|
||||
public class MeetingPackStatistics implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "参会人id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private String meetingId;
|
||||
|
||||
@Excel(name = "会议名称", width = 15)
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
private String meetingName;
|
||||
|
||||
@Excel(name = "会议类型", width = 15, dicCode = "meeting_type")
|
||||
@ApiModelProperty(value = "会议类型")
|
||||
@Dict(dicCode = "meeting_type")
|
||||
private Integer meetingType;
|
||||
|
||||
@Excel(name = "来款单位", width = 15)
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String companyName;
|
||||
|
||||
@Excel(name = "参会人员", width = 15)
|
||||
@ApiModelProperty(value = "参会人员")
|
||||
private String companyContactName;
|
||||
|
||||
@Excel(name = "年度待确收金额", width = 15)
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
private String allMoney;
|
||||
|
||||
@Excel(name = "确认收入金额", width = 15)
|
||||
@ApiModelProperty(value = "确认金额")
|
||||
private String confirmAmount;
|
||||
|
||||
@Excel(name = "开票金额", width = 15)
|
||||
@ApiModelProperty(value = "开票金额")
|
||||
private String billMoney;
|
||||
|
||||
@Excel(name = "到账金额", width = 15)
|
||||
@ApiModelProperty(value = "到账金额")
|
||||
private String comeAllMoney;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "确认年份")
|
||||
private BigDecimal paymentYear;
|
||||
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lqt
|
||||
* @version 1.0
|
||||
* @date 2023/12/27 17:53
|
||||
*/
|
||||
@Data
|
||||
public class MeetingPackStatisticsSearch implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String companyName;
|
||||
@ApiModelProperty(value = "确认年份")
|
||||
private String paymentYear;
|
||||
@ApiModelProperty(value = "来款方式(默认打包)")
|
||||
private String payMode;
|
||||
}
|
||||
Reference in New Issue
Block a user