New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.vo.PlatformMoneyVO; |
| | | import com.stylefeng.guns.modular.system.vo.PlatformVO; |
| | | import com.stylefeng.guns.modular.system.vo.WaterMoneyVO; |
| | | import com.stylefeng.guns.modular.system.vo.WaterVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.*; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2021-04-22 10:53:34 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/platform") |
| | | public class PlatformController extends BaseController { |
| | | private String PREFIX = "/system/platform/"; |
| | | @Autowired |
| | | private IIncomeService tIncomeService; |
| | | @Autowired |
| | | private ITOrderPrivateCarService orderPrivateCarService; |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("/commission") |
| | | public String index( Model model) { |
| | | return PREFIX + "commission.html"; |
| | | } |
| | | @RequestMapping("/water") |
| | | public String watter( Model model) { |
| | | return PREFIX + "watter.html"; |
| | | } |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | @Autowired |
| | | private ISettlementRecordService settlementRecordService; |
| | | |
| | | @Autowired |
| | | private ISettlementDetailService settlementDetailService; |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | public static void main(String[] args) { |
| | | // 获取今天的日期 |
| | | LocalDate today = LocalDate.now(); |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | |
| | | // 获取本月第一天的日期和时间 |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * |
| | | * 计算金额 |
| | | * @param time |
| | | * @param insertTime |
| | | * @param state |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/commission/getCount") |
| | | @ResponseBody |
| | | public Object getCount(Integer time,String insertTime,Integer state) { |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | List<Income> incomes = new ArrayList<>(); |
| | | List<SettlementDetail> settlementDetails = new ArrayList<>(); |
| | | if (state!=null){ |
| | | switch (state){ |
| | | case 1: |
| | | // 已结算 |
| | | // 查询已结算的 |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | |
| | | |
| | | break; |
| | | case 2: |
| | | // 未结算 |
| | | |
| | | break; |
| | | } |
| | | }else{ |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | } |
| | | |
| | | |
| | | List<PlatformVO> res = new ArrayList<>(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | // 已结算金额 |
| | | BigDecimal balance = new BigDecimal("0"); |
| | | // 未结算金额 |
| | | BigDecimal unBalance = new BigDecimal("0"); |
| | | // 查询所有已结算的订单 |
| | | for (Income income : incomes) { |
| | | PlatformVO platformVO = new PlatformVO(); |
| | | platformVO.setState(1); |
| | | switch (income.getOrderType()){ |
| | | case 1: |
| | | // 查询订单信息 |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | if (tDriver != null){ |
| | | platformVO.setDriverName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | platformVO.setDriverPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setEndTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | String string = income.getMoney().toString(); |
| | | BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | platformVO.setMoney(bigDecimal1); |
| | | if (tOrderPrivateCar.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderPrivateCar.getPayType()){ |
| | | case 1: |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | platformVO.setPayType("余额支付"); |
| | | break; |
| | | case 4: |
| | | platformVO.setPayType("现金支付"); |
| | | break; |
| | | } |
| | | // 专车订单 |
| | | balance = balance.add(new BigDecimal(income.getMoney())); |
| | | res.add(platformVO); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | if (tDriver1!=null){ |
| | | platformVO.setDriverName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | platformVO.setDriverPhone(tDriver1.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | platformVO.setMoney(new BigDecimal(income.getMoney())); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setEndTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | if (tOrderLogistics.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderLogistics.getPayType()){ |
| | | case 1: |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | platformVO.setPayType("余额支付"); |
| | | break; |
| | | case 4: |
| | | platformVO.setPayType("现金支付"); |
| | | break; |
| | | } |
| | | // 专车订单 |
| | | balance = balance.add(new BigDecimal(income.getMoney())); |
| | | res.add(platformVO); |
| | | break; |
| | | } |
| | | } |
| | | EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | settlementDetailEntityWrapper.between("createTime", start, end); |
| | | settlementDetails = settlementDetailService.selectList(settlementDetailEntityWrapper); |
| | | // 查询所有现金支付的订单 |
| | | for (SettlementDetail settlementDetail : settlementDetails) { |
| | | PlatformVO platformVO = new PlatformVO(); |
| | | switch (settlementDetail.getOrderType()){ |
| | | case 1: |
| | | // 专车订单 |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | if (tDriver!=null){ |
| | | platformVO.setDriverName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | platformVO.setDriverPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | |
| | | platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | String string = settlementDetail.getPrice().toString(); |
| | | BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | platformVO.setMoney(bigDecimal1); |
| | | platformVO.setPayType("现金支付"); |
| | | |
| | | // 查询是否结算 |
| | | SettlementRecord settlementRecord = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | if (state!=null){ |
| | | if (state == 1){ |
| | | // 查询已结算的 |
| | | if (settlementRecord.getPaymentStatus() == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | if (state == 2){ |
| | | // 查询未结算的 |
| | | if (settlementRecord.getPaymentStatus() == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | if (settlementRecord.getPaymentStatus() == 2){ |
| | | // 已结算 |
| | | platformVO.setState(1); |
| | | balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | if (settlementRecord.getDay()!=null){ |
| | | platformVO.setEndTime(format.format(settlementRecord.getDay())); |
| | | } |
| | | }else{ |
| | | // 未结算 |
| | | platformVO.setState(2); |
| | | unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | } |
| | | res.add(platformVO); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | if (tDriver1!=null){ |
| | | platformVO.setDriverName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | platformVO.setDriverPhone(tDriver1.getPhone()); |
| | | } |
| | | platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | String string1 = settlementDetail.getPrice().toString(); |
| | | BigDecimal bigDecimal2 = new BigDecimal(string1); |
| | | platformVO.setMoney(bigDecimal2); |
| | | platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | platformVO.setPayType("现金支付"); |
| | | // 查询是否结算 |
| | | SettlementRecord settlementRecord1 = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | if (state!=null){ |
| | | if (state == 1){ |
| | | // 查询已结算的 |
| | | if (settlementRecord1.getPaymentStatus() == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | if (state == 2){ |
| | | // 查询未结算的 |
| | | if (settlementRecord1.getPaymentStatus() == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | if (settlementRecord1.getPaymentStatus() == 2){ |
| | | // 已结算 |
| | | platformVO.setState(1); |
| | | balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | if (settlementRecord1.getDay()!=null){ |
| | | platformVO.setEndTime(format.format(settlementRecord1.getDay())); |
| | | } |
| | | }else{ |
| | | // 未结算 |
| | | platformVO.setState(2); |
| | | unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | } |
| | | res.add(platformVO); |
| | | break; |
| | | } |
| | | } |
| | | PlatformMoneyVO platformMoneyVO = new PlatformMoneyVO(); |
| | | // 计算佣金总额 |
| | | BigDecimal add = unBalance.add(balance); |
| | | BigDecimal bigDecimal = add.setScale(2, RoundingMode.HALF_UP); |
| | | BigDecimal bigDecimal1 = unBalance.setScale(2, RoundingMode.HALF_UP); |
| | | BigDecimal bigDecimal2 = balance.setScale(2, RoundingMode.HALF_UP); |
| | | platformMoneyVO.setTotal(bigDecimal); |
| | | platformMoneyVO.setBalance(bigDecimal2); |
| | | platformMoneyVO.setUnBalance(bigDecimal1); |
| | | return platformMoneyVO; |
| | | } |
| | | |
| | | /** |
| | | * 第三方流水统计 获取金额 |
| | | * @param time |
| | | * @param insertTime |
| | | * @param |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/water/getCount") |
| | | @ResponseBody |
| | | public Object getCount1(Integer time,String insertTime,Integer payType,Integer type) { |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | List<Income> incomes = new ArrayList<>(); |
| | | List<SettlementDetail> settlementDetails = new ArrayList<>(); |
| | | // 用户订单记录 |
| | | List<TPubTransactionDetails> tOrderPrivateCars = new ArrayList<>(); |
| | | // 用户充值 |
| | | List<TPubTransactionDetails> tPubTransactionDetails = new ArrayList<>(); |
| | | // 司机提现 |
| | | List<TPubWithdrawal> driver = new ArrayList<>(); |
| | | // 用户提现 |
| | | List<TPubWithdrawal> user = new ArrayList<>(); |
| | | // 余额充值wrapper |
| | | Wrapper<TPubTransactionDetails> orderType = new EntityWrapper<TPubTransactionDetails>() |
| | | .eq("orderType", 5) |
| | | .between("insertTime",start,end); |
| | | // 用户提现wrapper |
| | | Wrapper<TPubWithdrawal> userWrapper = new EntityWrapper<TPubWithdrawal>() |
| | | .eq("state", 2) |
| | | .eq("userType", 1) |
| | | .between("handleTime", start, end); |
| | | // 司机提现wrapper |
| | | Wrapper<TPubWithdrawal> between = new EntityWrapper<TPubWithdrawal>() |
| | | .eq("state", 2) |
| | | .eq("userType", 2) |
| | | .between("handleTime", start, end); |
| | | // 用户订单wrapper |
| | | // Wrapper<PaymentRecord> between1 = new EntityWrapper<PaymentRecord>() |
| | | // .eq("type", 1) |
| | | // .eq("category", 1) |
| | | // .ne("orderType", 3) |
| | | // .ne("orderType", 5) |
| | | // .ne("orderType", 6) |
| | | // .between("insertTime", start, end); |
| | | // 用户订单wrapper |
| | | Wrapper<TPubTransactionDetails> between1 = new EntityWrapper<TPubTransactionDetails>() |
| | | .in("orderType", Arrays.asList(1, 4)) |
| | | .between("insertTime", start, end); |
| | | |
| | | if (type != null){ |
| | | switch (type){ |
| | | case 1: |
| | | // 只查询用户订单 |
| | | tOrderPrivateCars = pubTransactionDetailsService.selectList(between1); |
| | | break; |
| | | case 2: |
| | | // 只查询用户充值 |
| | | tPubTransactionDetails = pubTransactionDetailsService.selectList(orderType); |
| | | break; |
| | | case 3: |
| | | // 只查询司机已结算的 |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | break; |
| | | case 4: |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | driver = pubWithdrawalService.selectList(between); |
| | | // 只查询司机提现 |
| | | break; |
| | | case 5: |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | // 只查询用户提现 |
| | | user = pubWithdrawalService.selectList(userWrapper); |
| | | break; |
| | | } |
| | | }else{ |
| | | tOrderPrivateCars = pubTransactionDetailsService.selectList(between1); |
| | | tPubTransactionDetails = pubTransactionDetailsService.selectList(orderType); |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | driver = pubWithdrawalService.selectList(between); |
| | | user = pubWithdrawalService.selectList(userWrapper); |
| | | } |
| | | List<WaterVO> res = new ArrayList<>(); |
| | | // List<PlatformVO> res = new ArrayList<>(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 司机结算金额 |
| | | BigDecimal balance = new BigDecimal("0"); |
| | | // 用户消费金额 |
| | | BigDecimal userConsume = new BigDecimal("0"); |
| | | // 用户充值金额 |
| | | BigDecimal userRecharge = new BigDecimal("0"); |
| | | // 司机提现金额 |
| | | BigDecimal driverWithdrawal = new BigDecimal("0"); |
| | | // 用户提现金额 |
| | | BigDecimal userWithdrawal = new BigDecimal("0"); |
| | | // 用户订单消费 |
| | | |
| | | for (TPubTransactionDetails tOrderPrivateCar : tOrderPrivateCars) { |
| | | WaterVO waterVO = new WaterVO(); |
| | | waterVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | waterVO.setType("用户订单消费"); |
| | | switch (tOrderPrivateCar.getOrderType()){ |
| | | case 1: |
| | | // 专车 |
| | | TOrderPrivateCar tOrderPrivateCar1 = orderPrivateCarService.selectById(tOrderPrivateCar.getOrderId()); |
| | | if (tOrderPrivateCar1 != null){ |
| | | waterVO.setCode(tOrderPrivateCar1.getOrderNum()); |
| | | String string = tOrderPrivateCar.getMoney().toString(); |
| | | waterVO.setMoney(new BigDecimal(string)); |
| | | }else{ |
| | | waterVO.setMoney(new BigDecimal("0")); |
| | | } |
| | | TUser user1 = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (user1!=null){ |
| | | waterVO.setName(user1.getNickName()); |
| | | waterVO.setPhone(user1.getPhone()); |
| | | } |
| | | |
| | | if (tOrderPrivateCar1 != null){ |
| | | if (tOrderPrivateCar1.getPayType()!=null){ |
| | | switch (tOrderPrivateCar1.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | |
| | | case 4: |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | if (tOrderPrivateCar1 != null){ |
| | | waterVO.setRemark(tOrderPrivateCar1.getRemark()); |
| | | } |
| | | res.add(waterVO); |
| | | userConsume = userConsume.add(new BigDecimal(tOrderPrivateCar.getMoney().toString())); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(tOrderPrivateCar.getOrderId()); |
| | | if (tOrderLogistics != null){ |
| | | waterVO.setCode(tOrderLogistics.getOrderNum()); |
| | | String string = tOrderPrivateCar.getMoney().toString(); |
| | | waterVO.setMoney(new BigDecimal(string)); |
| | | }else{ |
| | | waterVO.setMoney(new BigDecimal("0")); |
| | | } |
| | | TUser user2 = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (user2!=null){ |
| | | waterVO.setName(user2.getNickName()); |
| | | waterVO.setPhone(user2.getPhone()); |
| | | } |
| | | waterVO.setType("用户订单消费"); |
| | | if (tOrderLogistics != null){ |
| | | if (tOrderLogistics.getPayType()!=null){ |
| | | switch (tOrderLogistics.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | |
| | | case 4: |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | if (tOrderLogistics != null){ |
| | | waterVO.setRemark(tOrderLogistics.getRemark()); |
| | | } |
| | | res.add(waterVO); |
| | | userConsume = userConsume.add(new BigDecimal(tOrderPrivateCar.getMoney().toString())); |
| | | break; |
| | | } |
| | | } |
| | | // 司机提现 |
| | | for (TPubWithdrawal tPubWithdrawal : driver) { |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | WaterVO waterVO = new WaterVO(); |
| | | waterVO.setInsertTime(format.format(tPubWithdrawal.getHandleTime())); |
| | | waterVO.setCode(tPubWithdrawal.getCode()); |
| | | TDriver tDriver = driverService.selectById(tPubWithdrawal.getUserId()); |
| | | if (tDriver!=null){ |
| | | waterVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | waterVO.setPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | waterVO.setMoney(tPubWithdrawal.getMoney()); |
| | | waterVO.setPayType("银行卡支付"); |
| | | waterVO.setType("司机提现"); |
| | | waterVO.setRemark(tPubWithdrawal.getRemark()); |
| | | res.add(waterVO); |
| | | driverWithdrawal = driverWithdrawal.add(tPubWithdrawal.getMoney()); |
| | | } |
| | | // 用户提现 |
| | | for (TPubWithdrawal tPubWithdrawal : user) { |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | WaterVO waterVO = new WaterVO(); |
| | | waterVO.setInsertTime(format.format(tPubWithdrawal.getHandleTime())); |
| | | waterVO.setCode(tPubWithdrawal.getCode()); |
| | | TUser user2 = appUserService.selectById(tPubWithdrawal.getUserId()); |
| | | if (user2!=null){ |
| | | waterVO.setName(user2.getNickName()); |
| | | waterVO.setPhone(user2.getPhone()); |
| | | } |
| | | waterVO.setMoney(tPubWithdrawal.getMoney()); |
| | | waterVO.setPayType("银行卡支付"); |
| | | waterVO.setType("用户提现"); |
| | | waterVO.setRemark(tPubWithdrawal.getRemark()); |
| | | res.add(waterVO); |
| | | userWithdrawal = userWithdrawal.add(tPubWithdrawal.getMoney()); |
| | | } |
| | | // 查询用户充值 |
| | | for (TPubTransactionDetails tPubTransactionDetail : tPubTransactionDetails) { |
| | | WaterVO waterVO = new WaterVO(); |
| | | Integer orderId = tPubTransactionDetail.getOrderId(); |
| | | PaymentRecord paymentRecord = paymentRecordService.selectById(orderId); |
| | | if (paymentRecord!=null){ |
| | | waterVO.setInsertTime(format.format(paymentRecord.getInsertTime())); |
| | | waterVO.setCode(paymentRecord.getCode()); |
| | | if (paymentRecord.getPayType()!=null){ |
| | | switch (paymentRecord.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("银行卡支付"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | waterVO.setMoney(new BigDecimal(paymentRecord.getAmount().toString())); |
| | | }else{ |
| | | continue; |
| | | } |
| | | if (paymentRecord.getUserId()!=null){ |
| | | TUser user2 = appUserService.selectById(paymentRecord.getUserId()); |
| | | if (user2!=null){ |
| | | waterVO.setName(user2.getNickName()); |
| | | waterVO.setPhone(user2.getPhone()); |
| | | } |
| | | } |
| | | |
| | | waterVO.setType("用户充值"); |
| | | waterVO.setRemark(tPubTransactionDetail.getRemark()); |
| | | res.add(waterVO); |
| | | userRecharge = userRecharge.add(new BigDecimal(paymentRecord.getAmount().toString())); |
| | | } |
| | | // 查询所有已结算的订单 |
| | | for (Income income : incomes) { |
| | | WaterVO platformVO = new WaterVO(); |
| | | platformVO.setType("司机结算"); |
| | | switch (income.getOrderType()){ |
| | | case 1: |
| | | // 查询订单信息 |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | if (tDriver != null){ |
| | | platformVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | platformVO.setPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setInsertTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | if (tOrderPrivateCar.getOrderMoney() != null){ |
| | | String string = tOrderPrivateCar.getOrderMoney().toString(); |
| | | BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | platformVO.setMoney(bigDecimal1); |
| | | }else{ |
| | | continue; |
| | | } |
| | | |
| | | if (tOrderPrivateCar.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderPrivateCar.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | case 4: |
| | | continue; |
| | | } |
| | | |
| | | // 专车订单 |
| | | String string4 = tOrderPrivateCar.getOrderMoney().toString(); |
| | | balance = balance.add(new BigDecimal(string4)); |
| | | res.add(platformVO); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | if (tDriver1!=null){ |
| | | platformVO.setName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | platformVO.setPhone(tDriver1.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | platformVO.setMoney(new BigDecimal(income.getMoney())); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setInsertTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | if (tOrderLogistics.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderLogistics.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | |
| | | case 4: |
| | | continue; |
| | | } |
| | | String string1 = tOrderLogistics.getOrderMoney().toString(); |
| | | // 小件物流订单 |
| | | balance = balance.add(new BigDecimal(string1)); |
| | | res.add(platformVO); |
| | | break; |
| | | } |
| | | } |
| | | // EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | // settlementDetailEntityWrapper.between("createTime", start, end); |
| | | // settlementDetails = settlementDetailService.selectList(settlementDetailEntityWrapper); |
| | | // // 查询所有现金支付的订单 |
| | | // for (SettlementDetail settlementDetail : settlementDetails) { |
| | | // WaterVO platformVO = new WaterVO(); |
| | | // switch (settlementDetail.getOrderType()){ |
| | | // case 1: |
| | | // // 专车订单 |
| | | // TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); |
| | | // if (tOrderPrivateCar==null){ |
| | | // continue; |
| | | // } |
| | | // platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | // TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | // if (tDriver!=null){ |
| | | // platformVO.setDriverName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | // platformVO.setDriverPhone(tDriver.getPhone()); |
| | | // } |
| | | // platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | // platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | // String string = settlementDetail.getPrice().toString(); |
| | | // BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | // platformVO.setMoney(bigDecimal1); |
| | | // platformVO.setPayType("现金支付"); |
| | | // // 查询是否结算 |
| | | // SettlementRecord settlementRecord = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | // |
| | | // if (settlementRecord.getPaymentStatus() == 1){ |
| | | // continue; |
| | | // } |
| | | // |
| | | // // 已结算 |
| | | // platformVO.setState(1); |
| | | // balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | // if (settlementRecord.getDay()!=null){ |
| | | // platformVO.setInsertTime(format.format(settlementRecord.getDay())); |
| | | // } |
| | | // |
| | | // res.add(platformVO); |
| | | // break; |
| | | // case 4: |
| | | // // 小件物流 |
| | | // // 查询订单信息 |
| | | // TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId()); |
| | | // if (tOrderLogistics==null){ |
| | | // continue; |
| | | // } |
| | | // platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | // TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | // if (tDriver1!=null){ |
| | | // platformVO.setDriverName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | // platformVO.setDriverPhone(tDriver1.getPhone()); |
| | | // } |
| | | // platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | // String string1 = settlementDetail.getPrice().toString(); |
| | | // BigDecimal bigDecimal2 = new BigDecimal(string1); |
| | | // platformVO.setMoney(bigDecimal2); |
| | | // platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | // platformVO.setPayType("现金支付"); |
| | | // // 查询是否结算 |
| | | // SettlementRecord settlementRecord1 = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | // if (payType!=null){ |
| | | // if (payType == 1){ |
| | | // // 查询已结算的 |
| | | // if (settlementRecord1.getPaymentStatus() == 1){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // if (payType == 2){ |
| | | // // 查询未结算的 |
| | | // if (settlementRecord1.getPaymentStatus() == 2){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // } |
| | | // if (settlementRecord1.getPaymentStatus() == 2){ |
| | | // // 已结算 |
| | | // platformVO.setState(1); |
| | | // balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | // if (settlementRecord1.getDay()!=null){ |
| | | // platformVO.setInsertTime(format.format(settlementRecord1.getDay())); |
| | | // } |
| | | // }else{ |
| | | // // 未结算 |
| | | // platformVO.setState(2); |
| | | // unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | // } |
| | | // res.add(platformVO); |
| | | // break; |
| | | // } |
| | | // } |
| | | // 计算佣金总额 |
| | | // BigDecimal add = unBalance.add(balance); |
| | | Collections.sort(res, Comparator.comparing(WaterVO::getInsertTime).reversed()); |
| | | WaterMoneyVO waterMoneyVO = new WaterMoneyVO(); |
| | | BigDecimal add = userRecharge.add(userConsume).add(balance).subtract(driverWithdrawal).subtract(userWithdrawal); |
| | | waterMoneyVO.setTotal(add); |
| | | waterMoneyVO.setUserOrder(userConsume); |
| | | waterMoneyVO.setUserCharge(userRecharge); |
| | | waterMoneyVO.setBalance(balance); |
| | | waterMoneyVO.setDriverWithdrawal(driverWithdrawal); |
| | | waterMoneyVO.setUserWithdrawal(userWithdrawal); |
| | | return waterMoneyVO; |
| | | } |
| | | /** |
| | | * 第三方流水统计获取列表 |
| | | */ |
| | | |
| | | @Autowired |
| | | private ITPubTransactionDetailsService pubTransactionDetailsService; |
| | | @Autowired |
| | | private ITPubWithdrawalService pubWithdrawalService; |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private ITUserService appUserService; |
| | | @RequestMapping(value = "/water/list") |
| | | @ResponseBody |
| | | public Object list1(Integer time,String insertTime,Integer payType,Integer type) { |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | List<Income> incomes = new ArrayList<>(); |
| | | List<SettlementDetail> settlementDetails = new ArrayList<>(); |
| | | // 用户订单记录 |
| | | List<TPubTransactionDetails> tOrderPrivateCars = new ArrayList<>(); |
| | | // 用户充值 |
| | | List<TPubTransactionDetails> tPubTransactionDetails = new ArrayList<>(); |
| | | // 司机提现 |
| | | List<TPubWithdrawal> driver = new ArrayList<>(); |
| | | // 用户提现 |
| | | List<TPubWithdrawal> user = new ArrayList<>(); |
| | | // 余额充值wrapper |
| | | Wrapper<TPubTransactionDetails> orderType = new EntityWrapper<TPubTransactionDetails>() |
| | | .eq("orderType", 5) |
| | | .between("insertTime",start,end); |
| | | // 用户提现wrapper |
| | | Wrapper<TPubWithdrawal> userWrapper = new EntityWrapper<TPubWithdrawal>() |
| | | .eq("state", 2) |
| | | .eq("userType", 1) |
| | | .between("handleTime", start, end); |
| | | // 司机提现wrapper |
| | | Wrapper<TPubWithdrawal> between = new EntityWrapper<TPubWithdrawal>() |
| | | .eq("state", 2) |
| | | .eq("userType", 2) |
| | | .between("handleTime", start, end); |
| | | // 用户订单wrapper |
| | | // Wrapper<PaymentRecord> between1 = new EntityWrapper<PaymentRecord>() |
| | | // .eq("type", 1) |
| | | // .eq("category", 1) |
| | | // .ne("orderType", 3) |
| | | // .ne("orderType", 5) |
| | | // .ne("orderType", 6) |
| | | // .between("insertTime", start, end); |
| | | // 用户订单wrapper |
| | | Wrapper<TPubTransactionDetails> between1 = new EntityWrapper<TPubTransactionDetails>() |
| | | .in("orderType", Arrays.asList(1, 4)) |
| | | .between("insertTime", start, end); |
| | | |
| | | if (type != null){ |
| | | switch (type){ |
| | | case 1: |
| | | // 只查询用户订单 |
| | | tOrderPrivateCars = pubTransactionDetailsService.selectList(between1); |
| | | break; |
| | | case 2: |
| | | // 只查询用户充值 |
| | | tPubTransactionDetails = pubTransactionDetailsService.selectList(orderType); |
| | | break; |
| | | case 3: |
| | | // 只查询司机已结算的 |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | break; |
| | | case 4: |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | driver = pubWithdrawalService.selectList(between); |
| | | // 只查询司机提现 |
| | | break; |
| | | case 5: |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | // 只查询用户提现 |
| | | user = pubWithdrawalService.selectList(userWrapper); |
| | | break; |
| | | } |
| | | }else{ |
| | | tOrderPrivateCars = pubTransactionDetailsService.selectList(between1); |
| | | tPubTransactionDetails = pubTransactionDetailsService.selectList(orderType); |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | driver = pubWithdrawalService.selectList(between); |
| | | user = pubWithdrawalService.selectList(userWrapper); |
| | | } |
| | | List<WaterVO> res = new ArrayList<>(); |
| | | // List<PlatformVO> res = new ArrayList<>(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 司机结算金额 |
| | | BigDecimal balance = new BigDecimal("0"); |
| | | // 用户消费金额 |
| | | BigDecimal userConsume = new BigDecimal("0"); |
| | | // 用户充值金额 |
| | | BigDecimal userRecharge = new BigDecimal("0"); |
| | | // 司机提现金额 |
| | | BigDecimal driverWithdrawal = new BigDecimal("0"); |
| | | // 用户提现金额 |
| | | BigDecimal userWithdrawal = new BigDecimal("0"); |
| | | // 用户订单消费 |
| | | |
| | | for (TPubTransactionDetails tOrderPrivateCar : tOrderPrivateCars) { |
| | | WaterVO waterVO = new WaterVO(); |
| | | waterVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | waterVO.setType("用户订单消费"); |
| | | switch (tOrderPrivateCar.getOrderType()){ |
| | | case 1: |
| | | // 专车 |
| | | TOrderPrivateCar tOrderPrivateCar1 = orderPrivateCarService.selectById(tOrderPrivateCar.getOrderId()); |
| | | if (tOrderPrivateCar1 != null){ |
| | | waterVO.setCode(tOrderPrivateCar1.getOrderNum()); |
| | | String string = tOrderPrivateCar.getMoney().toString(); |
| | | waterVO.setMoney(new BigDecimal(string)); |
| | | }else{ |
| | | waterVO.setMoney(new BigDecimal("0")); |
| | | } |
| | | TUser user1 = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (user1!=null){ |
| | | waterVO.setName(user1.getNickName()); |
| | | waterVO.setPhone(user1.getPhone()); |
| | | } |
| | | |
| | | if (tOrderPrivateCar1 != null){ |
| | | if (tOrderPrivateCar1.getPayType()!=null){ |
| | | switch (tOrderPrivateCar1.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | |
| | | case 4: |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | if (tOrderPrivateCar1 != null){ |
| | | waterVO.setRemark(tOrderPrivateCar1.getRemark()); |
| | | } |
| | | res.add(waterVO); |
| | | userConsume = userConsume.add(new BigDecimal(tOrderPrivateCar.getMoney().toString())); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(tOrderPrivateCar.getOrderId()); |
| | | if (tOrderLogistics != null){ |
| | | waterVO.setCode(tOrderLogistics.getOrderNum()); |
| | | String string = tOrderPrivateCar.getMoney().toString(); |
| | | waterVO.setMoney(new BigDecimal(string)); |
| | | }else{ |
| | | waterVO.setMoney(new BigDecimal("0")); |
| | | } |
| | | TUser user2 = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (user2!=null){ |
| | | waterVO.setName(user2.getNickName()); |
| | | waterVO.setPhone(user2.getPhone()); |
| | | } |
| | | waterVO.setType("用户订单消费"); |
| | | if (tOrderLogistics != null){ |
| | | if (tOrderLogistics.getPayType()!=null){ |
| | | switch (tOrderLogistics.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | |
| | | case 4: |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | }else{ |
| | | continue; |
| | | } |
| | | if (tOrderLogistics != null){ |
| | | waterVO.setRemark(tOrderLogistics.getRemark()); |
| | | } |
| | | res.add(waterVO); |
| | | userConsume = userConsume.add(new BigDecimal(tOrderPrivateCar.getMoney().toString())); |
| | | break; |
| | | } |
| | | } |
| | | // 司机提现 |
| | | for (TPubWithdrawal tPubWithdrawal : driver) { |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | WaterVO waterVO = new WaterVO(); |
| | | waterVO.setInsertTime(format.format(tPubWithdrawal.getHandleTime())); |
| | | waterVO.setCode(tPubWithdrawal.getCode()); |
| | | TDriver tDriver = driverService.selectById(tPubWithdrawal.getUserId()); |
| | | if (tDriver!=null){ |
| | | waterVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | waterVO.setPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | waterVO.setMoney(tPubWithdrawal.getMoney()); |
| | | waterVO.setPayType("银行卡支付"); |
| | | waterVO.setType("司机提现"); |
| | | waterVO.setRemark(tPubWithdrawal.getRemark()); |
| | | res.add(waterVO); |
| | | driverWithdrawal = driverWithdrawal.add(tPubWithdrawal.getMoney()); |
| | | } |
| | | // 用户提现 |
| | | for (TPubWithdrawal tPubWithdrawal : user) { |
| | | if(payType!=null && payType == 2){ |
| | | break; |
| | | } |
| | | WaterVO waterVO = new WaterVO(); |
| | | waterVO.setInsertTime(format.format(tPubWithdrawal.getHandleTime())); |
| | | waterVO.setCode(tPubWithdrawal.getCode()); |
| | | TUser user2 = appUserService.selectById(tPubWithdrawal.getUserId()); |
| | | if (user2!=null){ |
| | | waterVO.setName(user2.getNickName()); |
| | | waterVO.setPhone(user2.getPhone()); |
| | | } |
| | | waterVO.setMoney(tPubWithdrawal.getMoney()); |
| | | waterVO.setPayType("银行卡支付"); |
| | | waterVO.setType("用户提现"); |
| | | waterVO.setRemark(tPubWithdrawal.getRemark()); |
| | | res.add(waterVO); |
| | | userWithdrawal = userWithdrawal.add(tPubWithdrawal.getMoney()); |
| | | } |
| | | // 查询用户充值 |
| | | for (TPubTransactionDetails tPubTransactionDetail : tPubTransactionDetails) { |
| | | WaterVO waterVO = new WaterVO(); |
| | | Integer orderId = tPubTransactionDetail.getOrderId(); |
| | | PaymentRecord paymentRecord = paymentRecordService.selectById(orderId); |
| | | if (paymentRecord!=null){ |
| | | waterVO.setInsertTime(format.format(paymentRecord.getInsertTime())); |
| | | waterVO.setCode(paymentRecord.getCode()); |
| | | if (paymentRecord.getPayType()!=null){ |
| | | switch (paymentRecord.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | waterVO.setPayType("银行卡支付"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | waterVO.setMoney(new BigDecimal(paymentRecord.getAmount().toString())); |
| | | }else{ |
| | | continue; |
| | | } |
| | | if (paymentRecord.getUserId()!=null){ |
| | | TUser user2 = appUserService.selectById(paymentRecord.getUserId()); |
| | | if (user2!=null){ |
| | | waterVO.setName(user2.getNickName()); |
| | | waterVO.setPhone(user2.getPhone()); |
| | | } |
| | | } |
| | | |
| | | waterVO.setType("用户充值"); |
| | | waterVO.setRemark(tPubTransactionDetail.getRemark()); |
| | | res.add(waterVO); |
| | | userRecharge = userRecharge.add(new BigDecimal(paymentRecord.getAmount().toString())); |
| | | } |
| | | // 查询所有已结算的订单 |
| | | for (Income income : incomes) { |
| | | WaterVO platformVO = new WaterVO(); |
| | | platformVO.setType("司机结算"); |
| | | switch (income.getOrderType()){ |
| | | case 1: |
| | | // 查询订单信息 |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | if (tDriver != null){ |
| | | platformVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | platformVO.setPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setInsertTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | if (tOrderPrivateCar.getOrderMoney() != null){ |
| | | String string = tOrderPrivateCar.getOrderMoney().toString(); |
| | | BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | platformVO.setMoney(bigDecimal1); |
| | | }else{ |
| | | continue; |
| | | } |
| | | |
| | | if (tOrderPrivateCar.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderPrivateCar.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | case 4: |
| | | continue; |
| | | } |
| | | |
| | | // 专车订单 |
| | | String string4 = tOrderPrivateCar.getOrderMoney().toString(); |
| | | balance = balance.add(new BigDecimal(string4)); |
| | | res.add(platformVO); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | if (tDriver1!=null){ |
| | | platformVO.setName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | platformVO.setPhone(tDriver1.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | platformVO.setMoney(new BigDecimal(income.getMoney())); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setInsertTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | if (tOrderLogistics.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderLogistics.getPayType()){ |
| | | case 1: |
| | | if (payType!=null){ |
| | | if (payType == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | if (payType!=null){ |
| | | if (payType == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | |
| | | case 4: |
| | | continue; |
| | | } |
| | | String string1 = tOrderLogistics.getOrderMoney().toString(); |
| | | // 小件物流订单 |
| | | balance = balance.add(new BigDecimal(string1)); |
| | | res.add(platformVO); |
| | | break; |
| | | } |
| | | } |
| | | // EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | // settlementDetailEntityWrapper.between("createTime", start, end); |
| | | // settlementDetails = settlementDetailService.selectList(settlementDetailEntityWrapper); |
| | | // // 查询所有现金支付的订单 |
| | | // for (SettlementDetail settlementDetail : settlementDetails) { |
| | | // WaterVO platformVO = new WaterVO(); |
| | | // switch (settlementDetail.getOrderType()){ |
| | | // case 1: |
| | | // // 专车订单 |
| | | // TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); |
| | | // if (tOrderPrivateCar==null){ |
| | | // continue; |
| | | // } |
| | | // platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | // TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | // if (tDriver!=null){ |
| | | // platformVO.setDriverName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | // platformVO.setDriverPhone(tDriver.getPhone()); |
| | | // } |
| | | // platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | // platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | // String string = settlementDetail.getPrice().toString(); |
| | | // BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | // platformVO.setMoney(bigDecimal1); |
| | | // platformVO.setPayType("现金支付"); |
| | | // // 查询是否结算 |
| | | // SettlementRecord settlementRecord = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | // |
| | | // if (settlementRecord.getPaymentStatus() == 1){ |
| | | // continue; |
| | | // } |
| | | // |
| | | // // 已结算 |
| | | // platformVO.setState(1); |
| | | // balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | // if (settlementRecord.getDay()!=null){ |
| | | // platformVO.setInsertTime(format.format(settlementRecord.getDay())); |
| | | // } |
| | | // |
| | | // res.add(platformVO); |
| | | // break; |
| | | // case 4: |
| | | // // 小件物流 |
| | | // // 查询订单信息 |
| | | // TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId()); |
| | | // if (tOrderLogistics==null){ |
| | | // continue; |
| | | // } |
| | | // platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | // TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | // if (tDriver1!=null){ |
| | | // platformVO.setDriverName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | // platformVO.setDriverPhone(tDriver1.getPhone()); |
| | | // } |
| | | // platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | // String string1 = settlementDetail.getPrice().toString(); |
| | | // BigDecimal bigDecimal2 = new BigDecimal(string1); |
| | | // platformVO.setMoney(bigDecimal2); |
| | | // platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | // platformVO.setPayType("现金支付"); |
| | | // // 查询是否结算 |
| | | // SettlementRecord settlementRecord1 = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | // if (payType!=null){ |
| | | // if (payType == 1){ |
| | | // // 查询已结算的 |
| | | // if (settlementRecord1.getPaymentStatus() == 1){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // if (payType == 2){ |
| | | // // 查询未结算的 |
| | | // if (settlementRecord1.getPaymentStatus() == 2){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // } |
| | | // if (settlementRecord1.getPaymentStatus() == 2){ |
| | | // // 已结算 |
| | | // platformVO.setState(1); |
| | | // balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | // if (settlementRecord1.getDay()!=null){ |
| | | // platformVO.setInsertTime(format.format(settlementRecord1.getDay())); |
| | | // } |
| | | // }else{ |
| | | // // 未结算 |
| | | // platformVO.setState(2); |
| | | // unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | // } |
| | | // res.add(platformVO); |
| | | // break; |
| | | // } |
| | | // } |
| | | // 计算佣金总额 |
| | | // BigDecimal add = unBalance.add(balance); |
| | | Collections.sort(res, Comparator.comparing(WaterVO::getInsertTime).reversed()); |
| | | |
| | | return res; |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/commission/list") |
| | | @ResponseBody |
| | | public Object list(Integer time,String insertTime,Integer state) { |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | List<Income> incomes = new ArrayList<>(); |
| | | List<SettlementDetail> settlementDetails = new ArrayList<>(); |
| | | if (state!=null){ |
| | | switch (state){ |
| | | case 1: |
| | | // 已结算 |
| | | // 查询已结算的 |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | |
| | | |
| | | break; |
| | | case 2: |
| | | // 未结算 |
| | | |
| | | break; |
| | | } |
| | | }else{ |
| | | incomes = tIncomeService.selectList(new EntityWrapper<Income>() |
| | | .eq("userType", 2) |
| | | .ne("type", 1) |
| | | .isNotNull("orderType") |
| | | .between("insertTime", start, end)); |
| | | } |
| | | |
| | | |
| | | List<PlatformVO> res = new ArrayList<>(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | // 已结算金额 |
| | | BigDecimal balance = new BigDecimal("0"); |
| | | // 未结算金额 |
| | | BigDecimal unBalance = new BigDecimal("0"); |
| | | // 查询所有已结算的订单 |
| | | for (Income income : incomes) { |
| | | PlatformVO platformVO = new PlatformVO(); |
| | | platformVO.setState(1); |
| | | switch (income.getOrderType()){ |
| | | case 1: |
| | | // 查询订单信息 |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | if (tDriver != null){ |
| | | platformVO.setDriverName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | platformVO.setDriverPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setEndTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | String string = income.getMoney().toString(); |
| | | BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | platformVO.setMoney(bigDecimal1); |
| | | if (tOrderPrivateCar.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderPrivateCar.getPayType()){ |
| | | case 1: |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | platformVO.setPayType("余额支付"); |
| | | break; |
| | | case 4: |
| | | platformVO.setPayType("现金支付"); |
| | | break; |
| | | } |
| | | // 专车订单 |
| | | balance = balance.add(new BigDecimal(income.getMoney())); |
| | | res.add(platformVO); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | if (tDriver1!=null){ |
| | | platformVO.setDriverName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | platformVO.setDriverPhone(tDriver1.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | platformVO.setMoney(new BigDecimal(income.getMoney())); |
| | | if (income.getInsertTime()!=null){ |
| | | platformVO.setEndTime(format.format(income.getInsertTime())); |
| | | } |
| | | platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | if (tOrderLogistics.getPayType() == null){ |
| | | continue; |
| | | } |
| | | switch (tOrderLogistics.getPayType()){ |
| | | case 1: |
| | | platformVO.setPayType("手机支付"); |
| | | break; |
| | | case 2: |
| | | platformVO.setPayType("银行卡支付"); |
| | | break; |
| | | case 3: |
| | | platformVO.setPayType("余额支付"); |
| | | break; |
| | | case 4: |
| | | platformVO.setPayType("现金支付"); |
| | | break; |
| | | } |
| | | // 专车订单 |
| | | balance = balance.add(new BigDecimal(income.getMoney())); |
| | | res.add(platformVO); |
| | | break; |
| | | } |
| | | } |
| | | EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | settlementDetailEntityWrapper.between("createTime", start, end); |
| | | settlementDetails = settlementDetailService.selectList(settlementDetailEntityWrapper); |
| | | // 查询所有现金支付的订单 |
| | | for (SettlementDetail settlementDetail : settlementDetails) { |
| | | PlatformVO platformVO = new PlatformVO(); |
| | | switch (settlementDetail.getOrderType()){ |
| | | case 1: |
| | | // 专车订单 |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderPrivateCar.getOrderNum()); |
| | | TDriver tDriver = driverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | if (tDriver!=null){ |
| | | platformVO.setDriverName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | platformVO.setDriverPhone(tDriver.getPhone()); |
| | | } |
| | | |
| | | platformVO.setRemark(tOrderPrivateCar.getRemark()); |
| | | |
| | | platformVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | String string = settlementDetail.getPrice().toString(); |
| | | BigDecimal bigDecimal1 = new BigDecimal(string); |
| | | platformVO.setMoney(bigDecimal1); |
| | | platformVO.setPayType("现金支付"); |
| | | |
| | | // 查询是否结算 |
| | | SettlementRecord settlementRecord = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | if (state!=null){ |
| | | if (state == 1){ |
| | | // 查询已结算的 |
| | | if (settlementRecord.getPaymentStatus() == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | if (state == 2){ |
| | | // 查询未结算的 |
| | | if (settlementRecord.getPaymentStatus() == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | if (settlementRecord.getPaymentStatus() == 2){ |
| | | // 已结算 |
| | | platformVO.setState(1); |
| | | balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | if (settlementRecord.getDay()!=null){ |
| | | platformVO.setEndTime(format.format(settlementRecord.getDay())); |
| | | } |
| | | }else{ |
| | | // 未结算 |
| | | platformVO.setState(2); |
| | | unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | } |
| | | res.add(platformVO); |
| | | break; |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | | platformVO.setCode(tOrderLogistics.getOrderNum()); |
| | | TDriver tDriver1 = driverService.selectById(tOrderLogistics.getDriverId()); |
| | | if (tDriver1!=null){ |
| | | platformVO.setDriverName(tDriver1.getFirstName()+tDriver1.getLastName()); |
| | | platformVO.setDriverPhone(tDriver1.getPhone()); |
| | | } |
| | | platformVO.setRemark(tOrderLogistics.getRemark()); |
| | | String string1 = settlementDetail.getPrice().toString(); |
| | | BigDecimal bigDecimal2 = new BigDecimal(string1); |
| | | platformVO.setMoney(bigDecimal2); |
| | | platformVO.setInsertTime(format.format(tOrderLogistics.getInsertTime())); |
| | | platformVO.setPayType("现金支付"); |
| | | // 查询是否结算 |
| | | SettlementRecord settlementRecord1 = settlementRecordService.selectById(settlementDetail.getSettlementRecordId()); |
| | | if (state!=null){ |
| | | if (state == 1){ |
| | | // 查询已结算的 |
| | | if (settlementRecord1.getPaymentStatus() == 1){ |
| | | continue; |
| | | } |
| | | } |
| | | if (state == 2){ |
| | | // 查询未结算的 |
| | | if (settlementRecord1.getPaymentStatus() == 2){ |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | if (settlementRecord1.getPaymentStatus() == 2){ |
| | | // 已结算 |
| | | platformVO.setState(1); |
| | | balance = balance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | if (settlementRecord1.getDay()!=null){ |
| | | platformVO.setEndTime(format.format(settlementRecord1.getDay())); |
| | | } |
| | | }else{ |
| | | // 未结算 |
| | | platformVO.setState(2); |
| | | unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); |
| | | } |
| | | res.add(platformVO); |
| | | break; |
| | | } |
| | | } |
| | | Collections.sort(res, Comparator.comparing(PlatformVO::getInsertTime).reversed()); |
| | | // 计算佣金总额 |
| | | BigDecimal add = unBalance.add(balance); |
| | | |
| | | return res; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.vo.GrantMoneyVO; |
| | | import com.stylefeng.guns.modular.system.vo.GrantVO; |
| | | import com.stylefeng.guns.modular.system.vo.PlatformVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.*; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2021-04-22 10:53:34 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/subsidy") |
| | | public class TSubsidyController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/subsidy/"; |
| | | |
| | | @RequestMapping("/grant") |
| | | public String index( Model model) { |
| | | return PREFIX + "grant.html"; |
| | | } |
| | | @RequestMapping("/use") |
| | | public String watter( Model model) { |
| | | return PREFIX + "use.html"; |
| | | } |
| | | @Autowired |
| | | private IIncomeService tIncomeService; |
| | | @Autowired |
| | | private ITOrderPrivateCarService orderPrivateCarService; |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | @Autowired |
| | | private ISettlementRecordService settlementRecordService; |
| | | |
| | | @Autowired |
| | | private ISettlementDetailService settlementDetailService; |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | @Autowired |
| | | private ITPubTransactionDetailsService pubTransactionDetailsService; |
| | | @Autowired |
| | | private ITPubWithdrawalService pubWithdrawalService; |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private ITUserService appUserService; |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | @Autowired |
| | | private IUserRedPacketRecordService userRedPacketRecordService; |
| | | @Autowired |
| | | private IDriverActivityHistoryService driverActivityHistoryService; |
| | | @Autowired |
| | | private IUserActivityRedenvelopeService userActivityRedenvelopeService; |
| | | @Autowired |
| | | private IUserActivityService userActivityService; |
| | | @Autowired |
| | | private ISysCouponActivityService sysCouponActivityService; |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | @Autowired |
| | | private IUserActivityDiscount1Service userActivityDiscount1Service; |
| | | /** |
| | | * 使用补贴统计 |
| | | */ |
| | | @RequestMapping(value = "/use/list") |
| | | @ResponseBody |
| | | public Object list1(Integer time,String insertTime,Integer type) { |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 列表res |
| | | List<GrantVO> res = new ArrayList<>(); |
| | | // 专车订单 |
| | | List<TOrderPrivateCar> tOrderPrivateCars = new ArrayList<>(); |
| | | // 小件物流 |
| | | List<TOrderLogistics> tOrderLogistics = new ArrayList<>(); |
| | | // 优惠券领取记录 |
| | | List<TOrderPrivateCar> userCouponRecords = new ArrayList<>(); |
| | | List<TOrderLogistics> userCouponRecords1 = new ArrayList<>(); |
| | | // 红包领取记录 |
| | | List<TOrderPrivateCar> userRedPacketRecords = new ArrayList<>(); |
| | | List<TOrderLogistics> userRedPacketRecords1 = new ArrayList<>(); |
| | | // 司机消费 |
| | | List<TPubTransactionDetails> driverActivityHistories = new ArrayList<>(); |
| | | // 司机提现 |
| | | List<TPubWithdrawal> driverWithdrawal = new ArrayList<>(); |
| | | // 司机提现wrapper |
| | | Wrapper<TPubWithdrawal> driverWrapper = new EntityWrapper<TPubWithdrawal>() |
| | | .eq("state", 2) |
| | | .eq("userType", 2) |
| | | .between("handleTime", start, end); |
| | | // 专车wrapper |
| | | Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 小件物流wrapper |
| | | Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 已使用优惠券记录wrapper |
| | | Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("couponId") |
| | | .isNotNull("couponMoney") |
| | | .between("insertTime", start, end); |
| | | Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("couponId") |
| | | .isNotNull("couponMoney") |
| | | .between("insertTime", start, end); |
| | | // 已使用红包记录wrapper |
| | | Wrapper<TOrderPrivateCar> between3 = new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("redPacketId") |
| | | .isNotNull("redPacketMoney") |
| | | .between("insertTime", start, end); |
| | | Wrapper<TOrderLogistics> between33 = new EntityWrapper<TOrderLogistics>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("redPacketId") |
| | | .isNotNull("redPacketMoney") |
| | | .between("insertTime", start, end); |
| | | // 司机已消费金额 |
| | | Wrapper<TPubTransactionDetails> between4 = new EntityWrapper<TPubTransactionDetails>() |
| | | .eq("state", 2) |
| | | .eq("type", 1) |
| | | .eq("userType", 2) |
| | | .ne("orderType", 2) |
| | | .ne("orderType", 3) |
| | | .between("insertTime", start, end); |
| | | if (type!=null){ |
| | | switch (type){ |
| | | case 1: |
| | | // 红包 |
| | | userRedPacketRecords = orderPrivateCarService.selectList(between3); |
| | | userRedPacketRecords1 = orderLogisticsService.selectList(between33); |
| | | break; |
| | | case 2: |
| | | userCouponRecords = orderPrivateCarService.selectList(between2); |
| | | userCouponRecords1 = orderLogisticsService.selectList(between22); |
| | | // 优惠券 |
| | | break; |
| | | case 3: |
| | | // 司机消费记录 |
| | | driverActivityHistories = pubTransactionDetailsService.selectList(between4); |
| | | |
| | | driverWithdrawal = pubWithdrawalService.selectList(driverWrapper); |
| | | break; |
| | | case 4: |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | break; |
| | | } |
| | | }else{ |
| | | // 红包 |
| | | userRedPacketRecords = orderPrivateCarService.selectList(between3); |
| | | userRedPacketRecords1 = orderLogisticsService.selectList(between33); |
| | | // 优惠券 |
| | | userCouponRecords = orderPrivateCarService.selectList(between2); |
| | | userCouponRecords1 = orderLogisticsService.selectList(between22); |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | // 消费 |
| | | driverActivityHistories = pubTransactionDetailsService.selectList(between4); |
| | | driverWithdrawal = pubWithdrawalService.selectList(driverWrapper); |
| | | } |
| | | |
| | | // 已发放补贴总额 |
| | | BigDecimal total = new BigDecimal("0"); |
| | | // 已使用折扣总额(用户端) |
| | | BigDecimal discount = new BigDecimal("0"); |
| | | // 已使用红包总额(用户端) |
| | | BigDecimal redPackage = new BigDecimal("0"); |
| | | // 已使用优惠券总额(用户端) |
| | | BigDecimal coupon = new BigDecimal("0"); |
| | | // 已使用司机奖励总额(司机端) |
| | | BigDecimal driver = new BigDecimal("0"); |
| | | // 司机已消费 |
| | | BigDecimal driverConsume = new BigDecimal("0"); |
| | | // 司机已提现 |
| | | BigDecimal driverWithdrawal1 = new BigDecimal("0"); |
| | | // 查询已使用折扣总额 |
| | | for (TOrderPrivateCar tOrderPrivateCar : tOrderPrivateCars) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | grantVO.setRemark("订单号:"+tOrderPrivateCar.getOrderNum()); |
| | | |
| | | } |
| | | for (TOrderLogistics tOrderPrivateCar : tOrderLogistics) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | grantVO.setRemark("订单号:"+tOrderPrivateCar.getOrderNum()); |
| | | } |
| | | // 查询已领取红包总额 |
| | | for (TOrderPrivateCar userRedPacketRecord : userRedPacketRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); |
| | | grantVO.setType("红包"); |
| | | grantVO.setAmount(userRedPacketRecord.getPayMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | grantVO.setRemark("订单号:"+userRedPacketRecord.getOrderNum()); |
| | | res.add(grantVO); |
| | | redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getPayMoney().toString())); |
| | | } |
| | | for (TOrderLogistics userRedPacketRecord : userRedPacketRecords1) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); |
| | | grantVO.setType("红包"); |
| | | grantVO.setAmount(userRedPacketRecord.getPayMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | grantVO.setRemark("订单号:"+userRedPacketRecord.getOrderNum()); |
| | | res.add(grantVO); |
| | | redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getPayMoney().toString())); |
| | | } |
| | | // 查询已领取优惠券总额 |
| | | for (TOrderPrivateCar userCouponRecord : userCouponRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); |
| | | grantVO.setType("优惠券"); |
| | | grantVO.setAmount(userCouponRecord.getPayMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userCouponRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | grantVO.setRemark("订单号:"+userCouponRecord.getOrderNum()); |
| | | coupon = coupon.add(new BigDecimal(userCouponRecord.getPayMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | for (TOrderLogistics userCouponRecord : userCouponRecords1) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); |
| | | grantVO.setType("优惠券"); |
| | | grantVO.setAmount(userCouponRecord.getPayMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userCouponRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | grantVO.setRemark("订单号:"+userCouponRecord.getOrderNum()); |
| | | coupon = coupon.add(new BigDecimal(userCouponRecord.getPayMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | // 已领取司机奖励 |
| | | // for (DriverActivityHistory driverActivityHistory : driverActivityHistories) { |
| | | // GrantVO grantVO = new GrantVO(); |
| | | // grantVO.setInsertTime(format.format(driverActivityHistory.getInsertTime())); |
| | | // grantVO.setType("司机奖励"); |
| | | // grantVO.setAmount(driverActivityHistory.getMoney().toString()); |
| | | // TDriver tDriver = driverService.selectById(driverActivityHistory.getDriverId()); |
| | | // if (tDriver!=null){ |
| | | // grantVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | // } |
| | | // Integer type1 = driverActivityHistory.getType(); |
| | | // switch (type1){ |
| | | // case 1: |
| | | // grantVO.setRemark("邀请司机注册"); |
| | | // break; |
| | | // case 2: |
| | | // grantVO.setRemark("邀请用户注册"); |
| | | // break; |
| | | // case 3: |
| | | // grantVO.setRemark("累计在线"); |
| | | // break; |
| | | // case 4: |
| | | // grantVO.setRemark("订单量"); |
| | | // break; |
| | | // } |
| | | // driver = driver.add(new BigDecimal(driverActivityHistory.getMoney().toString())); |
| | | // res.add(grantVO); |
| | | // } |
| | | total = total.add(redPackage).add(coupon).add(discount).add(driver); |
| | | return res; |
| | | } |
| | | @RequestMapping(value = "/use/getCount") |
| | | @ResponseBody |
| | | public Object getCount1(Integer time,String insertTime,Integer type) { |
| | | GrantMoneyVO result = new GrantMoneyVO(); |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 列表res |
| | | List<GrantVO> res = new ArrayList<>(); |
| | | // 专车订单 |
| | | List<TOrderPrivateCar> tOrderPrivateCars = new ArrayList<>(); |
| | | // 小件物流 |
| | | List<TOrderLogistics> tOrderLogistics = new ArrayList<>(); |
| | | // 优惠券领取记录 |
| | | List<UserCouponRecord> userCouponRecords = new ArrayList<>(); |
| | | // 红包领取记录 |
| | | List<UserRedPacketRecord> userRedPacketRecords = new ArrayList<>(); |
| | | // 司机奖励 |
| | | List<DriverActivityHistory> driverActivityHistories = new ArrayList<>(); |
| | | |
| | | // 专车wrapper |
| | | Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 小件物流wrapper |
| | | Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 优惠券领取记录wrapper |
| | | Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>() |
| | | .ne("couponUseType", 2) |
| | | .ne("couponUseType", 3) |
| | | .between("insertTime", start, end); |
| | | // 红包领取记录wrapper |
| | | Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>() |
| | | .ne("orderType", 2) |
| | | .ne("orderType", 3) |
| | | .between("insertTime", start, end); |
| | | // 司机奖励 |
| | | Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>() |
| | | .eq("carryOut", 2) |
| | | .between("insertTime", start, end); |
| | | if (type!=null){ |
| | | |
| | | switch (type){ |
| | | case 1: |
| | | // 红包 |
| | | userRedPacketRecords = userRedPacketRecordService.selectList(between3); |
| | | break; |
| | | case 2: |
| | | userCouponRecords = userCouponRecordService.selectList(between2); |
| | | // 优惠券 |
| | | break; |
| | | case 3: |
| | | // 司机奖励 |
| | | driverActivityHistories = driverActivityHistoryService.selectList(between4); |
| | | break; |
| | | case 4: |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | break; |
| | | } |
| | | }else{ |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | // 司机奖励 |
| | | driverActivityHistories = driverActivityHistoryService.selectList(between4); |
| | | userCouponRecords = userCouponRecordService.selectList(between2); |
| | | userRedPacketRecords = userRedPacketRecordService.selectList(between3); |
| | | } |
| | | |
| | | // 已发放补贴总额 |
| | | BigDecimal total = new BigDecimal("0"); |
| | | // 已使用折扣总额(用户端) |
| | | BigDecimal discount = new BigDecimal("0"); |
| | | // 已领取红包总额(用户端) |
| | | BigDecimal redPackage = new BigDecimal("0"); |
| | | // 已领取优惠券总额(用户端) |
| | | BigDecimal coupon = new BigDecimal("0"); |
| | | // 已领取司机奖励总额(司机端) |
| | | BigDecimal driver = new BigDecimal("0"); |
| | | // 查询已使用折扣总额 |
| | | for (TOrderPrivateCar tOrderPrivateCar : tOrderPrivateCars) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityDiscount1 userActivityDiscount1 = userActivityDiscount1Service.selectById(tOrderPrivateCar.getActivityId()); |
| | | if (userActivityDiscount1!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityDiscount1.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | } |
| | | for (TOrderLogistics tOrderPrivateCar : tOrderLogistics) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityDiscount1 userActivityDiscount1 = userActivityDiscount1Service.selectById(tOrderPrivateCar.getActivityId()); |
| | | if (userActivityDiscount1!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityDiscount1.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | } |
| | | // 查询已领取红包总额 |
| | | for (UserRedPacketRecord userRedPacketRecord : userRedPacketRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); |
| | | grantVO.setType("红包"); |
| | | grantVO.setAmount(userRedPacketRecord.getMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityRedenvelope userActivityRedenvelope = |
| | | userActivityRedenvelopeService.selectById(userRedPacketRecord.getRedPacketActivityId()); |
| | | if (userActivityRedenvelope!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityRedenvelope.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | res.add(grantVO); |
| | | redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getMoney().toString())); |
| | | } |
| | | // 查询已领取优惠券总额 |
| | | for (UserCouponRecord userCouponRecord : userCouponRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); |
| | | grantVO.setType("优惠券"); |
| | | grantVO.setAmount(userCouponRecord.getMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userCouponRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | SysCouponRecord sysCouponRecord = |
| | | sysCouponRecordService.selectById(userCouponRecord.getCouponId()); |
| | | if (sysCouponRecord!=null){ |
| | | grantVO.setRemark(sysCouponRecord.getName()); |
| | | } |
| | | coupon = coupon.add(new BigDecimal(userCouponRecord.getMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | // 已领取司机奖励 |
| | | for (DriverActivityHistory driverActivityHistory : driverActivityHistories) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(driverActivityHistory.getInsertTime())); |
| | | grantVO.setType("司机奖励"); |
| | | grantVO.setAmount(driverActivityHistory.getMoney().toString()); |
| | | TDriver tDriver = driverService.selectById(driverActivityHistory.getDriverId()); |
| | | if (tDriver!=null){ |
| | | grantVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | } |
| | | Integer type1 = driverActivityHistory.getType(); |
| | | switch (type1){ |
| | | case 1: |
| | | grantVO.setRemark("邀请司机注册"); |
| | | break; |
| | | case 2: |
| | | grantVO.setRemark("邀请用户注册"); |
| | | break; |
| | | case 3: |
| | | grantVO.setRemark("累计在线"); |
| | | break; |
| | | case 4: |
| | | grantVO.setRemark("订单量"); |
| | | break; |
| | | } |
| | | driver = driver.add(new BigDecimal(driverActivityHistory.getMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | total = total.add(redPackage).add(coupon).add(discount).add(driver); |
| | | result.setTotal(total); |
| | | result.setDiscount(discount); |
| | | result.setCoupon(coupon); |
| | | result.setDriver(driver); |
| | | result.setRedPackage(redPackage); |
| | | return result; |
| | | } |
| | | /** |
| | | * 发放补贴统计 |
| | | */ |
| | | @RequestMapping(value = "/grant/list") |
| | | @ResponseBody |
| | | public Object list(Integer time,String insertTime,Integer type) { |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 列表res |
| | | List<GrantVO> res = new ArrayList<>(); |
| | | // 专车订单 |
| | | List<TOrderPrivateCar> tOrderPrivateCars = new ArrayList<>(); |
| | | // 小件物流 |
| | | List<TOrderLogistics> tOrderLogistics = new ArrayList<>(); |
| | | // 优惠券领取记录 |
| | | List<UserCouponRecord> userCouponRecords = new ArrayList<>(); |
| | | // 红包领取记录 |
| | | List<UserRedPacketRecord> userRedPacketRecords = new ArrayList<>(); |
| | | // 司机奖励 |
| | | List<DriverActivityHistory> driverActivityHistories = new ArrayList<>(); |
| | | |
| | | // 专车wrapper |
| | | Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 小件物流wrapper |
| | | Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 优惠券领取记录wrapper |
| | | Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>() |
| | | .ne("couponUseType", 2) |
| | | .ne("couponUseType", 3) |
| | | .between("insertTime", start, end); |
| | | // 红包领取记录wrapper |
| | | Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>() |
| | | .ne("orderType", 2) |
| | | .ne("orderType", 3) |
| | | .between("insertTime", start, end); |
| | | // 司机奖励 |
| | | Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>() |
| | | .eq("carryOut", 2) |
| | | .between("insertTime", start, end); |
| | | if (type!=null){ |
| | | |
| | | switch (type){ |
| | | case 1: |
| | | // 红包 |
| | | userRedPacketRecords = userRedPacketRecordService.selectList(between3); |
| | | break; |
| | | case 2: |
| | | userCouponRecords = userCouponRecordService.selectList(between2); |
| | | // 优惠券 |
| | | break; |
| | | case 3: |
| | | // 司机奖励 |
| | | driverActivityHistories = driverActivityHistoryService.selectList(between4); |
| | | break; |
| | | case 4: |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | break; |
| | | } |
| | | }else{ |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | // 司机奖励 |
| | | driverActivityHistories = driverActivityHistoryService.selectList(between4); |
| | | userCouponRecords = userCouponRecordService.selectList(between2); |
| | | userRedPacketRecords = userRedPacketRecordService.selectList(between3); |
| | | } |
| | | |
| | | // 已发放补贴总额 |
| | | BigDecimal total = new BigDecimal("0"); |
| | | // 已使用折扣总额(用户端) |
| | | BigDecimal discount = new BigDecimal("0"); |
| | | // 已领取红包总额(用户端) |
| | | BigDecimal redPackage = new BigDecimal("0"); |
| | | // 已领取优惠券总额(用户端) |
| | | BigDecimal coupon = new BigDecimal("0"); |
| | | // 已领取司机奖励总额(司机端) |
| | | BigDecimal driver = new BigDecimal("0"); |
| | | // 查询已使用折扣总额 |
| | | for (TOrderPrivateCar tOrderPrivateCar : tOrderPrivateCars) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityDiscount1 userActivityDiscount1 = userActivityDiscount1Service.selectById(tOrderPrivateCar.getActivityId()); |
| | | if (userActivityDiscount1!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityDiscount1.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | } |
| | | for (TOrderLogistics tOrderPrivateCar : tOrderLogistics) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityDiscount1 userActivityDiscount1 = userActivityDiscount1Service.selectById(tOrderPrivateCar.getActivityId()); |
| | | if (userActivityDiscount1!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityDiscount1.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | } |
| | | // 查询已领取红包总额 |
| | | for (UserRedPacketRecord userRedPacketRecord : userRedPacketRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); |
| | | grantVO.setType("红包"); |
| | | grantVO.setAmount(userRedPacketRecord.getMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityRedenvelope userActivityRedenvelope = |
| | | userActivityRedenvelopeService.selectById(userRedPacketRecord.getRedPacketActivityId()); |
| | | if (userActivityRedenvelope!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityRedenvelope.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | res.add(grantVO); |
| | | redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getMoney().toString())); |
| | | } |
| | | // 查询已领取优惠券总额 |
| | | for (UserCouponRecord userCouponRecord : userCouponRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); |
| | | grantVO.setType("优惠券"); |
| | | grantVO.setAmount(userCouponRecord.getMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userCouponRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | SysCouponRecord sysCouponRecord = |
| | | sysCouponRecordService.selectById(userCouponRecord.getCouponId()); |
| | | if (sysCouponRecord!=null){ |
| | | grantVO.setRemark(sysCouponRecord.getName()); |
| | | } |
| | | coupon = coupon.add(new BigDecimal(userCouponRecord.getMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | // 已领取司机奖励 |
| | | for (DriverActivityHistory driverActivityHistory : driverActivityHistories) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(driverActivityHistory.getInsertTime())); |
| | | grantVO.setType("司机奖励"); |
| | | grantVO.setAmount(driverActivityHistory.getMoney().toString()); |
| | | TDriver tDriver = driverService.selectById(driverActivityHistory.getDriverId()); |
| | | if (tDriver!=null){ |
| | | grantVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | } |
| | | Integer type1 = driverActivityHistory.getType(); |
| | | switch (type1){ |
| | | case 1: |
| | | grantVO.setRemark("邀请司机注册"); |
| | | break; |
| | | case 2: |
| | | grantVO.setRemark("邀请用户注册"); |
| | | break; |
| | | case 3: |
| | | grantVO.setRemark("累计在线"); |
| | | break; |
| | | case 4: |
| | | grantVO.setRemark("订单量"); |
| | | break; |
| | | } |
| | | driver = driver.add(new BigDecimal(driverActivityHistory.getMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | total = total.add(redPackage).add(coupon).add(discount).add(driver); |
| | | return res; |
| | | } |
| | | @RequestMapping(value = "/grant/getCount") |
| | | @ResponseBody |
| | | public Object getCount(Integer time,String insertTime,Integer type) { |
| | | GrantMoneyVO result = new GrantMoneyVO(); |
| | | if (time == null){ |
| | | time = 1; |
| | | } |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | LocalDateTime start =null; |
| | | LocalDateTime end =null; |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | if (ToolUtil.isNotEmpty(insertTime)){ |
| | | beginTime = insertTime.split(" - ")[0]; |
| | | endTime = insertTime.split(" - ")[1]; |
| | | LocalDate s = LocalDate.parse(beginTime); |
| | | LocalDate e = LocalDate.parse(endTime); |
| | | start = s.atStartOfDay(); |
| | | end = e.atTime(LocalTime.MAX); |
| | | }else if (time!=null) { |
| | | switch (time) { |
| | | case 1: |
| | | // 获取当天的 00:00:00 和 23:59:59 |
| | | LocalDateTime startOfDay = today.atStartOfDay(); |
| | | LocalDateTime endOfDay = today.atTime(LocalTime.MAX); |
| | | start = startOfDay; |
| | | end = endOfDay; |
| | | break; |
| | | case 2: |
| | | // 获取本周第一天的日期和时间 |
| | | LocalDate firstDayOfWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); |
| | | LocalDateTime startOfWeek = firstDayOfWeek.atStartOfDay(); |
| | | |
| | | // 获取本周最后一天的日期和时间 |
| | | LocalDate lastDayOfWeek = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)); |
| | | LocalDateTime endOfWeek = lastDayOfWeek.atTime(LocalTime.MAX); |
| | | start = startOfWeek; |
| | | end = endOfWeek; |
| | | break; |
| | | case 3: |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDateTime startOfMonth = firstDayOfMonth.atStartOfDay(); |
| | | |
| | | // 获取本月最后一天的日期和时间 |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |
| | | LocalDateTime endOfMonth = lastDayOfMonth.atTime(LocalTime.MAX); |
| | | start = startOfMonth; |
| | | end = endOfMonth; |
| | | break; |
| | | case 4: |
| | | // 获取本年第一天的日期和时间 |
| | | LocalDate firstDayOfYear = LocalDate.of(today.getYear(), Month.JANUARY, 1); |
| | | LocalDateTime startOfYear = firstDayOfYear.atStartOfDay(); |
| | | // 获取本年最后一天的日期和时间 |
| | | LocalDate lastDayOfYear = LocalDate.of(today.getYear(), Month.DECEMBER, 31); |
| | | LocalDateTime endOfYear = lastDayOfYear.atTime(LocalTime.MAX); |
| | | start = startOfYear; |
| | | end = endOfYear; |
| | | break; |
| | | } |
| | | } |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 列表res |
| | | List<GrantVO> res = new ArrayList<>(); |
| | | // 专车订单 |
| | | List<TOrderPrivateCar> tOrderPrivateCars = new ArrayList<>(); |
| | | // 小件物流 |
| | | List<TOrderLogistics> tOrderLogistics = new ArrayList<>(); |
| | | // 优惠券领取记录 |
| | | List<UserCouponRecord> userCouponRecords = new ArrayList<>(); |
| | | // 红包领取记录 |
| | | List<UserRedPacketRecord> userRedPacketRecords = new ArrayList<>(); |
| | | // 司机奖励 |
| | | List<DriverActivityHistory> driverActivityHistories = new ArrayList<>(); |
| | | |
| | | // 专车wrapper |
| | | Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 小件物流wrapper |
| | | Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>() |
| | | .eq("state", 8) |
| | | .eq("state", 9) |
| | | .isNotNull("activityId") |
| | | .isNotNull("discountMoney") |
| | | .between("insertTime", start, end); |
| | | // 优惠券领取记录wrapper |
| | | Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>() |
| | | .ne("couponUseType", 2) |
| | | .ne("couponUseType", 3) |
| | | .between("insertTime", start, end); |
| | | // 红包领取记录wrapper |
| | | Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>() |
| | | .ne("orderType", 2) |
| | | .ne("orderType", 3) |
| | | .between("insertTime", start, end); |
| | | // 司机奖励 |
| | | Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>() |
| | | .eq("carryOut", 2) |
| | | .between("insertTime", start, end); |
| | | if (type!=null){ |
| | | |
| | | switch (type){ |
| | | case 1: |
| | | // 红包 |
| | | userRedPacketRecords = userRedPacketRecordService.selectList(between3); |
| | | break; |
| | | case 2: |
| | | userCouponRecords = userCouponRecordService.selectList(between2); |
| | | // 优惠券 |
| | | break; |
| | | case 3: |
| | | // 司机奖励 |
| | | driverActivityHistories = driverActivityHistoryService.selectList(between4); |
| | | break; |
| | | case 4: |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | break; |
| | | } |
| | | }else{ |
| | | // 专车订单 |
| | | tOrderPrivateCars = orderPrivateCarService.selectList(between); |
| | | // 小件物流订单 |
| | | tOrderLogistics = orderLogisticsService.selectList(between1); |
| | | // 司机奖励 |
| | | driverActivityHistories = driverActivityHistoryService.selectList(between4); |
| | | userCouponRecords = userCouponRecordService.selectList(between2); |
| | | userRedPacketRecords = userRedPacketRecordService.selectList(between3); |
| | | } |
| | | |
| | | // 已发放补贴总额 |
| | | BigDecimal total = new BigDecimal("0"); |
| | | // 已使用折扣总额(用户端) |
| | | BigDecimal discount = new BigDecimal("0"); |
| | | // 已领取红包总额(用户端) |
| | | BigDecimal redPackage = new BigDecimal("0"); |
| | | // 已领取优惠券总额(用户端) |
| | | BigDecimal coupon = new BigDecimal("0"); |
| | | // 已领取司机奖励总额(司机端) |
| | | BigDecimal driver = new BigDecimal("0"); |
| | | // 查询已使用折扣总额 |
| | | for (TOrderPrivateCar tOrderPrivateCar : tOrderPrivateCars) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityDiscount1 userActivityDiscount1 = userActivityDiscount1Service.selectById(tOrderPrivateCar.getActivityId()); |
| | | if (userActivityDiscount1!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityDiscount1.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | } |
| | | for (TOrderLogistics tOrderPrivateCar : tOrderLogistics) { |
| | | discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); |
| | | grantVO.setType("折扣"); |
| | | grantVO.setAmount(tOrderPrivateCar.getDiscountMoney().toString()); |
| | | TUser tUser = appUserService.selectById(tOrderPrivateCar.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityDiscount1 userActivityDiscount1 = userActivityDiscount1Service.selectById(tOrderPrivateCar.getActivityId()); |
| | | if (userActivityDiscount1!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityDiscount1.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | } |
| | | // 查询已领取红包总额 |
| | | for (UserRedPacketRecord userRedPacketRecord : userRedPacketRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); |
| | | grantVO.setType("红包"); |
| | | grantVO.setAmount(userRedPacketRecord.getMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | UserActivityRedenvelope userActivityRedenvelope = |
| | | userActivityRedenvelopeService.selectById(userRedPacketRecord.getRedPacketActivityId()); |
| | | if (userActivityRedenvelope!=null){ |
| | | UserActivity userActivity = userActivityService.selectById(userActivityRedenvelope.getUserActivityId()); |
| | | if (userActivity!=null){ |
| | | grantVO.setRemark(userActivity.getName()); |
| | | } |
| | | } |
| | | res.add(grantVO); |
| | | redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getMoney().toString())); |
| | | } |
| | | // 查询已领取优惠券总额 |
| | | for (UserCouponRecord userCouponRecord : userCouponRecords) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); |
| | | grantVO.setType("优惠券"); |
| | | grantVO.setAmount(userCouponRecord.getMoney().toString()); |
| | | TUser tUser = appUserService.selectById(userCouponRecord.getUserId()); |
| | | if (tUser!=null){ |
| | | grantVO.setName(tUser.getNickName()); |
| | | } |
| | | SysCouponRecord sysCouponRecord = |
| | | sysCouponRecordService.selectById(userCouponRecord.getCouponId()); |
| | | if (sysCouponRecord!=null){ |
| | | grantVO.setRemark(sysCouponRecord.getName()); |
| | | } |
| | | coupon = coupon.add(new BigDecimal(userCouponRecord.getMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | // 已领取司机奖励 |
| | | for (DriverActivityHistory driverActivityHistory : driverActivityHistories) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(driverActivityHistory.getInsertTime())); |
| | | grantVO.setType("司机奖励"); |
| | | grantVO.setAmount(driverActivityHistory.getMoney().toString()); |
| | | TDriver tDriver = driverService.selectById(driverActivityHistory.getDriverId()); |
| | | if (tDriver!=null){ |
| | | grantVO.setName(tDriver.getFirstName()+tDriver.getLastName()); |
| | | } |
| | | Integer type1 = driverActivityHistory.getType(); |
| | | switch (type1){ |
| | | case 1: |
| | | grantVO.setRemark("邀请司机注册"); |
| | | break; |
| | | case 2: |
| | | grantVO.setRemark("邀请用户注册"); |
| | | break; |
| | | case 3: |
| | | grantVO.setRemark("累计在线"); |
| | | break; |
| | | case 4: |
| | | grantVO.setRemark("订单量"); |
| | | break; |
| | | } |
| | | driver = driver.add(new BigDecimal(driverActivityHistory.getMoney().toString())); |
| | | res.add(grantVO); |
| | | } |
| | | total = total.add(redPackage).add(coupon).add(discount).add(driver); |
| | | result.setTotal(total); |
| | | result.setDiscount(discount); |
| | | result.setCoupon(coupon); |
| | | result.setDriver(driver); |
| | | result.setRedPackage(redPackage); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11) { |
| | | , Double num11 |
| | | , String num12 |
| | | |
| | | ) { |
| | | |
| | | driverActivityService.insertOrUpdate(null,staTime,startTime, num1, num2 |
| | | , num3 |
| | |
| | | , num8 |
| | | , num9 |
| | | , num10 |
| | | , num11); |
| | | , num11 |
| | | , num12); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11) { |
| | | , Double num11 |
| | | , String num12 |
| | | ) { |
| | | driverActivityService.insertOrUpdate(id,staTime,startTime, num1, num2 |
| | | , num3 |
| | | , num4 |
| | |
| | | , num8 |
| | | , num9 |
| | | , num10 |
| | | , num11); |
| | | , num11 |
| | | ,num12); |
| | | return SUCCESS_TIP; |
| | | } |
| | | @RequestMapping(value = "/updateStatus") |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.UserRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.service.IUserRedPacketRecordService; |
| | | import com.stylefeng.guns.modular.system.service.impl.UserServiceImpl; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysRedPacketRecordService; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | @Autowired |
| | | private IUserRedPacketRecordService userRedPacketRecordService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "sysRedPacketRecord.html"; |
| | | } |
| | | |
| | | @RequestMapping("/tUser") |
| | | public String tUser() { |
| | | return PREFIX + "tUser.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | return PREFIX + "sysRedPacketRecord_edit.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/direct") |
| | | @ResponseBody |
| | | public ResultUtil direct(String ids, Integer redId) { |
| | | |
| | | System.err.println("========="+ids+"======="+redId); |
| | | Double money = 0D; |
| | | |
| | | |
| | | SysRedPacketRecord sysRedPacketRecord = sysRedPacketRecordService.selectById(redId); |
| | | if(null != sysRedPacketRecord){ |
| | | Integer type = sysRedPacketRecord.getType(); |
| | | if(type == 1){//固定金额 |
| | | money = Double.valueOf(String.valueOf(sysRedPacketRecord.getMoney())); |
| | | }else{//随机金额 |
| | | Double startMoney = Double.valueOf(String.valueOf(sysRedPacketRecord.getStartMoney())); |
| | | Double endMoney = Double.valueOf(String.valueOf(sysRedPacketRecord.getEndMoney())); |
| | | int i = new BigDecimal(endMoney).subtract(new BigDecimal(startMoney)).intValue(); |
| | | Random random = new Random(); |
| | | int num = random.nextInt(i); |
| | | money = new BigDecimal(startMoney).add(new BigDecimal(num)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | } |
| | | |
| | | } |
| | | String[] split = ids.split(","); |
| | | for (String s : split) { |
| | | if(money > 0){ |
| | | //添加临时红包数据 |
| | | UserRedPacketRecord userRedPacketRecord = new UserRedPacketRecord(); |
| | | userRedPacketRecord.setMoney(money); |
| | | userRedPacketRecord.setInsertTime(new Date()); |
| | | userRedPacketRecord.setCompanyId(1); |
| | | userRedPacketRecord.setState(0); |
| | | userRedPacketRecord.setOrderId(null); |
| | | userRedPacketRecord.setOrderType(3); |
| | | userRedPacketRecord.setUserId(Integer.valueOf(s)); |
| | | userRedPacketRecordService.insert(userRedPacketRecord); |
| | | } |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 系统设置控制器 |
| | |
| | | |
| | | @Autowired |
| | | private IDriverAssessmentService driverAssessmentService; |
| | | @Autowired |
| | | private ITSysOverTimeService sysOverTimeService; |
| | | |
| | | /** |
| | | * 2.0新增红包支付设置 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/redSet") |
| | | public String redPackageSet() { |
| | | return PREFIX + "tRedSet.html"; |
| | | } |
| | | @RequestMapping("/redSet/addHtml") |
| | | public String addHtml(Model model) { |
| | | List<String> strings = new ArrayList<>(); |
| | | strings.add("updateTime"); |
| | | // 查询生效的红包折扣比例 |
| | | List<TSysRedSet> isDelete = sysRedSetService.selectList(new EntityWrapper<TSysRedSet>() |
| | | .eq("isDelete", 0) |
| | | .orderDesc(strings)); |
| | | if (isDelete.size()>0){ |
| | | model.addAttribute("new",isDelete.get(0).getProportion()); |
| | | }else{ |
| | | model.addAttribute("new","_"); |
| | | } |
| | | return PREFIX + "tRedSetAdd.html"; |
| | | } |
| | | @RequestMapping("/redSet/updateHtml/{id}") |
| | | public String updateHtml(@PathVariable("id") Integer id,Model model) { |
| | | TSysRedSet tSysRedSet = sysRedSetService.selectById(id); |
| | | List<String> strings = new ArrayList<>(); |
| | | strings.add("updateTime"); |
| | | // 查询生效的红包折扣比例 |
| | | List<TSysRedSet> isDelete = sysRedSetService.selectList(new EntityWrapper<TSysRedSet>() |
| | | .eq("isDelete", 0) |
| | | .orderDesc(strings)); |
| | | if (isDelete.size()>0){ |
| | | model.addAttribute("new",isDelete.get(0).getProportion()); |
| | | }else{ |
| | | model.addAttribute("new","_"); |
| | | } |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm"); |
| | | String format = simpleDateFormat.format(tSysRedSet.getStartTime()); |
| | | |
| | | model.addAttribute("time",format); |
| | | model.addAttribute("data",tSysRedSet); |
| | | return PREFIX + "tRedSetEdit.html"; |
| | | } |
| | | |
| | | @Autowired |
| | | private ISysRedSetService sysRedSetService; |
| | | /** |
| | | * 红包支付设置记录 |
| | | */ |
| | | @RequestMapping(value = "/redSet/list") |
| | | @ResponseBody |
| | | public Object redSetList() { |
| | | |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(sysRedSetService.getList(page)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | @RequestMapping(value = "/redSet/add") |
| | | @ResponseBody |
| | | public Object redSetAdd(String proportion, String startTime) throws ParseException { |
| | | // 新增红包设置 |
| | | TSysRedSet tSysRedSet = new TSysRedSet(); |
| | | String name = ShiroKit.getUser().getName(); |
| | | tSysRedSet.setHandle(name); |
| | | tSysRedSet.setProportion(proportion); |
| | | String replace = startTime.replace("T", " "); |
| | | String s = replace + ":00"; |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date date = dateFormat.parse(s); |
| | | tSysRedSet.setStartTime(date); |
| | | sysRedSetService.insert(tSysRedSet); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping(value = "/redSet/update") |
| | | @ResponseBody |
| | | public Object redSetUpdate(Integer id,String proportion, String startTime) throws ParseException { |
| | | // 修改红包设置 |
| | | TSysRedSet tSysRedSet = sysRedSetService.selectById(id); |
| | | String name = ShiroKit.getUser().getName(); |
| | | tSysRedSet.setHandle(name); |
| | | tSysRedSet.setProportion(proportion); |
| | | String replace = startTime.replace("T", " "); |
| | | String s = replace + ":00"; |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date date = dateFormat.parse(s); |
| | | tSysRedSet.setStartTime(date); |
| | | tSysRedSet.setUpdateTime(new Date()); |
| | | sysRedSetService.updateById(tSysRedSet); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping(value = "/redSet/delete") |
| | | @ResponseBody |
| | | public Object redSetDelete(Integer id) { |
| | | // 删除红包设置 |
| | | TSysRedSet tSysRedSet = sysRedSetService.selectById(id); |
| | | tSysRedSet.setIsDelete(1); |
| | | sysRedSetService.updateById(tSysRedSet); |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | | * 跳转到系统设置首页 |
| | | */ |
| | |
| | | model.addAttribute("czcAssignOrder", czcAssignOrder); |
| | | |
| | | //普通取消设置(专车) |
| | | TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>() |
| | | .eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | model.addAttribute("ptCancel1",ptCancel1); |
| | | //普通取消设置(出租车) |
| | | TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>() |
| | | .eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | model.addAttribute("ptCancel2",ptCancel2); |
| | | //普通取消设置(跨城出行) |
| | | TSysCancleOrder ptCancel3 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | |
| | | //司机考勤 |
| | | DriverAssessment driverAssessment = driverAssessmentService.selectOne(new EntityWrapper<DriverAssessment>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("assessment", driverAssessment == null ? "" : driverAssessment.getAssessment()); |
| | | // 超时设置 |
| | | TSysOverTime overTime = sysOverTimeService.selectOne(new EntityWrapper<TSysOverTime>() |
| | | .eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("overTime", overTime); |
| | | |
| | | return PREFIX + "tSysReformist.html"; |
| | | } |
| | | |
| | |
| | | @RequestParam Integer zcPeople,@RequestParam Integer czcPeople, |
| | | @RequestParam Integer ptCancel1,@RequestParam BigDecimal ptCancel2,@RequestParam Integer ptCancel3,@RequestParam BigDecimal ptCancel4,@RequestParam Integer ptCancel5,@RequestParam BigDecimal ptCancel6, |
| | | @RequestParam Integer yyCancel1,@RequestParam BigDecimal yyCancel2,@RequestParam Integer yyCancel3,@RequestParam BigDecimal yyCancel4, |
| | | @RequestParam String phone1,@RequestParam String phone2,@RequestParam String phone3, @RequestParam String assessment) { |
| | | @RequestParam String phone1,@RequestParam String phone2,@RequestParam String phone3,@RequestParam String assessment, |
| | | |
| | | @RequestParam String km,@RequestParam Integer kmMinute,@RequestParam String km2, |
| | | @RequestParam Integer kmMinute2, |
| | | @RequestParam Integer overtime,@RequestParam Integer overtime1,@RequestParam Integer packageTime, |
| | | @RequestParam Integer reserveTime, |
| | | @RequestParam Integer reserveNext,@RequestParam String reserveMoney |
| | | ) { |
| | | //改派设置 |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(reformist)){ |
| | |
| | | if (SinataUtil.isNotEmpty(ptCancelOne)){ |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | |
| | | ptCancelOne.setKm(Integer.valueOf(km)); |
| | | ptCancelOne.setKmMinute(kmMinute); |
| | | ptCancelOne.setOvertime(overtime); |
| | | |
| | | tSysCancleOrderService.updateById(ptCancelOne); |
| | | }else{ |
| | | ptCancelOne = new TSysCancleOrder(); |
| | |
| | | ptCancelOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | ptCancelOne.setType(1); |
| | | ptCancelOne.setOrderType(1); |
| | | ptCancelOne.setKm(Integer.valueOf(km)); |
| | | ptCancelOne.setKmMinute(kmMinute); |
| | | ptCancelOne.setOvertime(overtime); |
| | | |
| | | tSysCancleOrderService.insert(ptCancelOne); |
| | | } |
| | | |
| | |
| | | if (SinataUtil.isNotEmpty(ptCancelTwo)){ |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | |
| | | ptCancelTwo.setKm(Integer.valueOf(km)); |
| | | ptCancelTwo.setKmMinute(kmMinute); |
| | | ptCancelTwo.setOvertime(overtime); |
| | | tSysCancleOrderService.updateById(ptCancelTwo); |
| | | }else{ |
| | | ptCancelTwo = new TSysCancleOrder(); |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | ptCancelTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | |
| | | ptCancelTwo.setKm(Integer.valueOf(km)); |
| | | ptCancelTwo.setKmMinute(kmMinute); |
| | | ptCancelTwo.setOvertime(overtime); |
| | | ptCancelTwo.setType(1); |
| | | ptCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(ptCancelTwo); |
| | |
| | | if (SinataUtil.isNotEmpty(ptCancelThree)){ |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | |
| | | BigDecimal bigDecimal1 = new BigDecimal(reserveMoney); |
| | | ptCancelThree.setKm(Integer.valueOf(km)); |
| | | ptCancelThree.setKmMinute(kmMinute); |
| | | ptCancelThree.setOvertime(overtime); |
| | | ptCancelThree.setReserveMoney(bigDecimal1); |
| | | tSysCancleOrderService.updateById(ptCancelThree); |
| | | }else{ |
| | | ptCancelThree = new TSysCancleOrder(); |
| | |
| | | ptCancelThree.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | ptCancelThree.setType(1); |
| | | ptCancelThree.setOrderType(3); |
| | | |
| | | BigDecimal bigDecimal1 = new BigDecimal(reserveMoney); |
| | | ptCancelThree.setKm(Integer.valueOf(km)); |
| | | ptCancelThree.setKmMinute(kmMinute); |
| | | ptCancelThree.setOvertime(overtime); |
| | | ptCancelThree.setReserveMoney(bigDecimal1); |
| | | tSysCancleOrderService.insert(ptCancelThree); |
| | | } |
| | | |
| | |
| | | if (SinataUtil.isNotEmpty(yyCancelOne)){ |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | |
| | | BigDecimal bigDecimal1 = new BigDecimal(reserveMoney); |
| | | yyCancelOne.setKm(Integer.valueOf(km2)); |
| | | yyCancelOne.setKmMinute(kmMinute2); |
| | | yyCancelOne.setOvertime(overtime); |
| | | yyCancelOne.setReserveMoney(bigDecimal1); |
| | | tSysCancleOrderService.updateById(yyCancelOne); |
| | | }else{ |
| | | yyCancelOne = new TSysCancleOrder(); |
| | |
| | | yyCancelOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | yyCancelOne.setType(2); |
| | | yyCancelOne.setOrderType(1); |
| | | |
| | | BigDecimal bigDecimal1 = new BigDecimal(reserveMoney); |
| | | yyCancelOne.setKm(Integer.valueOf(km2)); |
| | | yyCancelOne.setKmMinute(kmMinute2); |
| | | yyCancelOne.setOvertime(overtime); |
| | | yyCancelOne.setReserveMoney(bigDecimal1); |
| | | tSysCancleOrderService.insert(yyCancelOne); |
| | | } |
| | | //预约取消设置(出租车) |
| | |
| | | if (SinataUtil.isNotEmpty(yyCancelTwo)){ |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | BigDecimal bigDecimal1 = new BigDecimal(reserveMoney); |
| | | yyCancelTwo.setKm(Integer.valueOf(km2)); |
| | | yyCancelTwo.setKmMinute(kmMinute2); |
| | | yyCancelTwo.setOvertime(overtime); |
| | | yyCancelTwo.setReserveMoney(bigDecimal1); |
| | | tSysCancleOrderService.updateById(yyCancelTwo); |
| | | }else{ |
| | | yyCancelTwo = new TSysCancleOrder(); |
| | |
| | | yyCancelTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | yyCancelTwo.setType(2); |
| | | yyCancelTwo.setOrderType(2); |
| | | |
| | | BigDecimal bigDecimal1 = new BigDecimal(reserveMoney); |
| | | yyCancelTwo.setKm(Integer.valueOf(km2)); |
| | | yyCancelTwo.setKmMinute(kmMinute2); |
| | | yyCancelTwo.setOvertime(overtime); |
| | | yyCancelTwo.setReserveMoney(bigDecimal1); |
| | | tSysCancleOrderService.insert(yyCancelTwo); |
| | | } |
| | | |
| | |
| | | driverAssessment.setInsertTime(new Date()); |
| | | driverAssessmentService.insert(driverAssessment); |
| | | } |
| | | // 超时设置 |
| | | TSysOverTime overTime = sysOverTimeService.selectOne(new EntityWrapper<TSysOverTime>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (overTime!=null){ |
| | | overTime.setCar(overtime1); |
| | | overTime.setPackageTime(packageTime); |
| | | overTime.setReserveTime(reserveTime); |
| | | overTime.setReserveNext(reserveNext); |
| | | sysOverTimeService.updateById(overTime); |
| | | }else{ |
| | | TSysOverTime tSysOverTime = new TSysOverTime(); |
| | | tSysOverTime.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | tSysOverTime.setCar(overtime1); |
| | | tSysOverTime.setPackageTime(packageTime); |
| | | tSysOverTime.setReserveTime(reserveTime); |
| | | tSysOverTime.setReserveNext(reserveNext); |
| | | sysOverTimeService.insert(tSysOverTime); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.google.gson.Gson; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TServerCarmodel tServerCarmodel) { |
| | | public Object add(TServerCarmodel tServerCarmodel,@RequestParam Integer isPrivateCar,@RequestParam Integer isPackage ) { |
| | | int count = tServerCarmodelService.selectCount(new EntityWrapper<TServerCarmodel>().eq("type", 1) |
| | | .eq("name", tServerCarmodel.getName()).last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | |
| | | tServerCarmodel.setInsertTime(new Date()); |
| | | tServerCarmodel.setState(1); |
| | | tServerCarmodel.setType(1); |
| | | tServerCarmodel.setIsPackage(isPackage); |
| | | tServerCarmodel.setIsPrivateCar(isPrivateCar); |
| | | tServerCarmodelService.insert(tServerCarmodel); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TServerCarmodel tServerCarmodel) { |
| | | public Object update(TServerCarmodel tServerCarmodel,@RequestParam Integer isPrivateCar,@RequestParam Integer isPackage) { |
| | | tServerCarmodel.setInsertTime(new Date()); |
| | | tServerCarmodel.setState(1); |
| | | tServerCarmodel.setType(1); |
| | | tServerCarmodel.setIsPackage(isPackage); |
| | | tServerCarmodel.setIsPrivateCar(isPrivateCar); |
| | | tServerCarmodelService.updateById(tServerCarmodel); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/small") |
| | | public String small(Model model) { |
| | | //跨城小件物流 |
| | | TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | JSONObject json1 = JSONObject.fromObject(one.getContent()); |
| | | model.addAttribute("json1",json1); |
| | | } |
| | | //同城小件物流 |
| | | TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(two)){ |
| | | JSONObject json2 = JSONObject.fromObject(two.getContent()); |
| | | model.addAttribute("json2",json2); |
| | | } |
| | | return PREFIX + "small.html"; |
| | | // //跨城小件物流 |
| | | // TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | // if (SinataUtil.isNotEmpty(one)){ |
| | | // JSONObject json1 = JSONObject.fromObject(one.getContent()); |
| | | // model.addAttribute("json1",json1); |
| | | // } |
| | | // //同城小件物流 |
| | | // TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | // if (SinataUtil.isNotEmpty(two)){ |
| | | // JSONObject json2 = JSONObject.fromObject(two.getContent()); |
| | | // model.addAttribute("json2",json2); |
| | | // } |
| | | // return PREFIX + "small.html"; |
| | | return PREFIX + "tSmall.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | model.addAttribute("modelList",serverCarmodels); |
| | | return PREFIX + "tSystemPrice_add.html"; |
| | | } |
| | | |
| | | @RequestMapping("/tSmallPrice_add") |
| | | public String tSmallPriceAdd(Model model) { |
| | | //查询所有专车车型 |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", objectId).ne("state", 3)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("isPackage", 1).eq("state", 1)); |
| | | List<TServerCarmodel> serverCarmodels = new ArrayList<>(); |
| | | for(TServerCarmodel tsc : modelList){ |
| | | boolean b = true; |
| | | for(TSystemPrice tsp : tSystemPrices){ |
| | | if(tsc.getId() == tsp.getServerCarModelId()){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | serverCarmodels.add(tsc); |
| | | } |
| | | } |
| | | model.addAttribute("modelList",serverCarmodels); |
| | | return PREFIX + "tSmallPrice_add.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listSmall") |
| | | @ResponseBody |
| | | public Object listSmall(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tSystemPriceService.getSpecialPriceList(page,ShiroKit.getUser().getObjectId(),name,state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增专车价格设置 |
| | | */ |
| | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping(value = "/smalladd") |
| | | @ResponseBody |
| | | public Object smalladd(TSystemPrice tSystemPrice) { |
| | | //判断当前公司是否添加过该专车车型价格配置 |
| | | int count = tSystemPriceService.selectCount(new EntityWrapper<TSystemPrice>() |
| | | .eq("type", 1) |
| | | .eq("serverCarModelId", tSystemPrice.getServerCarModelId()) |
| | | .eq("companyId",ShiroKit.getUser().getObjectId()) |
| | | .last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | | return new ErrorTip(500, "【"+one.getName()+"】已存在,请重新选择"); |
| | | } |
| | | tSystemPrice.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | tSystemPrice.setType(4); |
| | | tSystemPrice.setState(1); |
| | | tSystemPriceService.insert(tSystemPrice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改专车价格设置 |
| | | */ |
| | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping(value = "/smallupdate") |
| | | @ResponseBody |
| | | public Object smallupdate(TSystemPrice tSystemPrice) { |
| | | TSystemPrice obj = tSystemPriceService.selectById(tSystemPrice.getId()); |
| | | if (obj.getServerCarModelId() != tSystemPrice.getServerCarModelId()){ |
| | | //判断当前公司是否添加过该专车车型价格配置 |
| | | int count = tSystemPriceService.selectCount(new EntityWrapper<TSystemPrice>() |
| | | .eq("isPackage", 1) |
| | | .eq("serverCarModelId", tSystemPrice.getServerCarModelId()) |
| | | .eq("companyId",ShiroKit.getUser().getObjectId()) |
| | | .last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | | return new ErrorTip(500, "【"+one.getName()+"】已存在,请重新选择"); |
| | | } |
| | | } |
| | | tSystemPriceService.updateById(tSystemPrice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | */ |
| | |
| | | import com.stylefeng.guns.modular.system.model.Income; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Param("times") String times); |
| | | |
| | | List<Map<String,Object>> getTotal(@Param("times") String times); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.SettlementDetail; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/17 9:28 |
| | | */ |
| | | public interface SettlementDetailMapper extends BaseMapper<SettlementDetail> { |
| | | |
| | | |
| | | /** |
| | | * 获取汇总分组数据 |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryGroupDriver(); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.TSysOverTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统设置-取消订单 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-09 |
| | | */ |
| | | public interface TSysOverTimeMapper extends BaseMapper<TSysOverTime> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.AppOpenInfo; |
| | | import com.stylefeng.guns.modular.system.model.TSysRedSet; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2021-04-15 |
| | | */ |
| | | public interface TSysRedSetMapper extends BaseMapper<TSysRedSet> { |
| | | |
| | | List<Map<String, Object>> getList(@Param("page")Page<Map<String, Object>> page); |
| | | } |
| | |
| | | GROUP BY |
| | | w.driverId) o |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.SettlementDetailMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.SettlementDetail"> |
| | | <id column="id" property="id"/> |
| | | <result column="orderId" property="orderId"/> |
| | | <result column="orderType" property="orderType"/> |
| | | <result column="driverId" property="driverId"/> |
| | | <result column="price" property="price"/> |
| | | <result column="createTime" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="queryGroupDriver" resultType="map"> |
| | | select |
| | | driverId, |
| | | sum(price) as price |
| | | from t_settlement_detail where settlementRecordId is null group by driverId |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TSysOverTimeMapper"> |
| | | |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TSysRedSetMapper"> |
| | | |
| | | |
| | | <select id="getList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | select * |
| | | from t_red_set |
| | | where t_red_set.isDelete = 0 |
| | | order by updateTime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <!--查询专车价格设置--> |
| | | <select id="getSpecialPriceList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.`name`,sc.img,sp.state from t_system_price as sp |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.`name`,sc.img,sp.state from t_system_price as sp |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = sp.serverCarModelId) as o |
| | | <where> |
| | | o.type = 1 and o.state != 3 and o.companyId = #{companyId} |
| | | o.type = 4 and o.state != 3 and o.companyId = #{companyId} |
| | | <if test="name != null and name != ''"> |
| | | and o.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * @author stylefeng |
| | | * @since 2020-06-17 |
| | | */ |
| | | @Data |
| | | @TableName("t_driver_activity") |
| | | public class DriverActivity extends Model<DriverActivity> { |
| | | |
| | |
| | | private Date endTime; |
| | | |
| | | private Integer companyType; |
| | | private String offline; |
| | | |
| | | public Integer getCompanyType() { |
| | | return companyType; |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/17 9:23 |
| | | */ |
| | | @Data |
| | | @TableName("t_settlement_detail") |
| | | public class SettlementDetail { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 结算主表id |
| | | */ |
| | | @TableField("settlementRecordId") |
| | | private Integer settlementRecordId; |
| | | /** |
| | | * 订单id |
| | | */ |
| | | @TableField("orderId") |
| | | private Integer orderId; |
| | | /** |
| | | * 订单类型(1=专车,4=同城小件) |
| | | */ |
| | | @TableField("orderType") |
| | | private Integer orderType; |
| | | /** |
| | | * 司机id |
| | | */ |
| | | @TableField("driverId") |
| | | private Integer driverId; |
| | | /** |
| | | * 订单金额 |
| | | */ |
| | | @TableField("orderMoney") |
| | | private Double orderMoney; |
| | | /** |
| | | * 结算金额 |
| | | */ |
| | | @TableField("price") |
| | | private Double price; |
| | | /** |
| | | * 添加日期 |
| | | */ |
| | | @TableField("createTime") |
| | | private Date createTime; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * @author 吕雪 |
| | | * @since 2020-09-02 |
| | | */ |
| | | @Data |
| | | @TableName("t_order_private_car") |
| | | public class TOrderPrivateCar extends Model<TOrderPrivateCar> { |
| | | |
| | |
| | | * 类型(1=普通订单,2=摆渡订单) |
| | | */ |
| | | private Integer type; |
| | | private String remark; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * @author 吕雪 |
| | | * @since 2020-08-29 |
| | | */ |
| | | @Data |
| | | @TableName("t_server_carmodel") |
| | | public class TServerCarmodel extends Model<TServerCarmodel> { |
| | | |
| | |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 是否勾选了专车 0否1是 |
| | | */ |
| | | private Integer isPrivateCar; |
| | | /** |
| | | * 是否勾选了包裹 0否1是 |
| | | */ |
| | | private Integer isPackage; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date insertTime; |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * @since 2020-06-09 |
| | | */ |
| | | @TableName("t_sys_cancle_order") |
| | | @Data |
| | | public class TSysCancleOrder extends Model<TSysCancleOrder> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | */ |
| | | private BigDecimal money; |
| | | /** |
| | | *预定费用 |
| | | */ |
| | | private BigDecimal reserveMoney; |
| | | /** |
| | | *取消里程费 |
| | | */ |
| | | private Integer km; |
| | | /** |
| | | * 司机超时xx分钟 未到达指定地点 用户取消订单 不收取费用 |
| | | */ |
| | | private Integer overtime; |
| | | /** |
| | | * 取消时长费 |
| | | */ |
| | | private Integer kmMinute; |
| | | /** |
| | | * 1=普通单取消,2=预约单取消 |
| | | */ |
| | | private Integer type; |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统设置-超时设置 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-09 |
| | | */ |
| | | @TableName("t_sys_overtime") |
| | | @Data |
| | | public class TSysOverTime extends Model<TSysOverTime> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | private Integer companyId; |
| | | |
| | | /** |
| | | * 打车订单每隔xx分钟提醒一次 |
| | | */ |
| | | private Integer car; |
| | | /** |
| | | * 包裹订单每隔xx分钟提醒一次 |
| | | */ |
| | | private Integer packageTime; |
| | | /** |
| | | * 预约订单 在预定时间前x分钟首次提醒 |
| | | */ |
| | | private Integer reserveTime; |
| | | /** |
| | | * 预约订单每隔xx分钟提醒一次 |
| | | */ |
| | | private Integer reserveNext; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 2.0新增红包支付设置 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-09 |
| | | */ |
| | | @TableName("t_red_set") |
| | | @Data |
| | | public class TSysRedSet extends Model<TSysRedSet> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 操作热 |
| | | */ |
| | | private String handle; |
| | | /** |
| | | * 比例 |
| | | */ |
| | | private String proportion; |
| | | /** |
| | | * 生效时间 |
| | | */ |
| | | @JsonFormat(timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateTime; |
| | | /** |
| | | * 是否删除 0否1是 |
| | | */ |
| | | private Integer isDelete; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @TableField("money") |
| | | private Double money; |
| | | /** |
| | | * 过期时间 |
| | | */ |
| | | @TableField("expirationTime") |
| | | private Date expirationTime; |
| | | // /** |
| | | // * 过期时间 |
| | | // */ |
| | | // @TableField("expirationTime") |
| | | // private Date expirationTime; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | |
| | | this.money = money; |
| | | } |
| | | |
| | | public Date getExpirationTime() { |
| | | return expirationTime; |
| | | } |
| | | |
| | | public void setExpirationTime(Date expirationTime) { |
| | | this.expirationTime = expirationTime; |
| | | } |
| | | // public Date getExpirationTime() { |
| | | // return expirationTime; |
| | | // } |
| | | // |
| | | // public void setExpirationTime(Date expirationTime) { |
| | | // this.expirationTime = expirationTime; |
| | | // } |
| | | |
| | | public Date getInsertTime() { |
| | | return insertTime; |
| | |
| | | return "UserRedPacketRecord{" + |
| | | "id=" + id + |
| | | ", money=" + money + |
| | | ", expirationTime=" + expirationTime + |
| | | // ", expirationTime=" + expirationTime + |
| | | ", insertTime=" + insertTime + |
| | | ", companyId=" + companyId + |
| | | ", state=" + state + |
| | |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11); |
| | | , Double num11 |
| | | , String num12 |
| | | ); |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.model.Income; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | List<Map<String,Object>> getTotal( |
| | | @Param("times") String times); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.SettlementDetail; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/17 9:36 |
| | | */ |
| | | public interface ISettlementDetailService extends IService<SettlementDetail>{ |
| | | |
| | | /** |
| | | * 获取汇总分组数据 |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryGroupDriver(); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.TCar; |
| | | import com.stylefeng.guns.modular.system.model.TSysRedSet; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 2.0新增 红包支付设置 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-05 |
| | | */ |
| | | public interface ISysRedSetService extends IService<TSysRedSet> { |
| | | |
| | | |
| | | List<Map<String, Object>> getList(Page<Map<String, Object>> page); |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.TSysCancleOrder; |
| | | import com.stylefeng.guns.modular.system.model.TSysOverTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统设置-取消订单 服务类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-09 |
| | | */ |
| | | public interface ITSysOverTimeService extends IService<TSysOverTime> { |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void insertOrUpdate(Integer id, String staTime, String startTime, String num1, Double num2, Double num3, Integer num4, Double num5, Integer num6, Double num7, Integer num8, Double num9, Integer num10, Double num11) { |
| | | public void insertOrUpdate(Integer id, String staTime, String startTime, String num1, Double num2, Double num3, Integer num4, Double num5, Integer num6, Double num7, Integer num8, Double num9, Integer num10, Double num11,String num12) { |
| | | //判断id是否为空,为空执行添加,或者执行修改 |
| | | if(id==null){ |
| | | String[] timeArray = startTime.split(" - "); |
| | |
| | | driverActivity.setName(num1); |
| | | driverActivity.setStartTime(startTimes); |
| | | driverActivity.setEndTime(endTimes); |
| | | driverActivity.setOffline(num12); |
| | | driverActivity.insertOrUpdate(); |
| | | //添加在线活动-专车 |
| | | DriverActivityOnline driverActivityOnline = new DriverActivityOnline(); |
| | |
| | | driverActivity.setName(num1); |
| | | driverActivity.setStartTime(startTimes); |
| | | driverActivity.setEndTime(endTimes); |
| | | driverActivity.setOffline(num12); |
| | | driverActivity.insertOrUpdate(); |
| | | |
| | | //添加在线活动-专车 |
| | | DriverActivityOnline driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",id).eq("type",1)); |
| | | if(driverActivityOnline==null){ |
| | |
| | | import com.stylefeng.guns.modular.system.service.IIncomeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public List<Map<String, Object>> getTotal(String times) { |
| | | return this.baseMapper.getTotal(times); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.SettlementDetailMapper; |
| | | import com.stylefeng.guns.modular.system.model.SettlementDetail; |
| | | import com.stylefeng.guns.modular.system.service.ISettlementDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/17 9:37 |
| | | */ |
| | | @Service |
| | | public class SettlementDetailServiceImpl extends ServiceImpl<SettlementDetailMapper, SettlementDetail> implements ISettlementDetailService { |
| | | |
| | | |
| | | /** |
| | | * 获取汇总分组数据 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryGroupDriver() { |
| | | return this.baseMapper.queryGroupDriver(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.TSysCancleOrderMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TSysOverTimeMapper; |
| | | import com.stylefeng.guns.modular.system.model.TSysCancleOrder; |
| | | import com.stylefeng.guns.modular.system.model.TSysOverTime; |
| | | import com.stylefeng.guns.modular.system.service.ITSysCancleOrderService; |
| | | import com.stylefeng.guns.modular.system.service.ITSysOverTimeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统设置-取消订单 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-09 |
| | | */ |
| | | @Service |
| | | public class TSysOverTimeServiceImpl extends ServiceImpl<TSysOverTimeMapper, TSysOverTime> implements ITSysOverTimeService { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.TAgreementMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TSysRedSetMapper; |
| | | import com.stylefeng.guns.modular.system.model.TAgreement; |
| | | import com.stylefeng.guns.modular.system.model.TSysRedSet; |
| | | import com.stylefeng.guns.modular.system.service.ISysRedSetService; |
| | | import com.stylefeng.guns.modular.system.service.ITAgreementService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 2.0新增 红包支付设置 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-01 |
| | | */ |
| | | @Service |
| | | public class TSysRedSetServiceImpl extends ServiceImpl<TSysRedSetMapper, TSysRedSet> implements ISysRedSetService { |
| | | |
| | | @Autowired |
| | | private TSysRedSetMapper tSysRedSetMapper; |
| | | @Override |
| | | public List<Map<String, Object>> getList(Page<Map<String, Object>> page) { |
| | | return tSysRedSetMapper.getList(page); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class GrantMoneyVO { |
| | | @ApiModelProperty(value = "已发放补贴总额") |
| | | private BigDecimal total; |
| | | @ApiModelProperty(value = "已使用折扣总额(用户端)") |
| | | private BigDecimal discount; |
| | | @ApiModelProperty(value = "已领取红包总额(用户端)") |
| | | private BigDecimal redPackage; |
| | | @ApiModelProperty(value = "已领取优惠券总额(用户端)") |
| | | private BigDecimal coupon; |
| | | @ApiModelProperty(value = "已领取司机奖励总额(司机端)") |
| | | private BigDecimal driver; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class GrantVO { |
| | | @ApiModelProperty(value = "使用时间") |
| | | private String insertTime; |
| | | @ApiModelProperty(value = "补贴类型") |
| | | private String type; |
| | | @ApiModelProperty(value = "金额") |
| | | private String amount; |
| | | @ApiModelProperty(value = "领取用户id") |
| | | private String name; |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class PlatformMoneyVO { |
| | | |
| | | @ApiModelProperty(value = "佣金金额") |
| | | private BigDecimal total; |
| | | @ApiModelProperty(value = "司机已结算") |
| | | private BigDecimal balance; |
| | | @ApiModelProperty(value = "司机未结算") |
| | | private BigDecimal unBalance; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class PlatformVO { |
| | | @ApiModelProperty(value = "下单时间") |
| | | private String insertTime; |
| | | @ApiModelProperty(value = "订单号") |
| | | private String code; |
| | | @ApiModelProperty(value = "司机姓名") |
| | | private String driverName; |
| | | @ApiModelProperty(value = "司机手机号") |
| | | private String driverPhone; |
| | | @ApiModelProperty(value = "佣金金额") |
| | | private BigDecimal money; |
| | | @ApiModelProperty(value = "支付方式") |
| | | private String payType; |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | @ApiModelProperty(value = "状态 1结算 2未结算") |
| | | private Integer state; |
| | | @ApiModelProperty(value = "结算时间") |
| | | private String endTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class UseMoneyVO { |
| | | @ApiModelProperty(value = "已使用补贴总额") |
| | | private BigDecimal total; |
| | | @ApiModelProperty(value = "已使用折扣总额(用户端)") |
| | | private BigDecimal discount; |
| | | @ApiModelProperty(value = "已使用红包总额(用户端)") |
| | | private BigDecimal redPackage; |
| | | @ApiModelProperty(value = "已使用优惠券总额(用户端)") |
| | | private BigDecimal coupon; |
| | | @ApiModelProperty(value = "已使用司机奖励合计(司机端)") |
| | | private BigDecimal driver; |
| | | @ApiModelProperty(value = "已提现") |
| | | private BigDecimal driverWithdrawal; |
| | | @ApiModelProperty(value = "已消费") |
| | | private BigDecimal driverConsume; |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class WaterMoneyVO { |
| | | |
| | | @ApiModelProperty(value = "第三方流水余额合计") |
| | | private BigDecimal total; |
| | | @ApiModelProperty(value = "用户订单消费") |
| | | private BigDecimal userOrder; |
| | | @ApiModelProperty(value = "用户充值总额") |
| | | private BigDecimal userCharge; |
| | | @ApiModelProperty(value = "司机结算总额") |
| | | private BigDecimal balance; |
| | | @ApiModelProperty(value = "司机提现总额") |
| | | private BigDecimal driverWithdrawal; |
| | | @ApiModelProperty(value = "用户提现总额") |
| | | private BigDecimal userWithdrawal; |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class WaterVO { |
| | | @ApiModelProperty(value = "付款时间") |
| | | private String insertTime; |
| | | @ApiModelProperty(value = "订单号") |
| | | private String code; |
| | | @ApiModelProperty(value = "支付方") |
| | | private String name; |
| | | @ApiModelProperty(value = "支付方手机号") |
| | | private String phone; |
| | | @ApiModelProperty(value = "支付金额") |
| | | private BigDecimal money; |
| | | @ApiModelProperty(value = "支付方式") |
| | | private String payType; |
| | | @ApiModelProperty(value = "流水项目") |
| | | private String type; |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | } |
| | |
| | | <br/> |
| | | <br/> |
| | | |
| | | 司机注册既赠送 <input type="text" id="num2" class="form-control newWidth" /> 元 |
| | | 司机注册既赠送 <input type="text" id="num2" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机邀请用户注册 |
| | | <br/> |
| | | <br/> |
| | | 用户注册既赠送 <input type="text" id="num3" class="form-control newWidth" /> 元 |
| | | 用户注册既赠送 <input type="text" id="num3" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机APP每天累计在线奖励 |
| | | <br/> |
| | | <br/> |
| | | 专车累计在线 <input type="text" id="num4" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num5" class="form-control newWidth" /> 元 |
| | | 专车/包裹累计在线 <input type="text" id="num4" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num5" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 连续在线 <input type="text" id="num12" class="form-control newWidth" /> 小时不接单 则强制更改司机账号状态为:下班,并且累计的在线时长清零; |
| | | <br/> |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 出租车累计在线 <input type="text" id="num6" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num7" class="form-control newWidth" /> 元 |
| | | <input type="text" id="num7" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 跨城出行累计在线 <input type="text" id="num8" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num9" class="form-control newWidth" /> 元 |
| | | <input type="text" id="num9" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | --> |
| | | <br/> |
| | | 司机累计达到规定订单数奖励 |
| | | <br/> |
| | | <br/> |
| | | 每天 <input type="text" id="staTime" class="form-control newWidth" /> 司机接单达到 |
| | | <input type="text" id="num10" class="form-control newWidth" /> 单既奖励 |
| | | <input type="text" id="num11" class="form-control newWidth" /> 元 |
| | | <input type="text" id="num11" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 有效期为 <input type="text" id="startTime" name="zc7" class="form-control" style="max-width:300px !important;display: initial !important;" /> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机邀请用户注册 |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机APP每天累计在线奖励 |
| | | <br/> |
| | | <br/> |
| | | 专车累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | 专车/包裹累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | value="${online1.online}" |
| | | @}else{ |
| | | value="" |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 连续在线 <input type="text" @if(isNotEmpty(item.offline)){ |
| | | value="${item.offline}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="num12" class="form-control newWidth" readonly/> 小时奖励 |
| | | <br/> |
| | | |
| | | <!-- |
| | | <br/> |
| | | 出租车累计在线 <input type="text" @if(isNotEmpty(online2)){ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 跨城出行累计在线 <input type="text" @if(isNotEmpty(online3)){ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | --> |
| | | <br/> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 有效期为 <input type="text" value="${startTime}" name="zc7" class="form-control newWidth" readonly/>- |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num2" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num2" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机邀请用户注册 |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num3" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num3" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机APP每天累计在线奖励 |
| | | <br/> |
| | | <br/> |
| | | 专车累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | 专车/包裹累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | value="${online1.online}" |
| | | @}else{ |
| | | value="" |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num5" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num5" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 连续在线 <input type="text" @if(isNotEmpty(item.offline)){ |
| | | value="${item.offline}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="num12" class="form-control newWidth"/> 小时奖励 |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num7" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num7" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 跨城出行累计在线 <input type="text" @if(isNotEmpty(online3)){ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num9" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num9" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | --> |
| | | <br/> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num11" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num11" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 有效期为 <input type="text" id="startTime" name="zc7" class="form-control" style="max-width:300px !important;display: initial !important;" /> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .container { |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | margin-left: 50px; |
| | | margin-top: 30px; |
| | | } |
| | | .rectangle1 { |
| | | width: 550px; /* 设置框的宽度 */ |
| | | height: 160px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 50px; /* 设置矩形框之间的间距 */ |
| | | } |
| | | .rectangle2 { |
| | | width: 300px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | .rectangle3 { |
| | | width: 300px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | h1, h2 { |
| | | margin: 0; /* 去除默认的外边距 */ |
| | | } |
| | | |
| | | </style> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>平台佣金统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="time" name="时间" > |
| | | <option value="">今日</option> |
| | | <option value="1">今日</option> |
| | | <option value="2">本周</option> |
| | | <option value="3">本月</option> |
| | | <option value="4">全年</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">已结算</option> |
| | | <option value="2">未结算</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="查询" icon="fa-search" clickFun="TUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TUser.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="container"> |
| | | <div class="rectangle1"> |
| | | <h1 id="num1">0</h1> |
| | | <br> |
| | | <h2 id="text1">佣金总额</h2> |
| | | |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/=.png."> |
| | | <div class="rectangle2"> |
| | | <h1 id="num2">0</h1> |
| | | <br> |
| | | <h2 id="text2">司机已结算</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | |
| | | <div class="rectangle3"> |
| | | <h1 id="num3">0</h1> |
| | | <br> |
| | | <h2 id="text3">司机未结算</h2> |
| | | </div> |
| | | </div> |
| | | |
| | | <#table id="TUserTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/platform/platform.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .container { |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | margin-left: 50px; |
| | | margin-top: 30px; |
| | | width: 2200px; |
| | | } |
| | | .rectangle1 { |
| | | width: 250px; /* 设置框的宽度 */ |
| | | height: 160px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | } |
| | | .rectangle2 { |
| | | width: 200px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | .rectangle3 { |
| | | width: 200px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | h1, h2 { |
| | | margin: 0; /* 去除默认的外边距 */ |
| | | } |
| | | |
| | | </style> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>三方流水统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="time" name="时间" > |
| | | <option value="">今日</option> |
| | | <option value="1">今日</option> |
| | | <option value="2">本周</option> |
| | | <option value="3">本月</option> |
| | | <option value="4">全年</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="流水项目" > |
| | | <option value="">全部</option> |
| | | <option value="1">用户订单消费</option> |
| | | <option value="2">用户充值</option> |
| | | <option value="3">司机结算</option> |
| | | <option value="4">司机提现</option> |
| | | <option value="5">用户提现</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="payType" name="支付方式" > |
| | | <option value="">全部</option> |
| | | <option value="1">银行卡支付</option> |
| | | <option value="2">手机支付</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="查询" icon="fa-search" clickFun="TUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TUser.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="container"> |
| | | <div class="rectangle1"> |
| | | <h1 id="num1">0</h1> |
| | | <br> |
| | | <h2 id="text1">第三方流水余额合计</h2> |
| | | |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/=.png."> |
| | | <div class="rectangle2"> |
| | | <h1 id="num2">0</h1> |
| | | <br> |
| | | <h2 id="text2">用户订单消费</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num3">0</h1> |
| | | <br> |
| | | <h2 id="text3">用户充值总额</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num4">0</h1> |
| | | <br> |
| | | <h2 id="text4">司机结算总额</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/-.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num5">0</h1> |
| | | <br> |
| | | <h2 id="text5">司机提现总额</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/-.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num6">0</h1> |
| | | <br> |
| | | <h2 id="text6">用户提现总额</h2> |
| | | </div> |
| | | </div> |
| | | <#table id="TUserTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/platform/water.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .container { |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | margin-left: 50px; |
| | | margin-top: 30px; |
| | | width: 2200px; |
| | | } |
| | | .rectangle1 { |
| | | width: 250px; /* 设置框的宽度 */ |
| | | height: 160px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | } |
| | | .rectangle2 { |
| | | width: 200px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | .rectangle3 { |
| | | width: 200px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | h1, h2 { |
| | | margin: 0; /* 去除默认的外边距 */ |
| | | } |
| | | |
| | | </style> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>发放补贴统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="time" name="时间" > |
| | | <option value="">今日</option> |
| | | <option value="1">今日</option> |
| | | <option value="2">本周</option> |
| | | <option value="3">本月</option> |
| | | <option value="4">全年</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="补贴类型" > |
| | | <option value="">全部</option> |
| | | <option value="1">红包</option> |
| | | <option value="2">优惠券</option> |
| | | <option value="3">司机奖励</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="查询" icon="fa-search" clickFun="TUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TUser.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="container"> |
| | | <div class="rectangle1"> |
| | | <h1 id="num1">0</h1> |
| | | <br> |
| | | <h2 id="text1">已发放补贴总额</h2> |
| | | |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/=.png."> |
| | | <div class="rectangle2"> |
| | | <h1 id="num2">0</h1> |
| | | <br> |
| | | <h2 id="text2">已使用折扣总额(用户端)</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num3">0</h1> |
| | | <br> |
| | | <h2 id="text3">已领取红包总额(用户端)</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num4">0</h1> |
| | | <br> |
| | | <h2 id="text4">已领取优惠券总额(用户端)</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num5">0</h1> |
| | | <br> |
| | | <h2 id="text5">已领取司机奖励(司机端)</h2> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <#table id="TUserTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/subsidy/grant.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .container { |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | margin-left: 50px; |
| | | margin-top: 30px; |
| | | width: 2200px; |
| | | } |
| | | .rectangle1 { |
| | | width: 250px; /* 设置框的宽度 */ |
| | | height: 160px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | } |
| | | .rectangle2 { |
| | | width: 200px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | .rectangle3 { |
| | | width: 200px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 40px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | h1, h2 { |
| | | margin: 0; /* 去除默认的外边距 */ |
| | | } |
| | | |
| | | </style> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>三方流水统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="time" name="时间" > |
| | | <option value="1">今日</option> |
| | | <option value="2">本周</option> |
| | | <option value="3">本月</option> |
| | | <option value="4">全年</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="流水项目" > |
| | | <option value="">全部</option> |
| | | <option value="1">用户订单消费</option> |
| | | <option value="2">用户充值</option> |
| | | <option value="3">司机结算</option> |
| | | <option value="4">司机提现</option> |
| | | <option value="5">用户提现</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="payType" name="支付方式" > |
| | | <option value="">全部</option> |
| | | <option value="1">银行卡支付</option> |
| | | <option value="2">手机支付</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="查询" icon="fa-search" clickFun="TUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TUser.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="container"> |
| | | <div class="rectangle1"> |
| | | <h1 id="num1">0</h1> |
| | | <br> |
| | | <h2 id="text1">第三方流水余额合计</h2> |
| | | |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/=.png."> |
| | | <div class="rectangle2"> |
| | | <h1 id="num2">0</h1> |
| | | <br> |
| | | <h2 id="text2">用户订单消费</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num3">0</h1> |
| | | <br> |
| | | <h2 id="text3">用户充值总额</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num4">0</h1> |
| | | <br> |
| | | <h2 id="text4">司机结算总额</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/-.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num5">0</h1> |
| | | <br> |
| | | <h2 id="text5">司机提现总额</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/-.png."> |
| | | <div class="rectangle3"> |
| | | <h1 id="num6">0</h1> |
| | | <br> |
| | | <h2 id="text6">用户提现总额</h2> |
| | | </div> |
| | | </div> |
| | | <#table id="TUserTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/platform/water.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | <div class="hidden-xs" id="SysRedPacketRecordTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/sysRedPacketRecord/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="SysRedPacketRecord.openAddSysRedPacketRecord()"/> |
| | | <#button name="指定派发" icon="fa-plus" clickFun="SysRedPacketRecord.userList()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/sysRedPacketRecord/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="SysRedPacketRecord.openSysRedPacketRecordDetail()" space="true"/> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>用户管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="注册时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="id" name="用户ID" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="nickName" name="昵称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="isAuth" name="是否实名认证" > |
| | | <option value="">全部</option> |
| | | <option value="1">否</option> |
| | | <option value="2">是</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TUser.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <input type="file" name="file" style="width:0px;height:0px;" id="uploadEventFile" onchange="TUser.exportUser()"> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TUserTableToolbar" role="group"> |
| | | |
| | | </div> |
| | | <#table id="TUserTable"/> |
| | | <!-- <#button name="冻结" icon="fa-remove" clickFun="TUser.freezeUser()" space="true"/>--> |
| | | <!-- <#button name="解冻" icon="fa-remove" clickFun="TUser.trawUser()" space="true"/>--> |
| | | |
| | | <div style="display: flex; justify-content: center;"> |
| | | <button type="button" class="btn btn-primary button-margin" onclick="TUser.freezeUser()" id=""> |
| | | <i class="fa fa-remove"></i> 冻结 |
| | | </button> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/sysRedPacketRecord/tUser.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | </ul> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <div class="col-sm-3" style="padding-top: 10px;display: none;"> |
| | | <div class="col-sm-3" style="padding-top: 10px;"> |
| | | <div class="input-group" style="width: 100%;"> |
| | | <select class="form-control" id="language"> |
| | | <option value="1">中文</option> |
| | |
| | | </ul> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <div class="col-sm-3" style="padding-top: 10px;display: none;"> |
| | | <div class="col-sm-3" style="padding-top: 10px;"> |
| | | <div class="input-group" style="width: 100%;"> |
| | | <select class="form-control" id="language"> |
| | | <option value="1">中文</option> |
| | |
| | | <#avatar id="img" name="车型图片:" /> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经营业务:</label> |
| | | <div class="col-sm-9"> |
| | | <fieldset> |
| | | <div class="checkbox checkbox-success"> |
| | | <input name="checkbox" id="checkbox1" type="checkbox" value="1" > |
| | | <label for="checkbox1"> |
| | | 包裹 |
| | | </label> |
| | | </div> |
| | | |
| | | <div class="checkbox checkbox-info"> |
| | | <input name="checkbox" id="checkbox4" type="checkbox" value="4" > |
| | | <label for="checkbox4"> |
| | | 专车 |
| | | </label> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | |
| | | <#avatar id="img" name="车型图片:" avatarImg="${data.img}"/> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经营业务:</label> |
| | | <div class="col-sm-9"> |
| | | <fieldset> |
| | | <div class="checkbox checkbox-success"> |
| | | <input name="checkbox" id="checkbox1" type="checkbox" value="1" ${1 == data.isPackage ? 'checked=checked' : ''} > |
| | | <label for="checkbox1"> |
| | | 包裹 |
| | | </label> |
| | | </div> |
| | | |
| | | <div class="checkbox checkbox-info"> |
| | | <input name="checkbox" id="checkbox4" type="checkbox" value="4" ${1 == data.isPrivateCar ? 'checked=checked' : ''} > |
| | | <label for="checkbox4"> |
| | | 专车 |
| | | </label> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TServerCarmodelInfoDlg.editSubmit()"/> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>红包支付设置</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="hidden-xs" id="TSiteTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tSysReformist/redSet/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TSite.addRedSet()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSysReformist/redSet/update")){ |
| | | <#button name="编辑" icon="fa-edit" clickFun="TSite.update()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSysReformist/redSet/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TSite.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSysReformist/tRedSet.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="siteInfoForm"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class=""> |
| | | <h2 style="margin-left: 200px;">红包支付设置</h2> |
| | | </div> |
| | | <h3 style="color: red;margin-left: 200px;">【当前已生效折扣比例:${new}%】</h3> |
| | | <br> |
| | | <br> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">红包可抵扣比例:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="proportion" name="proportion" placeholder="请输入红包可抵扣比例" type="text"> |
| | | <span id="priceLabel1" style="margin-left: 5px;margin-top: 5px">%</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">生效时间:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="startTime" name="startTime" type="datetime-local"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TSiteInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSiteInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="https://webapi.amap.com/maps?v=1.4.15&key=c59c0ec8058a8305009eb315584e07d1&plugin=AMap.MouseTool,AMap.DistrictSearch,AMap.PolyEditor,AMap.RectangleEditor,AMap.CircleEditor"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSite/electricFence.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSysReformist/tRedSetInfo.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="siteInfoForm"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" name="id" value="${id}"> |
| | | <div class="col-sm-12"> |
| | | <div class=""> |
| | | <h2 style="margin-left: 200px;">红包支付设置</h2> |
| | | </div> |
| | | <h3 style="color: red;margin-left: 200px;">【当前已生效折扣比例:${new}%】</h3> |
| | | <br> |
| | | <br> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">红包可抵扣比例:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="proportion" value="${data.proportion}" name="proportion" placeholder="请输入红包可抵扣比例" type="text"> |
| | | <span id="priceLabel1" style="margin-left: 5px;margin-top: 5px">%</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">生效时间:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="startTime" value="${time}" name="startTime" type="datetime-local"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSiteInfo.updateSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSiteInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSysReformist/tRedSetInfo.js"></script> |
| | | @} |
| | |
| | | <h3>推单设置:</h3> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">专车推单:</label> |
| | | <label class="col-sm-2 control-label">打车/包裹推单:</label> |
| | | <div class="col-sm-10"> |
| | | 第一轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcOne)){ |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">专车指派:</label> |
| | | <label class="col-sm-2 control-label">打车/包裹指派:</label> |
| | | <div class="col-sm-10"> |
| | | 指派距离为 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcAssignOrder)){ |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">取消设置:</label> |
| | | <label class="col-sm-2 control-label">打车/包裹订单取消设置:</label> |
| | | <div class="col-sm-10"> |
| | | 专车订单取消规则:专车订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | 订单取消规则:订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(ptCancel1)){ |
| | | value="${ptCancel1.minuteNum}" |
| | | @}else{ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="ptCancel2" id="ptCancel2" class="form-control newWidth" /> 元取消费用; |
| | | name="ptCancel2" id="ptCancel2" class="form-control newWidth" /> GHS取消费用 |
| | | 里程费 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(ptCancel1)){ |
| | | value="${ptCancel1.km}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="km" id="km" class="form-control newWidth" /> GHS/km |
| | | 时长费 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(ptCancel1)){ |
| | | value="${ptCancel1.kmMinute}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="kmMinute" id="kmMinute" class="form-control newWidth" /> GHS/分钟 |
| | | <br/> |
| | | <br/> |
| | | <div class="col-sm-10" hidden> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">预约单取消设置:</label> |
| | | <label class="col-sm-2 control-label">预约订单取消规则:</label> |
| | | <div class="col-sm-10"> |
| | | 专车订单取消规则:专车订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | 订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(yyCancel1)){ |
| | | value="${yyCancel1.minuteNum}" |
| | | @}else{ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="yyCancel2" id="yyCancel2" class="form-control newWidth" /> 元取消费用; |
| | | name="yyCancel2" id="yyCancel2" class="form-control newWidth" /> 元取消费用; |
| | | 里程费 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(yyCancel1)){ |
| | | value="${yyCancel1.km}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="km2" id="km2" class="form-control newWidth" /> GHS/km |
| | | 时长费 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(yyCancel1)){ |
| | | value="${yyCancel1.kmMinute}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="kmMinute2" id="kmMinute2" class="form-control newWidth" /> GHS/分钟 |
| | | </br> |
| | | </br> |
| | | 预定费用 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(yyCancel1)){ |
| | | value="${yyCancel1.reserveMoney}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="reserveMoney" id="reserveMoney" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | <div class="col-sm-10" hidden> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="yyCancel4" id="yyCancel4" class="form-control newWidth" /> 元取消费用; |
| | | name="yyCancel4" id="yyCancel4" class="form-control newWidth" /> 元取消费用 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">司机超时(地图计算时间或者预定时间):</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(ptCancel2)){ |
| | | value="${ptCancel2.overtime}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="overtime" id="overtime" class="form-control newWidth" /> 分钟未到达接人点或取件点,用户取消订单不收费 |
| | | <br/> |
| | | <br/> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">打车/包裹订单超时提醒设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超时后,打车订单每隔 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(overTime)){ |
| | | value="${overTime.car}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="overtime1" id="overtime1" class="form-control newWidth" /> 分钟提醒司机一次, |
| | | 包裹订单每隔 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(overTime)){ |
| | | value="${overTime.packageTime}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="packageTime" id="packageTime" class="form-control newWidth" /> 分钟提醒司机一次; |
| | | <br/> |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">预约单提醒设置:</label> |
| | | <div class="col-sm-10"> |
| | | 预约订单,在预定时间前 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(overTime)){ |
| | | value="${overTime.reserveTime}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="reserveTime" id="reserveTime" class="form-control newWidth" /> 分钟, |
| | | 首次提醒司机 ;然后每隔<input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(overTime)){ |
| | | value="${overTime.reserveNext}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="reserveNext" id="reserveNext" class="form-control newWidth" /> 分钟提醒司机一次; |
| | | <br/> |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | |
| | | } else { |
| | | isTaxiCar = 1; |
| | | } |
| | | |
| | | var assessment = $("#assessment").val(); |
| | | var zc1 = $("#zc1").val().trim(); |
| | | var zc2 = $("#zc2").val().trim(); |
| | | var zc3 = $("#zc3").val().trim(); |
| | |
| | | var phone1 = $("#phone1").val().trim(); |
| | | var phone2 = $("#phone2").val().trim(); |
| | | var phone3 = $("#phone3").val().trim(); |
| | | var assessment = $('#assessment').val().trim(); |
| | | var kmMinute = $('#kmMinute').val().trim(); |
| | | var km2 = $('#km2').val().trim(); |
| | | var km = $('#km').val().trim(); |
| | | var kmMinute2 = $('#kmMinute2').val().trim(); |
| | | var reserveMoney = $('#reserveMoney').val().trim(); |
| | | var overtime = $('#overtime').val().trim(); |
| | | var overtime1 = $('#overtime1').val().trim(); |
| | | var packageTime = $('#packageTime').val().trim(); |
| | | var reserveTime = $('#reserveTime').val().trim(); |
| | | var reserveNext = $('#reserveNext').val().trim(); |
| | | |
| | | if ("" == one || "" == two || "" == three |
| | | || "" == zc1 || "" == zc2 || "" == zc3 || "" == zc4 || "" == zc5 || "" == zc6 || "" == zc7 || "" == zc8 || "" == zc9 || '' == zcAssignOrder || '' == zcPeople |
| | | || "" == zc1 || "" == zc2 || "" == zc3 || "" == zc4 || "" == zc5 || "" == zc6 || "" == zc7 || "" == zc8 || "" == zc9 |
| | | || '' == zcAssignOrder || '' == zcPeople |
| | | || "" == czc1 || "" == czc2 || "" == czc3 || "" == czc4 || "" == czc5 || "" == czc6 || "" == czc7 || "" == czc8 || "" == czc9 /*|| '' == czcAssignOrder || '' == czcPeople */ |
| | | || "" == ptCancel1 || "" == ptCancel2 || "" == ptCancel3 || "" == ptCancel4 /*|| "" == ptCancel5 || "" == ptCancel6*/ |
| | | || "" == yyCancel1 || "" == yyCancel2 || "" == yyCancel3 || "" == yyCancel4 || "" == assessment |
| | | || "" == ptCancel1 || "" == ptCancel2 /* || "" == ptCancel3 || "" == ptCancel4*/ /*|| "" == ptCancel5 || "" == ptCancel6*/ |
| | | || "" == yyCancel1 || "" == yyCancel2 /* || "" == yyCancel3 || "" == yyCancel4*/ |
| | | || "" == assessment || "" == km || "" == kmMinute|| "" == kmMinute2|| "" == reserveMoney|| "" == km2 |
| | | || "" == overtime|| "" == overtime1|| "" == packageTime|| "" == reserveTime|| "" == reserveNext |
| | | || "" == phone1 || "" == phone2 ) { |
| | | Feng.info("输入框不能为空!"); |
| | | return; |
| | |
| | | || !regDouble.test(czc4) || !regInt.test(czc5) || !regDouble.test(czc6) |
| | | || !regDouble.test(czc7) || !regInt.test(czc8) || !regDouble.test(czc9)/* || !regDouble.test(czcAssignOrder) || !regInt.test(czcPeople)*/ |
| | | |
| | | || !regInt.test(ptCancel1) || !regDouble.test(ptCancel2) || !regInt.test(ptCancel3) || !regDouble.test(ptCancel4) /*|| !regInt.test(ptCancel5) || !regDouble.test(ptCancel6)*/ |
| | | || !regInt.test(yyCancel1) || !regDouble.test(yyCancel2) || !regInt.test(yyCancel3) || !regDouble.test(yyCancel4)) { |
| | | || !regInt.test(ptCancel1) || !regDouble.test(ptCancel2) /*|| !regInt.test(ptCancel3) || !regDouble.test(ptCancel4)|| !regInt.test(ptCancel5) || !regDouble.test(ptCancel6)*/ |
| | | || !regInt.test(km) || !regInt.test(km2) |
| | | || !regDouble.test(reserveMoney) |
| | | /*|| !regInt.test(yyCancel3) || !regDouble.test(yyCancel4)*/) { |
| | | Feng.info("格式不正确!"); |
| | | return ; |
| | | } |
| | |
| | | ajax.set("phone2", phone2); |
| | | ajax.set("phone3", phone3); |
| | | ajax.set("assessment", assessment); |
| | | |
| | | ajax.set("kmMinute", kmMinute); |
| | | ajax.set("km", km); |
| | | ajax.set("km2", km2); |
| | | ajax.set("kmMinute2", kmMinute2); |
| | | ajax.set("reserveMoney", reserveMoney); |
| | | ajax.set("overtime", overtime); |
| | | ajax.set("overtime1", overtime1); |
| | | ajax.set("packageTime", packageTime); |
| | | ajax.set("reserveTime", reserveTime); |
| | | ajax.set("reserveNext", reserveNext); |
| | | ajax.start(); |
| | | |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>小件物流价格设置管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="车型名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSystemPrice.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TSystemPrice.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TSystemPriceTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tSystemPrice/addSpecial")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TSystemPrice.addSpecial()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/updateSpecial")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TSystemPrice.updateSpecial()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/deleteSpecial")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TSystemPrice.deleteSpecial()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/freezeSpecial")){ |
| | | <#button name="冻结" icon="fa-remove" clickFun="TSystemPrice.freezeSpecial()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/thawSpecial")){ |
| | | <#button name="解冻" icon="fa-remove" clickFun="TSystemPrice.thawSpecial()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TSystemPriceTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemPrice/tSmallPrice.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .newWidth, .single-line{ |
| | | max-width:150px !important;display: initial !important; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="specialPriceInfoForm"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">选择车型:</label> |
| | | <div class="col-sm-10"> |
| | | <select class="form-control" id="serverCarModelId" name="serverCarModelId" style="width: 200px;"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in modelList!){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">运价类型说明:</label> |
| | | <div class="col-sm-10"> |
| | | <textarea class="form-control" id="fareTypeNote" name="fareTypeNote" style="height: 100px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">起步价设置:</label> |
| | | <div class="col-sm-10"> |
| | | 起步价为 <input type="text" oninput="checkIsYuan(this)" name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 起步包含 <input type="text" oninput="checkIsGongLi(this)" name="num2" id="num2" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | <input type="text" oninput="checkIsMinute(this)" name="num3" id="num3" class="form-control newWidth" placeholder="最多3位数"/> 分钟 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">里程费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步里程后每公里 <input type="text" oninput="checkIsYuan(this)" name="num4" id="num4" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">时长费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步时长后每分钟 <input type="text" oninput="checkIsYuan(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">等待费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 司机到达预约地点 <input type="text" oninput="checkIsMinute(this)" name="num6" id="num6" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, |
| | | 为 <input type="text" oninput="checkIsYuan(this)" name="num7" id="num7" class="form-control newWidth" placeholder="最多3位数"/> 元/分,不足一分钟按照一分钟计算 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">远途费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 总里程超过 <input type="text" oninput="checkIsGongLi(this)" name="num8" id="num8" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num9" id="num9" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num10" id="num10" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num11" id="num11" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num12" id="num12" class="form-control newWidth" placeholder="最多3位数"/> 公里时, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num13" id="num13" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num14" id="num14" class="form-control newWidth" placeholder="最多3位数"/> 公里以后, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num15" id="num15" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | <!-- |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">夜间行驶费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num16" id="num16" class="form-control newWidth" placeholder="选择时间"/> 点为夜间行驶时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num17" id="num17" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num18" id="num18" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num19" id="num19" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num20" id="num20" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num21" id="num21" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num22" id="num22" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">高峰期费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num23" id="num23" class="form-control newWidth" placeholder="选择时间段"/> |
| | | 和 <input type="text" name="num24" id="num24" class="form-control newWidth" placeholder="选择时间段"/> 为高峰期行车时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num25" id="num25" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num26" id="num26" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num27" id="num27" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num28" id="num28" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemPriceInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSystemPriceInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemPrice/tSmallPrice_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#num16' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num23' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num24' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | |
| | | var regDouble = /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/; |
| | | var regInt = /^[0-9]{0,3}$/; |
| | | function checkIsYuan(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【元】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | } |
| | | function checkIsGongLi(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【公里】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | if (obj.id == "num9"){ |
| | | $("#num11").val(num); |
| | | }else if (obj.id == "num12"){ |
| | | $("#num14").val(num); |
| | | } |
| | | } |
| | | function checkIsMinute(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regInt.test(num)){ |
| | | layer.msg("【分钟】输入框不能超过3位数"); |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .newWidth, .single-line{ |
| | | max-width:150px !important;display: initial !important; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="specialPriceInfoForm"> |
| | | <label style="display: none;" id="id">${item.id}</label> |
| | | <div class="row"> |
| | | <div class="col-sm-111"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">选择车型:</label> |
| | | <div class="col-sm-10"> |
| | | <select class="form-control" id="serverCarModelId" name="serverCarModelId" disabled style="width: 200px;"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in modelList!){ |
| | | <option value="${obj.id}" ${obj.id == item.serverCarModelId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">运价类型说明:</label> |
| | | <div class="col-sm-10"> |
| | | <textarea class="form-control" id="fareTypeNote" name="fareTypeNote" style="height: 100px;">${item.fareTypeNote}</textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">起步价设置:</label> |
| | | <div class="col-sm-10"> |
| | | 起步价为 <input type="text" oninput="checkIsYuan(this)" name="num1" id="num1" value="${json.num1}" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 起步包含 <input type="text" oninput="checkIsGongLi(this)" name="num2" id="num2" value="${json.num2}" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | <input type="text" oninput="checkIsMinute(this)" name="num3" id="num3" value="${json.num3}" class="form-control newWidth" placeholder="最多3位数"/> 分钟 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">里程费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步里程后每公里 <input type="text" oninput="checkIsYuan(this)" name="num4" id="num4" value="${json.num4}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">时长费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步时长后每分钟 <input type="text" oninput="checkIsYuan(this)" name="num5" id="num5" value="${json.num5}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">等待费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 司机到达预约地点 <input type="text" oninput="checkIsMinute(this)" name="num6" id="num6" value="${json.num6}" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, |
| | | 为 <input type="text" oninput="checkIsYuan(this)" name="num7" id="num7" value="${json.num7}" class="form-control newWidth" placeholder="最多3位数"/> 元/分,不足一分钟按照一分钟计算 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">远途费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 总里程超过 <input type="text" oninput="checkIsGongLi(this)" name="num8" id="num8" value="${json.num8}" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num9" id="num9" value="${json.num9}" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num10" id="num10" value="${json.num10}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num11" id="num11" value="${json.num11}" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num12" id="num12" value="${json.num12}" class="form-control newWidth" placeholder="最多3位数"/> 公里时, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num13" value="${json.num13}" id="num13" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num14" id="num14" value="${json.num14}" class="form-control newWidth" placeholder="最多3位数"/> 公里以后, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num15" id="num15" value="${json.num15}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | <!-- |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">夜间行驶费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num16" id="num16" value="${json.num16}" class="form-control newWidth" placeholder="选择时间"/> 点为夜间行驶时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num17" id="num17" value="${json.num17}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num18" id="num18" value="${json.num18}" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num19" id="num19" value="${json.num19}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num20" id="num20" value="${json.num20}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num21" id="num21" value="${json.num21}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num22" id="num22" value="${json.num22}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">高峰期费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num23" id="num23" value="${json.num23}" class="form-control newWidth" placeholder="选择时间段"/> |
| | | 和 <input type="text" name="num24" id="num24" value="${json.num24}" class="form-control newWidth" placeholder="选择时间段"/> 为高峰期行车时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num25" id="num25" value="${json.num25}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num26" id="num26" value="${json.num26}" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num27" id="num27" value="${json.num27}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num28" id="num28" value="${json.num28}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num29" id="num29" value="${json.num29}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num30" id="num30" value="${json.num30}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemPriceInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSystemPriceInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemPrice/tSmallPrice_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#num16' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num23' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num24' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | |
| | | var regDouble = /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/; |
| | | var regInt = /^[0-9]{0,3}$/; |
| | | function checkIsYuan(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【元】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | } |
| | | function checkIsGongLi(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【公里】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | if (obj.id == "num9"){ |
| | | $("#num11").val(num); |
| | | }else if (obj.id == "num12"){ |
| | | $("#num14").val(num); |
| | | } |
| | | } |
| | | function checkIsMinute(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regInt.test(num)){ |
| | | layer.msg("【分钟】输入框不能超过3位数"); |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | @} |
| | |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | if (!re.test($("#num12").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | // if (!re.test($("#num7").val())) { |
| | | // Feng.error("请输入正确金额数!"); |
| | | // return; |
| | |
| | | ajax.set("num9",0); |
| | | ajax.set("num10",$("#num10").val()); |
| | | ajax.set("num11",$("#num11").val()); |
| | | ajax.set("num12",$("#num12").val()); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | if (!re.test($("#num12").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | // if (!re.test($("#num7").val())) { |
| | | // Feng.error("请输入正确金额数!"); |
| | | // return; |
| | |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | |
| | | // if (!/^[1-9]\d*$/.test($("#num6").val())) { |
| | | // Feng.error("请输入正确小时数!"); |
| | | // return; |
| | |
| | | ajax.set("num9",0); |
| | | ajax.set("num10",$("#num10").val()); |
| | | ajax.set("num11",$("#num11").val()); |
| | | ajax.set("num12",$("#num12").val()); |
| | | ajax.start(); |
| | | } |
| | | |
New file |
| | |
| | | /** |
| | | * 用户管理管理初始化 |
| | | */ |
| | | var TUser = { |
| | | id: "TUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用 |
| | | */ |
| | | TUser.tooltip = function(){ |
| | | $(".toolTip").tooltip(); |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | |
| | | {title: '司机姓名', field: 'driverName', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '司机手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '佣金金额', field: 'money', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var money = row.money; |
| | | var btn = ""; |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: orange;" title="待审核" onfocus="TUser.tooltip()">'+money+'</p>'] |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '状态', field: 'paymentStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var state = row.state; |
| | | if (state == 1){ |
| | | var btn = ""; |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: #68e02c;" title="待审核" onfocus="TUser.tooltip()">已结算</p>'] |
| | | }else{ |
| | | var btn = ""; |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: #e31452;" title="待审核" onfocus="TUser.tooltip()">未结算</p>'] |
| | | } |
| | | return btn; |
| | | |
| | | } |
| | | }, |
| | | {title: '结算时间', field: 'endTime', visible: true, align: 'center', valign: 'middle',}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 修改余额 |
| | | */ |
| | | TUser.updateBalance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改余额', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updateBalance/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | TUser.updatePassword = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改密码', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updatePassword/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 查看分享信息 |
| | | */ |
| | | TUser.inviteInfo=function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '邀请信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/inviteInfo/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看用户管理详情 |
| | | */ |
| | | TUser.userDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_userDetail/' + TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结用户 |
| | | */ |
| | | TUser.freezeUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '冻结用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * 解冻用户 |
| | | */ |
| | | TUser.trawUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 2) { |
| | | swal("启用失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '解冻用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | // 首次 |
| | | TUser.getCount1 = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/platform/commission/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.balance; |
| | | document.getElementById("num3").innerHTML = data.unBalance; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",1); |
| | | ajax.set("insertTime",null); |
| | | ajax.set("state",null); |
| | | ajax.start(); |
| | | } |
| | | // 点击搜索 |
| | | TUser.getCount = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/platform/commission/getCount", function(data){ |
| | | console.log(data); |
| | | console.log(data); |
| | | console.log(data); |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.balance; |
| | | document.getElementById("num3").innerHTML = data.unBalance; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",$("#time").val()); |
| | | ajax.set("insertTime",$("#insertTime").val()); |
| | | ajax.set("state",$("#state").val()); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 查询用户管理列表 |
| | | */ |
| | | TUser.search = function () { |
| | | var queryData = {}; |
| | | queryData['time'] = $("#time").val(); |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TUser.table.refresh({query: queryData}); |
| | | TUser.getCount(); |
| | | }; |
| | | TUser.resetSearch = function () { |
| | | $("#time").val(""); |
| | | $("#insertTime").val(""); |
| | | $("#state").val(""); |
| | | TUser.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | TUser.getCount1(); |
| | | var defaultColunms = TUser.initColumn(); |
| | | var table = new BSTable(TUser.id, "/platform/commission/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("client"); |
| | | TUser.table = table.init(); |
| | | }); |
| | | |
| | | TUser.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | Feng.success("导入成功!"); |
| | | } |
| | | TUser.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | Feng.error("excel上传失败!"); |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
New file |
| | |
| | | /** |
| | | * 用户管理管理初始化 |
| | | */ |
| | | var TUser = { |
| | | id: "TUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用 |
| | | */ |
| | | TUser.tooltip = function(){ |
| | | $(".toolTip").tooltip(); |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '付款时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付方', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付方手机号', field: 'phone', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '支付金额', field: 'money', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var money = row.money; |
| | | var btn = ""; |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: orange;" title="待审核" onfocus="TUser.tooltip()">'+money+'</p>'] |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '流水项目', field: 'type', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 修改余额 |
| | | */ |
| | | TUser.updateBalance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改余额', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updateBalance/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | TUser.updatePassword = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改密码', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updatePassword/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 查看分享信息 |
| | | */ |
| | | TUser.inviteInfo=function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '邀请信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/inviteInfo/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看用户管理详情 |
| | | */ |
| | | TUser.userDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_userDetail/' + TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结用户 |
| | | */ |
| | | TUser.freezeUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '冻结用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * 解冻用户 |
| | | */ |
| | | TUser.trawUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 2) { |
| | | swal("启用失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '解冻用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | // 首次 |
| | | TUser.getCount1 = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/platform/water/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.balance; |
| | | document.getElementById("num3").innerHTML = data.unBalance; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",1); |
| | | ajax.set("insertTime",null); |
| | | ajax.set("state",null); |
| | | ajax.start(); |
| | | } |
| | | // 点击搜索 |
| | | TUser.getCount = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/platform/water/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.userOrder; |
| | | document.getElementById("num3").innerHTML = data.userCharge; |
| | | document.getElementById("num4").innerHTML = data.balance; |
| | | document.getElementById("num5").innerHTML = data.driverWithdrawal; |
| | | document.getElementById("num6").innerHTML = data.userWithdrawal; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",$("#time").val()); |
| | | ajax.set("insertTime",$("#insertTime").val()); |
| | | ajax.set("type",$("#type").val()); |
| | | ajax.set("payType",$("#payType").val()); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 查询用户管理列表 |
| | | */ |
| | | TUser.search = function () { |
| | | var queryData = {}; |
| | | queryData['time'] = $("#time").val(); |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | queryData['payType'] = $("#payType").val(); |
| | | TUser.table.refresh({query: queryData}); |
| | | TUser.getCount(); |
| | | }; |
| | | TUser.resetSearch = function () { |
| | | $("#time").val(""); |
| | | $("#insertTime").val(""); |
| | | $("#state").val(""); |
| | | TUser.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | TUser.getCount1(); |
| | | var defaultColunms = TUser.initColumn(); |
| | | var table = new BSTable(TUser.id, "/platform/water/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("client"); |
| | | TUser.table = table.init(); |
| | | }); |
| | | |
| | | TUser.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | Feng.success("导入成功!"); |
| | | } |
| | | TUser.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | Feng.error("excel上传失败!"); |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
New file |
| | |
| | | /** |
| | | * 用户管理管理初始化 |
| | | */ |
| | | var TUser = { |
| | | id: "TUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用 |
| | | */ |
| | | TUser.tooltip = function(){ |
| | | $(".toolTip").tooltip(); |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '领取时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '补贴类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '领取用户id', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle',}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 修改余额 |
| | | */ |
| | | TUser.updateBalance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改余额', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updateBalance/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | TUser.updatePassword = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改密码', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updatePassword/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 查看分享信息 |
| | | */ |
| | | TUser.inviteInfo=function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '邀请信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/inviteInfo/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看用户管理详情 |
| | | */ |
| | | TUser.userDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_userDetail/' + TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结用户 |
| | | */ |
| | | TUser.freezeUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '冻结用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * 解冻用户 |
| | | */ |
| | | TUser.trawUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 2) { |
| | | swal("启用失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '解冻用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | // 首次 |
| | | TUser.getCount1 = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/subsidy/grant/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.discount; |
| | | document.getElementById("num3").innerHTML = data.redPackage; |
| | | document.getElementById("num4").innerHTML = data.coupon; |
| | | document.getElementById("num5").innerHTML = data.driver; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",1); |
| | | ajax.set("insertTime",null); |
| | | ajax.set("type",null); |
| | | ajax.start(); |
| | | } |
| | | // 点击搜索 |
| | | TUser.getCount = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/subsidy/grant/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.discount; |
| | | document.getElementById("num3").innerHTML = data.redPackage; |
| | | document.getElementById("num4").innerHTML = data.coupon; |
| | | document.getElementById("num5").innerHTML = data.driver; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",$("#time").val()); |
| | | ajax.set("insertTime",$("#insertTime").val()); |
| | | ajax.set("type",$("#type").val()); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 查询用户管理列表 |
| | | */ |
| | | TUser.search = function () { |
| | | var queryData = {}; |
| | | queryData['time'] = $("#time").val(); |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | TUser.table.refresh({query: queryData}); |
| | | TUser.getCount(); |
| | | }; |
| | | TUser.resetSearch = function () { |
| | | $("#time").val(""); |
| | | $("#insertTime").val(""); |
| | | $("#type").val(""); |
| | | TUser.search(); |
| | | TUser.getCount1(); |
| | | }; |
| | | |
| | | $(function () { |
| | | TUser.getCount1(); |
| | | var defaultColunms = TUser.initColumn(); |
| | | var table = new BSTable(TUser.id, "/subsidy/grant/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("client"); |
| | | TUser.table = table.init(); |
| | | }); |
| | | |
| | | TUser.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | Feng.success("导入成功!"); |
| | | } |
| | | TUser.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | Feng.error("excel上传失败!"); |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
New file |
| | |
| | | /** |
| | | * 用户管理管理初始化 |
| | | */ |
| | | var TUser = { |
| | | id: "TUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用 |
| | | */ |
| | | TUser.tooltip = function(){ |
| | | $(".toolTip").tooltip(); |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '领取时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '补贴类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '金额', field: 'amount', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '领取用户id', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle',}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 修改余额 |
| | | */ |
| | | TUser.updateBalance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改余额', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updateBalance/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | TUser.updatePassword = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改密码', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updatePassword/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 查看分享信息 |
| | | */ |
| | | TUser.inviteInfo=function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '邀请信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/inviteInfo/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看用户管理详情 |
| | | */ |
| | | TUser.userDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_userDetail/' + TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结用户 |
| | | */ |
| | | TUser.freezeUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '冻结用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * 解冻用户 |
| | | */ |
| | | TUser.trawUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 2) { |
| | | swal("启用失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '解冻用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | // 首次 |
| | | TUser.getCount1 = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/subsidy/use/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.balance; |
| | | document.getElementById("num3").innerHTML = data.unBalance; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",1); |
| | | ajax.set("insertTime",null); |
| | | ajax.set("type",null); |
| | | ajax.start(); |
| | | } |
| | | // 点击搜索 |
| | | TUser.getCount = function() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/subsidy/use/getCount", function(data){ |
| | | |
| | | document.getElementById("num1").innerHTML = data.total; |
| | | document.getElementById("num2").innerHTML = data.userOrder; |
| | | document.getElementById("num3").innerHTML = data.userCharge; |
| | | document.getElementById("num4").innerHTML = data.balance; |
| | | document.getElementById("num5").innerHTML = data.driverWithdrawal; |
| | | document.getElementById("num6").innerHTML = data.userWithdrawal; |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("time",$("#time").val()); |
| | | ajax.set("insertTime",$("#insertTime").val()); |
| | | ajax.set("type",$("#type").val()); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 查询用户管理列表 |
| | | */ |
| | | TUser.search = function () { |
| | | var queryData = {}; |
| | | queryData['time'] = $("#time").val(); |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | TUser.table.refresh({query: queryData}); |
| | | TUser.getCount(); |
| | | }; |
| | | TUser.resetSearch = function () { |
| | | $("#time").val(""); |
| | | $("#insertTime").val(""); |
| | | $("#type").val(""); |
| | | TUser.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | TUser.getCount1(); |
| | | var defaultColunms = TUser.initColumn(); |
| | | var table = new BSTable(TUser.id, "/subsidy/use/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("client"); |
| | | TUser.table = table.init(); |
| | | }); |
| | | |
| | | TUser.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | Feng.success("导入成功!"); |
| | | } |
| | | TUser.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | Feng.error("excel上传失败!"); |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '活动标题', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券类型', field: 'couponUseType', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if(value==0){ |
| | |
| | | */ |
| | | SysRedPacketRecord.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '红包名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | ]; |
| | | }; |
| | | |
| | | SysRedPacketRecord.userList= function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '领取记录', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/sysRedPacketRecord/tUser' |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
New file |
| | |
| | | /** |
| | | * 用户管理管理初始化 |
| | | */ |
| | | var TUser = { |
| | | id: "TUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用 |
| | | */ |
| | | TUser.tooltip = function(){ |
| | | $(".toolTip").tooltip(); |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '注册时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle',width:'8%'}, |
| | | /* {title: '注册地IP', field: 'registIp', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.registIp != '' && row.registIp != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.registIp + '" onfocus="TUser.tooltip()">' + row.registIp + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | },*/ |
| | | {title: '注册地所<br/>属分公司ID', field: 'companyId', visible: false, align: 'center', valign: 'middle',width:'8%'}, |
| | | {title: '注册地所<br/>属分公司', field: 'companyName', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.companyName != '' && row.companyName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.companyName + '" onfocus="TUser.tooltip()">' + row.companyName + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '昵称', field: 'nickName', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.nickName != '' && row.nickName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.nickName + '" onfocus="TUser.tooltip()">' + row.nickName + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.phone != '' && row.phone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.phone + '" onfocus="TUser.tooltip()">' + row.phone + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '邮箱', field: 'email', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.email != '' && row.email != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.email + '" onfocus="TUser.tooltip()">' + row.email + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '紧急联系人<br/>姓名', field: 'emergencyContact', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.emergencyContact != '' && row.emergencyContact != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.emergencyContact + '" onfocus="TUser.tooltip()">' + row.emergencyContact + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '紧急联系人<br/>电话', field: 'emergencyContactNumber', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.emergencyContactNumber != '' && row.emergencyContactNumber != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.emergencyContactNumber + '" onfocus="TUser.tooltip()">' + row.emergencyContactNumber + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '是否实<br/>名认证', field: 'isAuth', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.isAuth != '' && row.isAuth != null) { |
| | | if (row.isAuth == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="否" onfocus="TUser.tooltip()">否</p>'] |
| | | } else if (row.isAuth == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="是" onfocus="TUser.tooltip()">是</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '历史出<br/>行次数', field: 'historyNum', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.historyNum != '' && row.historyNum != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.historyNum + '" onfocus="TUser.tooltip()">' + row.historyNum + '</p>'] |
| | | }else { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '历史消费', field: 'consumptionNum', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.consumptionNum != '' && row.consumptionNum != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="¥' + row.consumptionNum + '" onfocus="TUser.tooltip()">¥' + row.consumptionNum + '</p>'] |
| | | }else { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="¥0.00" onfocus="TUser.tooltip()">¥0.00</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '积分', field: 'integral', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.integral != '' && row.integral != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.integral + '" onfocus="TUser.tooltip()">' + row.integral + '</p>'] |
| | | }else { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.remark != '' && row.remark != null){ |
| | | var str = row.remark; |
| | | if (row.remark.length > 10){ |
| | | str = row.remark.substring(0,10)+"..."; |
| | | } |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.remark + '" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if (row.state == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: #0d8ddb;" title="正常" onfocus="TUser.tooltip()">正常</p>'] |
| | | } else if (row.state == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="冻结" onfocus="TUser.tooltip()">冻结</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TUser.seItem = selected; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 修改余额 |
| | | */ |
| | | TUser.updateBalance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改余额', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updateBalance/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | TUser.updatePassword = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改密码', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updatePassword/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 查看分享信息 |
| | | */ |
| | | TUser.inviteInfo=function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '邀请信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/inviteInfo/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看用户管理详情 |
| | | */ |
| | | TUser.userDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_userDetail/' + TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结用户 |
| | | */ |
| | | TUser.freezeUser = function () { |
| | | if (this.check()) { |
| | | const ids = TUser.seItem.map(item => item.id); |
| | | console.log(ids) |
| | | console.log(window.parent.SysRedPacketRecord.seItem.id) |
| | | // TUser.close(); |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/sysRedPacketRecord/direct", function(data){ |
| | | Feng.success("派发成功!"); |
| | | TUser.close(); |
| | | },function(data){ |
| | | Feng.error("派发失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("ids",ids.join(",")); |
| | | ajax.set("redId",window.parent.SysRedPacketRecord.seItem.id) |
| | | ajax.start(); |
| | | |
| | | |
| | | } |
| | | }; |
| | | |
| | | TUser.close = function() { |
| | | parent.layer.close(window.parent.SysRedPacketRecord.layerIndex); |
| | | } |
| | | /** |
| | | * 解冻用户 |
| | | */ |
| | | TUser.trawUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 2) { |
| | | swal("启用失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '解冻用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询用户管理列表 |
| | | */ |
| | | TUser.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['id'] = $("#id").val(); |
| | | queryData['nickName'] = $("#nickName").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['isAuth'] = $("#isAuth").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TUser.table.refresh({query: queryData}); |
| | | }; |
| | | TUser.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#id").val(""); |
| | | $("#nickName").val(""); |
| | | $("#phone").val(""); |
| | | $("#isAuth").val(""); |
| | | $("#state").val(""); |
| | | TUser.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TUser.initColumn(); |
| | | var table = new BSTable(TUser.id, "/tUser/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | TUser.table = table.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 下载模板 |
| | | */ |
| | | TUser.uploadUserModel = function () { |
| | | window.location.href = Feng.ctxPath + "/tUser/uploadUserModel"; |
| | | } |
| | | |
| | | var agreement = function(){ |
| | | this.init = function(){ |
| | | //模拟上传excel |
| | | $("#uploadEventBtn").unbind("click").bind("click",function(){ |
| | | $("#uploadEventFile").click(); |
| | | }); |
| | | }; |
| | | } |
| | | /** |
| | | * 导入合同 |
| | | */ |
| | | TUser.exportUser = function () { |
| | | var uploadEventFile = $("#uploadEventFile").val(); |
| | | if(uploadEventFile == ''){ |
| | | Feng.info("请选择Excel,再上传"); |
| | | }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel |
| | | Feng.info("只能上传Excel文件"); |
| | | }else{ |
| | | var url = Feng.ctxPath + '/tUser/exportUser'; |
| | | var file = document.querySelector('input[name=file]').files[0]; |
| | | var reader = new FileReader(); |
| | | if (file) { |
| | | var formData = new FormData(); |
| | | formData.append("myfile", file); |
| | | this.sendAjaxRequest(url, 'POST', formData); |
| | | } |
| | | } |
| | | } |
| | | TUser.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | Feng.success("导入成功!"); |
| | | } |
| | | TUser.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | Feng.error("excel上传失败!"); |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 导出车辆操作 |
| | | */ |
| | | TUser.outUser = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/tUser/outUser"; |
| | | }; |
| | | Feng.confirm("是否确认导出用户信息?", operation); |
| | | } |
| | |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var checkbox1 = $('#checkbox1').prop('checked'); |
| | | var checkbox4 = $('#checkbox4').prop('checked'); |
| | | var temp = 0; |
| | | var temp1 = 0; |
| | | if (checkbox1){ |
| | | temp = 1; |
| | | } |
| | | if (checkbox4){ |
| | | temp1 = 1; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/add", function(data){ |
| | | if (500 == data.code){ |
| | |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tServerCarmodelInfoData); |
| | | ajax.set("isPrivateCar",temp1); |
| | | ajax.set("isPackage",temp); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | var checkbox1 = $('#checkbox1').prop('checked'); |
| | | var checkbox4 = $('#checkbox4').prop('checked'); |
| | | var temp = 0; |
| | | var temp1 = 0; |
| | | if (checkbox1){ |
| | | temp = 1; |
| | | } |
| | | if (checkbox4){ |
| | | temp1 = 1; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tServerCarmodelInfoData); |
| | | ajax.set("isPrivateCar",temp1); |
| | | ajax.set("isPackage",temp); |
| | | ajax.start(); |
| | | } |
| | | |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '修改时间', field: 'updateTime', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | }, |
| | | {title: '操作人', field: 'handle', visible: true, align: 'center', valign: 'middle', |
| | | |
| | | }, |
| | | {title: '红包可抵扣比例', field: 'proportion', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.proportion != '' && row.proportion != null) { |
| | | var time = row.proportion; |
| | | btn = time+"%" |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '生效时间', field: 'startTime', visible: true, align: 'center', valign: 'middle',}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TSite.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TSite.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加跨城站点管理 |
| | | */ |
| | | TSite.addRedSet = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加红包支付设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSysReformist/redSet/addHtml' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看跨城站点管理详情 |
| | | */ |
| | | TSite.update = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑跨城站点', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSysReformist/redSet/updateHtml/' + TSite.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TSite.delete = function () { |
| | | if (this.check()) { |
| | | swal({ |
| | | title: "您是否确认删除" + "?", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSysReformist/redSet/delete", function (data) { |
| | | Feng.success("删除成功") |
| | | swal("删除成功"); |
| | | TSite.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message+"!", "warning"); |
| | | }); |
| | | ajax.set("id",TSite.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 查询跨城站点管理列表 |
| | | */ |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | |
| | | TSite.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/tSysReformist/redSet/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TSite.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSiteInfo = { |
| | | |
| | | } |
| | | TSiteInfo.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | } |
| | | |
| | | TSiteInfo.addSubmit = function() { |
| | | var proportion = $("#proportion").val(); |
| | | if ("" == proportion){ |
| | | Feng.info("请输入可红包抵扣比例"); |
| | | return; |
| | | } |
| | | var startTime = $("#startTime").val(); |
| | | if ("" == startTime){ |
| | | Feng.info("请选择生效时间"); |
| | | return; |
| | | } |
| | | console.log("proportion:"+proportion) |
| | | console.log("startTime:"+startTime) |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSysReformist/redSet/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfo.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("proportion",proportion); |
| | | ajax.set("startTime",startTime); |
| | | ajax.start(); |
| | | } |
| | | TSiteInfo.updateSubmit = function() { |
| | | var proportion = $("#proportion").val(); |
| | | if ("" == proportion){ |
| | | Feng.info("请输入可红包抵扣比例"); |
| | | return; |
| | | } |
| | | var startTime = $("#startTime").val(); |
| | | var id = $("#id").val(); |
| | | if ("" == startTime){ |
| | | Feng.info("请选择生效时间"); |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSysReformist/redSet/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfo.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("proportion",proportion); |
| | | ajax.set("id",id); |
| | | ajax.set("startTime",startTime); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | /** |
| | | * 专车价格设置管理初始化 |
| | | */ |
| | | var TSystemPrice = { |
| | | id: "TSystemPriceTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSystemPrice.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '车型名称', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '车型图片', field: 'img', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | formatter: function (value, row) { |
| | | if (row.img == null || row.img == '') { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 50px;height:50px;" src="' + Feng.ctxPath + '/static/img/NoPIC.png" /></a>'; |
| | | } else { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 90px;height:50px;" src="' + row.img + '" /></a>'; |
| | | } |
| | | }, |
| | | events: 'operateEvents' |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if(row.state == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="正常" onfocus="TUser.tooltip()">正常</p>'] |
| | | }else if(row.state == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="冻结" onfocus="TUser.tooltip()">冻结</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TSystemPrice.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TSystemPrice.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加专车价格设置 |
| | | */ |
| | | TSystemPrice.addSpecial = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加小件物流价格设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSystemPrice/tSmallPrice_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看专车价格设置详情 |
| | | */ |
| | | TSystemPrice.updateSpecial = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '专车价格设置详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSystemPrice/tSmallPrice_update/' + TSystemPrice.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除专车价格设置 |
| | | */ |
| | | TSystemPrice.deleteSpecial = function () { |
| | | if (this.check()) { |
| | | var name = TSystemPrice.seItem.name; |
| | | if (name == "" || name == null || name == undefined){ |
| | | name = "该专车车型价格配置"; |
| | | }else{ |
| | | name = "【"+name+"】价格配置"; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除"+ name + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/opt", function (data) { |
| | | swal("删除成功", "您已经删除了" + name + "。", "success"); |
| | | TSystemPrice.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSystemPriceId",TSystemPrice.seItem.id); |
| | | ajax.set("optType",3); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结 |
| | | */ |
| | | TSystemPrice.freezeSpecial = function(){ |
| | | if (this.check()) { |
| | | var name = TSystemPrice.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该专车车型价格配置"; |
| | | } else { |
| | | name = "【" + name + "】价格配置"; |
| | | } |
| | | if (TSystemPrice.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | swal({ |
| | | title: "您是否确认冻结"+ name + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "冻结", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/opt", function (data) { |
| | | swal("冻结成功", "您已经冻结了" + name + "。", "success"); |
| | | TSystemPrice.table.refresh(); |
| | | }, function (data) { |
| | | swal("冻结失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSystemPriceId",TSystemPrice.seItem.id); |
| | | ajax.set("optType", 1); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 解冻 |
| | | */ |
| | | TSystemPrice.thawSpecial = function(){ |
| | | if (this.check()) { |
| | | var name = TSystemPrice.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该专车车型价格配置"; |
| | | } else { |
| | | name = "【" + name + "】价格配置"; |
| | | } |
| | | if (TSystemPrice.seItem.state != 2) { |
| | | swal("解冻失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | swal({ |
| | | title: "您是否确认解冻"+ name + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "解冻", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/opt", function (data) { |
| | | swal("解冻成功", "您已经解冻了" + name + "。", "success"); |
| | | TSystemPrice.table.refresh(); |
| | | }, function (data) { |
| | | swal("解冻失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSystemPriceId",TSystemPrice.seItem.id); |
| | | ajax.set("optType", 2); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询专车价格设置列表 |
| | | */ |
| | | TSystemPrice.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TSystemPrice.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSystemPrice.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#state").val(""); |
| | | TSystemPrice.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSystemPrice.initColumn(); |
| | | var table = new BSTable(TSystemPrice.id, "/tSystemPrice/listSmall", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TSystemPrice.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化专车价格设置详情对话框 |
| | | */ |
| | | var TSystemPriceInfoDlg = { |
| | | tSystemPriceInfoData : {}, |
| | | validateFields: { |
| | | serverCarModelId: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择车型' |
| | | } |
| | | } |
| | | }, |
| | | fareTypeNote: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '运价类型说明不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num1: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num2: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num3: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【分钟】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[0-9]{0,3}$/, |
| | | message: '【分钟】输入框不能超过3位数' |
| | | } |
| | | } |
| | | }, |
| | | num4: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num5: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num6: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【分钟】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[0-9]{0,3}$/, |
| | | message: '【分钟】输入框不能超过3位数' |
| | | } |
| | | } |
| | | }, |
| | | num7: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num8: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num9: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num10: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num11: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num12: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num13: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num14: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num15: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | // num16: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【时间】输入框不能为空' |
| | | // } |
| | | // } |
| | | // }, |
| | | // num17: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【元】输入框不能为空' |
| | | // }, |
| | | // regexp: { |
| | | // regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | // message: '【元】输入框不能超过3位数,保留两位小数' |
| | | // } |
| | | // } |
| | | // }, |
| | | // num18: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【元】输入框不能为空' |
| | | // }, |
| | | // regexp: { |
| | | // regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | // message: '【元】输入框不能超过3位数,保留两位小数' |
| | | // } |
| | | // } |
| | | // }, |
| | | // num19: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【元】输入框不能为空' |
| | | // }, |
| | | // regexp: { |
| | | // regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | // message: '【元】输入框不能超过3位数,保留两位小数' |
| | | // } |
| | | // } |
| | | // }, |
| | | // num20: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【元】输入框不能为空' |
| | | // }, |
| | | // regexp: { |
| | | // regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | // message: '【元】输入框不能超过3位数,保留两位小数' |
| | | // } |
| | | // } |
| | | // }, |
| | | // num21: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【元】输入框不能为空' |
| | | // }, |
| | | // regexp: { |
| | | // regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | // message: '【元】输入框不能超过3位数,保留两位小数' |
| | | // } |
| | | // } |
| | | // }, |
| | | // num22: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '【元】输入框不能为空' |
| | | // }, |
| | | // regexp: { |
| | | // regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | // message: '【元】输入框不能超过3位数,保留两位小数' |
| | | // } |
| | | // } |
| | | // }, |
| | | num23: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【时间】输入框不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num24: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【时间】输入框不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num25: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num26: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num27: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num28: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num29: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num30: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TSystemPriceInfoDlg.validate = function () { |
| | | $('#specialPriceInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#specialPriceInfoForm').bootstrapValidator('validate'); |
| | | return $("#specialPriceInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TSystemPriceInfoDlg.clearData = function() { |
| | | this.tSystemPriceInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TSystemPriceInfoDlg.set = function(key, val) { |
| | | this.tSystemPriceInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TSystemPriceInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSystemPriceInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TSystemPrice.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TSystemPriceInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('type') |
| | | .set('companyId') |
| | | .set('serverCarModelId') |
| | | .set('fareTypeNote') |
| | | .set('content'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TSystemPriceInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var content = '{'; |
| | | //拼接数据 |
| | | $("input").each(function(){ |
| | | var value = $(this).val(); |
| | | content = content + '"'+$(this)[0].name+'":"'+value+'",'; |
| | | }); |
| | | content = content.substring(0,content.length-1); |
| | | content += '}'; |
| | | console.log(content); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/smalladd", function(data){ |
| | | if (500 == data.code){ |
| | | Feng.error(data.message); |
| | | return; |
| | | }else{ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TSystemPrice.table.refresh(); |
| | | TSystemPriceInfoDlg.close(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tSystemPriceInfoData); |
| | | ajax.set("content",content); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TSystemPriceInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var content = '{'; |
| | | //拼接数据 |
| | | $("input").each(function(){ |
| | | var value = $(this).val(); |
| | | content = content + '"'+$(this)[0].name+'":"'+value+'",'; |
| | | }); |
| | | content = content.substring(0,content.length-1); |
| | | content += '}'; |
| | | console.log(content); |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/smallupdate", function(data){ |
| | | if (500 == data.code){ |
| | | Feng.error(data.message); |
| | | return; |
| | | }else { |
| | | Feng.success("修改成功!"); |
| | | window.parent.TSystemPrice.table.refresh(); |
| | | TSystemPriceInfoDlg.close(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tSystemPriceInfoData); |
| | | ajax.set("id",$("#id").html()); |
| | | ajax.set("content",content); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("specialPriceInfoForm", TSystemPriceInfoDlg.validateFields); |
| | | }); |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSystemPrice/tSystemPrice_add' |
| | | content: Feng.ctxPath + '/tSystemPrice/tSmallPrice_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | |
| | | sms = "Your verification code is " + authCode + ",it is valid within 5 minutes, please do not reveal it to others."; |
| | | break; |
| | | case 3: |
| | | sms = "Votre code de validation est " + authCode + "et il est valide pendant 5 minutes. Veuillez ne pas le révéler à d’autres personnes."; |
| | | sms = "Votre code de validation est " + authCode + " et il est valide pendant 5 minutes. Veuillez ne pas le révéler à d’autres personnes."; |
| | | break; |
| | | } |
| | | smsUtil.sendCellulantMessage(phone, sms); |