Przeglądaj źródła

fix

release_toaliyun_real
winter 2 lat temu
rodzic
commit
03ee56c03c
11 zmienionych plików z 172 dodań i 269 usunięć
  1. +95
    -65
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java
  2. +0
    -4
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java
  3. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java
  4. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java
  5. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java
  6. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java
  7. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java
  8. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  9. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java
  10. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java
  11. +73
    -179
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java

+ 95
- 65
mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java Wyświetl plik

@@ -19,6 +19,7 @@ import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.WxShop;
import com.iformall.domain.po.WxUserDataRule;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.domain.vo.WxBillAll;
import com.iformall.domain.vo.WxBillAllVo;
import com.iformall.domain.vo.WxBillExcelTemplate;
@@ -127,13 +128,13 @@ public class WxBillAllController extends BaseController {
wxMerchant.setId(m.getId());
WxBillSum rentSum = billAllHelper.getBillRentSum(wxMerchant,starttime, enttime);
WxBillSum rentManageSum = billAllHelper.getBillRentManage(wxMerchant, starttime, enttime,null);
WxBillSum rentDepositSum = billAllHelper.getBillDeposit(wxMerchant, starttime, enttime);
WxBillSum propertySum = billAllHelper.getBillProperty(wxMerchant, starttime, enttime);
WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDeposit(wxMerchant, starttime, enttime);
WxBillSum dailySum = billAllHelper.getBillDaily(wxMerchant, starttime, enttime,null);
WxBillSum otherSum = billAllHelper.getBillOther(wxMerchant, starttime, enttime);
WxBillSum otherDepositSum = billAllHelper.getBillOtherDeposit(wxMerchant, starttime, enttime);
WxBillSum rentManageSum = billAllHelper.getBillRentManageSum(wxMerchant, starttime, enttime,null);
WxBillSum rentDepositSum = billAllHelper.getBillDepositSum(wxMerchant, starttime, enttime);
WxBillSum propertySum = billAllHelper.getBillPropertySum(wxMerchant, starttime, enttime);
WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDepositSum(wxMerchant, starttime, enttime);
WxBillSum dailySum = billAllHelper.getBillDailySum(wxMerchant, starttime, enttime,null);
WxBillSum otherSum = billAllHelper.getBillOtherSum(wxMerchant, starttime, enttime);
WxBillSum otherDepositSum = billAllHelper.getBillOtherDepositSum(wxMerchant, starttime, enttime);
vo.setNeedPay(billAllHelper.calcuteSum(rentSum.getNeedPay(),rentManageSum.getNeedPay(),rentDepositSum.getNeedPay(),propertySum.getNeedPay(),
propertyDepositSum.getNeedPay(),dailySum.getNeedPay(),otherSum.getNeedPay(),otherDepositSum.getNeedPay()));
@@ -190,14 +191,14 @@ public class WxBillAllController extends BaseController {
vo.setShopNumber(billAllHelper.getMerchantShopNumber(m));
WxBillSum rentSum = billAllHelper.getBillRentSum(wxMerchant,starttime, enttime);
WxBillSum rentBussinessManageSum = billAllHelper.getBillRentManage(wxMerchant, starttime, enttime,EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE);
WxBillSum rentOperationManageSum = billAllHelper.getBillRentManage(wxMerchant, starttime, enttime,EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE);
WxBillSum rentDepositSum = billAllHelper.getBillDeposit(wxMerchant, starttime, enttime);
WxBillSum propertySum = billAllHelper.getBillProperty(wxMerchant, starttime, enttime);
WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDeposit(wxMerchant, starttime, enttime);
WxBillSum dailySum = billAllHelper.getBillDaily(wxMerchant, starttime, enttime,null);
WxBillSum otherSum = billAllHelper.getBillOther(wxMerchant, starttime, enttime);
WxBillSum otherDepositSum = billAllHelper.getBillOtherDeposit(wxMerchant, starttime, enttime);
WxBillSum rentBussinessManageSum = billAllHelper.getBillRentManageSum(wxMerchant, starttime, enttime,EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE);
WxBillSum rentOperationManageSum = billAllHelper.getBillRentManageSum(wxMerchant, starttime, enttime,EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE);
WxBillSum rentDepositSum = billAllHelper.getBillDepositSum(wxMerchant, starttime, enttime);
WxBillSum propertySum = billAllHelper.getBillPropertySum(wxMerchant, starttime, enttime);
WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDepositSum(wxMerchant, starttime, enttime);
WxBillSum dailySum = billAllHelper.getBillDailySum(wxMerchant, starttime, enttime,null);
WxBillSum otherSum = billAllHelper.getBillOtherSum(wxMerchant, starttime, enttime);
WxBillSum otherDepositSum = billAllHelper.getBillOtherDepositSum(wxMerchant, starttime, enttime);
vo.setNeedPay(billAllHelper.calcuteSum(rentSum.getNeedPay(),rentBussinessManageSum.getNeedPay(),rentOperationManageSum.getNeedPay(),rentDepositSum.getNeedPay(),propertySum.getNeedPay(),
propertyDepositSum.getNeedPay(),dailySum.getNeedPay(),otherSum.getNeedPay(),otherDepositSum.getNeedPay()));
@@ -230,6 +231,35 @@ public class WxBillAllController extends BaseController {
return new ResultData(tmap);
}
/**
* 欠缴账单统计
* @param wxBillAll
* @param pageNum
* @param pageSize
* @return
*/
@GetMapping("oweBillSum")
public ResultData oweBillSum(@ModelAttribute WxMerchant wxMerchant,Integer billType) {
if (null == billType) {
return new ResultData(Result.ERROR,"请选择分类");
}
wxMerchant.updateTenantInfo(getTenantInfo());
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxMerchant.setFloorForRule(dataRule.getFloorIds());
wxMerchant.setBusinessForRule(dataRule.getBussinessIds());
}
wxMerchant.setOnlyOwe(EnumYesOrNo.YES.getCode());
EnumBillAllType btype = EnumBillAllType.getEnum(billType);
if (null == btype) {
return new ResultData(Result.ERROR,"分类非法");
}
Date starttime = wxMerchant.getStarttime();
Date enttime = wxMerchant.getEndtime();
return new ResultData(billAllHelper.getBillSum(btype, wxMerchant,starttime,enttime));
}
/**
* 欠缴账单列表
* @param wxBillAll
@@ -283,35 +313,35 @@ public class WxBillAllController extends BaseController {
return ;
}
PageInfo page = billAllHelper.getBillList(btype, wxMerchant,1,10000);
excelService.exportExcel(page.getList(), null, "商户账单总览数据", WxMerchantBillVo.class, "商户账单总览数据.xlsx", response, false);
excelService.exportExcel(page.getList(), null, "商户账单总览数据", WxBillBaseEntity.class, "商户欠缴账单_"+btype.getMessage()+".xlsx", response, false);
}
/**
* 欠缴商户列表
* @param wxBillAll
* @param pageNum
* @param pageSize
* @return
*/
@GetMapping("oweMerchantlist")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "费用收缴数据-欠缴商户列表")
public ResultData oweMerchantlist(@ModelAttribute WxBillAll wxBillAll, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxBillAllController::oweMerchantlist");
if (null == wxBillAll) {
wxBillAll = new WxBillAll();
}
//默认查当月第一天到今天
if(StringUtils.isNotBlank(wxBillAll.getEndtime())){
wxBillAll.setEndtime(wxBillAll.getEndtime()+" 23:59:59");
}
wxBillAll.updateTenantInfo(getTenantInfo());
Map<String, Object> result = wxBillAllService.getOweBillAsPage(wxBillAll, pageNum, pageSize);
return new ResultData(result);
}
// /**
// * 欠缴商户列表
// * @param wxBillAll
// * @param pageNum
// * @param pageSize
// * @return
// */
// @GetMapping("oweMerchantlist")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
// @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
// @SystemControllerLog(description = "费用收缴数据-欠缴商户列表")
// public ResultData oweMerchantlist(@ModelAttribute WxBillAll wxBillAll, Integer pageNum, Integer pageSize) {
// logger.debug("[" + getIpAddr() + "] WxBillAllController::oweMerchantlist");
// if (null == wxBillAll) {
// wxBillAll = new WxBillAll();
// }
// //默认查当月第一天到今天
// if(StringUtils.isNotBlank(wxBillAll.getEndtime())){
// wxBillAll.setEndtime(wxBillAll.getEndtime()+" 23:59:59");
// }
// wxBillAll.updateTenantInfo(getTenantInfo());
// Map<String, Object> result = wxBillAllService.getOweBillAsPage(wxBillAll, pageNum, pageSize);
// return new ResultData(result);
// }

