| @@ -260,6 +260,12 @@ public class WxPropertyContractController extends WxContractBaseController { | |||||
| if (null != wxPropertyContract.getFeeStandards() && wxPropertyContract.getFeeStandards().size() > 0 ) { | if (null != wxPropertyContract.getFeeStandards() && wxPropertyContract.getFeeStandards().size() > 0 ) { | ||||
| wxPropertyContract.setFeesStandardsInfo(JSON.toJSONString(wxPropertyContract.getFeeStandards())); | wxPropertyContract.setFeesStandardsInfo(JSON.toJSONString(wxPropertyContract.getFeeStandards())); | ||||
| } | } | ||||
| if (null == wxPropertyContract.getDayPriceCalcute()){ | |||||
| wxPropertyContract.setDayPriceCalcute(EnumRentDayPriceCalcute.REAL_DAYS.getCode()); | |||||
| } | |||||
| if (wxPropertyContract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode().intValue() && null == wxPropertyContract.getMonthAverageDays()) { | |||||
| return new ResultData(Result.ERROR,"请填写月平均天数"); | |||||
| } | |||||
| return wxPropertyContractService.updateMoney(wxPropertyContract, user, user.getName(),false); | return wxPropertyContractService.updateMoney(wxPropertyContract, user, user.getName(),false); | ||||
| } | } | ||||
| @@ -226,6 +226,12 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| } | } | ||||
| wxRentContract.setRentShopType(null); | wxRentContract.setRentShopType(null); | ||||
| wxRentContract.setOperationType(null); | wxRentContract.setOperationType(null); | ||||
| if (null == wxRentContract.getDayPriceCalcute()){ | |||||
| wxRentContract.setDayPriceCalcute(EnumRentDayPriceCalcute.REAL_DAYS.getCode()); | |||||
| } | |||||
| if (wxRentContract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode().intValue() && null == wxRentContract.getMonthAverageDays()) { | |||||
| return new ResultData(Result.ERROR,"请填写月平均天数"); | |||||
| } | |||||
| return wxRentContractService.update(wxRentContract, user,user.getName(),EnumFromType.OTHER.getCode(),oldDate,false); | return wxRentContractService.update(wxRentContract, user,user.getName(),EnumFromType.OTHER.getCode(),oldDate,false); | ||||
| } | } | ||||
| @@ -0,0 +1,4 @@ | |||||
| ALTER TABLE wx_rent_contract ADD COLUMN day_price_calcute INT(1) NOT NULL DEFAULT 1 COMMENT '每天价格计算规则'; | |||||
| ALTER TABLE wx_rent_contract ADD COLUMN month_average_days INT(2) COMMENT '每月平均天数'; | |||||
| ALTER TABLE wx_property_contract ADD COLUMN day_price_calcute INT(1) NOT NULL DEFAULT 1 COMMENT '每天价格计算规则'; | |||||
| ALTER TABLE wx_property_contract ADD COLUMN month_average_days INT(2) COMMENT '每月平均天数'; | |||||
| @@ -176,6 +176,11 @@ public class WxPropertyContract extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames") | @io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames") | ||||
| private String fileNames; | private String fileNames; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "每天价格计算规则EnumRentDayPriceCalcute", name = "dayPriceCalcute") | |||||
| private Integer dayPriceCalcute; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "每月平均天数", name = "monthAverageDays") | |||||
| private Integer monthAverageDays; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String building; | private String building; | ||||
| @@ -399,6 +399,11 @@ public class WxRentContract extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业3金茂", name = "operationType") | @io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业3金茂", name = "operationType") | ||||
| private Integer operationType; | private Integer operationType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "每天价格计算规则EnumRentDayPriceCalcute", name = "dayPriceCalcute") | |||||
| private Integer dayPriceCalcute; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "每月平均天数", name = "monthAverageDays") | |||||
| private Integer monthAverageDays; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金费率", name = "latePayRatio") | @io.swagger.annotations.ApiModelProperty(value = "滞纳金费率", name = "latePayRatio") | ||||
| private String latePayRatio; | private String latePayRatio; | ||||
| @@ -0,0 +1,37 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| */ | |||||
| public enum EnumRentDayPriceCalcute { | |||||
| REAL_DAYS(1, "按每月真实天数"), | |||||
| AVERAGE_DAYS(2, "按每月平均天数(手写)"), | |||||
| ; | |||||
| public static EnumRentDayPriceCalcute getEnum(Integer code) { | |||||
| for (EnumRentDayPriceCalcute value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumRentDayPriceCalcute(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -412,7 +412,7 @@ public class WxRentContractHelper { | |||||
| //生成金额直接计算 | //生成金额直接计算 | ||||
| if(!saveDb){ | if(!saveDb){ | ||||
| //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,part)).longValue(); | //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,part)).longValue(); | ||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,part)).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | |||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),part)).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | |||||
| return needpay; | return needpay; | ||||
| } | } | ||||
| @@ -431,7 +431,7 @@ public class WxRentContractHelper { | |||||
| needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| }else{ | }else{ | ||||
| //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | ||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,false)) | |||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| } | } | ||||
| }else if(i == 0){//第一期 | }else if(i == 0){//第一期 | ||||
| @@ -442,7 +442,7 @@ public class WxRentContractHelper { | |||||
| needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| }else{ | }else{ | ||||
| //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | ||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,false)) | |||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| } | } | ||||
| }else{ | }else{ | ||||
| @@ -454,7 +454,7 @@ public class WxRentContractHelper { | |||||
| needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| }else{ | }else{ | ||||
| //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | ||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,false)) | |||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -466,7 +466,7 @@ public class WxRentContractHelper { | |||||
| //如果当月费用需要按天计算 | //如果当月费用需要按天计算 | ||||
| if (monthCalDay) { | if (monthCalDay) { | ||||
| //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | //needpay = new Double(getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | ||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,false)) | |||||
| needpay = new BigDecimal(getMonthNeedPay(Constant.default_long_decimal_size,priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false)) | |||||
| .setScale(wxRentContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP).toPlainString(); | .setScale(wxRentContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP).toPlainString(); | ||||
| }else { | }else { | ||||
| needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_UP).toPlainString(); | ||||
| @@ -522,24 +522,25 @@ public class WxRentContractHelper { | |||||
| * @param end | * @param end | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| public static String getMonthNeedPay(Integer decimalSize,BigDecimal price,Date start,Date end,int dayType,int receivePeriod,boolean part){ | |||||
| public static String getMonthNeedPay(Integer decimalSize,BigDecimal price,Date start,Date end,int dayType,int receivePeriod,Integer dayPriceCalcute,Integer monthAvageDays,boolean part){ | |||||
| SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | ||||
| SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); | SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); | ||||
| SimpleDateFormat sdD = new SimpleDateFormat("d"); | SimpleDateFormat sdD = new SimpleDateFormat("d"); | ||||
| BigDecimal total = new BigDecimal(0); | BigDecimal total = new BigDecimal(0); | ||||
| int[] diff; | int[] diff; | ||||
| //同一天 | //同一天 | ||||
| if(sd.format(start).equals(sd.format(end))){ | if(sd.format(start).equals(sd.format(end))){ | ||||
| int dayCount = DateUtils.getMonthDayCount(start); | |||||
| int dayCount = getRealDays(dayPriceCalcute, monthAvageDays, start); | |||||
| return price.divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP).toPlainString(); | return price.divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP).toPlainString(); | ||||
| } | } | ||||
| //同月 | //同月 | ||||
| if(sdM.format(start).equals(sdM.format(end))){ | if(sdM.format(start).equals(sdM.format(end))){ | ||||
| diff = DateUtils.getDiff(start,end); | diff = DateUtils.getDiff(start,end); | ||||
| int dayCount = DateUtils.getMonthDayCount(start); | |||||
| int dayCount = getRealDays(dayPriceCalcute, monthAvageDays, start); | |||||
| total = total.add(new BigDecimal((diff[1]+1)).multiply(price).divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP)); | total = total.add(new BigDecimal((diff[1]+1)).multiply(price).divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP)); | ||||
| return total.toPlainString(); | return total.toPlainString(); | ||||
| } | } | ||||
| @@ -557,7 +558,7 @@ public class WxRentContractHelper { | |||||
| instance.setTime(start); | instance.setTime(start); | ||||
| // instance.add(dayType, receivePeriod); | // instance.add(dayType, receivePeriod); | ||||
| // instance.add(Calendar.DATE, -1); | // instance.add(Calendar.DATE, -1); | ||||
| instance = EnumContractReceivePeriodUnit.getAfterCalendarDay(instance, receivePeriod, receivePeriod); | |||||
| instance = EnumContractReceivePeriodUnit.getAfterCalendarDay(instance, receivePeriod, dayType); | |||||
| if(sd.format(instance.getTime()).equals(sd.format(end))){ | if(sd.format(instance.getTime()).equals(sd.format(end))){ | ||||
| isFullMonth = true; | isFullMonth = true; | ||||
| } | } | ||||
| @@ -571,7 +572,7 @@ public class WxRentContractHelper { | |||||
| //第一个月 | //第一个月 | ||||
| Date lastMonthDay = DateUtils.getLastDayForMonth(start); | Date lastMonthDay = DateUtils.getLastDayForMonth(start); | ||||
| diff = DateUtils.getDiff(start,lastMonthDay); | diff = DateUtils.getDiff(start,lastMonthDay); | ||||
| int dayCount = DateUtils.getMonthDayCount(start); | |||||
| int dayCount = getRealDays(dayPriceCalcute, monthAvageDays, start); | |||||
| total = total.add(new BigDecimal((diff[1]+1)).multiply(price).divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP)); | total = total.add(new BigDecimal((diff[1]+1)).multiply(price).divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP)); | ||||
| //中间月份 | //中间月份 | ||||
| @@ -581,11 +582,26 @@ public class WxRentContractHelper { | |||||
| //最后一个月 | //最后一个月 | ||||
| diff = DateUtils.getDiff(DateUtils.getFirstDayForCurrMonth(end),end); | diff = DateUtils.getDiff(DateUtils.getFirstDayForCurrMonth(end),end); | ||||
| dayCount = DateUtils.getMonthDayCount(end); | |||||
| dayCount = getRealDays(dayPriceCalcute, monthAvageDays, end); | |||||
| total = total.add(new BigDecimal((diff[1]+1)).multiply(price).divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP)); | total = total.add(new BigDecimal((diff[1]+1)).multiply(price).divide(new BigDecimal(dayCount),decimalSize,BigDecimal.ROUND_HALF_UP)); | ||||
| return total.toPlainString(); | return total.toPlainString(); | ||||
| } | } | ||||
| private static int getRealDays(Integer dayPriceCalcute,Integer monthAvageDays,Date start) { | |||||
| //是不是按实际天数来计算 | |||||
| boolean isRealDays = true; | |||||
| if (dayPriceCalcute.intValue() == EnumRentDayPriceCalcute.REAL_DAYS.getCode().intValue()) { | |||||
| }else { | |||||
| isRealDays = false; | |||||
| } | |||||
| if (isRealDays) { | |||||
| return DateUtils.getMonthDayCount(start); | |||||
| }else { | |||||
| return monthAvageDays; | |||||
| } | |||||
| } | |||||
| public static int getMonths(String startStr,String endStr){ | public static int getMonths(String startStr,String endStr){ | ||||
| DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd"); | DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd"); | ||||
| DateTime start = formatter.parseDateTime(startStr); | DateTime start = formatter.parseDateTime(startStr); | ||||
| @@ -923,7 +923,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| //生成金额直接计算 | //生成金额直接计算 | ||||
| if(!saveDb){ | if(!saveDb){ | ||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,false); | |||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false); | |||||
| return needpay; | return needpay; | ||||
| } | } | ||||
| @@ -938,7 +938,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| months++; | months++; | ||||
| needpay = new BigDecimal(months).multiply(priceD).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).toPlainString(); | ||||
| }else { | }else { | ||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,false); | |||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false); | |||||
| } | } | ||||
| }else if(i == 0){//第一期 | }else if(i == 0){//第一期 | ||||
| if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ | if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ | ||||
| @@ -947,7 +947,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| months++; | months++; | ||||
| needpay = new BigDecimal(months).multiply(priceD).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).toPlainString(); | ||||
| }else{ | }else{ | ||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,false); | |||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false); | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| if(isFirstDay(startDate)){ | if(isFirstDay(startDate)){ | ||||
| @@ -957,7 +957,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| } | } | ||||
| needpay = new BigDecimal(months).multiply(priceD).toPlainString(); | needpay = new BigDecimal(months).multiply(priceD).toPlainString(); | ||||
| }else{ | }else{ | ||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,false); | |||||
| needpay = WxRentContractHelper.getMonthNeedPay(wxRentContract.getDecimalSize(),priceD, startDate, endDate,dayType,receivePeriod,wxRentContract.getDayPriceCalcute(),wxRentContract.getMonthAverageDays(),false); | |||||
| } | } | ||||
| } | } | ||||
| }else{//中间 | }else{//中间 | ||||
| @@ -62,6 +62,8 @@ | |||||
| <result column="shop_numbers" jdbcType="VARCHAR" property="shopNumbers"/> | <result column="shop_numbers" jdbcType="VARCHAR" property="shopNumbers"/> | ||||
| <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | ||||
| <result column="fees_standards_info" jdbcType="VARCHAR" property="feesStandardsInfo"/> | <result column="fees_standards_info" jdbcType="VARCHAR" property="feesStandardsInfo"/> | ||||
| <result column="day_price_calcute" jdbcType="INTEGER" property="dayPriceCalcute"/> | |||||
| <result column="month_average_days" jdbcType="INTEGER" property="monthAverageDays"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -69,7 +71,7 @@ | |||||
| `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`, | `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`, | ||||
| `deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,`receive_period_unit`,`create_by`,`update_by`, | `deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,`receive_period_unit`,`create_by`,`update_by`, | ||||
| `shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`,`fees_standards_info`, | `shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`,`fees_standards_info`, | ||||
| `link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`, | |||||
| `link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`,`day_price_calcute`,`month_average_days`, | |||||
| `start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`,fixed_price, | `start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`,fixed_price, | ||||
| `file_names`,price_unit,rent_price,subject_name,rent_start_type,`operation_type`,late_pay_ratio,late_pay_day,end_contract_time,out_date_notify_days,out_date_notify_phone | `file_names`,price_unit,rent_price,subject_name,rent_start_type,`operation_type`,late_pay_ratio,late_pay_day,end_contract_time,out_date_notify_days,out_date_notify_phone | ||||
| </sql> | </sql> | ||||
| @@ -116,6 +118,8 @@ | |||||
| <if test=" null != rentShopType">and `rent_shop_type` = #{rentShopType}</if> | <if test=" null != rentShopType">and `rent_shop_type` = #{rentShopType}</if> | ||||
| <if test=" null != operationType ">and `operation_type` = #{operationType}</if> | <if test=" null != operationType ">and `operation_type` = #{operationType}</if> | ||||
| <if test=" null != createType ">and `create_type` = #{createType}</if> | <if test=" null != createType ">and `create_type` = #{createType}</if> | ||||
| <if test=" null != dayPriceCalcute ">and `day_price_calcute` = #{dayPriceCalcute}</if> | |||||
| <if test=" null != monthAverageDays ">and `month_average_days` = #{monthAverageDays}</if> | |||||
| <if test=" null != businessForRule and '' != businessForRule "> | <if test=" null != businessForRule and '' != businessForRule "> | ||||
| and business_id in (${businessForRule}) | and business_id in (${businessForRule}) | ||||
| </if> | </if> | ||||
| @@ -128,6 +128,8 @@ | |||||
| <result column="out_date_notify_phone" jdbcType="VARCHAR" property="outDateNotifyPhone"/> | <result column="out_date_notify_phone" jdbcType="VARCHAR" property="outDateNotifyPhone"/> | ||||
| <result column="design_file" jdbcType="VARCHAR" property="designFile"/> | <result column="design_file" jdbcType="VARCHAR" property="designFile"/> | ||||
| <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | ||||
| <result column="day_price_calcute" jdbcType="INTEGER" property="dayPriceCalcute"/> | |||||
| <result column="month_average_days" jdbcType="INTEGER" property="monthAverageDays"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -135,8 +137,8 @@ | |||||
| `shop_type_sub`,`lease_purpose`,`contractual_rules`,`delivery_date`,`delivery_grace_period`,`opening_date`,`business_hours`,`scope_metre`, | `shop_type_sub`,`lease_purpose`,`contractual_rules`,`delivery_date`,`delivery_grace_period`,`opening_date`,`business_hours`,`scope_metre`, | ||||
| `decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`,`receive_period_unit`, | `decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`,`receive_period_unit`, | ||||
| `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`,`create_by`,`update_by`, | `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`,`create_by`,`update_by`, | ||||
| `first_party_bank_info`,`second_party_bank_info`,`second_party_tax_info`, | |||||
| `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`, | |||||
| `first_party_bank_info`,`second_party_bank_info`,`second_party_tax_info`,`day_price_calcute`, | |||||
| `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`,`month_average_days`, | |||||
| `deposit`,cashtype_content_lsit,cashtype_lsit,`pay_date`,`is_del`,`merchant_name`, | `deposit`,cashtype_content_lsit,cashtype_lsit,`pay_date`,`is_del`,`merchant_name`, | ||||
| `brand`,`business_id`,`shop_type`,`shop_type_str`,`updatetime`,`createtime`,`link_person`,`link_phone`,`link_address`, | `brand`,`business_id`,`shop_type`,`shop_type_str`,`updatetime`,`createtime`,`link_person`,`link_phone`,`link_address`, | ||||
| `pay_account`,`filename`,`lease`,`type`,`revenue`,`revenue_ratio`,`revenue_year`,`revenue_ratio_way`,`revenue_ratio_set`,`adjust_ratio`,`adjust_period`,`pay_ratio`, | `pay_account`,`filename`,`lease`,`type`,`revenue`,`revenue_ratio`,`revenue_year`,`revenue_ratio_way`,`revenue_ratio_set`,`adjust_ratio`,`adjust_period`,`pay_ratio`, | ||||
| @@ -191,6 +193,8 @@ | |||||
| <if test=" null != rentShopType and '' != rentShopType">and `rent_shop_type` = #{rentShopType}</if> | <if test=" null != rentShopType and '' != rentShopType">and `rent_shop_type` = #{rentShopType}</if> | ||||
| <if test=" null != operationType and '' != operationType">and `operation_type` = #{operationType}</if> | <if test=" null != operationType and '' != operationType">and `operation_type` = #{operationType}</if> | ||||
| <if test=" null != queryShopId and '' != queryShopId">and json_contains(json_extract(rent_info,'$[*].id'),concat('"',#{queryShopId},'"'))</if> | <if test=" null != queryShopId and '' != queryShopId">and json_contains(json_extract(rent_info,'$[*].id'),concat('"',#{queryShopId},'"'))</if> | ||||
| <if test=" null != dayPriceCalcute ">and `day_price_calcute` = #{dayPriceCalcute}</if> | |||||
| <if test=" null != monthAverageDays ">and `month_average_days` = #{monthAverageDays}</if> | |||||
| <if test=" null != shopNumber and shopNumber!=''"> | <if test=" null != shopNumber and shopNumber!=''"> | ||||
| and shop_name like concat('%',#{shopNumber},'%') | and shop_name like concat('%',#{shopNumber},'%') | ||||
| </if> | </if> | ||||
| @@ -372,6 +376,8 @@ | |||||
| <result column="property_price_unit" property="propertyPriceUnit"/> | <result column="property_price_unit" property="propertyPriceUnit"/> | ||||
| <result column="bus_discount_time" property="busDiscountTime"/> | <result column="bus_discount_time" property="busDiscountTime"/> | ||||
| <result column="bus_discount_ratio" property="busDiscountRatio"/> | <result column="bus_discount_ratio" property="busDiscountRatio"/> | ||||
| <result column="day_price_calcute" property="dayPriceCalcute"/> | |||||
| <result column="month_average_days" property="monthAverageDays"/> | |||||
| </resultMap> | </resultMap> | ||||
| @@ -379,8 +385,8 @@ | |||||
| select rc.id,rc.tenant_id,rc.parent_tenant_id,rc.id as rent_id, pc.id as property_id, rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`, | select rc.id,rc.tenant_id,rc.parent_tenant_id,rc.id as rent_id, pc.id as property_id, rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`, | ||||
| rc.price as rent_price,rc.contract_number,rc.shop_name,rc.type,rc.apply_status,rc.price_detail, | rc.price as rent_price,rc.contract_number,rc.shop_name,rc.type,rc.apply_status,rc.price_detail, | ||||
| rc.rent_shop_type,rc.rent_info,pc.price as property_price,rc.merchant_id,pc.`status` as property_status, | rc.rent_shop_type,rc.rent_info,pc.price as property_price,rc.merchant_id,pc.`status` as property_status, | ||||
| rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit, | |||||
| rc.business_type businessType,rc.bus_discount_ratio,rc.bus_discount_time | |||||
| rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit,rc.day_price_calcute, | |||||
| rc.business_type businessType,rc.bus_discount_ratio,rc.bus_discount_time,rc.month_average_days | |||||
| from wx_rent_contract rc left join wx_property_contract pc on rc.id=pc.rent_contract_id | from wx_rent_contract rc left join wx_property_contract pc on rc.id=pc.rent_contract_id | ||||
| <where> | <where> | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| @@ -417,6 +423,8 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != applyStatus ">and rc.`apply_status` = #{applyStatus}</if> | <if test=" null != applyStatus ">and rc.`apply_status` = #{applyStatus}</if> | ||||
| <if test=" null != operationType ">and rc.`operation_type` = #{operationType}</if> | <if test=" null != operationType ">and rc.`operation_type` = #{operationType}</if> | ||||
| <if test=" null != dayPriceCalcute ">and rc.`day_price_calcute` = #{dayPriceCalcute}</if> | |||||
| <if test=" null != monthAverageDays ">and rc.`month_average_days` = #{monthAverageDays}</if> | |||||
| <if test=" null != businessForRule and '' != businessForRule "> | <if test=" null != businessForRule and '' != businessForRule "> | ||||
| and rc.business_id in (${businessForRule}) | and rc.business_id in (${businessForRule}) | ||||
| </if> | </if> | ||||