| @@ -10,6 +10,7 @@ import io.swagger.annotations.Api; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Controller; | |||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -1,9 +1,7 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| @@ -13,15 +11,12 @@ import com.iformall.mapper.*; | |||||
| import com.iformall.mq.MqBaseProducer; | import com.iformall.mq.MqBaseProducer; | ||||
| import com.iformall.service.WxCUserTagsService; | import com.iformall.service.WxCUserTagsService; | ||||
| import com.iformall.service.WxMsgService; | import com.iformall.service.WxMsgService; | ||||
| import com.iformall.utils.DateUtils; | |||||
| import com.iformall.utils.WiwideUtil; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.scheduling.annotation.Async; | import org.springframework.scheduling.annotation.Async; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.*; | import java.util.*; | ||||
| @@ -273,7 +273,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| //生成预览账单 | //生成预览账单 | ||||
| if(!wxPropertyContract.getReceivePeriod().equals(record.getReceivePeriod()) | if(!wxPropertyContract.getReceivePeriod().equals(record.getReceivePeriod()) | ||||
| ||!wxPropertyContract.getPrice().equals(record.getPrice()) | ||!wxPropertyContract.getPrice().equals(record.getPrice()) | ||||
| ||!wxPropertyContract.getDeposit().equals(record.getDeposit())){ | |||||
| ||!wxPropertyContract.getDeposit().equals(record.getDeposit()) | |||||
| ||!wxPropertyContract.getAdjustPeriod().equals(record.getAdjustPeriod())){ | |||||
| wxBillPropertyMapper.deletePreviewBill(record); | wxBillPropertyMapper.deletePreviewBill(record); | ||||
| //重新生成 | //重新生成 | ||||
| wxPropertyContract.setPrice(record.getPrice()); | wxPropertyContract.setPrice(record.getPrice()); | ||||
| @@ -250,36 +250,41 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| //对比上一次,是否有更改,有,重新生成预账单 | //对比上一次,是否有更改,有,重新生成预账单 | ||||
| WxRentContract dbRent = wxRentContractMapper.selectByPrimaryKey(record.getId()); | WxRentContract dbRent = wxRentContractMapper.selectByPrimaryKey(record.getId()); | ||||
| boolean change = false; | boolean change = false; | ||||
| if(record.getReceivePeriod() != null && record.getLease()!=null && record.getPrice()!= null) { | |||||
| if (record.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode())) { | |||||
| if (!record.getReceivePeriod().equals(dbRent.getReceivePeriod()) | |||||
| || !record.getLease().equals(dbRent.getLease()) | |||||
| || !record.getType().equals(dbRent.getType()) | |||||
| || !record.getPrice().equals(dbRent.getPrice()) | |||||
| || !record.getAdjustRatio().replaceAll("\\s*","").equals(dbRent.getAdjustRatio().replaceAll("\\s*","")) | |||||
| ) { | |||||
| change = true; | |||||
| } | |||||
| } else if (record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | |||||
| if (!record.getReceivePeriod().equals(dbRent.getReceivePeriod()) | |||||
| || !record.getLease().equals(dbRent.getLease()) | |||||
| || !record.getType().equals(dbRent.getType()) | |||||
| || !record.getRevenue().equals(dbRent.getRevenue()) | |||||
| || !record.getPayRatio().equals(dbRent.getPayRatio()) | |||||
| ) { | |||||
| change = true; | |||||
| } | |||||
| } else if (record.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | |||||
| if (!record.getReceivePeriod().equals(dbRent.getReceivePeriod()) | |||||
| || !record.getLease().equals(dbRent.getLease()) | |||||
| || !record.getType().equals(dbRent.getType()) | |||||
| || !record.getPrice().equals(dbRent.getPrice()) | |||||
| || !record.getPayRatio().equals(dbRent.getPayRatio()) | |||||
| ) { | |||||
| change = true; | |||||
| if(record.getAdjustPeriod().intValue() != dbRent.getAdjustPeriod().intValue()){ | |||||
| change = true; | |||||
| }else{ | |||||
| if(record.getReceivePeriod() != null && record.getLease()!=null && record.getPrice()!= null) { | |||||
| if (record.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode())) { | |||||
| if (!record.getReceivePeriod().equals(dbRent.getReceivePeriod()) | |||||
| || !record.getLease().equals(dbRent.getLease()) | |||||
| || !record.getType().equals(dbRent.getType()) | |||||
| || !record.getPrice().equals(dbRent.getPrice()) | |||||
| || !record.getAdjustRatio().replaceAll("\\s*","").equals(dbRent.getAdjustRatio().replaceAll("\\s*","")) | |||||
| ) { | |||||
| change = true; | |||||
| } | |||||
| } else if (record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | |||||
| if (!record.getReceivePeriod().equals(dbRent.getReceivePeriod()) | |||||
| || !record.getLease().equals(dbRent.getLease()) | |||||
| || !record.getType().equals(dbRent.getType()) | |||||
| || !record.getRevenue().equals(dbRent.getRevenue()) | |||||
| || !record.getPayRatio().equals(dbRent.getPayRatio()) | |||||
| ) { | |||||
| change = true; | |||||
| } | |||||
| } else if (record.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | |||||
| if (!record.getReceivePeriod().equals(dbRent.getReceivePeriod()) | |||||
| || !record.getLease().equals(dbRent.getLease()) | |||||
| || !record.getType().equals(dbRent.getType()) | |||||
| || !record.getPrice().equals(dbRent.getPrice()) | |||||
| || !record.getPayRatio().equals(dbRent.getPayRatio()) | |||||
| ) { | |||||
| change = true; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| // 更新 | // 更新 | ||||
| ResultData resultData = getResultDataForUpdate(record, userId); | ResultData resultData = getResultDataForUpdate(record, userId); | ||||
| @@ -28,7 +28,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| id,tenant_id,domain,msg_type,msg,send_time,model_id,sender,sender_user_id,sender_user_name,receiver,receiver_user_id, | |||||
| id,tenant_id,`domain`,msg_type,msg,send_time,model_id,sender,sender_user_id,sender_user_name,receiver,receiver_user_id, | |||||
| receiver_user_name,msg_status,status_message,createtime,updatetime,uuid,signature,model_type,msg_json | receiver_user_name,msg_status,status_message,createtime,updatetime,uuid,signature,model_type,msg_json | ||||
| </sql> | </sql> | ||||
| @@ -54,12 +54,6 @@ | |||||
| and `domain` = #{domain} | and `domain` = #{domain} | ||||
| </if> | </if> | ||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| order by createtime desc | order by createtime desc | ||||
| </sql> | </sql> | ||||
| @@ -417,7 +417,7 @@ | |||||
| </if> | </if> | ||||
| <if test="null!=status and status==1"> | <if test="null!=status and status==1"> | ||||
| and s.id not in( | and s.id not in( | ||||
| SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status not in(0,1,5,6,7) and | |||||
| SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status not in(0,5,6,7) and | |||||
| merchant_id is not null | merchant_id is not null | ||||
| ) | ) | ||||
| </if> | </if> | ||||