@@ -392,30 +422,30 @@ public class WxBillAllController extends BaseController {
// }


/**
* 应收、承付商户列表
* @param wxBillAll
* @param pageNum
* @param pageSize
* @return
*/
@GetMapping("receiveAndPayMerchantlist")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "账单管理-应收、承付商户列表")
@ApiOperation("应收、承付商户列表")
public ResultData receiveAndPayMerchantlist(@ModelAttribute WxBillAll wxBillAll, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxBillAllController::receiveAndPayMerchantlist");
if (null == wxBillAll) {
wxBillAll = new WxBillAll();
}
wxBillAll.updateTenantInfo(getTenantInfo());
PageInfo<Map> page = wxBillAllService.getReceiveAndPayBillAsPage(wxBillAll, pageNum, pageSize);
Map<String, Object> result = new HashMap<>();
result.put("pageInfo", page);
return new ResultData(result);
}
// /**
// * 应收、承付商户列表
// * @param wxBillAll
// * @param pageNum
// * @param pageSize
// * @return
// */
// @GetMapping("receiveAndPayMerchantlist")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
// @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
// @SystemControllerLog(description = "账单管理-应收、承付商户列表")
// @ApiOperation("应收、承付商户列表")
// public ResultData receiveAndPayMerchantlist(@ModelAttribute WxBillAll wxBillAll, Integer pageNum, Integer pageSize) {
// logger.debug("[" + getIpAddr() + "] WxBillAllController::receiveAndPayMerchantlist");
// if (null == wxBillAll) {
// wxBillAll = new WxBillAll();
// }
// wxBillAll.updateTenantInfo(getTenantInfo());
// PageInfo<Map> page = wxBillAllService.getReceiveAndPayBillAsPage(wxBillAll, pageNum, pageSize);
// Map<String, Object> result = new HashMap<>();
// result.put("pageInfo", page);
// return new ResultData(result);
// }

