| @@ -119,6 +119,15 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @ApiOperation("计费标准记录导出") | |||||
| @GetMapping("meterListExport") | |||||
| public void meterListExport(@ModelAttribute WxEnergyMeter record, HttpServletRequest request, HttpServletResponse response) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| wxEnergyService.exportMeter(record, request, response); | |||||
| } | |||||
| @ApiOperation("根据楼座查询楼层和能源表") | @ApiOperation("根据楼座查询楼层和能源表") | ||||
| @GetMapping("floorAndMeterList") | @GetMapping("floorAndMeterList") | ||||
| public ResultData floorAndMeterList(@ModelAttribute WxEnergyMeter record) { | public ResultData floorAndMeterList(@ModelAttribute WxEnergyMeter record) { | ||||
| @@ -1,11 +1,9 @@ | |||||
| package com.iformall.controller.market; | package com.iformall.controller.market; | ||||
| import com.aliyun.openservices.shade.com.alibaba.fastjson.JSON; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.TenantIgnore; | import com.iformall.annotation.TenantIgnore; | ||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.common.SysConfigConstant; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.dto.FinanceSetOffDTO; | import com.iformall.domain.dto.FinanceSetOffDTO; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| @@ -24,35 +22,25 @@ import com.iformall.domain.vo.FinanceBillSetoffSum; | |||||
| import com.iformall.domain.vo.WxFinanceReceiveSumVo; | import com.iformall.domain.vo.WxFinanceReceiveSumVo; | ||||
| import com.iformall.domain.vo.WxFinanceReceiveVo; | import com.iformall.domain.vo.WxFinanceReceiveVo; | ||||
| import com.iformall.enums.EnumBillAllType; | import com.iformall.enums.EnumBillAllType; | ||||
| import com.iformall.enums.EnumContractOperationType; | |||||
| import com.iformall.enums.EnumFinanceCashierType; | import com.iformall.enums.EnumFinanceCashierType; | ||||
| import com.iformall.enums.EnumFinanceFinishStatus; | import com.iformall.enums.EnumFinanceFinishStatus; | ||||
| import com.iformall.enums.EnumFinanceReceiveStatus; | import com.iformall.enums.EnumFinanceReceiveStatus; | ||||
| import com.iformall.enums.EnumFlowContractType; | |||||
| import com.iformall.enums.EnumFlowKey; | import com.iformall.enums.EnumFlowKey; | ||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| import com.iformall.service.SysConfigService; | |||||
| import com.iformall.service.WxEnergyService; | import com.iformall.service.WxEnergyService; | ||||
| import com.iformall.service.WxFinanceService; | import com.iformall.service.WxFinanceService; | ||||
| import com.iformall.service.WxFlowService; | import com.iformall.service.WxFlowService; | ||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| import com.iformall.utils.StringContentUtils; | import com.iformall.utils.StringContentUtils; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import java.io.UnsupportedEncodingException; | |||||
| import java.net.URLDecoder; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import org.apache.commons.lang3.StringEscapeUtils; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -409,6 +397,19 @@ public class WxFinanceController extends BaseController { | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @ApiOperation("收款记录子账单列表") | |||||
| @GetMapping("receiveBillListExport") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| }) | |||||
| public ResultData receiveBillListExport(@ModelAttribute WxFinanceReceiveBill record, Integer pageNum, Integer pageSize) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| PageInfo<WxFinanceReceiveBill> page = wxFinanceService.receiveBillListAsPage(record, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @ApiOperation("收款记录列表(收款列表页面,有子账单)") | @ApiOperation("收款记录列表(收款列表页面,有子账单)") | ||||
| @GetMapping("receiveList") | @GetMapping("receiveList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -648,4 +649,12 @@ public class WxFinanceController extends BaseController { | |||||
| return false; | return false; | ||||
| } | } | ||||
| @ApiOperation("收款统计合计") | |||||
| @GetMapping("receiveSum") | |||||
| public ResultData receiveSum(@ModelAttribute WxFinanceReceive record, Integer pageNum, Integer pageSize) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| WxFinanceReceiveSumVo page = wxFinanceService.getReceiveSum(record); | |||||
| return new ResultData(page); | |||||
| } | |||||
| } | } | ||||
| @@ -7,6 +7,7 @@ import com.iformall.enums.EnumEnergyMeterPhysicsType; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | import com.iformall.enums.EnumEnergyMeterType; | ||||
| import com.iformall.enums.EnumRentShopType; | import com.iformall.enums.EnumRentShopType; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| @@ -23,23 +24,28 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | private static final long serialVersionUID = 7009117540201976664L; | ||||
| @Excel(name = "ID", width = 20, orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | @io.swagger.annotations.ApiModelProperty(value="id",name="id") | ||||
| private Long id; | private Long id; | ||||
| @Excel(name = "表号", width = 20, orderNum = "2") | |||||
| @io.swagger.annotations.ApiModelProperty(value="name",name="name") | @io.swagger.annotations.ApiModelProperty(value="name",name="name") | ||||
| private String name; | private String name; | ||||
| @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "13") | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | ||||
| private Date createTime; | private Date createTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | ||||
| private Date updateTime; | private Date updateTime; | ||||
| @Excel(name = "状态", replace = {"已删除_1", "正常_0"}, width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | ||||
| private Integer type; | private Integer type; | ||||
| @Excel(name = "表类型", width = 20, orderNum = "3") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String typeName; | private String typeName; | ||||
| public String getTypeName() { | public String getTypeName() { | ||||
| @@ -48,12 +54,13 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @Excel(name = "倍率", width = 20, orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value="倍率",name="rate") | @io.swagger.annotations.ApiModelProperty(value="倍率",name="rate") | ||||
| private String rate; | private String rate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "表分组EnumEnergyMeterPhysicsType", name = "physicsType") | @io.swagger.annotations.ApiModelProperty(value = "表分组EnumEnergyMeterPhysicsType", name = "physicsType") | ||||
| private Integer physicsType; | private Integer physicsType; | ||||
| @Excel(name = "表分组", width = 20, orderNum = "5") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String physicsTypeName; | private String physicsTypeName; | ||||
| public String getPhysicsTypeName() { | public String getPhysicsTypeName() { | ||||
| @@ -68,6 +75,7 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺类型EnumRentShopType", name = "shopType") | @io.swagger.annotations.ApiModelProperty(value = "店铺类型EnumRentShopType", name = "shopType") | ||||
| private Integer shopType; | private Integer shopType; | ||||
| @Excel(name = "店铺类型", width = 20, orderNum = "6") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String shopTypeName; | private String shopTypeName; | ||||
| public String getShopTypeName() { | public String getShopTypeName() { | ||||
| @@ -77,9 +85,15 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @Excel(name = "是否参与计费", replace = {"计费_1", "不计费_0"}, width = 20, orderNum = "7") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否参与计费", name = "hasFee") | @io.swagger.annotations.ApiModelProperty(value = "是否参与计费", name = "hasFee") | ||||
| private Integer hasFee; | private Integer hasFee; | ||||
| @Excel(name = "关联", width = 20, orderNum = "8") | |||||
| @TableField(exist = false) | |||||
| private String aliseName; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String treeType="meter"; | private String treeType="meter"; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -107,8 +121,6 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer hasShop; | private Integer hasShop; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String aliseName; | |||||
| @TableField(exist = false) | |||||
| private Long parentMeterId; | private Long parentMeterId; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long childMeterId; | private Long childMeterId; | ||||
| @@ -8,6 +8,7 @@ import com.iformall.enums.EnumBillAllType; | |||||
| import com.iformall.enums.EnumFinanceCashierType; | import com.iformall.enums.EnumFinanceCashierType; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| @@ -23,9 +24,11 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | private static final long serialVersionUID = 7009117540201976664L; | ||||
| @Excel(name = "ID", width = 20, orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | @io.swagger.annotations.ApiModelProperty(value="id",name="id") | ||||
| private Long id; | private Long id; | ||||
| @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "16") | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | ||||
| private Date createTime; | private Date createTime; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -33,17 +36,21 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Date createTimeEnd; | private Date createTimeEnd; | ||||
| @Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "17") | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | ||||
| private Date updateTime; | private Date updateTime; | ||||
| @Excel(name = "收款编号", width = 20, orderNum = "7") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "收款编号", name = "receiveId") | @io.swagger.annotations.ApiModelProperty(value = "收款编号", name = "receiveId") | ||||
| private Long receiveId; | private Long receiveId; | ||||
| @Excel(name = "账单编号", width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单编号", name = "billId") | @io.swagger.annotations.ApiModelProperty(value = "账单编号", name = "billId") | ||||
| private Long billId; | private Long billId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单类型EnumBillAllType", name = "billType") | @io.swagger.annotations.ApiModelProperty(value = "账单类型EnumBillAllType", name = "billType") | ||||
| private Integer billType; | private Integer billType; | ||||
| //@Excel(name = "账单类型", width = 20, orderNum = "9") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String billTypeName; | private String billTypeName; | ||||
| public String getBillTypeName() { | public String getBillTypeName() { | ||||
| @@ -55,16 +62,19 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | ||||
| private Long feesId; | private Long feesId; | ||||
| @Excel(name = "账单科目", width = 20, orderNum = "10") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String feesName; | private String feesName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="支付方式",name="payWay") | @io.swagger.annotations.ApiModelProperty(value="支付方式",name="payWay") | ||||
| private Long payWay; | private Long payWay; | ||||
| @Excel(name = "支付方式", width = 20, orderNum = "11") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String payWayName; | private String payWayName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "类型EnumFinanceCashierType", name = "type") | @io.swagger.annotations.ApiModelProperty(value = "类型EnumFinanceCashierType", name = "type") | ||||
| private Integer type; | private Integer type; | ||||
| @Excel(name = "收付款", width = 20, orderNum = "2") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String typeName; | private String typeName; | ||||
| public String getTypeName() { | public String getTypeName() { | ||||
| @@ -74,18 +84,24 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @Excel(name = "金额", width = 20, orderNum = "12") | |||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="receive") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="receive") | ||||
| private String receive; | private String receive; | ||||
| @Excel(name = "支付给商户金额", width = 20, orderNum = "13") | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付给商户金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="支付给商户金额",name="pay") | ||||
| private String pay; | private String pay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户编号",name="feesId") | |||||
| private Long merchantId; | private Long merchantId; | ||||
| @Excel(name = "商户", width = 20, orderNum = "3") | |||||
| @TableField(exist = false) | |||||
| private String merchantName; | |||||
| @Excel(name = "账单开始周期", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "14") | |||||
| @io.swagger.annotations.ApiModelProperty(value="账单开始周期",name="starttime") | @io.swagger.annotations.ApiModelProperty(value="账单开始周期",name="starttime") | ||||
| private Date starttime; | private Date starttime; | ||||
| @Excel(name = "账单结束周期", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "15") | |||||
| @io.swagger.annotations.ApiModelProperty(value="账单结束周期",name="endtime") | @io.swagger.annotations.ApiModelProperty(value="账单结束周期",name="endtime") | ||||
| private Date endtime; | private Date endtime; | ||||
| @@ -108,19 +124,20 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| } | } | ||||
| return setOff; | return setOff; | ||||
| } | } | ||||
| @TableField(exist = false) | |||||
| private String payWayStr; | |||||
| @TableField(exist = false) | |||||
| private String feesIdStr; | |||||
| @Excel(name = "店铺号", width = 20, orderNum = "4") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Excel(name = "楼栋", width = 20, orderNum = "5") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long building; | private Long building; | ||||
| @Excel(name = "楼层", width = 20, orderNum = "6") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long floor; | private Long floor; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String merchantName; | |||||
| private String payWayStr; | |||||
| @TableField(exist = false) | |||||
| private String feesIdStr; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> payWayList; | private List<Long> payWayList; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -29,6 +29,7 @@ public interface WxEnergyService { | |||||
| //能源表 | //能源表 | ||||
| PageInfo<WxEnergyMeter> meterListAsPage(WxEnergyMeter record, Integer pageIndex, Integer pageSize); | PageInfo<WxEnergyMeter> meterListAsPage(WxEnergyMeter record, Integer pageIndex, Integer pageSize); | ||||
| void exportMeter(WxEnergyMeter record,HttpServletRequest request, HttpServletResponse response); | |||||
| WxEnergyMeter getMeterById(TenantEntity tenantEntity,Long id); | WxEnergyMeter getMeterById(TenantEntity tenantEntity,Long id); | ||||
| List<Long> getMeterIdList(WxEnergyMeter record); | List<Long> getMeterIdList(WxEnergyMeter record); | ||||
| void saveOrUpdateMeter(WxEnergyMeter record); | void saveOrUpdateMeter(WxEnergyMeter record); | ||||
| @@ -4,6 +4,9 @@ import java.util.Date; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import org.springframework.web.bind.annotation.RequestBody; | import org.springframework.web.bind.annotation.RequestBody; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| @@ -12,6 +15,7 @@ import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.domain.po.SysConfig; | import com.iformall.domain.po.SysConfig; | ||||
| import com.iformall.domain.po.WxAllBill; | import com.iformall.domain.po.WxAllBill; | ||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxEnergyFeesShop; | |||||
| import com.iformall.domain.po.WxFinanceFinish; | import com.iformall.domain.po.WxFinanceFinish; | ||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxFinanceReceiveBill; | import com.iformall.domain.po.WxFinanceReceiveBill; | ||||
| @@ -37,6 +41,7 @@ public interface WxFinanceService { | |||||
| PageInfo<WxFinanceReceiveVo> receiveVoListWithBillsAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | PageInfo<WxFinanceReceiveVo> receiveVoListWithBillsAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | ||||
| PageInfo<WxFinanceReceiveVo> receiveVoListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | PageInfo<WxFinanceReceiveVo> receiveVoListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | ||||
| PageInfo<WxFinanceReceiveBill> receiveBillListAsPage(WxFinanceReceiveBill record, Integer pageIndex, Integer pageSize); | PageInfo<WxFinanceReceiveBill> receiveBillListAsPage(WxFinanceReceiveBill record, Integer pageIndex, Integer pageSize); | ||||
| void exportReceiveBill(WxFinanceReceiveBill record,HttpServletRequest request, HttpServletResponse response); | |||||
| List<WxFinanceReceive> findReceiveList(WxFinanceReceive record); | List<WxFinanceReceive> findReceiveList(WxFinanceReceive record); | ||||
| Map createReceive(WxFinanceReceive record,MallUserInfo user); | Map createReceive(WxFinanceReceive record,MallUserInfo user); | ||||
| Map createCut(WxFinanceReceive record,MallUserInfo user); | Map createCut(WxFinanceReceive record,MallUserInfo user); | ||||
| @@ -127,9 +127,71 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| } | } | ||||
| } | } | ||||
| PageInfo<WxEnergyMeter> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxEnergyMeterMapper.findList(record)); | PageInfo<WxEnergyMeter> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxEnergyMeterMapper.findList(record)); | ||||
| if (null != page && null != page.getList()) { | |||||
| List<Long> meterIds = new ArrayList<Long>(); | |||||
| for (int i = 0 ; i < page.getList().size() ; i ++) { | |||||
| WxEnergyMeter m = page.getList().get(i); | |||||
| meterIds.add(m.getId()); | |||||
| } | |||||
| WxEnergyMeterShopFloor sfq = new WxEnergyMeterShopFloor(); | |||||
| sfq.updateTenantInfo(record); | |||||
| sfq.setMeterIds(meterIds); | |||||
| List<WxEnergyMeterShopFloor> aliseList = wxEnergyMeterShopFloorMapper.findList(sfq); | |||||
| Map<Long,String> meterAliasMap = new HashMap<Long,String>(); | |||||
| if (null != aliseList) { | |||||
| Map<Long, String> buildingMap = wxMallBuildingService.getBuildingMap(record); | |||||
| Map<Long, String> floorMap = wxMallFloorService.getFloorMap(record); | |||||
| WxShop sq = new WxShop(); | |||||
| sq.updateTenantInfo(record); | |||||
| Map<Long, WxShop> shopMap = wxShopService.findShopMap(sq); | |||||
| for (int i = 0 ; i < aliseList.size(); i++) { | |||||
| WxEnergyMeterShopFloor sf = aliseList.get(i); | |||||
| String alias = meterAliasMap.get(sf.getMeterId()); | |||||
| alias = StringUtils.trimToEmpty(alias); | |||||
| if (sf.getType() == EnumEnergyMeterShopFloorType.SHOP.getCode()) { | |||||
| if (null != shopMap ) { | |||||
| WxShop shop = shopMap.get(sf.getAliseId()); | |||||
| if (null != shop) { | |||||
| alias = alias +"["+EnumEnergyMeterShopFloorType.SHOP.getMessage()+"]"+shop.getShopNumber()+","; | |||||
| } | |||||
| } | |||||
| }else if (sf.getType() == EnumEnergyMeterShopFloorType.BUILDING.getCode()) { | |||||
| if (null != buildingMap ) { | |||||
| String build = buildingMap.get(sf.getAliseId()); | |||||
| alias = alias +"["+EnumEnergyMeterShopFloorType.BUILDING.getMessage()+"]"+build+","; | |||||
| } | |||||
| }else if (sf.getType() == EnumEnergyMeterShopFloorType.FLOOR.getCode()) { | |||||
| if (null != floorMap ) { | |||||
| String floor = floorMap.get(sf.getAliseId()); | |||||
| alias = alias +"["+EnumEnergyMeterShopFloorType.FLOOR.getMessage()+"]"+floor+","; | |||||
| } | |||||
| } | |||||
| meterAliasMap.put(sf.getMeterId(), alias); | |||||
| } | |||||
| } | |||||
| for (int i = 0 ; i < page.getList().size() ; i ++) { | |||||
| WxEnergyMeter m = page.getList().get(i); | |||||
| m.setAliseName(meterAliasMap.get(m.getId())); | |||||
| } | |||||
| } | |||||
| return page; | return page; | ||||
| } | } | ||||
| @Override | |||||
| public void exportMeter(WxEnergyMeter record, HttpServletRequest request, HttpServletResponse response) { | |||||
| PageInfo<WxEnergyMeter> page = meterListAsPage(record, 1, 10000); | |||||
| List<WxEnergyMeter> list = null; | |||||
| if (null == page || null == page.getList()) { | |||||
| list = new ArrayList<WxEnergyMeter>(); | |||||
| }else { | |||||
| list = page.getList(); | |||||
| } | |||||
| excelService.exportExcel(list, null, "能源表", WxEnergyMeter.class, "能源表.xlsx", response, false); | |||||
| } | |||||
| @Override | @Override | ||||
| public WxEnergyMeter getMeterById(TenantEntity tenantEntity,Long id) { | public WxEnergyMeter getMeterById(TenantEntity tenantEntity,Long id) { | ||||
| return wxEnergyMeterMapper.selectById(id, tenantEntity.getTenantId()); | return wxEnergyMeterMapper.selectById(id, tenantEntity.getTenantId()); | ||||
| @@ -333,7 +395,7 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| WxShop sq = new WxShop(); | WxShop sq = new WxShop(); | ||||
| sq.updateTenantInfo(record); | sq.updateTenantInfo(record); | ||||
| sq.setIds(shopIdList); | sq.setIds(shopIdList); | ||||
| wxShopService.findShopMap(sq); | |||||
| shopMap = wxShopService.findShopMap(sq); | |||||
| } | } | ||||
| Map<Long,String> meterAliasMap = new HashMap<Long,String>(); | Map<Long,String> meterAliasMap = new HashMap<Long,String>(); | ||||
| @@ -818,7 +880,13 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| @Override | @Override | ||||
| public void exportFeesShop(WxEnergyFeesShop record, HttpServletRequest request, HttpServletResponse response) { | public void exportFeesShop(WxEnergyFeesShop record, HttpServletRequest request, HttpServletResponse response) { | ||||
| PageInfo<WxEnergyFeesShop> page = feesShopListAsPage(record, 1, 10000); | PageInfo<WxEnergyFeesShop> page = feesShopListAsPage(record, 1, 10000); | ||||
| excelService.exportExcel(page.getList(), null, "计算标准", WxEnergyFeesShop.class, "计算标准.xlsx", response, false); | |||||
| List<WxEnergyFeesShop> list = null; | |||||
| if (null == page || null == page.getList()) { | |||||
| list = new ArrayList<WxEnergyFeesShop>(); | |||||
| }else { | |||||
| list = page.getList(); | |||||
| } | |||||
| excelService.exportExcel(list, null, "计算标准", WxEnergyFeesShop.class, "计算标准.xlsx", response, false); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -17,6 +17,7 @@ import com.iformall.domain.po.WxAllBill; | |||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxEnergyFees; | import com.iformall.domain.po.WxEnergyFees; | ||||
| import com.iformall.domain.po.WxEnergyFeesSetoff; | import com.iformall.domain.po.WxEnergyFeesSetoff; | ||||
| import com.iformall.domain.po.WxEnergyFeesShop; | |||||
| import com.iformall.domain.po.WxFinanceFinish; | import com.iformall.domain.po.WxFinanceFinish; | ||||
| import com.iformall.domain.po.WxFinancePrintData; | import com.iformall.domain.po.WxFinancePrintData; | ||||
| import com.iformall.domain.po.WxFinancePrintTemplate; | import com.iformall.domain.po.WxFinancePrintTemplate; | ||||
| @@ -49,6 +50,7 @@ import com.iformall.mapper.WxFinanceReceiveBillMapper; | |||||
| import com.iformall.mapper.WxFinanceReceiveMapper; | import com.iformall.mapper.WxFinanceReceiveMapper; | ||||
| import com.iformall.mapper.WxFinanceReceivePaywayMapper; | import com.iformall.mapper.WxFinanceReceivePaywayMapper; | ||||
| import com.iformall.mapper.WxFinanceReceiveSetoffMapper; | import com.iformall.mapper.WxFinanceReceiveSetoffMapper; | ||||
| import com.iformall.service.ExcelService; | |||||
| import com.iformall.service.SysConfigService; | import com.iformall.service.SysConfigService; | ||||
| import com.iformall.service.WxAllBillService; | import com.iformall.service.WxAllBillService; | ||||
| import com.iformall.service.WxEnergyService; | import com.iformall.service.WxEnergyService; | ||||
| @@ -76,6 +78,9 @@ import java.util.HashMap; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| /** | /** | ||||
| */ | */ | ||||
| @Service | @Service | ||||
| @@ -121,6 +126,8 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| private SysConfigService sysConfigService; | private SysConfigService sysConfigService; | ||||
| @Autowired | |||||
| ExcelService excelService; | |||||
| @@ -656,6 +663,18 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public void exportReceiveBill(WxFinanceReceiveBill record, HttpServletRequest request, HttpServletResponse response) { | |||||
| PageInfo<WxFinanceReceiveBill> page = receiveBillListAsPage(record, 1, 10000); | |||||
| List<WxFinanceReceiveBill> list = null; | |||||
| if (null == page || null == page.getList()) { | |||||
| list = new ArrayList<WxFinanceReceiveBill>(); | |||||
| }else { | |||||
| list = page.getList(); | |||||
| } | |||||
| excelService.exportExcel(list, null, "收款明细", WxFinanceReceiveBill.class, "收款明细.xlsx", response, false); | |||||
| } | |||||
| @Override | @Override | ||||
| public List<WxFinanceReceive> findReceiveList(WxFinanceReceive record) { | public List<WxFinanceReceive> findReceiveList(WxFinanceReceive record) { | ||||
| initQueryParam(record); | initQueryParam(record); | ||||
| @@ -28,25 +28,25 @@ | |||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | ||||
| <if test=" null != aliseId ">and `alise_id` = #{aliseId}</if> | <if test=" null != aliseId ">and `alise_id` = #{aliseId}</if> | ||||
| <if test=" null != meterIds "> | |||||
| <if test=" null != meterIds and meterIds.size > 0 "> | |||||
| and meter_id in | and meter_id in | ||||
| <foreach collection="meterIds" index="index" item="midItem" open="(" separator="," close=")"> | <foreach collection="meterIds" index="index" item="midItem" open="(" separator="," close=")"> | ||||
| #{midItem} | #{midItem} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| <if test=" null != aliseIdList "> | |||||
| <if test=" null != aliseIdList and aliseIdList.size > 0 "> | |||||
| and alise_id in | and alise_id in | ||||
| <foreach collection="aliseIdList" index="index" item="aidItem" open="(" separator="," close=")"> | <foreach collection="aliseIdList" index="index" item="aidItem" open="(" separator="," close=")"> | ||||
| #{aidItem} | #{aidItem} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| <if test=" null != typeList "> | |||||
| <if test=" null != typeList and typeList.size > 0 "> | |||||
| and type in | and type in | ||||
| <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | ||||
| #{tidItem} | #{tidItem} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| <if test=" null != ids "> | |||||
| <if test=" null != ids and ids.size > 0 "> | |||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| #{idItem} | #{idItem} | ||||