Просмотр исходного кода

[租赁物业合同][修改][添加实体字段及字段sql]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
7a992309d5
7 измененных файлов: 57 добавлений и 12 удалений
  1. +8
    -9
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentPropertyContractController.java
  2. +4
    -0
      mallinkAdmin/src/main/resources/db/migration/V201906121607__ALTER_CONTRACT.sql
  3. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java
  4. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  5. +27
    -3
      mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java
  6. +5
    -0
      mallinkService/src/main/java/com/iformall/service/WxRentContractService.java
  7. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 8
- 9
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentPropertyContractController.java Просмотреть файл

@@ -1,9 +1,10 @@
package com.iformall.controller.contract;

import com.github.pagehelper.PageInfo;
import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxRentPropertyContractVo;
import com.iformall.service.WxRentContractService;
import io.swagger.annotations.ApiImplicitParam;
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.RestController;

import java.util.Map;

/**
* @author gongbiao
*/
@@ -33,14 +32,14 @@ public class WxRentPropertyContractController extends BaseController {
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@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");
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);
}

}


+ 4
- 0
mallinkAdmin/src/main/resources/db/migration/V201906121607__ALTER_CONTRACT.sql Просмотреть файл

@@ -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合并租赁物业';

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java Просмотреть файл

@@ -180,6 +180,9 @@ public class WxPropertyContract extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "1按租赁日生产2按计租日生成账单", name = "rentStartType")
private Integer rentStartType;

@io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业", name = "operationType")
private Integer operationType;

public static enum Field
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")


+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java Просмотреть файл

@@ -226,6 +226,10 @@ public class WxRentContract extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "年租金调整方式1按比例2按金额", name = "adjust_ratio_way")
private Integer adjustRatioWay;

@io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业", name = "operationType")
private Integer operationType;


// public Integer getAdjustPeriod() {
// if(EnumPriceUnit.D.getCode().equals(this.getPriceUnit()) && EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode().equals(adjustPeriod)){
// return EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode();


+ 27
- 3
mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java Просмотреть файл

@@ -7,7 +7,7 @@ import lombok.ToString;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.List;
import java.util.Date;

/**
* @author gongbiao
@@ -16,11 +16,10 @@ import java.util.List;
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxRentPropertyContractVo extends BaseEntity {

@Id
protected Long id;

@Transient
protected List<Long> ids;
@Transient
protected String sortColumns;

@@ -42,7 +41,32 @@ public class WxRentPropertyContractVo extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "商户名称", name = "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;

}


+ 5
- 0
mallinkService/src/main/java/com/iformall/service/WxRentContractService.java Просмотреть файл

@@ -1,9 +1,11 @@
package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxRentPropertyContractVo;
import io.swagger.models.auth.In;

import javax.servlet.http.HttpServletRequest;
@@ -85,4 +87,7 @@ public interface WxRentContractService {
ResultData hasContractNumber(WxRentContract wxRentContract);

Integer getShopType(WxRentContract wxRentContract);

PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize);

}

+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -10,6 +10,7 @@ import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.po.*;
import com.iformall.domain.vo.BillTimeVo;
import com.iformall.domain.vo.WxRentPropertyContractVo;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
import com.iformall.mapper.*;
@@ -1835,6 +1836,11 @@ public class WxRentContractServiceImpl implements WxRentContractService {
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){
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM");


Загрузка…
Отмена
Сохранить