| @@ -64,7 +64,7 @@ public class WxBillDailyController extends BaseController { | |||
| wxBillDaily = new WxBillDaily(); | |||
| } | |||
| wxBillDaily.setTenantId(getTenantId()); | |||
| final PageInfo<Map<String, Object>> page = wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize); | |||
| final PageInfo<WxBillDaily> page = wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -240,4 +240,11 @@ public class WxBillDailyController extends BaseController { | |||
| return new ResultData(Result.SUCCESS, "查询成功", entries); | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "日常费用账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillDaily wxBillDaily, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillDaily.setTenantId(getTenantId()); | |||
| wxBillDailyService.exportBill(request, response, wxBillDaily); | |||
| } | |||
| } | |||
| @@ -7,6 +7,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillOther; | |||
| import com.iformall.domain.po.WxBillOtherDeposit; | |||
| import com.iformall.service.WxBillOtherService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -15,7 +16,8 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.Map; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -39,7 +41,7 @@ public class WxBillOtherController extends BaseController { | |||
| wxBillOther = new WxBillOther(); | |||
| } | |||
| wxBillOther.setTenantId(getTenantId()); | |||
| final PageInfo<Map<String, Object>> page = wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize); | |||
| final PageInfo<WxBillOther> page = wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -92,5 +94,11 @@ public class WxBillOtherController extends BaseController { | |||
| return wxBillOtherService.updatePaid(id); | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "其它账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillOther wxBillOther, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillOther.setTenantId(getTenantId()); | |||
| wxBillOtherService.exportBill(request, response, wxBillOther); | |||
| } | |||
| } | |||
| @@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.Map; | |||
| /** | |||
| @@ -39,7 +41,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| wxBillOtherDeposit = new WxBillOtherDeposit(); | |||
| } | |||
| wxBillOtherDeposit.setTenantId(getTenantId()); | |||
| final PageInfo<Map<String, Object>> page = wxBillOtherDepositService.listAsPage(wxBillOtherDeposit, pageNum, pageSize); | |||
| final PageInfo<WxBillOtherDeposit> page = wxBillOtherDepositService.listAsPage(wxBillOtherDeposit, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -100,7 +102,13 @@ public class WxBillOtherDepositController extends BaseController { | |||
| public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::adjustDeposit"); | |||
| return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "其它押金账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillOtherDeposit wxBillDeposit, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillDeposit.setTenantId(getTenantId()); | |||
| wxBillOtherDepositService.exportBill(request, response, wxBillDeposit); | |||
| } | |||
| } | |||
| @@ -14,7 +14,8 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.Map; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -39,7 +40,7 @@ public class WxBillPropertyController extends BaseController { | |||
| } | |||
| wxBillProperty.setTenantId(getTenantId()); | |||
| wxBillProperty.setSortColumns(WxBillProperty.Field.Id_DESC); | |||
| PageInfo<Map<String, Object>> result = wxBillPropertyService.listAsPage(wxBillProperty, pageNum, pageSize); | |||
| PageInfo<WxBillProperty> result = wxBillPropertyService.listAsPage(wxBillProperty, pageNum, pageSize); | |||
| return new ResultData(result); | |||
| } | |||
| @@ -101,7 +102,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @SystemControllerLog(description = "物业账单-根据商户获取") | |||
| public ResultData findByPropertyContractId(Long propertyContractId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::findByPropertyContractId"); | |||
| final PageInfo<Map<String, Object>> page = wxBillPropertyService.findByPropertyContractId(propertyContractId, getTenantId(), pageNum, pageSize); | |||
| final PageInfo<WxBillProperty> page = wxBillPropertyService.findByPropertyContractId(propertyContractId, getTenantId(), pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -113,4 +114,10 @@ public class WxBillPropertyController extends BaseController { | |||
| return wxBillPropertyService.updateLatePayStatus(wxBillProperty); | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "物业账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillProperty wxBillProperty, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillProperty.setTenantId(getTenantId()); | |||
| wxBillPropertyService.exportBill(request, response, wxBillProperty); | |||
| } | |||
| } | |||
| @@ -14,7 +14,8 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.Map; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -39,7 +40,7 @@ public class WxBillRentController extends BaseController { | |||
| } | |||
| wxBillRent.setTenantId(getTenantId()); | |||
| wxBillRent.setSortColumns(WxBillRent.Field.Id_DESC); | |||
| final PageInfo<Map<String, Object>> page = wxBillRentService.listAsPage(wxBillRent, pageNum, pageSize); | |||
| final PageInfo<WxBillRent> page = wxBillRentService.listAsPage(wxBillRent, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -83,7 +84,7 @@ public class WxBillRentController extends BaseController { | |||
| @SystemControllerLog(description = "租赁押金账单-根据商户获取") | |||
| public ResultData findByRentContractId(Long rentContractId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::findByRentContractId"); | |||
| final PageInfo<Map<String, Object>> page = wxBillRentService.findByRentContractId(rentContractId, getTenantId(), pageNum, pageSize); | |||
| final PageInfo<WxBillRent> page = wxBillRentService.findByRentContractId(rentContractId, getTenantId(), pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -118,4 +119,11 @@ public class WxBillRentController extends BaseController { | |||
| return wxBillRentService.updateLatePayStatus(wxBillRent); | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "租赁押金账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillRent wxBillRent, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillRent.setTenantId(getTenantId()); | |||
| wxBillRentService.exportBill(request, response, wxBillRent); | |||
| } | |||
| } | |||
| @@ -13,6 +13,7 @@ import javax.validation.constraints.NotNull; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -37,7 +38,7 @@ public class WxBillDaily extends BaseEntity{ | |||
| @Transient | |||
| private String merchantName; | |||
| @Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 10, orderNum = "2") | |||
| @Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 20, orderNum = "2") | |||
| @NotNull | |||
| @io.swagger.annotations.ApiModelProperty(value="账单类型",name="type") | |||
| private Integer type; | |||
| @@ -112,6 +113,10 @@ public class WxBillDaily extends BaseEntity{ | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| private List<Map<String, Object>> shops; | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.domain.po; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.iformall.common.SortColumn; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -8,10 +9,11 @@ import lombok.ToString; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -35,12 +37,15 @@ public class WxBillOther extends BaseEntity { | |||
| return super.getSortColumns(); | |||
| } | |||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||
| @Transient | |||
| private String merchantName; | |||
| @Excel(name = "其他费用名称", width = 20, orderNum = "3") | |||
| @io.swagger.annotations.ApiModelProperty(value="账单名称",name="name") | |||
| private String name; | |||
| @Excel(name = "备注", orderNum = "11", width = 20) | |||
| @io.swagger.annotations.ApiModelProperty(value="账单备注",name="comments") | |||
| private String comments; | |||
| @@ -49,21 +54,29 @@ public class WxBillOther extends BaseEntity { | |||
| private Long receivePay; | |||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | |||
| private Long pay; | |||
| @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", orderNum = "8", width = 20, format = "yyyy-MM-dd") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| private Date payDate; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| @Excel(name = "逾期(天)", orderNum = "10", width = 20) | |||
| @SortColumn(column = "expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| private Long expiredDay; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | |||
| private Long owe; | |||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | |||
| private Integer status; | |||
| @io.swagger.annotations.ApiModelProperty(value="删除 是1否0",name="isDel") | |||
| @@ -99,10 +112,36 @@ public class WxBillOther extends BaseEntity { | |||
| @SortColumn(column = "period") | |||
| private Integer period; | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20) | |||
| private String receivePayStr; | |||
| @Transient | |||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||
| private String payStr; | |||
| @Transient | |||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||
| private String oweStr; | |||
| public String getReceivePayStr() { | |||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| public String getPayStr() { | |||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| public String getOweStr() { | |||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Transient | |||
| private List<Map<String, Object>> shops; | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.domain.po; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.iformall.common.SortColumn; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -8,9 +9,11 @@ import lombok.ToString; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.math.BigDecimal; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -34,12 +37,14 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| return super.getSortColumns(); | |||
| } | |||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||
| @Transient | |||
| private String merchantName; | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单名称", name = "name") | |||
| private String name; | |||
| @Excel(name = "押金描述", width = 20, orderNum = "3") | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单备注", name = "comments") | |||
| private String comments; | |||
| @@ -54,6 +59,7 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "截止收款日期", name = "receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", orderNum = "6", width = 20, format = "yyyy-MM-dd") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value = "到账日期", name = "payDate") | |||
| private Date payDate; | |||
| @@ -70,6 +76,7 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "欠缴", name = "owe") | |||
| private Long owe; | |||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | |||
| private Integer status; | |||
| @io.swagger.annotations.ApiModelProperty(value = "删除 是1否0", name = "isDel") | |||
| @@ -108,10 +115,40 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @SortColumn(column = "period") | |||
| private Integer period; | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20) | |||
| private String receivePayStr; | |||
| @Transient | |||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||
| private String payStr; | |||
| public String getReceivePayStr() { | |||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| public String getPayStr() { | |||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| public Date getReturnDate() { | |||
| if (status == null) { | |||
| return null; | |||
| } | |||
| return status == 5 ? updatetime : null; | |||
| } | |||
| @Excel(name = "退款日", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||
| private Date returnDate; | |||
| @Transient | |||
| private List<Map<String, Object>> shops; | |||
| public static enum Field { | |||
| Id_ASC("`id` ASC"), Id_DESC("`id` DESC") | |||
| , ReceivePay_ASC("`receivePay` ASC"), ReceivePay_DESC("`receivePay` DESC") | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.domain.po; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.iformall.common.SortColumn; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -8,6 +9,7 @@ import lombok.ToString; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.math.BigDecimal; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| @@ -34,6 +36,7 @@ public class WxBillProperty extends BaseEntity { | |||
| return super.getSortColumns(); | |||
| } | |||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||
| @Transient | |||
| private String merchantName; | |||
| @@ -43,27 +46,58 @@ public class WxBillProperty extends BaseEntity { | |||
| @SortColumn(column = "receivePay") | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | |||
| private Long receivePay; | |||
| public String getReceivePayStr() { | |||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "本期账款(元)", width = 20, orderNum = "6") | |||
| @Transient | |||
| private String receivePayStr; | |||
| public String getPayStr() { | |||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "7") | |||
| @Transient | |||
| private String payStr; | |||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | |||
| private Long pay; | |||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "10") | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", format = "yyyy-MM-dd", width = 20, orderNum = "11") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| private Date payDate; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| @Excel(name = "逾期(天) ", width = 20, orderNum = "13") | |||
| @SortColumn(column = "expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| private Long expiredDay; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | |||
| private Long owe; | |||
| public String getOweStr() { | |||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "欠缴金额(元)", width = 20, orderNum = "9") | |||
| @Transient | |||
| private String oweStr; | |||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | |||
| private Integer status; | |||
| @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") | |||
| @@ -85,9 +119,11 @@ public class WxBillProperty extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | |||
| private Date updatetime; | |||
| @Excel(name = "周期开始时间", format = "yyyy-MM-dd", width = 20, orderNum = "4") | |||
| @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") | |||
| private Date starttime; | |||
| @Excel(name = "周期结束时间", format = "yyyy-MM-dd", width = 20, orderNum = "5") | |||
| @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") | |||
| private Date endtime; | |||
| @@ -107,6 +143,14 @@ public class WxBillProperty extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | |||
| private Long latePayPrice; | |||
| public String getLatePayPriceStr() { | |||
| return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | |||
| @Transient | |||
| private String latePayPriceStr; | |||
| @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | |||
| private Integer period; | |||
| @@ -128,12 +172,17 @@ public class WxBillProperty extends BaseEntity { | |||
| @Transient | |||
| @SortColumn(column = "allPeriod") | |||
| private Integer allPeriod; | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| private Integer depositStatus; | |||
| @Transient | |||
| private Long deposit; | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.domain.po; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.iformall.common.SortColumn; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -8,6 +9,7 @@ import lombok.ToString; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.math.BigDecimal; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| @@ -33,6 +35,8 @@ public class WxBillRent extends BaseEntity { | |||
| super.setSortColumns(this.sortColumns); | |||
| return super.getSortColumns(); | |||
| } | |||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||
| @Transient | |||
| private String merchantName; | |||
| @@ -42,22 +46,42 @@ public class WxBillRent extends BaseEntity { | |||
| @SortColumn(column = "receivePay") | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | |||
| private Long receivePay; | |||
| public String getReceivePayStr() { | |||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "本期账款(元)", width = 20, orderNum = "6") | |||
| @Transient | |||
| private String receivePayStr; | |||
| public String getPayStr() { | |||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "7") | |||
| @Transient | |||
| private String payStr; | |||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | |||
| private Long pay; | |||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "10") | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", format = "yyyy-MM-dd", width = 20, orderNum = "11") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| private Date payDate; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| @Excel(name = "逾期(天) ", width = 20, orderNum = "13") | |||
| @SortColumn(column = "expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| private Long expiredDay; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | |||
| @@ -66,6 +90,15 @@ public class WxBillRent extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | |||
| private Long owe; | |||
| public String getOweStr() { | |||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "欠缴金额(元)", width = 20, orderNum = "9") | |||
| @Transient | |||
| private String oweStr; | |||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | |||
| private Integer status; | |||
| @@ -88,9 +121,11 @@ public class WxBillRent extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | |||
| private Date updatetime; | |||
| @Excel(name = "周期开始时间", format = "yyyy-MM-dd", width = 20, orderNum = "4") | |||
| @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") | |||
| private Date starttime; | |||
| @Excel(name = "周期结束时间", format = "yyyy-MM-dd", width = 20, orderNum = "5") | |||
| @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") | |||
| private Date endtime; | |||
| @@ -110,6 +145,14 @@ public class WxBillRent extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | |||
| private Long latePayPrice; | |||
| public String getLatePayPriceStr() { | |||
| return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | |||
| @Transient | |||
| private String latePayPriceStr; | |||
| @SortColumn(column = "period") | |||
| @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | |||
| private Integer period; | |||
| @@ -133,12 +176,22 @@ public class WxBillRent extends BaseEntity { | |||
| @Transient | |||
| @SortColumn(column = "allPeriod") | |||
| private Integer allPeriod; | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Excel(name = "押金状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "3") | |||
| @Transient | |||
| private Integer depositStatus; | |||
| @Transient | |||
| private Integer rentType; | |||
| @Transient | |||
| private Long deposit; | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| @@ -0,0 +1,52 @@ | |||
| package com.iformall.domain.vo; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import lombok.Data; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @Data | |||
| public class WxBillDailyExportVo { | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| private String shopNumber; | |||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||
| private String merchantName; | |||
| @Excel(name = "费用类型", replace = {"水费_1", "电费_2", "空调费_3"}, width = 10, orderNum = "3") | |||
| private Integer type; | |||
| @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20) | |||
| private String receivePayStr; | |||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||
| private String payStr; | |||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||
| private String oweStr; | |||
| @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", orderNum = "8", width = 20, format = "yyyy-MM-dd") | |||
| private Date payDate; | |||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") | |||
| private Integer status; | |||
| @Excel(name = "逾期(天)", orderNum = "10", width = 20) | |||
| private Long expiredDay; | |||
| private Long receivePay; | |||
| private Long pay; | |||
| private Long owe; | |||
| public String getReceivePayStr() { | |||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| public String getPayStr() { | |||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| public String getOweStr() { | |||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| } | |||
| @@ -17,6 +17,6 @@ public interface WxBillDailyMapper extends CommonMapper<WxBillDaily, Long> { | |||
| void updateWaitPayStatus(Map<String,Object> params); | |||
| List<Map<String,Object>> queryBillDailyList(WxBillDaily record); | |||
| List<WxBillDaily> queryBillDailyList(WxBillDaily record); | |||
| } | |||
| @@ -17,6 +17,6 @@ public interface WxBillOtherDepositMapper extends CommonMapper<WxBillOtherDeposi | |||
| void updateWaitPayStatus(Map<String, Object> params); | |||
| List<Map<String, Object>> queryBillList(WxBillOtherDeposit record); | |||
| List<WxBillOtherDeposit> queryBillList(WxBillOtherDeposit record); | |||
| } | |||
| @@ -17,7 +17,7 @@ public interface WxBillOtherMapper extends CommonMapper<WxBillOther, Long> { | |||
| void updateWaitPayStatus(Map<String, Object> params); | |||
| List<Map<String,Object>> queryBillList(WxBillOther record); | |||
| List<WxBillOther> queryBillList(WxBillOther record); | |||
| Map<String,Object> queryPayInfoTotal(Map<String,Object> params); | |||
| @@ -14,7 +14,7 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||
| List<WxBillProperty> findList(WxBillProperty wxBillProperty); | |||
| List<Map<String,Object>> queryBillPropertyList(WxBillProperty record); | |||
| List<WxBillProperty> queryBillPropertyList(WxBillProperty record); | |||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | |||
| @@ -15,7 +15,7 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||
| List<WxBillRent> findList(WxBillRent wxBillRent); | |||
| List<Map<String,Object>> queryBillRentList(WxBillRent record); | |||
| List<WxBillRent> queryBillRentList(WxBillRent record); | |||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | |||
| @@ -23,7 +23,7 @@ public interface WxBillDailyService { | |||
| * @param record | |||
| * @return | |||
| */ | |||
| PageInfo<Map<String, Object>> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillDaily> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize); | |||
| void updateBillStatus(WxBillDaily record); | |||
| @@ -33,7 +33,7 @@ public interface WxBillDailyService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| Map<String, Object> getById(Long id); | |||
| WxBillDaily getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| @@ -57,4 +57,6 @@ public interface WxBillDailyService { | |||
| void insertData(WxBillDailyVo billDaily, String importKey, MallUserInfo user); | |||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillDaily wxBillDaily); | |||
| } | |||
| @@ -5,6 +5,8 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillOtherDeposit; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.Map; | |||
| /** | |||
| @@ -20,7 +22,7 @@ public interface WxBillOtherDepositService { | |||
| * @param record | |||
| * @return | |||
| */ | |||
| PageInfo<Map<String, Object>> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillOtherDeposit> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize); | |||
| void updateBillStatus(WxBillOtherDeposit record); | |||
| @@ -30,7 +32,7 @@ public interface WxBillOtherDepositService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| Map<String, Object> getById(Long id); | |||
| WxBillOtherDeposit getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| @@ -53,4 +55,7 @@ public interface WxBillOtherDepositService { | |||
| ResultData returnDeposit(WxBillOtherDeposit wxBillDeposit, MallUserInfo user); | |||
| ResultData adjustDeposit(WxBillOtherDeposit wxBillDeposit); | |||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit); | |||
| } | |||
| @@ -5,6 +5,8 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillOther; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.Map; | |||
| /** | |||
| @@ -20,7 +22,7 @@ public interface WxBillOtherService { | |||
| * @param record | |||
| * @return | |||
| */ | |||
| PageInfo<Map<String, Object>> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillOther> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize); | |||
| void updateBillStatus(WxBillOther record); | |||
| @@ -30,7 +32,7 @@ public interface WxBillOtherService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| Map<String, Object> getById(Long id); | |||
| WxBillOther getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| @@ -50,4 +52,6 @@ public interface WxBillOtherService { | |||
| ResultData updatePaid(Long id); | |||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther); | |||
| } | |||
| @@ -6,6 +6,8 @@ import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillProperty; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.Map; | |||
| /** | |||
| @@ -22,7 +24,7 @@ public interface WxBillPropertyService { | |||
| * @param record | |||
| * @return | |||
| */ | |||
| PageInfo<Map<String, Object>> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillProperty> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize); | |||
| void updateBillStatus(WxBillProperty record); | |||
| @@ -32,7 +34,7 @@ public interface WxBillPropertyService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| Map<String, Object> getById(Long id); | |||
| WxBillProperty getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| @@ -50,7 +52,7 @@ public interface WxBillPropertyService { | |||
| void deleteById(Long id); | |||
| PageInfo<Map<String, Object>> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillProperty> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize); | |||
| ResultData updatePaid(Long id); | |||
| @@ -58,4 +60,6 @@ public interface WxBillPropertyService { | |||
| ResultData updateLatePayStatus(WxBillProperty wxBillProperty); | |||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillProperty wxBillProperty); | |||
| } | |||
| @@ -6,6 +6,9 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -19,7 +22,7 @@ public interface WxBillRentService { | |||
| * @param record | |||
| * @return | |||
| */ | |||
| PageInfo<Map<String, Object>> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillRent> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize); | |||
| void updateBillStatus(WxBillRent record); | |||
| @@ -29,7 +32,7 @@ public interface WxBillRentService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| Map<String, Object> getById(Long id); | |||
| WxBillRent getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| @@ -47,7 +50,7 @@ public interface WxBillRentService { | |||
| void deleteById(Long id); | |||
| PageInfo<Map<String, Object>> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize); | |||
| PageInfo<WxBillRent> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize); | |||
| ResultData updatePaid(Long id); | |||
| @@ -57,4 +60,7 @@ public interface WxBillRentService { | |||
| ResultData updateLatePayStatus(WxBillRent wxBillRent); | |||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillRent wxBillRent); | |||
| } | |||
| @@ -7,6 +7,7 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxBillDailyExportVo; | |||
| import com.iformall.domain.vo.WxBillDailyVo; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| @@ -51,13 +52,13 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| @Autowired | |||
| WxMerchantShopMapper wxMerchantShopMapper; | |||
| @Override | |||
| public PageInfo<Map<String, Object>> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillDaily> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize) { | |||
| //分页对象设置页数和条数 | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| //查询 | |||
| List<Map<String, Object>> billDepositList = wxBillDailyMapper.queryBillDailyList(record); | |||
| List<WxBillDaily> billDepositList = wxBillDailyMapper.queryBillDailyList(record); | |||
| //结果放入分页对象 | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billDepositList); | |||
| PageInfo<WxBillDaily> pageInfo = new PageInfo<>(billDepositList); | |||
| return pageInfo; | |||
| } | |||
| @@ -102,18 +103,17 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| } | |||
| @Override | |||
| public Map<String,Object> getById(Long id) { | |||
| public WxBillDaily getById(Long id) { | |||
| WxBillDaily record = new WxBillDaily(); | |||
| record.setId(id); | |||
| Map<String, Object> wxBillDaily = wxBillDailyMapper.queryBillDailyList(record).get(0); | |||
| if(wxBillDaily.get("shopId")!=null) { | |||
| WxBillDaily wxBillDaily = wxBillDailyMapper.queryBillDailyList(record).get(0); | |||
| if (wxBillDaily.getShopId() != null) { | |||
| WxShop shop = new WxShop(); | |||
| shop.setId((Long)wxBillDaily.get("shopId")); | |||
| shop.setId(wxBillDaily.getShopId()); | |||
| List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop); | |||
| wxBillDaily.put("shops",shoplist); | |||
| wxBillDaily.setShops(shoplist); | |||
| }else{ | |||
| wxBillDaily.put("shops",Collections.EMPTY_LIST); | |||
| wxBillDaily.setShops(Collections.EMPTY_LIST); | |||
| } | |||
| return wxBillDaily; | |||
| @@ -295,4 +295,27 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS); | |||
| } | |||
| @Override | |||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillDaily record) { | |||
| List<WxBillDaily> billDailyList = wxBillDailyMapper.queryBillDailyList(record); | |||
| List<WxBillDailyExportVo> datalist = new ArrayList<>(); | |||
| WxBillDailyExportVo wxBillDailyExportVo; | |||
| for (int i = 0, size = billDailyList.size(); i < size; i++) { | |||
| WxBillDaily b = billDailyList.get(i); | |||
| wxBillDailyExportVo = new WxBillDailyExportVo(); | |||
| wxBillDailyExportVo.setShopNumber(b.getShopNumber()); | |||
| wxBillDailyExportVo.setMerchantName(b.getMerchantName()); | |||
| wxBillDailyExportVo.setReceivePay(b.getReceivePay()); | |||
| wxBillDailyExportVo.setPay(b.getPay()); | |||
| wxBillDailyExportVo.setOwe(b.getOwe()); | |||
| wxBillDailyExportVo.setReceiveDate(b.getReceiveDate()); | |||
| wxBillDailyExportVo.setPayDate(b.getPayDate()); | |||
| wxBillDailyExportVo.setExpiredDay(b.getExpiredDay()); | |||
| wxBillDailyExportVo.setStatus(b.getStatus()); | |||
| wxBillDailyExportVo.setType(b.getType()); | |||
| datalist.add(wxBillDailyExportVo); | |||
| } | |||
| excelService.exportExcel(datalist, null, "日常费用账单", WxBillDailyExportVo.class, "日常费用账单.xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -6,14 +6,12 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillAction; | |||
| import com.iformall.domain.po.WxBillOtherDeposit; | |||
| import com.iformall.domain.po.WxShop; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillOtherDepositMapper; | |||
| import com.iformall.mapper.WxShopMapper; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.service.WxBillOtherDepositService; | |||
| import org.slf4j.Logger; | |||
| @@ -22,6 +20,8 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.util.*; | |||
| @@ -41,15 +41,17 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| @Autowired | |||
| WxBillActionService wxBillActionService; | |||
| @Autowired | |||
| ExcelService excelService; | |||
| @Override | |||
| public PageInfo<Map<String, Object>> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillOtherDeposit> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize) { | |||
| //分页对象设置页数和条数 | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| //查询 | |||
| List<Map<String, Object>> billList = wxBillOtherDepositMapper.queryBillList(record); | |||
| List<WxBillOtherDeposit> billList = wxBillOtherDepositMapper.queryBillList(record); | |||
| //结果放入分页对象 | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billList); | |||
| PageInfo<WxBillOtherDeposit> pageInfo = new PageInfo<>(billList); | |||
| return pageInfo; | |||
| } | |||
| @@ -94,20 +96,18 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| } | |||
| @Override | |||
| public Map<String, Object> getById(Long id) { | |||
| public WxBillOtherDeposit getById(Long id) { | |||
| WxBillOtherDeposit record = new WxBillOtherDeposit(); | |||
| record.setId(id); | |||
| Map<String, Object> wxBillOther = wxBillOtherDepositMapper.queryBillList(record).get(0); | |||
| if (wxBillOther.get("shopId") != null) { | |||
| WxBillOtherDeposit wxBillOther = wxBillOtherDepositMapper.queryBillList(record).get(0); | |||
| if (wxBillOther.getShopId() != null) { | |||
| WxShop shop = new WxShop(); | |||
| shop.setId((Long) wxBillOther.get("shopId")); | |||
| shop.setId(wxBillOther.getShopId()); | |||
| List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop); | |||
| wxBillOther.put("shops", shoplist); | |||
| wxBillOther.setShops(shoplist); | |||
| } else { | |||
| wxBillOther.put("shops", Collections.EMPTY_LIST); | |||
| wxBillOther.setShops(Collections.EMPTY_LIST); | |||
| } | |||
| return wxBillOther; | |||
| } | |||
| @@ -265,5 +265,11 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| return new ResultData(Result.SUCCESS, "其他押金调整成功", wxBillDeposit); | |||
| } | |||
| @Override | |||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit) { | |||
| List<WxBillOtherDeposit> datalist = wxBillOtherDepositMapper.queryBillList(wxBillDeposit); | |||
| excelService.exportExcel(datalist, null, "其他押金账单", WxBillProperty.class, "其他押金账单.xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -6,14 +6,12 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillAction; | |||
| import com.iformall.domain.po.WxBillOther; | |||
| import com.iformall.domain.po.WxShop; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillOtherMapper; | |||
| import com.iformall.mapper.WxShopMapper; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.service.WxBillOtherService; | |||
| import org.slf4j.Logger; | |||
| @@ -22,6 +20,8 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.util.*; | |||
| @@ -41,14 +41,17 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| @Autowired | |||
| WxBillActionService wxBillActionService; | |||
| @Autowired | |||
| ExcelService excelService; | |||
| @Override | |||
| public PageInfo<Map<String, Object>> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillOther> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize) { | |||
| //分页对象设置页数和条数 | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| //查询 | |||
| List<Map<String, Object>> billList = wxBillOtherMapper.queryBillList(record); | |||
| List<WxBillOther> billList = wxBillOtherMapper.queryBillList(record); | |||
| //结果放入分页对象 | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billList); | |||
| PageInfo<WxBillOther> pageInfo = new PageInfo<>(billList); | |||
| return pageInfo; | |||
| } | |||
| @@ -93,18 +96,18 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| } | |||
| @Override | |||
| public Map<String,Object> getById(Long id) { | |||
| public WxBillOther getById(Long id) { | |||
| WxBillOther record = new WxBillOther(); | |||
| record.setId(id); | |||
| Map<String, Object> wxBillOther = wxBillOtherMapper.queryBillList(record).get(0); | |||
| WxBillOther wxBillOther = wxBillOtherMapper.queryBillList(record).get(0); | |||
| if(wxBillOther.get("shopId")!=null) { | |||
| if (wxBillOther.getShopId() != null) { | |||
| WxShop shop = new WxShop(); | |||
| shop.setId((Long)wxBillOther.get("shopId")); | |||
| shop.setId(wxBillOther.getShopId()); | |||
| List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop); | |||
| wxBillOther.put("shops",shoplist); | |||
| wxBillOther.setShops(shoplist); | |||
| }else{ | |||
| wxBillOther.put("shops",Collections.EMPTY_LIST); | |||
| wxBillOther.setShops(Collections.EMPTY_LIST); | |||
| } | |||
| return wxBillOther; | |||
| @@ -207,10 +210,12 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| } | |||
| return new ResultData(Result.SUCCESS, "其他账单结单成功"); | |||
| } | |||
| @Override | |||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther) { | |||
| List<WxBillOther> datalist = wxBillOtherMapper.queryBillList(wxBillOther); | |||
| excelService.exportExcel(datalist, null, "其他费用账单", WxBillOther.class, "其他费用账单.xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| @@ -11,19 +12,21 @@ import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillPropertyDepositMapper; | |||
| import com.iformall.mapper.WxBillPropertyMapper; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.service.WxBillPropertyService; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.*; | |||
| import java.util.stream.Collectors; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -41,11 +44,14 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| @Autowired | |||
| WxBillActionService wxBillActionService; | |||
| @Autowired | |||
| ExcelService excelService; | |||
| @Override | |||
| public PageInfo<Map<String, Object>> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillProperty> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize) { | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| List<Map<String, Object>> billRentList = wxBillPropertyMapper.queryBillPropertyList(record); | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | |||
| List<WxBillProperty> billRentList = wxBillPropertyMapper.queryBillPropertyList(record); | |||
| PageInfo<WxBillProperty> pageInfo = new PageInfo<>(billRentList); | |||
| return pageInfo; | |||
| } | |||
| @@ -90,7 +96,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| } | |||
| @Override | |||
| public Map<String, Object> getById(Long id) { | |||
| public WxBillProperty getById(Long id) { | |||
| WxBillProperty record = new WxBillProperty(); | |||
| record.setId(id); | |||
| return wxBillPropertyMapper.queryBillPropertyList(record).get(0); | |||
| @@ -174,15 +180,15 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| } | |||
| @Override | |||
| public PageInfo<Map<String, Object>> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillProperty> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { | |||
| WxBillProperty record = new WxBillProperty(); | |||
| record.setPropertyContractId(id); | |||
| record.setTenantId(tenantId); | |||
| record.setSortColumns(WxBillProperty.Field.Id_ASC); | |||
| updateBillStatus(record); | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| List<Map<String, Object>> billRentList = wxBillPropertyMapper.queryBillPropertyList(record); | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | |||
| List<WxBillProperty> billRentList = wxBillPropertyMapper.queryBillPropertyList(record); | |||
| PageInfo<WxBillProperty> pageInfo = new PageInfo<>(billRentList); | |||
| return pageInfo; | |||
| } | |||
| @@ -210,10 +216,10 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| @Override | |||
| public Object detail(Long id) { | |||
| //物业 | |||
| Map<String, Object> property = getById(id); | |||
| WxBillProperty property = getById(id); | |||
| //押金 | |||
| WxBillPropertyDeposit depositParam = new WxBillPropertyDeposit(); | |||
| depositParam.setPropertyContractId((Long) property.get("propertyContractId")); | |||
| depositParam.setPropertyContractId(property.getPropertyContractId()); | |||
| Map<String, Object> deposit = null; | |||
| List<Map<String, Object>> billDepositList = wxBillPropertyDepositMapper.queryBillDepositList(depositParam); | |||
| if (!billDepositList.isEmpty()) { | |||
| @@ -238,4 +244,31 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| return new ResultData(Result.SUCCESS, "滞纳金结单成功", record); | |||
| } | |||
| @Override | |||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillProperty wxBillProperty) { | |||
| String billName = wxBillProperty.getRentShopType().equals(EnumRentShopType.SHOP.getCode()) ? "商铺物业账单" : "多经点位物业账单"; | |||
| Map<Long, List<WxBillProperty>> collect = wxBillPropertyMapper.queryBillPropertyList(wxBillProperty).parallelStream() | |||
| .collect(Collectors.groupingBy(WxBillProperty::getMerchantId)); | |||
| Set<Map.Entry<Long, List<WxBillProperty>>> entries = collect.entrySet(); | |||
| List<WxBillProperty> datalist = new ArrayList<>(); | |||
| for (Map.Entry<Long, List<WxBillProperty>> entry : entries) { | |||
| List<WxBillProperty> list = entry.getValue(); | |||
| for (WxBillProperty property : list) { | |||
| String shopNumber = property.getShopNumber(); | |||
| if (StringUtils.isEmpty(shopNumber)) { | |||
| String shopInfo = property.getShopInfo(); | |||
| if (StringUtils.isNotEmpty(shopInfo) && !shopInfo.equals("[]")) { | |||
| JSONObject jsonObject = JSONObject.parseObject(shopInfo); | |||
| StringBuffer sb = new StringBuffer(); | |||
| Set<Map.Entry<String, Object>> sets = jsonObject.entrySet(); | |||
| sets.forEach(x -> sb.append(x.getKey()).append(",")); | |||
| property.setShopNumber(sb.deleteCharAt(sb.length() - 1).toString()); | |||
| } | |||
| } | |||
| datalist.add(property); | |||
| } | |||
| } | |||
| excelService.exportExcel(datalist, null, billName, WxBillProperty.class, billName + ".xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -1,29 +1,35 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillAction; | |||
| import com.iformall.domain.po.WxBillDeposit; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillDepositMapper; | |||
| import com.iformall.mapper.WxBillRentMapper; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.service.WxBillRentService; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.*; | |||
| import java.util.stream.Collectors; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -41,11 +47,14 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| @Autowired | |||
| WxBillActionService wxBillActionService; | |||
| @Autowired | |||
| ExcelService excelService; | |||
| @Override | |||
| public PageInfo<Map<String, Object>> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillRent> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(record); | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | |||
| List<WxBillRent> billRentList = wxBillRentMapper.queryBillRentList(record); | |||
| PageInfo<WxBillRent> pageInfo = new PageInfo<>(billRentList); | |||
| return pageInfo; | |||
| } | |||
| @@ -90,7 +99,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| } | |||
| @Override | |||
| public Map<String, Object> getById(Long id) { | |||
| public WxBillRent getById(Long id) { | |||
| WxBillRent record = new WxBillRent(); | |||
| record.setId(id); | |||
| return wxBillRentMapper.queryBillRentList(record).get(0); | |||
| @@ -173,15 +182,15 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| } | |||
| @Override | |||
| public PageInfo<Map<String, Object>> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { | |||
| public PageInfo<WxBillRent> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { | |||
| WxBillRent record = new WxBillRent(); | |||
| record.setRentContractId(id); | |||
| record.setTenantId(tenantId); | |||
| record.setSortColumns(WxBillRent.Field.Id_ASC); | |||
| updateBillStatus(record); | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(record); | |||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | |||
| List<WxBillRent> billRentList = wxBillRentMapper.queryBillRentList(record); | |||
| PageInfo<WxBillRent> pageInfo = new PageInfo<>(billRentList); | |||
| return pageInfo; | |||
| } | |||
| @@ -208,10 +217,10 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| @Override | |||
| public Object detail(Long id) { | |||
| //租赁 | |||
| Map<String, Object> rent = getById(id); | |||
| WxBillRent rent = getById(id); | |||
| //押金 | |||
| WxBillDeposit depositParam = new WxBillDeposit(); | |||
| depositParam.setRentContractId((Long) rent.get("rentContractId")); | |||
| depositParam.setRentContractId(rent.getRentContractId()); | |||
| Map<String, Object> deposit = null; | |||
| List<Map<String, Object>> billDepositList = wxBillDepositMapper.queryBillDepositList(depositParam); | |||
| if (!billDepositList.isEmpty()) { | |||
| @@ -273,4 +282,31 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| } | |||
| return new ResultData(Result.SUCCESS, "滞纳金结单成功", record); | |||
| } | |||
| @Override | |||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillRent wxBillRent) { | |||
| String billName = wxBillRent.getRentShopType().equals(EnumRentShopType.SHOP.getCode()) ? "商铺租金账单" : "多经点位租金账单"; | |||
| Map<Long, List<WxBillRent>> collect = wxBillRentMapper.queryBillRentList(wxBillRent).parallelStream() | |||
| .collect(Collectors.groupingBy(WxBillRent::getMerchantId)); | |||
| Set<Map.Entry<Long, List<WxBillRent>>> entries = collect.entrySet(); | |||
| List<WxBillRent> datalist = new ArrayList<>(); | |||
| for (Map.Entry<Long, List<WxBillRent>> entry : entries) { | |||
| List<WxBillRent> list = entry.getValue(); | |||
| for (WxBillRent rent : list) { | |||
| String shopNumber = rent.getShopNumber(); | |||
| if (StringUtils.isEmpty(shopNumber)) { | |||
| String shopInfo = rent.getShopInfo(); | |||
| if (StringUtils.isNotEmpty(shopInfo) && !shopInfo.equals("[]")) { | |||
| JSONObject jsonObject = JSONObject.parseObject(shopInfo); | |||
| StringBuffer sb = new StringBuffer(); | |||
| Set<Map.Entry<String, Object>> sets = jsonObject.entrySet(); | |||
| sets.forEach(x -> sb.append(x.getKey()).append(",")); | |||
| rent.setShopNumber(sb.deleteCharAt(sb.length() - 1).toString()); | |||
| } | |||
| } | |||
| datalist.add(rent); | |||
| } | |||
| } | |||
| excelService.exportExcel(datalist, null, billName, WxBillRent.class, billName + ".xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -21,6 +21,8 @@ | |||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | |||
| <result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> | |||
| </resultMap> | |||
| @@ -64,13 +66,11 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="queryBillDailyList" parameterType="com.iformall.domain.po.WxBillDaily" resultType="hashmap"> | |||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | |||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay, | |||
| case when br.status=1 then br.owe else 0 end owe | |||
| ,br.`status`, | |||
| m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId, | |||
| br.shop_id shopId,br.type,br.`rent_shop_type` rentShopType,br.pay_way payWay,br.price_detail priceDetail | |||
| <select id="queryBillDailyList" parameterType="com.iformall.domain.po.WxBillDaily" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` , | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` merchant_name, | |||
| s.shop_number,br.`updatetime`,br.`merchant_id`, | |||
| br.shop_id,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail | |||
| from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| <where> | |||
| @@ -22,6 +22,8 @@ | |||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | |||
| <result column="return_price" jdbcType="BIGINT" property="returnPrice"/> | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="merchant_name" property="merchantName"/> | |||
| </resultMap> | |||
| @@ -68,12 +70,10 @@ | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultType="hashmap"> | |||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | |||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, | |||
| m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`return_price` returnPrice, | |||
| br.`merchant_id` merchantId,br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType, | |||
| br.pay_way payWay | |||
| <select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, | |||
| br.`owe`,br.`status`,m.`name` merchant_name,s.shop_number,br.`updatetime`,br.`return_price`,br.`merchant_id`, | |||
| br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way | |||
| from wx_bill_other_deposit br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| <where> | |||
| @@ -21,7 +21,10 @@ | |||
| <result column="comments" jdbcType="VARCHAR" property="comments" /> | |||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="merchant_name" property="merchantName"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| @@ -64,14 +67,12 @@ | |||
| select <include refid="allColumns" /> from wx_bill_other | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOther" resultType="hashmap"> | |||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | |||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay, | |||
| case when br.status=1 then br.owe else 0 end owe | |||
| ,br.`status`, | |||
| m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId, | |||
| br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType,br.pay_way payWay | |||
| <select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOther" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`, br.`pay_date`,br.`createtime`,br.`expired_day`, | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` | |||
| merchant_name,s.shop_number,br.`updatetime`, | |||
| br.`merchant_id`,br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way | |||
| from wx_bill_other br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| <where> | |||
| @@ -32,7 +32,12 @@ | |||
| <result column="comments" jdbcType="VARCHAR" property="comments"/> | |||
| <result column="starttime" property="starttime"/> | |||
| <result column="endtime" property="endtime"/> | |||
| <result column="merchant_name" property="merchantName"/> | |||
| <result column="deposit" property="deposit"/> | |||
| <result column="deposit_status" property="depositStatus"/> | |||
| <result column="all_period" property="allPeriod"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| @@ -80,20 +85,18 @@ | |||
| select <include refid="allColumns" /> from wx_bill_property | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="queryBillPropertyList" parameterType="com.iformall.domain.po.WxBillProperty" resultType="hashmap"> | |||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | |||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay, | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`, | |||
| br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, | |||
| br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,br.`period`, | |||
| br.`revenue`,br.`late_pay_ratio` latePayRatio,br.`late_pay_time` latePayTime, | |||
| br.`property_contract_id` propertyContractId,d.receive_pay deposit,case when br.late_pay_status=2 | |||
| then (case when br.late_pay_time is null then 0 | |||
| <select id="queryBillPropertyList" parameterType="com.iformall.domain.po.WxBillProperty" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`need_pay`,m.`name` | |||
| merchant_name,s.shop_number,br.`updatetime`, | |||
| br.`merchant_id`,br.`rent_shop_type`,br.`period`,br.`revenue`,br.`late_pay_ratio`,br.`late_pay_time`, | |||
| br.`property_contract_id`,d.receive_pay deposit, | |||
| case when br.late_pay_status=2 then (case when br.late_pay_time is null then 0 | |||
| else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) | |||
| else br.late_pay_price end latePayPrice, | |||
| (select max(period) from wx_bill_property where property_contract_id=br.property_contract_id) | |||
| allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus, | |||
| else br.late_pay_price end late_pay_price,(select max(period) from wx_bill_property where | |||
| property_contract_id=br.property_contract_id) all_period, | |||
| d.`status` deposit_status,br.`shop_info`,br.pay_way,br.late_pay_status, | |||
| br.`comments`,br.starttime,br.endtime | |||
| from wx_bill_property br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| @@ -32,7 +32,14 @@ | |||
| <result column="comments" jdbcType="VARCHAR" property="comments"/> | |||
| <result column="starttime" property="starttime"/> | |||
| <result column="endtime" property="endtime"/> | |||
| <result column="merchant_name" property="merchantName"/> | |||
| <result column="deposit" property="deposit"/> | |||
| <result column="deposit_status" property="depositStatus"/> | |||
| <result column="rent_type" property="rentType"/> | |||
| <result column="all_period" property="allPeriod"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| @@ -82,23 +89,20 @@ | |||
| from wx_bill_rent | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="queryBillRentList" parameterType="com.iformall.domain.po.WxRentContract" resultType="hashmap"> | |||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | |||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay, | |||
| case when br.status=1 then br.owe else 0 end owe | |||
| ,br.`status`, | |||
| br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, | |||
| br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,r.type rentType,r.pay_ratio payRatio, | |||
| br.`revenue`,br.`late_pay_ratio` latePayRatio,br.`late_pay_time` latePayTime,br.`period`, | |||
| br.`rent_contract_id` rentContractId,d.receive_pay deposit,case when br.late_pay_status=2 | |||
| then (case when br.late_pay_time is null then 0 | |||
| else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) | |||
| else br.late_pay_price end latePayPrice, | |||
| (select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) allPeriod,d.`status` | |||
| depositStatus,br.shop_info shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus, | |||
| br.`comments`,br.starttime,br.endtime | |||
| <select id="queryBillRentList" parameterType="com.iformall.domain.po.WxBillRent" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`need_pay`,m.`name` | |||
| merchant_name,s.shop_number,br.`updatetime`, | |||
| br.`merchant_id`,br.`rent_shop_type`,r.type as | |||
| rent_type,r.pay_ratio,br.`revenue`,br.`late_pay_ratio`,br.`late_pay_time`,br.`period`, | |||
| br.`rent_contract_id`,d.receive_pay deposit,case when br.late_pay_status=2 then (case when br.late_pay_time is | |||
| null then 0 | |||
| else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) else br.late_pay_price end | |||
| late_pay_price,d.`status` deposit_status, | |||
| br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime, | |||
| (select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) as all_period | |||
| from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| left join wx_rent_contract r on br.rent_contract_id=r.id | |||