winter 1 год назад
Родитель
Сommit
6cecf22e67
2 измененных файлов: 48 добавлений и 104 удалений
  1. +28
    -84
      mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java
  2. +20
    -20
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java

+ 28
- 84
mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java Просмотреть файл

@@ -18,6 +18,7 @@ import com.iformall.enums.EnumBillUpdateType;
import com.iformall.enums.EnumFilterSettle;
import com.iformall.enums.EnumFlowKey;
import com.iformall.enums.EnumMerchantStatus;
import com.iformall.enums.EnumYesOrNo;
import com.iformall.service.SysConfigService;
import com.iformall.service.WxBillAllService;
import com.iformall.service.WxBillSettleService;
@@ -88,54 +89,30 @@ public class WxBillController extends BaseController {
@GetMapping("notifyList")
public ResultData notifyList(@ModelAttribute WxMerchant wxMerchant) {
wxMerchant.setId(this.getLoginBUser().getMerchantId());
return new ResultData(billAllHelper.getBillNotifyList(wxMerchant));
return new ResultData(billAllHelper.getBillNotifyList(wxMerchant,EnumYesOrNo.YES.getCode()));
}
private Integer getOweBillBeforeDays() {
SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo());
Integer oweBillBeforeDays = 0 ;
if (null != config && null != config.getConfigItemValue()) {
oweBillBeforeDays = Integer.parseInt(config.getConfigItemValue());
}
return oweBillBeforeDays;
}
private Integer getNearBillBeforeDays() {
SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo());
Integer nearBillBeforeDays = Constant.bill_near_default_days ;
if (null != lqconfig && null != lqconfig.getConfigItemValue()) {
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue());
}
return nearBillBeforeDays;
}

/**
* 欠缴账单统计-红灯区
* 欠缴账单列表
* @param wxBillAll
* @param pageNum
* @param pageSize
* @return
*/
@GetMapping("oweBillHot")
public ResultData oweBillHot() {
return new ResultData(getHots(null));
}
//临期
@GetMapping("nearBillHot")
public ResultData nearBillHot() {
return new ResultData(getHots(getNearBillBeforeDays()));
@GetMapping("oweBillList")
public ResultData oweBillList(@ModelAttribute WxMerchant wxMerchant) {
wxMerchant.setId(this.getLoginBUser().getMerchantId());
wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays());
return new ResultData(billAllHelper.getBillNotifyList(wxMerchant,null));
}
private List<WxBillHotNotify> getHots(Integer nearBillBeforeDays) {
WxMerchant wxMerchant = new WxMerchant();
wxMerchant.updateTenantInfo(getTenantInfo());
wxMerchant.setId(this.getLoginBUser().getMerchantId());
wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays());
wxMerchant.setNearBillBeforeDays(nearBillBeforeDays);
return billAllHelper.getHotNotify(wxMerchant);
private Integer getOweBillBeforeDays() {
SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo());
Integer oweBillBeforeDays = 0 ;
if (null != config && null != config.getConfigItemValue()) {
oweBillBeforeDays = Integer.parseInt(config.getConfigItemValue());
}
return oweBillBeforeDays;
}
/**
@@ -145,55 +122,22 @@ public class WxBillController extends BaseController {
* @param pageSize
* @return
*/
@GetMapping("oweBillList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
public ResultData oweBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) {
if (null == billType) {
return new ResultData(Result.ERROR,"请选择分类");
}
EnumBillAllType btype;
if (billType.intValue() == Constant.bill_all_type_manage_fee) {
btype = EnumBillAllType.RENT_BUSSINESS_MANAGE;
}else {
btype = EnumBillAllType.getEnum(billType);
if (null == btype) {
return new ResultData(Result.ERROR,"分类非法");
}
}
wxMerchant.setId(this.getLoginBUser().getMerchantId());
return new ResultData(getBillList(wxMerchant, btype, null, pageNum, pageSize));
}
@GetMapping("nearBillList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
public ResultData nearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) {
if (null == billType) {
return new ResultData(Result.ERROR,"请选择分类");
}
EnumBillAllType btype;
if (billType.intValue() == Constant.bill_all_type_manage_fee) {
btype = EnumBillAllType.RENT_BUSSINESS_MANAGE;
}else {
btype = EnumBillAllType.getEnum(billType);
if (null == btype) {
return new ResultData(Result.ERROR,"分类非法");
}
}
public ResultData nearBillList(@ModelAttribute WxMerchant wxMerchant) {
wxMerchant.setId(this.getLoginBUser().getMerchantId());
return new ResultData(getBillList(wxMerchant, btype, getNearBillBeforeDays(), pageNum, pageSize));
wxMerchant.setNearBillBeforeDays(getNearBillBeforeDays());
return new ResultData(billAllHelper.getBillNotifyList(wxMerchant,null));
}
private PageInfo getBillList(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays, Integer pageNum, Integer pageSize) {
wxMerchant.updateTenantInfo(getTenantInfo());
wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays());
wxMerchant.setNearBillBeforeDays(nearBillBeforeDays);
return billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize);
}
private Integer getNearBillBeforeDays() {
SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo());
Integer nearBillBeforeDays = Constant.bill_near_default_days ;
if (null != lqconfig && null != lqconfig.getConfigItemValue()) {
nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue());
}
return nearBillBeforeDays;
}

