退款修改,小程序活动修改
This commit is contained in:
parent
712b79d0fa
commit
5e699f1ce6
@ -782,13 +782,19 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
//判断是否享受活动
|
||||
Map<String, Object> objectMap = activityDiscountTime(loginUser.getUserid(), new Date(), loginUser.getUserType(), Long.valueOf(map.get("chargingStationId").toString()), loginUser.getTenantId());
|
||||
if("1".equals(objectMap.get("state").toString())){
|
||||
if("1".equals(objectMap.get("totalDiscountType").toString())||"3".equals(objectMap.get("totalDiscountType").toString())){
|
||||
if("1".equals(objectMap.get("totalDiscountType").toString())){
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
powerFee = powerFee.subtract(powerFee.multiply(discountRate).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else if ("3".equals(objectMap.get("totalDiscountType").toString())){
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).divide(new BigDecimal(2),2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else{
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
@ -874,6 +880,12 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else if ("3".equals(objectMap.get("totalDiscountType").toString())){
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).divide(new BigDecimal(2),2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else{
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
@ -917,6 +929,12 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else if ("3".equals(objectMap.get("totalDiscountType").toString())){
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).divide(new BigDecimal(2),2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else{
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
@ -145,6 +145,12 @@ public class XhpcTerminalServiceImpl extends BaseService implements IXhpcTermina
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else if ("3".equals(objectMap.get("totalDiscountType").toString())){
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).divide(new BigDecimal(2),2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("activityServiceFee", serviceFee);
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}else{
|
||||
BigDecimal discountRate = new BigDecimal(objectMap.get("totalDiscountRate").toString()).divide(new BigDecimal(100),2, BigDecimal.ROUND_HALF_UP);
|
||||
serviceFee = serviceFee.subtract(serviceFee.multiply(discountRate).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
@ -728,6 +728,7 @@ public class XhpcRefundAuditController extends BaseController {
|
||||
logger.info("++++++++++++每20秒,扫描一次,退款订单金额小于100,自动审核通过++++++++++++++++");
|
||||
try {
|
||||
List<Long> list = iXhpcRefundOrderService.moneyPage(1);
|
||||
logger.info("++++++++++++有自动退款订单+++++list+++++++++++"+list.size());
|
||||
if(list !=null && list.size()>0){
|
||||
for (int i = 0; i <list.size() ; i++) {
|
||||
Long aLong = list.get(i);
|
||||
@ -744,10 +745,10 @@ public class XhpcRefundAuditController extends BaseController {
|
||||
//后期可以增加短信通知
|
||||
}
|
||||
}
|
||||
@Scheduled(cron = "0 0/1 * * * ?")
|
||||
@Scheduled(cron = "0 0/10 * * * ?")
|
||||
@GetMapping("/moneyPageTime")
|
||||
public void moneyPageTime(){
|
||||
logger.info("++++++++++++每1分钟,扫描一次,退款订单金额大于100,自动生成工单++++++++++++++++");
|
||||
logger.info("++++++++++++每10分钟,扫描一次,退款订单金额大于100,自动生成工单++++++++++++++++");
|
||||
try {
|
||||
List<Long> list = iXhpcRefundOrderService.moneyPage(2);
|
||||
if(list !=null && list.size()>0){
|
||||
@ -759,7 +760,7 @@ public class XhpcRefundAuditController extends BaseController {
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("++++++++++++每1分钟,扫描一次,退款订单金额大于100,自动生成工单异常++++++++++++++++");
|
||||
logger.info("++++++++++++每10分钟,扫描一次,退款订单金额大于100,自动生成工单异常++++++++++++++++");
|
||||
e.printStackTrace();
|
||||
//后期可以增加短信通知
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@
|
||||
<if test="type==1">
|
||||
and amount <=100
|
||||
</if>
|
||||
<if test="type=2">
|
||||
<if test="type==2">
|
||||
and amount >100
|
||||
</if>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user