@@ -1 +1 @@ | |||
17640 | |||
4352 |
@@ -1,5 +1,5 @@ | |||
distributionBase=GRADLE_USER_HOME | |||
distributionPath=wrapper/dists | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | |||
zipStoreBase=GRADLE_USER_HOME | |||
zipStorePath=wrapper/dists |
@@ -9,10 +9,6 @@ import org.springframework.data.jpa.repository.JpaRepository; | |||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | |||
import org.springframework.data.jpa.repository.Query; | |||
import java.time.LocalDate; | |||
import java.util.Date; | |||
import java.util.List; | |||
public interface AflServerFeeRefundRepo extends AbstractJpaRepo<AflServerFeeRefund, String>, | |||
JpaRepository<AflServerFeeRefund, String> , | |||
JpaSpecificationExecutor<AflServerFeeRefund>{ |
@@ -1,10 +1,11 @@ | |||
package com.qtzl.alterSales.dao.repo.jpa.third; | |||
import com.qtzl.alterSales.dao.entity.third.EtcApplyOrder; | |||
import com.qtzl.alterSales.dao.excelVO.head.serviceFee50.ExcelHead50ServiceFeeVO; | |||
import org.springframework.data.jpa.repository.JpaRepository; | |||
import org.springframework.data.jpa.repository.Query; | |||
import org.springframework.data.repository.query.Param; | |||
import java.time.LocalDateTime; | |||
import java.util.Date; | |||
import java.util.List; | |||
@@ -36,7 +36,6 @@ public class AflReportExport50ServiceFeeHandler extends AbstractAfterSalesManage | |||
@Override | |||
public String handleInternal(String filename, Report50ServiceFeeQueryRequest request) throws ServiceHandleException, IOException { | |||
logger.info("报表-50元服务费"); | |||
// 处理参数 | |||
if(StringUtils.isEmpty(request.getSubMchId())) { | |||
request.setSubMchId(this.subMchId); |
@@ -43,7 +43,6 @@ public class Report50ServiceFeeQueryHandler extends AbstractAfterSalesManager<Re | |||
public Report50ServiceFeeQueryHandler(AflReportFromServiceFeeDataRepo aflReportFromServiceFeeDataRepo) { | |||
super(AfterSalesCmd.REPORTEXPORT50SERVICEFEEQUERY, Report50ServiceFeeQueryPageRequest.class); | |||
this.aflReportFromServiceFeeDataRepo = aflReportFromServiceFeeDataRepo; | |||
} | |||
@Override | |||
@@ -51,11 +50,6 @@ public class Report50ServiceFeeQueryHandler extends AbstractAfterSalesManager<Re | |||
try { | |||
String jsonStr = JSONUtil.toJsonStr(request); | |||
logger.info("报表-50元服务费报表导出查询,请求参数:{}", jsonStr); | |||
Integer year = request.getYear(); | |||
Integer month = request.getMonth(); | |||
if (year == null && month == null) { | |||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("参数年月不可为空"); | |||
} | |||
Pageable pageable = PageRequest.of(request.getPageNo() - 1, request.getPageSize()); | |||
Specification<AflReportServiceFeeData> specification = getSpecification(request); | |||
@@ -77,7 +71,7 @@ public class Report50ServiceFeeQueryHandler extends AbstractAfterSalesManager<Re | |||
return JsonUtils.toJsonStr(response); | |||
} catch (Exception e) { | |||
logger.error("选装-根据日期查询发行数据(人车卡签信息):{}", e.getMessage()); | |||
logger.error("选装-50元服务费报表导出查询:{}", e.getMessage()); | |||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("操作失败"); | |||
} | |||
} |
@@ -6,6 +6,9 @@ public class FssPaccountFinalbillFindCountRequest extends AbstractAfterSalesPage | |||
private String naturalDate; | |||
private Integer startDate; | |||
private Integer endDate; | |||
public String getNaturalDate() { | |||
return naturalDate; | |||
} | |||
@@ -13,4 +16,20 @@ public class FssPaccountFinalbillFindCountRequest extends AbstractAfterSalesPage | |||
public void setNaturalDate(String naturalDate) { | |||
this.naturalDate = naturalDate; | |||
} | |||
public Integer getStartDate() { | |||
return startDate; | |||
} | |||
public void setStartDate(Integer startDate) { | |||
this.startDate = startDate; | |||
} | |||
public Integer getEndDate() { | |||
return endDate; | |||
} | |||
public void setEndDate(Integer endDate) { | |||
this.endDate = endDate; | |||
} | |||
} |
@@ -10,16 +10,20 @@ import com.qtzl.alterSales.manager.vo.AflPaccountReceivableBillVo; | |||
*/ | |||
public class FssPaccountFinalbillFindPageRequest extends JpaPageableDataRequest<AflPaccountReceivableBillVo> { | |||
/** 自然日 */ | |||
private Integer accountDate ; | |||
/** | |||
* 自然日 | |||
*/ | |||
private Integer accountDate; | |||
private Integer startDate; | |||
private Integer endDate; | |||
@Override | |||
public HqlBuilder toSelectHql() { | |||
// HqlBuilder builder = new HqlBuilder(" SELECT new com.qtzl.alterSales.manager.vo.FssPaccountFinalbillVo(naturalDate, SUM(payCount), SUM(payAmount) , SUM(refundCount), SUM(refundAmount) ) from FssPaccountFinalbill GROUP BY naturalDate "); | |||
HqlBuilder builder = new HqlBuilder(" SELECT new com.qtzl.alterSales.manager.vo.AflPaccountReceivableBillVo(accountDate, SUM(payCount), SUM(payAmount) , SUM(refundCount), SUM(refundAmount) ) from AflPaccountReceivableBill GROUP BY accountDate "); | |||
HqlBuilder builder = new HqlBuilder(" SELECT new com.qtzl.alterSales.manager.vo.AflPaccountReceivableBillVo(accountDate, SUM(payCount), SUM(payAmount) , SUM(refundCount), SUM(refundAmount) ) from AflPaccountReceivableBill GROUP BY accountDate "); | |||
appendParam(builder); | |||
builder.append( " ORDER BY accountDate DESC "); | |||
builder.append(" ORDER BY accountDate DESC "); | |||
return builder; | |||
} | |||
@@ -32,8 +36,21 @@ public class FssPaccountFinalbillFindPageRequest extends JpaPageableDataRequest< | |||
private void appendParam(HqlBuilder builder) { | |||
if (accountDate!=null){ | |||
builder.append(" having accountDate = :accountDate", accountDate); | |||
if (null == accountDate && null == startDate && null == endDate) { | |||
return; | |||
} | |||
builder.append(" having "); | |||
boolean flag = false; | |||
if (null != accountDate) { | |||
builder.append(" accountDate = :accountDate", accountDate); | |||
flag = true; | |||
} | |||
if (null != startDate) { | |||
builder.append(flag ? " and accountDate >= :startDate" : " accountDate >= :startDate ", startDate); | |||
flag = true; | |||
} | |||
if (null != endDate) { | |||
builder.append(flag ? " and accountDate <= :endDate" : " accountDate <= :endDate ", endDate); | |||
} | |||
} | |||
@@ -44,4 +61,20 @@ public class FssPaccountFinalbillFindPageRequest extends JpaPageableDataRequest< | |||
public void setAccountDate(Integer accountDate) { | |||
this.accountDate = accountDate; | |||
} | |||
public Integer getStartDate() { | |||
return startDate; | |||
} | |||
public void setStartDate(Integer startDate) { | |||
this.startDate = startDate; | |||
} | |||
public Integer getEndDate() { | |||
return endDate; | |||
} | |||
public void setEndDate(Integer endDate) { | |||
this.endDate = endDate; | |||
} | |||
} |
@@ -93,12 +93,10 @@ public class FssPaccountFinalbillServiceImpl implements FssPaccountFinalbillServ | |||
FssPaccountFinalbillVo fssPaccountFinalbillVo = new FssPaccountFinalbillVo(); | |||
BeanUtil.copyProperties(aflPaccountReceivableBillVo,fssPaccountFinalbillVo); | |||
String payDate = getPayDate(aflPaccountReceivableBillVo.getAccountDate().toString()); | |||
log.info("时间类型转换中:"+payDate); | |||
fssPaccountFinalbillVo.setNaturalDate(payDate); | |||
return fssPaccountFinalbillVo; | |||
} | |||
private String getPayDate(String payDate){ | |||
log.info("时间类型转换中:"+payDate); | |||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); | |||
formatter.setLenient(false); | |||
Date newDate=null; | |||
@@ -110,7 +108,6 @@ public class FssPaccountFinalbillServiceImpl implements FssPaccountFinalbillServ | |||
} | |||
formatter = new SimpleDateFormat("yyyy-MM-dd"); | |||
String format = formatter.format(newDate); | |||
log.info("时间类型转换成功:"+format); | |||
return format; | |||
} | |||
@@ -9,15 +9,7 @@ import com.qtzl.alterSales.dao.repo.jpa.third.EtcOrderVehicleInfoRepo; | |||
import com.qtzl.alterSales.manager.enums.AflBydDashboardPushStateEnum; | |||
import com.qtzl.alterSales.manager.enums.BlackListReson; | |||
import com.qtzl.alterSales.manager.enums.BlacklistOpType; | |||
import com.qtzl.alterSales.manager.handler.ActivateDataModelVoFindByDayHandler; | |||
import com.qtzl.alterSales.manager.handler.AflServerFeeRefundExportHandler; | |||
import com.qtzl.alterSales.manager.handler.AflReportExport50ServiceFeeHandler; | |||
import com.qtzl.alterSales.manager.handler.AflReportExportIncomeCostHandler; | |||
import com.qtzl.alterSales.manager.handler.FssPaccountPayResultFindByPayIdHandler; | |||
import com.qtzl.alterSales.manager.model.protocol.sales.ActivateDataFindByDayRequest; | |||
import com.qtzl.alterSales.manager.model.protocol.sales.AflServerFeeRefundPageRequest; | |||
import com.qtzl.alterSales.manager.model.protocol.sales.ChoiceBillsPayRequest; | |||
import com.qtzl.alterSales.manager.model.protocol.sales.FssPaccountPayResultFindByPayIdRequest; | |||
import com.qtzl.alterSales.manager.handler.*; | |||
import com.qtzl.alterSales.manager.model.protocol.sales.*; | |||
import com.qtzl.alterSales.manager.model.protocol.sales.report.Report50ServiceFeeQueryRequest; | |||
import com.qtzl.alterSales.manager.quartz.AflCancelOrderTask; | |||
@@ -25,11 +17,7 @@ import com.qtzl.alterSales.manager.quartz.AflMchStatisticsTask; | |||
import com.qtzl.alterSales.manager.quartz.AflPapersDesensitizationTask; | |||
import com.qtzl.alterSales.manager.quartz.BydDashboardResultTask; | |||
import com.qtzl.alterSales.manager.rabbit.RabbitUnifiedProduction; | |||
import com.qtzl.alterSales.manager.service.AflBydDashboardService; | |||
import com.qtzl.alterSales.manager.service.AflBydExceptionManager; | |||
import com.qtzl.alterSales.manager.service.AflMchConfigManager; | |||
import com.qtzl.alterSales.manager.service.AflMchStatisticsLogService; | |||
import com.qtzl.alterSales.manager.service.ChoiceBillsOperationService; | |||
import com.qtzl.alterSales.manager.service.*; | |||
import com.qtzl.alterSales.manager.service.byd.BydService; | |||
import com.qtzl.alterSales.manager.service.byd.vo.BydDashBoardResponse; | |||
import com.qtzl.alterSales.manager.service.byd.vo.BydPushDataResultRequest; | |||
@@ -234,30 +222,30 @@ public class SaleTest { | |||
System.out.println("=====" + export); | |||
} | |||
@Resource | |||
private AflReportExport50ServiceFeeHandler aflReportExport50ServiceFeeHandler; | |||
@Test | |||
public void reportExcel() throws ServiceHandleException, IOException { | |||
Report50ServiceFeeQueryRequest request = new Report50ServiceFeeQueryRequest(); | |||
request.setYear(2024); | |||
request.setMonth(10); | |||
String s = aflReportExport50ServiceFeeHandler.handleInternal(null, request); | |||
System.out.println("======" + s); | |||
} | |||
@Resource | |||
private AflReportExportIncomeCostHandler aflReportExportIncomeCostHandler; | |||
@Test | |||
public void reportExcel2() throws ServiceHandleException, IOException { | |||
AflReportExportIncomeCostRequest request = new AflReportExportIncomeCostRequest(); | |||
request.setYear(2024); | |||
request.setMonth(10); | |||
String s = aflReportExportIncomeCostHandler.handleInternal(null, request); | |||
System.out.println("======" + s); | |||
} | |||
// @Resource | |||
// private AflReportExport50ServiceFeeHandler aflReportExport50ServiceFeeHandler; | |||
// @Test | |||
// public void reportExcel() throws ServiceHandleException, IOException { | |||
// Report50ServiceFeeQueryRequest request = new Report50ServiceFeeQueryRequest(); | |||
// request.setYear(2024); | |||
// request.setMonth(10); | |||
// | |||
// String s = aflReportExport50ServiceFeeHandler.handleInternal(null, request); | |||
// System.out.println("======" + s); | |||
// } | |||
// | |||
// @Resource | |||
// private AflReportExportIncomeCostHandler aflReportExportIncomeCostHandler; | |||
// | |||
// @Test | |||
// public void reportExcel2() throws ServiceHandleException, IOException { | |||
// AflReportExportIncomeCostRequest request = new AflReportExportIncomeCostRequest(); | |||
// request.setYear(2024); | |||
// request.setMonth(10); | |||
// | |||
// String s = aflReportExportIncomeCostHandler.handleInternal(null, request); | |||
// System.out.println("======" + s); | |||
// } | |||
} |