| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller.contract; | package com.iformall.controller.contract; | ||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.UserDataRuleAnnotation; | import com.iformall.annotation.UserDataRuleAnnotation; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| @@ -36,6 +37,7 @@ import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.HashMap; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -67,7 +69,19 @@ public class WxPropertyContractController extends WxContractBaseController { | |||||
| wxPropertyContract = new WxPropertyContract(); | wxPropertyContract = new WxPropertyContract(); | ||||
| } | } | ||||
| wxPropertyContract.updateTenantInfo(getTenantInfo()); | wxPropertyContract.updateTenantInfo(getTenantInfo()); | ||||
| Map<String, Object> result = wxPropertyContractService.listAsPage(wxPropertyContract, pageNum, pageSize); | |||||
| Map<String, Object> result = new HashMap<>(); | |||||
| PageInfo<WxPropertyContract> pageInfo = wxPropertyContractService.listAsPage(wxPropertyContract, pageNum, pageSize); | |||||
| if (null != pageInfo && null != pageInfo.getList()) { | |||||
| for (WxPropertyContract wpc : pageInfo.getList()) { | |||||
| if(propertyContractHasWorkFlow(wpc)) { | |||||
| wpc.setFlowHas(1); | |||||
| }else { | |||||
| wpc.setFlowHas(0); | |||||
| } | |||||
| } | |||||
| } | |||||
| result.put("pageInfo", pageInfo); | |||||
| return new ResultData(result); | return new ResultData(result); | ||||
| } | } | ||||
| @@ -87,7 +87,18 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| wxRentContract.updateTenantInfo(getTenantInfo()); | wxRentContract.updateTenantInfo(getTenantInfo()); | ||||
| wxRentContract.setSortColumns(SortField.Createtime_DESC); | wxRentContract.setSortColumns(SortField.Createtime_DESC); | ||||
| //Map<String, Object> result = wxRentContractService.listAsPage(wxRentContract, pageNum, pageSize); | //Map<String, Object> result = wxRentContractService.listAsPage(wxRentContract, pageNum, pageSize); | ||||
| return new ResultData(wxRentContractService.getRentContractList(wxRentContract, pageNum, pageSize)); | |||||
| PageInfo<WxRentContract> page = wxRentContractService.getRentContractList(wxRentContract, pageNum, pageSize); | |||||
| if (null != page && null != page.getList()) { | |||||
| for (WxRentContract wrc: page.getList()) { | |||||
| if(rentContractHasWorkFlow(wrc)) { | |||||
| wrc.setFlowHas(1); | |||||
| }else { | |||||
| wrc.setFlowHas(0); | |||||
| } | |||||
| } | |||||
| } | |||||
| return new ResultData(page); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -183,6 +183,10 @@ public class WxPropertyContract extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "审批备注", name = "remark") | @io.swagger.annotations.ApiModelProperty(value = "审批备注", name = "remark") | ||||
| private String remark; | private String remark; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否有工作流 1:有 0:无", name = "flowHas") | |||||
| @TableField(exist = false) | |||||
| private Integer flowHas; | |||||
| // public Integer getAdjustPeriod() { | // public Integer getAdjustPeriod() { | ||||
| // if(EnumPriceUnit.D.getCode().equals(this.getPriceUnit()) && EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode().equals(adjustPeriod)){ | // if(EnumPriceUnit.D.getCode().equals(this.getPriceUnit()) && EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode().equals(adjustPeriod)){ | ||||
| @@ -250,6 +250,11 @@ public class WxRentContract extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "查询店铺", name = "queryShopId") | @io.swagger.annotations.ApiModelProperty(value = "查询店铺", name = "queryShopId") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long queryShopId; | private Long queryShopId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否有工作流 1:有 0:无", name = "flowHas") | |||||
| @TableField(exist = false) | |||||
| private Integer flowHas; | |||||
| public void setAdjustPeriodHandle() { | public void setAdjustPeriodHandle() { | ||||
| if(EnumPriceUnit.D.getCode().equals(this.getPriceUnit()) && EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode().equals(adjustPeriod)){ | if(EnumPriceUnit.D.getCode().equals(this.getPriceUnit()) && EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode().equals(adjustPeriod)){ | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.service; | package com.iformall.service; | ||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| @@ -28,7 +29,7 @@ public interface WxPropertyContractService { | |||||
| * @param pageSize | * @param pageSize | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxPropertyContract> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -77,15 +77,15 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| WxPayAccountBillService wxPayAccountBillService; | WxPayAccountBillService wxPayAccountBillService; | ||||
| @Override | @Override | ||||
| public Map<String, Object> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize) { | |||||
| public PageInfo<WxPropertyContract> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize) { | |||||
| //Object rentContractStatusInfo = getRentContractStatusInfo(record); | //Object rentContractStatusInfo = getRentContractStatusInfo(record); | ||||
| //PageHelper.startPage(pageIndex, pageSize); | //PageHelper.startPage(pageIndex, pageSize); | ||||
| //List<Map<String, Object>> rentContractData = wxPropertyContractMapper.queryPropertyContractData(record); | //List<Map<String, Object>> rentContractData = wxPropertyContractMapper.queryPropertyContractData(record); | ||||
| Map<String, Object> result = new HashMap<>(); | |||||
| PageInfo<WxPropertyContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPropertyContractMapper.findList(record)); | |||||
| //Map<String, Object> result = new HashMap<>(); | |||||
| PageInfo<WxPropertyContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPropertyContractMapper.findList(record)); | |||||
| //result.put("rentContractStatusInfo", rentContractStatusInfo); | //result.put("rentContractStatusInfo", rentContractStatusInfo); | ||||
| result.put("pageInfo", pageInfo); | |||||
| return result; | |||||
| //result.put("pageInfo", pageInfo); | |||||
| return pageInfo; | |||||
| } | } | ||||
| @Override | @Override | ||||