Browse Source

hetong

release_toaliyun_real
xhxu 4 years ago
parent
commit
5d6a8db3c5
3 changed files with 21 additions and 16 deletions
  1. +4
    -4
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  2. +16
    -11
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 4
- 4
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java View File

@@ -222,9 +222,9 @@ public class WxRentContract extends TenantEntity {
private Long merchantId; private Long merchantId;
@io.swagger.annotations.ApiModelProperty(value = "月租金/分成(分)", name = "price") @io.swagger.annotations.ApiModelProperty(value = "月租金/分成(分)", name = "price")
private Long price; private Long price;
@io.swagger.annotations.ApiModelProperty(value = "租开始时间", name = "rentalStartDate")
@io.swagger.annotations.ApiModelProperty(value = "租开始时间", name = "rentalStartDate")
private Date rentalStartDate; private Date rentalStartDate;
@io.swagger.annotations.ApiModelProperty(value = "计租结束时间", name = "rentalEndDate")
@io.swagger.annotations.ApiModelProperty(value = "", name = "rentalEndDate")
private Date rentalEndDate; private Date rentalEndDate;
@io.swagger.annotations.ApiModelProperty(value = "签定合同时间", name = "signDate") @io.swagger.annotations.ApiModelProperty(value = "签定合同时间", name = "signDate")
private Date signDate; private Date signDate;
@@ -296,10 +296,10 @@ public class WxRentContract extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "营业额", name = "revenue") @io.swagger.annotations.ApiModelProperty(value = "营业额", name = "revenue")
private Long revenue; private Long revenue;


@io.swagger.annotations.ApiModelProperty(value = "租开始时间", name = "startDate")
@io.swagger.annotations.ApiModelProperty(value = "租开始时间", name = "startDate")
private Date startDate; private Date startDate;


@io.swagger.annotations.ApiModelProperty(value = "起租结束时间", name = "endDate")
@io.swagger.annotations.ApiModelProperty(value = "", name = "endDate")
private Date endDate; private Date endDate;


@io.swagger.annotations.ApiModelProperty(value = "审核状态, 0未审核 1审核中 2审核通过 3驳回", name = "applyStatus") @io.swagger.annotations.ApiModelProperty(value = "审核状态, 0未审核 1审核中 2审核通过 3驳回", name = "applyStatus")


+ 16
- 11
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -2143,8 +2143,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
} }


