fix 首页 应收账款 开票日期多个会导致查询出重复数据的bug
This commit is contained in:
+2
-1
@@ -11,6 +11,7 @@ import com.jero.index.vo.*;
|
|||||||
import com.jero.project.service.IPayWorkingGroupService;
|
import com.jero.project.service.IPayWorkingGroupService;
|
||||||
import com.jero.statistics.entity.AllMoney;
|
import com.jero.statistics.entity.AllMoney;
|
||||||
import com.jero.statistics.entity.AllProjectStatistics;
|
import com.jero.statistics.entity.AllProjectStatistics;
|
||||||
|
import com.jero.statistics.entity.AllProjectStatisticsOther;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -153,7 +154,7 @@ public class IndexController {
|
|||||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
String title = "应收账款统计";
|
String title = "应收账款统计";
|
||||||
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
||||||
mv.addObject(NormalExcelConstants.CLASS, AllProjectStatistics.class);
|
mv.addObject(NormalExcelConstants.CLASS, AllProjectStatisticsOther.class);
|
||||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||||
ExportParams exportParams=new ExportParams(title, title);
|
ExportParams exportParams=new ExportParams(title, title);
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ public class IndexService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Object> uncollectedList(String type, String departCode, Page<AllProjectStatistics> page, String column, String order) {
|
public HashMap<String, Object> uncollectedList(String type, String departCode, Page<AllProjectStatistics> page, String column, String order) {
|
||||||
IPage<AllProjectStatistics> pageList = new Page<>();
|
IPage<AllProjectStatisticsOther> pageList = new Page<>();
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "1":
|
case "1":
|
||||||
@@ -377,14 +377,14 @@ public class IndexService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pageList.getRecords() != null) {
|
if (pageList.getRecords() != null) {
|
||||||
for (AllProjectStatistics s : pageList.getRecords()) {
|
for (AllProjectStatisticsOther s : pageList.getRecords()) {
|
||||||
String key = String.valueOf(s.getChargeUse());
|
String key = String.valueOf(s.getChargeUse());
|
||||||
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
|
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
|
||||||
s.setChargeUse_text(payment_charge_use);
|
s.setChargeUse_text(payment_charge_use);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//处理为空数据为0
|
//处理为空数据为0
|
||||||
for (AllProjectStatistics s : pageList.getRecords()) {
|
for (AllProjectStatisticsOther s : pageList.getRecords()) {
|
||||||
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
||||||
s.setAllMoney("0.00");
|
s.setAllMoney("0.00");
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -244,7 +244,7 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
|||||||
|
|
||||||
BigDecimal invoiceAmount(@Param("start") Integer start, @Param("end") Integer end, @Param("departCode") String departCode);
|
BigDecimal invoiceAmount(@Param("start") Integer start, @Param("end") Integer end, @Param("departCode") String departCode);
|
||||||
|
|
||||||
IPage<AllProjectStatistics> invoiceAmountList(Page<AllProjectStatistics> page, @Param("start") Integer start, @Param("end") Integer end, @Param("departCode") String departCode, @Param("column") String column, @Param("order") String order);
|
IPage<AllProjectStatisticsOther> invoiceAmountList(Page<AllProjectStatistics> page, @Param("start") Integer start, @Param("end") Integer end, @Param("departCode") String departCode, @Param("column") String column, @Param("order") String order);
|
||||||
|
|
||||||
AllMoney invoiceAmountList33(@Param("start") Integer start, @Param("end") Integer end, @Param("departCode") String departCode);
|
AllMoney invoiceAmountList33(@Param("start") Integer start, @Param("end") Integer end, @Param("departCode") String departCode);
|
||||||
|
|
||||||
|
|||||||
+6
-4
@@ -2421,9 +2421,9 @@
|
|||||||
order by allMoney desc
|
order by allMoney desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="invoiceAmountList" resultType="com.jero.statistics.entity.AllProjectStatistics">
|
<select id="invoiceAmountList" resultType="com.jero.statistics.entity.AllProjectStatisticsOther">
|
||||||
select * from
|
select * from
|
||||||
(SELECT DISTINCT v.projectId,
|
(SELECT v.projectId,
|
||||||
projectName,
|
projectName,
|
||||||
principalName,
|
principalName,
|
||||||
chargeCompanyTemporaryName,
|
chargeCompanyTemporaryName,
|
||||||
@@ -2436,7 +2436,7 @@
|
|||||||
paidNoTaxAmount AS comeAllMoney,
|
paidNoTaxAmount AS comeAllMoney,
|
||||||
invoiceNoTaxAmount AS billMoney,
|
invoiceNoTaxAmount AS billMoney,
|
||||||
confirmNoTaxAmount AS confirmAmount,
|
confirmNoTaxAmount AS confirmAmount,
|
||||||
pmb.bill_date,
|
group_concat(DATE_FORMAT(pmb.bill_date, '%Y-%m-%d')) as bill_date,
|
||||||
year
|
year
|
||||||
FROM v_statistical_all v
|
FROM v_statistical_all v
|
||||||
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
|
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
|
||||||
@@ -2457,7 +2457,9 @@
|
|||||||
<!-- 开票未来款 -->
|
<!-- 开票未来款 -->
|
||||||
AND (comeAllMoney <![CDATA[<]]> v.invoiceAmount or
|
AND (comeAllMoney <![CDATA[<]]> v.invoiceAmount or
|
||||||
(comeAllMoney is null and v.invoiceAmount is not null and v.invoiceAmount != 0))
|
(comeAllMoney is null and v.invoiceAmount is not null and v.invoiceAmount != 0))
|
||||||
</where>) p
|
</where>
|
||||||
|
group by v.projectId
|
||||||
|
) p
|
||||||
<if test="column != null and column != ''">
|
<if test="column != null and column != ''">
|
||||||
<if test="column == 'allMoney' and order == 'desc'">
|
<if test="column == 'allMoney' and order == 'desc'">
|
||||||
order by allMoney desc
|
order by allMoney desc
|
||||||
|
|||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
package com.jero.statistics.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zql
|
||||||
|
* @date 2021/9/17 18:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class AllProjectStatisticsOther {
|
||||||
|
@ApiModelProperty(value = "项目id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@Excel(name = "来款项目", width = 15)
|
||||||
|
@ApiModelProperty(value = "来款项目")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Excel(name = "项目负责人", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目负责人")
|
||||||
|
private String principalName;
|
||||||
|
|
||||||
|
@Excel(name = "科室", width = 15)
|
||||||
|
@ApiModelProperty(value = "科室")
|
||||||
|
private String depart;
|
||||||
|
|
||||||
|
@Excel(name = "来款单位", width = 15)
|
||||||
|
@ApiModelProperty(value = "来款单位")
|
||||||
|
private String chargeCompanyTemporaryName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打包")
|
||||||
|
private Integer pack;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Excel(name = "打包", width = 15)
|
||||||
|
@ApiModelProperty(value = "打包")
|
||||||
|
private String packText;
|
||||||
|
|
||||||
|
@Excel(name = "开票时间", width = 15)
|
||||||
|
@ApiModelProperty(value = "开票时间")
|
||||||
|
private String billDate;
|
||||||
|
|
||||||
|
@Excel(name = "年度待确收金额", width = 15)
|
||||||
|
@ApiModelProperty(value = "合同金额")
|
||||||
|
private String allMoney;
|
||||||
|
|
||||||
|
@Excel(name = "确认收入金额", width = 15)
|
||||||
|
@ApiModelProperty(value = "确认收入金额")
|
||||||
|
private String confirmAmount;
|
||||||
|
|
||||||
|
@Excel(name = "开票金额", width = 15)
|
||||||
|
@ApiModelProperty(value = "开票金额")
|
||||||
|
private String billMoney;
|
||||||
|
|
||||||
|
@Excel(name = "到账金额", width = 15)
|
||||||
|
@ApiModelProperty(value = "到账金额")
|
||||||
|
private String comeAllMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "来款用途编码")
|
||||||
|
private String chargeUse;
|
||||||
|
|
||||||
|
@Excel(name = "来款用途", width = 15)
|
||||||
|
@ApiModelProperty(value = "来款用途")
|
||||||
|
private String ChargeUse_text;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "到账时间")
|
||||||
|
private String paymentDate;
|
||||||
|
|
||||||
|
@Excel(name = "项目年份", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
|
||||||
|
public AllProjectStatisticsOther(String allMoney, String confirmAmount, String billMoney, String comeAllMoney, String paymentDate) {
|
||||||
|
this.allMoney=allMoney;
|
||||||
|
this.confirmAmount=confirmAmount;
|
||||||
|
this.billMoney=billMoney;
|
||||||
|
this.comeAllMoney=comeAllMoney;
|
||||||
|
this.paymentDate=paymentDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user