add:统计打包变更

This commit is contained in:
zhangqinlin
2022-07-08 15:07:16 +08:00
parent c35e8f0a24
commit add8cccb15
21 changed files with 525 additions and 474 deletions
@@ -173,6 +173,9 @@
<if test="pack != null and pack != ''">
AND c.pack = #{pack}
</if>
<if test="chargeUse != null and chargeUse != ''">
AND c.charge_use = #{chargeUse}
</if>
</where>
<!--工作组项目-->
UNION ALL
@@ -197,6 +200,9 @@
<if test="pack != null and pack != ''">
AND gsub.pack = #{pack}
</if>
<if test="chargeUse != null and chargeUse != ''">
AND gsub.charge_use = #{chargeUse}
</if>
</where>
<!-- 会议项目-->
UNION ALL
@@ -221,6 +227,9 @@
<if test="pack != null and pack != ''">
AND sit.pack = #{pack}
</if>
<if test="chargeUse != null and chargeUse != ''">
AND sit.charge_use = #{chargeUse}
</if>
</where>
<!-- 会员项目-->
UNION ALL
@@ -244,6 +253,9 @@
<if test="pack != null and pack != ''">
AND msub.pack = #{pack}
</if>
<if test="chargeUse != null and chargeUse != ''">
AND msub.charge_use = #{chargeUse}
</if>
</where>
<!-- 标协会员项目-->
UNION ALL
@@ -267,6 +279,9 @@
<if test="pack != null and pack != ''">
AND tmsub.pack = #{pack}
</if>
<if test="chargeUse != null and chargeUse != ''">
AND tmsub.charge_use = #{chargeUse}
</if>
</where>
<!-- 证书 tcp.mobile,tcp.email -->
<!-- 标协会员项目-->
@@ -291,6 +306,9 @@
<if test="pack != null and pack != ''">
AND tcp.pack = #{pack}
</if>
<if test="chargeUse != null and chargeUse != ''">
AND tcp.charge_use = #{chargeUse}
</if>
</where>
) project
<if test="packId != null and packId != ''">
@@ -52,4 +52,10 @@ public class PayPackCompanyProjectInput implements Serializable {
*/
@ApiModelProperty(value = "来款年份")
private String paymentDate;
/**
* 来款用途 20220708
*/
@ApiModelProperty(value = "来款用途")
private String chargeUse;
}
@@ -26,21 +26,21 @@ public class PayWorkGroupSubletStatistics {
@Excel(name = "打包", width = 15)
private String packText;
@Excel(name = "应收总金额", width = 15)
@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 confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
@Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "到账金额")
private String comeAllMoney;
@Excel(name = "来款用途", width = 15, dicCode="payment_charge_use")
@Dict(dicCode = "payment_charge_use")
@@ -22,6 +22,12 @@ public class PayWorkingGroupSearch {
@ApiModelProperty(value = "应收总金额")
private String allMoney;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo;
@@ -19,20 +19,20 @@ public class PayWorkingGroupStatistics {
@Excel(name = "工作组", width = 15)
@ApiModelProperty(value = "工作组")
private String workGroup;
@Excel(name = "应收总金额", width = 15)
@ApiModelProperty(value = "应收总金额")
@Excel(name = "合同总金额", width = 15)
@ApiModelProperty(value = "合同总金额")
private String allMoney;
@Excel(name = "实收总金额", width = 15)
@ApiModelProperty(value = "实收总金额")
@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;
@Excel(name = "实收完成率", width = 15)
@ApiModelProperty(value = "实收完成率")
private String moneyRate;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
}
@@ -32,8 +32,11 @@ public class PayWorkingGroupSubletSearch {
@ApiModelProperty(value = "来款年份")
private String year;
@ApiModelProperty(value = "开票年份")
private String billYear;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "来款用途")
private String chargeUse;
@@ -82,6 +82,7 @@
FROM v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where>
superId = #{id}
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
@@ -118,8 +119,8 @@
</if>
</otherwise>
</choose>
<if test="payWorkingGroupSubletSearch.billYear != null and payWorkingGroupSubletSearch.billYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{payWorkingGroupSubletSearch.billYear}, '%')
<if test="payWorkingGroupSubletSearch.paymentYear != null and payWorkingGroupSubletSearch.paymentYear != ''">
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSubletSearch.paymentYear}, '%')
</if>
</where>
group by id
@@ -144,6 +145,7 @@
FROM v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where>
superId = #{id}
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
@@ -180,8 +182,8 @@
</if>
</otherwise>
</choose>
<if test="payWorkingGroupSubletSearch.billYear != null and payWorkingGroupSubletSearch.billYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{payWorkingGroupSubletSearch.billYear}, '%')
<if test="payWorkingGroupSubletSearch.paymentYear != null and payWorkingGroupSubletSearch.paymentYear != ''">
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSubletSearch.paymentYear}, '%')
</if>
</where>
group by id) p
@@ -178,8 +178,6 @@ public class AllProjectStatisticsController {
@ApiOperation(value = "全所统计导出-导出统计", notes = "全所统计导出-导出统计")
public ModelAndView excel(AllProjectStatisticsSearch allProjectStatisticsSearch,
@RequestParam(name = "selections", required = false) String selections) {
if (StringUtils.isBlank(selections)) {
allProjectStatisticsSearch.setProjectName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getProjectName()));
allProjectStatisticsSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
if (allProjectStatisticsSearch.getYear() == null || allProjectStatisticsSearch.getYear().equals("")) {
@@ -205,34 +203,7 @@ public class AllProjectStatisticsController {
}
}
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计");
} else {
ArrayList<String> strings = new ArrayList<>(Arrays.asList(selections.split(",")));
allProjectStatisticsSearch.setProjectName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getProjectName()));
allProjectStatisticsSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
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, null, strings);
if (pageList != null) {
for (AllProjectStatistics s : pageList) {
String key = String.valueOf(s.getChargeUse());
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
s.setChargeUse_text(payment_charge_use);
//处理为空数据为0
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
s.setAllMoney("0.00");
}
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
}
}
}
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计");
}
}
/**
@@ -265,7 +236,7 @@ public class AllProjectStatisticsController {
idList.addAll(allDepartIds);
} else {
ArrayList<AllProjectStatistics> objects = new ArrayList<>();
return AmountUtil.exportListXls(objects, AllProjectStatistics.class, "项目来款统计");
return AmountUtil.exportListXls(objects, AllProjectStatistics.class, "科室统计");
}
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch, idList);
@@ -283,7 +254,7 @@ public class AllProjectStatisticsController {
}
}
}
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "项目来款统计");
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "科室统计");
}
@ApiOperation(value = "通过部门id查所有人员", notes = "通过部门id查所有人员")
@@ -126,6 +126,9 @@ public class CompanyComeMoneyStatisticsController {
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
}
if (s.getBillMoney() == null || s.getBillMoney().equals("")) {
s.setBillMoney("0.00");
}
}
AllMoney allMoney = payWorkingGroupService.queryPageListForCompanyDetail33(companyComeMoneyDetailSearch, null);
hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney());
@@ -185,6 +188,9 @@ public class CompanyComeMoneyStatisticsController {
if (ss.getComeAllMoney() == null || ss.getComeAllMoney().equals("")) {
ss.setComeAllMoney("0.00");
}
if (s.getBillMoney() == null || s.getBillMoney().equals("")) {
s.setBillMoney("0.00");
}
}
}
return AmountUtil.exportListXls(pageList, CompanyComeMoneyDetail.class, "企业来款详情统计");
@@ -86,7 +86,6 @@ public class PayWorkingGroupStatisticsController {
}
}
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("pageList", pageList.setRecords(records));
hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney());
hashMap.put("sumOfReallyMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getComeAllMoney());
@@ -103,7 +102,6 @@ public class PayWorkingGroupStatisticsController {
@GetMapping(value = "/exportXls2")
@ApiOperation(value = "工作组项目统计-统计导出excel", notes = "工作组项目统计-统计导出excel")
public ModelAndView exportXls2(PayWorkingGroupSearch payWorkingGroupSearch, @RequestParam(name = "selections", required = false) String selections) {
if (StringUtils.isBlank(selections)) {
payWorkingGroupSearch.setWorkGroup(oConvertUtils.replaceAllPercent(payWorkingGroupSearch.getWorkGroup()));
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel(payWorkingGroupSearch, null);
@@ -120,25 +118,6 @@ public class PayWorkingGroupStatisticsController {
}
}
return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class, "工作组项目统计");
} else {
ArrayList<String> strings = new ArrayList<>(Arrays.asList(selections.split(",")));
payWorkingGroupSearch.setWorkGroup(oConvertUtils.replaceAllPercent(payWorkingGroupSearch.getWorkGroup()));
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel(payWorkingGroupSearch, null, strings);
//处理为空数据为0
for (PayWorkingGroupStatistics s : pageList) {
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
s.setAllMoney("0.00");
}
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
}
if (s.getMoneyRate() == null || s.getMoneyRate().equals("")) {
s.setMoneyRate("0.00%");
}
}
return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class, "工作组项目统计");
}
}
@@ -199,7 +178,7 @@ public class PayWorkingGroupStatisticsController {
PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,
@RequestParam(name = "id", required = true) String id,
@RequestParam(name = "selections", required = false) String selections) {
if (ObjectUtils.isEmpty(selections)) {
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics(payWorkingGroupSubletSearch, id);
//处理为空数据为0
@@ -212,22 +191,6 @@ public class PayWorkingGroupStatisticsController {
}
}
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
} else {
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
ArrayList<String> selections2 = new ArrayList<>(Arrays.asList(selections.split(",")));
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics2(payWorkingGroupSubletSearch, id, selections2);
//处理为空数据为0
for (PayWorkGroupSubletStatistics s : pageList) {
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
s.setAllMoney("0.00");
}
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
}
}
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
}
}
}
@@ -22,21 +22,21 @@ public class AllProjectStatistics {
@ApiModelProperty(value = "来款单位")
private String chargeCompanyTemporaryName;
@Excel(name = "应收总金额", width = 15)
@ApiModelProperty(value = "应收总金额")
@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 confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
@Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "到账金额")
private String comeAllMoney;
@ApiModelProperty(value = "来款用途编码")
private String chargeUse;
@@ -44,9 +44,11 @@ public class AllProjectStatisticsSearch {
@ApiModelProperty(value = "部门编码")
private String departCode;
@ApiModelProperty(value = "开票年份")
private String billYear;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段")
private String column;
@@ -13,26 +13,30 @@ import org.jeecgframework.poi.excel.annotation.Excel;
public class CompanyComeMoneyDetail {
@ApiModelProperty(value = "项目id")
private String projectId;
@Excel(name = "来款项目", width = 15)
@ApiModelProperty(value = "来款项目")
private String projectName;
@Excel(name = "来款企业", width = 15)
@ApiModelProperty(value = "来款企业")
private String chargeCompanyName;
@Excel(name = "应收总金额", width = 15)
@ApiModelProperty(value = "应收金额")
@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 confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
@Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "到账金额")
private String comeAllMoney;
@ApiModelProperty(value = "来款用途编码")
private String chargeUse;
@@ -38,8 +38,11 @@ public class CompanyComeMoneyDetailSearch {
@ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo;
@ApiModelProperty(value = "开票年份")
private String billYear;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段")
private String column;
@@ -18,23 +18,23 @@ public class CompanyComeMoneyList {
@ApiModelProperty(value = "来款企业")
private String chargeCompanyName;
@Excel(name = "应收总金额", width = 15)
@ApiModelProperty(value = "应收总金额")
@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 confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
@Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "到账金额")
private String comeAllMoney;
@Excel(name = "到账", width = 15)
@ApiModelProperty(value = "到账")
@Excel(name = "确收", width = 15)
@ApiModelProperty(value = "确收")
private String finishRate;
}
@@ -29,8 +29,11 @@ public class CompanyComeMoneySearch {
@ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo;
@ApiModelProperty(value = "开票年份")
private String billYear;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段")
private String column;
@@ -24,21 +24,21 @@ public class PrincipalPeopleDetail {
@ApiModelProperty(value = "来款项目")
private String projectName;
@Excel(name = "应收总金额", width = 15)
@ApiModelProperty(value = "应收总金额")
@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 confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
@Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "到账金额")
private String comeAllMoney;
@ApiModelProperty(value = "打包")
private Integer pack;
@@ -38,8 +38,11 @@ public class PrincipalPeopleDetailSearch {
@ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo;
@ApiModelProperty(value = "开票年份")
private String billYear;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段")
private String column;
@@ -14,25 +14,25 @@ public class PrincipalPeopleList {
@ApiModelProperty(value = "项目负责人id")
private String principalId;
@Excel(name = "应收金额", width = 15)
@DecimalMax(value = "9999999999.99",message = "应收总金额(元)格式错误")
@Excel(name = "合同金额", width = 15)
@DecimalMax(value = "9999999999.99",message = "合同金额(元)格式错误")
@JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty(value = "应收总金额")
@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 confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
@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 = "个人完成率")
@@ -26,8 +26,11 @@ public class PrincipalPeopleSearch {
@ApiModelProperty(value = "部门编码")
private String departCode;
@ApiModelProperty(value = "开票年份")
private String billYear;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段")
private String column;