//计租 //计租
if(wxRentContract.getRentalStartDate() != null && wxRentContract.getRentalEndDate() != null){
String rentalStartDate = DateUtils.date2String(wxRentContract.getRentalStartDate(), "yyyy-MM-dd");
if(wxRentContract.getStartDate() != null && wxRentContract.getRentalEndDate() != null){
String rentalStartDate = DateUtils.date2String(wxRentContract.getStartDate(), "yyyy-MM-dd");
result.put("rentalStartDate", rentalStartDate); result.put("rentalStartDate", rentalStartDate);
result.put("rentalStartDateYear", rentalStartDate.substring(0, 4)); result.put("rentalStartDateYear", rentalStartDate.substring(0, 4));
result.put("rentalStartDateMonth", rentalStartDate.substring(5, 7)); result.put("rentalStartDateMonth", rentalStartDate.substring(5, 7));
@@ -2158,12 +2158,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//免租 //免租
if(wxRentContract.getStartDate() != null && wxRentContract.getRentalStartDate()!=null if(wxRentContract.getStartDate() != null && wxRentContract.getRentalStartDate()!=null
&& !DateUtils.isSameDate(wxRentContract.getStartDate(),wxRentContract.getRentalStartDate())){ && !DateUtils.isSameDate(wxRentContract.getStartDate(),wxRentContract.getRentalStartDate())){
String reductionStartDate = DateUtils.date2String(wxRentContract.getStartDate(), "yyyy-MM-dd");
String reductionStartDate = DateUtils.date2String(wxRentContract.getRentalStartDate(), "yyyy-MM-dd");
result.put("reductionStartDateYear", reductionStartDate.substring(0, 4)); result.put("reductionStartDateYear", reductionStartDate.substring(0, 4));
result.put("reductionStartDateMonth", reductionStartDate.substring(5, 7)); result.put("reductionStartDateMonth", reductionStartDate.substring(5, 7));
result.put("reductionStartDateDay", reductionStartDate.substring(8)); result.put("reductionStartDateDay", reductionStartDate.substring(8));
// String reductionEndDate = DateUtils.date2String(wxRentContract.getRentalStartDate(), "yyyy-MM-dd"); // String reductionEndDate = DateUtils.date2String(wxRentContract.getRentalStartDate(), "yyyy-MM-dd");
String reductionEndDate = DateUtils.getTimeBefore(1,wxRentContract.getRentalStartDate());
String reductionEndDate = DateUtils.getTimeBefore(1,wxRentContract.getStartDate());
result.put("reductionEndDateYear", reductionEndDate.substring(0, 4)); result.put("reductionEndDateYear", reductionEndDate.substring(0, 4));
result.put("reductionEndDateMonth", reductionEndDate.substring(5, 7)); result.put("reductionEndDateMonth", reductionEndDate.substring(5, 7));
result.put("reductionEndDateDay", reductionEndDate.substring(8)); result.put("reductionEndDateDay", reductionEndDate.substring(8));
@@ -2179,9 +2179,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
String shopType4Str = ""; String shopType4Str = "";
if(wxRentContract.getShopType() != null && wxRentContract.getShopType().intValue() == 1){ if(wxRentContract.getShopType() != null && wxRentContract.getShopType().intValue() == 1){
shopType4Str = "直营"; shopType4Str = "直营";
}else if(wxRentContract.getShopType() != null && wxRentContract.getShopType().intValue() == 2){
}else if(wxRentContract.getShopType() != null && wxRentContract.getShopType().intValue() == 6){
shopType4Str = "代理"; shopType4Str = "代理";
}else if(wxRentContract.getShopType() != null && wxRentContract.getShopType().intValue() == 3){
}else if(wxRentContract.getShopType() != null && wxRentContract.getShopType().intValue() == 2){
shopType4Str = "加盟"; shopType4Str = "加盟";
}else{ }else{
shopType4Str = "其他("+wxRentContract.getShopTypeStr()+")"; shopType4Str = "其他("+wxRentContract.getShopTypeStr()+")";
@@ -2302,8 +2302,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {




}else if(EnumRentContractType.RENT_BY_JOINT.getCode().equals(type)){ }else if(EnumRentContractType.RENT_BY_JOINT.getCode().equals(type)){
Integer twoPayRatio1 = new BigDecimal(wxRentContract.getPayRatio())
.divide(new BigDecimal(100)).intValue();
Double twoPayRatio1 = new BigDecimal(wxRentContract.getPayRatio())
.divide(new BigDecimal(100))
.setScale(2, RoundingMode.HALF_EVEN).doubleValue();;
result.put("twoPayRatio1",twoPayRatio1); result.put("twoPayRatio1",twoPayRatio1);
result.put("twoPayDate",wxRentContract.getPayDate()); result.put("twoPayDate",wxRentContract.getPayDate());
if(StringUtils.isNotBlank(incrementStartDate)){ if(StringUtils.isNotBlank(incrementStartDate)){
@@ -2316,7 +2317,10 @@ public class WxRentContractServiceImpl implements WxRentContractService {
result.put("twoRentalStartDateMonth2",incrementStartDate.substring(5,7)); result.put("twoRentalStartDateMonth2",incrementStartDate.substring(5,7));
result.put("twoRentalStartDateDay2",incrementStartDate.substring(8,10)); result.put("twoRentalStartDateDay2",incrementStartDate.substring(8,10));
result.put("twoRentIncreasing2",increasingProportion); result.put("twoRentIncreasing2",increasingProportion);
result.put("twoPayRatio2",twoPayRatio1+Integer.parseInt(increasingProportion));
Double twoPayRatio2 = new BigDecimal(wxRentContract.getPayRatio())
.add(new BigDecimal(increasingProportion))
.setScale(2, RoundingMode.HALF_EVEN).doubleValue();
result.put("twoPayRatio2",twoPayRatio2);


}else{ }else{
String rentalEndDate = DateUtils.date2String(wxRentContract.getRentalEndDate(), "yyyy-MM-dd"); String rentalEndDate = DateUtils.date2String(wxRentContract.getRentalEndDate(), "yyyy-MM-dd");
@@ -2333,8 +2337,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
result.put("threeRentalPriceUpper1", PriceUtil.digitUppercase(priceRent)); result.put("threeRentalPriceUpper1", PriceUtil.digitUppercase(priceRent));


result.put("threeRentPrice",wxRentContract.getRentPrice()); result.put("threeRentPrice",wxRentContract.getRentPrice());
Integer threePayRatio1 = new BigDecimal(wxRentContract.getPayRatio())
.divide(new BigDecimal(100)).intValue();
double threePayRatio1 = new BigDecimal(wxRentContract.getPayRatio())
.divide(new BigDecimal(100))
.setScale(2, RoundingMode.HALF_EVEN).doubleValue();
result.put("threePayRatio1",threePayRatio1); result.put("threePayRatio1",threePayRatio1);


result.put("threePayDate",wxRentContract.getPayDate()); result.put("threePayDate",wxRentContract.getPayDate());


+ 1
- 1
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml View File

@@ -790,7 +790,7 @@
left join wx_rent_contract rc on rc.merchant_id = m.id and rc.is_del=0 left join wx_rent_contract rc on rc.merchant_id = m.id and rc.is_del=0
where s.`id` = #{shopId} where s.`id` = #{shopId}
and rc.`status` in (2,3) and rc.`status` in (2,3)
and rc.`start_date` <= now() and end_date >= now()
and rc.`rental_start_date` <= now() and rental_end_date >= now()
order by rc.`updatetime` desc; order by rc.`updatetime` desc;
</select> </select>


Loading…
Cancel
Save