/**
* 导出应收、承付商户列表


+ 0
- 4
mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java Wyświetl plik

@@ -67,10 +67,6 @@ public class WxBillDaily extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@Excel(name = "租赁商铺类型*", orderNum = "6", width = 20, replace = {"店铺_1", "多经点位_2"})
@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java Wyświetl plik

@@ -52,9 +52,6 @@ public class WxBillDeposit extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice")
private String returnPrice;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java Wyświetl plik

@@ -70,9 +70,6 @@ public class WxBillOther extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java Wyświetl plik

@@ -63,9 +63,6 @@ public class WxBillOtherDeposit extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice")
private Long returnPrice;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java Wyświetl plik

@@ -70,9 +70,6 @@ public class WxBillProperty extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "营业额", name = "revenue")
private String revenue;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java Wyświetl plik

@@ -51,9 +51,6 @@ public class WxBillPropertyDeposit extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice")
private String returnPrice;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java Wyświetl plik

@@ -105,9 +105,6 @@ public class WxBillRent extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "营业额", name = "revenue")
private String revenue;



+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java Wyświetl plik

@@ -72,9 +72,6 @@ public class WxBillRentManage extends WxBillBaseEntity {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "滞纳金费率", name = "latePayRatio")
private Integer latePayRatio;



+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java Wyświetl plik

@@ -31,6 +31,10 @@ public class WxBillBaseEntity extends TenantEntity {
@Excel(name = "商户名称", width = 20, orderNum = "2")
@TableField(exist = false)
protected String merchantName;
@Excel(name = "租赁商铺类型*", orderNum = "6", width = 20, replace = {"店铺_1", "多经点位_2"})
@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
protected Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value="实际应收金额(做了减免之后和need可能不一样)",name="receivePay")
protected String receivePay;


+ 73
- 179
mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java Wyświetl plik

@@ -23,6 +23,7 @@ import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxBillRentManage;
import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.domain.vo.WxShopVo;
import com.iformall.enums.EnumBillAllType;
@@ -70,13 +71,24 @@ public class WxBillAllHelper {
@Autowired
private WxShopService wxShopService;
private void updateQueryParm(WxMerchant wxMerchant,WxBillBaseEntity bill,Date starttime,Date enttime) {
bill.updateTenantInfo(wxMerchant);
bill.setFloorForRule(wxMerchant.getFloorForRule());
bill.setBusinessForRule(wxMerchant.getBusinessForRule());
bill.setBuilding(wxMerchant.getBuilding());
bill.setFloor(wxMerchant.getFloor());
bill.setMerchantName(wxMerchant.getName());
bill.setMerchantId(wxMerchant.getId());
bill.setOnlyOwe(wxMerchant.getOnlyOwe());
bill.setStarttime(starttime);
bill.setEndtime(enttime);
bill.setRentShopType(wxMerchant.getType());
}
public WxBillSum getBillRentSum(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillRent br = new WxBillRent();
br.updateTenantInfo(wxMerchant);
br.setStarttime(starttime);
br.setEndtime(enttime);
br.setOnlyOwe(wxMerchant.getOnlyOwe());
br.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, br,starttime,enttime);
WxBillSum rentSum = wxBillRentService.getBillMonthSum(br);
if (null == rentSum) {
rentSum = new WxBillSum();
@@ -87,24 +99,16 @@ public class WxBillAllHelper {
public List<Long> getBillRentMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillRent br = new WxBillRent();
br.updateTenantInfo(wxMerchant);
br.setStarttime(starttime);
br.setEndtime(enttime);
br.setOnlyOwe(wxMerchant.getOnlyOwe());
br.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, br,starttime,enttime);
return wxBillRentService.getMerchantIds(br);
}
public WxBillSum getBillRentManage(WxMerchant wxMerchant,Date starttime, Date enttime,EnumRentContractManageFeeType manageFeeType) {
public WxBillSum getBillRentManageSum(WxMerchant wxMerchant,Date starttime, Date enttime,EnumRentContractManageFeeType manageFeeType) {
WxBillRentManage brm = new WxBillRentManage();
brm.updateTenantInfo(wxMerchant);
brm.setStarttime(starttime);
brm.setEndtime(enttime);
brm.setOnlyOwe(wxMerchant.getOnlyOwe());
if (null != manageFeeType) {
brm.setManageFeeType(manageFeeType.getCode());
}
brm.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, brm,starttime,enttime);
WxBillSum rentManageSum = wxBillRentManageService.getBillMonthSum(brm);
if (null == rentManageSum) {
rentManageSum = new WxBillSum();
@@ -119,24 +123,16 @@ public class WxBillAllHelper {
public List<Long> getBillRentManageMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime,EnumRentContractManageFeeType manageFeeType) {
WxBillRentManage brm = new WxBillRentManage();
brm.updateTenantInfo(wxMerchant);
brm.setStarttime(starttime);
brm.setEndtime(enttime);
brm.setOnlyOwe(wxMerchant.getOnlyOwe());
if (null != manageFeeType) {
brm.setManageFeeType(manageFeeType.getCode());
}
brm.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, brm,starttime,enttime);
return wxBillRentManageService.getMerchantIds(brm);
}
public WxBillSum getBillDeposit(WxMerchant wxMerchant,Date starttime, Date enttime) {
public WxBillSum getBillDepositSum(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillDeposit bd = new WxBillDeposit();
bd.updateTenantInfo(wxMerchant);
bd.setStarttime(starttime);
bd.setEndtime(enttime);
bd.setOnlyOwe(wxMerchant.getOnlyOwe());
bd.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bd,starttime,enttime);
WxBillSum rentDepositSum = wxBillRentDepositService.getBillMonthSum(bd);
if (null == rentDepositSum) {
rentDepositSum = new WxBillSum();
@@ -147,21 +143,13 @@ public class WxBillAllHelper {
public List<Long> getBillDepositMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillDeposit bd = new WxBillDeposit();
bd.updateTenantInfo(wxMerchant);
bd.setStarttime(starttime);
bd.setEndtime(enttime);
bd.setOnlyOwe(wxMerchant.getOnlyOwe());
bd.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bd,starttime,enttime);
return wxBillRentDepositService.getMerchantIds(bd);
}
public WxBillSum getBillProperty(WxMerchant wxMerchant,Date starttime, Date enttime) {
public WxBillSum getBillPropertySum(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillProperty bp = new WxBillProperty();
bp.updateTenantInfo(wxMerchant);
bp.setStarttime(starttime);
bp.setEndtime(enttime);
bp.setOnlyOwe(wxMerchant.getOnlyOwe());
bp.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bp,starttime,enttime);
WxBillSum propertySum = wxBillPropertyService.getBillMonthSum(bp);
if (null == propertySum) {
propertySum = new WxBillSum();
@@ -172,21 +160,13 @@ public class WxBillAllHelper {
public List<Long> getBillPropertyMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillProperty bp = new WxBillProperty();
bp.updateTenantInfo(wxMerchant);
bp.setStarttime(starttime);
bp.setEndtime(enttime);
bp.setOnlyOwe(wxMerchant.getOnlyOwe());
bp.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bp,starttime,enttime);
return wxBillPropertyService.getMerchantIds(bp);
}
public WxBillSum getBillPropertyDeposit(WxMerchant wxMerchant,Date starttime, Date enttime) {
public WxBillSum getBillPropertyDepositSum(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillPropertyDeposit pd = new WxBillPropertyDeposit();
pd.updateTenantInfo(wxMerchant);
pd.setStarttime(starttime);
pd.setEndtime(enttime);
pd.setOnlyOwe(wxMerchant.getOnlyOwe());
pd.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, pd,starttime,enttime);
WxBillSum propertyDepositSum = wxBillPropertyDepositService.getBillMonthSum(pd);
if (null == propertyDepositSum) {
propertyDepositSum = new WxBillSum();
@@ -197,24 +177,16 @@ public class WxBillAllHelper {
public List<Long> getBillPropertyDepositMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillPropertyDeposit pd = new WxBillPropertyDeposit();
pd.updateTenantInfo(wxMerchant);
pd.setStarttime(starttime);
pd.setEndtime(enttime);
pd.setOnlyOwe(wxMerchant.getOnlyOwe());
pd.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, pd,starttime,enttime);
return wxBillPropertyDepositService.getMerchantIds(pd);
}
public WxBillSum getBillDaily(WxMerchant wxMerchant,Date starttime, Date enttime,EnumBillDailyType dailyType) {
public WxBillSum getBillDailySum(WxMerchant wxMerchant,Date starttime, Date enttime,EnumBillDailyType dailyType) {
WxBillDaily bdd = new WxBillDaily();
bdd.updateTenantInfo(wxMerchant);
bdd.setStarttime(starttime);
bdd.setEndtime(enttime);
bdd.setOnlyOwe(wxMerchant.getOnlyOwe());
bdd.setMerchantId(wxMerchant.getId());
if (null != dailyType) {
bdd.setType(dailyType.getCode());
}
updateQueryParm(wxMerchant, bdd,starttime,enttime);
WxBillSum dailySum = wxBillDailyService.getBillMonthSum(bdd);
if (null == dailySum) {
dailySum = new WxBillSum();
@@ -229,24 +201,16 @@ public class WxBillAllHelper {
public List<Long> getBillDailyMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime,EnumBillDailyType dailyType) {
WxBillDaily bdd = new WxBillDaily();
bdd.updateTenantInfo(wxMerchant);
bdd.setStarttime(starttime);
bdd.setEndtime(enttime);
bdd.setOnlyOwe(wxMerchant.getOnlyOwe());
bdd.setMerchantId(wxMerchant.getId());
if (null != dailyType) {
bdd.setType(dailyType.getCode());
}
updateQueryParm(wxMerchant, bdd,starttime,enttime);
return wxBillDailyService.getMerchantIds(bdd);
}
public WxBillSum getBillOther(WxMerchant wxMerchant,Date starttime, Date enttime) {
public WxBillSum getBillOtherSum(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillOther bo = new WxBillOther();
bo.updateTenantInfo(wxMerchant);
bo.setStarttime(starttime);
bo.setEndtime(enttime);
bo.setOnlyOwe(wxMerchant.getOnlyOwe());
bo.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bo,starttime,enttime);
WxBillSum otherSum = wxBillOtherService.getBillMonthSum(bo);
if (null == otherSum) {
otherSum = new WxBillSum();
@@ -257,21 +221,13 @@ public class WxBillAllHelper {
public List<Long> getBillOtherMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillOther bo = new WxBillOther();
bo.updateTenantInfo(wxMerchant);
bo.setStarttime(starttime);
bo.setEndtime(enttime);
bo.setOnlyOwe(wxMerchant.getOnlyOwe());
bo.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bo,starttime,enttime);
return wxBillOtherService.getMerchantIds(bo);
}
public WxBillSum getBillOtherDeposit(WxMerchant wxMerchant,Date starttime, Date enttime) {
public WxBillSum getBillOtherDepositSum(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillOtherDeposit bod = new WxBillOtherDeposit();
bod.updateTenantInfo(wxMerchant);
bod.setStarttime(starttime);
bod.setEndtime(enttime);
bod.setOnlyOwe(wxMerchant.getOnlyOwe());
bod.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bod,starttime,enttime);
WxBillSum otherDepositSum = wxBillOtherDepositService.getBillMonthSum(bod);
if (null == otherDepositSum) {
otherDepositSum = new WxBillSum();
@@ -282,11 +238,7 @@ public class WxBillAllHelper {
public List<Long> getBillOtherDepositMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) {
WxBillOtherDeposit bod = new WxBillOtherDeposit();
bod.updateTenantInfo(wxMerchant);
bod.setStarttime(starttime);
bod.setEndtime(enttime);
bod.setOnlyOwe(wxMerchant.getOnlyOwe());
bod.setMerchantId(wxMerchant.getId());
updateQueryParm(wxMerchant, bod,starttime,enttime);
return wxBillOtherDepositService.getMerchantIds(bod);
}
@@ -348,124 +300,66 @@ public class WxBillAllHelper {
public PageInfo getBillList(EnumBillAllType billType,WxMerchant wxMerchant,Integer pageNum, Integer pageSize) {
if (billType == EnumBillAllType.RENT) {
WxBillRent wxBillRent = new WxBillRent();
wxBillRent.updateTenantInfo(wxMerchant);
wxBillRent.setFloorForRule(wxMerchant.getFloorForRule());
wxBillRent.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillRent.setBuilding(wxMerchant.getBuilding());
wxBillRent.setFloor(wxMerchant.getFloor());
wxBillRent.setStarttime(wxMerchant.getStarttime());
wxBillRent.setEndtime(wxMerchant.getEndtime());
wxBillRent.setRentShopType(wxMerchant.getType());
wxBillRent.setMerchantName(wxMerchant.getName());;
updateQueryParm(wxMerchant, wxBillRent,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillRentService.listAsPage(wxBillRent, pageNum, pageSize);
}else if (billType == EnumBillAllType.RENT_BUSSINESS_MANAGE) {
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.updateTenantInfo(wxMerchant);
wxBillRentManage.setFloorForRule(wxMerchant.getFloorForRule());
wxBillRentManage.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillRentManage.setBuilding(wxMerchant.getBuilding());
wxBillRentManage.setFloor(wxMerchant.getFloor());
wxBillRentManage.setStarttime(wxMerchant.getStarttime());
wxBillRentManage.setEndtime(wxMerchant.getEndtime());
wxBillRentManage.setRentShopType(wxMerchant.getType());
wxBillRentManage.setMerchantName(wxMerchant.getName());
wxBillRentManage.setManageFeeType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode());
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillRentManageService.listAsPage(wxBillRentManage, pageNum, pageSize);
}else if (billType == EnumBillAllType.RENT_OPERATION_MANAGE) {
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.updateTenantInfo(wxMerchant);
wxBillRentManage.setFloorForRule(wxMerchant.getFloorForRule());
wxBillRentManage.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillRentManage.setBuilding(wxMerchant.getBuilding());
wxBillRentManage.setFloor(wxMerchant.getFloor());
wxBillRentManage.setStarttime(wxMerchant.getStarttime());
wxBillRentManage.setEndtime(wxMerchant.getEndtime());
wxBillRentManage.setRentShopType(wxMerchant.getType());
wxBillRentManage.setMerchantName(wxMerchant.getName());
wxBillRentManage.setManageFeeType(EnumBillAllType.RENT_OPERATION_MANAGE.getCode());
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillRentManageService.listAsPage(wxBillRentManage, pageNum, pageSize);
}else if (billType == EnumBillAllType.RENT_DEPOSIT) {
WxBillDeposit wxBillDeposit = new WxBillDeposit();
wxBillDeposit.updateTenantInfo(wxMerchant);
wxBillDeposit.setFloorForRule(wxMerchant.getFloorForRule());
wxBillDeposit.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillDeposit.setBuilding(wxMerchant.getBuilding());
wxBillDeposit.setFloor(wxMerchant.getFloor());
wxBillDeposit.setStarttime(wxMerchant.getStarttime());
wxBillDeposit.setEndtime(wxMerchant.getEndtime());
wxBillDeposit.setRentShopType(wxMerchant.getType());
wxBillDeposit.setMerchantName(wxMerchant.getName());
updateQueryParm(wxMerchant, wxBillDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillRentDepositService.listAsPage(wxBillDeposit, pageNum, pageSize);
}else if (billType == EnumBillAllType.PROPERTY) {
WxBillProperty wxBillProperty = new WxBillProperty();
wxBillProperty.updateTenantInfo(wxMerchant);
wxBillProperty.setFloorForRule(wxMerchant.getFloorForRule());
wxBillProperty.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillProperty.setBuilding(wxMerchant.getBuilding());
wxBillProperty.setFloor(wxMerchant.getFloor());
wxBillProperty.setStarttime(wxMerchant.getStarttime());
wxBillProperty.setEndtime(wxMerchant.getEndtime());
wxBillProperty.setRentShopType(wxMerchant.getType());
wxBillProperty.setMerchantName(wxMerchant.getName());
updateQueryParm(wxMerchant, wxBillProperty,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillPropertyService.listAsPage(wxBillProperty, pageNum, pageSize);
}else if (billType == EnumBillAllType.PROPERTY_DEPOSIT) {
WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit();
wxBillPropertyDeposit.updateTenantInfo(wxMerchant);
wxBillPropertyDeposit.setFloorForRule(wxMerchant.getFloorForRule());
wxBillPropertyDeposit.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillPropertyDeposit.setBuilding(wxMerchant.getBuilding());
wxBillPropertyDeposit.setFloor(wxMerchant.getFloor());
wxBillPropertyDeposit.setStarttime(wxMerchant.getStarttime());
wxBillPropertyDeposit.setEndtime(wxMerchant.getEndtime());
wxBillPropertyDeposit.setRentShopType(wxMerchant.getType());
wxBillPropertyDeposit.setMerchantName(wxMerchant.getName());
updateQueryParm(wxMerchant, wxBillPropertyDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillPropertyDepositService.listAsPage(wxBillPropertyDeposit, pageNum, pageSize);
}else if (billType == EnumBillAllType.DAILY) {
WxBillDaily wxBillDaily = new WxBillDaily();
wxBillDaily.updateTenantInfo(wxMerchant);
wxBillDaily.setFloorForRule(wxMerchant.getFloorForRule());
wxBillDaily.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillDaily.setBuilding(wxMerchant.getBuilding());
wxBillDaily.setFloor(wxMerchant.getFloor());
wxBillDaily.setStarttime(wxMerchant.getStarttime());
wxBillDaily.setEndtime(wxMerchant.getEndtime());
wxBillDaily.setRentShopType(wxMerchant.getType());
wxBillDaily.setMerchantName(wxMerchant.getName());
updateQueryParm(wxMerchant, wxBillDaily,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize);
}else if (billType == EnumBillAllType.OTHER) {
WxBillOther wxBillOther = new WxBillOther();
wxBillOther.updateTenantInfo(wxMerchant);
wxBillOther.setFloorForRule(wxMerchant.getFloorForRule());
wxBillOther.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillOther.setBuilding(wxMerchant.getBuilding());
wxBillOther.setFloor(wxMerchant.getFloor());
wxBillOther.setStarttime(wxMerchant.getStarttime());
wxBillOther.setEndtime(wxMerchant.getEndtime());
wxBillOther.setRentShopType(wxMerchant.getType());
wxBillOther.setMerchantName(wxMerchant.getName());
updateQueryParm(wxMerchant, wxBillOther,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize);
}else if (billType == EnumBillAllType.OTHER_DEPOSIT) {
WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit();
wxBillOtherDeposit.updateTenantInfo(wxMerchant);
wxBillOtherDeposit.setFloorForRule(wxMerchant.getFloorForRule());
wxBillOtherDeposit.setBusinessForRule(wxMerchant.getBusinessForRule());
wxBillOtherDeposit.setBuilding(wxMerchant.getBuilding());
wxBillOtherDeposit.setFloor(wxMerchant.getFloor());
wxBillOtherDeposit.setStarttime(wxMerchant.getStarttime());
wxBillOtherDeposit.setEndtime(wxMerchant.getEndtime());
wxBillOtherDeposit.setRentShopType(wxMerchant.getType());
wxBillOtherDeposit.setMerchantName(wxMerchant.getName());
updateQueryParm(wxMerchant, wxBillOtherDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
return wxBillOtherDepositService.listAsPage(wxBillOtherDeposit, pageNum, pageSize);
}
return null;
}
public WxBillSum getBillSum(EnumBillAllType billType,WxMerchant wxMerchant,Date starttime, Date enttime) {
if (billType == EnumBillAllType.RENT) {
return this.getBillRentSum(wxMerchant, starttime, enttime);
}else if (billType == EnumBillAllType.RENT_BUSSINESS_MANAGE) {
return this.getBillRentManageSum(wxMerchant, starttime, enttime, EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE);
}else if (billType == EnumBillAllType.RENT_OPERATION_MANAGE) {
return this.getBillRentManageSum(wxMerchant, starttime, enttime, EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE);
}else if (billType == EnumBillAllType.RENT_DEPOSIT) {
return this.getBillDepositSum(wxMerchant, starttime, enttime);
}else if (billType == EnumBillAllType.PROPERTY) {
return this.getBillPropertySum(wxMerchant, starttime, enttime);
}else if (billType == EnumBillAllType.PROPERTY_DEPOSIT) {
return this.getBillPropertyDepositSum(wxMerchant, starttime, enttime);
}else if (billType == EnumBillAllType.DAILY) {
return this.getBillDailySum(wxMerchant, starttime, enttime, null);
}else if (billType == EnumBillAllType.OTHER) {
return this.getBillOtherSum(wxMerchant, starttime, enttime);
}else if (billType == EnumBillAllType.OTHER_DEPOSIT) {
return this.getBillOtherDepositSum(wxMerchant, starttime, enttime);
}
return null;
}
}

Ładowanie…
Anuluj
Zapisz