Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
48655a0d8a
8 changed files with 52 additions and 16 deletions
  1. +5
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +2
    -1
      mallinkAdmin/src/main/resources/db/migration/V202408000000001.sql
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxPropertyContractService.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxRentContractService.java
  6. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  7. +27
    -13
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  8. +6
    -2
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 5
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java View File

@@ -446,6 +446,8 @@ public class WxRentContractController extends WxContractBaseController {
contract.setUpdatetime(new Date());
contract.setUpdateBy(user.getId());
wxRentContractService.updateRentContract(contract);
//删除预览的账单
wxRentContractService.deletePrewBill(contract);
if(contract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) {
if (null != wxRentContract.getPropertyId()) {
@@ -455,6 +457,9 @@ public class WxRentContractController extends WxContractBaseController {
propertyContract.setUpdatetime(new Date());
propertyContract.setUpdateBy(user.getId());
wxPropertyContractService.updatePropertyContract(propertyContract);
//删除预览的账单
wxPropertyContractService.deletePreviewBill(propertyContract);
}
}
return new ResultData();


+ 2
- 1
mallinkAdmin/src/main/resources/db/migration/V202408000000001.sql View File

@@ -1,4 +1,5 @@
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 '每月平均天数';
ALTER TABLE wx_property_contract ADD COLUMN month_average_days INT(2) COMMENT '每月平均天数';
ALTER TABLE wx_rent_contract ADD COLUMN fixed_price INT(1) NOT NULL DEFAULT 0 COMMENT '是否固定价格';

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

@@ -229,6 +229,8 @@ public class WxRentContract extends TenantEntity {
private String price;
@TableField(exist = false)
private String priceTwoDecimal;//2位小数
@io.swagger.annotations.ApiModelProperty(value = "是否固定租金", name = "fixedPrice")
private Integer fixedPrice;
@io.swagger.annotations.ApiModelProperty(value = "起租开始时间", name = "rentalStartDate")
private Date rentalStartDate;
@io.swagger.annotations.ApiModelProperty(value = "", name = "rentalEndDate")


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxPropertyContractService.java View File

@@ -92,6 +92,8 @@ public interface WxPropertyContractService {
void updatePropertyContract(WxPropertyContract record);
void deletePreviewBill(WxPropertyContract record);
void setEndContractTime(WxPropertyContract proertyContract);
List<WxPropertyContract> findToEndContractList(WxPropertyContract record);


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxRentContractService.java View File

@@ -145,4 +145,6 @@ public interface WxRentContractService {
void calcuteByTradeDaily(WxRentContract wxRentContract);
void deletePrewBill(WxRentContract wxRentContract);
}

+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java View File

@@ -448,6 +448,12 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
return new ResultData(Result.SUCCESS, "更新物业合同信息成功", record);
}
@Override
public void deletePreviewBill(WxPropertyContract record) {
wxBillPropertyMapper.deleteBillByContract(record);
}
@Override
//@Transactional(rollbackFor = {Exception.class})
public ResultData updateFile(WxPropertyContract record, MallUserInfo user, String userName,boolean writeComplate) {


+ 27
- 13
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -602,19 +602,18 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if(CollectionUtils.isEmpty(record.getPreviewBillRentList())) {
if (record.getReceivePeriod() != null && record.getLease() != null
&& !record.getReceivePeriod().equals(0) && !record.getLease().equals(0)) {
//删除预账单,重新生成
wxBillRentMapper.deleteBillByContract(record);
//删除商业管理费账单
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.setRentContractId(record.getId());
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
wxBillRentManage.updateTenantInfo(record);
wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
//删除营业管理费账单
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
deletePrewBill(record);
// //删除预账单,重新生成
// wxBillRentMapper.deleteBillByContract(record);
// //删除商业管理费账单
// WxBillRentManage wxBillRentManage = new WxBillRentManage();
// wxBillRentManage.setRentContractId(record.getId());
// wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
// wxBillRentManage.updateTenantInfo(record);
// wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
// //删除营业管理费账单
// wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
// wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
//联营扣点,不设置保底营业额,不生成账单
//if (EnumRentContractType.RENT_BY_JOINT.getCode().equals(record.getType()) && record.getRevenueRatio().equals(0)) {
@@ -3480,4 +3479,19 @@ public class WxRentContractServiceImpl implements WxRentContractService {
return new BigDecimal(sumMoney);
}
}
@Override
public void deletePrewBill(WxRentContract record) {
//删除预账单,重新生成
wxBillRentMapper.deleteBillByContract(record);
//删除商业管理费账单
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.setRentContractId(record.getId());
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
wxBillRentManage.updateTenantInfo(record);
wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
//删除营业管理费账单
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
}
}

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

@@ -130,6 +130,7 @@
<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"/>
<result column="fixed_price" jdbcType="INTEGER" property="fixedPrice"/>
</resultMap>

<sql id="allColumns">
@@ -142,7 +143,7 @@
`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`,
`pay_account`,`filename`,`lease`,`type`,`revenue`,`revenue_ratio`,`revenue_year`,`revenue_ratio_way`,`revenue_ratio_set`,`adjust_ratio`,`adjust_period`,`pay_ratio`,
`start_date`,`end_date`,`shop_name`,`from_id`,`end_contract_time`,
`start_date`,`end_date`,`shop_name`,`from_id`,`end_contract_time`,`fixed_price`,
`apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`,
`business_type`,`rent_info`, `file_names`,price_unit,rent_price,other_rent_price_info,`subject_name`,rent_start_type,
`rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,bus_discount_ratio,bus_discount_time,
@@ -195,6 +196,7 @@
<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 != fixedPrice ">and `fixed_price` = #{fixedPrice}</if>
<if test=" null != shopNumber and shopNumber!=''">
and shop_name like concat('%',#{shopNumber},'%')
</if>
@@ -378,12 +380,13 @@
<result column="bus_discount_ratio" property="busDiscountRatio"/>
<result column="day_price_calcute" property="dayPriceCalcute"/>
<result column="month_average_days" property="monthAverageDays"/>
<result column="fixed_price" property="fixedPrice"/>
</resultMap>

<select id="listContractVo" parameterType="com.iformall.domain.vo.WxRentPropertyContractVo" resultMap="contractMap">
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.fixed_price,
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.business_type businessType,rc.bus_discount_ratio,rc.bus_discount_time,rc.month_average_days
@@ -425,6 +428,7 @@
<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 != fixedPrice ">and rc.`fixed_price` = #{fixedPrice}</if>
<if test=" null != businessForRule and '' != businessForRule ">
and rc.business_id in (${businessForRule})
</if>


Loading…
Cancel
Save