| @@ -0,0 +1,7 @@ | |||||
| ALTER TABLE wx_rent_contract ADD COLUMN first_bill_date_start timestamp COMMENT '首期账单开始时间'; | |||||
| ALTER TABLE wx_rent_contract ADD COLUMN first_bill_date_end timestamp COMMENT '首期账单结束时间'; | |||||
| ALTER TABLE wx_property_contract ADD COLUMN first_bill_date_start timestamp COMMENT '首期账单开始时间'; | |||||
| ALTER TABLE wx_property_contract ADD COLUMN first_bill_date_end timestamp COMMENT '首期账单结束时间'; | |||||
| @@ -242,6 +242,12 @@ public class WxPropertyContract extends TenantEntity { | |||||
| private String shopNumbers; | private String shopNumbers; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> shopIdsQuery; | private List<Long> shopIdsQuery; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "首期账单开始时间", name = "firstBillDateStart") | |||||
| private Date firstBillDateStart; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "首期账单结束时间", name = "firstBillDateEnd") | |||||
| private Date firstBillDateEnd; | |||||
| //查询过期提醒 | //查询过期提醒 | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -447,6 +447,12 @@ public class WxRentContract extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "设计文件", name = "outDateNotifyPhone") | @io.swagger.annotations.ApiModelProperty(value = "设计文件", name = "outDateNotifyPhone") | ||||
| private String designFile; | private String designFile; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "首期账单开始时间", name = "firstBillDateStart") | |||||
| private Date firstBillDateStart; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "首期账单结束时间", name = "firstBillDateEnd") | |||||
| private Date firstBillDateEnd; | |||||
| //查询过期提醒 | //查询过期提醒 | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -711,6 +711,16 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| } | } | ||||
| } | } | ||||
| if (null != billTimeVoList && billTimeVoList.size() > 0 ) { | |||||
| BillTimeVo firstBillTime = billTimeVoList.get(0); | |||||
| WxPropertyContract cupdate = new WxPropertyContract(); | |||||
| cupdate.updateTenantInfo(wxPropertyContract); | |||||
| cupdate.setId(wxPropertyContract.getId()); | |||||
| cupdate.setFirstBillDateStart(firstBillTime.getStartDate()); | |||||
| cupdate.setFirstBillDateEnd(firstBillTime.getEndDate()); | |||||
| wxPropertyContractMapper.updateById(cupdate); | |||||
| } | |||||
| //结算其他金额 | //结算其他金额 | ||||
| Date billStartDate = null; | Date billStartDate = null; | ||||
| Date billEndDate = null; | Date billEndDate = null; | ||||
| @@ -825,22 +825,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| int dayType = wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode()) ? Calendar.DAY_OF_MONTH : Calendar.MONTH; | int dayType = wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode()) ? Calendar.DAY_OF_MONTH : Calendar.MONTH; | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| Calendar instance = Calendar.getInstance(); | |||||
| instance.setTime(wxRentContract.getRentalStartDate()); | |||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | |||||
| Date time = instance.getTime(); | |||||
| //wxBillDeposit.setReceiveDate(time); | |||||
| //账单开始时间 | |||||
| instance.clear(); | |||||
| instance.setTime(time); | |||||
| instance.add(Calendar.DAY_OF_MONTH, 1); | |||||
| wxBillDeposit.setStarttime(instance.getTime()); | |||||
| //账单结束时间 | |||||
| instance.clear(); | |||||
| instance.setTime(time); | |||||
| instance.add(dayType, wxRentContract.getLease()); | |||||
| wxBillDeposit.setEndtime(instance.getTime()); | |||||
| wxBillDeposit.setStarttime(wxRentContract.getFirstBillDateStart()); | |||||
| wxBillDeposit.setEndtime(wxRentContract.getFirstBillDateEnd()); | |||||
| wxBillDeposit.setStatus(EnumBillStatus.WAIT_PAY.getCode()); | wxBillDeposit.setStatus(EnumBillStatus.WAIT_PAY.getCode()); | ||||
| //wxBillDeposit.setExpiredDay(0L); | //wxBillDeposit.setExpiredDay(0L); | ||||
| //wxBillDeposit.setReceiveDate(time); | //wxBillDeposit.setReceiveDate(time); | ||||
| @@ -1245,6 +1232,16 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| billTimeVoList.add(billTimeVo); | billTimeVoList.add(billTimeVo); | ||||
| } | } | ||||
| } | } | ||||
| if (null != billTimeVoList && billTimeVoList.size() > 0 ) { | |||||
| BillTimeVo firstBillTime = billTimeVoList.get(0); | |||||
| WxRentContract cupdate = new WxRentContract(); | |||||
| cupdate.updateTenantInfo(wxRentContract); | |||||
| cupdate.setId(wxRentContract.getId()); | |||||
| cupdate.setFirstBillDateStart(firstBillTime.getStartDate()); | |||||
| cupdate.setFirstBillDateEnd(firstBillTime.getEndDate()); | |||||
| wxRentContractMapper.updateById(cupdate); | |||||
| } | |||||
| //免租期 | //免租期 | ||||
| List<Date> freePeriods = getFreeDays(wxRentContract); | List<Date> freePeriods = getFreeDays(wxRentContract); | ||||
| @@ -64,13 +64,16 @@ | |||||
| <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="day_price_calcute" jdbcType="INTEGER" property="dayPriceCalcute"/> | ||||
| <result column="month_average_days" jdbcType="INTEGER" property="monthAverageDays"/> | <result column="month_average_days" jdbcType="INTEGER" property="monthAverageDays"/> | ||||
| <result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/> | |||||
| <result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`merchant_id`,`decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`create_type`,`shop_ids`,`shop_numbers`, | `id`,`merchant_id`,`decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`create_type`,`shop_ids`,`shop_numbers`, | ||||
| `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`,`first_bill_date_start`,`first_bill_date_end`, | |||||
| `link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`,`day_price_calcute`,`month_average_days`, | `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 | ||||
| @@ -131,6 +131,9 @@ | |||||
| <result column="revenue_rent_price" jdbcType="VARCHAR" property="revenueRentPrice"/> | <result column="revenue_rent_price" jdbcType="VARCHAR" property="revenueRentPrice"/> | ||||
| <result column="revenue_jumps_remark" jdbcType="VARCHAR" property="revenueJumpsRemark"/> | <result column="revenue_jumps_remark" jdbcType="VARCHAR" property="revenueJumpsRemark"/> | ||||
| <result column="free_period_remark" jdbcType="VARCHAR" property="freePeriodRemark"/> | <result column="free_period_remark" jdbcType="VARCHAR" property="freePeriodRemark"/> | ||||
| <result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/> | |||||
| <result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -138,7 +141,7 @@ | |||||
| `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`,`day_price_calcute`, | |||||
| `first_party_bank_info`,`second_party_bank_info`,`second_party_tax_info`,`day_price_calcute`,`first_bill_date_start`,`first_bill_date_end`, | |||||
| `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`,`month_average_days`,`free_period_remark`, | `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`,`month_average_days`,`free_period_remark`, | ||||
| `deposit`,cashtype_content_lsit,cashtype_lsit,`pay_date`,`is_del`,`merchant_name`,`revenue_jumps_remark`, | `deposit`,cashtype_content_lsit,cashtype_lsit,`pay_date`,`is_del`,`merchant_name`,`revenue_jumps_remark`, | ||||
| `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`, | ||||
| @@ -382,6 +385,8 @@ | |||||
| <result column="revenue_rent_price" jdbcType="VARCHAR" property="revenueRentPrice"/> | <result column="revenue_rent_price" jdbcType="VARCHAR" property="revenueRentPrice"/> | ||||
| <result column="revenue_jumps_remark" jdbcType="VARCHAR" property="revenueJumpsRemark"/> | <result column="revenue_jumps_remark" jdbcType="VARCHAR" property="revenueJumpsRemark"/> | ||||
| <result column="free_period_remark" jdbcType="VARCHAR" property="freePeriodRemark"/> | <result column="free_period_remark" jdbcType="VARCHAR" property="freePeriodRemark"/> | ||||
| <result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/> | |||||
| <result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/> | |||||
| </resultMap> | </resultMap> | ||||
| @@ -390,7 +395,7 @@ | |||||
| rc.price as rent_price,rc.contract_number,rc.shop_name,rc.type,rc.apply_status,rc.price_detail,rc.revenue_fixed_rent_price,rc.revenue_rent_price, | rc.price as rent_price,rc.contract_number,rc.shop_name,rc.type,rc.apply_status,rc.price_detail,rc.revenue_fixed_rent_price,rc.revenue_rent_price, | ||||
| 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.day_price_calcute,rc.free_period_remark, | rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit,rc.day_price_calcute,rc.free_period_remark, | ||||
| rc.business_type businessType,rc.month_average_days,rc.revenue_jumps_remark | |||||
| rc.business_type businessType,rc.month_average_days,rc.revenue_jumps_remark,rc.first_bill_date_start,rc.first_bill_date_end | |||||
| 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"> | ||||