Преглед изворни кода

[审批流][修改][完善账单审批]

release_toaliyun_real
luozukai пре 7 година
родитељ
комит
eab5c94fd7
2 измењених фајлова са 5 додато и 9 уклоњено
  1. +3
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  2. +2
    -1
      mallinkService/src/main/resources/mapper/WxTopicMapper.xml

+ 3
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Прегледај датотеку

@@ -734,8 +734,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
int paycount = lease / receivePeriod + extracount;
int index = paycount - 1;
final IdWorker idWorker = IdWorker.get();
//自然月,周期为一个月 n+1
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode()) && receivePeriod <= 1){
//自然月 n+1
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){
paycount ++;
}
for (int i = 0; i < paycount; i++) {
@@ -829,12 +829,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {

double needPayDouble;
double oneDayProce = (double) price/DateUtils.getMonthDayCount(wxBillRent.getEndtime());
if(receivePeriod <= 1) {//周期为一个月
needPayDouble = oneDayProce * endDateInt;
}else{
needPayDouble = price * (extralease-1);
needPayDouble += oneDayProce * endDateInt;
}
needPayDouble = oneDayProce * endDateInt;
DecimalFormat format = new DecimalFormat("0");
needpay = Integer.parseInt(format.format(needPayDouble)); //分做四舍五入
}


+ 2
- 1
mallinkService/src/main/resources/mapper/WxTopicMapper.xml Прегледај датотеку

@@ -59,13 +59,14 @@

<select id="findExist" parameterType="com.iformall.domain.po.WxTopic" resultMap="BaseResultMap">
SELECT * FROM wx_topic WHERE wx_topic.tenant_id = #{tenantId}
AND (`begin_time` >= #{beginTime} or `end_time` &lt;= #{endTime}) AND `status` = 1
AND (`begin_time` >= #{beginTime} and `end_time` &lt;= #{endTime}) AND `status` = 1
</select>

<select id="show" parameterType="com.iformall.domain.po.WxTopic" resultMap="BaseResultMap">
select t.*,cc.id as couponChannelId from wx_topic t left join wx_coupon_channel cc on(cc.sub_target_id = t.id)
where t.status = 1
and now() >= t.begin_time and now() &lt;= t.end_time
and t.tenant_id = #{tenantId}
order by t.begin_time desc limit 1
</select>



Loading…
Откажи
Сачувај