Przeglądaj źródła

fix

release_toaliyun_real
winter 1 rok temu
rodzic
commit
25536418e1
9 zmienionych plików z 118 dodań i 30 usunięć
  1. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java
  2. +7
    -3
      mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java
  3. +7
    -2
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  4. +54
    -2
      mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java
  5. +15
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  6. +11
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  7. +3
    -2
      mallinkService/src/main/resources/mapper/WxAllBillMapper.xml
  8. +5
    -2
      mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml
  9. +5
    -2
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java Wyświetl plik

@@ -151,6 +151,17 @@ public class WxAllBill extends TenantEntity {
} }
@TableField(exist = false) @TableField(exist = false)
public Date endtimeEqual; public Date endtimeEqual;
@Excel(name = "付款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "6")
@io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime")
public Date receiveDate;
private String receiveDateStr;
public String getReceiveDateStr() {
if (null != receiveDate) {
receiveDateStr = DateUtils.date2String(receiveDate,DateUtils.DATE_PATTERN);
}
return receiveDateStr;
}


@Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11")
@TableField(exist = false) @TableField(exist = false)


+ 7
- 3
mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java Wyświetl plik

@@ -68,10 +68,11 @@ public class WxPropertyContract extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value="签定合同时间",name="signDate") @io.swagger.annotations.ApiModelProperty(value="签定合同时间",name="signDate")
private Date signDate; private Date signDate;


@io.swagger.annotations.ApiModelProperty(value="付款周期",name="receivePeriod")
@io.swagger.annotations.ApiModelProperty(value="计费周期",name="receivePeriod")
private Integer receivePeriod; private Integer receivePeriod;
@io.swagger.annotations.ApiModelProperty(value = "付款周期单位EnumContractReceivePeriodUnit", name = "receivePeriodUnit")
@io.swagger.annotations.ApiModelProperty(value = "付款周期(计费周期的倍数)", name = "receivePeriod")
private Integer payPeriodRate;
@io.swagger.annotations.ApiModelProperty(value = "计费周期单位EnumContractReceivePeriodUnit", name = "receivePeriodUnit")
private Integer receivePeriodUnit; private Integer receivePeriodUnit;


@io.swagger.annotations.ApiModelProperty(value="合同文件路径",name="filepath") @io.swagger.annotations.ApiModelProperty(value="合同文件路径",name="filepath")
@@ -266,6 +267,9 @@ public class WxPropertyContract extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "首期账单结束时间", name = "firstBillDateEnd") @io.swagger.annotations.ApiModelProperty(value = "首期账单结束时间", name = "firstBillDateEnd")
private Date firstBillDateEnd; private Date firstBillDateEnd;
@io.swagger.annotations.ApiModelProperty(value = "首期账单收款截止日期", name = "firstBillReceiveDate")
private Date firstBillReceiveDate;
//查询过期提醒 //查询过期提醒
@TableField(exist = false) @TableField(exist = false)
private Integer outDateNofity; private Integer outDateNofity;


+ 7
- 2
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java Wyświetl plik

@@ -238,9 +238,11 @@ public class WxRentContract extends TenantEntity {
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;
@io.swagger.annotations.ApiModelProperty(value = "付款周期", name = "receivePeriod")
@io.swagger.annotations.ApiModelProperty(value = "计费周期", name = "receivePeriod")
private Integer receivePeriod; private Integer receivePeriod;
@io.swagger.annotations.ApiModelProperty(value = "付款周期单位EnumContractReceivePeriodUnit", name = "receivePeriodUnit")
@io.swagger.annotations.ApiModelProperty(value = "付款周期(计费周期的倍数)", name = "receivePeriod")
private Integer payPeriodRate;
@io.swagger.annotations.ApiModelProperty(value = "计费周期单位EnumContractReceivePeriodUnit", name = "receivePeriodUnit")
private Integer receivePeriodUnit; private Integer receivePeriodUnit;
@io.swagger.annotations.ApiModelProperty(value = "合同文件路径", name = "filepath") @io.swagger.annotations.ApiModelProperty(value = "合同文件路径", name = "filepath")
private String filepath; private String filepath;
@@ -473,6 +475,9 @@ public class WxRentContract extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "首期账单结束时间", name = "firstBillDateEnd") @io.swagger.annotations.ApiModelProperty(value = "首期账单结束时间", name = "firstBillDateEnd")
private Date firstBillDateEnd; private Date firstBillDateEnd;
@io.swagger.annotations.ApiModelProperty(value = "首期账单收款截止日期", name = "firstBillReceiveDate")
private Date firstBillReceiveDate;
//查询过期提醒 //查询过期提醒
@TableField(exist = false) @TableField(exist = false)


