|
|
|
@ -157,37 +157,37 @@ public class HomeBoardServiceImpl implements HomeBoardService { |
|
|
|
|
String currDateStr = DateUtil.format(currDate, ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S); |
|
|
|
|
if (StringUtils.equals(ConfigureConstant.STRING_0, queryType)) { |
|
|
|
|
//本月开票数据
|
|
|
|
|
DateTime beginOfMonth = DateUtil.beginOfMonth(currDate); |
|
|
|
|
String beginOfMonthStr = DateUtil.formatDateTime(beginOfMonth); |
|
|
|
|
startTime = com.aisino.common.util.DateUtil.parse(beginOfMonthStr, |
|
|
|
|
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S); |
|
|
|
|
endTime = com.aisino.common.util.DateUtil.parse(currDateStr, |
|
|
|
|
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S); |
|
|
|
|
// DateTime beginOfMonth = DateUtil.beginOfMonth(currDate);
|
|
|
|
|
// String beginOfMonthStr = DateUtil.formatDateTime(beginOfMonth);
|
|
|
|
|
// startTime = com.aisino.common.util.DateUtil.parse(beginOfMonthStr,
|
|
|
|
|
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
|
|
|
|
|
// endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
|
|
|
|
|
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
|
|
|
|
|
} else if (StringUtils.equals(ConfigureConstant.STRING_1, queryType)) { |
|
|
|
|
//本季度开票数据
|
|
|
|
|
DateTime beginOfQuarter = DateUtil.beginOfQuarter(currDate); |
|
|
|
|
String beginOfQuarterStr = DateUtil.formatDateTime(beginOfQuarter); |
|
|
|
|
startTime = com.aisino.common.util.DateUtil.parse(beginOfQuarterStr, |
|
|
|
|
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S); |
|
|
|
|
endTime = com.aisino.common.util.DateUtil.parse(currDateStr, |
|
|
|
|
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S); |
|
|
|
|
// startTime = com.aisino.common.util.DateUtil.parse(beginOfQuarterStr,
|
|
|
|
|
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
|
|
|
|
|
// endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
|
|
|
|
|
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
|
|
|
|
|
} else if (StringUtils.equals(ConfigureConstant.STRING_2, queryType)) { |
|
|
|
|
//累计开票数据
|
|
|
|
|
endTime = com.aisino.common.util.DateUtil.parse(currDateStr, |
|
|
|
|
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S); |
|
|
|
|
// endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
|
|
|
|
|
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
|
|
|
|
|
} else { |
|
|
|
|
throw new OrderReceiveException(ConfigureConstant.STRING_9999, "查询类型不合法,只能是0:本月,1:本季度,2:累计"); |
|
|
|
|
} |
|
|
|
|
List<String> shList = Lists.newArrayList(kpsjBO.getNsrsbh()); |
|
|
|
|
List<String> entList = Lists.newArrayList(kpsjBO.getEntId()); |
|
|
|
|
KpsjVO kpsjVO = new KpsjVO(); |
|
|
|
|
InvoiceCount invoiceCount = invoiceCountService.countInvoiceInfoByTime(startTime, endTime, shList, entList); |
|
|
|
|
if (Objects.isNull(invoiceCount)) { |
|
|
|
|
throw new OrderReceiveException(ConfigureConstant.STRING_9999, "未查询到相关开票数据!"); |
|
|
|
|
} |
|
|
|
|
kpsjVO.setKpl(Integer.parseInt(invoiceCount.getCount())); |
|
|
|
|
kpsjVO.setHjje(invoiceCount.getHjje()); |
|
|
|
|
kpsjVO.setHjse(invoiceCount.getHjse()); |
|
|
|
|
// InvoiceCount invoiceCount = invoiceCountService.countInvoiceInfoByTime(startTime, endTime, shList, entList);
|
|
|
|
|
// if (Objects.isNull(invoiceCount)) {
|
|
|
|
|
// throw new OrderReceiveException(ConfigureConstant.STRING_9999, "未查询到相关开票数据!");
|
|
|
|
|
// }
|
|
|
|
|
// kpsjVO.setKpl(Integer.parseInt(invoiceCount.getCount()));
|
|
|
|
|
// kpsjVO.setHjje(invoiceCount.getHjje());
|
|
|
|
|
// kpsjVO.setHjse(invoiceCount.getHjse());
|
|
|
|
|
return kpsjVO; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|