|
|
|
@@ -261,31 +261,50 @@ public class WxBillAllController extends BaseController { |
|
|
|
return new ResultData(tmap); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 欠缴账单统计-红灯区 |
|
|
|
* 欠缴账单列表 |
|
|
|
* @param wxBillAll |
|
|
|
* @param pageNum |
|
|
|
* @param pageSize |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("oweBillHot") |
|
|
|
public ResultData oweBillHot() { |
|
|
|
return new ResultData(getHots(null)); |
|
|
|
@GetMapping("oweBillList") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData oweBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) { |
|
|
|
if (null == billType) { |
|
|
|
return new ResultData(Result.ERROR,"请选择分类"); |
|
|
|
} |
|
|
|
EnumBillAllType btype = EnumBillAllType.getEnum(billType); |
|
|
|
if (null == btype) { |
|
|
|
return new ResultData(Result.ERROR,"分类非法"); |
|
|
|
} |
|
|
|
return new ResultData(getBillList(wxMerchant, btype, null, pageNum, pageSize)); |
|
|
|
} |
|
|
|
|
|
|
|
//临期 |
|
|
|
@GetMapping("nearBillHot") |
|
|
|
public ResultData nearBillHot() { |
|
|
|
@GetMapping("nearBillList") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData nearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) { |
|
|
|
if (null == billType) { |
|
|
|
return new ResultData(Result.ERROR,"请选择分类"); |
|
|
|
} |
|
|
|
EnumBillAllType btype = EnumBillAllType.getEnum(billType); |
|
|
|
if (null == btype) { |
|
|
|
return new ResultData(Result.ERROR,"分类非法"); |
|
|
|
} |
|
|
|
SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); |
|
|
|
Integer nearBillBeforeDays = Constant.bill_near_default_days ; |
|
|
|
if (null != lqconfig) { |
|
|
|
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); |
|
|
|
} |
|
|
|
return new ResultData(getHots(nearBillBeforeDays)); |
|
|
|
return new ResultData(getBillList(wxMerchant, btype, nearBillBeforeDays, pageNum, pageSize)); |
|
|
|
} |
|
|
|
|
|
|
|
private List<WxBillHotNotify> getHots(Integer nearBillBeforeDays) { |
|
|
|
WxMerchant wxMerchant = new WxMerchant(); |
|
|
|
private PageInfo getBillList(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays, Integer pageNum, Integer pageSize) { |
|
|
|
wxMerchant.updateTenantInfo(getTenantInfo()); |
|
|
|
WxUserDataRule dataRule = this.getCurrentDataFloors(); |
|
|
|
if (null != dataRule) { |
|
|
|
@@ -299,47 +318,80 @@ public class WxBillAllController extends BaseController { |
|
|
|
} |
|
|
|
wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); |
|
|
|
wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); |
|
|
|
return billAllHelper.getHotNotify(wxMerchant); |
|
|
|
|
|
|
|
return billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 欠缴账单统计 |
|
|
|
* 欠缴账单列表 |
|
|
|
* @param wxBillAll |
|
|
|
* @param pageNum |
|
|
|
* @param pageSize |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("oweBillSum") |
|
|
|
public ResultData oweBillSum(@ModelAttribute WxMerchant wxMerchant,Integer billType) { |
|
|
|
@GetMapping("exportOweBillList") |
|
|
|
public void oweBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
if (null == billType) { |
|
|
|
return new ResultData(Result.ERROR,"请选择分类"); |
|
|
|
return ; |
|
|
|
} |
|
|
|
EnumBillAllType btype = EnumBillAllType.getEnum(billType); |
|
|
|
if (null == btype) { |
|
|
|
return new ResultData(Result.ERROR,"分类非法"); |
|
|
|
return ; |
|
|
|
} |
|
|
|
return new ResultData(getBillSum(wxMerchant, btype, null)); |
|
|
|
PageInfo page = getBillList(wxMerchant, btype, null, 1, 10000); |
|
|
|
if (null == page) { |
|
|
|
return; |
|
|
|
} |
|
|
|
excelService.exportExcel(page.getList(), null, "逾期账单列表", WxBillBaseEntity.class, "商户欠缴账单_"+btype.getMessage()+".xlsx", response, false); |
|
|
|
} |
|
|
|
|
|
|
|
//临期账单金额 |
|
|
|
@GetMapping("nearBillSum") |
|
|
|
public ResultData nearBillSum(@ModelAttribute WxMerchant wxMerchant,Integer billType) { |
|
|
|
//临期 |
|
|
|
@GetMapping("exportNearBillList") |
|
|
|
public void exportNearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
if (null == billType) { |
|
|
|
return new ResultData(Result.ERROR,"请选择分类"); |
|
|
|
return ; |
|
|
|
} |
|
|
|
EnumBillAllType btype = EnumBillAllType.getEnum(billType); |
|
|
|
if (null == btype) { |
|
|
|
return new ResultData(Result.ERROR,"分类非法"); |
|
|
|
return ; |
|
|
|
} |
|
|
|
SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); |
|
|
|
Integer nearBillBeforeDays = Constant.bill_near_default_days ; |
|
|
|
if (null != lqconfig) { |
|
|
|
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); |
|
|
|
} |
|
|
|
return new ResultData(getBillSum(wxMerchant, btype, nearBillBeforeDays)); |
|
|
|
PageInfo page = getBillList(wxMerchant, btype, nearBillBeforeDays, 1, 10000); |
|
|
|
if (null == page) { |
|
|
|
return; |
|
|
|
} |
|
|
|
excelService.exportExcel(page.getList(), null, "临期账单列表", WxBillBaseEntity.class, "商户临期账单_"+btype.getMessage()+".xlsx", response, false); |
|
|
|
} |
|
|
|
|
|
|
|
private WxBillSum getBillSum(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays) { |
|
|
|
/** |
|
|
|
* 欠缴账单统计-红灯区 |
|
|
|
* @param wxBillAll |
|
|
|
* @param pageNum |
|
|
|
* @param pageSize |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("oweBillHot") |
|
|
|
public ResultData oweBillHot() { |
|
|
|
return new ResultData(getHots(null)); |
|
|
|
} |
|
|
|
|
|
|
|
//临期 |
|
|
|
@GetMapping("nearBillHot") |
|
|
|
public ResultData nearBillHot() { |
|
|
|
SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); |
|
|
|
Integer nearBillBeforeDays = Constant.bill_near_default_days ; |
|
|
|
if (null != lqconfig) { |
|
|
|
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); |
|
|
|
} |
|
|
|
return new ResultData(getHots(nearBillBeforeDays)); |
|
|
|
} |
|
|
|
|
|
|
|
private List<WxBillHotNotify> getHots(Integer nearBillBeforeDays) { |
|
|
|
WxMerchant wxMerchant = new WxMerchant(); |
|
|
|
wxMerchant.updateTenantInfo(getTenantInfo()); |
|
|
|
WxUserDataRule dataRule = this.getCurrentDataFloors(); |
|
|
|
if (null != dataRule) { |
|
|
|
@@ -353,23 +405,18 @@ public class WxBillAllController extends BaseController { |
|
|
|
} |
|
|
|
wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); |
|
|
|
wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); |
|
|
|
Date starttime = wxMerchant.getStarttime(); |
|
|
|
Date enttime = wxMerchant.getEndtime(); |
|
|
|
return billAllHelper.getBillSum(btype, wxMerchant,starttime,enttime); |
|
|
|
return billAllHelper.getHotNotify(wxMerchant); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 欠缴账单列表 |
|
|
|
* 欠缴账单统计 |
|
|
|
* @param wxBillAll |
|
|
|
* @param pageNum |
|
|
|
* @param pageSize |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("oweBillList") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData oweBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) { |
|
|
|
@GetMapping("oweBillSum") |
|
|
|
public ResultData oweBillSum(@ModelAttribute WxMerchant wxMerchant,Integer billType) { |
|
|
|
if (null == billType) { |
|
|
|
return new ResultData(Result.ERROR,"请选择分类"); |
|
|
|
} |
|
|
|
@@ -377,14 +424,12 @@ public class WxBillAllController extends BaseController { |
|
|
|
if (null == btype) { |
|
|
|
return new ResultData(Result.ERROR,"分类非法"); |
|
|
|
} |
|
|
|
return new ResultData(getBillList(wxMerchant, btype, null, pageNum, pageSize)); |
|
|
|
return new ResultData(getBillSum(wxMerchant, btype, null)); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("nearBillList") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData nearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) { |
|
|
|
//临期账单金额 |
|
|
|
@GetMapping("nearBillSum") |
|
|
|
public ResultData nearBillSum(@ModelAttribute WxMerchant wxMerchant,Integer billType) { |
|
|
|
if (null == billType) { |
|
|
|
return new ResultData(Result.ERROR,"请选择分类"); |
|
|
|
} |
|
|
|
@@ -397,10 +442,10 @@ public class WxBillAllController extends BaseController { |
|
|
|
if (null != lqconfig) { |
|
|
|
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); |
|
|
|
} |
|
|
|
return new ResultData(getBillList(wxMerchant, btype, nearBillBeforeDays, pageNum, pageSize)); |
|
|
|
return new ResultData(getBillSum(wxMerchant, btype, nearBillBeforeDays)); |
|
|
|
} |
|
|
|
|
|
|
|
private PageInfo getBillList(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays, Integer pageNum, Integer pageSize) { |
|
|
|
private WxBillSum getBillSum(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays) { |
|
|
|
wxMerchant.updateTenantInfo(getTenantInfo()); |
|
|
|
WxUserDataRule dataRule = this.getCurrentDataFloors(); |
|
|
|
if (null != dataRule) { |
|
|
|
@@ -414,53 +459,9 @@ public class WxBillAllController extends BaseController { |
|
|
|
} |
|
|
|
wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); |
|
|
|
wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); |
|
|
|
|
|
|
|
return billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 欠缴账单列表 |
|
|
|
* @param wxBillAll |
|
|
|
* @param pageNum |
|
|
|
* @param pageSize |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("exportOweBillList") |
|
|
|
public void oweBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
if (null == billType) { |
|
|
|
return ; |
|
|
|
} |
|
|
|
EnumBillAllType btype = EnumBillAllType.getEnum(billType); |
|
|
|
if (null == btype) { |
|
|
|
return ; |
|
|
|
} |
|
|
|
PageInfo page = getBillList(wxMerchant, btype, null, 1, 10000); |
|
|
|
if (null == page) { |
|
|
|
return; |
|
|
|
} |
|
|
|
excelService.exportExcel(page.getList(), null, "逾期账单列表", WxBillBaseEntity.class, "商户欠缴账单_"+btype.getMessage()+".xlsx", response, false); |
|
|
|
} |
|
|
|
|
|
|
|
//临期 |
|
|
|
@GetMapping("exportNearBillList") |
|
|
|
public void exportNearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
if (null == billType) { |
|
|
|
return ; |
|
|
|
} |
|
|
|
EnumBillAllType btype = EnumBillAllType.getEnum(billType); |
|
|
|
if (null == btype) { |
|
|
|
return ; |
|
|
|
} |
|
|
|
SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); |
|
|
|
Integer nearBillBeforeDays = Constant.bill_near_default_days ; |
|
|
|
if (null != lqconfig) { |
|
|
|
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); |
|
|
|
} |
|
|
|
PageInfo page = getBillList(wxMerchant, btype, nearBillBeforeDays, 1, 10000); |
|
|
|
if (null == page) { |
|
|
|
return; |
|
|
|
} |
|
|
|
excelService.exportExcel(page.getList(), null, "临期账单列表", WxBillBaseEntity.class, "商户临期账单_"+btype.getMessage()+".xlsx", response, false); |
|
|
|
Date starttime = wxMerchant.getStarttime(); |
|
|
|
Date enttime = wxMerchant.getEndtime(); |
|
|
|
return billAllHelper.getBillSum(btype, wxMerchant,starttime,enttime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|