+ 54
- 2
mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java Wyświetl plik

@@ -23,6 +23,7 @@ import com.iformall.domain.dto.NeedPayDTO;
import com.iformall.domain.po.WxEnergyFees; import com.iformall.domain.po.WxEnergyFees;
import com.iformall.domain.po.WxPropertyContract; import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.po.WxRentContract; import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.BillTimeVo;
import com.iformall.domain.vo.WxBillFeesStandardsListVo; import com.iformall.domain.vo.WxBillFeesStandardsListVo;
import com.iformall.enums.EnumContractReceivePeriodUnit; import com.iformall.enums.EnumContractReceivePeriodUnit;
import com.iformall.enums.EnumFeesStandardsCalcuteUnit; import com.iformall.enums.EnumFeesStandardsCalcuteUnit;
@@ -481,7 +482,8 @@ public class WxRentContractHelper {
} }
//其他标准计费项 //其他标准计费项
public static List<WxBillFeesStandardsListVo> getStandardsBillList(Integer decimalSize,List<WxEnergyFees> feesStandarsList,Date billStartDate,Date billEndDate,boolean isFixed,String rentArea) {
public static List<WxBillFeesStandardsListVo> getStandardsBillList(Integer decimalSize,List<WxEnergyFees> feesStandarsList,Date billStartDate,Date billEndDate,boolean isFixed,
String rentArea,Integer payPeriodRate,Integer receivePeriod,Integer dateType) {
if (null == feesStandarsList || feesStandarsList.size() <= 0 ) { if (null == feesStandarsList || feesStandarsList.size() <= 0 ) {
return null; return null;
} }
@@ -500,7 +502,7 @@ public class WxRentContractHelper {
count = rentArea; count = rentArea;
} }
vo.setTotal(fees.calcuteTotalMoney(decimalSize, billStartDate, billEndDate, count,true,null,null,null,null)); vo.setTotal(fees.calcuteTotalMoney(decimalSize, billStartDate, billEndDate, count,true,null,null,null,null));
vo.setReceiveDate(DateUtils.getDaySet(billStartDate,Calendar.DATE,-1));
vo.setReceiveDate(WxRentContractHelper.getReceiveDate(null, billStartDate, billEndDate, payPeriodRate, receivePeriod, dateType).getStartDate());
vo.setFeeStandards(fees); vo.setFeeStandards(fees);
if(null != fees.getIsDespoit() && fees.getIsDespoit().intValue() == EnumYesOrNo.YES.getCode().intValue()) { if(null != fees.getIsDespoit() && fees.getIsDespoit().intValue() == EnumYesOrNo.YES.getCode().intValue()) {
@@ -863,5 +865,55 @@ public class WxRentContractHelper {
} }
return 0; return 0;
} }
/**
* 计算计费周期的收款日期
*
*
*
*
* @param start
* @param end
* @param payPeriod
* @param adjustPeriod
* @return
*/
public static BillTimeVo getReceiveDate(BillTimeVo currentReceiveDate,Date start,Date end,int payPeriodRate,Integer receivePeriod,Integer dayType) {
if (null != currentReceiveDate) {
if ((currentReceiveDate.getStartDate().equals(start) || currentReceiveDate.getStartDate().before(start) ) &&
(currentReceiveDate.getEndDate().equals(end) || currentReceiveDate.getEndDate().after(end) )) {
return currentReceiveDate;
}
}
//如果是按月来计费,则付款截止日期从开始日期开始,每个周期的开始日期为付款的截止日期
if (dayType.equals(EnumContractReceivePeriodUnit.MONTH.getCode())) {
Date startDate = DateUtils.getSecondsTimeAfter(1, DateUtils.getTimeAfterMonths(-1*receivePeriod, end));
Calendar instance = Calendar.getInstance();
instance.setTime(startDate);
instance.set(Calendar.MILLISECOND, 0);
BillTimeVo vo = new BillTimeVo();
vo.setStartDate(instance.getTime());
Date endDate = EnumContractReceivePeriodUnit.getAfterCalendarDay(instance, receivePeriod*payPeriodRate, EnumContractReceivePeriodUnit.MONTH.getCode()).getTime();
vo.setEndDate(endDate);
return vo;
//自然季度
}else if(dayType.equals(EnumContractReceivePeriodUnit.QUARTER.getCode())){
Date startDate = DateUtils.getSecondsTimeAfter(1, DateUtils.getAfterQuaterStartDay(end,-1*receivePeriod).getTime());
Calendar instance = Calendar.getInstance();
instance.setTime(startDate);
instance.set(Calendar.MILLISECOND, 0);
BillTimeVo vo = new BillTimeVo();
vo.setStartDate(instance.getTime());
Date endDate = EnumContractReceivePeriodUnit.getAfterCalendarDay(instance, receivePeriod*payPeriodRate, EnumContractReceivePeriodUnit.QUARTER.getCode()).getTime();
vo.setEndDate(endDate);
return vo;
}else {
BillTimeVo vo = new BillTimeVo();
vo.setStartDate(start);
vo.setEndDate(end);
return vo;
}
}


} }