@ApiOperation("分类查询账单")
@GetMapping("listBill")
public ResultData listBill(@ModelAttribute WxMerchant wxMerchant,Integer billTypeValue, Integer pageNum, Integer pageSize) {


+ 20
- 20
mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java Просмотреть файл

@@ -585,41 +585,41 @@ public class WxBillAllHelper {
return null;
}
public List<WxBillNotify> getBillNotifyList(WxMerchant wxMerchant) {
public List<WxBillNotify> getBillNotifyList(WxMerchant wxMerchant,Integer notifyed) {
List<WxBillNotify> retList = new ArrayList<WxBillNotify>();
List<WxBillNotify> rentList = getBillNotifyList(EnumBillAllType.RENT,wxMerchant);
List<WxBillNotify> rentList = getBillNotifyList(EnumBillAllType.RENT,wxMerchant,notifyed);
if (null != rentList) {
retList.addAll(rentList);
}
List<WxBillNotify> rentBussinessList = getBillNotifyList(EnumBillAllType.RENT_BUSSINESS_MANAGE,wxMerchant);
List<WxBillNotify> rentBussinessList = getBillNotifyList(EnumBillAllType.RENT_BUSSINESS_MANAGE,wxMerchant,notifyed);
if (null != rentBussinessList) {
retList.addAll(rentBussinessList);
}
List<WxBillNotify> rentOperationList = getBillNotifyList(EnumBillAllType.RENT_OPERATION_MANAGE,wxMerchant);
List<WxBillNotify> rentOperationList = getBillNotifyList(EnumBillAllType.RENT_OPERATION_MANAGE,wxMerchant,notifyed);
if (null != rentOperationList) {
retList.addAll(rentOperationList);
}
List<WxBillNotify> rentDepositList = getBillNotifyList(EnumBillAllType.RENT_DEPOSIT,wxMerchant);
List<WxBillNotify> rentDepositList = getBillNotifyList(EnumBillAllType.RENT_DEPOSIT,wxMerchant,notifyed);
if (null != rentDepositList) {
retList.addAll(rentDepositList);
}
List<WxBillNotify> propertyList = getBillNotifyList(EnumBillAllType.PROPERTY,wxMerchant);
List<WxBillNotify> propertyList = getBillNotifyList(EnumBillAllType.PROPERTY,wxMerchant,notifyed);
if (null != propertyList) {
retList.addAll(propertyList);
}
List<WxBillNotify> propertyDepositList = getBillNotifyList(EnumBillAllType.PROPERTY_DEPOSIT,wxMerchant);
List<WxBillNotify> propertyDepositList = getBillNotifyList(EnumBillAllType.PROPERTY_DEPOSIT,wxMerchant,notifyed);
if (null != propertyDepositList) {
retList.addAll(propertyDepositList);
}
List<WxBillNotify> dailyList = getBillNotifyList(EnumBillAllType.DAILY,wxMerchant);
List<WxBillNotify> dailyList = getBillNotifyList(EnumBillAllType.DAILY,wxMerchant,notifyed);
if (null != dailyList) {
retList.addAll(dailyList);
}
List<WxBillNotify> otherList = getBillNotifyList(EnumBillAllType.OTHER,wxMerchant);
List<WxBillNotify> otherList = getBillNotifyList(EnumBillAllType.OTHER,wxMerchant,notifyed);
if (null != otherList) {
retList.addAll(otherList);
}
List<WxBillNotify> otherDepositList = getBillNotifyList(EnumBillAllType.OTHER_DEPOSIT,wxMerchant);
List<WxBillNotify> otherDepositList = getBillNotifyList(EnumBillAllType.OTHER_DEPOSIT,wxMerchant,notifyed);
if (null != otherDepositList) {
retList.addAll(otherDepositList);
}
@@ -642,11 +642,11 @@ public class WxBillAllHelper {
return retList;
}
private List<WxBillNotify> getBillNotifyList(EnumBillAllType billType,WxMerchant wxMerchant) {
private List<WxBillNotify> getBillNotifyList(EnumBillAllType billType,WxMerchant wxMerchant,Integer notifyed) {
if (billType == EnumBillAllType.RENT) {
WxBillRent wxBillRent = new WxBillRent();
updateQueryParm(wxMerchant, wxBillRent,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRent.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillRent.setNotifyed(notifyed);
wxBillRent.setBillType(EnumBillAllType.RENT.getCode());
wxBillRent.setBillTypeName(EnumBillAllType.RENT.getMessage());
wxBillRent.setSortColumns("starttime asc");
@@ -655,7 +655,7 @@ public class WxBillAllHelper {
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRentManage.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillRentManage.setNotifyed(notifyed);
wxBillRentManage.setBillType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode());
wxBillRentManage.setBillTypeName(EnumBillAllType.RENT_BUSSINESS_MANAGE.getMessage());
wxBillRentManage.setSortColumns("starttime asc");
@@ -664,7 +664,7 @@ public class WxBillAllHelper {
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRentManage.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillRentManage.setNotifyed(notifyed);
wxBillRentManage.setBillType(EnumBillAllType.RENT_OPERATION_MANAGE.getCode());
wxBillRentManage.setBillTypeName(EnumBillAllType.RENT_OPERATION_MANAGE.getMessage());
wxBillRentManage.setSortColumns("starttime asc");
@@ -672,7 +672,7 @@ public class WxBillAllHelper {
}else if (billType == EnumBillAllType.RENT_DEPOSIT) {
WxBillDeposit wxBillDeposit = new WxBillDeposit();
updateQueryParm(wxMerchant, wxBillDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillDeposit.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillDeposit.setNotifyed(notifyed);
wxBillDeposit.setBillType(EnumBillAllType.RENT_DEPOSIT.getCode());
wxBillDeposit.setBillTypeName(EnumBillAllType.RENT_DEPOSIT.getMessage());
wxBillDeposit.setSortColumns("starttime asc");
@@ -680,7 +680,7 @@ public class WxBillAllHelper {
}else if (billType == EnumBillAllType.PROPERTY) {
WxBillProperty wxBillProperty = new WxBillProperty();
updateQueryParm(wxMerchant, wxBillProperty,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillProperty.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillProperty.setNotifyed(notifyed);
wxBillProperty.setBillType(EnumBillAllType.PROPERTY.getCode());
wxBillProperty.setBillTypeName(EnumBillAllType.PROPERTY.getMessage());
wxBillProperty.setSortColumns("starttime asc");
@@ -688,7 +688,7 @@ public class WxBillAllHelper {
}else if (billType == EnumBillAllType.PROPERTY_DEPOSIT) {
WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit();
updateQueryParm(wxMerchant, wxBillPropertyDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillPropertyDeposit.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillPropertyDeposit.setNotifyed(notifyed);
wxBillPropertyDeposit.setBillType(EnumBillAllType.PROPERTY_DEPOSIT.getCode());
wxBillPropertyDeposit.setBillTypeName(EnumBillAllType.PROPERTY_DEPOSIT.getMessage());
wxBillPropertyDeposit.setSortColumns("starttime asc");
@@ -696,7 +696,7 @@ public class WxBillAllHelper {
}else if (billType == EnumBillAllType.DAILY) {
WxBillDaily wxBillDaily = new WxBillDaily();
updateQueryParm(wxMerchant, wxBillDaily,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillDaily.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillDaily.setNotifyed(notifyed);
wxBillDaily.setBillType(EnumBillAllType.DAILY.getCode());
wxBillDaily.setBillTypeName(EnumBillAllType.DAILY.getMessage());
wxBillDaily.setSortColumns("starttime asc");
@@ -704,7 +704,7 @@ public class WxBillAllHelper {
}else if (billType == EnumBillAllType.OTHER) {
WxBillOther wxBillOther = new WxBillOther();
updateQueryParm(wxMerchant, wxBillOther,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillOther.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillOther.setNotifyed(notifyed);
wxBillOther.setBillType(EnumBillAllType.OTHER.getCode());
wxBillOther.setBillTypeName(EnumBillAllType.OTHER.getMessage());
wxBillOther.setSortColumns("starttime asc");
@@ -712,7 +712,7 @@ public class WxBillAllHelper {
}else if (billType == EnumBillAllType.OTHER_DEPOSIT) {
WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit();
updateQueryParm(wxMerchant, wxBillOtherDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillOtherDeposit.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillOtherDeposit.setNotifyed(notifyed);
wxBillOtherDeposit.setBillType(EnumBillAllType.OTHER_DEPOSIT.getCode());
wxBillOtherDeposit.setBillTypeName(EnumBillAllType.OTHER_DEPOSIT.getMessage());
wxBillOtherDeposit.setSortColumns("starttime asc");


Загрузка…
Отмена
Сохранить