|
|
|
@@ -200,11 +200,11 @@ public class WxMallAdminController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
private List<WxBillHotNotify> getHots(Integer nearBillBeforeDays) { |
|
|
|
WxMerchant wxMerchant = new WxMerchant(); |
|
|
|
setQueryDataRule(wxMerchant); |
|
|
|
wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays()); |
|
|
|
wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); |
|
|
|
return billAllHelper.getHotNotify(wxMerchant); |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
setQueryDataRule(wxShop); |
|
|
|
wxShop.setOweBillBeforeDays(getOweBillBeforeDays()); |
|
|
|
wxShop.setNearBillBeforeDays(nearBillBeforeDays); |
|
|
|
return billAllHelper.getHotNotify(wxShop); |
|
|
|
} |
|
|
|
|
|
|
|
//逾期账单 |
|
|
|
@@ -221,48 +221,36 @@ public class WxMallAdminController extends BaseController { |
|
|
|
|
|
|
|
@ApiOperation("分类查询账单") |
|
|
|
@GetMapping("listBill") |
|
|
|
public ResultData listBill(@ModelAttribute WxMerchant wxMerchant,Integer billTypeValue, Integer pageNum, Integer pageSize) { |
|
|
|
setQueryDataRule(wxMerchant); |
|
|
|
if (null != wxMerchant.getOnlyOweOrNear()) { |
|
|
|
if (EnumBillOweOrNearType.OWE.getCode().intValue() == wxMerchant.getOnlyOweOrNear().intValue()) { |
|
|
|
wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays()); |
|
|
|
}else if (EnumBillOweOrNearType.NEAR.getCode().intValue() == wxMerchant.getOnlyOweOrNear().intValue()) { |
|
|
|
wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays()); |
|
|
|
wxMerchant.setNearBillBeforeDays(getNearBillBeforeDays()); |
|
|
|
public ResultData listBill(@ModelAttribute WxShop wxShop,Integer billTypeValue, Integer pageNum, Integer pageSize) { |
|
|
|
setQueryDataRule(wxShop); |
|
|
|
if (null != wxShop.getOnlyOweOrNear()) { |
|
|
|
if (EnumBillOweOrNearType.OWE.getCode().intValue() == wxShop.getOnlyOweOrNear().intValue()) { |
|
|
|
wxShop.setOweBillBeforeDays(getOweBillBeforeDays()); |
|
|
|
}else if (EnumBillOweOrNearType.NEAR.getCode().intValue() == wxShop.getOnlyOweOrNear().intValue()) { |
|
|
|
wxShop.setOweBillBeforeDays(getOweBillBeforeDays()); |
|
|
|
wxShop.setNearBillBeforeDays(getNearBillBeforeDays()); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(billAllHelper.getBillList( wxMerchant,pageNum,pageSize)); |
|
|
|
return new ResultData(billAllHelper.getBillList( wxShop,pageNum,pageSize)); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("账单详情") |
|
|
|
@GetMapping("detail") |
|
|
|
public ResultData detail(@ModelAttribute WxMerchant wxMerchant,Integer billTypeValue,Long billId) { |
|
|
|
if (null == wxMerchant) { |
|
|
|
wxMerchant = new WxMerchant(); |
|
|
|
} |
|
|
|
setQueryDataRule(wxMerchant); |
|
|
|
if (null == billTypeValue || null == billId) { |
|
|
|
return new ResultData(Result.ERROR,"参数错误"); |
|
|
|
public ResultData detail(@ModelAttribute WxShop wxShop,Integer billTypeValue,Long billId) { |
|
|
|
if (null == wxShop) { |
|
|
|
wxShop = new WxShop(); |
|
|
|
} |
|
|
|
EnumBillAllType btype; |
|
|
|
if (billTypeValue.intValue() == Constant.bill_all_type_manage_fee) { |
|
|
|
btype = EnumBillAllType.RENT_BUSSINESS_MANAGE; |
|
|
|
}else { |
|
|
|
btype = EnumBillAllType.getEnum(billTypeValue); |
|
|
|
if (null == btype) { |
|
|
|
return new ResultData(Result.ERROR,"分类非法"); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(billAllHelper.getBillDetail(btype, wxMerchant,billId)); |
|
|
|
setQueryDataRule(wxShop); |
|
|
|
return new ResultData(billAllHelper.getBillDetail(wxShop,billId)); |
|
|
|
} |
|
|
|
|
|
|
|
//账单汇总 |
|
|
|
@GetMapping("billSum") |
|
|
|
public ResultData billSum(@ModelAttribute WxMerchant wxMerchant) { |
|
|
|
setQueryDataRule(wxMerchant); |
|
|
|
Date starttime = wxMerchant.getStarttime(); |
|
|
|
Date enttime = wxMerchant.getEndtime(); |
|
|
|
WxBillSum rentSum = billAllHelper.getBillSum(wxMerchant,starttime, enttime); |
|
|
|
public ResultData billSum(@ModelAttribute WxShop wxShop) { |
|
|
|
setQueryDataRule(wxShop); |
|
|
|
Date starttime = wxShop.getStarttime(); |
|
|
|
Date enttime = wxShop.getEndtime(); |
|
|
|
WxBillSum rentSum = billAllHelper.getBillSum(wxShop,starttime, enttime); |
|
|
|
Map retMap = new HashMap(); |
|
|
|
retMap.put("needPay", rentSum.getNeedPay()); |
|
|
|
retMap.put("paid", rentSum.getPaid()); |
|
|
|
|