| @@ -269,4 +269,17 @@ public class WxFinanceController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("冲抵列表") | |||||
| @GetMapping("receiveSetoffList") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| }) | |||||
| public ResultData receiveSetoffList(@ModelAttribute WxFinanceReceive record, Integer pageNum, Integer pageSize) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| PageInfo<WxFinanceReceive> page = wxFinanceService.receiveListAsPage(record, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| } | } | ||||
| @@ -1,7 +1,10 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumBillAllType; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| @@ -33,9 +36,16 @@ public class WxFinanceReceiveSetoff extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单类型EnumBillAllType", name = "billType") | @io.swagger.annotations.ApiModelProperty(value = "账单类型EnumBillAllType", name = "billType") | ||||
| private Integer billType; | private Integer billType; | ||||
| @TableField(exist = false) | |||||
| private String billTypeName; | |||||
| public String getBillTypeName() { | |||||
| return EnumBillAllType.getEnum(billType).getMessage(); | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | ||||
| private Long feesId; | private Long feesId; | ||||
| @TableField(exist = false) | |||||
| private String feesName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="冲抵金额",name="setoff") | @io.swagger.annotations.ApiModelProperty(value="冲抵金额",name="setoff") | ||||
| private String setoff; | private String setoff; | ||||
| @@ -8,6 +8,7 @@ import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxFinanceReceiveBill; | import com.iformall.domain.po.WxFinanceReceiveBill; | ||||
| import com.iformall.domain.po.WxFinanceReceiveSetoff; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.po.base.WxBillBaseEntity; | import com.iformall.domain.po.base.WxBillBaseEntity; | ||||
| import com.iformall.domain.vo.FinanceBillSetoffSum; | import com.iformall.domain.vo.FinanceBillSetoffSum; | ||||
| @@ -34,5 +35,6 @@ public interface WxFinanceService { | |||||
| FinanceBillSetoffSum getBillSetoffSum(WxFinanceReceive record); | FinanceBillSetoffSum getBillSetoffSum(WxFinanceReceive record); | ||||
| List<WxFinanceReceive> getSetOffList(FinanceSetOffDTO dto,boolean isMerge); | List<WxFinanceReceive> getSetOffList(FinanceSetOffDTO dto,boolean isMerge); | ||||
| void createAdvance(WxFinanceReceive record,MallUserInfo user); | void createAdvance(WxFinanceReceive record,MallUserInfo user); | ||||
| PageInfo<WxFinanceReceiveSetoff> receiveSetoffListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | |||||
| } | } | ||||
| @@ -762,6 +762,30 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| wxFinanceReceiveMapper.insert(record); | wxFinanceReceiveMapper.insert(record); | ||||
| } | } | ||||
| @Override | |||||
| public PageInfo<WxFinanceReceiveSetoff> receiveSetoffListAsPage(WxFinanceReceive record, Integer pageIndex, | |||||
| Integer pageSize) { | |||||
| WxFinanceReceiveSetoff rsq = new WxFinanceReceiveSetoff(); | |||||
| rsq.updateTenantInfo(record); | |||||
| rsq.setAdvanceId(record.getId()); | |||||
| PageInfo<WxFinanceReceiveSetoff> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFinanceReceiveSetoffMapper.findList(rsq)); | |||||
| if (null != page && null != page.getList()) { | |||||
| WxEnergyFees fq = new WxEnergyFees(); | |||||
| fq.updateTenantInfo(record); | |||||
| Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(fq); | |||||
| for (int i = 0 ; i < page.getList().size(); i++ ) { | |||||
| WxFinanceReceiveSetoff frs = page.getList().get(i); | |||||
| if (null != feesMap && null != frs.getFeesId()) { | |||||
| WxEnergyFees ef = feesMap.get(frs.getFeesId()); | |||||
| if (null != ef) { | |||||
| frs.setFeesName(ef.getName()); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| return page; | |||||
| } | |||||