工作组统计
This commit is contained in:
+6
-6
@@ -28,16 +28,16 @@ public class payFileDownloadRecordPage {
|
||||
private java.lang.String meetingName;
|
||||
|
||||
/**开始时间*/
|
||||
@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")
|
||||
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
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")
|
||||
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.util.Date endTime;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.demo.payCaseCommittee.mapper.PayCaseCommitteeMapper">
|
||||
<mapper namespace="com.jero.data.mapper.PayCaseCommitteeMapper">
|
||||
|
||||
</mapper>
|
||||
+44
-26
@@ -1,10 +1,7 @@
|
||||
package com.jero.project.controller;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -18,25 +15,27 @@ import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.contract.entity.PayIncomeContract;
|
||||
import com.jero.contract.entity.PayIncomeContractAssociated;
|
||||
import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.contract.service.IPayIncomeContractService;
|
||||
import com.jero.pack.service.IPayPackCompanyProjectService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.*;
|
||||
import com.jero.project.vo.PayWorkingGroupPayment;
|
||||
import com.jero.project.vo.PayWorkingGroupVO;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.util.AmountUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -97,29 +96,25 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param payWorkingGroup 工作组项目
|
||||
* @param payWorkingGroupSearch 工作组项目
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组项目统计-分页列表查询", notes="工作组项目统计-分页列表查询")
|
||||
@ApiOperation(value="工作组项目统计-统计分页列表查询", notes="工作组项目统计-统计分页列表查询")
|
||||
@GetMapping(value = "/list2")
|
||||
public Result<?> list2(PayWorkingGroup payWorkingGroup,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
if(!StringUtils.isBlank(payWorkingGroup.getWorkingGroupProject()) && payWorkingGroup.getWorkingGroupProject().length() > 50){
|
||||
return Result.error("工作组项目长度不能大于50个字符");
|
||||
}
|
||||
Page<PayWorkingGroupVO> page = new Page<PayWorkingGroupVO>(pageNo, pageSize);
|
||||
IPage<PayWorkingGroupVO> pageList = payWorkingGroupService.queryPageListForStatistics(page, payWorkingGroup);
|
||||
if(!Objects.isNull(pageList)){
|
||||
List<PayWorkingGroupVO> listPayWorkingGroupVO = pageList.getRecords();
|
||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupVO)){
|
||||
setPayWorkingGroupSubItem(listPayWorkingGroupVO);
|
||||
pageList.setRecords(listPayWorkingGroupVO);
|
||||
}
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
public Result<?> list2(PayWorkingGroupSearch payWorkingGroupSearch,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
Page<PayWorkingGroupStatistics> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatistics(page, payWorkingGroupSearch);
|
||||
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> objectObjectHashMap = new HashMap<>();
|
||||
objectObjectHashMap.put("分页集合",pageList);
|
||||
objectObjectHashMap.put("总计应收总金额",sum);
|
||||
objectObjectHashMap.put("总计实收总金额",sum2);
|
||||
return Result.OK(objectObjectHashMap);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -395,6 +390,29 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
|
||||
return super.exportXls(request, payWorkingGroup, PayWorkingGroup.class, "pay_working_group");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/exportXls2")
|
||||
@ApiOperation(value="工作组项目统计-统计导出excel", notes="工作组项目统计-统计导出excel")
|
||||
public ModelAndView exportXls2() {
|
||||
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel();
|
||||
return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class,"工作组项目统计");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取工作组列表
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/getGroupList")
|
||||
@ApiOperation(value="获取工作组列表下拉框", notes="获取工作组列表下拉框")
|
||||
public List<String> getGroupList() {
|
||||
List<String> pageList = payWorkingGroupService.getGroupList();
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
|
||||
+242
-185
@@ -10,22 +10,28 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.service.ProjectDetailService;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.vo.ProjectDetailVO;
|
||||
import com.jero.contract.entity.PayIncomeContractAssociated;
|
||||
import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.entity.*;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.project.vo.SetChargeInput;
|
||||
import com.jero.util.AmountUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.record.DVALRecord;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -43,177 +49,204 @@ import io.swagger.annotations.ApiOperation;
|
||||
@RequestMapping("/project/payWorkingGroupSubitem")
|
||||
@Slf4j
|
||||
public class PayWorkingGroupSubItemController extends JeroController<PayWorkingGroupSubItem, IPayWorkingGroupSubItemService> {
|
||||
@Autowired
|
||||
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
|
||||
@Autowired
|
||||
private ProjectDetailService projectDetailService;
|
||||
@Autowired
|
||||
private IPayIncomeContractAssociatedService payIncomeContractAssociatedService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
* @param paymentDate 日期
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-分页列表查询", notes="工作组成员-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(PayWorkingGroupSubItem payWorkingGroupSubItem,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="paymentDate",required = false) String paymentDate) {
|
||||
if(!StringUtils.isBlank(payWorkingGroupSubItem.getChargeCompanyTemporaryName()) && payWorkingGroupSubItem.getChargeCompanyTemporaryName().length() > 50){
|
||||
return Result.error("成员单位长度不能大于50个字符");
|
||||
}
|
||||
if(StringUtils.isBlank(payWorkingGroupSubItem.getWorkingGroupId())){
|
||||
return Result.error("工作组id不能为空!");
|
||||
}
|
||||
Page<PayWorkingGroupSubItem> page = new Page<PayWorkingGroupSubItem>(pageNo, pageSize);
|
||||
IPage<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.queryPageList(page, payWorkingGroupSubItem,paymentDate);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-添加", notes="工作组成员-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
StringBuilder msg = ValidUtil.validateAll(payWorkingGroupSubItem);
|
||||
if(!StringUtils.isBlank(msg)){
|
||||
return Result.error(msg.toString());
|
||||
}
|
||||
payWorkingGroupSubItemService.addPayWorkingGroupSubItem(payWorkingGroupSubItem);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-编辑", notes="工作组成员-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
StringBuilder msg = ValidUtil.validateAll(payWorkingGroupSubItem);
|
||||
if(!StringUtils.isBlank(msg)){
|
||||
return Result.error(msg.toString());
|
||||
}
|
||||
// todo 缺少修改应收金额时查询状态,更新状态
|
||||
payWorkingGroupSubItemService.editPayWorkingGroupSubItem(payWorkingGroupSubItem);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id 工作组成员id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-通过id删除", notes="工作组成员-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id") String id) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
try {
|
||||
LambdaQueryWrapper<PayIncomeContractAssociated> query = new LambdaQueryWrapper<>();
|
||||
query.eq(PayIncomeContractAssociated::getProjectId,id);
|
||||
PayIncomeContractAssociated payIncomeContractAssociated = payIncomeContractAssociatedService.getOne(query);
|
||||
if(!Objects.isNull(payIncomeContractAssociated)){
|
||||
return Result.error("已关联合同不可删除!");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("普通项目管理-批量删除异常",e);
|
||||
return Result.error("已关联合同不可删除!");
|
||||
}
|
||||
payWorkingGroupSubItemService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 工作组成员ids 逗号分隔
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-批量删除", notes="工作组成员-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
|
||||
if(StringUtils.isBlank(ids)){
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
String[] s = ids.split(",");
|
||||
for (String s1 : s) {
|
||||
if(StringUtils.isBlank(s1)){
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
}
|
||||
LambdaQueryWrapper<PayIncomeContractAssociated> query = new LambdaQueryWrapper<>();
|
||||
query.in(PayIncomeContractAssociated::getProjectId,Arrays.asList(ids.split(",")));
|
||||
List<PayIncomeContractAssociated> listPayIncomeContractAssociated = payIncomeContractAssociatedService.list(query);
|
||||
if(!CollectionUtils.isEmpty(listPayIncomeContractAssociated)){
|
||||
return Result.error("已关联合同不可删除!");
|
||||
}
|
||||
payWorkingGroupSubItemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
|
||||
@Autowired
|
||||
private ProjectDetailService projectDetailService;
|
||||
@Autowired
|
||||
private IPayIncomeContractAssociatedService payIncomeContractAssociatedService;
|
||||
|
||||
/**
|
||||
* 查询工作组成员是否收费通知
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ids 工作组成员ids 逗号分隔
|
||||
* @param workingGroupId 工作组id
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
* @param paymentDate 日期
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-查询工作组成员是否收费通知", notes="工作组成员-查询工作组成员是否收费通知")
|
||||
@GetMapping(value = "/getCharge")
|
||||
public Result<?> getCharge(@RequestParam(name = "ids") String ids,@RequestParam(name = "workingGroupId") String workingGroupId) {
|
||||
if(StringUtils.isBlank(ids)){
|
||||
@ApiOperation(value = "工作组成员-分页列表查询", notes = "工作组成员-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(PayWorkingGroupSubItem payWorkingGroupSubItem,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
|
||||
if (!StringUtils.isBlank(payWorkingGroupSubItem.getChargeCompanyTemporaryName()) && payWorkingGroupSubItem.getChargeCompanyTemporaryName().length() > 50) {
|
||||
return Result.error("成员单位长度不能大于50个字符");
|
||||
}
|
||||
if (StringUtils.isBlank(payWorkingGroupSubItem.getWorkingGroupId())) {
|
||||
return Result.error("工作组id不能为空!");
|
||||
}
|
||||
Page<PayWorkingGroupSubItem> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.queryPageList(page, payWorkingGroupSubItem, paymentDate);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param payWorkingGroupSubletSearch 工作组成员统计搜索
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员统计-详情分页列表查询", notes = "工作组成员统计-详情分页列表查询")
|
||||
@GetMapping(value = "/list2")
|
||||
public Result<?> list2(PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<PayWorkGroupSubletStatistics> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.queryPageList2(page, payWorkingGroupSubletSearch);
|
||||
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> objectObjectHashMap = new HashMap<>();
|
||||
objectObjectHashMap.put("分页集合", pageList);
|
||||
objectObjectHashMap.put("总计应收总金额", sum);
|
||||
objectObjectHashMap.put("总计实收总金额", sum2);
|
||||
return Result.OK(objectObjectHashMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员-添加", notes = "工作组成员-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
StringBuilder msg = ValidUtil.validateAll(payWorkingGroupSubItem);
|
||||
if (!StringUtils.isBlank(msg)) {
|
||||
return Result.error(msg.toString());
|
||||
}
|
||||
payWorkingGroupSubItemService.addPayWorkingGroupSubItem(payWorkingGroupSubItem);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员-编辑", notes = "工作组成员-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
StringBuilder msg = ValidUtil.validateAll(payWorkingGroupSubItem);
|
||||
if (!StringUtils.isBlank(msg)) {
|
||||
return Result.error(msg.toString());
|
||||
}
|
||||
// todo 缺少修改应收金额时查询状态,更新状态
|
||||
payWorkingGroupSubItemService.editPayWorkingGroupSubItem(payWorkingGroupSubItem);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id 工作组成员id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员-通过id删除", notes = "工作组成员-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
try {
|
||||
LambdaQueryWrapper<PayIncomeContractAssociated> query = new LambdaQueryWrapper<>();
|
||||
query.eq(PayIncomeContractAssociated::getProjectId, id);
|
||||
PayIncomeContractAssociated payIncomeContractAssociated = payIncomeContractAssociatedService.getOne(query);
|
||||
if (!Objects.isNull(payIncomeContractAssociated)) {
|
||||
return Result.error("已关联合同不可删除!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("普通项目管理-批量删除异常", e);
|
||||
return Result.error("已关联合同不可删除!");
|
||||
}
|
||||
payWorkingGroupSubItemService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 工作组成员ids 逗号分隔
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员-批量删除", notes = "工作组成员-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
String[] s = ids.split(",");
|
||||
for (String s1 : s) {
|
||||
if(StringUtils.isBlank(s1)){
|
||||
if (StringUtils.isBlank(s1)) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
}
|
||||
LambdaQueryWrapper<PayIncomeContractAssociated> query = new LambdaQueryWrapper<>();
|
||||
query.in(PayIncomeContractAssociated::getProjectId, Arrays.asList(ids.split(",")));
|
||||
List<PayIncomeContractAssociated> listPayIncomeContractAssociated = payIncomeContractAssociatedService.list(query);
|
||||
if (!CollectionUtils.isEmpty(listPayIncomeContractAssociated)) {
|
||||
return Result.error("已关联合同不可删除!");
|
||||
}
|
||||
payWorkingGroupSubItemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工作组成员是否收费通知
|
||||
*
|
||||
* @param ids 工作组成员ids 逗号分隔
|
||||
* @param workingGroupId 工作组id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员-查询工作组成员是否收费通知", notes = "工作组成员-查询工作组成员是否收费通知")
|
||||
@GetMapping(value = "/getCharge")
|
||||
public Result<?> getCharge(@RequestParam(name = "ids") String ids, @RequestParam(name = "workingGroupId") String workingGroupId) {
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
String[] s = ids.split(",");
|
||||
for (String s1 : s) {
|
||||
if (StringUtils.isBlank(s1)) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
}
|
||||
LambdaQueryWrapper<PayWorkingGroupSubItem> query = new LambdaQueryWrapper<>();
|
||||
query.in(PayWorkingGroupSubItem::getId,Arrays.asList(ids.split(",")));
|
||||
query.eq(PayWorkingGroupSubItem::getWorkingGroupId,workingGroupId);
|
||||
query.in(PayWorkingGroupSubItem::getId, Arrays.asList(ids.split(",")));
|
||||
query.eq(PayWorkingGroupSubItem::getWorkingGroupId, workingGroupId);
|
||||
List<PayWorkingGroupSubItem> list = payWorkingGroupSubItemService.list();
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
List<PayWorkingGroupSubItem> listNew = list.stream().filter(p->!Objects.equals(p.getChargeWay(),PayProjectCommon.CHARGE_WAY3)).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listNew)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
List<PayWorkingGroupSubItem> listNew = list.stream().filter(p -> !Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY3)).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(listNew)) {
|
||||
return Result.error("存在来款方式不是收费通知的选项!");
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return Result.error("请选择项目!");
|
||||
}
|
||||
return Result.OK("来款方式都是收费通知!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置收费通知
|
||||
* 设置收费通知
|
||||
*
|
||||
* @param input 收费通知
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-设置收费通知", notes="工作组成员-设置收费通知")
|
||||
@ApiOperation(value = "工作组成员-设置收费通知", notes = "工作组成员-设置收费通知")
|
||||
@PostMapping(value = "/setCharge")
|
||||
public Result<?> setCharge(@RequestBody SetChargeInput input) {
|
||||
if(StringUtils.isBlank(input.getIds())){
|
||||
if (StringUtils.isBlank(input.getIds())) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
String[] s = input.getIds().split(",");
|
||||
for (String s1 : s) {
|
||||
if(StringUtils.isBlank(s1)){
|
||||
if (StringUtils.isBlank(s1)) {
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
}
|
||||
@@ -221,58 +254,82 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
||||
payWorkingGroupSubItemService.updateBatchSetCharge(input);
|
||||
return Result.OK("设置收费通知成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id 工作组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-通过id查询", notes="工作组成员-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id") String id) {
|
||||
PayWorkingGroupSubItem payWorkingGroupSubitem = payWorkingGroupSubItemService.getById(id);
|
||||
if(payWorkingGroupSubitem==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
ProjectDetailVO projectDetailVO = projectDetailService.getProjectDetail(payWorkingGroupSubitem.getId());
|
||||
return Result.OK(projectDetailVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
*/
|
||||
@GetMapping(value = "/exportXls")
|
||||
@ApiOperation(value="工作组成员-导出excel", notes="工作组成员-导出excel")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
return super.exportXls(request, payWorkingGroupSubItem, PayWorkingGroupSubItem.class, "工作组成员");
|
||||
}
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id 工作组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "工作组成员-通过id查询", notes = "工作组成员-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id") String id) {
|
||||
PayWorkingGroupSubItem payWorkingGroupSubitem = payWorkingGroupSubItemService.getById(id);
|
||||
if (payWorkingGroupSubitem == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
ProjectDetailVO projectDetailVO = projectDetailService.getProjectDetail(payWorkingGroupSubitem.getId());
|
||||
return Result.OK(projectDetailVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
*/
|
||||
@GetMapping(value = "/exportXls")
|
||||
@ApiOperation(value = "工作组成员-导出excel", notes = "工作组成员-导出excel")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
return super.exportXls(request, payWorkingGroupSubItem, PayWorkingGroupSubItem.class, "工作组成员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 模板下载
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="工作组成员-模板下载", notes="工作组成员-模板下载")
|
||||
@ApiOperation(value = "工作组成员-模板下载", notes = "工作组成员-模板下载")
|
||||
@GetMapping(value = "/downloadExcelModel")
|
||||
public ModelAndView downloadExcelModel() {
|
||||
return super.exportTemplate(PayWorkingGroupSubItem.class,"工作组成员导入模板");
|
||||
return super.exportTemplate(PayWorkingGroupSubItem.class, "工作组成员导入模板");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/importExcel")
|
||||
@ApiOperation(value="工作组成员-通过excel导入数据", notes="工作组成员-通过excel导入数据")
|
||||
public Result<?> importExcel(HttpServletRequest request) {
|
||||
payWorkingGroupSubItemService.importExcel(request);
|
||||
return Result.OK("文件导入成功!");
|
||||
}
|
||||
|
||||
}
|
||||
@ApiOperation(value = "字典表获取", notes = "字典表获取")
|
||||
@GetMapping(value = "/getChartUseDict")
|
||||
public HashMap getChartUse() {
|
||||
List<DictModel> payment_charge_use = sysBaseAPI.queryDictItemsByCode("payment_charge_use");
|
||||
List<DictModel> account_type = sysBaseAPI.queryDictItemsByCode("account_type");
|
||||
HashMap<String, List<DictModel>> hashMap = new HashMap<>();
|
||||
hashMap.put("来款用途", payment_charge_use);
|
||||
hashMap.put("到账状态", account_type);
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/importExcel")
|
||||
@ApiOperation(value = "工作组成员-通过excel导入数据", notes = "工作组成员-通过excel导入数据")
|
||||
public Result<?> importExcel(HttpServletRequest request) {
|
||||
payWorkingGroupSubItemService.importExcel(request);
|
||||
return Result.OK("文件导入成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/importExcelStatistics")
|
||||
@ApiOperation(value = "工作组成员统计-导出统计", notes = "工作组成员统计-导出统计")
|
||||
public ModelAndView importExcelStatistics(@RequestParam(name = "id", required = true) String id) {
|
||||
List<PayWorkGroupSubletStatistics> list = payWorkingGroupSubItemService.importExcelStatistics(id);
|
||||
return AmountUtil.exportListXls(list, PayWorkGroupSubletStatistics.class, "工作组成员统计");
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/14 11:37
|
||||
*/
|
||||
@Data
|
||||
public class PayWorkGroupSubletStatistics {
|
||||
|
||||
@ApiModelProperty(value = "工作组成员id")
|
||||
private String id;
|
||||
|
||||
@Excel(name = "项目负责人", width = 15)
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String principalName;
|
||||
|
||||
@Excel(name = "来款单位", width = 15)
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String chargeCompanyTemporaryName;
|
||||
|
||||
@Excel(name = "应收总金额", width = 15)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
|
||||
@Excel(name = "实收总金额", width = 15)
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
|
||||
@Dict(dicCode = "payment_charge_use")
|
||||
@Excel(name = "来款用途", width = 15)
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
private int chargeUse;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/13 10:45
|
||||
*/
|
||||
@Data
|
||||
public class PayWorkingGroupSearch {
|
||||
|
||||
@ApiModelProperty(value = "工作组")
|
||||
private String workGroup;
|
||||
@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;
|
||||
@ApiModelProperty(value = "来款年份")
|
||||
private String year;
|
||||
|
||||
}
|
||||
+8
-6
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
@@ -11,19 +14,18 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class PayWorkingGroupStatistics {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "工作组")
|
||||
@Excel(name = "负责人", width = 15)
|
||||
@ApiModelProperty(value = "负责人")
|
||||
private String workGroup;
|
||||
|
||||
@Excel(name = "应收总金额", width = 15)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
|
||||
@Excel(name = "实收总金额", width = 15)
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
|
||||
@Excel(name = "完收完成率", width = 15)
|
||||
@ApiModelProperty(value = "完收完成率")
|
||||
private String moneyRate;
|
||||
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/14 9:17
|
||||
*/
|
||||
@Data
|
||||
public class PayWorkingGroupSubletSearch {
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "来款项目")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String chargeCompanyTemporaryName;
|
||||
|
||||
@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;
|
||||
|
||||
@ApiModelProperty(value = "来款年份")
|
||||
private int year;
|
||||
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
private int chargeUse;
|
||||
|
||||
@ApiModelProperty(value = "付款状态")
|
||||
private int inAccountStatue;
|
||||
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String principalName;
|
||||
}
|
||||
+18
-3
@@ -2,6 +2,8 @@ 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.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;
|
||||
@@ -48,12 +50,25 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
||||
List<PayWorkingGroup> queryListByNotCompany(@Param("companyId") String companyId);
|
||||
|
||||
/**
|
||||
* @Description 查询不存在成员单位的列表
|
||||
* @Author zqk
|
||||
* @Description 工作组统计
|
||||
* @Author zql
|
||||
* @Date 2021/9/13
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
IPage<PayWorkingGroupVO> queryPageListForStatistics(Page<PayWorkingGroupVO> page, PayWorkingGroup payWorkingGroup);
|
||||
IPage<PayWorkingGroupStatistics> queryPageListForStatistics(Page<PayWorkingGroupStatistics> page,@Param("payWorkingGroupSearch") PayWorkingGroupSearch payWorkingGroupSearch);
|
||||
|
||||
/**
|
||||
* @Description 工作组统计导出
|
||||
* @Author zql
|
||||
* @Date 2021/9/13
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel();
|
||||
|
||||
List<String> getGroupList();
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -2,11 +2,15 @@ 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.PayWorkingGroupSubItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.project.entity.PayWorkingGroupSubletSearch;
|
||||
import com.jero.project.vo.SetChargeInput;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: pay_working_group_subitem
|
||||
* @Author: jeecg-boot
|
||||
@@ -35,4 +39,9 @@ public interface PayWorkingGroupSubItemMapper extends BaseMapper<PayWorkingGroup
|
||||
IPage<PayWorkingGroupSubItem> queryPageList(Page<PayWorkingGroupSubItem> page, @Param("payWorkingGroupSubItem") PayWorkingGroupSubItem payWorkingGroupSubItem,
|
||||
@Param("paymentDate") String paymentDate);
|
||||
|
||||
|
||||
IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, @Param("payWorkingGroupSubletSearch") PayWorkingGroupSubletSearch payWorkingGroupSubletSearch);
|
||||
|
||||
List<PayWorkGroupSubletStatistics> importExcelStatistics(@Param("id") String id);
|
||||
|
||||
}
|
||||
|
||||
+41
-10
@@ -103,20 +103,51 @@
|
||||
</select>
|
||||
<select id="queryPageListForStatistics" resultType="com.jero.project.entity.PayWorkingGroupStatistics">
|
||||
SELECT
|
||||
id,
|
||||
working_group_project AS workGroup
|
||||
FROM pay_working_group
|
||||
pwg.id,
|
||||
pwg.working_group_project AS workGroup,
|
||||
pwgs.allMoney,
|
||||
pwgs.comeAllMoney,
|
||||
CONCAT(CAST(ROUND((pwgs.comeAllMoney/pwgs.allMoney)*100,2) AS CHAR),'%') AS moneyRate
|
||||
FROM pay_working_group pwg left join (select id,working_group_id,SUM(receivable_amount) AS allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_working_group_subitem where working_group_id GROUP BY working_group_id) pwgs on(pwg.id=pwgs.working_group_id)
|
||||
left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="payWorkingGroup.workingGroupProject != null and payWorkingGroup.workingGroupProject != ''">
|
||||
AND working_group_project LIKE concat('%',concat(#{payWorkingGroup.workingGroupProject},'%'))
|
||||
<if test="payWorkingGroupSearch.workGroup != null and payWorkingGroupSearch.workGroup != ''">
|
||||
AND pwg.working_group_project LIKE concat('%',concat(#{payWorkingGroupSearch.workGroup},'%'))
|
||||
</if>
|
||||
<if test="payWorkingGroup.principalIdA != null and payWorkingGroup.principalIdA != ''">
|
||||
AND principal_id_a = #{payWorkingGroup.principalIdA}
|
||||
</if>
|
||||
<if test="payWorkingGroup.year != null and payWorkingGroup.year != ''">
|
||||
AND year = #{payWorkingGroup.year}
|
||||
<if test="payWorkingGroupSearch.year != null and payWorkingGroupSearch.year != ''">
|
||||
AND date_format(ppr.payment_date,'%Y-%m-%d') LIKE concat('%',concat(#{payWorkingGroupSearch.year},'%'))
|
||||
</if>
|
||||
<choose>
|
||||
<when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
|
||||
AND pwgs.allMoney > #{payWorkingGroupSearch.allMoney} and pwgs.allMoney <![CDATA[<]]> #{payWorkingGroupSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != ''">
|
||||
AND pwgs.allMoney > #{payWorkingGroupSearch.allMoney}
|
||||
</if>
|
||||
<if test="payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
|
||||
AND pwgs.allMoney <![CDATA[<]]> #{payWorkingGroupSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</select>
|
||||
<select id="queryPageListForStatisticsExcel" resultType="com.jero.project.entity.PayWorkingGroupStatistics">
|
||||
SELECT
|
||||
pwg.id,
|
||||
pwg.working_group_project AS workGroup,
|
||||
pwgs.allMoney,
|
||||
pwgs.comeAllMoney,
|
||||
CONCAT(CAST(ROUND((pwgs.comeAllMoney/pwgs.allMoney)*100,2) AS CHAR),'%') AS moneyRate
|
||||
FROM pay_working_group pwg left join (select working_group_id,SUM(receivable_amount) AS allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_working_group_subitem where working_group_id GROUP BY working_group_id) pwgs on(pwg.id=pwgs.working_group_id)
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getGroupList" resultType="java.lang.String">
|
||||
SELECT
|
||||
pwg.working_group_project
|
||||
FROM pay_working_group pwg group by working_group_project
|
||||
</select>
|
||||
</mapper>
|
||||
+48
@@ -63,4 +63,52 @@
|
||||
</where>
|
||||
order by pwgs.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="queryPageList2" 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 = #{payWorkingGroupSubletSearch.id}
|
||||
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
|
||||
AND pwg.working_group_project LIKE
|
||||
concat('%',concat(#{payWorkingGroupSubletSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.chargeUse != null and payWorkingGroupSubletSearch.chargeUse != ''">
|
||||
AND pwgs.charge_use=#{payWorkingGroupSubletSearch.chargeUse}
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.chargeCompanyTemporaryName != null and payWorkingGroupSubletSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pwgs.charge_company_temporary_name=#{payWorkingGroupSubletSearch.chargeCompanyTemporaryName}
|
||||
</if>
|
||||
<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.principalName != null and payWorkingGroupSubletSearch.principalName != ''">
|
||||
AND pwg.principal_name_a=#{payWorkingGroupSubletSearch.principalName}
|
||||
</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}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="payWorkingGroupSubletSearch.allMoney != null and payWorkingGroupSubletSearch.allMoney != ''">
|
||||
AND pwgs.receivable_amount > #{payWorkingGroupSubletSearch.allMoney}
|
||||
</if>
|
||||
<if test="payWorkingGroupSubletSearch.allMoneyTwo != null and payWorkingGroupSubletSearch.allMoneyTwo != ''">
|
||||
AND pwgs.receivable_amount <![CDATA[<]]> #{payWorkingGroupSubletSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
group by pwgs.id
|
||||
</select>
|
||||
</mapper>
|
||||
+15
-1
@@ -2,6 +2,8 @@ package com.jero.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.extension.service.IService;
|
||||
@@ -69,5 +71,17 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
IPage<PayWorkingGroupVO> queryPageListForStatistics(Page<PayWorkingGroupVO> page, PayWorkingGroup payWorkingGroup);
|
||||
IPage<PayWorkingGroupStatistics> queryPageListForStatistics(Page<PayWorkingGroupStatistics> page, PayWorkingGroupSearch payWorkingGroupSearch);
|
||||
/**
|
||||
* @Description 工作组统计查询导出
|
||||
* @Author zql
|
||||
* @Date 2021/9/13
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel();
|
||||
|
||||
List<String> getGroupList();
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -2,8 +2,10 @@ package com.jero.project.service;
|
||||
|
||||
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.PayWorkingGroupSubItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.project.entity.PayWorkingGroupSubletSearch;
|
||||
import com.jero.project.vo.SetChargeInput;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -61,4 +63,17 @@ public interface IPayWorkingGroupSubItemService extends IService<PayWorkingGroup
|
||||
* @Exception
|
||||
*/
|
||||
void importExcel(HttpServletRequest request);
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author ZQL
|
||||
* @param page
|
||||
* @param payWorkingGroupSubletSearch
|
||||
* @return
|
||||
*/
|
||||
|
||||
IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch);
|
||||
|
||||
List<PayWorkGroupSubletStatistics> importExcelStatistics(String id);
|
||||
|
||||
}
|
||||
|
||||
+14
-5
@@ -4,11 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
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.exception.JeroBootException;
|
||||
import com.jero.contract.entity.PayIncomeContractAssociated;
|
||||
import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.project.entity.PayWorkingGroupSearch;
|
||||
import com.jero.project.entity.PayWorkingGroupStatistics;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.project.vo.PayWorkingGroupVO;
|
||||
@@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -86,8 +85,18 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PayWorkingGroupVO> queryPageListForStatistics(Page<PayWorkingGroupVO> page, PayWorkingGroup payWorkingGroup) {
|
||||
return payWorkingGroupMapper.queryPageListForStatistics(page,payWorkingGroup);
|
||||
public IPage<PayWorkingGroupStatistics> queryPageListForStatistics(Page<PayWorkingGroupStatistics> page, PayWorkingGroupSearch payWorkingGroupSearch) {
|
||||
return payWorkingGroupMapper.queryPageListForStatistics(page,payWorkingGroupSearch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayWorkingGroupStatistics> queryPageListForStatisticsExcel() {
|
||||
return payWorkingGroupMapper.queryPageListForStatisticsExcel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getGroupList() {
|
||||
return payWorkingGroupMapper.getGroupList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+11
-3
@@ -17,11 +17,9 @@ import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.contract.service.IPayIncomeContractService;
|
||||
import com.jero.pack.service.IPayPackCompanyProjectService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.PayCommonProject;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.entity.*;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.mapper.PayWorkingGroupSubItemMapper;
|
||||
import com.jero.project.vo.SetChargeInput;
|
||||
import com.jero.temporary.entity.PayCompanyManagementTemporary;
|
||||
@@ -475,6 +473,16 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PayWorkGroupSubletStatistics> queryPageList2(Page<PayWorkGroupSubletStatistics> page, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch) {
|
||||
return payWorkingGroupSubItemMapper.queryPageList2(page,payWorkingGroupSubletSearch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayWorkGroupSubletStatistics> importExcelStatistics(String id) {
|
||||
return payWorkingGroupSubItemMapper.importExcelStatistics(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 插入企业信息,联系人信息到临时表,更新项目记录
|
||||
* @Author lqt
|
||||
|
||||
Reference in New Issue
Block a user