+ 15
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Wyświetl plik

@@ -559,6 +559,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
// instance.add(dayType, wxPropertyContract.getLease()); // instance.add(dayType, wxPropertyContract.getLease());
// wxBillDeposit.setEndtime(instance.getTime()); // wxBillDeposit.setEndtime(instance.getTime());
wxBillDeposit.setEndtime(record.getFirstBillDateEnd()); wxBillDeposit.setEndtime(record.getFirstBillDateEnd());
wxBillDeposit.setReceiveDate(record.getFirstBillReceiveDate());
wxBillDeposit.updateTenantInfo(wxPropertyContract); wxBillDeposit.updateTenantInfo(wxPropertyContract);
wxBillDeposit.setMerchantId(record.getMerchantId()); wxBillDeposit.setMerchantId(record.getMerchantId());
wxBillDeposit.setCreatetime(date); wxBillDeposit.setCreatetime(date);
@@ -678,7 +679,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService


List<BillTimeVo> billTimeVoList = new ArrayList<>(); List<BillTimeVo> billTimeVoList = new ArrayList<>();
if(saveDb){ if(saveDb){
billTimeVoList = WxRentContractServiceImpl.initBillTimeList(yearList,wxPropertyContract.getRentalStartDate(),wxPropertyContract.getRentalEndDate(),wxPropertyContract.getAdjustPeriod(),dayType,receivePeriod);
billTimeVoList = WxRentContractServiceImpl.initBillTimeList(yearList,wxPropertyContract.getRentalStartDate(),wxPropertyContract.getRentalEndDate(),wxPropertyContract.getAdjustPeriod(),dayType,receivePeriod,wxPropertyContract.getPayPeriodRate());
}else{ }else{
//预账单编辑账期,生成金额 //预账单编辑账期,生成金额
for (WxAllBill rent:wxPropertyContract.getPreviewBillRentList()) { for (WxAllBill rent:wxPropertyContract.getPreviewBillRentList()) {
@@ -699,6 +700,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
cupdate.setId(wxPropertyContract.getId()); cupdate.setId(wxPropertyContract.getId());
cupdate.setFirstBillDateStart(firstBillTime.getStartDate()); cupdate.setFirstBillDateStart(firstBillTime.getStartDate());
cupdate.setFirstBillDateEnd(firstBillTime.getEndDate()); cupdate.setFirstBillDateEnd(firstBillTime.getEndDate());
cupdate.setFirstBillReceiveDate(firstBillTime.getReceiveDate());
cupdate.setDecimalSize(null);//去掉默认的,避免更新 cupdate.setDecimalSize(null);//去掉默认的,避免更新
wxPropertyContractMapper.updateById(cupdate); wxPropertyContractMapper.updateById(cupdate);
firstBillStartDate = firstBillTime.getStartDate(); firstBillStartDate = firstBillTime.getStartDate();
@@ -707,7 +709,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
//结算其他金额 //结算其他金额
//一次性费用的,只有一个账单。 //一次性费用的,只有一个账单。
List<WxBillFeesStandardsListVo> fixedList = WxRentContractHelper.getStandardsBillList(wxPropertyContract.getDecimalSize(),wxPropertyContract.getFeesStardarsList(),firstBillStartDate,firstBillEndDate,true,wxPropertyContract.getRentArea());
List<WxBillFeesStandardsListVo> fixedList = WxRentContractHelper.getStandardsBillList(wxPropertyContract.getDecimalSize(),wxPropertyContract.getFeesStardarsList(),firstBillStartDate,
firstBillEndDate,true,wxPropertyContract.getRentArea(),wxPropertyContract.getPayPeriodRate(),wxPropertyContract.getReceivePeriod(),wxPropertyContract.getReceivePeriodUnit());


int index = 0; int index = 0;
@@ -718,7 +721,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
String standarsTotal = "0"; String standarsTotal = "0";
//非一次性费用的,跟随物业账单的周期 //非一次性费用的,跟随物业账单的周期
List<WxBillFeesStandardsListVo> unFixedList = WxRentContractHelper.getStandardsBillList(wxPropertyContract.getDecimalSize(),wxPropertyContract.getFeesStardarsList(),null,null,false,null);
List<WxBillFeesStandardsListVo> unFixedList = WxRentContractHelper.getStandardsBillList(wxPropertyContract.getDecimalSize(),wxPropertyContract.getFeesStardarsList(),null,null,false,null,null,null,null);


boolean flag = false; boolean flag = false;
@@ -779,7 +782,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
for (int j = 0 ; j < unFixedList.size(); j ++ ) { for (int j = 0 ; j < unFixedList.size(); j ++ ) {
WxBillFeesStandardsListVo svo = unFixedList.get(j); WxBillFeesStandardsListVo svo = unFixedList.get(j);
svo.setParentBillId(wxBillProperty.getId()); svo.setParentBillId(wxBillProperty.getId());
WxAllBill property = generateBillPropertyByBillStandards(wxPayAccountBill,wxPropertyContract,isPreview,user,svo,billcount,shopInfo);
WxAllBill property = generateBillPropertyByBillStandards(wxBillProperty,wxPayAccountBill,wxPropertyContract,isPreview,user,svo,billcount,shopInfo);
//设置科目 //设置科目
property.setEnergyFeesId(svo.getFeeStandards().getId()); property.setEnergyFeesId(svo.getFeeStandards().getId());
property.setFeesStandarsId(property.getEnergyFeesId());//合同动态表格需要。 property.setFeesStandarsId(property.getEnergyFeesId());//合同动态表格需要。
@@ -796,7 +799,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
if (null != fixedList && fixedList.size() > 0 ) { if (null != fixedList && fixedList.size() > 0 ) {
for (int i = 0 ; i < fixedList.size(); i ++ ) { for (int i = 0 ; i < fixedList.size(); i ++ ) {
WxBillFeesStandardsListVo svo = fixedList.get(i); WxBillFeesStandardsListVo svo = fixedList.get(i);
WxAllBill property = generateBillPropertyByBillStandards(wxPayAccountBill,wxPropertyContract,isPreview,user,svo,billcount,shopInfo);
WxAllBill property = generateBillPropertyByBillStandards(null,wxPayAccountBill,wxPropertyContract,isPreview,user,svo,billcount,shopInfo);
allResultList.add(property); allResultList.add(property);
} }
} }
@@ -814,11 +817,15 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
} }
private WxAllBill generateBillPropertyByBillStandards(WxPayAccountBill wxPayAccountBill,WxPropertyContract wxPropertyContract,Integer isPreview,MallUserInfo user,WxBillFeesStandardsListVo svo,
private WxAllBill generateBillPropertyByBillStandards(WxAllBill wxBillProperty,WxPayAccountBill wxPayAccountBill,WxPropertyContract wxPropertyContract,Integer isPreview,MallUserInfo user,WxBillFeesStandardsListVo svo,
Integer billcount,Map<String, Object> shopInfo) { Integer billcount,Map<String, Object> shopInfo) {
Long feesStandardsId = svo.getFeeStandards().getId(); Long feesStandardsId = svo.getFeeStandards().getId();
boolean isDeposit = svo.isDeposit(); boolean isDeposit = svo.isDeposit();
return generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,svo.getStart(),svo.getEnd(),svo.getReceiveDate(),svo.getTotal(),user,billcount,shopInfo,"0",svo.getBillName(),svo.getParentBillId(),feesStandardsId,isDeposit);
Date receiveDate = svo.getReceiveDate();
if (null != wxBillProperty) {
receiveDate = wxBillProperty.getReceiveDate();
}
return generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,svo.getStart(),svo.getEnd(),receiveDate,svo.getTotal(),user,billcount,shopInfo,"0",svo.getBillName(),svo.getParentBillId(),feesStandardsId,isDeposit);
} }
private WxAllBill generateBillProperty(WxPayAccountBill wxPayAccountBill,WxPropertyContract wxPropertyContract,Integer isPreview,Date start,Date end,Date receiveDate,String needpay, private WxAllBill generateBillProperty(WxPayAccountBill wxPayAccountBill,WxPropertyContract wxPropertyContract,Integer isPreview,Date start,Date end,Date receiveDate,String needpay,
@@ -841,6 +848,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
wxBillProperty.setPay("0"); wxBillProperty.setPay("0");
wxBillProperty.setStarttime(start); wxBillProperty.setStarttime(start);
wxBillProperty.setEndtime(end); wxBillProperty.setEndtime(end);
wxBillProperty.setReceiveDate(receiveDate);;


wxBillProperty.setNeedPay(needpay); wxBillProperty.setNeedPay(needpay);
//wxBillProperty.setOwe(needpay); //wxBillProperty.setOwe(needpay);


+ 11
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Wyświetl plik

@@ -845,9 +845,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Date date = new Date(); Date date = new Date();
wxBillDeposit.setStarttime(wxRentContract.getFirstBillDateStart()); wxBillDeposit.setStarttime(wxRentContract.getFirstBillDateStart());
wxBillDeposit.setEndtime(wxRentContract.getFirstBillDateEnd()); wxBillDeposit.setEndtime(wxRentContract.getFirstBillDateEnd());
wxBillDeposit.setReceiveDate(wxRentContract.getFirstBillReceiveDate());
//wxBillDeposit.setExpiredDay(0L); //wxBillDeposit.setExpiredDay(0L);
//wxBillDeposit.setReceiveDate(time);
wxBillDeposit.updateTenantInfo(wxRentContract); wxBillDeposit.updateTenantInfo(wxRentContract);
//wxBillDeposit.setIsDel(0); //wxBillDeposit.setIsDel(0);
wxBillDeposit.setMerchantId(wxRentContract.getMerchantId()); wxBillDeposit.setMerchantId(wxRentContract.getMerchantId());
@@ -1138,7 +1138,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
List<BillTimeVo> billTimeVoList = new ArrayList<>(); List<BillTimeVo> billTimeVoList = new ArrayList<>();
if(saveDb){ if(saveDb){
billTimeVoList = initBillTimeList(yearList,wxRentContract.getRentalStartDate(),wxRentContract.getRentalEndDate(),wxRentContract.getAdjustPeriod(),dayType,receivePeriod);
billTimeVoList = initBillTimeList(yearList,wxRentContract.getRentalStartDate(),wxRentContract.getRentalEndDate(),wxRentContract.getAdjustPeriod(),dayType,receivePeriod,wxRentContract.getPayPeriodRate());
}else{ }else{
//预账单编辑账期,生成金额 //预账单编辑账期,生成金额
for (WxAllBill rent:wxRentContract.getPreviewBillRentList()) { for (WxAllBill rent:wxRentContract.getPreviewBillRentList()) {
@@ -1157,6 +1157,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
cupdate.setId(wxRentContract.getId()); cupdate.setId(wxRentContract.getId());
cupdate.setFirstBillDateStart(firstBillTime.getStartDate()); cupdate.setFirstBillDateStart(firstBillTime.getStartDate());
cupdate.setFirstBillDateEnd(firstBillTime.getEndDate()); cupdate.setFirstBillDateEnd(firstBillTime.getEndDate());
cupdate.setFirstBillReceiveDate(firstBillTime.getReceiveDate());
cupdate.setDecimalSize(null);//去掉默认的,避免更新 cupdate.setDecimalSize(null);//去掉默认的,避免更新
wxRentContractMapper.updateById(cupdate); wxRentContractMapper.updateById(cupdate);
} }
@@ -1300,7 +1301,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
wxBillRent.setPay("0"); wxBillRent.setPay("0");
wxBillRent.setStarttime(billTimeVo.getStartDate()); wxBillRent.setStarttime(billTimeVo.getStartDate());
wxBillRent.setEndtime(billTimeVo.getEndDate()); wxBillRent.setEndtime(billTimeVo.getEndDate());
//wxBillRent.setReceiveDate(billTimeVo.getReceiveDate());
wxBillRent.setReceiveDate(billTimeVo.getReceiveDate());
//wxBillRent.setContractNeedPay(needpay); //wxBillRent.setContractNeedPay(needpay);
//wxBillRent.setRentPriceInfo(getRentPriceInfo(wxRentContract,new BigDecimal(needpay))); //wxBillRent.setRentPriceInfo(getRentPriceInfo(wxRentContract,new BigDecimal(needpay)));
@@ -1375,6 +1376,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
manage.setPay(wxBillRent.getPay()); manage.setPay(wxBillRent.getPay());
manage.setStarttime(wxBillRent.getStarttime()); manage.setStarttime(wxBillRent.getStarttime());
manage.setEndtime(wxBillRent.getEndtime()); manage.setEndtime(wxBillRent.getEndtime());
manage.setReceiveDate(wxBillRent.getReceiveDate());;
manage.updateTenantInfo(wxBillRent); manage.updateTenantInfo(wxBillRent);
manage.setIsPreview(wxBillRent.getIsPreview()); manage.setIsPreview(wxBillRent.getIsPreview());
manage.setMerchantId(wxBillRent.getMerchantId()); manage.setMerchantId(wxBillRent.getMerchantId());
@@ -1666,7 +1668,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
// } // }
//yearList,每年的合同截止日期,到这个截止日之前之后,需要拆开时间 //yearList,每年的合同截止日期,到这个截止日之前之后,需要拆开时间
public static List<BillTimeVo> initBillTimeList(List<Date> yearList,Date start,Date end,Integer adjustPeriod,Integer dayType,int receivePeriod){
public static List<BillTimeVo> initBillTimeList(List<Date> yearList,Date start,Date end,Integer adjustPeriod,Integer dayType,int receivePeriod,int payPeriod){
List<BillTimeVo> list = new ArrayList<>(); List<BillTimeVo> list = new ArrayList<>();
int count = 0; int count = 0;
List<Date> yearsEndList = new ArrayList<Date>(); List<Date> yearsEndList = new ArrayList<Date>();
@@ -1674,6 +1676,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (yearsEndList.size() > 0) { if (yearsEndList.size() > 0) {
yearsEndList.remove(0); yearsEndList.remove(0);
} }
BillTimeVo receiveDate = null;
while (true) { while (true) {
BillTimeVo timeVo = new BillTimeVo(); BillTimeVo timeVo = new BillTimeVo();
@@ -1684,12 +1687,6 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//开始时间 //开始时间
timeVo.setStartDate(instance.getTime()); timeVo.setStartDate(instance.getTime());
if(!adjustPeriod.equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){
instance.add(Calendar.DATE, -1);
}
timeVo.setReceiveDate(instance.getTime());
//结束时间 //结束时间
instance.clear(); instance.clear();
instance.setTime(start); instance.setTime(start);
@@ -1734,6 +1731,10 @@ public class WxRentContractServiceImpl implements WxRentContractService {
list.add(timeVo); list.add(timeVo);
receiveDate = WxRentContractHelper.getReceiveDate(receiveDate,start, end, payPeriod,receivePeriod,dayType);
timeVo.setReceiveDate(receiveDate.getStartDate());
//next //next
start = DateUtils.getDaySet(timeVo.getEndDate(),Calendar.SECOND,1); start = DateUtils.getDaySet(timeVo.getEndDate(),Calendar.SECOND,1);


+ 3
- 2
mallinkService/src/main/resources/mapper/WxAllBillMapper.xml Wyświetl plik

@@ -24,6 +24,7 @@
<result column="use_money" jdbcType="VARCHAR" property="useMoney"/> <result column="use_money" jdbcType="VARCHAR" property="useMoney"/>
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/> <result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/> <result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate"/>
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status"/>
<result column="energy_fees_id" jdbcType="BIGINT" property="energyFeesId"/> <result column="energy_fees_id" jdbcType="BIGINT" property="energyFeesId"/>
<result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/>
@@ -49,7 +50,7 @@
<sql id="allColumns"> <sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`rent_shop_type`,`createtime`,`create_by`,`create_by_name`,`updatetime`,`update_by`,`update_by_name`, `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`rent_shop_type`,`createtime`,`create_by`,`create_by_name`,`updatetime`,`update_by`,`update_by_name`,
`price_detail`,`need_pay`,`receive_pay`,`pay`,`bill_type`,`pay_way`,`pay_date`,`set_off`,`use_money`,`starttime`,`endtime`,`status`,`energy_fees_id`,`return_pay`, `price_detail`,`need_pay`,`receive_pay`,`pay`,`bill_type`,`pay_way`,`pay_date`,`set_off`,`use_money`,`starttime`,`endtime`,`status`,`energy_fees_id`,`return_pay`,
`bill_remark`,`last_owe_call_time`,`last_owe_call_user`,`bussiness_manage_fee_need_pay`,`operating_manage_fee_need_pay`,`shop_id`,`shop_number`,
`bill_remark`,`last_owe_call_time`,`last_owe_call_user`,`bussiness_manage_fee_need_pay`,`operating_manage_fee_need_pay`,`shop_id`,`shop_number`,`receive_date`,
`is_preview`,`shop_info`,`rent_contract_id`,`property_contract_id`,`parent_bill_id`,`energy_reading_calcuteId`,`energy_reading_id`,`extra_create_from`,`rent_area` `is_preview`,`shop_info`,`rent_contract_id`,`property_contract_id`,`parent_bill_id`,`energy_reading_calcuteId`,`energy_reading_id`,`extra_create_from`,`rent_area`
</sql> </sql>


@@ -349,7 +350,7 @@
#{item.needPay},#{item.receivePay},#{item.pay},#{item.billType},#{item.payWay},#{item.payDate},#{item.setOff},#{item.useMoney}, #{item.needPay},#{item.receivePay},#{item.pay},#{item.billType},#{item.payWay},#{item.payDate},#{item.setOff},#{item.useMoney},
#{item.starttime},#{item.endtime},#{item.status},#{item.energyFeesId},#{item.returnPay},#{item.billRemark}, #{item.starttime},#{item.endtime},#{item.status},#{item.energyFeesId},#{item.returnPay},#{item.billRemark},
#{item.lastOweCallTime},#{item.lastOweCallUser},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay}, #{item.lastOweCallTime},#{item.lastOweCallUser},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay},
#{item.shopId},#{item.shopNumber},#{item.isPreview},#{item.shopInfo},#{item.rentContractId},#{item.propertyContractId},
#{item.shopId},#{item.shopNumber},#{item.receiveDate},#{item.isPreview},#{item.shopInfo},#{item.rentContractId},#{item.propertyContractId},
#{item.parentBillId},#{item.energyReadingCalcuteId},#{item.energyReadingId},#{item.extraCreateFrom},#{item.rentArea} #{item.parentBillId},#{item.energyReadingCalcuteId},#{item.energyReadingId},#{item.extraCreateFrom},#{item.rentArea}
) )
</foreach> </foreach>


+ 5
- 2
mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml Wyświetl plik

@@ -11,6 +11,7 @@
<result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/> <result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/>
<result column="receive_period" jdbcType="INTEGER" property="receivePeriod"/> <result column="receive_period" jdbcType="INTEGER" property="receivePeriod"/>
<result column="receive_period_unit" jdbcType="INTEGER" property="receivePeriodUnit"/> <result column="receive_period_unit" jdbcType="INTEGER" property="receivePeriodUnit"/>
<result column="pay_period_rate" jdbcType="INTEGER" property="payPeriodRate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
<result column="filepath" jdbcType="VARCHAR" property="filepath"/> <result column="filepath" jdbcType="VARCHAR" property="filepath"/>
@@ -67,15 +68,16 @@
<result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/> <result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/>
<result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/> <result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/>
<result column="first_bill_receive_date" jdbcType="TIMESTAMP" property="firstBillReceiveDate"/>
</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`,`first_bill_receive_date`,
`shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`,`fees_standards_info`,`first_bill_date_start`,`first_bill_date_end`, `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,`pay_period_rate`,
`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>
@@ -90,6 +92,7 @@
<if test=" null != signDate ">and `sign_date` = #{signDate}</if> <if test=" null != signDate ">and `sign_date` = #{signDate}</if>
<if test=" null != receivePeriod ">and `receive_period` = #{receivePeriod}</if> <if test=" null != receivePeriod ">and `receive_period` = #{receivePeriod}</if>
<if test=" null != receivePeriodUnit ">and `receive_period_unit` = #{receivePeriodUnit}</if> <if test=" null != receivePeriodUnit ">and `receive_period_unit` = #{receivePeriodUnit}</if>
<if test=" null != payPeriodRate ">and `pay_period_rate` = #{payPeriodRate}</if>
<if test=" null != tenantId and '' != tenantId"> <if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId} and `tenant_id` = #{tenantId}
</if> </if>


+ 5
- 2
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Wyświetl plik

@@ -20,6 +20,7 @@
<result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/> <result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/>
<result column="receive_period" jdbcType="INTEGER" property="receivePeriod"/> <result column="receive_period" jdbcType="INTEGER" property="receivePeriod"/>
<result column="receive_period_unit" jdbcType="INTEGER" property="receivePeriodUnit"/> <result column="receive_period_unit" jdbcType="INTEGER" property="receivePeriodUnit"/>
<result column="pay_period_rate" jdbcType="INTEGER" property="payPeriodRate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
<result column="filepath" jdbcType="VARCHAR" property="filepath"/> <result column="filepath" jdbcType="VARCHAR" property="filepath"/>
@@ -134,6 +135,7 @@
<result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/> <result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/>
<result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/> <result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/>
<result column="first_bill_receive_date" jdbcType="TIMESTAMP" property="firstBillReceiveDate"/>
</resultMap> </resultMap>


<sql id="allColumns"> <sql id="allColumns">
@@ -147,9 +149,9 @@
`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_ratio_way`,`revenue_ratio_set`,`adjust_ratio`,`adjust_period`,`pay_ratio`, `pay_account`,`filename`,`lease`,`type`,`revenue`,`revenue_ratio`,`revenue_ratio_way`,`revenue_ratio_set`,`adjust_ratio`,`adjust_period`,`pay_ratio`,
`start_date`,`end_date`,`shop_name`,`from_id`,`end_contract_time`,`revenue_fixed_rent_price`,`revenue_rent_price`, `start_date`,`end_date`,`shop_name`,`from_id`,`end_contract_time`,`revenue_fixed_rent_price`,`revenue_rent_price`,
`apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`,
`apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`,`pay_period_rate`,
`business_type`,`rent_info`, `file_names`,price_unit,rent_price,other_rent_price_info,`subject_name`,rent_start_type, `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,
`rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,first_bill_receive_date,
bussiness_management_fee,bussiness_management_fee_ratio_way,bussiness_management_fee_ratio, bussiness_management_fee,bussiness_management_fee_ratio_way,bussiness_management_fee_ratio,
operating_management_fee,operating_management_fee_ratio_way,operating_management_fee_ratio,out_date_notify_days,out_date_notify_phone,design_file operating_management_fee,operating_management_fee_ratio_way,operating_management_fee_ratio,out_date_notify_days,out_date_notify_phone,design_file
</sql> </sql>
@@ -167,6 +169,7 @@
<if test=" null != signDate and '' != signDate">and `sign_date` = #{signDate}</if> <if test=" null != signDate and '' != signDate">and `sign_date` = #{signDate}</if>
<if test=" null != receivePeriod and '' != receivePeriod">and `receive_period` = #{receivePeriod}</if> <if test=" null != receivePeriod and '' != receivePeriod">and `receive_period` = #{receivePeriod}</if>
<if test=" null != receivePeriodUnit and '' != receivePeriodUnit">and `receive_period_unit` = #{receivePeriodUnit}</if> <if test=" null != receivePeriodUnit and '' != receivePeriodUnit">and `receive_period_unit` = #{receivePeriodUnit}</if>
<if test=" null != payPeriodRate and '' != payPeriodRate">and `pay_period_rate` = #{payPeriodRate}</if>
<if test=" null != tenantId and '' != tenantId"> <if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId} and `tenant_id` = #{tenantId}
</if> </if>


Ładowanie…
Anuluj
Zapisz