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

[合同][修改]:预览账单修改

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
142c5abd25
5 измененных файлов: 62 добавлений и 2 удалений
  1. +28
    -0
      mallinkAdmin/src/main/resources/db/migration/V201906041338__L_ALTER_MSG.sql
  2. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java
  3. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  4. +8
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  5. +17
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

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

@@ -0,0 +1,28 @@
update wx_msg_validationcode_model set content = '<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>富茂审批邮件</title>
<title></title>
<script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + ''px'';</script>
</head>

<body>
<div id="box" style="padding:80px 20%;background:#E9E7E7;min-height:100vh;">
<header style="height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;">
<img style="height:auto;width:292px;display:flex;align-self: center;justify-content: center;padding:0 40px;" src="https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/changrong-logo.png"/>
</header>
<div style="background:#fff;">
<div style="font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding:56px 55px 0;">审批通过通知</div>
<div style="font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px;">编号<span>{contract}</span>的{bustype}已经审批通过,请登录<a href="{page}">{page}</a>跟进后续工作</div>
</div>
</div>
</body>

</html>' where name = '审批通过通知';

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

@@ -176,6 +176,11 @@ public class WxPropertyContract extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "主体名称", name = "subjectName")
private String subjectName;


@io.swagger.annotations.ApiModelProperty(value = "1按租赁日生产2按计租日生成账单", name = "rentStartType")
@Transient
private Integer rentStartType;

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


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

@@ -217,6 +217,10 @@ public class WxRentContract extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "主体名称", name = "subjectName")
private String subjectName;

@io.swagger.annotations.ApiModelProperty(value = "1按租赁日生产2按计租日生成账单", name = "rentStartType")
@Transient
private Integer rentStartType;

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


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

@@ -565,18 +565,25 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
if(wxPropertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){
if(isFirstDay(billTimeVo.getStartDate())){
int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
months++;
needpay = new Double(months * priceD).longValue();
}else{
needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue();
}
}else{
int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue();
}
}else if(i == billTimeVoList.size()-1){//最后
needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
}else{//中间
int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue();
}
}
@@ -933,3 +940,4 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService





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

@@ -955,18 +955,29 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){
if(isFirstDay(billTimeVo.getStartDate())){
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
months++;
needpay = new Double(months * priceD).longValue();
}else{
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue();
}
}else{
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
needpay = new Double(months * priceD).longValue();
if(isFirstDay(billTimeVo.getStartDate())){
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue();
}else{
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue();
}
}
}else if(i == billTimeVoList.size()-1){//最后
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
}else{//中间
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue();
}
}
@@ -1806,6 +1817,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Double total = new Double(0);
int[] diff;

if(sd.format(start).equals("2019-07-01")){
System.out.println();
}
//同一天
if(sd.format(start).equals(sd.format(end))){
int dayCount = DateUtils.getMonthDayCount(start);
@@ -1988,3 +2002,4 @@ public class WxRentContractServiceImpl implements WxRentContractService {





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