diff --git a/mallinkAdmin/src/main/resources/db/migration/V201906041338__L_ALTER_MSG.sql b/mallinkAdmin/src/main/resources/db/migration/V201906041338__L_ALTER_MSG.sql new file mode 100644 index 000000000..71c78c57c --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201906041338__L_ALTER_MSG.sql @@ -0,0 +1,28 @@ +update wx_msg_validationcode_model set content = ' + + + + + + + + + + 富茂审批邮件 + + + + + +
+
+ +
+
+
审批通过通知
+
编号{contract}的{bustype}已经审批通过,请登录{page}跟进后续工作
+
+
+ + +' where name = '审批通过通知'; \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java index 6794002c7..ef522ab1d 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java +++ b/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") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java index 0f4b0835d..f75eaf79a 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/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(); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index d8a61d290..292a23033 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/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 + diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 83ef6b503..b81e3c455 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/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 { +