| @@ -1,9 +1,10 @@ | |||||
| 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.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxRentContract; | |||||
| import com.iformall.domain.vo.WxRentPropertyContractVo; | |||||
| import com.iformall.service.WxRentContractService; | import com.iformall.service.WxRentContractService; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -15,8 +16,6 @@ import org.springframework.web.bind.annotation.ModelAttribute; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| */ | */ | ||||
| @@ -33,14 +32,14 @@ public class WxRentPropertyContractController extends BaseController { | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| @SystemControllerLog(description = "租赁物业合同-列表") | @SystemControllerLog(description = "租赁物业合同-列表") | ||||
| public ResultData list(@ModelAttribute WxRentContract wxRentContract, Integer pageNum, Integer pageSize) { | |||||
| public ResultData list(@ModelAttribute WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::list"); | logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::list"); | ||||
| if (null == wxRentContract) { | |||||
| wxRentContract = new WxRentContract(); | |||||
| if (null == wxRentPropertyContractVo) { | |||||
| wxRentPropertyContractVo = new WxRentPropertyContractVo(); | |||||
| } | } | ||||
| wxRentContract.setTenantId(getTenantId()); | |||||
| Map<String, Object> result = wxRentContractService.listAsPage(wxRentContract, pageNum, pageSize); | |||||
| return new ResultData(result); | |||||
| wxRentPropertyContractVo.setTenantId(getTenantId()); | |||||
| final PageInfo<WxRentPropertyContractVo> page = wxRentContractService.listContractVo(wxRentPropertyContractVo, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,4 @@ | |||||
| #租赁合同 | |||||
| alter table wx_rent_contract add column operation_type smallint(2) default 1 comment '1区分租赁物业2合并租赁物业'; | |||||
| #物业合同 | |||||
| alter table wx_property_contract add column operation_type smallint(2) default 1 comment '1区分租赁物业2合并租赁物业'; | |||||
| @@ -180,6 +180,9 @@ public class WxPropertyContract extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "1按租赁日生产2按计租日生成账单", name = "rentStartType") | @io.swagger.annotations.ApiModelProperty(value = "1按租赁日生产2按计租日生成账单", name = "rentStartType") | ||||
| private Integer rentStartType; | private Integer rentStartType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业", name = "operationType") | |||||
| private Integer operationType; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -226,6 +226,10 @@ public class WxRentContract extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "年租金调整方式1按比例2按金额", name = "adjust_ratio_way") | @io.swagger.annotations.ApiModelProperty(value = "年租金调整方式1按比例2按金额", name = "adjust_ratio_way") | ||||
| private Integer adjustRatioWay; | private Integer adjustRatioWay; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业", name = "operationType") | |||||
| private Integer operationType; | |||||
| // 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)){ | ||||
| // return EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode(); | // return EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode(); | ||||
| @@ -7,7 +7,7 @@ import lombok.ToString; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.util.List; | |||||
| import java.util.Date; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -16,11 +16,10 @@ import java.util.List; | |||||
| @ToString(callSuper = true) | @ToString(callSuper = true) | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxRentPropertyContractVo extends BaseEntity { | public class WxRentPropertyContractVo extends BaseEntity { | ||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @Transient | |||||
| protected List<Long> ids; | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| @@ -42,7 +41,32 @@ public class WxRentPropertyContractVo extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "商户名称", name = "merchantName") | @io.swagger.annotations.ApiModelProperty(value = "商户名称", name = "merchantName") | ||||
| private String merchantName; | private String merchantName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "计租开始时间", name = "rentalStartDate") | |||||
| private Date rentalStartDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "计租结束时间", name = "rentalEndDate") | |||||
| private Date rentalEndDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租金", name = "rentPrice") | |||||
| private String rentPrice; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "物业费", name = "propertyPrice") | |||||
| private String propertyPrice; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "计租类型", name = "type") | |||||
| private Integer type; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "合同状态", name = "status") | |||||
| private Integer status; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "审批状态", name = "applyStatus") | |||||
| private Integer applyStatus; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业", name = "operationType") | |||||
| private Integer operationType; | |||||
| } | } | ||||
| @@ -1,9 +1,11 @@ | |||||
| 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.WxBillRent; | import com.iformall.domain.po.WxBillRent; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import com.iformall.domain.vo.WxRentPropertyContractVo; | |||||
| import io.swagger.models.auth.In; | import io.swagger.models.auth.In; | ||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| @@ -85,4 +87,7 @@ public interface WxRentContractService { | |||||
| ResultData hasContractNumber(WxRentContract wxRentContract); | ResultData hasContractNumber(WxRentContract wxRentContract); | ||||
| Integer getShopType(WxRentContract wxRentContract); | Integer getShopType(WxRentContract wxRentContract); | ||||
| PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize); | |||||
| } | } | ||||
| @@ -10,6 +10,7 @@ import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.vo.BillTimeVo; | import com.iformall.domain.vo.BillTimeVo; | ||||
| import com.iformall.domain.vo.WxRentPropertyContractVo; | |||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| @@ -1835,6 +1836,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| return wxRentContractMapper.getShopType(wxRentContract); | return wxRentContractMapper.getShopType(wxRentContract); | ||||
| } | } | ||||
| @Override | |||||
| public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize) { | |||||
| return null; | |||||
| } | |||||
| public static double getMonthNeedPay(Double price,Date start,Date end){ | public static double getMonthNeedPay(Double price,Date start,Date end){ | ||||
| SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | ||||
| SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); | SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); | ||||