| | |
| | | |
| | | 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.PlatformVO; |
| | | import com.stylefeng.guns.modular.system.vo.WaterMoneyVO; |
| | | import com.stylefeng.guns.modular.system.vo.WaterVO; |
| | | import io.swagger.models.auth.In; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | 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.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | 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; |
| | | /** |
| | | * 第三方流水统计获取列表 |
| | | */ |
| | | |
| | | @Autowired |
| | | private ITPubTransactionDetailsService pubTransactionDetailsService; |
| | | @Autowired |
| | | private ITPubWithdrawalService pubWithdrawalService; |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private ITUserService appUserService; |
| | | @Autowired |
| | | private IOrderCancelService orderCancelService; |
| | | |
| | | public static void main(String[] args) { |
| | | // 获取今天的日期 |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("/commission") |
| | | public String index( Model model) { |
| | | return PREFIX + "commission.html"; |
| | | } |
| | | |
| | | @RequestMapping("/water") |
| | | public String watter( Model model) { |
| | | return PREFIX + "watter.html"; |
| | | } |
| | | |
| | | /** |
| | | * |
| | |
| | | waterMoneyVO.setUserWithdrawal(userWithdrawal); |
| | | return waterMoneyVO; |
| | | } |
| | | /** |
| | | * 第三方流水统计获取列表 |
| | | */ |
| | | |
| | | @Autowired |
| | | private ITPubTransactionDetailsService pubTransactionDetailsService; |
| | | @Autowired |
| | | private ITPubWithdrawalService pubWithdrawalService; |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private ITUserService appUserService; |
| | | @Autowired |
| | | private IOrderCancelService orderCancelService; |
| | | @RequestMapping(value = "/water/list") |
| | | @ResponseBody |
| | | public Object list1(Integer time,String insertTime,Integer payType,Integer type, String code) { |
| | |
| | | } |
| | | |
| | | EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | // settlementDetailEntityWrapper.between("createTime", start, end); |
| | | if (time == 5 && !StringUtils.hasLength(insertTime)){ |
| | | |
| | | }else{ |
| | | settlementDetailEntityWrapper.between("createTime", start, end); |
| | | } |
| | | if (state!=null && state == 2){ |
| | | List<SettlementRecord> paymentStatus = settlementRecordService.selectList(new EntityWrapper<SettlementRecord>().eq("paymentStatus", 1)); |
| | | if(paymentStatus.size() > 0){ |
| | |
| | | }else if (state!=null && state == 1){ |
| | | List<SettlementRecord> paymentStatus = settlementRecordService.selectList(new EntityWrapper<SettlementRecord>().eq("paymentStatus", 2)); |
| | | if(paymentStatus.size() > 0){ |
| | | settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList())) |
| | | .or().isNull("settlementRecordId");; |
| | | settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList())); |
| | | }else{ |
| | | settlementDetailEntityWrapper.eq("settlementRecordId", 0); |
| | | } |
| | | } |
| | | if (time == 5 && !StringUtils.hasLength(insertTime)){ |
| | | |
| | | }else{ |
| | | settlementDetailEntityWrapper.between("createTime", start, end); |
| | | } |
| | | settlementDetails = settlementDetailService.selectList(settlementDetailEntityWrapper); |
| | | List<PlatformVO> res = new ArrayList<>(); |
| | |
| | | break; |
| | | case 4: |
| | | platformVO.setPayType("现金支付"); |
| | | case 5: |
| | | platformVO.setPayType("平台支付"); |
| | | break; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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 com.stylefeng.guns.modular.system.vo.UseMoneyVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | 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.BigInteger; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.*; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | 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 ISysCouponRecordService sysCouponRecordService; |
| | | @Autowired |
| | | private IUserActivityDiscount1Service userActivityDiscount1Service; |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | public static void main(String[] args) { |
| | | String temp = "[{\"money\":14.46,\"id\":91},{\"money\":1,\"id\":90}]"; |
| | |
| | | temp1 = temp1.add(new BigDecimal(string)); |
| | | } |
| | | System.err.println(temp1); |
| | | } |
| | | |
| | | @RequestMapping("/grant") |
| | | public String index(Model model) { |
| | | return PREFIX + "grant.html"; |
| | | } |
| | | |
| | | @RequestMapping("/use") |
| | | public String watter(Model model) { |
| | | return PREFIX + "use.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | return useMoneyVO; |
| | | } |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | /** |
| | | * 发放补贴统计 |
| | | */ |
| | |
| | | grantVO.setRemark("邀请用户注册"); |
| | | break; |
| | | case 3: |
| | | grantVO.setRemark("累计在线"); |
| | | grantVO.setRemark("在线时长奖励"); |
| | | break; |
| | | case 4: |
| | | grantVO.setRemark("订单量"); |
| | | grantVO.setRemark("累计接单奖励"); |
| | | break; |
| | | } |
| | | driver = driver.add(new BigDecimal(driverActivityHistory.getMoney().toString())); |
| | |
| | | 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.log.LogObjectHolder; |
| | | 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.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | List<DriverActivityHistory> historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",1).eq("activityId",driverActivityRegistered.getId()).eq("carryOut",2)); |
| | | Double totalMOney=0d; |
| | | Double money=0d; |
| | | Integer number=0; |
| | | Integer number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money1",money); |
| | | map.put("number1",number); |
| | |
| | | //统计邀请用户注册 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",2).eq("activityId",driverActivityRegistered.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money2",money); |
| | | map.put("number2",number); |
| | |
| | | //统计专车在线 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",3).eq("activityId",driverActivityOnline.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money3",money); |
| | | map.put("number3",number); |
| | |
| | | //统计订单数 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",4).eq("activityId",driverActivityOrder.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money6",money); |
| | | map.put("number6",number); |
| | |
| | | map.put("userActivityRedenvelopeUseMoney", 0); |
| | | } |
| | | Map<String, Object> resultMap = userCouponRecordService.getRegStatic(startTimes, endTimes, activityId); |
| | | |
| | | totalMOney += Double.parseDouble(resultMap.get("money").toString()); |
| | | map.put("totalMOney", totalMOney); |
| | | return map; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.controller.specialTrain; |
| | | |
| | | import cn.hutool.system.UserInfo; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.math.BigDecimal; |
| | | import java.math.MathContext; |
| | | import java.math.RoundingMode; |
| | |
| | | |
| | | @Resource |
| | | private ITCarService carService; |
| | | |
| | | |
| | | |
| | | private ResultUtil resultUtil; |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | | @Autowired |
| | | private ITSystemNoticeService systemNoticeService; |
| | | @Resource |
| | | private TSystemPriceMapper systemPriceMapper; |
| | | |
| | | /** |
| | | * 跳转到专车订单首页 |
| | |
| | | model.addAttribute("item",item); |
| | | return PREFIX + "tOrderPrivateCar_orderDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改专车订单 |
| | | */ |
| | |
| | | model.addAttribute("item",item); |
| | | return PREFIX + "toChangeMoney.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到出租车订单轨迹页面 |
| | | */ |
| | |
| | | page.setRecords(tOrderPrivateCarService.getPrivateCarOrderList(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),orderNum,orderSource,userName,userPhone,passengers,passengersPhone,serverCarModelId,driver,state,smsNumber)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | |
| | | return resultUtil; |
| | | } |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 支付专车订单 |
| | | */ |
| | |
| | | orderPrivateCar.setAbnormalMoney(orderPrivateCar.getOrderMoney()); |
| | | orderPrivateCar.setOrderMoney(money); |
| | | orderPrivateCar.setPayMoney(money); |
| | | orderPrivateCar.setPayType(5); |
| | | orderPrivateCar.setState(7); |
| | | orderPrivateCar.setIsDispute(1); |
| | | orderPrivateCar.updateById(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/frozenOrder") |
| | | @ResponseBody |
| | |
| | | tOrderPrivateCarService.updateById(orderPrivateCar); |
| | | return SUCCESS_TIP; |
| | | } |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | | @Autowired |
| | | private ITSystemNoticeService systemNoticeService; |
| | | @Resource |
| | | private TSystemPriceMapper systemPriceMapper; |
| | | |
| | | public TOrderPrivateCar setMoney(TOrderPrivateCar orderPrivateCar, Double parkingFee, Double crossingFee) throws Exception { |
| | | System.err.println("计算金额:"+orderPrivateCar); |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | |
| | | orderPrivateCar.setIsplatPay(2); |
| | | orderPrivateCar.setPayManner(1); |
| | | orderPrivateCar.setState(8); |
| | | orderPrivateCar.setPayType(5); |
| | | orderPrivateCar.setPayMoney(orderPrivateCar.getOrderMoney()); |
| | | tOrderPrivateCarService.updateAllColumnById(orderPrivateCar); |
| | | return SUCCESS_TIP; |
| | |
| | | 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.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 专车改派管理控制器 |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITPubTransactionDetailsService itPubTransactionDetailsService; |
| | | |
| | | /** |
| | | * 跳转到专车改派管理首页 |
| | |
| | | return PREFIX + "cross.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到小件物流改派管理首页 |
| | | */ |
| | |
| | | public String smallPieceLogistics() { |
| | | return PREFIX + "smallPieceLogistics.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加专车改派管理 |
| | |
| | | return PREFIX + "tReassign_reassignmentSmall.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/lookDetail/{id}") |
| | | public String lookDetail(@PathVariable Integer id, Model model) { |
| | | TReassign tReassign = tReassignService.selectById(id); |
| | |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取专车改派管理列表 |
| | |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取跨城改派管理列表 |
| | | */ |
| | |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 选择司机列表 |
| | | */ |
| | |
| | | TReassign reassign = tReassignService.selectById(orderId); |
| | | TOrderPrivateCar privateCar = itOrderPrivateCarService.selectById(reassign.getOrderId()); |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tReassignService.getCanSelectPrivateCarDriverList(page,privateCar.getCompanyId(),privateCar.getDriverId(),name,phone)); |
| | | page.setRecords(tReassignService.getCanSelectPrivateCarDriverList(page,privateCar.getServerCarModelId(),privateCar.getDriverId(),name,phone)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 选择司机列表 |
| | | */ |
| | |
| | | TReassign reassign = tReassignService.selectById(orderId); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(reassign.getOrderId()); |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tReassignService.getCanSelectSmallDriverList(page,tOrderLogistics.getCompanyId(), tOrderLogistics.getDriverId(), tOrderLogistics.getType(),name,phone)); |
| | | page.setRecords(tReassignService.getCanSelectSmallDriverList(page,tOrderLogistics.getServerCarModelId(), tOrderLogistics.getDriverId(), tOrderLogistics.getType(),name,phone)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 操作专车改派管理 |
| | |
| | | // itPubTransactionDetailsService.insert(details); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @Autowired |
| | | private ITPubTransactionDetailsService itPubTransactionDetailsService; |
| | | |
| | | /** |
| | | * 操作跨城改派管理 |
| | |
| | | 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.TReassign; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getCanSelectPrivateCarDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("serverCarModelId") Integer serverCarModelId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getCanSelectSmallDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("serverCarModelId") Integer serverCarModelId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("type") Integer type, |
| | | @Param("name") String name, |
| | |
| | | </sql> |
| | | <select id="getList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT |
| | | CONCAT(d.firstName, ' ', d.lastName) as `name`,d.phone,h.insertTime,h.money |
| | | CONCAT(d.firstName, ' ', d.lastName) as `name`,d.phone,h.completionTime as insertTime,h.money |
| | | FROM |
| | | t_driver_activity_history h |
| | | LEFT JOIN t_driver d ON h.driverId = d.id |
| | |
| | | select DATE_FORMAT(a.startTime, '%Y-%m-%d') as time, 0, count(a.driverId) as `online`, 0 as orderNum, 0 as cancelNum, 0 as onlinePay, 0 as offlinePay, 0 as money, 0 as complaint |
| | | from (select driverId, DATE_FORMAT(startTime, '%Y-%m-%d') as startTime from t_driver_work group by driverId, DATE_FORMAT(startTime, '%Y-%m-%d')) a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | |
| | | where 1 = 1 |
| | | <if test="null != companyId"> |
| | | and if(b.franchiseeId is null or b.franchiseeId = 0, b.companyId = #{companyId}, b.franchiseeId = #{companyId}) |
| | | </if> |
| | |
| | | </if> |
| | | group by DATE_FORMAT(insertTime, '%Y-%m-%d') |
| | | union all |
| | | |
| | | </if> |
| | | <if test="null == type or type == 2"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_taxi where isDelete = 1 and payType in (1, 2, 3) |
| | |
| | | ot.payType, |
| | | case when ot.payType = 1 then '手机支付' |
| | | when ot.payType = 2 then '银行卡支付' |
| | | when ot.payType = 3 then '余额支付' else '现金支付' end as payTypeStr, |
| | | when ot.payType = 3 then '余额支付' |
| | | when ot.payType = 4 then '现金支付' else '平台支付' end as payTypeStr, |
| | | |
| | | case when ot.isFree = 2 then ot.orderMoney |
| | | when ot.freeMoney > ot.orderMoney then ot.orderMoney else ot.freeMoney end as freeMoney1, |
| | |
| | | SELECT dd.*,c1.name as companyName,c2.name as franchiseeName from t_driver AS dd |
| | | LEFT JOIN t_company as c1 on c1.id = dd.companyId |
| | | LEFT JOIN t_company as c2 on c2.id = dd.franchiseeId |
| | | LEFT JOIN (SELECT * from t_driver_service where type = 1) as ds on ds.driverId = dd.id |
| | | <where> |
| | | dd.id != driverId and |
| | | (dd.companyId = #{companyId} or dd.franchiseeId = #{companyId}) and dd.authState = 2 and dd.state = 2 and (ds.id is not null ) and (dd.carId is not null) |
| | | dd.id != #{driverId} and dd.authState = 2 and dd.state = 2 |
| | | and dd.id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | ) |
| | | and dd.id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | and dd.carId in (select carId from t_car_service where `type` = #{type} |
| | | <if test="null != serverCarModelId"> |
| | | and serverCarModelId = #{serverCarModelId} |
| | | </if> |
| | | ) |
| | | <if test="name != null and name != ''"> |
| | | and CONCAT(dd.firstName, ' ', dd.lastName) LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | |
| | | SELECT dd.*,c1.name as companyName,c2.name as franchiseeName from t_driver AS dd |
| | | LEFT JOIN t_company as c1 on c1.id = dd.companyId |
| | | LEFT JOIN t_company as c2 on c2.id = dd.franchiseeId |
| | | LEFT JOIN (SELECT * from t_driver_service where type = #{type}) as ds on ds.driverId = dd.id |
| | | <where> |
| | | dd.id != driverId and |
| | | (dd.companyId = #{companyId} or dd.franchiseeId = #{companyId}) and dd.authState = 2 and dd.state = 2 and (ds.id is not null ) and (dd.carId is not null) |
| | | dd.id != #{driverId} and dd.authState = 2 and dd.state = 2 |
| | | and dd.id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | ) |
| | | and dd.id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | and dd.carId in (select carId from t_car_service where `type` = #{type} |
| | | <if test="null != serverCarModelId"> |
| | | and serverCarModelId = #{serverCarModelId} |
| | | </if> |
| | | ) |
| | | <if test="name != null and name != ''"> |
| | | and CONCAT(dd.firstName, ' ', dd.lastName) LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.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.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | /** |
| | | * 服务车型id |
| | | */ |
| | | @TableField("serverCarModelId") |
| | | private Integer serverCarModelId; |
| | | |
| | | public Integer getOldState() { |
| | | return oldState; |
| | |
| | | this.isover = isover; |
| | | } |
| | | |
| | | public Integer getServerCarModelId() { |
| | | return serverCarModelId; |
| | | } |
| | | |
| | | public void setServerCarModelId(Integer serverCarModelId) { |
| | | this.serverCarModelId = serverCarModelId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TReassign; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.TReassign; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getCanSelectPrivateCarDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("serverCarModelId") Integer serverCarModelId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getCanSelectSmallDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("serverCarModelId") Integer serverCarModelId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("type") Integer type, |
| | | @Param("name") String name, |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TReassign; |
| | | import com.stylefeng.guns.modular.system.dao.TReassignMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITReassignService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.TReassignMapper; |
| | | import com.stylefeng.guns.modular.system.model.TReassign; |
| | | import com.stylefeng.guns.modular.system.service.ITReassignService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCanSelectPrivateCarDriverList(Page<Map<String, Object>> page, Integer companyId, Integer driverId, String name, String phone) { |
| | | return this.baseMapper.getCanSelectPrivateCarDriverList(page, companyId, driverId, name, phone); |
| | | public List<Map<String, Object>> getCanSelectPrivateCarDriverList(Page<Map<String, Object>> page, Integer serverCarModelId, Integer driverId, String name, String phone) { |
| | | return this.baseMapper.getCanSelectPrivateCarDriverList(page, serverCarModelId, driverId, name, phone); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCanSelectSmallDriverList(Page<Map<String, Object>> page, Integer companyId, Integer driverId, Integer type, String name, String phone) { |
| | | return this.baseMapper.getCanSelectSmallDriverList(page, companyId, driverId, type, name, phone); |
| | | public List<Map<String, Object>> getCanSelectSmallDriverList(Page<Map<String, Object>> page, Integer serverCarModelId, Integer driverId, Integer type, String name, String phone) { |
| | | return this.baseMapper.getCanSelectSmallDriverList(page, serverCarModelId, driverId, type, name, phone); |
| | | } |
| | | |
| | | |
| | |
| | | import javax.mail.internet.MimeBodyPart; |
| | | import javax.mail.internet.MimeMessage; |
| | | import javax.mail.internet.MimeMultipart; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.util.Properties; |
| | | |
| | |
| | | //选择ssl方式 |
| | | gmailssl(props); |
| | | |
| | | final String displayName = "I-GO";//昵称 |
| | | final String username = "i-gotech@i-go.group";// gmail 邮箱 |
| | | final String password = "mbhyptngnvlewdxo";// Google应用专用密码 |
| | | Session session = Session.getInstance(props, |
| | |
| | | }); |
| | | // 创建默认的MimeMessage对象 |
| | | MimeMessage message = new MimeMessage(session); |
| | | String nick = ""; |
| | | try { |
| | | nick = javax.mail.internet.MimeUtility.encodeText(displayName); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 设置发件人 |
| | | message.setFrom(new InternetAddress(username)); |
| | | message.setFrom(new InternetAddress(nick + " <" + username + ">")); |
| | | // 设置收件人 |
| | | message.addRecipient(Message.RecipientType.TO, new InternetAddress(sentToEmail)); |
| | | // 设置邮件主题 |
| | |
| | | <#SelectCon id="state" name="改派状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">提交申请</option> |
| | | <option value="2">已支付</option> |
| | | <!-- <option value="2">已支付</option>--> |
| | | <option value="3">已改派</option> |
| | | <option value="4">已取消</option> |
| | | <option value="5">已拒绝</option> |
| | |
| | | <#SelectCon id="state" name="改派状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">提交申请</option> |
| | | <option value="2">已支付</option> |
| | | <!-- <option value="2">已支付</option>--> |
| | | <option value="3">已改派</option> |
| | | <option value="4">已取消</option> |
| | | <option value="5">已拒绝</option> |
| | |
| | | <#SelectCon id="state" name="改派状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">提交申请</option> |
| | | <option value="2">已支付</option> |
| | | <!-- <option value="2">已支付</option>--> |
| | | <option value="3">已改派</option> |
| | | <option value="4">已取消</option> |
| | | <option value="5">已拒绝</option> |
| | |
| | | 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;" title="已支付" onfocus="TUser.tooltip()">已支付</p>'] |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="提交申请" onfocus="TUser.tooltip()">提交申请</p>'] |
| | | } else if (row.state == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已改派" onfocus="TUser.tooltip()">已改派</p>'] |
| | | } else if (row.state == 4){ |
| | |
| | | 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;" title="已支付" onfocus="TUser.tooltip()">已支付</p>'] |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="提交申请" onfocus="TUser.tooltip()">提交申请</p>'] |
| | | } else if (row.state == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已改派" onfocus="TUser.tooltip()">已改派</p>'] |
| | | } else if (row.state == 4){ |
| | |
| | | if (type == null) { |
| | | UserActivity.seItem = selected[0]; |
| | | return true; |
| | | } else if (type == 3 && selected[0].status != 6 && selected[0].status != 7) { |
| | | } else if (type == 3 && selected[0].status != 4 && selected[0].status != 5 && selected[0].status != 6) { |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | } else if (type == 3 && selected[0].status == 6 && (selected[0].startTime > new Date() || new Date() > selected[0].endTime)) { |
| | | } else if (type == 3 && (selected[0].status != 4 || selected[0].status != 5 || selected[0].status != 6) && (selected[0].startTime > new Date() || new Date() > selected[0].endTime)) { |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | } else if (type == 1 && selected[0].status != 1) { |