| @@ -148,4 +148,27 @@ public class WxBillAllController extends BaseController { | |||||
| wxBillAll.setTenantId(getTenantId()); | wxBillAll.setTenantId(getTenantId()); | ||||
| wxBillAllService.exportWaitMerchant(wxBillAll, request, response); | wxBillAllService.exportWaitMerchant(wxBillAll, request, response); | ||||
| } | } | ||||
| @GetMapping("exportOweBill") | |||||
| @SystemControllerLog(description = "生成催缴单") | |||||
| public void exportOweBill(@ModelAttribute WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBillAllController::exportOweBill"); | |||||
| if (null == wxBillAll) { | |||||
| wxBillAll = new WxBillAll(); | |||||
| } | |||||
| //默认查当月第一天到今天 | |||||
| if (StringUtils.isNotBlank(wxBillAll.getEndtime())) { | |||||
| wxBillAll.setEndtime(wxBillAll.getEndtime() + " 23:59:59"); | |||||
| } | |||||
| if (StringUtils.isBlank(wxBillAll.getEndtime()) && StringUtils.isBlank(wxBillAll.getStarttime())) { | |||||
| SimpleDateFormat sb = new SimpleDateFormat("yyyy-MM-dd"); | |||||
| wxBillAll.setStarttime(sb.format(DateUtils.getFirstDayForCurrMonth(new Date()))); | |||||
| wxBillAll.setEndtime(sb.format(new Date()) + " 23:59:59"); | |||||
| } | |||||
| wxBillAll.setTenantId(getTenantId()); | |||||
| wxBillAllService.exportOweBill(wxBillAll, request, response); | |||||
| } | |||||
| } | } | ||||
| @@ -49,4 +49,6 @@ public interface WxBillAllService { | |||||
| void updateBillStatus(WxBillAll record); | void updateBillStatus(WxBillAll record); | ||||
| void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response); | |||||
| } | } | ||||
| @@ -95,6 +95,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| @Autowired | @Autowired | ||||
| WxMerchantBUserMapper wxMerchantBUserMapper; | WxMerchantBUserMapper wxMerchantBUserMapper; | ||||
| @Autowired | |||||
| WxMallMapper wxMallMapper; | |||||
| @Override | @Override | ||||
| public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) { | public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) { | ||||
| //更新各账单状态 | //更新各账单状态 | ||||
| @@ -580,6 +583,15 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| logger.info("更新各账单状态结束"); | logger.info("更新各账单状态结束"); | ||||
| } | } | ||||
| @Override | |||||
| public void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | |||||
| //商场名称 | |||||
| WxMall wxMall = wxMallMapper.getByTenantId(wxBillAll.getTenantId()); | |||||
| //账单总数 | |||||
| List<Map<String, Object>> data = wxBillAllMapper.getOweBillAsPage(wxBillAll); | |||||
| } | |||||
| @Override | @Override | ||||
| public Object getBillInfo(WxBillAll record) { | public Object getBillInfo(WxBillAll record) { | ||||
| @@ -100,7 +100,9 @@ | |||||
| <if test=" null != billTypeValue ">and bill.bill_type_value = #{billTypeValue}</if> | <if test=" null != billTypeValue ">and bill.bill_type_value = #{billTypeValue}</if> | ||||
| <if test=" null != status ">and bill.`status` = #{status}</if> | <if test=" null != status ">and bill.`status` = #{status}</if> | ||||
| <if test=" null != rentShopType ">and bill.rent_shop_type = #{rentShopType}</if> | <if test=" null != rentShopType ">and bill.rent_shop_type = #{rentShopType}</if> | ||||
| <if test=" null != starttime and null!= endtime "> | |||||
| and bill.receive_date between #{starttime} and #{endtime} | |||||
| </if> | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by bill.id desc,bill.merchant_id,bill.status,bill.receive_date desc </if> | <if test=" null == sortColumns"> order by bill.id desc,bill.merchant_id,bill.status,bill.receive_date desc </if> | ||||