From 215dbccc450efe9b02a540b327a5b7e3d513586a Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 3 Aug 2024 15:39:59 +0800 Subject: [PATCH] fix --- .../controller/mem/ImportTemplateTask.java | 1 - .../controller/rent/WxBillAllController.java | 1 - .../rent/WxBillSettleController.java | 1 - .../iformall/controller/WxBillController.java | 2 - .../controller/WxMallAdminController.java | 2 - .../schedule/BillNotificationSchedule.java | 14 +- .../com/iformall/domain/vo/WxBillAll.java | 169 -- .../com/iformall/mapper/WxBillAllMapper.java | 80 - .../iformall/service/WxBillAllService.java | 95 - .../service/impl/DataTowerServiceImpl.java | 4 - .../service/impl/WxBillAllServiceImpl.java | 2265 ----------------- .../service/impl/WxChartServiceImpl.java | 2 - .../service/impl/WxFlowServiceImpl.java | 65 +- .../service/impl/WxPayBillServiceImpl.java | 9 - .../main/resources/mapper/WxBillAllMapper.xml | 1068 -------- 15 files changed, 35 insertions(+), 3743 deletions(-) delete mode 100644 mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java delete mode 100644 mallinkService/src/main/java/com/iformall/mapper/WxBillAllMapper.java delete mode 100644 mallinkService/src/main/java/com/iformall/service/WxBillAllService.java delete mode 100644 mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java delete mode 100644 mallinkService/src/main/resources/mapper/WxBillAllMapper.xml diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/mem/ImportTemplateTask.java b/mallinkAdmin/src/main/java/com/iformall/controller/mem/ImportTemplateTask.java index 3c10a75ef..b1e3713a1 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/mem/ImportTemplateTask.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/mem/ImportTemplateTask.java @@ -14,7 +14,6 @@ import com.iformall.domain.vo.WxBillExcelTemplate; import com.iformall.domain.vo.WxBillExcelTemplateOther; import com.iformall.enums.EnumMerchantStatus; import com.iformall.mapper.WxMerchantMapper; -import com.iformall.service.WxBillAllService; import com.iformall.service.WxCUserBasicInfoService; import com.iformall.service.WxTagsService; import org.apache.commons.lang3.StringUtils; diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java index fc1afae16..f439b989f 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java @@ -17,7 +17,6 @@ import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxEnergyFees; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxUserDataRule; -import com.iformall.domain.vo.WxBillAll; import com.iformall.domain.vo.WxBillBad; import com.iformall.domain.vo.WxBillExcelTemplate; import com.iformall.domain.vo.WxBillHotNotify; diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java index 6ae99f71f..b269c409a 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java @@ -9,7 +9,6 @@ import com.iformall.domain.po.WxBillSettle; import com.iformall.domain.po.WxBillSettleRecord; import com.iformall.domain.po.base.BaseEntity; import com.iformall.enums.EnumFilterSettle; -import com.iformall.service.WxBillAllService; import com.iformall.service.WxBillSettleRecordService; import com.iformall.service.WxBillSettleService; import io.swagger.annotations.ApiImplicitParam; diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java index 15db47683..b6fd03728 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java @@ -14,7 +14,6 @@ import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxMerchantBUser; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxUserDataRule; -import com.iformall.domain.vo.WxBillAll; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.enums.EnumBillAllType; import com.iformall.enums.EnumBillOweOrNearType; @@ -26,7 +25,6 @@ import com.iformall.enums.EnumMerchantStatus; import com.iformall.enums.EnumYesOrNo; import com.iformall.service.SysConfigService; import com.iformall.service.WxBillActionService; -import com.iformall.service.WxBillAllService; import com.iformall.service.WxBillSettleService; import com.iformall.service.WxFlowService; import com.iformall.service.WxMerchantService; diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxMallAdminController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxMallAdminController.java index b22959ad0..cf5303484 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxMallAdminController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxMallAdminController.java @@ -20,7 +20,6 @@ import com.iformall.domain.po.WxMerchantBUser; import com.iformall.domain.po.WxShop; import com.iformall.domain.po.WxUserDataRule; import com.iformall.domain.po.base.TenantEntity; -import com.iformall.domain.vo.WxBillAll; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.domain.vo.WxCouponOrderSumVo; @@ -44,7 +43,6 @@ import com.iformall.service.MallUserRoleService; import com.iformall.service.SysConfigService; import com.iformall.service.WxAllBillService; import com.iformall.service.WxBillActionService; -import com.iformall.service.WxBillAllService; import com.iformall.service.WxBillSettleService; import com.iformall.service.WxChartDataService; import com.iformall.service.WxCouponOrderService; diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java index 7c50d22af..b0206f96d 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java @@ -3,9 +3,7 @@ package com.iformall.schedule; import com.alibaba.fastjson.JSONObject; import com.iformall.domain.po.msg.WxMsgRecord; import com.iformall.enums.*; -import com.iformall.mapper.WxBillAllMapper; import com.iformall.mq.MqBaseProducer; -import com.iformall.service.WxBillAllService; import org.apache.commons.collections.map.HashedMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,15 +26,9 @@ public class BillNotificationSchedule { private final Logger logger = LoggerFactory.getLogger(this.getClass()); - @Autowired - private WxBillAllMapper wxBillAllMapper; - @Autowired private MqBaseProducer mqBaseProducer; - @Autowired - WxBillAllService wxBillAllService; - // /** // * 每天9点执行 // */ @@ -53,7 +45,8 @@ public class BillNotificationSchedule { private void sendOweBill() { logger.info("查询欠缴账单数据"); - List> oweBillList = wxBillAllMapper.getOweBill(); + //List> oweBillList = wxBillAllMapper.getOweBill(); + List> oweBillList = null; for (Map bill : oweBillList) { String tenantId = bill.get("tenantId").toString(); String parentTenantId = bill.get("parentTenantId").toString(); @@ -82,7 +75,8 @@ public class BillNotificationSchedule { private void sendWaitPayBill() { logger.info("查询待缴账单数据"); - List> waitBillList = wxBillAllMapper.getWaitPayBill(); + //List> waitBillList = wxBillAllMapper.getWaitPayBill(); + List> waitBillList = null; for (Map bill : waitBillList) { String tenantId = bill.get("tenantId").toString(); String parentTenantId = bill.get("parentTenantId").toString(); diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java deleted file mode 100644 index 23634c6c1..000000000 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.iformall.domain.vo; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.iformall.common.SortColumn; -import com.iformall.domain.po.base.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.util.List; - -/** - * @author gongbiao - */ -@Data -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = true) -public class WxBillAll extends TenantEntity { - - @io.swagger.annotations.ApiModelProperty(value="appId",name="appId") - private String appId; - - @io.swagger.annotations.ApiModelProperty(value="商户名称",name="merchantName") - private String merchantName; - - @io.swagger.annotations.ApiModelProperty(value="账单类型",name="billTypeValue") - private Integer billTypeValue; - - @io.swagger.annotations.ApiModelProperty(value="状态",name="status") - private Integer status; - - @io.swagger.annotations.ApiModelProperty(value="日期",name="month") - private String month; - - @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") - private String starttime; - - @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") - private String endtime; - - @io.swagger.annotations.ApiModelProperty(value="商户Id",name="merchantId") - private Long merchantId; - - @TableField(exist = false) - private String statusListStr; - @TableField(exist = false) - private String typeListStr; - - @io.swagger.annotations.ApiModelProperty(value="多个状态",name="statusList") - private List statusList; - - @io.swagger.annotations.ApiModelProperty(value="多个账单类型",name="typeList") - private List typeList; - - @io.swagger.annotations.ApiModelProperty(value="页码",name="pageIndex") - private Integer pageIndex; - - @io.swagger.annotations.ApiModelProperty(value="条数",name="pageSize") - private Integer pageSize; - - @io.swagger.annotations.ApiModelProperty(value="id",name="id") - private Long id; - - @io.swagger.annotations.ApiModelProperty(value = "租赁店铺类型", name = "rentShopType") - private Integer rentShopType; - - //费用收缴数据 - @io.swagger.annotations.ApiModelProperty(value = "欠缴租金", name = "rentOwe") - @SortColumn(column = "rentOwe") - private Integer rentOwe; - @io.swagger.annotations.ApiModelProperty(value = "欠缴物业费", name = "propertyOwe") - @SortColumn(column = "propertyOwe") - private Integer propertyOwe; - @io.swagger.annotations.ApiModelProperty(value = "欠缴押金", name = "depositOwe") - @SortColumn(column = "depositOwe") - private Integer depositOwe; - @io.swagger.annotations.ApiModelProperty(value = "欠缴其他费用", name = "otherOwe") - @SortColumn(column = "otherOwe") - private Integer otherOwe; - @io.swagger.annotations.ApiModelProperty(value = "欠缴总额", name = "totalOwe") - @SortColumn(column = "totalOwe") - private Integer totalOwe; - - private List billTypeList; - private List merchantIdList; - - @TableField(exist = false) - @SortColumn(column = "rentReceivePay") - private Integer rentReceivePay; - @TableField(exist = false) - @SortColumn(column = "propertyReceivePay") - private Integer propertyReceivePay; - @TableField(exist = false) - @SortColumn(column = "depositReceivePay") - private Integer depositReceivePay; - @TableField(exist = false) - @SortColumn(column = "otherReceivePay") - private Integer otherReceivePay; - @TableField(exist = false) - @SortColumn(column = "totalReceivePay") - private Integer totalReceivePay; - @TableField(exist = false) - @SortColumn(column = "shopNumber") - private String shopNumber; - @TableField(exist = false) - @SortColumn(column = "receivePay") - private Integer receivePay; - @TableField(exist = false) - @SortColumn(column = "pay") - private Integer pay; - @TableField(exist = false) - @SortColumn(column = "owe") - private Integer owe; - @TableField(exist = false) - private String receiveDate; - @TableField(exist = false) - @SortColumn(column = "payDate") - private String payDate; - - - @TableField(exist = false) - @io.swagger.annotations.ApiModelProperty(value = "过滤已收金额1过滤", name = "filterHasPay") - private Integer filterHasPay; - - - @io.swagger.annotations.ApiModelProperty(value = "金额旧值", name = "oldPrice") - private Long oldPrice; - @io.swagger.annotations.ApiModelProperty(value = "金额新值", name = "newPrice") - private Long newPrice; - @TableField(exist = false) - @io.swagger.annotations.ApiModelProperty(value = "B端上传的小票图片", name = "payImg") - private String payImg; - - //滞纳金 - @TableField(exist = false) - private Long oldLatePrice; - @TableField(exist = false) - private Long newLatePrice; - - @TableField(exist = false) - @SortColumn(column = "payOut") - private Integer payOut; - - @TableField(exist = false) - private Integer balance; - - - @TableField(exist = false) - @io.swagger.annotations.ApiModelProperty(value = "冻结状态0正常1冻结", name = "freeze") - private Integer freeze; - - @io.swagger.annotations.ApiModelProperty(value = "多个类型", name = "typeStr") - private String typeStr; - - - @TableField(exist = false) - private Integer servicePayRate; - - @TableField(exist = false) - private Integer limitStart; - @TableField(exist = false) - private Integer limitEnd; - - @TableField(exist = false) - private Integer manageFeeType; - @TableField(exist = false) - private String billTypeName; - -} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillAllMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillAllMapper.java deleted file mode 100644 index 167d956b9..000000000 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillAllMapper.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.iformall.mapper; - -import com.iformall.domain.vo.WxBillAll; -import com.iformall.domain.vo.WxBillAllVo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * @author gongbiao - */ -public interface WxBillAllMapper { - - - List listRentBill(WxBillAll record); - List listRentDepositBill(WxBillAll record); - List listPropertyBill(WxBillAll record); - List listPropertyDepositBill(WxBillAll record); - List listDailyBill(WxBillAll record); - List listOtherBill(WxBillAll record); - List listOtherDepositBill(WxBillAll record); - List listRentManageBill(WxBillAll record); - - Map queryOweInfo(WxBillAll record); - - Map queryPaidInfo(WxBillAll record); - - List> listRentBillData(WxBillAll wxBillAll); - List> listRentManageBillData(WxBillAll wxBillAll); - List> listRentDepositBillData(WxBillAll wxBillAll); - List> listPropertyBillData(WxBillAll wxBillAll); - List> listPropertyDepositBillData(WxBillAll wxBillAll); - List> listDailyBillData(WxBillAll wxBillAll); - List> listOtherBillData(WxBillAll wxBillAll); - List> listOtherDepositBillData(WxBillAll wxBillAll); - List> listSettleBillData(WxBillAll wxBillAll); - - Map detailRentBillData(@Param("id")Long id); - Map detailRentDepositBillData(@Param("id")Long id); - Map detailPropertyBillData(@Param("id")Long id); - Map detailPropertyDepositBillData(@Param("id")Long id); - Map detailDailyBillData(@Param("id")Long id); - Map detailOtherBillData(@Param("id")Long id); - Map detailOtherDepositBillData(@Param("id")Long id); - - List> getWaitPayBill(); - - List> getOweBill(); - - /** - * +group by账单类型 - * @return - */ - List> getOweBillForEmail(); - - /** - * +group by账单类型 - * @return - */ - List> getWaitPayBillForEmail(); - - /** - * 欠缴商户分页列表 - * @return - */ - List> getOweBillAsPage(WxBillAll record); - - /** - * 应收和承付商户分页列表 - * - * @return - */ - List> getReceiveAndPayBillAsPage(WxBillAll record); - - Map getReceiveAndPayBillDetail(WxBillAll record); - - List allDepositList(WxBillAll wxBillAll); - -} diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillAllService.java b/mallinkService/src/main/java/com/iformall/service/WxBillAllService.java deleted file mode 100644 index 7186b0b47..000000000 --- a/mallinkService/src/main/java/com/iformall/service/WxBillAllService.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.iformall.service; - -import com.github.pagehelper.PageInfo; -import com.iformall.common.ResultData; -import com.iformall.domain.po.MallUserInfo; -import com.iformall.domain.po.WxBillSettle; -import com.iformall.domain.po.WxMerchant; -import com.iformall.domain.vo.WxBillAll; -import com.iformall.domain.vo.WxBillAllVo; -import com.iformall.domain.vo.WxBillExcelTemplate; -import com.iformall.domain.vo.WxBillExcelTemplateOther; -import com.iformall.enums.EnumBillAction; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - -/** - * @author gongbiao - */ -@Deprecated -public interface WxBillAllService { - -// List allDepositList(WxBillAll wxBillAll); -// -// Map listAsPage(WxBillAll wxBillAll, Integer pageNum, Integer pageSize); -// -// //List> listBillOweAndWaitPay(WxBillAll wxBillAll); -// -// ResultData pageListBill(WxBillAll wxBillAll,WxMerchant wxMerchant,boolean hasShop,boolean hasPayBill,boolean hasReceivePay); -// List> listBill(WxBillAll wxBillAll,WxMerchant wxMerchant,boolean hasSet,boolean hasShop,boolean hasPayBill,boolean hasReceivePay); -// -// Map detail(Long id,Integer type); -// -// void updateBill(Map bill); -// -// void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll); -// -// //Object getBillInfo(WxBillAll wxBillAll); -// -// Long hasOweBill(Long contractId, Integer type); -// -// /** -// * 发送待缴通知邮件 -// */ -// void sendWaitPayBillEmail(); -// -// /** -// * 发送欠缴通知邮件 -// */ -// void sendOweBillForEmail(); -// -// /** -// * 欠缴商户分页列表 -// * -// * @return -// */ -// Map getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize); -// -// -// /** -// * 应收和承付商户分页列表 -// * -// * @return -// */ -// PageInfo getReceiveAndPayBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize); -// -// void exportReceiveAndPayBillAsPage(WxBillAll record, HttpServletRequest request, HttpServletResponse response); -// -// void exportOweMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response); -// -// void exportWaitMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response); -// -// void updateBillStatus(WxBillAll record); -// -// void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response); -// -// void exportSettleBill(WxBillSettle wxBillSettle, HttpServletRequest request, HttpServletResponse response); -// -// ResultData updateReceivePay(WxBillAll wxBillAll, MallUserInfo user,boolean forcePaid); -// -// void addBillAction(EnumBillAction billAction, Long billId, Long oldPrice, Long newPrice, MallUserInfo mallUserInfo); -// -// void exportTemplate(WxBillExcelTemplate wxBillExcelTemplate, HttpServletRequest request, HttpServletResponse response); -// -// void importBill(String importKey, WxBillExcelTemplate bill, MallUserInfo user); -// -// void importBillOther(String importKey, WxBillExcelTemplateOther bill, MallUserInfo user); -// -// Double calcuteSettleBillReceivePay(Long settleId); -// -// void createBillSettleSchedule(Long settleId,Double settleReceivePay); - -} \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java index b0737c995..ad3027712 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java @@ -9,7 +9,6 @@ import com.iformall.common.ResultData; import com.iformall.domain.dto.WxCUserBasicInfoDto; import com.iformall.domain.po.*; import com.iformall.domain.po.base.TenantEntity; -import com.iformall.domain.vo.WxBillAll; import com.iformall.enums.*; import com.iformall.exception.MallinkException; import com.iformall.mapper.*; @@ -64,9 +63,6 @@ public class DataTowerServiceImpl implements DataTowerService { @Autowired WxRentContractService wxRentContractService; - @Autowired - WxBillAllMapper wxBillAllMapper; - @Autowired WxMsgConfigMapper wxMsgConfigMapper; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java deleted file mode 100644 index b46e718a3..000000000 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java +++ /dev/null @@ -1,2265 +0,0 @@ -package com.iformall.service.impl; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; -import com.iformall.common.ErrorCode; -import com.iformall.common.IdWorker; -import com.iformall.common.ResultData; -import com.iformall.domain.dto.WxMerchantDto; -import com.iformall.domain.po.*; -import com.iformall.domain.po.base.TenantEntity; -import com.iformall.domain.po.msg.MailMsg; -import com.iformall.domain.vo.*; -import com.iformall.enums.*; -import com.iformall.exception.MallinkException; -import com.iformall.mapper.*; -import com.iformall.mq.MqBaseProducer; -import com.iformall.service.*; -import com.iformall.utils.DateUtils; -import com.iformall.utils.JsonUtil; -import com.iformall.utils.PriceUtil; -import com.iformall.utils.WordUtil; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.map.HashedMap; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.util.*; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -/** - * @author gongbiao - */ -@Deprecated -@Service -public class WxBillAllServiceImpl implements WxBillAllService { - private Logger logger = LoggerFactory.getLogger(this.getClass()); - -// @Autowired -// WxBillAllMapper wxBillAllMapper; -// -// @Lazy -// @Autowired -// WxBillDailyService wxBillDailyService; -// -// @Lazy -// @Autowired -// WxBillDepositService wxBillDepositService; -// -// @Lazy -// @Autowired -// WxBillPropertyDepositService wxBillPropertyDepositService; -// -// @Lazy -// @Autowired -// WxBillPropertyService wxBillPropertyService; -// -// @Lazy -// @Autowired -// WxBillRentService wxBillRentService; -// -// @Lazy -// @Autowired -// WxBillOtherService wxBillOtherService; -// -// @Lazy -// @Autowired -// WxBillOtherDepositService wxBillOtherDepositService; -// -// @Autowired -// WxBillDailyMapper wxBillDailyMapper; -// -// @Autowired -// WxBillDepositMapper wxBillDepositMapper; -// -// @Autowired -// WxBillPropertyDepositMapper wxBillPropertyDepositMapper; -// -// @Autowired -// WxBillPropertyMapper wxBillPropertyMapper; -// -// @Autowired -// WxBillRentMapper wxBillRentMapper; -// -// @Autowired -// WxBillOtherMapper wxBillOtherMapper; -// -// @Autowired -// WxBillOtherDepositMapper wxBillOtherDepositMapper; -// -// @Autowired -// ExcelService excelService; -// -// @Autowired -// MqBaseProducer mqBaseProducer; -// -// @Lazy -// @Autowired -// WxBillActionService wxBillActionService; -// -// @Autowired -// WxMerchantBUserMapper wxMerchantBUserMapper; -// -// @Autowired -// WxMallMapper wxMallMapper; -// -// @Autowired -// WxMerchantService wxMerchantService; -// -// @Autowired -// private String fmUploadDir; -// -// @Autowired -// private WxBillSettleMapper wxBillSettleMapper; -// -// @Autowired -// private WxPayAccountBillMapper wxPayAccountBillMapper; -// -// @Autowired -// WxMerchantShopMapper wxMerchantShopMapper; -// -// @Autowired -// StringRedisTemplate stringRedisTemplate; -// -// @Lazy -// @Autowired -// WxBillSettleRecordService wxBillSettleRecordService; -// -// @Lazy -// @Autowired -// WxBillSettleService wxBillSettleService; -// -// @Autowired -// WxBillSettleRecordMapper wxBillSettleRecordMapper; -// -// @Lazy -// @Autowired -// WxPayAccountBillService wxPayAccountBillService; -// -// @Autowired -// WxBillSettleScheduleMapper wxBillSettleScheduleMapper; -// -// @Autowired -// WxShopMapper wxShopMapper; -// -// @Autowired -// WxPayBillMapper wxPayBillMapper; -// -// @Autowired -// WxMerchantMapper wxMerchantMapper; -// -// @Autowired -// WxBillRentManageMapper wxBillRentManageMapper; -// -// @Lazy -// @Autowired -// WxBillRentManageService wxBillRentManageService; -// -// @Override -// public Map listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) { -// WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(record); -// -// if (StringUtils.isNotEmpty(record.getTypeStr())) { -// List typeList = JSONArray.parseArray(record.getTypeStr(), Integer.class); -// record.setTypeList(typeList); -// } -// PageHelper.startPage(pageIndex, pageSize); -// PageInfo pageInfo = new PageInfo<>(list(record)); -// -// //手续费 = 合同应收+手续费+滞纳金 -// pageInfo.getList().stream().forEach(e -> { -// //手续费 = 合同应收+手续费+滞纳金 -// cmputeTotalMoney(wxPayAccountBill, e); -// }); -// -// Map result = new HashMap<>(); -// result.put("pageInfo", pageInfo); -// return result; -// } -// -// private List list(WxBillAll wxBillAll) { -// List retList = null; -// wxBillAll.setBillTypeValue(EnumBillQueryType.getRealType(wxBillAll.getBillTypeValue())); -// if (!StringUtils.isBlank(wxBillAll.getMerchantName())) { -// WxMerchant wxMerchantQ = new WxMerchant(); -// wxMerchantQ.setName(StringUtils.trimToNull(wxBillAll.getMerchantName())); -// List mids = wxMerchantMapper.findIdList(wxMerchantQ); -// if (null != mids && mids.size() > 0 ) { -// wxBillAll.setMerchantIdList(mids); -// } -// } -// if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT.getCode()); -// retList = wxBillAllMapper.listRentBill(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_DEPOSIT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_DEPOSIT.getCode()); -// retList = wxBillAllMapper.listRentDepositBill(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY.getCode()); -// retList = wxBillAllMapper.listPropertyBill(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY_DEPOSIT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY_DEPOSIT.getCode()); -// retList = wxBillAllMapper.listPropertyDepositBill(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.WATER_POWER_AIR.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.WATER_POWER_AIR.getCode()); -// retList = wxBillAllMapper.listDailyBill(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER.getCode()); -// retList = wxBillAllMapper.listOtherBill(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER_DEPOSIT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER_DEPOSIT.getCode()); -// retList = wxBillAllMapper.listOtherDepositBill(wxBillAll); -// }else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getCode()); -// wxBillAll.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()); -// wxBillAll.setBillTypeName(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getMessage()); -// retList = wxBillAllMapper.listRentManageBill(wxBillAll); -// }else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_OPERATING_MANAGE.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_OPERATING_MANAGE.getCode()); -// wxBillAll.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode()); -// wxBillAll.setBillTypeName(EnumBillQueryType.RENT_OPERATING_MANAGE.getMessage()); -// retList = wxBillAllMapper.listRentManageBill(wxBillAll); -// } else { -// logger.info("账单不存在"); -// } -// if (null != retList && retList.size() > 0 ){ -// for (int i = 0 ; i < retList.size(); i ++) { -// WxBillAllVo vo = retList.get(i); -// if( null!= vo.getMerchantId() ) { -// WxMerchant wxMerchantQ = new WxMerchant(); -// wxMerchantQ.setId(vo.getMerchantId()); -// List mlist = wxMerchantMapper.findIdNameList(wxMerchantQ); -// if (null != mlist && mlist.size() > 0 ) { -// vo.setMerchantName(mlist.get(0).getName()); -// } -// } -// if (null != vo.getShopId()) { -// Map param = new HashMap(); -// param.put("id", vo.getShopId()); -// Map shop = wxShopMapper.getMerchantShopByShopId(param); -// if ( null != shop) { -// vo.setShopNumber((String)shop.get("shopNumber")); -// vo.setManager((String)shop.get("manager")); -// vo.setManagerPhone((String)shop.get("managerPhone")); -// } -// } -// } -// } -// return retList; -// } -// -// public void cmputeTotalMoney(WxPayAccountBill wxPayAccountBill, WxBillAllVo e) { -//// if (e.getReceivePay() != null) { -//// if (e.getLatePayPrice() == null) { -//// e.setLatePayPrice(0L); -//// } -//// BigDecimal servicePay; -//// if (e.getServiceChargePay() != null) { -//// servicePay = new BigDecimal(e.getServiceChargePay()); -//// } else { -//// servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); -//// } -//// Long realReceivePay = servicePay.longValue() + e.getLatePayPrice() + e.getReceivePay(); -//// e.setRealReceivePay(realReceivePay); -//// e.setServiceChargePay(servicePay.intValue()); -//// if (!e.getStatus().equals(EnumBillStatus.NOT_PAID.getCode()) && -//// !e.getStatus().equals(EnumBillStatus.WAIT_PAY.getCode())) { -//// e.setOwe(0L); -//// } else { -//// e.setOwe(realReceivePay - e.getPay()); -//// } -//// } -// } -// -//// @Override -//// public List> listBillOweAndWaitPay(WxBillAll wxBillAll) { -//// //更新各账单状态 -//// //updateBillStatus(wxBillAll); -//// ArrayList statusList = new ArrayList<>(); -//// statusList.add(EnumBillRentStatus.NOT_PAID.getCode()); -//// statusList.add(EnumBillRentStatus.WAIT_PAY.getCode()); -//// wxBillAll.setStatusList(statusList); -//// return wxBillAllMapper.listData(wxBillAll); -//// } -// -// @Override -// public ResultData pageListBill(WxBillAll wxBillAll,WxMerchant wxMerchant,boolean hasShop,boolean hasPayBill,boolean hasReceivePay) { -// //更新各账单状态 -// //updateBillStatus(wxBillAll); -// PageHelper.startPage(wxBillAll.getPageIndex(), wxBillAll.getPageSize()); -// PageInfo> pageInfo = new PageInfo<>(listBill(wxBillAll, wxMerchant,true, hasShop, hasPayBill, hasReceivePay)); -// return new ResultData(pageInfo); -// } -// -// @Override -// public List> listBill(WxBillAll wxBillAll,WxMerchant wxMerchant,boolean hasSet,boolean hasShop,boolean hasPayBill,boolean hasReceivePay){ -// List> maps = null; -// //账单类型 -// wxBillAll.setBillTypeValue(EnumBillQueryType.getRealType(wxBillAll.getBillTypeValue())); -// wxBillAll.setMerchantId(wxMerchant.getId()); -// if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT.getCode()); -// maps = wxBillAllMapper.listRentBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_DEPOSIT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_DEPOSIT.getCode()); -// maps = wxBillAllMapper.listRentDepositBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY.getCode()); -// maps = wxBillAllMapper.listPropertyBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY_DEPOSIT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY_DEPOSIT.getCode()); -// maps = wxBillAllMapper.listPropertyDepositBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.WATER_POWER_AIR.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.WATER_POWER_AIR.getCode()); -// maps = wxBillAllMapper.listDailyBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER.getCode()); -// maps = wxBillAllMapper.listOtherBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER_DEPOSIT.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER_DEPOSIT.getCode()); -// maps = wxBillAllMapper.listOtherDepositBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.SETTLE.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.SETTLE.getCode()); -// maps = wxBillAllMapper.listSettleBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getCode()); -// wxBillAll.setBillTypeName(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getMessage()); -// wxBillAll.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()); -// maps = wxBillAllMapper.listRentManageBillData(wxBillAll); -// } else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_OPERATING_MANAGE.getCode())) { -// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_OPERATING_MANAGE.getCode()); -// wxBillAll.setBillTypeName(EnumBillQueryType.RENT_OPERATING_MANAGE.getMessage()); -// wxBillAll.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode()); -// maps = wxBillAllMapper.listRentManageBillData(wxBillAll); -// } else { -// logger.info("账单不存在"); -// } -// if (null != maps && hasSet) { -// for (Map map : maps) { -// -// Integer billType = ((Long) map.get("billTypeValue")).intValue(); -// if (EnumBillType.SETTLE.getCode().equals(billType)) { -// Long id = (Long) map.get("id"); -// WxBillSettle settle = wxBillSettleService.getById(id, EnumFilterSettle.YES.getCode()); -// map.put("owe", settle.getBalance()); -// if (hasReceivePay) { -// settle = wxBillSettleService.getById(id, EnumFilterSettle.NO.getCode()); -// map.put("receivePay", settle.getBalance()); -// } -// } -// map.put("merchantName", wxMerchant.getName()); -// if (hasShop) { -// Long shopId = (Long) map.get("shopId"); -// if (null != shopId) { -// Map param = new HashMap(); -// param.put("id", shopId); -// Map shopResult = wxShopMapper.getMerchantShopByShopId(param); -// if (null != shopResult) { -// map.put("shopNumber", shopResult.get("shopNumber")); -// } -// } -// } -// if (hasPayBill) { -// Long billId = (Long) map.get("id"); -// WxPayBill wxPayBill = new WxPayBill(); -// wxPayBill.updateTenantInfo(wxMerchant); -// wxPayBill.setBillId(billId); -// List payBillList = wxPayBillMapper.findList(wxPayBill); -// if (null != payBillList && payBillList.size() > 0 ) { -// WxPayBill pb = payBillList.get(0); -// map.put("payBillStatus", pb.getPayBillStatus()); -// map.put("tradeTime", pb.getPayTimeEnd()); -// map.put("transactionId", pb.getTransactionId()); -// map.put("payAmount", pb.getPayAmount()); -// } -// } -// } -// } -// return maps; -// } -// -// @Override -// public Map detail(Long id,Integer type) { -// if (type.equals(EnumBillQueryType.RENT.getCode())) { -// return wxBillAllMapper.detailRentBillData(id); -// } else if (type.equals(EnumBillQueryType.RENT_DEPOSIT.getCode())) { -// return wxBillAllMapper.detailRentDepositBillData(id); -// } else if (type.equals(EnumBillQueryType.PROPERTY.getCode())) { -// return wxBillAllMapper.detailPropertyBillData(id); -// } else if (type.equals(EnumBillQueryType.PROPERTY_DEPOSIT.getCode())) { -// return wxBillAllMapper.detailPropertyDepositBillData(id); -// } else if (type.equals(EnumBillQueryType.WATER_POWER_AIR.getCode())) { -// return wxBillAllMapper.detailDailyBillData(id); -// } else if (type.equals(EnumBillQueryType.OTHER.getCode())) { -// return wxBillAllMapper.detailOtherBillData(id); -// } else if (type.equals(EnumBillQueryType.OTHER_DEPOSIT.getCode())) { -// return wxBillAllMapper.detailOtherDepositBillData(id); -// } -// return null; -// } -// -// -// @Override -// public void updateBill(Map bill) { -//// int billTypeValue = ((Long) bill.get("billTypeValue")).intValue(); -//// logger.info(">>>>>>>>>>>>>>>>>>>>账单回调修改数据:" + JSONObject.toJSONString(bill)); -//// if (billTypeValue == EnumBillTypeParam.RENT.getCode().intValue()) { -//// logger.info("更新租金账单"); -//// WxBillRent billRent = wxBillRentMapper.selectById((Long) bill.get("id")); -//// if (billRent != null && !billRent.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillRent(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.RENT_DEPOSIT.getCode().intValue()) { -//// logger.info("更新租金押金账单"); -//// WxBillDeposit billDeposit = wxBillDepositMapper.selectById((Long) bill.get("id")); -//// if (billDeposit != null && !billDeposit.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillRentDeposit(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.PROPERTY.getCode().intValue()) { -//// logger.info("更新物业账单"); -//// WxBillProperty property = wxBillPropertyMapper.selectById((Long) bill.get("id")); -//// if (property != null && !property.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillProperty(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.PROPERTY_DEPOSIT.getCode().intValue()) { -//// logger.info("更新物业押金账单"); -//// WxBillPropertyDeposit wxBillPropertyDeposit = wxBillPropertyDepositMapper.selectById((Long) bill.get("id")); -//// if (wxBillPropertyDeposit != null && !wxBillPropertyDeposit.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillPropertyDeposit(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.WATER.getCode().intValue()) { -//// logger.info("更新水费账单"); -//// WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) bill.get("id")); -//// if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillDaily(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.POWER.getCode().intValue()) { -//// logger.info("更新电费账单"); -//// WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) bill.get("id")); -//// if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillDaily(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.AIR_CONDITIONING.getCode().intValue()) { -//// logger.info("更新空调费账单"); -//// WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) bill.get("id")); -//// if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillDaily(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.ROUTINE.getCode().intValue()) { -//// logger.info("更新其他账单"); -//// WxBillOther wxBillOther = wxBillOtherMapper.selectById((Long) bill.get("id")); -//// if (wxBillOther != null && !wxBillOther.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillOther(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.ATHER_DEPOSIT.getCode().intValue()) { -//// logger.info("更新其他押金账单"); -//// WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById((Long) bill.get("id")); -//// if (wxBillOtherDeposit != null && !wxBillOtherDeposit.getStatus().equals(EnumBillStatus.PAID.getCode())) { -//// updateBillOtherDeposit(bill); -//// } -//// } else if (billTypeValue == EnumBillTypeParam.SETTLE.getCode().intValue()) { -//// try { -//// logger.info("更新结算单id:{}", JsonUtil.obj2Json(bill)); -//// -//// WxBillSettle wxBillSettle = wxBillSettleService.getById((Long) bill.get("id"), EnumFilterSettle.YES.getCode()); -//// -//// WxBillSettleRecord settleRecord = new WxBillSettleRecord(); -//// settleRecord.setSettleId((Long) bill.get("id")); -//// settleRecord.setSettleMoney(wxBillSettle.getBalance()); -//// settleRecord.setSettleTime(new Date()); -//// settleRecord.setSettleWay(EnumSettleRecordWay.WEBCAT.getCode()); -//// settleRecord.updateTenantInfo(wxBillSettle); -//// -//// BigDecimal money = new BigDecimal(settleRecord.getSettleMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); -//// settleRecord.setDetail(EnumSettleRecordWay.getEnum(settleRecord.getSettleWay()).getMessage() + "收款" + money.toString() + "元"); -//// wxBillSettleRecordService.saveOrUpdate(settleRecord, null, (Long) bill.get("userId")); -//// -//// wxBillSettle.setUpdatetime(new Date()); -//// wxBillSettle.setStatus(EnumSettleStatus.FINISH.getCode()); -//// wxBillSettleMapper.updateById(wxBillSettle); -//// -//// logger.info("更新结算单success"); -//// } catch (Exception e) { -//// logger.error("结算单error", e); -//// e.printStackTrace(); -//// } -//// -//// } else { -//// logger.info("账单类型不存在"); -//// } -// } -// -// @Override -// public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll) { -//// Map> collect = list(wxBillAll) -//// .stream().filter(b -> null != b.getMerchantId()) -//// .collect(Collectors.groupingBy(WxBillAllVo::getMerchantId)); -//// Set>> entries = collect.entrySet(); -//// List datalist = new ArrayList<>(); -//// for (Map.Entry> entry : entries) { -//// List list = entry.getValue(); -//// for (WxBillAllVo wxBillAllVo : list) { -//// String shopNumber = wxBillAllVo.getShopNumber(); -//// if (StringUtils.isEmpty(shopNumber)) { -//// String shopInfo = wxBillAllVo.getShopInfo(); -//// if (StringUtils.isNotEmpty(shopInfo) && !shopInfo.equals("[]")) { -//// JSONObject jsonObject = JSONObject.parseObject(shopInfo); -//// StringBuffer sb = new StringBuffer(); -//// Set> sets = jsonObject.entrySet(); -//// sets.forEach(x -> sb.append(x.getKey()).append(",")); -//// if(StringUtils.isNotBlank(sb)){ -//// wxBillAllVo.setShopNumber(sb.deleteCharAt(sb.length() - 1).toString()); -//// } -//// } -//// } -//// wxBillAllVo.setPayDateStr(DateUtils.format(wxBillAllVo.getPayDate())); -//// wxBillAllVo.setRentStartTime(DateUtils.format(wxBillAllVo.getStarttime())); -//// wxBillAllVo.setRentEndTime(DateUtils.format(wxBillAllVo.getEndtime())); -//// -//// //status不是欠缴,都展示0,与前端保持一致 -//// if (!EnumBillStatus.NOT_PAID.getCode().equals(wxBillAllVo.getStatus())) { -//// wxBillAllVo.setOwe(0L); -//// wxBillAllVo.setOweStr("0"); -//// } -//// datalist.add(wxBillAllVo); -//// } -//// } -//// WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(wxBillAll); -//// datalist.stream().forEach(e -> { -//// //手续费 = 合同应收+手续费+滞纳金 -//// cmputeTotalMoney(wxPayAccountBill, e); -//// }); -//// excelService.exportExcel(datalist, null, "账单数据", WxBillAllVo.class, "账单数据.xlsx", response, false); -// } -// -// private int updateBillOtherDeposit(Map bill) { -//// logger.info("updateBillOtherDeposit params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById((Long) id); -//// if (wxBillOtherDeposit == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// wxBillOtherDeposit.setPayDate(date); -//// Long owe = (Long) bill.get("owe"); -//// wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); -//// //wxBillOtherDeposit.setOwe("0"); -//// wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); -//// wxBillOtherDeposit.setPayDate(date); -//// wxBillOtherDeposit.setUpdatetime(date); -//// wxBillOtherDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// int count = 0; -//// try { -//// count = wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); -//// } catch (Exception e) { -//// logger.error("更新其他押金账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(wxBillOtherDeposit.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// private int updateBillOther(Map bill) { -//// logger.info("updateBillOther params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillOther wxBillOther = wxBillOtherMapper.selectById((Long) id); -//// if (wxBillOther == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// wxBillOther.setPayDate(date); -//// Long owe = (Long) bill.get("owe"); -//// wxBillOther.setPay(wxBillOther.getPay() + owe); -//// //wxBillOther.setOwe("0"); -//// wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); -//// wxBillOther.setPayDate(date); -//// wxBillOther.setUpdatetime(date); -//// wxBillOther.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// int count = 0; -//// try { -//// count = wxBillOtherMapper.updateById(wxBillOther); -//// } catch (Exception e) { -//// logger.error("更新其他账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(wxBillOther.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加其他账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// private int updateBillDaily(Map bill) { -//// logger.info("updateBillDaily params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) id); -//// if (wxBillDaily == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// wxBillDaily.setPayDate(date); -//// Long owe = (Long) bill.get("owe"); -//// wxBillDaily.setPay(wxBillDaily.getPay() + owe); -//// //wxBillDaily.setOwe("0"); -//// wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); -//// wxBillDaily.setPayDate(date); -//// wxBillDaily.setUpdatetime(date); -//// wxBillDaily.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// -//// int count = 0; -//// try { -//// count = wxBillDailyMapper.updateById(wxBillDaily); -//// } catch (Exception e) { -//// logger.error("更新日常账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(wxBillDaily.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加日常账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// private int updateBillPropertyDeposit(Map bill) { -//// logger.info("updateBillPropertyDeposit params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillPropertyDeposit wxBillPropertyDeposit = wxBillPropertyDepositMapper.selectById((Long) id); -//// if (wxBillPropertyDeposit == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// wxBillPropertyDeposit.setPayDate(date); -//// String owe = (String) bill.get("owe"); -//// wxBillPropertyDeposit.setPay(new BigDecimal(wxBillPropertyDeposit.getPay()).add(new BigDecimal(owe)).toPlainString()); -//// //wxBillPropertyDeposit.setOwe("0"); -//// wxBillPropertyDeposit.setStatus(EnumBillStatus.PAID.getCode()); -//// wxBillPropertyDeposit.setPayDate(date); -//// wxBillPropertyDeposit.setUpdatetime(date); -//// wxBillPropertyDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// -//// int count = 0; -//// try { -//// count = wxBillPropertyDepositMapper.updateById(wxBillPropertyDeposit); -//// } catch (Exception e) { -//// logger.error("更新物业押金账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(wxBillPropertyDeposit.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加物业押金账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// private int updateBillProperty(Map bill) { -//// logger.info("updateBillProperty params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillProperty property = wxBillPropertyMapper.selectById((Long) id); -//// if (property == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// property.setPayDate(date); -//// String owe = (String) bill.get("owe"); -//// property.setPay(new BigDecimal(property.getPay()).add(new BigDecimal(owe)).toPlainString()); -//// //property.setOwe("0"); -//// property.setStatus(EnumBillStatus.PAID.getCode()); -//// property.setPayDate(date); -//// property.setUpdatetime(date); -//// property.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// -//// int count = 0; -//// try { -//// count = wxBillPropertyMapper.updateById(property); -//// } catch (Exception e) { -//// logger.error("更新物业账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(property.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加物业账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// private int updateBillRentDeposit(Map bill) { -//// logger.info("updateBillRentDeposit params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById((Long) id); -//// if (wxBillDeposit == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// wxBillDeposit.setPayDate(date); -//// Long owe = (Long) bill.get("owe"); -//// wxBillDeposit.setPay(wxBillDeposit.getPay() + owe); -//// //wxBillDeposit.setOwe("0"); -//// wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); -//// wxBillDeposit.setPayDate(date); -//// wxBillDeposit.setUpdatetime(date); -//// wxBillDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// -//// int count = 0; -//// try { -//// count = wxBillDepositMapper.updateById(wxBillDeposit); -//// } catch (Exception e) { -//// logger.error("更新租赁押金账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(wxBillDeposit.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// private int updateBillRent(Map bill) { -//// logger.info("updateBillRentDeposit params:" + bill.toString()); -//// Object id = bill.get("id"); -//// WxBillRent wxBillRent = wxBillRentMapper.selectById((Long) id); -//// if (wxBillRent == null) { -//// return 0; -//// } -//// Date date = new Date(); -//// wxBillRent.setPayDate(date); -//// Long owe = (Long) bill.get("owe"); -//// wxBillRent.setPay(wxBillRent.getPay() + owe); -//// //wxBillRent.setOwe("0"); -//// wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); -//// wxBillRent.setPayDate(date); -//// wxBillRent.setUpdatetime(date); -//// wxBillRent.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); -//// -//// int count = 0; -//// try { -//// count = wxBillRentMapper.updateById(wxBillRent); -//// } catch (Exception e) { -//// logger.error("更新租金账单失败,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// //日志 -//// WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(wxBillRent.getId()); -//// String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); -//// wxBillAction.setDetails("线上缴费" + price + "元"); -//// wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); -//// wxBillAction.setUserId(wxMerchantBUser.getId()); -//// wxBillAction.setUserName(wxMerchantBUser.getName()); -//// wxBillAction.setPhone(wxMerchantBUser.getPhone()); -//// wxBillAction.updateTenantInfo(wxMerchantBUser); -//// wxBillAction.setPayDate(date); -//// try { -//// wxBillActionService.save(wxBillAction); -//// } catch (Exception e) { -//// logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); -//// throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); -//// } -//// return count; -// return 0; -// } -// -// @Override -// public void updateBillStatus(WxBillAll record) { -// logger.info("更新各账单状态开始"); -// //更新其他押金账单 -// //WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); -// //wxBillOtherDeposit.setTenantId(record.getTenantId()); -// //wxBillOtherDepositService.updateBillStatus(wxBillOtherDeposit); -// //更新其他账单 -// WxBillOther wxBillOther = new WxBillOther(); -// wxBillOther.updateTenantInfo(record); -// wxBillOtherService.updateBillStatus(wxBillOther); -// //更新日常账单状态 -// WxBillDaily wxBillDaily = new WxBillDaily(); -// wxBillDaily.updateTenantInfo(record); -// wxBillDailyService.updateBillStatus(wxBillDaily); -// //更新租赁押金账单状态 -// //WxBillDeposit wxBillDeposit = new WxBillDeposit(); -// //wxBillDeposit.setTenantId(record.getTenantId()); -// //wxBillDepositService.updateBillStatus(wxBillDeposit); -// //更新物业押金账单状态 -// //WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit(); -// //wxBillPropertyDeposit.setTenantId(record.getTenantId()); -// //wxBillPropertyDepositService.updateBillStatus(wxBillPropertyDeposit); -// //更新物业账单状态 -// WxBillProperty wxBillProperty = new WxBillProperty(); -// wxBillProperty.updateTenantInfo(record); -// wxBillPropertyService.updateBillStatus(wxBillProperty); -// //更新租赁账单状态 -// WxBillRent wxBillRent = new WxBillRent(); -// wxBillRent.updateTenantInfo(record); -// wxBillRentService.updateBillStatus(wxBillRent); -// //更新管理费账单状态 -// WxBillRentManage wxBillRentManage = new WxBillRentManage(); -// wxBillRentManage.updateTenantInfo(record); -// wxBillRentManageService.updateBillStatus(wxBillRentManage); -// -// logger.info("更新各账单状态结束"); -// } -// -// @Override -// public void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { -//// //商场名称 -////// WxMall q = new WxMall(); -////// q.setTenantInfo(wxBillAll); -//// WxMall wxMall = wxMallMapper.getByTenantInfo(wxBillAll); -//// //映射结果 -//// Map result = new HashMap<>(); -//// result.put("mall", wxMall.getName()); -//// -//// //付款方式 -//// WxPayAccountBill wxPayAccountBill = new WxPayAccountBill(); -//// wxPayAccountBill.updateTenantInfo(wxBillAll); -//// WxPayAccountBill payAccountBill = wxPayAccountBillMapper.selectOne(new QueryWrapper(wxPayAccountBill)); -//// if (payAccountBill != null) { -//// String bankCardId = payAccountBill.getBankCardId(); -//// String bankAccountName = payAccountBill.getBankAccountName(); -//// result.put("accountNumber", StringUtils.isNotEmpty(bankCardId) ? bankCardId : " "); -//// result.put("accountName", StringUtils.isNotEmpty(bankAccountName) ? bankAccountName : " "); -//// } else { -//// result.put("accountNumber", " "); -//// result.put("accountName", " "); -//// } -//// -//// //编号 -//// String number = "JF" + DateUtils.getSystemTime("yyyyMMddHHmmss"); -//// result.put("number", number); -//// //数据 -//// Integer status = wxBillAll.getStatus(); -//// if (status == null) { -//// List statusList = new ArrayList<>(); -//// statusList.add(EnumBillStatus.NOT_PAID.getCode()); -//// statusList.add(EnumBillStatus.WAIT_PAY.getCode()); -//// statusList.add(EnumBillStatus.NOT_EXPIRED.getCode()); -//// wxBillAll.setStatusList(statusList); -//// //账单时间段 -//// result.put("starttime", wxBillAll.getStarttime()); -//// result.put("endtime", wxBillAll.getEndtime().substring(0, 10)); -//// } else { -//// result.put("starttime", " "); -//// result.put("endtime", " "); -//// } -//// Integer filterHasPay = wxBillAll.getFilterHasPay(); -//// -//// //租金 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT.getCode()); -//// List rentList = this.list(wxBillAll); -//// Long rentSum = 0l; -//// if(!rentList.isEmpty()){ -//// rentSum = rentList.stream().collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// } -//// //商业管理费 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_BUSSINESS_MANAGE.getCode()); -//// List bmList = this.list(wxBillAll); -//// Long bussinessManageSum = 0L; -//// if(!bmList.isEmpty()){ -//// bussinessManageSum = bmList.stream().collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// } -//// //营业管理费 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_OPERATING_MANAGE.getCode()); -//// List omList = this.list(wxBillAll); -//// Long operatingManageSum = 0L; -//// if(!omList.isEmpty()){ -//// operatingManageSum = omList.stream().collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// } -//// -//// wxBillAll.setManageFeeType(null); -//// //物业 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY.getCode()); -//// List propertyList = this.list(wxBillAll); -//// Long propertySum = 0l; -//// if(!propertyList.isEmpty()){ -//// propertySum = propertyList.stream().collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// } -//// //押金 -//// List depositList = new ArrayList<>(); -//// //租赁押金 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_DEPOSIT.getCode()); -//// List rentDepositList = this.list(wxBillAll); -//// depositList.addAll(rentDepositList); -//// //物业押金 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY_DEPOSIT.getCode()); -//// List propertyDepositList = this.list(wxBillAll); -//// depositList.addAll(propertyDepositList); -//// //其他押金 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER_DEPOSIT.getCode()); -//// List otherDepositList = this.list(wxBillAll); -//// depositList.addAll(otherDepositList); -//// -//// Long depositSum = 0l; -//// StringBuffer depositDetail = new StringBuffer();//押金明细 -//// if(!depositList.isEmpty()){ -//// depositSum = depositList.stream().collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// depositList.stream().forEach(b -> { -//// BigDecimal owe = new BigDecimal(status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// depositDetail.append(b.getName()).append(":[").append(owe.toPlainString()).append("] "); -//// }); -//// } -//// //水电空调费 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.WATER_POWER_AIR.getCode()); -//// List waterPowerAirList = this.list(wxBillAll); -//// Long waterSum = 0l, powerSum = 0l, airConditioningSum = 0l; -//// if (!waterPowerAirList.isEmpty()) { -//// waterSum = waterPowerAirList.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.WATER.getCode())) -//// .collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// powerSum = waterPowerAirList.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.POWER.getCode())) -//// .collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// airConditioningSum = waterPowerAirList.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.AIR_CONDITIONING.getCode())) -//// .collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// } -//// //其他费用 -//// wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER.getCode()); -//// List otherList = this.list(wxBillAll); -//// Long otherSum = 0l; -//// StringBuffer otherDetail = new StringBuffer();//其他费用明细 -//// if(!otherList.isEmpty()){ -//// otherSum = otherList.stream().collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() + b.getLatePayPrice() + b.getServiceChargePay() : b.getOwe())); -//// otherList.stream().forEach(b -> { -//// BigDecimal owe = new BigDecimal(status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// otherDetail.append(b.getName()).append(":[").append(owe.toPlainString()).append("] "); -//// }); -//// } -//// //总计 -//// Long summarySum = rentSum + bussinessManageSum + operatingManageSum + propertySum + depositSum + waterSum + powerSum + airConditioningSum + otherSum; -//// BigDecimal rent = new BigDecimal(rentSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal bussinessManage = new BigDecimal(bussinessManageSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal operatingManage = new BigDecimal(operatingManageSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// -//// BigDecimal property = new BigDecimal(propertySum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal deposit = new BigDecimal(depositSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal water = new BigDecimal(waterSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal power = new BigDecimal(powerSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal airConditioning = new BigDecimal(airConditioningSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal other = new BigDecimal(otherSum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// BigDecimal summary = new BigDecimal(summarySum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -//// String summaryUpper = PriceUtil.number2CNMontrayUnit(summary); -//// -//// result.put("rent", rent.toPlainString()); -//// result.put("bussinessManage", bussinessManage.toPlainString()); -//// result.put("operatingManage", operatingManage.toPlainString()); -//// result.put("property", property.toPlainString()); -//// result.put("deposit", deposit.toPlainString()); -//// result.put("water", water.toPlainString()); -//// result.put("power", power.toPlainString()); -//// result.put("airConditioning", airConditioning.toPlainString()); -//// result.put("other", other.toPlainString()); -//// result.put("summary", summary.toPlainString()); -//// result.put("summaryUpper", summaryUpper); -//// -//// result.put("depositDetail", StringUtils.isNotEmpty(depositDetail.toString()) ? depositDetail.toString() : " "); -//// result.put("otherDetail", StringUtils.isNotEmpty(otherDetail.toString()) ? otherDetail.toString() : " "); -//// -//// WxMerchantDto wxMerchantDto = new WxMerchantDto(); -//// wxMerchantDto.setId(wxBillAll.getMerchantId()); -//// wxMerchantDto.updateTenantInfo(wxMall); -//// PageInfo pageInfo = wxMerchantService.listAsPageCVo(wxMerchantDto,1,1,true); -//// List listCVo = pageInfo.getList(); -//// WxMerchantVo wxMerchantVo = listCVo.get(0); -//// result.put("merchant", wxMerchantVo.getMerchantName()); -//// WxShopVo wxShopVo = wxMerchantVo.getShopVoList().stream() -//// .filter(s -> StringUtils.isNotEmpty(s.getLinkPhone()) || StringUtils.isNotEmpty(s.getLinkPerson())).findFirst().orElse(null); -//// if (wxShopVo != null) { -//// String linkPerson = wxShopVo.getLinkPerson(); -//// String linkPhone = wxShopVo.getLinkPhone(); -//// result.put("linkPerson", StringUtils.isNotEmpty(linkPerson) ? linkPerson : " "); -//// result.put("linkPhone", StringUtils.isNotEmpty(linkPhone) ? linkPhone : " "); -//// } else { -//// result.put("linkPerson", " "); -//// result.put("linkPhone", " "); -//// } -//// -//// String createtime = DateUtils.getSystemTime("yyyy-MM-dd"); -//// result.put("createtime", createtime); -//// -//// String templatePath = "contract-word-template/bill_owe.docx"; -//// String filepath = fmUploadDir; -//// String filename = UUID.randomUUID() + ".docx"; -//// String exportFileName = "催缴单.docx"; -//// WordUtil.exportWord(templatePath, filepath, filename, exportFileName, result, request, response, null); -// } -// -// -// @Override -// public void exportSettleBill(WxBillSettle wxBillSettle, HttpServletRequest request, HttpServletResponse response) { -// wxBillSettle = wxBillSettleService.getById(wxBillSettle.getId(), EnumFilterSettle.NO.getCode()); -// if (wxBillSettle.getReceiveBillIds() == null) { -// wxBillSettle.setReceiveBillIds(new ArrayList<>()); -// } -// if (wxBillSettle.getPayBillIds() == null) { -// wxBillSettle.setPayBillIds(new ArrayList<>()); -// } -// -// //映射结果 -// Map result = new HashMap<>(); -// -//// WxMall q = new WxMall(); -//// q.setTenantInfo(wxBillSettle); -// WxMall wxMall = wxMallMapper.getByTenantInfo(wxBillSettle); -// result.put("mall", wxMall.getName()); -// result.put("merchant", wxMerchantService.selectById(wxBillSettle.getMerchantId()).getName()); -// result.put("num", wxBillSettle.getSettleNumber()); -// result.put("cdate", DateUtils.format(wxBillSettle.getCreatetime())); -// -// BigDecimal receiveM = (new BigDecimal(wxBillSettle.getReceiveMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP)); -// BigDecimal payM = (new BigDecimal(wxBillSettle.getPayMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP)); -// BigDecimal bM = (new BigDecimal(wxBillSettle.getBalance()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP)); -// result.put("receiveM", receiveM.toString() + "元"); -// result.put("payM", payM.toString() + "元"); -// result.put("bM", bM.toString() + "元"); -// result.put("receiveMU", PriceUtil.digitUppercase(receiveM.doubleValue())); -// result.put("payMU", PriceUtil.digitUppercase(payM.doubleValue())); -// result.put("bMU", PriceUtil.digitUppercase(bM.doubleValue())); -// -// WordDocTableVo wordDocTableVo = new WordDocTableVo(); -// List> rowsParams = new ArrayList<>(); -// int size = wxBillSettle.getReceiveBillIds().size() > wxBillSettle.getPayBillIds().size() ? wxBillSettle.getReceiveBillIds().size() : wxBillSettle.getPayBillIds().size(); -// int count = 1; -// for (int i = 0; i < size; i++) { -// WxBillSettleBill bill = i > wxBillSettle.getReceiveBillIds().size() - 1 ? null : wxBillSettle.getReceiveBillIds().get(i); -// List cellList = new ArrayList<>(); -// cellList.add(count + ""); -// -// if (bill != null) { -// cellList.add(bill.getBillName()); -// cellList.add(new BigDecimal(bill.getReceivePay()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP).toString()); -// } else { -// cellList.add(""); -// cellList.add(""); -// } -// cellList.add(count + ""); -// WxBillSettleBill payBill = i > wxBillSettle.getPayBillIds().size() - 1 ? null : wxBillSettle.getPayBillIds().get(i); -// if (payBill != null) { -// cellList.add(payBill.getBillName()); -// cellList.add(new BigDecimal(payBill.getReceivePay()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP).toString()); -// } else { -// cellList.add(""); -// cellList.add(""); -// } -// rowsParams.add(cellList); -// count++; -// } -// wordDocTableVo.setParams(rowsParams); -// wordDocTableVo.setTableIndex(0); -// wordDocTableVo.setRowIndex(2); -// -// String templatePath = "contract-word-template/settle.docx"; -// String filepath = fmUploadDir; -// String filename = UUID.randomUUID() + ".docx"; -// String exportFileName = "结算单.docx"; -// WordUtil.exportWord(templatePath, filepath, filename, exportFileName, result, request, response, wordDocTableVo); -// -// } -// -// @Override -// public ResultData updateReceivePay(WxBillAll wxBillAll, MallUserInfo user,boolean forcePaid) { -//// Integer billType = wxBillAll.getBillTypeValue(); -//// Long oldPrice = wxBillAll.getOldPrice(); -//// Long newPrice = wxBillAll.getNewPrice(); -//// Long oldLatePrice = wxBillAll.getOldLatePrice(); -//// Long newLatePrice = wxBillAll.getNewLatePrice(); -//// Long id = wxBillAll.getId(); -//// Date updateDate = new Date(); -//// if (billType.equals(EnumBillTypeParam.RENT.getCode())) { -//// WxBillRent dbBill = wxBillRentMapper.selectById(id); -//// WxBillRent wxBillRent = new WxBillRent(); -//// wxBillRent.setId(id); -//// wxBillRent.setUpdatetime(updateDate); -//// if (forcePaid) { -//// wxBillRent.setReceivePay(dbBill.getPay()); -//// wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); -//// wxBillRent.setOwe("0"); -//// wxBillRentMapper.updateById(wxBillRent); -//// addBillAction(EnumBillAction.UPDATE_BILL, id, dbBill.getPay(), dbBill.getPay(), user); -//// }else { -//// if (oldLatePrice != null) { -//// wxBillRent.setLatePayPrice(newLatePrice); -//// wxBillRent.setOwe(dbBill.getReceivePay() + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); -//// wxBillRentMapper.updateById(wxBillRent); -//// addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY, id, oldLatePrice, newLatePrice, user); -//// } else { -//// //租赁账单更新 -//// wxBillRent.setReceivePay(newPrice); -//// long latePayPrice = dbBill.getLatePayPrice() == null ? 0 : dbBill.getLatePayPrice(); -//// wxBillRent.setOwe(newPrice + dbBill.getServiceChargePay() + latePayPrice - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// wxBillRentMapper.updateById(wxBillRent); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } -//// } -//// } else if (billType.equals(EnumBillTypeParam.RENT_DEPOSIT.getCode())) { -//// WxBillDeposit dbBill = wxBillDepositMapper.selectById(id); -//// if (dbBill != null) { -//// WxBillDeposit wxBillDeposit = new WxBillDeposit(); -//// wxBillDeposit.setId(id); -//// Long billDepositOldPrce = oldPrice; -//// Long billDepositNewPrce = newPrice; -//// //租赁押金账单更新 -//// if (forcePaid) { -//// wxBillDeposit.setReceivePay(dbBill.getPay()); -//// wxBillDeposit.setOwe(0L); -//// wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// billDepositOldPrce = dbBill.getPay(); -//// billDepositNewPrce = dbBill.getPay(); -//// }else { -//// wxBillDeposit.setReceivePay(newPrice); -//// wxBillDeposit.setOwe(newPrice - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// wxBillDeposit.setUpdatetime(updateDate); -//// } -//// wxBillDepositMapper.updateById(wxBillDeposit); -//// //账单日志 -//// addBillAction(EnumBillAction.DEPOSIT_MODIFY, id, billDepositOldPrce, billDepositNewPrce, user); -//// } -//// -//// WxBillPropertyDeposit propertyDeposit = wxBillPropertyDepositMapper.selectById(id); -//// if (propertyDeposit != null) { -//// //物业押金账单更新 -//// WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit(); -//// wxBillPropertyDeposit.setId(id); -//// Long billPropertyDepositOldPrce = oldPrice; -//// Long billPropertyDepositNewPrce = newPrice; -//// if (forcePaid) { -//// wxBillPropertyDeposit.setReceivePay(propertyDeposit.getPay()); -//// wxBillPropertyDeposit.setOwe(0L); -//// wxBillPropertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// billPropertyDepositOldPrce = propertyDeposit.getPay(); -//// billPropertyDepositNewPrce = propertyDeposit.getPay(); -//// }else { -//// wxBillPropertyDeposit.setReceivePay(newPrice); -//// wxBillPropertyDeposit.setOwe(newPrice - propertyDeposit.getPay()); -//// if (newPrice.equals(propertyDeposit.getPay())) { -//// wxBillPropertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// } -//// wxBillPropertyDeposit.setUpdatetime(updateDate); -//// wxBillPropertyDepositMapper.updateById(wxBillPropertyDeposit); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, billPropertyDepositOldPrce, billPropertyDepositNewPrce, user); -//// } -//// } else if (billType.equals(EnumBillTypeParam.PROPERTY.getCode())) { -//// WxBillProperty dbBill = wxBillPropertyMapper.selectById(id); -//// //物业账单更新 -//// WxBillProperty wxBillProperty = new WxBillProperty(); -//// wxBillProperty.setId(id); -//// wxBillProperty.setUpdatetime(updateDate); -//// if (forcePaid) { -//// wxBillProperty.setReceivePay(dbBill.getPay()); -//// wxBillProperty.setOwe(0L); -//// wxBillProperty.setStatus(EnumBillRentStatus.PAID.getCode()); -//// wxBillPropertyMapper.updateById(wxBillProperty); -//// addBillAction(EnumBillAction.UPDATE_BILL, id, dbBill.getPay(), dbBill.getPay(), user); -//// }else { -//// if (oldLatePrice != null) { -//// wxBillProperty.setLatePayPrice(newLatePrice); -//// wxBillProperty.setOwe(dbBill.getReceivePay() + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); -//// wxBillPropertyMapper.updateById(wxBillProperty); -//// addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY, id, oldLatePrice, newLatePrice, user); -//// } else { -//// wxBillProperty.setReceivePay(newPrice); -//// long latePayPrice = dbBill.getLatePayPrice() == null ? 0 : dbBill.getLatePayPrice(); -//// wxBillProperty.setOwe(newPrice + dbBill.getServiceChargePay() + latePayPrice - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillProperty.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// wxBillPropertyMapper.updateById(wxBillProperty); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } -//// } -//// } else if (billType.equals(EnumBillTypeParam.PROPERTY_DEPOSIT.getCode())) { -//// WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(id); -//// //物业押金账单更新 -//// WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit(); -//// wxBillPropertyDeposit.setId(id); -//// Long billPropertyDepositOldPrce = oldPrice; -//// Long billPropertyDepositNewPrce = newPrice; -//// if (forcePaid) { -//// wxBillPropertyDeposit.setReceivePay(dbBill.getPay()); -//// wxBillPropertyDeposit.setOwe(0L); -//// wxBillPropertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// billPropertyDepositOldPrce = dbBill.getPay(); -//// billPropertyDepositNewPrce = dbBill.getPay(); -//// }else { -//// wxBillPropertyDeposit.setReceivePay(newPrice); -//// wxBillPropertyDeposit.setOwe(newPrice - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillPropertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// } -//// wxBillPropertyDeposit.setUpdatetime(updateDate); -//// wxBillPropertyDepositMapper.updateById(wxBillPropertyDeposit); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, billPropertyDepositOldPrce, billPropertyDepositNewPrce, user); -//// -//// } else if (billType.equals(EnumBillTypeParam.WATER.getCode())) { -//// //水费账单更新 -//// updateDailyBill(id, newPrice, updateDate,forcePaid); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } else if (billType.equals(EnumBillTypeParam.POWER.getCode())) { -//// //电费账单更新 -//// updateDailyBill(id, newPrice, updateDate,forcePaid); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } else if (billType.equals(EnumBillTypeParam.AIR_CONDITIONING.getCode())) { -//// //空调费账单更新 -//// updateDailyBill(id, newPrice, updateDate,forcePaid); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } else if (billType.equals(EnumBillTypeParam.ROUTINE.getCode())) { -//// WxBillOther dbBill = wxBillOtherMapper.selectById(id); -//// //其他费用账单更新 -//// WxBillOther wxBillOther = new WxBillOther(); -//// wxBillOther.setId(id); -//// if (forcePaid) { -//// wxBillOther.setReceivePay(dbBill.getPay()); -//// wxBillOther.setOwe(0L); -//// wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); -//// }else { -//// wxBillOther.setReceivePay(newPrice); -//// wxBillOther.setOwe(newPrice + dbBill.getServiceChargePay() - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// } -//// wxBillOther.setUpdatetime(updateDate); -//// wxBillOtherMapper.updateById(wxBillOther); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } else if (billType.equals(EnumBillTypeParam.ATHER_DEPOSIT.getCode())) { -//// WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(id); -//// //其他押金账单更新 -//// WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); -//// wxBillOtherDeposit.setId(id); -//// if (forcePaid) { -//// wxBillOtherDeposit.setReceivePay(dbBill.getPay()); -//// wxBillOtherDeposit.setOwe(0L); -//// wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// }else { -//// wxBillOtherDeposit.setReceivePay(newPrice); -//// wxBillOtherDeposit.setOwe(newPrice + dbBill.getServiceChargePay() - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// } -//// wxBillOtherDeposit.setUpdatetime(updateDate); -//// wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// }if (billType.equals(EnumBillTypeParam.RENT_BUSSINESS_MANAGE.getCode()) || billType.equals(EnumBillTypeParam.RENT_OPERATING_MANAGE.getCode())) { -//// WxBillRentManage dbBill = wxBillRentManageMapper.selectById(id); -//// WxBillRentManage wxBillRent = new WxBillRentManage(); -//// wxBillRent.setId(id); -//// wxBillRent.setUpdatetime(updateDate); -//// if (forcePaid) { -//// wxBillRent.setReceivePay(dbBill.getPay()); -//// wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); -//// wxBillRent.setOwe(0L); -//// wxBillRentManageMapper.updateById(wxBillRent); -//// addBillAction(EnumBillAction.UPDATE_BILL, id, dbBill.getPay(), dbBill.getPay(), user); -//// }else { -//// if (oldLatePrice != null) { -//// wxBillRent.setLatePayPrice(newLatePrice); -//// wxBillRent.setOwe(dbBill.getReceivePay() + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); -//// wxBillRentManageMapper.updateById(wxBillRent); -//// addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY, id, oldLatePrice, newLatePrice, user); -//// } else { -//// //租赁账单更新 -//// wxBillRent.setReceivePay(newPrice); -//// long latePayPrice = dbBill.getLatePayPrice() == null ? 0 : dbBill.getLatePayPrice(); -//// wxBillRent.setOwe(newPrice + dbBill.getServiceChargePay() + latePayPrice - dbBill.getPay()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } -//// wxBillRentManageMapper.updateById(wxBillRent); -//// //账单日志 -//// addBillAction(EnumBillAction.UPDATE_BILL, id, oldPrice, newPrice, user); -//// } -//// } -//// } else { -//// logger.info("未找到账单类型"); -//// } -// return new ResultData(); -// } -// -// @Override -// public void addBillAction(EnumBillAction billAction, Long billId, Long oldPrice, Long newPrice, MallUserInfo mallUserInfo) { -// WxBillAction wxBillAction = new WxBillAction(); -// wxBillAction.setBillId(billId); -// String oldPriceStr = new BigDecimal(oldPrice).divide(new BigDecimal(100)).toPlainString(); -// String newPriceStr = new BigDecimal(newPrice).divide(new BigDecimal(100)).toPlainString(); -// wxBillAction.setDetails(oldPriceStr + "元变更成" + newPriceStr + "元"); -// wxBillAction.setAction(billAction.getCode()); -// wxBillActionService.modifyBill(wxBillAction, mallUserInfo); -// } -// -// -// @Override -// public void exportTemplate(WxBillExcelTemplate WxBillExcelTemplate, HttpServletRequest request, HttpServletResponse response) { -// List datalist = new ArrayList<>(); -// List otherDatalist = new ArrayList<>(); -// -// Integer billType = WxBillExcelTemplate.getBillType(); -// if (billType.equals(EnumBillExcelTemplate.DAILY.getCode())) { -// WxBillExcelTemplateOther one = new WxBillExcelTemplateOther(); -// Date date = new Date(); -// one.setMerchantName("商户1"); -// one.setBillType(billType); -// one.setBillAttr("水费"); -// one.setStarttime(date); -// one.setEndtime(date); -// one.setReceivePayStr("1000"); -// one.setPayStr("1000"); -// one.setPayDate(date); -// one.setReceiveDate(date); -// one.setPayWay("微信"); -// otherDatalist.add(one); -// -// WxBillExcelTemplateOther two = new WxBillExcelTemplateOther(); -// two.setMerchantName("商户2"); -// two.setBillType(billType); -// two.setBillAttr("电费"); -// two.setStarttime(date); -// two.setEndtime(date); -// two.setReceivePayStr("2000.50"); -// two.setPayStr("2000.50"); -// two.setPayDate(date); -// two.setReceiveDate(date); -// two.setPayWay("支付宝"); -// otherDatalist.add(two); -// -// WxBillExcelTemplateOther three = new WxBillExcelTemplateOther(); -// three.setMerchantName("商户3"); -// three.setBillType(billType); -// three.setBillAttr("空调费"); -// three.setStarttime(date); -// three.setEndtime(date); -// three.setReceivePayStr("3333"); -// three.setPayStr("3333"); -// three.setPayDate(date); -// three.setReceiveDate(date); -// three.setPayWay("其他"); -// otherDatalist.add(three); -// excelService.exportExcel(otherDatalist, null, "账单模板", WxBillExcelTemplateOther.class, "账单模板.xlsx", response, true); -// } else if (billType.equals(EnumBillExcelTemplate.SHOP_RENT.getCode()) || billType.equals(EnumBillExcelTemplate.POINT_RENT.getCode())) { -// WxBillExcelTemplate one = new WxBillExcelTemplate(); -// Date date = new Date(); -// one.setMerchantName("商户"); -// one.setBillType(billType); -// one.setBillAttr("租金"); -// one.setStarttime(date); -// one.setEndtime(date); -// one.setPayStr("2000.50"); -// one.setReceiveDate(date); -// one.setPayDate(date); -// one.setPayWay("微信"); -// datalist.add(one); -// excelService.exportExcel(datalist, null, "账单模板", WxBillExcelTemplate.class, "账单模板.xlsx", response, true); -// } else if (billType.equals(EnumBillExcelTemplate.SHOP_PROPERTY.getCode()) || billType.equals(EnumBillExcelTemplate.POINT_PROPERTY.getCode())) { -// WxBillExcelTemplate one = new WxBillExcelTemplate(); -// Date date = new Date(); -// one.setMerchantName("商户"); -// one.setBillType(billType); -// one.setBillAttr("物业费"); -// one.setStarttime(date); -// one.setEndtime(date); -// one.setPayStr("2000.50"); -// one.setReceiveDate(date); -// one.setPayDate(date); -// one.setPayWay("微信"); -// datalist.add(one); -// excelService.exportExcel(datalist, null, "账单模板", WxBillExcelTemplate.class, "账单模板.xlsx", response, true); -// } else if (billType.equals(EnumBillExcelTemplate.OTHER.getCode())) { -// WxBillExcelTemplateOther one = new WxBillExcelTemplateOther(); -// Date date = new Date(); -// one.setMerchantName("商户"); -// one.setBillType(billType); -// one.setBillAttr("其他费用"); -// one.setStarttime(date); -// one.setEndtime(date); -// one.setReceivePayStr("2000.50"); -// one.setPayStr("2000.50"); -// one.setReceiveDate(date); -// one.setPayDate(date); -// one.setPayWay("微信"); -// otherDatalist.add(one); -// excelService.exportExcel(otherDatalist, null, "账单模板", WxBillExcelTemplateOther.class, "账单模板.xlsx", response, true); -// } else { -// WxBillExcelTemplateOther one = new WxBillExcelTemplateOther(); -// Date date = new Date(); -// one.setMerchantName("商户"); -// one.setBillType(billType); -// one.setBillAttr("其他押金"); -// one.setStarttime(date); -// one.setEndtime(date); -// one.setReceivePayStr("2000.50"); -// one.setPayStr("2000.50"); -// one.setReceiveDate(date); -// one.setPayDate(date); -// one.setPayWay("微信"); -// otherDatalist.add(one); -// excelService.exportExcel(otherDatalist, null, "账单模板", WxBillExcelTemplateOther.class, "账单模板.xlsx", response, true); -// } -// } -// -// @Override -// public void importBillOther(String importKey, WxBillExcelTemplateOther bill, MallUserInfo user) { -//// Integer billType = bill.getBillType(); -//// long receivePay = new BigDecimal(bill.getReceivePayStr()).multiply(new BigDecimal(100)).longValueExact(); -//// long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); -//// if (billType.equals(EnumBillExcelTemplate.DAILY.getCode())) { -//// WxBillDaily dailyQuery = new WxBillDaily(); -//// String billAttrStr = StringUtils.trim(bill.getBillAttr()); -//// if (billAttrStr.equals(EnumBillExcelTemplateDaily.WATER.getMessage())) { -//// dailyQuery.setType(EnumBillDailyType.WATER.getCode()); -//// } -//// if (billAttrStr.equals(EnumBillExcelTemplateDaily.POWER.getMessage())) { -//// dailyQuery.setType(EnumBillDailyType.POWER.getCode()); -//// } -//// if (billAttrStr.equals(EnumBillExcelTemplateDaily.AIR_CONDITIONING.getMessage())) { -//// dailyQuery.setType(EnumBillDailyType.AIR_CONDITIONING.getCode()); -//// } -//// dailyQuery.updateTenantInfo(user); -//// dailyQuery.setMerchantId(bill.getMerchantId()); -//// dailyQuery.setReceiveDate(bill.getReceiveDate()); -//// dailyQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// WxBillDaily daily = wxBillDailyMapper.selectOne(new QueryWrapper(dailyQuery)); -//// if (daily != null && pay > 0) { -//// if (!daily.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { -//// long allPay = new BigDecimal(daily.getPay()).add(new BigDecimal(pay)).longValueExact(); -//// WxBillRent expiredDayAndStatus = getExpiredDayAndStatus(bill.getReceiveDate(), bill.getPayDate(), receivePay, allPay, false); -//// daily.setExpiredDay(expiredDayAndStatus.getExpiredDay()); -//// daily.setStatus(expiredDayAndStatus.getStatus()); -//// daily.setReceivePay(receivePay); -//// daily.setPay(allPay); -//// daily.setOwe(0L); -//// long owe = daily.getReceivePay() - daily.getPay(); -//// if (owe > 0) { -//// daily.setOwe(owe); -//// } -//// daily.setPayDate(bill.getPayDate()); -//// daily.setReceiveDate(bill.getReceiveDate()); -//// wxBillDailyMapper.updateById(daily); -//// addActionImport(daily.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } else { -//// WxMerchantShop wxMerchantShop = new WxMerchantShop(); -//// wxMerchantShop.updateTenantInfo(user); -//// wxMerchantShop.setMerchantId(bill.getMerchantId()); -//// wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// List select = wxMerchantShopMapper.selectList(new QueryWrapper<>(wxMerchantShop)); -//// if (!select.isEmpty()) { -//// daily = new WxBillDaily(); -//// final IdWorker idWorker = IdWorker.get(); -//// daily.setId(idWorker.nextId()); -//// daily.setReceivePay(receivePay); -//// daily.setReceiveDate(bill.getReceiveDate()); -//// daily.setPay(pay); -//// daily.setType(dailyQuery.getType()); -//// daily.updateTenantInfo(user); -//// daily.setMerchantId(bill.getMerchantId()); -//// daily.setShopId(select.get(0).getShopId()); -//// daily.setRentShopType(bill.getMerchantType()); -//// daily.setPayDate(bill.getPayDate()); -//// Date date = new Date(); -//// daily.setCreatetime(date); -//// daily.setUpdatetime(date); -//// daily.setOwe(receivePay - pay); -//// daily.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// daily.setStarttime(bill.getStarttime()); -//// daily.setEndtime(bill.getEndtime()); -//// WxBillRent expiredDayAndStatus = getExpiredDayAndStatus(bill.getReceiveDate(), bill.getPayDate(), receivePay, pay, false); -//// daily.setExpiredDay(expiredDayAndStatus.getExpiredDay()); -//// daily.setStatus(expiredDayAndStatus.getStatus()); -//// daily.setBuildWay(EnumBillDailyBuildWay.IMPORT.getCode()); -//// JSONArray priceDetals = new JSONArray(); -//// JSONObject priceDetal = new JSONObject(); -//// priceDetal.put("key", "price"); -//// priceDetal.put("value", 1); -//// priceDetals.add(priceDetal); -//// priceDetal = new JSONObject(); -//// priceDetal.put("key", "way"); -//// priceDetal.put("value", 1); -//// priceDetals.add(priceDetal); -//// priceDetal = new JSONObject(); -//// priceDetal.put("key", "unit"); -//// priceDetal.put("value", 1); -//// priceDetals.add(priceDetal); -//// daily.setPriceDetail(JSONArray.toJSONString(priceDetals)); -//// wxBillDailyMapper.insert(daily); -//// if (pay > 0) { -//// addActionImport(daily.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } -//// } -//// } else if (billType.equals(EnumBillExcelTemplate.OTHER.getCode())) { -//// WxBillOther otherQuery = new WxBillOther(); -//// otherQuery.updateTenantInfo(user); -//// otherQuery.setMerchantId(bill.getMerchantId()); -//// otherQuery.setReceiveDate(bill.getReceiveDate()); -//// otherQuery.setName(bill.getBillAttr()); -//// otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// WxBillOther other = wxBillOtherMapper.selectOne(new QueryWrapper(otherQuery)); -//// if (other != null && pay > 0) { -//// if (!other.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { -//// long allPay = new BigDecimal(other.getPay()).add(new BigDecimal(pay)).longValueExact(); -//// WxBillRent expiredDayAndStatus = getExpiredDayAndStatus(bill.getReceiveDate(), bill.getPayDate(), receivePay, allPay, false); -//// other.setExpiredDay(expiredDayAndStatus.getExpiredDay()); -//// other.setStatus(expiredDayAndStatus.getStatus()); -//// other.setReceivePay(receivePay); -//// other.setName(bill.getBillAttr()); -//// other.setComments(bill.getBillAttr()); -//// other.setPay(allPay); -//// other.setOwe(0L); -//// long owe = other.getReceivePay() - other.getPay(); -//// if (owe > 0) { -//// other.setOwe(owe); -//// } -//// other.setPayDate(bill.getPayDate()); -//// other.setReceiveDate(bill.getReceiveDate()); -//// wxBillOtherMapper.updateById(other); -//// addActionImport(other.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } else { -//// WxMerchantShop wxMerchantShop = new WxMerchantShop(); -//// wxMerchantShop.updateTenantInfo(user); -//// wxMerchantShop.setMerchantId(bill.getMerchantId()); -//// wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// List select = wxMerchantShopMapper.selectList(new QueryWrapper(wxMerchantShop)); -//// if (!select.isEmpty()) { -//// other = new WxBillOther(); -//// final IdWorker idWorker = IdWorker.get(); -//// other.setId(idWorker.nextId()); -//// other.setName(bill.getBillAttr()); -//// other.setComments(bill.getBillAttr()); -//// other.setReceivePay(receivePay); -//// other.setReceiveDate(bill.getReceiveDate()); -//// other.setPay(pay); -//// other.updateTenantInfo(user); -//// other.setMerchantId(bill.getMerchantId()); -//// other.setShopId(select.get(0).getShopId()); -//// other.setRentShopType(bill.getMerchantType()); -//// other.setPayDate(bill.getPayDate()); -//// Date date = new Date(); -//// other.setCreatetime(date); -//// other.setUpdatetime(date); -//// other.setOwe(receivePay - pay); -//// other.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// other.setStarttime(bill.getStarttime()); -//// other.setEndtime(bill.getEndtime()); -//// WxBillRent expiredDayAndStatus = getExpiredDayAndStatus(bill.getReceiveDate(), bill.getPayDate(), receivePay, pay, false); -//// other.setExpiredDay(expiredDayAndStatus.getExpiredDay()); -//// other.setStatus(expiredDayAndStatus.getStatus()); -//// wxBillOtherMapper.insert(other); -//// if (pay > 0) { -//// addActionImport(other.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } -//// } -//// } else if (billType.equals(EnumBillExcelTemplate.OTHER_DEPOSIT.getCode())) { -//// WxBillOtherDeposit otherDepositQuery = new WxBillOtherDeposit(); -//// otherDepositQuery.updateTenantInfo(user); -//// otherDepositQuery.setMerchantId(bill.getMerchantId()); -//// otherDepositQuery.setReceiveDate(bill.getReceiveDate()); -//// otherDepositQuery.setComments(bill.getBillAttr()); -//// otherDepositQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// WxBillOtherDeposit otherDeposit = wxBillOtherDepositMapper.selectOne(new QueryWrapper(otherDepositQuery)); -//// if (otherDeposit != null && pay > 0) { -//// if (!otherDeposit.getStatus().equals(EnumBillRentStatus.PAID.getCode()) && !otherDeposit.getStatus().equals(EnumBillRentStatus.RETURN.getCode())) { -//// long allPay = new BigDecimal(otherDeposit.getPay()).add(new BigDecimal(pay)).longValueExact(); -//// otherDeposit.setExpiredDay(0L); -//// if (allPay >= receivePay) { -//// otherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } else { -//// otherDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); -//// } -//// otherDeposit.setReceivePay(receivePay); -//// otherDeposit.setPay(allPay); -//// otherDeposit.setOwe(0L); -//// long owe = otherDeposit.getReceivePay() - otherDeposit.getPay(); -//// if (owe > 0) { -//// otherDeposit.setOwe(owe); -//// } -//// otherDeposit.setPayDate(bill.getPayDate()); -//// otherDeposit.setReceiveDate(bill.getReceiveDate()); -//// wxBillOtherDepositMapper.updateById(otherDeposit); -//// addActionImport(otherDeposit.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } else { -//// WxMerchantShop wxMerchantShop = new WxMerchantShop(); -//// wxMerchantShop.updateTenantInfo(user); -//// wxMerchantShop.setMerchantId(bill.getMerchantId()); -//// otherDepositQuery.setReceiveDate(bill.getReceiveDate()); -//// wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// List select = wxMerchantShopMapper.selectList(new QueryWrapper(wxMerchantShop)); -//// if (!select.isEmpty()) { -//// otherDeposit = new WxBillOtherDeposit(); -//// final IdWorker idWorker = IdWorker.get(); -//// otherDeposit.setId(idWorker.nextId()); -//// otherDeposit.setName(bill.getBillAttr()); -//// otherDeposit.setComments(bill.getBillAttr()); -//// otherDeposit.setReceivePay(receivePay); -//// otherDeposit.setReceiveDate(bill.getReceiveDate()); -//// otherDeposit.setPay(pay); -//// otherDeposit.updateTenantInfo(user); -//// otherDeposit.setMerchantId(bill.getMerchantId()); -//// otherDeposit.setShopId(select.get(0).getShopId()); -//// otherDeposit.setRentShopType(bill.getMerchantType()); -//// otherDeposit.setPayDate(bill.getPayDate()); -//// Date date = new Date(); -//// otherDeposit.setCreatetime(date); -//// otherDeposit.setUpdatetime(date); -//// otherDeposit.setExpiredDay(0L); -//// otherDeposit.setOwe(receivePay - pay); -//// otherDeposit.setIsDel(EnumDelStatus.NOT_DEL.getCode()); -//// otherDeposit.setStarttime(bill.getStarttime()); -//// otherDeposit.setEndtime(bill.getEndtime()); -//// if (receivePay <= pay) { -//// otherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); -//// } else { -//// otherDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); -//// } -//// wxBillOtherDepositMapper.insert(otherDeposit); -//// if (pay > 0) { -//// addActionImport(otherDeposit.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } -//// } -//// } else { -//// logger.error("账单导入失败"); -//// } -//// //记数 -//// stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); -//// stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS); -// } -// -//// public WxBillRent getExpiredDayAndStatus(Date startDate, Date endDate, Long owe, Long pay, boolean flag) { -//// WxBillRent rent = new WxBillRent(); -//// rent.setExpiredDay(0L); -//// if (owe <= pay) { -//// rent.setStatus(EnumBillStatus.PAID.getCode()); -//// int expiredDay = DateUtils.daysBetween(startDate, endDate); -//// int timePeriod = 0; -//// if (expiredDay > timePeriod) { -//// rent.setExpiredDay((long) expiredDay); -//// } -//// return rent; -//// } -//// Date now = new Date(); -//// int day = DateUtils.daysBetween(startDate, now); -//// int timePeriod = 0; -//// if (day > timePeriod) { -//// rent.setStatus(EnumBillStatus.NOT_PAID.getCode()); -//// rent.setExpiredDay((long) day); -//// return rent; -//// } -//// if (flag) { -//// timePeriod = 30; -//// long expiredDay = Long.valueOf(Math.abs(day)); -//// if (expiredDay > timePeriod) { -//// rent.setStatus(EnumBillStatus.NOT_EXPIRED.getCode()); -//// } else { -//// rent.setStatus(EnumBillStatus.WAIT_PAY.getCode()); -//// } -//// } else { -//// rent.setStatus(EnumBillStatus.WAIT_PAY.getCode()); -//// } -//// return rent; -//// } -// -// @Override -// public void importBill(String importKey, WxBillExcelTemplate bill, MallUserInfo user) { -//// //租金 -//// Integer billType = bill.getBillType(); -//// if (billType.equals(EnumBillExcelTemplate.SHOP_RENT.getCode()) || billType.equals(EnumBillExcelTemplate.POINT_RENT.getCode())) { -//// WxBillRent rentQuery = new WxBillRent(); -//// rentQuery.updateTenantInfo(user); -//// rentQuery.setMerchantId(bill.getMerchantId()); -//// rentQuery.setStarttime(bill.getStarttime()); -//// rentQuery.setEndtime(bill.getEndtime()); -//// if (billType.equals(EnumBillExcelTemplate.SHOP_RENT.getCode())) { -//// rentQuery.setRentShopType(EnumRentShopType.SHOP.getCode()); -//// } else { -//// rentQuery.setRentShopType(EnumRentShopType.POINT.getCode()); -//// } -//// rentQuery.setIsPreview(EnumIsPreview.NO.getCode()); -//// WxBillRent rent = wxBillRentMapper.selectBillOne(rentQuery); -//// if (rent != null && !rent.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { -//// long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); -//// WxBillRent expiredDayAndStatus = getExpiredDayAndStatus(bill.getReceiveDate(), bill.getPayDate(), rent.getOwe(), pay, true); -//// rent.setExpiredDay(expiredDayAndStatus.getExpiredDay()); -//// rent.setStatus(expiredDayAndStatus.getStatus()); -//// rent.setPay(rent.getPay() + pay); -//// rent.setOwe(rent.getOwe() - pay); -//// rent.setPayDate(bill.getPayDate()); -//// rent.setReceiveDate(bill.getReceiveDate()); -//// wxBillRentMapper.updateById(rent); -//// if (pay > 0) { -//// addActionImport(rent.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } -//// } else if (billType.equals(EnumBillExcelTemplate.SHOP_PROPERTY.getCode()) || billType.equals(EnumBillExcelTemplate.POINT_PROPERTY.getCode())) { -//// WxBillProperty propertyQuery = new WxBillProperty(); -//// propertyQuery.updateTenantInfo(user); -//// propertyQuery.setMerchantId(bill.getMerchantId()); -//// propertyQuery.setStarttime(bill.getStarttime()); -//// propertyQuery.setEndtime(bill.getEndtime()); -//// if (billType.equals(EnumBillExcelTemplate.SHOP_PROPERTY.getCode())) { -//// propertyQuery.setRentShopType(EnumRentShopType.SHOP.getCode()); -//// } else { -//// propertyQuery.setRentShopType(EnumRentShopType.POINT.getCode()); -//// } -//// propertyQuery.setIsPreview(EnumIsPreview.NO.getCode()); -//// WxBillProperty property = wxBillPropertyMapper.selectBillOne(propertyQuery); -//// if (property != null && !property.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { -//// long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); -//// WxBillRent expiredDayAndStatus = getExpiredDayAndStatus(bill.getReceiveDate(), bill.getPayDate(), property.getOwe(), pay, true); -//// property.setExpiredDay(expiredDayAndStatus.getExpiredDay()); -//// property.setStatus(expiredDayAndStatus.getStatus()); -//// property.setPay(property.getPay() + pay); -//// property.setOwe(property.getOwe() - pay); -//// property.setPayDate(bill.getPayDate()); -//// property.setReceiveDate(bill.getReceiveDate()); -//// wxBillPropertyMapper.updateById(property); -//// if (pay > 0) { -//// addActionImport(property.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr()); -//// } -//// } -//// } else { -//// logger.error("账单导入失败"); -//// } -//// //记数 -//// stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); -//// stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS); -// } -// -//// public void addActionImport(Long billId, String payWay, Date payDate, MallUserInfo user, String pay) { -//// WxBillAction wxBillAction = new WxBillAction(); -//// wxBillAction.setBillId(billId); -//// String details = StringUtils.isEmpty(payWay) ? "其他缴费" : payWay + "缴费"; -//// wxBillAction.setDetails(details + pay + "元"); -//// wxBillAction.setAction(EnumBillAction.IMPORT_PAY.getCode()); -//// wxBillAction.setPayDate(payDate); -//// wxBillActionService.modifyBill(wxBillAction, user); -//// } -// -// public void updateDailyBill(Long businessId, String newPrice, Date updateDate,boolean forcePaid) { -//// WxBillDaily dbBill = wxBillDailyMapper.selectById(businessId); -//// WxBillDaily wxBillDaily = new WxBillDaily(); -//// wxBillDaily.setId(businessId); -//// if (forcePaid) { -//// wxBillDaily.setReceivePay(dbBill.getPay()); -//// wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); -//// //wxBillDaily.setOwe("0"); -//// }else { -//// wxBillDaily.setReceivePay(newPrice); -//// //wxBillDaily.setOwe(new BigDecimal(newPrice).add(new BigDecimal(dbBill.getServiceChargePay())).subtract(new BigDecimal(dbBill.getPay())).toPlainString()); -//// //wxBillDaily.setOwe(new BigDecimal(newPrice).subtract(new BigDecimal(dbBill.getPay())).toPlainString()); -//// if (newPrice.equals(dbBill.getPay())) { -//// wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); -//// } -//// } -//// wxBillDaily.setUpdatetime(updateDate); -//// wxBillDailyMapper.updateById(wxBillDaily); -// } -// -//// @Override -//// public Object getBillInfo(WxBillAll record) { -//// -//// record.setRentShopType(EnumRentShopType.SHOP.getCode()); -//// record.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); -//// Map oweInfoForShop = wxBillAllMapper.queryOweInfo(record); -//// record.setStatus(EnumBillRentStatus.PAID.getCode()); -//// Map paidInfoForShop = wxBillAllMapper.queryPaidInfo(record); -//// -//// record.setRentShopType(EnumRentShopType.POINT.getCode()); -//// record.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); -//// Map oweInfoForPoint = wxBillAllMapper.queryOweInfo(record); -//// record.setStatus(EnumBillRentStatus.PAID.getCode()); -//// Map paidInfoForPoint = wxBillAllMapper.queryPaidInfo(record); -//// -//// Map result = new HashMap<>(4); -//// result.put("oweInfoForShop", oweInfoForShop); -//// result.put("paidInfoForShop", paidInfoForShop); -//// result.put("oweInfoForPoint", oweInfoForPoint); -//// result.put("paidInfoForPoint", paidInfoForPoint); -//// return result; -//// } -// -// @Override -// public Long hasOweBill(Long contractId, Integer type) { -//// if (type.intValue() == 1) { -//// return wxBillRentMapper.oweBillCount(contractId); -//// } else if (type.intValue() == 2) { -//// return wxBillPropertyMapper.oweBillCount(contractId); -//// } -// return 0L; -// } -// -// public Map>> toMap(List> mapList) { -// Map>> result = new HashMap<>(); -// for (Map bill : mapList) { -// Long merchantId = (Long) bill.get("merchantId"); -// List> currList = result.get(merchantId); -// if (currList == null) { -// currList = new ArrayList<>(); -// } -// currList.add(bill); -// result.put(merchantId, currList); -// } -// return result; -// } -// -// @Override -// public void sendWaitPayBillEmail() { -// List> waitBillListForEmail = wxBillAllMapper.getWaitPayBillForEmail(); -// -// if (CollectionUtils.isNotEmpty(waitBillListForEmail)) { -// Map>> merchantMap = toMap(waitBillListForEmail); -// for (Long merchantId : merchantMap.keySet()) { -// List> mapList = merchantMap.get(merchantId); -// if (CollectionUtils.isNotEmpty(mapList)) { -// String email = (String) mapList.get(0).get("email"); -// if (StringUtils.isBlank(email)) { -// continue; -// } -// String tenantId = (String) mapList.get(0).get("tenantId"); -// String parentTenantId = (String) mapList.get(0).get("parentTenantId"); -// String receiveDate = (String) mapList.get(0).get("receiveDate"); -// String manager = (String) mapList.get(0).get("manager"); -// String managerPhone = (String) mapList.get(0).get("managerPhone"); -// -// TenantEntity tenantEntity = new TenantEntity(); -// tenantEntity.setTenantId(tenantId); -// tenantEntity.setParentTenantId(parentTenantId); -// -// String billListStr = ""; -// BigDecimal sumNeedPay = new BigDecimal(0); -// for (Map bill : mapList) { -// String billType = bill.get("billType").toString(); -// BigDecimal needPay = (BigDecimal) bill.get("needPay"); -// BigDecimal price = needPay.divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -// -// sumNeedPay = sumNeedPay.add(price); -// billListStr += "
"; -// billListStr += "
" + billType + "
"; -// billListStr += "
" + price + "
"; -// billListStr += "
" + receiveDate + "
"; -// billListStr += "
"; -// } -// //发邮件 -// Map map = new HashedMap(); -// map.put("price", sumNeedPay.toString()); -// map.put("date", receiveDate); -// map.put("billList", billListStr); -// map.put("linkName", manager == null ? "" : manager); -// map.put("linkPhone", managerPhone == null ? "" : managerPhone); -// MailMsg mailMsg = new MailMsg(); -// mailMsg.setSubject("待缴账单通知"); -// mailMsg.setHtml(true); -// mailMsg.setMsgType(EnumMsgRecordType.EMAIL.getCode()); -// mailMsg.setModelType(EnumMailMsgModel.MAIL_BILL_WAIT_PAY.getCode()); -// mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode()); -// mailMsg.setTo(new String[]{email}); -// mailMsg.updateTenantInfo(tenantEntity); -// mailMsg.setDynamicContentMap(map); -// mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); -// } -// } -// } -// } -// -// @Override -// public void sendOweBillForEmail() { -// List> oweBillForEmail = wxBillAllMapper.getOweBillForEmail(); -// -// if (CollectionUtils.isNotEmpty(oweBillForEmail)) { -// Map>> merchantMap = toMap(oweBillForEmail); -// for (Long merchantId : merchantMap.keySet()) { -// List> mapList = merchantMap.get(merchantId); -// if (CollectionUtils.isNotEmpty(mapList)) { -// String email = (String) mapList.get(0).get("email"); -// if (StringUtils.isBlank(email)) { -// continue; -// } -// String tenantId = (String) mapList.get(0).get("tenantId"); -// String parentTenantId = (String) mapList.get(0).get("parentTenantId"); -// String receiveDate = (String) mapList.get(0).get("receiveDate"); -// String manager = (String) mapList.get(0).get("manager"); -// String managerPhone = (String) mapList.get(0).get("managerPhone"); -// Long expiredDay = (Long) mapList.get(0).get("expiredDay"); -// -// TenantEntity tenantEntity = new TenantEntity(); -// tenantEntity.setTenantId(tenantId); -// tenantEntity.setParentTenantId(parentTenantId); -// -// String billListStr = ""; -// BigDecimal sumNeedPay = new BigDecimal(0); -// for (Map bill : mapList) { -// String billType = bill.get("billType").toString(); -// BigDecimal needPay = (BigDecimal) bill.get("owe"); -// BigDecimal price = needPay.divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); -// -// sumNeedPay = sumNeedPay.add(price); -// billListStr += "
"; -// billListStr += "
"; -// billListStr += "
" + billType + "
"; -// billListStr += "
" + price + "
"; -// billListStr += "
" + receiveDate + "
"; -// billListStr += "
" + expiredDay + "
"; -// billListStr += "
"; -// } -// //发邮件 -// Map map = new HashedMap(); -// map.put("price", sumNeedPay.toString()); -// map.put("date", receiveDate); -// map.put("billList", billListStr); -// map.put("linkName", manager == null ? "" : manager); -// map.put("linkPhone", managerPhone == null ? "" : managerPhone); -// MailMsg mailMsg = new MailMsg(); -// mailMsg.setSubject("欠缴账单通知"); -// mailMsg.setHtml(true); -// mailMsg.setMsgType(EnumMsgRecordType.EMAIL.getCode()); -// mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode()); -// mailMsg.setModelType(EnumMailMsgModel.MAIL_BILL_OWE.getCode()); -// mailMsg.setTo(new String[]{email}); -// mailMsg.updateTenantInfo(tenantEntity); -// mailMsg.setDynamicContentMap(map); -// mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); -// } -// } -// } -// -// } -// -// @Override -// public Map getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize) { -// PageInfo> pageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxBillAllMapper.getOweBillAsPage(record)); -// List> list = pageInfo.getList(); -// for (Map map : list) { -// map.put("rentOwe", subZeroAndDot(map.get("rentOwe").toString())); -// map.put("bussinessManageOwe", subZeroAndDot(map.get("bussinessManageOwe").toString())); -// map.put("operatingManageOwe", subZeroAndDot(map.get("operatingManageOwe").toString())); -// map.put("propertyOwe", subZeroAndDot(map.get("propertyOwe").toString())); -// map.put("depositOwe", subZeroAndDot(map.get("depositOwe").toString())); -// map.put("otherOwe", subZeroAndDot(map.get("otherOwe").toString())); -// map.put("totalOwe", subZeroAndDot(map.get("totalOwe").toString())); -// } -// pageInfo.setList(list); -// Map result = new HashMap<>(); -// result.put("pageInfo", pageInfo); -// return result; -// } -// -//// @Override -//// public Map getReceiveAndPayBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize) { -//// Map result = new HashMap<>(); -//// record.setLimitStart(0); -//// record.setLimitEnd(Integer.MAX_VALUE); -//// List totalList = wxBillAllMapper.getReceiveAndPayBillAsPage(record); -//// if (CollectionUtils.isEmpty(totalList)) { -//// PageHelper.startPage(pageNum, pageSize); -//// PageInfo> pageInfo = new PageInfo(new ArrayList()); -//// pageInfo.setPages(0); -//// pageInfo.setTotal(0); -//// PageHelper.clearPage(); -//// result.put("pageInfo", pageInfo); -//// return result; -//// } -//// -//// int total = totalList.size(); -//// int pages; -//// if (total % pageSize == 0) { -//// pages = total / pageSize; -//// } else { -//// pages = total / pageSize + 1; -//// } -//// record.setLimitStart((pageNum - 1) * pageSize); -//// record.setLimitEnd(pageSize); -//// List> list = wxBillAllMapper.getReceiveAndPayBillAsPage(record); -//// -//// PageHelper.startPage(pageNum, pageSize); -//// PageInfo> pageInfo = new PageInfo(list); -//// pageInfo.setPages(pages); -//// pageInfo.setTotal(total); -//// PageHelper.clearPage(); -//// result.put("pageInfo", pageInfo); -//// return result; -//// } -// -// @Override -// public PageInfo getReceiveAndPayBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize) { -// PageInfo pageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxBillAllMapper.getReceiveAndPayBillAsPage(record)); -// return pageInfo; -// } -// -// /** -// * 使用java正则表达式去掉多余的.与0 -// * -// * @param s -// * @return -// */ -// public static String subZeroAndDot(String s) { -// if (s.indexOf(".") > 0) { -// s = s.replaceAll("0+?$", "");//去掉多余的0 -// s = s.replaceAll("[.]$", "");//如最后一位是.则去掉 -// } -// return s; -// } -// -// @Override -// public void exportOweMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response) { -// List> data = wxBillAllMapper.getOweBillAsPage(record); -// List list = new ArrayList<>(); -// for (Map map : data) { -// OweMerchantVo oweMerchantVo = new OweMerchantVo(); -// oweMerchantVo.setLinkPerson((String) map.get("manager")); -// oweMerchantVo.setName((String) map.get("merchantName")); -// oweMerchantVo.setLinkPhone((String) map.get("managerPhone")); -// -// oweMerchantVo.setDepositOwe(new BigDecimal(subZeroAndDot(map.get("depositOwe").toString()))); -// oweMerchantVo.setOtherOwe(new BigDecimal(subZeroAndDot(map.get("otherOwe").toString()))); -// oweMerchantVo.setPropertyOwe(new BigDecimal(subZeroAndDot(map.get("propertyOwe").toString()))); -// oweMerchantVo.setRentOwe(new BigDecimal(subZeroAndDot(map.get("rentOwe").toString()))); -// oweMerchantVo.setBussinessManageOwe(new BigDecimal(subZeroAndDot(map.get("bussinessManageOwe").toString()))); -// oweMerchantVo.setOperatingManageOwe(new BigDecimal(subZeroAndDot(map.get("operatingManageOwe").toString()))); -// oweMerchantVo.setTotalOwe(new BigDecimal(subZeroAndDot(map.get("totalOwe").toString()))); -// list.add(oweMerchantVo); -// } -// String name = "欠缴商户列表"; -// excelService.exportExcel(list, null, name, OweMerchantVo.class, name + ".xlsx", response, false); -// } -// -// @Override -// public void exportReceiveAndPayBillAsPage(WxBillAll record, HttpServletRequest request, HttpServletResponse response) { -// List> data = wxBillAllMapper.getReceiveAndPayBillAsPage(record); -// List list = new ArrayList<>(); -// for (Map map : data) { -// ReceivedAndPayVo oweMerchantVo = new ReceivedAndPayVo(); -// oweMerchantVo.setLinkPerson((String) map.get("linkPerson")); -// oweMerchantVo.setName((String) map.get("name")); -// oweMerchantVo.setLinkPhone((String) map.get("linkPhone")); -// oweMerchantVo.setShopNumber((String) map.get("shopNumber")); -// if (EnumRentShopType.POINT.getCode().equals(map.get("type"))) { -// oweMerchantVo.setShopType("多经点位"); -// } else if (EnumRentShopType.SHOP.getCode().equals(map.get("type"))) { -// oweMerchantVo.setShopType("商铺"); -// } -// oweMerchantVo.setReceivePay(map.get("receivePay") == null ? "0" : map.get("receivePay").toString()); -// oweMerchantVo.setPayOut(map.get("payOut") == null ? "0" : map.get("payOut").toString()); -// oweMerchantVo.setBalance(map.get("balance") == null ? "0" : map.get("balance").toString()); -// list.add(oweMerchantVo); -// } -// String name = "商户账单列表"; -// excelService.exportExcel(list, null, name, ReceivedAndPayVo.class, name + ".xlsx", response, false); -// } -// -// @Override -// public void exportWaitMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response) { -// List> data = wxBillAllMapper.getOweBillAsPage(record); -// List list = new ArrayList<>(); -// for (Map map : data) { -// WaitMerchantVo oweMerchantVo = new WaitMerchantVo(); -// oweMerchantVo.setLinkPerson((String) map.get("manager")); -// oweMerchantVo.setName((String) map.get("merchantName")); -// oweMerchantVo.setLinkPhone((String) map.get("managerPhone")); -// -// oweMerchantVo.setRentReceivePay(new BigDecimal(subZeroAndDot(map.get("rentReceivePay").toString()))); -// oweMerchantVo.setPropertyReceivePay(new BigDecimal(subZeroAndDot(map.get("propertyReceivePay").toString()))); -// oweMerchantVo.setDepositReceivePay(new BigDecimal(subZeroAndDot(map.get("depositReceivePay").toString()))); -// oweMerchantVo.setOtherReceivePay(new BigDecimal(subZeroAndDot(map.get("otherReceivePay").toString()))); -// oweMerchantVo.setTotalReceivePay(new BigDecimal(subZeroAndDot(map.get("totalReceivePay").toString()))); -// list.add(oweMerchantVo); -// } -// String name = "待缴商户列表"; -// excelService.exportExcel(list, null, name, WaitMerchantVo.class, name + ".xlsx", response, false); -// } -// -// @Override -// public List allDepositList(WxBillAll wxBillAll) { -// WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(wxBillAll); -// List wxBillAllVos = wxBillAllMapper.allDepositList(wxBillAll); -// wxBillAllVos.stream().forEach(e -> { -// cmputeTotalMoney(wxPayAccountBill, e); -// }); -// return wxBillAllVos; -// } -// -// @Override -// public Double calcuteSettleBillReceivePay(Long settleId) { -// List billIds0 = wxBillSettleScheduleMapper.listBillSettleBillBillId(settleId, 0); -// Double pay0 = 0D; -// if (null != billIds0 && billIds0.size() > 0 ) { -// WxBillRent billRent = new WxBillRent(); -// billRent.setIds(billIds0); -// Double billRent0 = wxBillSettleScheduleMapper.calculteRentRecivePay(billRent);//租金 -// Double billRentDeposit0 = wxBillSettleScheduleMapper.calculteRentDepositRecivePay(billRent);//租金押金 -// -// WxBillProperty billProperty = new WxBillProperty(); -// billProperty.setIds(billIds0); -// Double billProperty0 = wxBillSettleScheduleMapper.calcultePropertyRecivePay(billProperty);//物业 -// Double billPropertyDeposit0 = wxBillSettleScheduleMapper.calcultePropertyDepositRecivePay(billProperty);//物业押金 -// -// WxBillDaily billDaily = new WxBillDaily(); -// billDaily.setIds(billIds0); -// Double billDaily0 = wxBillSettleScheduleMapper.calculteDailyRecivePay(billDaily); -// -// WxBillOther billOther = new WxBillOther(); -// billOther.setIds(billIds0); -// Double billOther0 = wxBillSettleScheduleMapper.calculteOtherRecivePay0(billOther); -// Double billOtherDeposit0 = wxBillSettleScheduleMapper.calculteOtherDepositRecivePay0(billOther); -// pay0 = billRent0+billRentDeposit0+billProperty0+billPropertyDeposit0+billDaily0+billOther0+billOtherDeposit0; -// } -// -// List billIds1 = wxBillSettleScheduleMapper.listBillSettleBillBillId(settleId, 1); -// Double pay1 = 0D; -// if (null != billIds1 && billIds1.size() > 0 ) { -// WxBillRent billRent = new WxBillRent(); -// billRent.setIds(billIds1); -// Double billRent1 = wxBillSettleScheduleMapper.calculteRentRecivePay(billRent);//租金 -// Double billRentDeposit1 = wxBillSettleScheduleMapper.calculteRentDepositRecivePay(billRent);//租金押金 -// -// WxBillProperty billProperty = new WxBillProperty(); -// billProperty.setIds(billIds1); -// Double billProperty1 = wxBillSettleScheduleMapper.calcultePropertyRecivePay(billProperty);//物业 -// Double billPropertyDeposit1 = wxBillSettleScheduleMapper.calcultePropertyDepositRecivePay(billProperty);//物业押金 -// -// WxBillDaily billDaily = new WxBillDaily(); -// billDaily.setIds(billIds1); -// Double billDaily1 = wxBillSettleScheduleMapper.calculteDailyRecivePay(billDaily); -// -// WxBillOther billOther = new WxBillOther(); -// billOther.setIds(billIds1); -// Double billOther1 = wxBillSettleScheduleMapper.calculteOtherRecivePay1(billOther); -// Double billOtherDeposit1 = wxBillSettleScheduleMapper.calculteOtherDepositRecivePay0(billOther); -// -// WxMerchantSubsidy merchantSubsidy = new WxMerchantSubsidy(); -// merchantSubsidy.setIds(billIds1); -// Double billMerchantSubsidy1 = wxBillSettleScheduleMapper.calculteMerchantSubsidyRecivePay1(merchantSubsidy); -// -// pay1 = billRent1+billRentDeposit1+billProperty1+billPropertyDeposit1+billDaily1+billOther1+billOtherDeposit1+billMerchantSubsidy1; -// } -// return pay0-pay1; -// } -// -// @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) -// @Override -// public void createBillSettleSchedule(Long settleId, Double settleReceivePay) { -// wxBillSettleScheduleMapper.createScheduleFromBillSettle(settleId, settleReceivePay); -// wxBillSettleMapper.updateRecorded(settleId); -// } -} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java index 7ddfa37e2..40a837c6a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java @@ -177,8 +177,6 @@ public class WxChartServiceImpl implements WxChartDataService { @Autowired WxOrderGroupMapper wxOrderGroupMapper; @Autowired - WxBillAllMapper wxBillAllMapper; - @Autowired WxCUserCarMapper wxCUserCarMapper; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 2237259e7..de5a6ecf4 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -13,7 +13,6 @@ import com.iformall.domain.po.msg.MailMsg; import com.iformall.domain.po.msg.WxMsgRecord; import com.iformall.domain.vo.FlowUserVo; import com.iformall.domain.vo.UserTaskVo; -import com.iformall.domain.vo.WxBillAll; import com.iformall.domain.vo.WxCouponChannelVo; import com.iformall.enums.*; import com.iformall.mapper.*; @@ -85,8 +84,6 @@ public class WxFlowServiceImpl implements WxFlowService { @Autowired private WxFlowConfigMapper wxFlowConfigMapper; @Autowired - private WxBillAllService wxBillAllService; - @Autowired private WxCouponMapper wxCouponMapper; @Autowired private WxCouponService wxCouponService; @@ -328,37 +325,37 @@ public class WxFlowServiceImpl implements WxFlowService { Integer billType = getIngeter(getVariableByKey(variables, "billType")); if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { //账单审批 - MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession"); - Integer billUpdateType = getIngeter(getVariableByKey(variables, "billUpdateType")); - Long oldPrice = Long.parseLong(getVariableByKey(variables, "oldPrice").toString()); - Long newPrice = Long.parseLong(getVariableByKey(variables, "newPrice").toString()); - WxBillAll wxBillAll = new WxBillAll(); - wxBillAll.setId(Long.parseLong(businessId)); - wxBillAll.setBillTypeValue(billType); - if(EnumBillUpdateType.LATEPAY.getCode().equals(billUpdateType)){ //修改滞纳金 - wxBillAll.setOldLatePrice(oldPrice); - wxBillAll.setNewLatePrice(newPrice); - }else{ - wxBillAll.setOldPrice(oldPrice); - wxBillAll.setNewPrice(newPrice); - } - - Integer forcePaidint = Integer.parseInt((getVariableByKey(variables, "forcePaid").toString())); - boolean forcePaid = false; - if (forcePaidint == 1) { - forcePaid = true; - } - - //wxBillAllService.updateReceivePay(wxBillAll, user,forcePaid); - - //账单修改金额,解冻 - List billList = new ArrayList<>(); - WxBillSettleBill settleBill = new WxBillSettleBill(); - settleBill.setBillType(billType); - settleBill.setBillId(Long.parseLong(businessId)); - settleBill.setApplyStatus(EnumBillRentApplyStatus.PASSED.getCode()); - settleBill.setApplyUpdateTime(new Date()); - billList.add(settleBill); +// MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession"); +// Integer billUpdateType = getIngeter(getVariableByKey(variables, "billUpdateType")); +// Long oldPrice = Long.parseLong(getVariableByKey(variables, "oldPrice").toString()); +// Long newPrice = Long.parseLong(getVariableByKey(variables, "newPrice").toString()); +// WxBillAll wxBillAll = new WxBillAll(); +// wxBillAll.setId(Long.parseLong(businessId)); +// wxBillAll.setBillTypeValue(billType); +// if(EnumBillUpdateType.LATEPAY.getCode().equals(billUpdateType)){ //修改滞纳金 +// wxBillAll.setOldLatePrice(oldPrice); +// wxBillAll.setNewLatePrice(newPrice); +// }else{ +// wxBillAll.setOldPrice(oldPrice); +// wxBillAll.setNewPrice(newPrice); +// } +// +// Integer forcePaidint = Integer.parseInt((getVariableByKey(variables, "forcePaid").toString())); +// boolean forcePaid = false; +// if (forcePaidint == 1) { +// forcePaid = true; +// } +// +// //wxBillAllService.updateReceivePay(wxBillAll, user,forcePaid); +// +// //账单修改金额,解冻 +// List billList = new ArrayList<>(); +// WxBillSettleBill settleBill = new WxBillSettleBill(); +// settleBill.setBillType(billType); +// settleBill.setBillId(Long.parseLong(businessId)); +// settleBill.setApplyStatus(EnumBillRentApplyStatus.PASSED.getCode()); +// settleBill.setApplyUpdateTime(new Date()); +// billList.add(settleBill); //wxBillSettleService.updateFreezeOrStatus(billList,EnumFreezeType.DEF.getCode(),null,EnumBillRentApplyStatus.PASSED.getCode()); }else if(EnumRentContractAppStatus.APPLYING.getCode().intValue() == applyStatus.intValue()) { //账单修改金额,冻结 diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPayBillServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPayBillServiceImpl.java index 91e3aec67..cff8e02d9 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPayBillServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPayBillServiceImpl.java @@ -8,10 +8,8 @@ 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.WxBillAll; import com.iformall.enums.*; import com.iformall.exception.MallinkException; -import com.iformall.mapper.WxBillAllMapper; import com.iformall.mapper.WxMerchantBUserMapper; import com.iformall.mapper.WxPayAccountBillMapper; import com.iformall.mapper.WxPayBillMapper; @@ -49,13 +47,6 @@ public class WxPayBillServiceImpl implements WxPayBillService { @Autowired WxPayBillMapper wxPayBillMapper; - @Autowired - WxBillAllMapper wxBillAllMapper; - - @Lazy - @Autowired - WxBillAllService wxBillAllService; - @Autowired WxMerchantBUserMapper wxMerchantBUserMapper; diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml deleted file mode 100644 index 1ce97b0c8..000000000 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ /dev/null @@ -1,1068 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and bill.`tenant_id` = #{tenantId} - - - and bill.`parent_tenant_id` = #{parentTenantId} - - - and date_format(bill.receive_date,'%Y-%m')=#{month} - - and bill.`status` = #{status} - and bill.rent_shop_type = #{rentShopType} - - and bill.receive_date between #{starttime} and #{endtime} - - - and bill.merchant_id=#{merchantId} - - - and bill.`status` in - - #{status} - - - - and bill.freeze = #{freeze} - and bill.id = #{id} - and bill.manage_fee_type = #{manageFeeType} - - - and bill.`merchant_id` in - - #{merchantIdItem} - - - - order by ${sortColumns} - order by bill.receive_date,bill.id desc,bill.merchant_id,bill.status - - - - - - - - - - - - - - - - - - - - - - - - - and bill.id=#{id} - - - and bill.`tenant_id` = #{tenantId} - - - and bill.`parent_tenant_id` = #{parentTenantId} - - - and bill.merchant_id=#{merchantId} - - - and bill.`status` in - - #{status} - - - - and DATE_FORMAT(bill.receive_date,'%Y-%m') between #{starttime} and #{endtime} - - - and bill.status=#{status} - - - and bill.rent_shop_type = #{rentShopType} - - order by bill.merchant_id,bill.status desc,bill.receive_date desc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and status !=6 - - and status = #{status} - - - and date_format(receive_date,'%Y-%m')=#{month} - - - and receive_date >= #{starttime} - - - and receive_date <= #{endtime} - - - - - - - - - -