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

[合同优化][添加][完善合同优化需求]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
7ba701d01f
3 измененных файлов: 55 добавлений и 2 удалений
  1. +2
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +44
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  3. +9
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

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

@@ -52,10 +52,10 @@ public class WxRentContractController extends BaseController {
@ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "string", paramType = "query", required = true),
@ApiImplicitParam(name = "endtDate", value = "结束时间", dataType = "string", paramType = "query", required = true)})
@SystemControllerLog(description = "获取两个时间相差,返回n月零n天")
public ResultData getDateDiff(String startDate, String endtDate) throws Exception{
public ResultData getDateDiff(String startDate, String endDate) throws Exception{
logger.debug("[" + getIpAddr() + "] WxRentContractController::getTimeDiff");
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
int[] array = DateUtils.getDiff(sd.parse(startDate),sd.parse(endtDate));
int[] array = DateUtils.getDiff(sd.parse(startDate),sd.parse(endDate));
Map<String,Integer> map = new HashMap<>();
map.put("month",array[0]);
map.put("day",array[1]);


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

@@ -331,6 +331,50 @@ public class WxRentContract extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames")
private String fileNames;

@io.swagger.annotations.ApiModelProperty(value = "总租期(月)", name = "totalPeriodMonth")
private Integer totalPeriodMonth;

@io.swagger.annotations.ApiModelProperty(value = "总租期(天)", name = "totalPeriodDay")
private Integer totalPeriodDay;

@io.swagger.annotations.ApiModelProperty(value = "租赁单价", name = "rentPrice")
private Integer rentPrice;

@io.swagger.annotations.ApiModelProperty(value = "租金单位1日2月3年", name = "priceUnit")
private Integer priceUnit;

public Integer getPriceUnit() {
return priceUnit;
}

public void setPriceUnit(Integer priceUnit) {
this.priceUnit = priceUnit;
}

public Integer getTotalPeriodMonth() {
return totalPeriodMonth;
}

public void setTotalPeriodMonth(Integer totalPeriodMonth) {
this.totalPeriodMonth = totalPeriodMonth;
}

public Integer getTotalPeriodDay() {
return totalPeriodDay;
}

public void setTotalPeriodDay(Integer totalPeriodDay) {
this.totalPeriodDay = totalPeriodDay;
}

public Integer getRentPrice() {
return rentPrice;
}

public void setRentPrice(Integer rentPrice) {
this.rentPrice = rentPrice;
}

public String getRentInfo() {
return rentInfo;
}


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

@@ -560,6 +560,15 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
}

public static void main(String[] args) throws Exception{
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
String start = "2019-05-18";
String end = "2019-05-24";
int[] array = DateUtils.getDiff(sd.parse(start),sd.parse(end));
System.out.println(array[0] +"月");
System.out.println(array[1] +"天");
}

@Override
public Object getMerchants(WxRentContract wxRentContract) {
List<WxRentContract> rentContractList = wxRentContractMapper.getMerchants(wxRentContract);


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