Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | |
| | | // 是否推广订单 |
| | | Integer promotion = isPromotion(uid); |
| | | Integer promotion = isPromotion(orderPrivateCar.getUserId()); |
| | | if(promotion!=null){ |
| | | orderPrivateCar.setPromotion(2); |
| | | Driver driver1 = driverService.selectById(promotion); |
| | |
| | | UserInfo userInfo = userInfoMapper.selectById(userId); |
| | | if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ |
| | | String registAreaCode = userInfo.getRegistAreaCode(); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | return 2; |
| | | } |
| | |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | private Integer state; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | // } |
| | | |
| | | // 是否推广订单 |
| | | // 是否推广订单 |
| | | Integer promotion = isPromotion(uid); |
| | | Integer promotion = isPromotion(orderTaxi.getUserId()); |
| | | if(promotion!=null){ |
| | | orderTaxi.setPromotion(2); |
| | | Driver driver1 = driverService.selectById(promotion); |
| | |
| | | UserInfo userInfo = userInfoMapper.selectById(userId); |
| | | if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ |
| | | String registAreaCode = userInfo.getRegistAreaCode(); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | return userInfo.getBindDriverId(); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.specialTrain; |
| | | |
| | | 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.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 快车订单控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-09-02 17:28:59 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/promotionInfo") |
| | | public class TPromotionOrderCarController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tPromotionOrderCar/"; |
| | | |
| | | @Autowired |
| | | private ITOrderPrivateCarService tOrderPrivateCarService; |
| | | |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到快车订单首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<Map<String, Object>> list=new ArrayList<>(); |
| | | list = tOrderPrivateCarService.promotionInfoExport(null, null, null, null, null, null, null, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | BigDecimal reduce = list.stream().map(e -> new BigDecimal(e.get("promotionMoney").toString())).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | model.addAttribute("money",reduce); |
| | | model.addAttribute("size",list.size()); |
| | | |
| | | return PREFIX + "tPromotionOrder.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取快车订单列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String orderNum, |
| | | String userName, |
| | | String name, |
| | | String driverName){ |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderPrivateCarService.promotionInfo(page, beginTime, endTime, orderNum, userName, name, driverName, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId())); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/export") |
| | | @ResponseBody |
| | | public void export(String insertTime, |
| | | String orderNum, |
| | | String userName, |
| | | String name, |
| | | String driverName, HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> list=new ArrayList<>(); |
| | | list = tOrderPrivateCarService.promotionInfoExport(null, beginTime, endTime, orderNum, userName, name, driverName, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | //第一行显示【封装】 |
| | | List<String> twoList = new ArrayList<String>(); |
| | | twoList.add("总计:"); |
| | | twoList.add(String.valueOf(list.size())+"条"); |
| | | dataList.add(twoList); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("活动名称"); |
| | | shellList.add("司机名称"); |
| | | shellList.add("下级用户"); |
| | | shellList.add("订单编号"); |
| | | shellList.add("订单金额"); |
| | | shellList.add("司机推广收益"); |
| | | shellList.add("收益时间"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : list){ |
| | | // 详细数据列【封装】 |
| | | shellList = new ArrayList<String>(); |
| | | if(SinataUtil.isNotEmpty(object.get("name"))){ |
| | | shellList.add(object.get("name").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("driverName"))){ |
| | | shellList.add(object.get("driverName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("userName"))){ |
| | | shellList.add(object.get("userName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("orderNum"))){ |
| | | shellList.add(object.get("orderNum").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("money"))){ |
| | | shellList.add(object.get("money").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("promotionMoney"))){ |
| | | shellList.add(object.get("promotionMoney").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | |
| | | if(SinataUtil.isNotEmpty(object.get("successTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("successTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | |
| | | |
| | | |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("推广收益明细导出记录"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "推广收益明细导出记录", dataList,request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/list1") |
| | | @ResponseBody |
| | | public Object list1(String insertTime, |
| | | String orderNum, |
| | | String userName, |
| | | String name, |
| | | String driverName) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> list=new ArrayList<>(); |
| | | list = tOrderPrivateCarService.promotionInfoExport(null, beginTime, endTime, orderNum, userName, name, driverName, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | BigDecimal reduce = list.stream().map(e -> new BigDecimal(e.get("promotionMoney").toString())).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | map.put("money", reduce); |
| | | map.put("size", list.size()); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | List<Map<String,Object>> getSurcharge(@Param("id") Object id,@Param("orderType") Integer orderType); |
| | | |
| | | List<Map<String, Object>> promotionInfo(@Param("page") Page<Map<String, Object>> page, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("orderNum") String orderNum, @Param("userName") String userName, @Param("name") String name, @Param("driverName") String driverName, @Param("roleType") Integer roleType, @Param("objectId") Integer objectId); |
| | | |
| | | List<Map<String, Object>> promotionInfoExport(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("orderNum") String orderNum, @Param("userName") String userName, @Param("name") String name, @Param("driverName") String driverName, @Param("roleType") Integer roleType, @Param("objectId") Integer objectId); |
| | | } |
| | |
| | | SELECT IFNULL(amount,0) amount,b.`name` FROM t_order_additional_fee a LEFT JOIN t_additional_fee b ON a.additionalFeeId=b.id WHERE a.orderId=#{id} AND a.orderType=#{orderType} AND a.id>1 AND amount>0 |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="promotionInfo" resultType="java.util.Map"> |
| | | select * from ( |
| | | select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName |
| | | from t_order_private_car t1 |
| | | LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id |
| | | LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id |
| | | LEFT JOIN t_user t4 ON t1.userId = t4.id |
| | | where t1.promotionActivityId is not null |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and t1.orderNum =#{orderNum} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and t1.successTime between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t4.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t2.activityTitle like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and t3.name like CONCAT('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType != 1"> |
| | | and t1.companyId = #{objectId} |
| | | </if> |
| | | |
| | | union all |
| | | select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName |
| | | from t_order_taxi t1 |
| | | LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id |
| | | LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id |
| | | LEFT JOIN t_user t4 ON t1.userId = t4.id |
| | | where t1.promotionActivityId is not null |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and t1.orderNum =#{orderNum} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and t1.successTime between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t4.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t2.activityTitle like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and t3.name like CONCAT('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType != 1"> |
| | | and t1.companyId = #{objectId} |
| | | </if> |
| | | |
| | | union all |
| | | |
| | | select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName |
| | | from t_order_cross_city t1 |
| | | LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id |
| | | LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id |
| | | LEFT JOIN t_user t4 ON t1.userId = t4.id |
| | | where t1.promotionActivityId is not null |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and t1.orderNum =#{orderNum} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and t1.successTime between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t4.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t2.activityTitle like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and t3.name like CONCAT('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType != 1"> |
| | | and t1.companyId = #{objectId} |
| | | </if> |
| | | ) as t5 order by t5.successTime desc |
| | | |
| | | </select> |
| | | <select id="promotionInfoExport" resultType="java.util.Map"> |
| | | select * from ( |
| | | select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName |
| | | from t_order_private_car t1 |
| | | LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id |
| | | LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id |
| | | LEFT JOIN t_user t4 ON t1.userId = t4.id |
| | | where t1.promotionActivityId is not null |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and t1.orderNum =#{orderNum} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and t1.successTime between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t4.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t2.activityTitle like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and t3.name like CONCAT('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType != 1"> |
| | | and t1.companyId = #{objectId} |
| | | </if> |
| | | |
| | | union all |
| | | select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName |
| | | from t_order_taxi t1 |
| | | LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id |
| | | LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id |
| | | LEFT JOIN t_user t4 ON t1.userId = t4.id |
| | | where t1.promotionActivityId is not null |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and t1.orderNum =#{orderNum} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and t1.successTime between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t4.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t2.activityTitle like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and t3.name like CONCAT('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType != 1"> |
| | | and t1.companyId = #{objectId} |
| | | </if> |
| | | |
| | | union all |
| | | |
| | | select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName |
| | | from t_order_cross_city t1 |
| | | LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id |
| | | LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id |
| | | LEFT JOIN t_user t4 ON t1.userId = t4.id |
| | | where t1.promotionActivityId is not null |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and t1.orderNum =#{orderNum} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and t1.successTime between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t4.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t2.activityTitle like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and t3.name like CONCAT('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType != 1"> |
| | | and t1.companyId = #{objectId} |
| | | </if> |
| | | ) as t5 order by t5.successTime desc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | public class DriverRankVo { |
| | | private Integer driverId; |
| | | |
| | | private String driverName; |
| | | |
| | | private Integer userNum; |
| | | |
| | | private BigDecimal money; |
| | | } |
| | |
| | | |
| | | private String abnormalRemark; |
| | | |
| | | private Integer promotionDriverId; |
| | | |
| | | private BigDecimal promotionMoney; |
| | | |
| | | public BigDecimal getPromotionMoney() { |
| | | return promotionMoney; |
| | | } |
| | | |
| | | public void setPromotionMoney(BigDecimal promotionMoney) { |
| | | this.promotionMoney = promotionMoney; |
| | | } |
| | | |
| | | public Integer getPromotionDriverId() { |
| | | return promotionDriverId; |
| | | } |
| | | |
| | | public void setPromotionDriverId(Integer promotionDriverId) { |
| | | this.promotionDriverId = promotionDriverId; |
| | | } |
| | | |
| | | public Integer getAbnormalStatus() { |
| | | return abnormalStatus; |
| | | } |
| | |
| | | |
| | | private String abnormalRemark; |
| | | |
| | | |
| | | private Integer promotionDriverId; |
| | | |
| | | |
| | | private BigDecimal promotionMoney; |
| | | |
| | | public BigDecimal getPromotionMoney() { |
| | | return promotionMoney; |
| | | } |
| | | |
| | | public void setPromotionMoney(BigDecimal promotionMoney) { |
| | | this.promotionMoney = promotionMoney; |
| | | } |
| | | |
| | | public Integer getPromotionDriverId() { |
| | | return promotionDriverId; |
| | | } |
| | | |
| | | public void setPromotionDriverId(Integer promotionDriverId) { |
| | | this.promotionDriverId = promotionDriverId; |
| | | } |
| | | |
| | | public Integer getAbnormalStatus() { |
| | | return abnormalStatus; |
| | | } |
| | |
| | | |
| | | private BigDecimal responsibilityMoney; |
| | | |
| | | private Integer promotionDriverId; |
| | | |
| | | private BigDecimal promotionMoney; |
| | | |
| | | public BigDecimal getPromotionMoney() { |
| | | return promotionMoney; |
| | | } |
| | | |
| | | public void setPromotionMoney(BigDecimal promotionMoney) { |
| | | this.promotionMoney = promotionMoney; |
| | | } |
| | | |
| | | public Integer getPromotionDriverId() { |
| | | return promotionDriverId; |
| | | } |
| | | |
| | | public void setPromotionDriverId(Integer promotionDriverId) { |
| | | this.promotionDriverId = promotionDriverId; |
| | | } |
| | | |
| | | public Integer getAbnormalStatus() { |
| | | return abnormalStatus; |
| | | } |
| | |
| | | */ |
| | | private String certificationImg; |
| | | |
| | | private Integer bindDriverId; |
| | | |
| | | private Date bindDate; |
| | | |
| | | private Date bindExpireDate; |
| | | |
| | | public Date getBindDate() { |
| | | return bindDate; |
| | | } |
| | | |
| | | public void setBindDate(Date bindDate) { |
| | | this.bindDate = bindDate; |
| | | } |
| | | |
| | | public Date getBindExpireDate() { |
| | | return bindExpireDate; |
| | | } |
| | | |
| | | public void setBindExpireDate(Date bindExpireDate) { |
| | | this.bindExpireDate = bindExpireDate; |
| | | } |
| | | |
| | | public Integer getBindDriverId() { |
| | | return bindDriverId; |
| | | } |
| | | |
| | | public void setBindDriverId(Integer bindDriverId) { |
| | | this.bindDriverId = bindDriverId; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | |
| | | |
| | | List<Map<String,Object>> getSurcharge(Object id,Integer orderType); |
| | | |
| | | List<Map<String, Object>> promotionInfo(Page<Map<String, Object>> page, String beginTime, String endTime, String orderNum, String userName, String name, String driverName, Integer roleType, Integer objectId); |
| | | |
| | | |
| | | List<Map<String, Object>> promotionInfoExport(Object o, String beginTime, String endTime, String orderNum, String userName, String name, String driverName, Integer roleType, Integer objectId); |
| | | } |
| | |
| | | public List<Map<String, Object>> getSurcharge(Object id, Integer orderType) { |
| | | return this.baseMapper.getSurcharge(id,orderType); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> promotionInfo(Page<Map<String, Object>> page, String beginTime, String endTime, String orderNum, String userName, String name, String driverName, Integer roleType, Integer objectId) { |
| | | return this.baseMapper.promotionInfo(page, beginTime, endTime, orderNum, userName, name, driverName, roleType, objectId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> promotionInfoExport(Object o, String beginTime, String endTime, String orderNum, String userName, String name, String driverName, Integer roleType, Integer objectId) { |
| | | return this.baseMapper.promotionInfoExport(beginTime, endTime, orderNum, userName, name, driverName, roleType, objectId); |
| | | } |
| | | } |
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"> |
| | | <input type="hidden" id="driverId" value="${driverId}"/> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="用户姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="重置" icon="" clickFun="TDriverPromotionActivity.research()"/> |
| | | <#button name="搜索" icon="" clickFun="TDriverPromotionActivity.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TDriverPromotionActivityTableToolbar" role="group"> |
| | | <#button name="导出Excel" icon="" clickFun="TDriverPromotionActivity.exportExcel()" space="true"/> |
| | | </div> |
| | | <#table id="TDriverPromotionActivityTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriverPromotionActivity/tDriverPromotionActivity2.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>处理异常订单</title> |
| | | <style> |
| | | body { |
| | | background: #888; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .container { |
| | | background: #fff; |
| | | margin: 20px auto; |
| | | padding: 20px 30px; |
| | | border-radius: 10px; |
| | | max-width: 98vw; |
| | | min-width: 1200px; |
| | | } |
| | | |
| | | .title { |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .order-table { |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | margin-bottom: 30px; |
| | | } |
| | | |
| | | .order-table th, |
| | | .order-table td { |
| | | border: 1px solid #e0e0e0; |
| | | padding: 8px 6px; |
| | | text-align: center; |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .order-table th { |
| | | background: #f8f8f8; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .section-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | margin: 30px 0 10px 0; |
| | | } |
| | | |
| | | .desc-row { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .desc-label { |
| | | font-weight: bold; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .img-list { |
| | | display: flex; |
| | | gap: 20px; |
| | | margin: 10px 0 20px 0; |
| | | } |
| | | |
| | | .img-list img { |
| | | width: 120px; |
| | | height: 80px; |
| | | object-fit: cover; |
| | | border-radius: 6px; |
| | | border: 1px solid #ccc; |
| | | } |
| | | |
| | | .order-link { |
| | | color: #1976d2; |
| | | text-decoration: underline; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | input[type="radio"] { |
| | | accent-color: #1976d2; |
| | | width: 18px; |
| | | height: 18px; |
| | | vertical-align: middle; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .radio-group label { |
| | | margin-right: 18px; |
| | | font-size: 15px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | #duty-selector { |
| | | display: flex; |
| | | margin-bottom: 18px; |
| | | border: 1px solid #ccc; |
| | | border-radius: 4px; |
| | | overflow: hidden; |
| | | width: fit-content; |
| | | } |
| | | |
| | | |
| | | .duty-btn { |
| | | flex: 1 1 0; |
| | | padding: 12px 32px; |
| | | border: none; |
| | | background: #fff; |
| | | color: #222; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | outline: none; |
| | | border-right: 1px solid #ccc; |
| | | transition: background 0.2s, color 0.2s; |
| | | height: 62px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .duty-btn:last-child { |
| | | border-right: none; |
| | | } |
| | | |
| | | .duty-btn.active { |
| | | background: #1976d2; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .action-btn { |
| | | min-width: 140px; |
| | | height: 48px; |
| | | background: #1976d2; |
| | | color: #fff; |
| | | border: none; |
| | | border-radius: 5px; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | margin-right: 18px; |
| | | cursor: pointer; |
| | | transition: background 0.2s, box-shadow 0.2s; |
| | | box-shadow: 0 2px 6px rgba(25, 118, 210, 0.08); |
| | | } |
| | | |
| | | .action-btn:last-child { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .action-btn:hover { |
| | | background: #1565c0; |
| | | } |
| | | |
| | | #action-btns { |
| | | margin-top: 32px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | </style> |
| | | </head> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <input type="hidden" id="id" value="${item.id!}"/> |
| | | |
| | | <div id="duty-selector"> |
| | | <button type="button" class="duty-btn active" data-type="platformAll">活动基础信息</button> |
| | | <button type="button" class="duty-btn" data-type="driverAll">推广情况</button> |
| | | </div> |
| | | <div id="s1"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <#input id="activityTitle" name="推广活动标题" value="${item.activityTitle}"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="margin-left: -24px"> |
| | | <label class="col-sm-1 control-label">关联业务:</label> |
| | | <div class="col-sm-3"> |
| | | <label class="checkbox-inline"> |
| | | <input type="checkbox" name="bizType" value="1"> 专车 |
| | | </label> |
| | | <label class="checkbox-inline"> |
| | | <input type="checkbox" name="bizType" value="2"> 出租车 |
| | | </label> |
| | | <label class="checkbox-inline"> |
| | | <input type="checkbox" name="bizType" value="3"> 城际 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="margin-top: 10px"> |
| | | <label class="col-sm-1 control-label">活动区域:</label> |
| | | <div class="col-sm-2"> |
| | | <select class="form-control" id="province" onchange="provinceChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in provinceList){ |
| | | <option value="${obj.code}" ${obj.code== item.provinceCode ? |
| | | 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <select class="form-control" id="city" onchange="cityChage(this)"> |
| | | <option value="">选择市</option> |
| | | @for(obj in cityList){ |
| | | <option value="${obj.code}" ${obj.code== item.cityCode ? |
| | | 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <select class="form-control" id="area"> |
| | | <option value="">选择区</option> |
| | | @for(obj in areaList){ |
| | | <option value="${obj.code}" ${obj.code== item.districtCode ? |
| | | 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="margin-top: 10px"> |
| | | <div class="col-sm-3"> |
| | | <#input id="time" name="活动时间" isTime="false"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#input id="commissionRatio" name="抽佣比例" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="col-sm-3"> |
| | | <#input id="bindingDays" name="绑定有效期" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="col-sm-3"> |
| | | <label style="font-weight:700">推广活动说明:</label> |
| | | |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <div class="panel-body"> |
| | | <textarea id="editor_1" type="text/plain" |
| | | style="width:1200px;height:400px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div id="s2"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="driverName" name="司机姓名" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TDriverPromotionActivity.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriverPromotionActivity.resetSearch()" |
| | | space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderPrivateCarTableToolbar" role="group"> |
| | | <#button name="导出Excel" icon="" clickFun="TDriverPromotionActivity.exportExcel()" space="true"/> |
| | | </div> |
| | | <#table id="TDriverPromotionActivityTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriverPromotionActivity/tDriverPromotionActivity1.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriverPromotionActivity/tDriverPromotionActivity_info.js"></script> |
| | | <script> |
| | | |
| | | |
| | | // 在现有的 script 标签内添加以下代码 |
| | | $(document).ready(function () { |
| | | // 处理 duty-selector 按钮点击事件 |
| | | $('#duty-selector .duty-btn').on('click', function () { |
| | | // 移除所有按钮的 active 类 |
| | | $('#duty-selector .duty-btn').removeClass('active'); |
| | | // 为当前点击的按钮添加 active 类 |
| | | $(this).addClass('active'); |
| | | |
| | | // 可以根据 data-type 值执行不同的操作 |
| | | var selectedType = $(this).data('type'); |
| | | if (selectedType === 'platformAll') { |
| | | // 处理活动基础信息选中逻辑 |
| | | console.log('活动基础信息被选中'); |
| | | $("#s1").show(); |
| | | $("#s2").hide(); |
| | | } else if (selectedType === 'driverAll') { |
| | | // 处理推广情况选中逻辑 |
| | | console.log('推广情况被选中'); |
| | | $("#s1").hide(); |
| | | $("#s2").show(); |
| | | } |
| | | }); |
| | | }); |
| | | $(function () { |
| | | $("#s1").show(); |
| | | $("#s2").hide(); |
| | | |
| | | // 初始化编辑器 |
| | | editor_1 = UE.getEditor('editor_1'); |
| | | |
| | | // 初始化活动时间 |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range: true |
| | | }); |
| | | |
| | | // 回显关联业务 |
| | | var bizTypeStr = "${item.bizType!}"; // 获取业务类型字符串 |
| | | if (bizTypeStr) { |
| | | var bizTypes = bizTypeStr.split(','); |
| | | $('input[name="bizType"]').each(function () { |
| | | if (bizTypes.indexOf($(this).val()) !== -1) { |
| | | $(this).prop('checked', true); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 回显活动时间 |
| | | $("#time").val("${time!}"); |
| | | |
| | | // 回显抽佣比例和绑定有效期 |
| | | $("#commissionRatio").val("${item.commissionRatio!}"); |
| | | $("#bindingDays").val("${item.bindingDays!}"); |
| | | |
| | | // 回显活动说明 |
| | | setTimeout(function () { |
| | | editor_1.ready(function () { |
| | | editor_1.setContent('${item.activityDesc!}'); |
| | | }); |
| | | }, 100); |
| | | }); |
| | | |
| | | |
| | | function provinceChange(e) { |
| | | var provinceCode = $(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function (data) { |
| | | if (data != null) { |
| | | var content = '<option value="">选择市</option>'; |
| | | $.each(data, function (k, v) { |
| | | content += "<option value='" + v.code + "'>" + v.name + "</option>"; |
| | | }); |
| | | $("#city").empty().append(content); |
| | | $("#area").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("code", provinceCode); |
| | | ajax.start(); |
| | | } |
| | | |
| | | function cityChage(e) { |
| | | var cityCode = $(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function (data) { |
| | | if (data != null) { |
| | | var content = '<option value="">选择区</option>'; |
| | | $.each(data, function (k, v) { |
| | | content += "<option value='" + v.code + "'>" + v.name + "</option>"; |
| | | }); |
| | | $("#area").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("code", cityCode); |
| | | ajax.start(); |
| | | } |
| | | </script> |
| | | @} |
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="name" name="活动名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="driverName" name="司机名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userName" name="用户名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="orderNum" name="订单编号" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="stat-card" style=" border: none; padding: 20px; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);"> |
| | | <div class="stat-content"> |
| | | <div class="stat-number" style="font-size: 28px; font-weight: bold; margin-bottom: 5px;" id="money"> |
| | | ${money} |
| | | </div> |
| | | <div class="stat-label" style="font-size: 14px; opacity: 0.9;"> |
| | | 合计推广收益金额 |
| | | </div> |
| | | </div> |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="stat-card" style=" border: none; padding: 20px; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);"> |
| | | <div class="stat-content"> |
| | | <div class="stat-number" style="font-size: 28px; font-weight: bold; margin-bottom: 5px;" id="size"> |
| | | ${size} |
| | | </div> |
| | | <div class="stat-label" style="font-size: 14px; opacity: 0.9;"> |
| | | 合计推广收益笔数 |
| | | </div> |
| | | </div> |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="hidden-xs" id="TOrderPrivateCarTableToolbar" role="group"> |
| | | <#button name="导出Excel" icon="" clickFun="TAbnormalOrder.exportExcel()" space="true"/> |
| | | </div> |
| | | <#table id="TOrderPrivateCarTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tPromotionOrderCar/tPromotionOrder.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | |
| | | function search() { |
| | | |
| | | let insertTime = $('#insertTime').val(); |
| | | let name = $('#name').val(); |
| | | let driverName = $('#driverName').val(); |
| | | let userName = $('#userName').val(); |
| | | let orderNum = $('#orderNum').val(); |
| | | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/promotionInfo/list1", function(data){ |
| | | console.log(data) |
| | | $("#money").text(data.money) |
| | | $("#size").text(data.size) |
| | | },function(data){ |
| | | }); |
| | | ajax.set("insertTime",insertTime); |
| | | ajax.set("name",name); |
| | | ajax.set("driverName",driverName); |
| | | ajax.set("userName",userName); |
| | | ajax.set("orderNum",orderNum); |
| | | ajax.start(); |
| | | TAbnormalOrder.search() |
| | | } |
| | | |
| | | |
| | | function resetSearch() { |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/promotionInfo/list1", function(data){ |
| | | console.log(data) |
| | | $("#money").text(data.money) |
| | | $("#size").text(data.size) |
| | | },function(data){ |
| | | }); |
| | | ajax.start(); |
| | | TAbnormalOrder.resetSearch() |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div> |
| | | <div style="float: left;"> |
| | | <label class="lab checked" onclick="checkedLable(this)" tag="pushOrderSettings">推单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="driverPayDays">司机分账账期设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="driverPayDays">司机分账账期设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="cancelOrderSettings">取消订单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="cancelTheReservationOrderSetting">预约单取消设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="spellOrderSetting">拼单派单设置</label> |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TDriverPromotionActivity = { |
| | | id: "TDriverPromotionActivityTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TDriverPromotionActivity.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '推广排名', field: 'sort', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | // 使用序号作为排名,index从0开始,所以需要+1 |
| | | return index + 1; |
| | | } |
| | | }, |
| | | {title: '司机Id', field: 'driverId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '司机姓名', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '推广用户数量', field: 'userNum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '推广收益合计', field: 'money', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | { |
| | | title: '操作', field: 'opt', visible: true, align: 'left', valign: 'middle', width: "10%", |
| | | formatter: function (value, row) { |
| | | var btn = []; |
| | | btn += '<a href="javascript:void(0);" onclick="TDriverPromotionActivity.viewUser(' + row.driverId + ')" style="color: #0e9aef">查看下级用户</a> '; |
| | | btn += '<a href="javascript:void(0);" onclick="TDriverPromotionActivity.info(' + row.id + ')" style="color: #0e9aef">查看收益明细</a> '; |
| | | return btn; |
| | | } |
| | | |
| | | } |
| | | |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TDriverPromotionActivity.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | TDriverPromotionActivity.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TDriverPromotionActivity.openAddTDriverPromotionActivity = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TDriverPromotionActivity.viewUser = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '司机推广下级用户', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_viewUser/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TDriverPromotionActivity.update = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_update/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | TDriverPromotionActivity.info = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_info/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TDriverPromotionActivity.delete = function (e) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverPromotionActivity/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TDriverPromotionActivity.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tDriverPromotionActivityId", e); |
| | | ajax.start(); |
| | | }; |
| | | TDriverPromotionActivity.stop = function (e) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverPromotionActivity/stop", function (data) { |
| | | Feng.success("暂停成功!"); |
| | | TDriverPromotionActivity.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("暂停失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", e); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TDriverPromotionActivity.start = function (e) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverPromotionActivity/start", function (data) { |
| | | Feng.success("暂停成功!"); |
| | | TDriverPromotionActivity.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("暂停失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", e); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | TDriverPromotionActivity.startOrStop = function () { |
| | | if (this.check()) { |
| | | if (TDriverPromotionActivity.seItem.status == 1) { |
| | | TDriverPromotionActivity.stop(TDriverPromotionActivity.seItem.id); |
| | | } else { |
| | | TDriverPromotionActivity.start(TDriverPromotionActivity.seItem.id); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TDriverPromotionActivity.search = function () { |
| | | var queryData = {}; |
| | | queryData['driverName'] = $("#driverName").val(); |
| | | queryData['id'] = $("#id").val(); |
| | | TDriverPromotionActivity.table.refresh({query: queryData}); |
| | | }; |
| | | TDriverPromotionActivity.resetSearch = function () { |
| | | $("#driverName").val(''); |
| | | TDriverPromotionActivity.search() |
| | | }; |
| | | TDriverPromotionActivity.exportExcel = function () { |
| | | let p = ""; |
| | | let id = $('#id').val(); |
| | | let driverName = $('#driverName').val(); |
| | | if(null != id && '' != id){ |
| | | p += "id=" + id + "&"; |
| | | } |
| | | if(null != driverName && '' != driverName){ |
| | | p += "driverName=" + driverName + "&"; |
| | | } |
| | | if('' != p){ |
| | | p = "?" + p.substring(0, p.length - 1); |
| | | } |
| | | console.log('p['+p+']') |
| | | window.location.href = Feng.ctxPath + '/tDriverPromotionActivity/export' + p; |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TDriverPromotionActivity.initColumn(); |
| | | var table = new BSTable(TDriverPromotionActivity.id, "/tDriverPromotionActivity/list1", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TDriverPromotionActivity.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TDriverPromotionActivity = { |
| | | id: "TDriverPromotionActivityTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TDriverPromotionActivity.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'sort', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | // 使用序号作为排名,index从0开始,所以需要+1 |
| | | return index + 1; |
| | | } |
| | | }, |
| | | {title: '用户Id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户手机号', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '绑定时间', field: 'bindDate', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '有效期至', field: 'bindExpireDate', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '产生收益合计', field: 'money', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TDriverPromotionActivity.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | TDriverPromotionActivity.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TDriverPromotionActivity.openAddTDriverPromotionActivity = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TDriverPromotionActivity.viewUser = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '司机推广下级用户', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_viewUser/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TDriverPromotionActivity.update = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_update/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | TDriverPromotionActivity.info = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverPromotionActivity/tDriverPromotionActivity_info/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TDriverPromotionActivity.delete = function (e) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverPromotionActivity/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TDriverPromotionActivity.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tDriverPromotionActivityId", e); |
| | | ajax.start(); |
| | | }; |
| | | TDriverPromotionActivity.stop = function (e) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverPromotionActivity/stop", function (data) { |
| | | Feng.success("暂停成功!"); |
| | | TDriverPromotionActivity.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("暂停失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", e); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TDriverPromotionActivity.start = function (e) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverPromotionActivity/start", function (data) { |
| | | Feng.success("暂停成功!"); |
| | | TDriverPromotionActivity.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("暂停失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", e); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | TDriverPromotionActivity.startOrStop = function () { |
| | | if (this.check()) { |
| | | if (TDriverPromotionActivity.seItem.status == 1) { |
| | | TDriverPromotionActivity.stop(TDriverPromotionActivity.seItem.id); |
| | | } else { |
| | | TDriverPromotionActivity.start(TDriverPromotionActivity.seItem.id); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TDriverPromotionActivity.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['driverId'] = $("#driverId").val(); |
| | | TDriverPromotionActivity.table.refresh({query: queryData}); |
| | | }; |
| | | TDriverPromotionActivity.research = function () { |
| | | $("#name").val(''); |
| | | TDriverPromotionActivity.search() |
| | | }; |
| | | TDriverPromotionActivity.exportExcel = function () { |
| | | let p = ""; |
| | | let name = $('#name').val(); |
| | | let driverId = $('#driverId').val(); |
| | | if(null != name && '' != name){ |
| | | p += "name=" + name + "&"; |
| | | } |
| | | if(null != driverId && '' != driverId){ |
| | | p += "driverId=" + driverId + "&"; |
| | | } |
| | | if('' != p){ |
| | | p = "?" + p.substring(0, p.length - 1); |
| | | } |
| | | console.log('p['+p+']') |
| | | window.location.href = Feng.ctxPath + '/tDriverPromotionActivity/export1' + p; |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TDriverPromotionActivity.initColumn(); |
| | | var table = new BSTable(TDriverPromotionActivity.id, "/tDriverPromotionActivity/list2", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TDriverPromotionActivity.table = table.init(); |
| | | TDriverPromotionActivity.search() |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化快车订单详情对话框 |
| | | */ |
| | | var TOrderPrivateCarInfoDlg = { |
| | | tOrderPrivateCarInfoData: {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.clearData = function () { |
| | | this.tOrderPrivateCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.set = function (key, val) { |
| | | this.tOrderPrivateCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.get = function (key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.close = function () { |
| | | parent.layer.close(window.parent.TOrderPrivateCar.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.collectData = function () { |
| | | this |
| | | .set('id') |
| | | .set('type') |
| | | .set('userId') |
| | | .set('driverId') |
| | | .set('carId') |
| | | .set('orderNum') |
| | | .set('placementLon') |
| | | .set('placementLat') |
| | | .set('placementAddress') |
| | | .set('startLon') |
| | | .set('startLat') |
| | | .set('endLon') |
| | | .set('startAddress') |
| | | .set('endLat') |
| | | .set('endAddress') |
| | | .set('boardingLon') |
| | | .set('boardingLat') |
| | | .set('boardingAddress') |
| | | .set('boardingTime') |
| | | .set('getoffLon') |
| | | .set('getoffLat') |
| | | .set('getoffAddress') |
| | | .set('getoffTime') |
| | | .set('mileage') |
| | | .set('payManner') |
| | | .set('payType') |
| | | .set('orderMoney') |
| | | .set('startMoney') |
| | | .set('mileageMoney') |
| | | .set('durationMoney') |
| | | .set('longDistanceMoney') |
| | | .set('parkMoney') |
| | | .set('roadTollMoney') |
| | | .set('redPacketMoney') |
| | | .set('couponMoney') |
| | | .set('redPacketId') |
| | | .set('couponId') |
| | | .set('discount') |
| | | .set('discountMoney') |
| | | .set('activityId') |
| | | .set('companyId') |
| | | .set('payMoney') |
| | | .set('substitute') |
| | | .set('passengers') |
| | | .set('passengersPhone') |
| | | .set('state') |
| | | .set('insertTime') |
| | | .set('travelTime') |
| | | .set('snatchOrderTime') |
| | | .set('setOutTime') |
| | | .set('arriveTime') |
| | | .set('startServiceTime') |
| | | .set('endServiceTime') |
| | | .set('orderType') |
| | | .set('orderSource') |
| | | .set('invoiceId') |
| | | .set('isReassign') |
| | | .set('reassignNotice') |
| | | .set('trackId') |
| | | .set('isDelete') |
| | | .set('oldState') |
| | | .set('telX') |
| | | .set('bindId') |
| | | .set('serverCarModelId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.addSubmit = function () { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | if ($("#startAddress").val() === ""){ |
| | | Feng.error("请输入起点"); |
| | | return false; |
| | | } |
| | | if ($("#endAddress").val() === ""){ |
| | | Feng.error("请输入终点"); |
| | | return false; |
| | | } |
| | | if ($("#travelTime").val() === ""){ |
| | | Feng.error("请选择用车时间"); |
| | | return false; |
| | | } |
| | | if ($("#passengers").val() === ""){ |
| | | Feng.error("请输入乘车人姓名"); |
| | | return false; |
| | | } |
| | | if ($("#passengersPhone").val() === ""){ |
| | | Feng.error("请输入乘车人手机号"); |
| | | return false; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/add", function (data) { |
| | | Feng.success("添加成功!"); |
| | | window.parent.TOrderPrivateCar.table.refresh(); |
| | | TOrderPrivateCarInfoDlg.close(); |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderPrivateCarInfoData); |
| | | ajax.start(); |
| | | } |
| | | TOrderPrivateCarInfoDlg.save = function (){ |
| | | |
| | | const selectedBtn = document.querySelector('.duty-btn.active'); |
| | | const responsibilityTypeVal = reverseTypeMap[selectedBtn.dataset.type]; |
| | | const remark = document.querySelector('textarea[name=handleRemark]').value; |
| | | // 取money |
| | | const money = document.querySelector('input[name=money]').value; |
| | | const type = document.querySelector('input[name=type]').value; |
| | | const orderNum = document.querySelector('input[name=orderNum]').value; |
| | | |
| | | console.log(type,orderNum) |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/abnormal/save", function(data){ |
| | | Feng.success("操作成功!"); |
| | | },function(data){ |
| | | Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("responsibilityTypeVal",responsibilityTypeVal); |
| | | ajax.set("remark",remark); |
| | | ajax.set("money",money); |
| | | ajax.set("type",type); |
| | | ajax.set("orderNum",orderNum); |
| | | ajax.start(); |
| | | |
| | | } |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.editSubmit = function () { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/update", function (data) { |
| | | Feng.success("修改成功!"); |
| | | window.parent.TOrderPrivateCar.table.refresh(); |
| | | TOrderPrivateCarInfoDlg.close(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderPrivateCarInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | var map = new AMap.Map("container", { |
| | | resizeEnable: true, |
| | | zoom: 14 |
| | | }); |
| | | $(function () { |
| | | var type = $("#type").val(); |
| | | if (type != 2) { |
| | | getTrajectory(); |
| | | } |
| | | }); |
| | | |
| | | function getTrajectory() { |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/tOrderPrivateCar/getOrderTrack', |
| | | type: 'POST', |
| | | data: { |
| | | orderDetailId: $("#id").val() |
| | | }, |
| | | success: function (res) { |
| | | if (res.status == 200) { |
| | | var data = res.data; |
| | | if (data.length > 0) { |
| | | orderTrack(data); |
| | | } |
| | | /*else{ |
| | | Feng.error("当前订单没有轨迹"); |
| | | }*/ |
| | | } else { |
| | | Feng.error(res.msg); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | var marker, lineArr = []; |
| | | |
| | | function orderTrack(data) { |
| | | for (var i in data) { |
| | | var waypoints = []; |
| | | var lon = parseFloat(data[i].lon); |
| | | var lat = parseFloat(data[i].lat); |
| | | waypoints.push(lon); |
| | | waypoints.push(lat); |
| | | lineArr.push(waypoints); |
| | | } |
| | | |
| | | marker = new AMap.Marker({ |
| | | map: map, |
| | | position: lineArr[0], |
| | | icon: "https://webapi.amap.com/images/car.png", |
| | | offset: new AMap.Pixel(-26, -13), |
| | | autoRotation: true, |
| | | angle: -90, |
| | | }); |
| | | |
| | | // 绘制轨迹 |
| | | var polyline = new AMap.Polyline({ |
| | | map: map, |
| | | path: lineArr, |
| | | showDir: true, |
| | | strokeColor: "#28F", //线颜色 |
| | | // strokeOpacity: 1, //线透明度 |
| | | strokeWeight: 6, //线宽 |
| | | // strokeStyle: "solid" //线样式 |
| | | }); |
| | | |
| | | var passedPolyline = new AMap.Polyline({ |
| | | map: map, |
| | | // path: lineArr, |
| | | strokeColor: "#AF5", //线颜色 |
| | | // strokeOpacity: 1, //线透明度 |
| | | strokeWeight: 6, //线宽 |
| | | // strokeStyle: "solid" //线样式 |
| | | }); |
| | | |
| | | |
| | | marker.on('moving', function (e) { |
| | | passedPolyline.setPath(e.passedPath); |
| | | }); |
| | | |
| | | map.setFitView(); |
| | | } |
| | | |
| | | |
| | | function startAnimation() { |
| | | marker.moveAlong(lineArr, 200); |
| | | } |
| | | |
| | | function pauseAnimation() { |
| | | marker.pauseMove(); |
| | | } |
| | | |
| | | function resumeAnimation() { |
| | | marker.resumeMove(); |
| | | } |
| | | |
| | | function stopAnimation() { |
| | | marker.stopMove(); |
| | | } |
| | | |
| | | /** |
| | | * 选择起点 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.startAddress = function () { |
| | | $("#startAddressModel").show(); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 选择终点 |
| | | */ |
| | | TOrderPrivateCarInfoDlg.endAddress = function () { |
| | | $("#endAddressModel").show(); |
| | | }; |
New file |
| | |
| | | /** |
| | | * 快车订单管理初始化 |
| | | */ |
| | | var TAbnormalOrder = { |
| | | id: "TOrderPrivateCarTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TAbnormalOrder.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '活动名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '司机名称', field: 'driverName', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '下级用户', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '订单编号', field: 'orderNum', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '订单金额', field: 'money', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '司机推广收益', field: 'promotionMoney', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '收益时间', field: 'successTime', visible: true, align: 'center', valign: 'middle', |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TAbnormalOrder.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TAbnormalOrder.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 添加快车订单 |
| | | */ |
| | | TAbnormalOrder.addOrder =function(){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加快车订单', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_addOrder' |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看快车订单详情 |
| | | */ |
| | | TAbnormalOrder.orderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '异常订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/abnormal/tOrderPrivateCar_orderDetail?tOrderPrivateCarId=' + TAbnormalOrder.seItem.id+'&type='+$("#type").val() |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TAbnormalOrder.orderDetail1 = function () { |
| | | if (this.check()) { |
| | | let abnormalStatus = TAbnormalOrder.seItem.abnormalStatus |
| | | if(abnormalStatus==2){ |
| | | Feng.info("此异常订单已处理") |
| | | return; |
| | | } |
| | | console.log(abnormalStatus) |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '异常订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/abnormal/tOrderPrivateCar_orderDetail1?tOrderPrivateCarId=' + TAbnormalOrder.seItem.id+'&type='+$("#type").val() |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 订单轨迹 |
| | | */ |
| | | TAbnormalOrder.trajectory = function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '快车订单轨迹', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_trajectory/' + TAbnormalOrder.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除快车订单 |
| | | */ |
| | | TAbnormalOrder.deleteOrder = function () { |
| | | if (this.check()) { |
| | | var orderNum = TAbnormalOrder.seItem.orderNum; |
| | | if (orderNum == "" || orderNum == null || orderNum == undefined) { |
| | | orderNum = "该订单"; |
| | | } else { |
| | | orderNum = "【" + orderNum + "】"; |
| | | } |
| | | if (TAbnormalOrder.seItem.state != 10) { |
| | | swal("删除失败", "【已取消】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除" + orderNum + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/delete", function (data) { |
| | | swal("删除成功", "您已经删除了" + orderNum + "。", "success"); |
| | | TAbnormalOrder.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tOrderPrivateCarId", TAbnormalOrder.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询快车订单列表 |
| | | */ |
| | | TAbnormalOrder.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['driverName'] = $("#driverName").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['orderNum'] = $("#orderNum").val(); |
| | | TAbnormalOrder.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TAbnormalOrder.exportExcel=function (){ |
| | | let p = ""; |
| | | let insertTime = $('#insertTime').val(); |
| | | let name = $('#name').val(); |
| | | let driverName = $('#driverName').val(); |
| | | let userName = $('#userName').val(); |
| | | let orderNum = $('#orderNum').val(); |
| | | if(null != insertTime && '' != insertTime){ |
| | | p += "insertTime=" + insertTime + "&"; |
| | | } |
| | | if(null != name && '' != name){ |
| | | p += "name=" + name + "&"; |
| | | } |
| | | if(null != driverName && '' != driverName){ |
| | | p += "driverName=" + driverName + "&"; |
| | | } |
| | | if(null != userName && '' != userName){ |
| | | p += "userName=" + userName + "&" ; |
| | | } |
| | | if(null != orderNum && '' != orderNum){ |
| | | p += "orderNum=" + orderNum + "&" ; |
| | | } |
| | | if('' != p){ |
| | | p = "?" + p.substring(0, p.length - 1); |
| | | } |
| | | console.log('p['+p+']') |
| | | window.location.href = Feng.ctxPath + '/promotionInfo/export' + p; |
| | | } |
| | | |
| | | |
| | | |
| | | TAbnormalOrder.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#driverName").val(""); |
| | | $("#userName").val(""); |
| | | $("#orderNum").val(""); |
| | | TAbnormalOrder.search(); |
| | | }; |
| | | |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAbnormalOrder.initColumn(); |
| | | var table = new BSTable(TAbnormalOrder.id, "/promotionInfo/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TAbnormalOrder.table = table.init(); |
| | | }); |
| | |
| | | Date endTime = DateUtils.addDays(new Date(), bindingDays); |
| | | userInfo.setBindDriverId(driverId); |
| | | userInfo.setBindExpireDate(endTime); |
| | | userInfo.setBindDate(new Date()); |
| | | userInfoService.updateById(userInfo); |
| | | } |
| | | |
| | |
| | | CONCAT(j.startTime, '-', j.endTime) as lineShiftTime, |
| | | a.holidayFee, |
| | | a.discountAmount as taxiCardMoney, |
| | | a.responsibilityType, |
| | | a.abnormalStatus, |
| | | a.abnormalRemark, |
| | | a.abnormalIntro, |
| | | a.abnormalImg, |
| | | a.companyId |
| | | a.responsibilityType as responsibilityType, |
| | | a.abnormalStatus as abnormalStatus, |
| | | a.abnormalRemark as abnormalRemark, |
| | | a.abnormalIntro as abnormalIntro, |
| | | a.abnormalImg as abnormalImg, |
| | | a.companyId as companyId |
| | | from t_order_cross_city a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | left join t_car c on (a.carId = c.id) |
| | |
| | | |
| | | private Integer responsibilityType; |
| | | |
| | | private Long promotionActivityId; |
| | | |
| | | public Long getPromotionActivityId() { |
| | | return promotionActivityId; |
| | | } |
| | | |
| | | public void setPromotionActivityId(Long promotionActivityId) { |
| | | this.promotionActivityId = promotionActivityId; |
| | | } |
| | | |
| | | public Integer getResponsibilityType() { |
| | | return responsibilityType; |
| | | } |
| | |
| | | BigDecimal bigDecimal = tDriverPromotionActivity.getCommissionRatio().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(payMoney)).setScale(2, RoundingMode.HALF_UP); |
| | | orderCrossCity.setPromotionDriverId(userInfo.getBindDriverId()); |
| | | orderCrossCity.setPromotionMoney(bigDecimal); |
| | | orderCrossCity.setPromotionActivityId(tDriverPromotionActivity.getId()); |
| | | this.baseMapper.updateById(orderCrossCity); |
| | | } |
| | | } |
| | |
| | | |
| | | private Integer responsibilityType; |
| | | |
| | | private Long promotionActivityId; |
| | | |
| | | public Long getPromotionActivityId() { |
| | | return promotionActivityId; |
| | | } |
| | | |
| | | public void setPromotionActivityId(Long promotionActivityId) { |
| | | this.promotionActivityId = promotionActivityId; |
| | | } |
| | | |
| | | public String getPromotionUser() { |
| | | return promotionUser; |
| | | } |
| | |
| | | UserInfo userInfo = userInfoService.selectById(userId); |
| | | if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ |
| | | String registAreaCode = userInfo.getRegistAreaCode(); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).eq("state",1).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | return userInfo.getBindDriverId(); |
| | | } |
| | |
| | | BigDecimal bigDecimal = tDriverPromotionActivity.getCommissionRatio().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(payMoney)).setScale(2, RoundingMode.HALF_UP); |
| | | orderPrivateCar.setPromotionDriverId(userInfo.getBindDriverId()); |
| | | orderPrivateCar.setPromotionMoney(bigDecimal); |
| | | orderPrivateCar.setPromotionActivityId(tDriverPromotionActivity.getId()); |
| | | this.baseMapper.updateById(orderPrivateCar); |
| | | } |
| | | } |
| | |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | private Integer state; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | |
| | | private Date bindExpireDate; |
| | | |
| | | |
| | | private Date bindDate; |
| | | |
| | | public Date getBindDate() { |
| | | return bindDate; |
| | | } |
| | | |
| | | public void setBindDate(Date bindDate) { |
| | | this.bindDate = bindDate; |
| | | } |
| | | |
| | | public Integer getBindDriverId() { |
| | | return bindDriverId; |
| | | } |
| | |
| | | |
| | | private Integer responsibilityType; |
| | | |
| | | private Long promotionActivityId; |
| | | |
| | | public Long getPromotionActivityId() { |
| | | return promotionActivityId; |
| | | } |
| | | |
| | | public void setPromotionActivityId(Long promotionActivityId) { |
| | | this.promotionActivityId = promotionActivityId; |
| | | } |
| | | |
| | | |
| | | public Integer getResponsibilityType() { |
| | | return responsibilityType; |
| | | } |
| | |
| | | BigDecimal bigDecimal = tDriverPromotionActivity.getCommissionRatio().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(payMoney)).setScale(2, RoundingMode.HALF_UP); |
| | | orderTaxi.setPromotionDriverId(userInfo.getBindDriverId()); |
| | | orderTaxi.setPromotionMoney(bigDecimal); |
| | | orderTaxi.setPromotionActivityId(tDriverPromotionActivity.getId()); |
| | | this.baseMapper.updateById(orderTaxi); |
| | | } |
| | | } |