全所统计
This commit is contained in:
+13
@@ -16,6 +16,7 @@ import com.jero.common.common.ProjectCommon;
|
||||
import com.jero.common.constant.GlobalConstants;
|
||||
import com.jero.common.service.ProjectDetailService;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.common.vo.ProjectDetailVO;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
@@ -130,6 +131,18 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<PayMailBill> pageList = payMailBillService.page(page, queryWrapper);
|
||||
|
||||
if (!CollectionUtils.isEmpty(pageList.getRecords())) {
|
||||
try {
|
||||
pageList.getRecords().forEach(p -> {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getContactMobile())) {
|
||||
p.setContactMobile(PasswordUtil.decrypt(p.getContactMobile()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.jero.meeting.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2021-09-07 18:29
|
||||
*/
|
||||
@Data
|
||||
public class WorkingGroupMeetingExcel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**会议名称*/
|
||||
@Excel(name = "会议名称", width = 15)
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@NotBlank(message = "会议名称不能为空")
|
||||
@Size(max = 50,message = "会议名称最长为50字符")
|
||||
private String meetingName;
|
||||
|
||||
/**会议类型*/
|
||||
@Excel(name = "会议类型", width = 15)
|
||||
@ApiModelProperty(value = "会议类型")
|
||||
@NotBlank(message = "会议类型不能为空")
|
||||
private String meetingType;
|
||||
|
||||
/**工作组项目id*/
|
||||
@ApiModelProperty(value = "工作组项目id")
|
||||
@NotBlank(message = "工作组项目名称不能为空")
|
||||
private String workingGroupId;
|
||||
|
||||
/**工作组项目名称*/
|
||||
@Excel(name = "工作组项目名称", width = 15)
|
||||
@ApiModelProperty(value = "工作组项目名称")
|
||||
private String workingGroupName;
|
||||
|
||||
/**开始时间*/
|
||||
@Excel(name = "会议开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议开始时间")
|
||||
@NotNull(message = "会议召开时间不能为空")
|
||||
private java.util.Date startTime;
|
||||
|
||||
/**结束时间*/
|
||||
@Excel(name = "会议结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议结束时间")
|
||||
@NotNull(message = "会议召开时间不能为空")
|
||||
private java.util.Date endTime;
|
||||
|
||||
/**年份*/
|
||||
@Excel(name = "年份", width = 15)
|
||||
@ApiModelProperty(value = "年份")
|
||||
@NotBlank(message = "年份不能为空")
|
||||
private String particularYear;
|
||||
|
||||
/**召开地点*/
|
||||
@Excel(name = "召开地点", width = 15)
|
||||
@ApiModelProperty(value = "召开地点")
|
||||
@NotBlank(message = "召开地点不能为空")
|
||||
@Size(max = 50, message = "召开地点最大为50字符")
|
||||
private String venue;
|
||||
|
||||
/**召开地点对照码*/
|
||||
@ApiModelProperty(value = "召开地点对照码")
|
||||
@NotBlank(message = "召开地点对照码不能为空")
|
||||
private String convokeLocale;
|
||||
|
||||
/**详细地址*/
|
||||
@Excel(name = "详细地址", width = 15)
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
@Size(max = 100, message = "召开地点最大为100字符")
|
||||
private String address;
|
||||
|
||||
/**预计参加人数*/
|
||||
@Excel(name = "预计参加人数", width = 15)
|
||||
@ApiModelProperty(value = "预计参加人数")
|
||||
private String estimatedNumber;
|
||||
|
||||
/**会议内容*/
|
||||
@Excel(name = "会议内容", width = 15)
|
||||
@ApiModelProperty(value = "会议内容")
|
||||
@NotBlank(message = "会议内容不能为空")
|
||||
@Size(max = 200, message = "会议内容最大为200字符")
|
||||
private String meetingContent;
|
||||
|
||||
/**报名截止时间*/
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "报名截止时间")
|
||||
@NotNull(message = "报名截止时间不能为空")
|
||||
private java.util.Date registerDeadline;
|
||||
|
||||
/**会议费用*/
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
@ApiModelProperty(value = "会议费用")
|
||||
@NotNull(message = "会议费用不能为空")
|
||||
@DecimalMax(value = "9999999999.99",message = "会议费用格式错误")
|
||||
private Integer meetingCosts;
|
||||
|
||||
/**会议负责人id*/
|
||||
@ApiModelProperty(value = "会议负责人id")
|
||||
@NotBlank(message = "会议负责人不能为空")
|
||||
private String directorId;
|
||||
|
||||
/**会议负责人*/
|
||||
@Excel(name = "会议负责人", width = 15)
|
||||
@ApiModelProperty(value = "会议负责人")
|
||||
private String directorName;
|
||||
|
||||
/**会议负责人手机号*/
|
||||
@Excel(name = "会议负责人手机号", width = 15)
|
||||
@ApiModelProperty(value = "会议负责人手机号")
|
||||
private String directorPhone;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Size(max = 200, message = "备注最大为200字符")
|
||||
private String remark;
|
||||
|
||||
/**会议通知文件*/
|
||||
@ApiModelProperty(value = "会议通知文件")
|
||||
@Size(max = 1000, message = "会议通知文件数量超出最大限制")
|
||||
private String meetingFiles;
|
||||
|
||||
/**会议资料*/
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@Size(max = 1000, message = "会议资料数量超出最大限制")
|
||||
private String meetingData;
|
||||
|
||||
/**是否提醒*/
|
||||
@ApiModelProperty(value = "是否提醒")
|
||||
private Integer remind;
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.jero.meeting.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2021-09-07 18:29
|
||||
*/
|
||||
@Data
|
||||
public class WorkingGroupMeetingExel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**会议名称*/
|
||||
@Excel(name = "会议名称", width = 15)
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@NotBlank(message = "会议名称不能为空")
|
||||
@Size(max = 50,message = "会议名称最长为50字符")
|
||||
private String meetingName;
|
||||
|
||||
/**会议类型*/
|
||||
@Excel(name = "会议类型", width = 15)
|
||||
@ApiModelProperty(value = "会议类型")
|
||||
@NotBlank(message = "会议类型不能为空")
|
||||
private String meetingType;
|
||||
|
||||
/**工作组项目id*/
|
||||
@ApiModelProperty(value = "工作组项目id")
|
||||
@NotBlank(message = "工作组项目名称不能为空")
|
||||
private String workingGroupId;
|
||||
|
||||
/**工作组项目名称*/
|
||||
@Excel(name = "工作组项目名称", width = 15)
|
||||
@ApiModelProperty(value = "工作组项目名称")
|
||||
private String workingGroupName;
|
||||
|
||||
/**开始时间*/
|
||||
@Excel(name = "会议开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议开始时间")
|
||||
@NotNull(message = "会议召开时间不能为空")
|
||||
private java.util.Date startTime;
|
||||
|
||||
/**结束时间*/
|
||||
@Excel(name = "会议结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议结束时间")
|
||||
@NotNull(message = "会议召开时间不能为空")
|
||||
private java.util.Date endTime;
|
||||
|
||||
/**年份*/
|
||||
@Excel(name = "年份", width = 15)
|
||||
@ApiModelProperty(value = "年份")
|
||||
@NotBlank(message = "年份不能为空")
|
||||
private String particularYear;
|
||||
|
||||
/**召开地点*/
|
||||
@Excel(name = "召开地点", width = 15)
|
||||
@ApiModelProperty(value = "召开地点")
|
||||
@NotBlank(message = "召开地点不能为空")
|
||||
@Size(max = 50, message = "召开地点最大为50字符")
|
||||
private String venue;
|
||||
|
||||
/**召开地点对照码*/
|
||||
@ApiModelProperty(value = "召开地点对照码")
|
||||
@NotBlank(message = "召开地点对照码不能为空")
|
||||
private String convokeLocale;
|
||||
|
||||
/**详细地址*/
|
||||
@Excel(name = "详细地址", width = 15)
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
@Size(max = 100, message = "召开地点最大为100字符")
|
||||
private String address;
|
||||
|
||||
/**预计参加人数*/
|
||||
@Excel(name = "预计参加人数", width = 15)
|
||||
@ApiModelProperty(value = "预计参加人数")
|
||||
private String estimatedNumber;
|
||||
|
||||
/**会议内容*/
|
||||
@Excel(name = "会议内容", width = 15)
|
||||
@ApiModelProperty(value = "会议内容")
|
||||
@NotBlank(message = "会议内容不能为空")
|
||||
@Size(max = 200, message = "会议内容最大为200字符")
|
||||
private String meetingContent;
|
||||
|
||||
/**报名截止时间*/
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "报名截止时间")
|
||||
@NotNull(message = "报名截止时间不能为空")
|
||||
private java.util.Date registerDeadline;
|
||||
|
||||
/**会议费用*/
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
@ApiModelProperty(value = "会议费用")
|
||||
@NotNull(message = "会议费用不能为空")
|
||||
@DecimalMax(value = "9999999999.99",message = "会议费用格式错误")
|
||||
private Integer meetingCosts;
|
||||
|
||||
/**会议负责人id*/
|
||||
@ApiModelProperty(value = "会议负责人id")
|
||||
@NotBlank(message = "会议负责人不能为空")
|
||||
private String directorId;
|
||||
|
||||
/**会议负责人*/
|
||||
@Excel(name = "会议负责人", width = 15)
|
||||
@ApiModelProperty(value = "会议负责人")
|
||||
private String directorName;
|
||||
|
||||
/**会议负责人手机号*/
|
||||
@Excel(name = "会议负责人手机号", width = 15)
|
||||
@ApiModelProperty(value = "会议负责人手机号")
|
||||
private String directorPhone;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Size(max = 200, message = "备注最大为200字符")
|
||||
private String remark;
|
||||
|
||||
/**会议通知文件*/
|
||||
@ApiModelProperty(value = "会议通知文件")
|
||||
@Size(max = 1000, message = "会议通知文件数量超出最大限制")
|
||||
private String meetingFiles;
|
||||
|
||||
/**会议资料*/
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@Size(max = 1000, message = "会议资料数量超出最大限制")
|
||||
private String meetingData;
|
||||
|
||||
/**是否提醒*/
|
||||
@ApiModelProperty(value = "是否提醒")
|
||||
private Integer remind;
|
||||
}
|
||||
+46
-15
@@ -19,6 +19,7 @@ import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.util.AmountUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@@ -127,21 +128,40 @@ public class PayWorkingGroupStatisticsController {
|
||||
*/
|
||||
@GetMapping(value = "/exportXls2")
|
||||
@ApiOperation(value="工作组项目统计-统计导出excel", notes="工作组项目统计-统计导出excel")
|
||||
public ModelAndView exportXls2() {
|
||||
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel();
|
||||
public ModelAndView exportXls2(PayWorkingGroupSearch payWorkingGroupSearch) {
|
||||
if(payWorkingGroupSearch.getYear()==null|| payWorkingGroupSearch.getYear().equals("")){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
payWorkingGroupSearch.setYear(year);
|
||||
}
|
||||
//根据不同角色加载不同列表的参数
|
||||
List<String> idList = new ArrayList<>();
|
||||
//判断登录角色,显示特定工作组内容,判断依据为登录用户的角色和机构编码
|
||||
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String roleCode = sysUser.getRoleCode();
|
||||
//科长
|
||||
if(constant.BMFZR.equals(roleCode)) {
|
||||
String orgCode = sysUser.getOrgCode();
|
||||
List<SysUser> userList = userMapper.selectList(new QueryWrapper<SysUser>().eq("status", 1).eq("del_flag", 0).eq("org_code", orgCode));
|
||||
idList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
//所领导或者超级管理员
|
||||
} else if (constant.SLD.equals(roleCode)||constant.ADMIN.equals(roleCode)) {
|
||||
idList=null;
|
||||
//企业职员项目负责人
|
||||
}else if( constant.QYRY.equals(roleCode)){
|
||||
String userId = sysUser.getId();
|
||||
idList.add(userId);
|
||||
}
|
||||
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel(payWorkingGroupSearch,idList);
|
||||
for (PayWorkingGroupStatistics payWorkingGroupStatistics:pageList){
|
||||
if(payWorkingGroupStatistics.getComeAllMoney()==null||payWorkingGroupStatistics.getComeAllMoney()==""){
|
||||
payWorkingGroupStatistics.setComeAllMoney("0.00");
|
||||
}
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class,"工作组项目统计");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取工作组列表
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/getGroupList")
|
||||
@ApiOperation(value="工作组获取工作组列表下拉框", notes="工作组获取工作组列表下拉框")
|
||||
public List<String> getGroupList() {
|
||||
return payWorkingGroupService.getGroupList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -153,8 +173,10 @@ public class PayWorkingGroupStatisticsController {
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员统计-详情分页列表查询(传工作组id)", notes = "工作组成员统计-详情分页列表查询(传工作组id)")
|
||||
@GetMapping(value = "/listSub")
|
||||
@ApiImplicitParam(name = "id", value = "工作组id", dataType = "String", required = true)
|
||||
public Result<?> list2(PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "id") String id,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<PayWorkGroupSubletStatistics> page = new Page<>(pageNo, pageSize);
|
||||
if(payWorkingGroupSubletSearch.getYear()==null|| payWorkingGroupSubletSearch.getYear().equals("")){
|
||||
@@ -162,7 +184,7 @@ public class PayWorkingGroupStatisticsController {
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
payWorkingGroupSubletSearch.setYear(year);
|
||||
}
|
||||
IPage<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.queryPageList2(page, payWorkingGroupSubletSearch);
|
||||
IPage<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.queryPageList2(page, payWorkingGroupSubletSearch,id);
|
||||
double sum = pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null ? "0" : t.getAllMoney())).sum();
|
||||
double sum2 = pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null ? "0" : t.getComeAllMoney())).sum();
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
@@ -185,9 +207,18 @@ for(PayWorkGroupSubletStatistics s: pageList.getRecords()){
|
||||
*/
|
||||
@GetMapping(value = "/excelSub")
|
||||
@ApiOperation(value = "工作组成员统计-导出统计(传工作组id)", notes = "工作组成员统计-导出统计(传工作组id)")
|
||||
public ModelAndView excelSub(@RequestParam(name = "id", required = true) String id) {
|
||||
List<PayWorkGroupSubletStatistics> list = payWorkingGroupSubItemService.importExcelStatistics(id);
|
||||
return AmountUtil.exportListXls(list, PayWorkGroupSubletStatistics.class, "工作组成员统计");
|
||||
@ApiImplicitParam(name = "id", value = "工作组id", dataType = "String", required = true)
|
||||
public ModelAndView excelSub(
|
||||
PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,
|
||||
@RequestParam(name = "id", required = true) String id) {
|
||||
if(payWorkingGroupSubletSearch.getYear()==null|| payWorkingGroupSubletSearch.getYear().equals("")){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
payWorkingGroupSubletSearch.setYear(year);
|
||||
}
|
||||
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics(payWorkingGroupSubletSearch,id);
|
||||
|
||||
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
|
||||
}
|
||||
|
||||
|
||||
|
||||
-2
@@ -14,8 +14,6 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
public class PayWorkingGroupSubletSearch {
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "来款项目")
|
||||
private String projectName;
|
||||
|
||||
+37
-10
@@ -2,16 +2,13 @@ package com.jero.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.project.entity.PayWorkGroupSubletStatistics;
|
||||
import com.jero.project.entity.PayWorkingGroupSearch;
|
||||
import com.jero.project.entity.PayWorkingGroupStatistics;
|
||||
import com.jero.project.vo.PayWorkingGroupVO;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.statistics.entity.AllProjectStatistics;
|
||||
import com.jero.statistics.entity.AllProjectStatisticsSearch;
|
||||
import com.jero.statistics.entity.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -70,16 +67,18 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel();
|
||||
List<PayWorkingGroupStatistics> queryPageListForStatistics(@Param("payWorkingGroupSearch") PayWorkingGroupSearch payWorkingGroupSearch,@Param("ids") List<String> ids);
|
||||
|
||||
List<String> getGroupList();
|
||||
|
||||
/**
|
||||
* 全所统计导出
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
* @Description 全所统计
|
||||
* @Author zql
|
||||
* @Date 2021/9/17
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageListExcel(@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
List<AllProjectStatistics> queryPageList3(@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
/**
|
||||
* @Description 全所统计
|
||||
@@ -90,4 +89,32 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
||||
* @Exception
|
||||
*/
|
||||
IPage<AllProjectStatistics> queryPageList3(Page<AllProjectStatistics> page ,@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
/**
|
||||
* 个人来款统计
|
||||
* @param page
|
||||
* @param principalPeopleSearch
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
IPage<PrincipalPeopleList> queryPageListForPrincipal(Page<PrincipalPeopleList> page, @Param("principalPeopleSearch") PrincipalPeopleSearch principalPeopleSearch, @Param("idList") List<String> idList);
|
||||
|
||||
/**
|
||||
* 个人来款统计导出excel
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
List<PrincipalPeopleList> queryPageListForPrincipal(@Param("principalPeopleSearch") PrincipalPeopleSearch principalPeopleSearch,@Param("idList") List<String> idList);
|
||||
/**
|
||||
* 个人来款统计详情导出
|
||||
* @param principalPeopleDetailSearch
|
||||
* @return
|
||||
*/
|
||||
List<PrincipalPeopleDetail> queryPageListForPrincipalDetail(@Param("principalPeopleDetailSearch") PrincipalPeopleDetailSearch principalPeopleDetailSearch);
|
||||
/**
|
||||
* 个人来款统计详情
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
IPage<PrincipalPeopleDetail> queryPageListForPrincipalDetail(Page<PrincipalPeopleDetail> page,@Param("principalPeopleDetailSearch") PrincipalPeopleDetailSearch principalPeopleDetailSearch);
|
||||
}
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ public interface PayWorkingGroupSubItemMapper extends BaseMapper<PayWorkingGroup
|
||||
@Param("paymentDate") String paymentDate);
|
||||
|
||||
|
||||
IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, @Param("payWorkingGroupSubletSearch") PayWorkingGroupSubletSearch payWorkingGroupSubletSearch);
|
||||
IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, @Param("payWorkingGroupSubletSearch") PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,@Param("id") String id);
|
||||
|
||||
List<PayWorkGroupSubletStatistics> importExcelStatistics(@Param("id") String id);
|
||||
List<PayWorkGroupSubletStatistics> queryPageList2(@Param("payWorkingGroupSubletSearch") PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,@Param("id") String id);
|
||||
|
||||
}
|
||||
|
||||
+523
-399
File diff suppressed because it is too large
Load Diff
+21
-24
@@ -65,19 +65,21 @@
|
||||
</select>
|
||||
|
||||
<select id="queryPageList2" resultType="com.jero.project.entity.PayWorkGroupSubletStatistics">
|
||||
SELECT
|
||||
select * from (SELECT
|
||||
pwgs.id,
|
||||
pwg.principal_id_a as principalId,
|
||||
pwg.principal_name_a as principalName,
|
||||
pwgs.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pwgs.receivable_amount AS allMoney,
|
||||
pwgs.paid_amount AS comeAllMoney,
|
||||
pwgs.charge_use as chargeUse
|
||||
FROM pay_working_group_subitem pwgs left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
pwgs.charge_use as chargeUse,
|
||||
pwgs.create_time
|
||||
FROM pay_working_group_subitem pwgs
|
||||
left join pay_working_group pwg on(pwgs.working_group_id=pwg.id)
|
||||
<where>
|
||||
pwgs.working_group_id = #{payWorkingGroupSubletSearch.id}
|
||||
pwgs.working_group_id = #{id}
|
||||
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
|
||||
AND pwg.working_group_project LIKE
|
||||
AND pwgs.charge_project LIKE
|
||||
concat('%',concat(#{payWorkingGroupSubletSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.chargeUse != null and payWorkingGroupSubletSearch.chargeUse != ''">
|
||||
@@ -90,39 +92,34 @@
|
||||
<if test="payWorkingGroupSubletSearch.inAccountStatue != null and payWorkingGroupSubletSearch.inAccountStatue != ''">
|
||||
AND pwgs.in_account=#{payWorkingGroupSubletSearch.inAccountStatue}
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.year != null and payWorkingGroupSubletSearch.year != ''">
|
||||
AND date_format(ppr.payment_date,'%Y-%m-%d') LIKE concat('%',concat(#{payWorkingGroupSubletSearch.year},'%'))
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.principalNameId != null and payWorkingGroupSubletSearch.principalNameId != ''">
|
||||
AND pwg.principal_id_a=#{payWorkingGroupSubletSearch.principalNameId}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="payWorkingGroupSubletSearch.allMoney != null and payWorkingGroupSubletSearch.allMoney != '' and payWorkingGroupSubletSearch.allMoneyTwo != null and payWorkingGroupSubletSearch.allMoneyTwo != ''">
|
||||
AND pwgs.receivable_amount > #{payWorkingGroupSubletSearch.allMoney} and pwgs.receivable_amount <![CDATA[<]]> #{payWorkingGroupSubletSearch.allMoneyTwo}
|
||||
AND pwgs.allMoney > #{payWorkingGroupSubletSearch.allMoney} and pwgs.allMoney <![CDATA[<]]> #{payWorkingGroupSubletSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="payWorkingGroupSubletSearch.allMoney != null and payWorkingGroupSubletSearch.allMoney != ''">
|
||||
AND pwgs.receivable_amount > #{payWorkingGroupSubletSearch.allMoney}
|
||||
AND pwgs.allMoney > #{payWorkingGroupSubletSearch.allMoney}
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.allMoneyTwo != null and payWorkingGroupSubletSearch.allMoneyTwo != ''">
|
||||
AND pwgs.receivable_amount <![CDATA[<]]> #{payWorkingGroupSubletSearch.allMoneyTwo}
|
||||
AND pwgs.allMoney <![CDATA[<]]> #{payWorkingGroupSubletSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
group by pwgs.id
|
||||
group by pwgs.id) pwg1
|
||||
inner join
|
||||
(SELECT
|
||||
pwg.principal_id_a as principalId
|
||||
FROM pay_working_group pwg
|
||||
inner JOIN (select pwgs.id as id,working_group_id
|
||||
from pay_working_group_subitem pwgs
|
||||
left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
WHERE ppr.payment_date like concat('%',#{payWorkingGroupSubletSearch.year},'%') GROUP BY working_group_id) pwgss ON (pwg.id=pwgss.working_group_id)
|
||||
GROUP BY pwg.principal_id_a) pwg2 on (pwg2.principalId=pwg1.principalId)
|
||||
order by pwg1.create_time
|
||||
</select>
|
||||
|
||||
<select id="importExcelStatistics" resultType="com.jero.project.entity.PayWorkGroupSubletStatistics">
|
||||
SELECT
|
||||
pwgs.id,
|
||||
pwg.principal_name_a as principalName,
|
||||
pwgs.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pwgs.receivable_amount AS allMoney,
|
||||
pwgs.paid_amount AS comeAllMoney,
|
||||
pwgs.charge_use as chargeUse
|
||||
FROM pay_working_group_subitem pwgs left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
left join pay_working_group pwg on(pwgs.working_group_id=pwg.id)
|
||||
where pwgs.working_group_id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
+40
-11
@@ -8,8 +8,7 @@ import com.jero.project.entity.PayWorkingGroupStatistics;
|
||||
import com.jero.project.vo.PayWorkingGroupVO;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.statistics.entity.AllProjectStatistics;
|
||||
import com.jero.statistics.entity.AllProjectStatisticsSearch;
|
||||
import com.jero.statistics.entity.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -75,15 +74,7 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
|
||||
* @Exception
|
||||
*/
|
||||
IPage<PayWorkingGroupStatistics> queryPageListForStatistics(Page<PayWorkingGroupStatistics> page, PayWorkingGroupSearch payWorkingGroupSearch,List<String> ids);
|
||||
/**
|
||||
* @Description 工作组统计查询导出
|
||||
* @Author zql
|
||||
* @Date 2021/9/13
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel();
|
||||
|
||||
|
||||
List<String> getGroupList();
|
||||
/**
|
||||
@@ -113,4 +104,42 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
|
||||
* 全所查询导出
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageListExcel( AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
/**
|
||||
* 个人来款统计
|
||||
* @param page
|
||||
* @param principalPeopleSearch
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
IPage<PrincipalPeopleList> queryPageListForPrincipal(Page<PrincipalPeopleList> page, PrincipalPeopleSearch principalPeopleSearch, List<String> idList);
|
||||
|
||||
/**
|
||||
* 个人来款导出excel
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
List<PrincipalPeopleList> queryPageListForPrincipalExcel(PrincipalPeopleSearch principalPeopleSearch,List<String> idList);
|
||||
/**
|
||||
* 个人来款详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
IPage<PrincipalPeopleDetail> queryPageListForPrincipalDetail(Page<PrincipalPeopleDetail> page, PrincipalPeopleDetailSearch principalPeopleDetailSearch);
|
||||
|
||||
/**
|
||||
* 工作组统计导出
|
||||
* @param payWorkingGroupSearch
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel(PayWorkingGroupSearch payWorkingGroupSearch, List<String> idList);
|
||||
|
||||
|
||||
/**
|
||||
* 个人来款详情导出excel
|
||||
* @param principalPeopleDetailSearch
|
||||
* @return
|
||||
*/
|
||||
List<PrincipalPeopleDetail> queryPageListForPrincipalDetailExcel(PrincipalPeopleDetailSearch principalPeopleDetailSearch);
|
||||
}
|
||||
|
||||
+2
-2
@@ -74,9 +74,9 @@ public interface IPayWorkingGroupSubItemService extends IService<PayWorkingGroup
|
||||
* @return
|
||||
*/
|
||||
|
||||
IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch);
|
||||
IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,String id);
|
||||
|
||||
List<PayWorkGroupSubletStatistics> importExcelStatistics(String id);
|
||||
List<PayWorkGroupSubletStatistics> importExcelStatistics(PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,String id);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+44
-7
@@ -16,8 +16,7 @@ import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.project.vo.PayWorkingGroupVO;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.project.mapper.PayWorkingGroupMapper;
|
||||
import com.jero.statistics.entity.AllProjectStatistics;
|
||||
import com.jero.statistics.entity.AllProjectStatisticsSearch;
|
||||
import com.jero.statistics.entity.*;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -103,10 +102,6 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
||||
return payWorkingGroupMapper.queryPageListForStatistics(page,payWorkingGroupSearch, ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel() {
|
||||
return payWorkingGroupMapper.queryPageListForStatisticsExcel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getGroupList() {
|
||||
@@ -189,7 +184,49 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
||||
*/
|
||||
@Override
|
||||
public List<AllProjectStatistics> queryPageListExcel(AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payWorkingGroupMapper.queryPageListExcel(allProjectStatisticsSearch);
|
||||
return payWorkingGroupMapper.queryPageList3(allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人来款统计
|
||||
* @param page
|
||||
* @param principalPeopleSearch
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<PrincipalPeopleList> queryPageListForPrincipal(Page<PrincipalPeopleList> page, PrincipalPeopleSearch principalPeopleSearch, List<String> idList) {
|
||||
return payWorkingGroupMapper.queryPageListForPrincipal(page,principalPeopleSearch,idList);
|
||||
}
|
||||
/**
|
||||
* 个人来款统计导出
|
||||
* @param idList
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PrincipalPeopleList> queryPageListForPrincipalExcel(PrincipalPeopleSearch principalPeopleSearch,List<String> idList) {
|
||||
return payWorkingGroupMapper.queryPageListForPrincipal(principalPeopleSearch,idList);
|
||||
}
|
||||
/**
|
||||
* 个人来款统计详情
|
||||
* @param page
|
||||
* @param principalPeopleDetailSearch
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<PrincipalPeopleDetail> queryPageListForPrincipalDetail(Page<PrincipalPeopleDetail> page, PrincipalPeopleDetailSearch principalPeopleDetailSearch) {
|
||||
return payWorkingGroupMapper.queryPageListForPrincipalDetail(page,principalPeopleDetailSearch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel(PayWorkingGroupSearch payWorkingGroupSearch, List<String> idList) {
|
||||
return payWorkingGroupMapper.queryPageListForStatistics(payWorkingGroupSearch,idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PrincipalPeopleDetail> queryPageListForPrincipalDetailExcel(PrincipalPeopleDetailSearch principalPeopleDetailSearch) {
|
||||
return payWorkingGroupMapper.queryPageListForPrincipalDetail(principalPeopleDetailSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -492,13 +492,13 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch) {
|
||||
return payWorkingGroupSubItemMapper.queryPageList2(page,payWorkingGroupSubletSearch);
|
||||
public IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,String id) {
|
||||
return payWorkingGroupSubItemMapper.queryPageList2(page,payWorkingGroupSubletSearch,id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayWorkGroupSubletStatistics> importExcelStatistics(String id) {
|
||||
return payWorkingGroupSubItemMapper.importExcelStatistics(id);
|
||||
public List<PayWorkGroupSubletStatistics> importExcelStatistics(PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,String id) {
|
||||
return payWorkingGroupSubItemMapper.queryPageList2(payWorkingGroupSubletSearch,id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+10
-8
@@ -100,18 +100,20 @@ public class AllProjectStatisticsController {
|
||||
*/
|
||||
@GetMapping(value = "/statistics/excel")
|
||||
@ApiOperation(value = "所领导统计-导出统计", notes = "所领导统计-导出统计")
|
||||
public ModelAndView excel() {
|
||||
AllProjectStatisticsSearch allProjectStatisticsSearch = new AllProjectStatisticsSearch();
|
||||
// Calendar calendar = Calendar.getInstance();
|
||||
// String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
// allProjectStatisticsSearch.setYear(year);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
public ModelAndView excel(AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String roleCode = sysUser.getRoleCode();
|
||||
if(constant.SLD.equals(roleCode)||constant.ADMIN.equals(roleCode)) {
|
||||
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch);
|
||||
if (allProjectStatisticsSearch.getYear() == null || allProjectStatisticsSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
allProjectStatisticsSearch.setYear(year);
|
||||
}
|
||||
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch);
|
||||
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计");
|
||||
|
||||
}else {
|
||||
return new ModelAndView();
|
||||
return new ModelAndView();
|
||||
}
|
||||
}
|
||||
}
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
package com.jero.statistics.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.mail.commont.constant;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.project.entity.PayWorkGroupSubletStatistics;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.statistics.entity.*;
|
||||
import com.jero.util.AmountUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/20 21:00:00
|
||||
*/
|
||||
@Api(tags="个人来款统计")
|
||||
@RestController
|
||||
@RequestMapping("/statistics/principalPeople")
|
||||
@Slf4j
|
||||
public class PrincipalPeopleStatisticsController {
|
||||
@Resource
|
||||
private SysUserMapper userMapper;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private IPayWorkingGroupService payWorkingGroupService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param principalPeopleSearch 全统计搜索
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
*/
|
||||
@ApiOperation(value = "个人来款统计-分页列表查询", notes = "个人来款统计-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> list(PrincipalPeopleSearch principalPeopleSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
if (principalPeopleSearch.getYear() == null || principalPeopleSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
principalPeopleSearch.setYear(year);
|
||||
}
|
||||
//根据不同角色加载不同列表的参数
|
||||
List<String> idList = new ArrayList<>();
|
||||
//判断登录角色,显示特定工作组内容,判断依据为登录用户的角色和机构编码
|
||||
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String roleCode = sysUser.getRoleCode();
|
||||
//科长
|
||||
if(constant.BMFZR.equals(roleCode)) {
|
||||
String orgCode = sysUser.getOrgCode();
|
||||
List<SysUser> userList = userMapper.selectList(new QueryWrapper<SysUser>().eq("status", 1).eq("del_flag", 0).eq("org_code", orgCode));
|
||||
idList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
//所领导或者超级管理员
|
||||
} else if (constant.SLD.equals(roleCode)||constant.ADMIN.equals(roleCode)) {
|
||||
idList=null;
|
||||
//企业职员项目负责人
|
||||
}else if( constant.QYRY.equals(roleCode)){
|
||||
String userId = sysUser.getId();
|
||||
idList.add(userId);
|
||||
}
|
||||
Page<PrincipalPeopleList> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PrincipalPeopleList> pageList = payWorkingGroupService.queryPageListForPrincipal(page,principalPeopleSearch,idList);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
double sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null ? "0" : t.getAllMoney())).sum() : 0;
|
||||
double sum2 = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
hashMap.put("sumOfMoney", sum==0.0?sum:df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sum2==0.0?sum2:df.format(sum2));
|
||||
hashMap.put("pageList",pageList);
|
||||
return Result.OK(hashMap);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param principalPeopleDetailSearch 详情全统计搜索
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
*/
|
||||
@ApiOperation(value = "个人来款统计-详情分页列表查询", notes = "个人来款统计-详情分页列表查询")
|
||||
@GetMapping(value = "/listForDetail")
|
||||
public Result<?> listForDetail(PrincipalPeopleDetailSearch principalPeopleDetailSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
if (principalPeopleDetailSearch.getYear() == null || principalPeopleDetailSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
principalPeopleDetailSearch.setYear(year);
|
||||
}
|
||||
Page<PrincipalPeopleDetail> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PrincipalPeopleDetail> pageList = payWorkingGroupService.queryPageListForPrincipalDetail(page, principalPeopleDetailSearch);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
double sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null ? "0" : t.getAllMoney())).sum() : 0;
|
||||
double sum2 = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
for(PrincipalPeopleDetail s: pageList.getRecords()){
|
||||
String key = String.valueOf(s.getChargeUse());
|
||||
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
|
||||
s.setChargeUse_text(payment_charge_use);
|
||||
}
|
||||
hashMap.put("sumOfMoney", sum == 0.0 ? sum : df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sum2 == 0.0 ? sum2 : df.format(sum2));
|
||||
hashMap.put("pageList", pageList);
|
||||
return Result.OK(hashMap);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*个人来款统计导出
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/excel")
|
||||
@ApiOperation(value = "个人来款统计导出-导出统计", notes = "个人来款统计导出-导出统计")
|
||||
public ModelAndView excel( PrincipalPeopleSearch principalPeopleSearch) {
|
||||
if (principalPeopleSearch.getYear() == null || principalPeopleSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
principalPeopleSearch.setYear(year);
|
||||
}
|
||||
//根据不同角色加载不同列表的参数
|
||||
List<String> idList = new ArrayList<>();
|
||||
//判断登录角色,显示特定工作组内容,判断依据为登录用户的角色和机构编码
|
||||
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String roleCode = sysUser.getRoleCode();
|
||||
//科长
|
||||
if(constant.BMFZR.equals(roleCode)) {
|
||||
String orgCode = sysUser.getOrgCode();
|
||||
List<SysUser> userList = userMapper.selectList(new QueryWrapper<SysUser>().eq("status", 1).eq("del_flag", 0).eq("org_code", orgCode));
|
||||
idList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
//所领导或者超级管理员
|
||||
} else if (constant.SLD.equals(roleCode)||constant.ADMIN.equals(roleCode)) {
|
||||
idList=null;
|
||||
//企业职员项目负责人
|
||||
}else if( constant.QYRY.equals(roleCode)){
|
||||
String userId = sysUser.getId();
|
||||
idList.add(userId);
|
||||
}
|
||||
List<PrincipalPeopleList> pageList = payWorkingGroupService.queryPageListForPrincipalExcel(principalPeopleSearch,idList);
|
||||
|
||||
return AmountUtil.exportListXls(pageList, PrincipalPeopleList.class, "个人来款");
|
||||
}
|
||||
|
||||
/**
|
||||
*个人来款统详情计导出
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/excelDetail")
|
||||
@ApiOperation(value = "个人来款统详情计导出-导出统计", notes = "个人来款统详情计导出-导出统计")
|
||||
public ModelAndView excelDetail( PrincipalPeopleDetailSearch principalPeopleDetailSearch) {
|
||||
if (principalPeopleDetailSearch.getYear() == null || principalPeopleDetailSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
principalPeopleDetailSearch.setYear(year);
|
||||
}
|
||||
List<PrincipalPeopleDetail> pageList = payWorkingGroupService.queryPageListForPrincipalDetailExcel(principalPeopleDetailSearch);
|
||||
|
||||
return AmountUtil.exportListXls(pageList, PrincipalPeopleDetail.class, "个人来款详情");
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/22 11:43
|
||||
*/
|
||||
@Data
|
||||
public class PrincipalPeopleDetail {
|
||||
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private String id;
|
||||
@Excel(name = "来款项目", width = 15)
|
||||
@ApiModelProperty(value = "来款项目")
|
||||
private String projectName;
|
||||
@Excel(name = "应收总金额", width = 15)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
@Excel(name = "实收总金额", width = 15)
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
@Excel(name = "来款用途", width = 15,dicCode = "charge_use")
|
||||
@ApiModelProperty(value = "来款用途编码")
|
||||
private String chargeUse;
|
||||
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
private String chargeUse_text;
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/22 11:38
|
||||
*/
|
||||
@Data
|
||||
public class PrincipalPeopleDetailSearch {
|
||||
|
||||
@ApiModelProperty(value = "项目负责人id")
|
||||
private String principalNameId;
|
||||
|
||||
@ApiModelProperty(value = "来款项目")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "来款年份")
|
||||
private String year;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "来款用途编码")
|
||||
private String chargeUse;
|
||||
|
||||
@ApiModelProperty(value = "付款状态")
|
||||
private String inAccountStatue;
|
||||
|
||||
@DecimalMax(value = "9999999999.99",message = "应收总金额(元)格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private BigDecimal allMoney;
|
||||
|
||||
@DecimalMax(value = "9999999999.99",message = "应收总金额(元)格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@ApiModelProperty(value = "应收总金额范围")
|
||||
private BigDecimal allMoneyTwo;
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@Data
|
||||
public class PrincipalPeopleList {
|
||||
@Excel(name = "项目负责人id", width = 15)
|
||||
@ApiModelProperty(value = "项目负责人id")
|
||||
private String principalId;
|
||||
|
||||
@Excel(name = "项目负责人", width = 15)
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String principalName;
|
||||
|
||||
@Excel(name = "来款项目", width = 15)
|
||||
@DecimalMax(value = "9999999999.99",message = "应收总金额(元)格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
|
||||
@Excel(name = "实收总金额", width = 15)
|
||||
@DecimalMax(value = "9999999999.99",message = "实收总金额(元)格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
|
||||
@Excel(name = "个人完成率", width = 15)
|
||||
@ApiModelProperty(value = "个人完成率")
|
||||
private String finishRate;
|
||||
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.jero.statistics.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class PrincipalPeopleSearch {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "项目负责人id")
|
||||
private String principalId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "应收总金额范围")
|
||||
private String allMoneyTwo;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "来款年份")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(value = "部门编码")
|
||||
private String departCode;
|
||||
}
|
||||
Reference in New Issue
Block a user