| | |
| | | } |
| | | |
| | | EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | 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){ |
| | |
| | | break; |
| | | } |
| | | } |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | List<Income> incomes = new ArrayList<>(); |
| | | List<SettlementDetail> settlementDetails = new ArrayList<>(); |
| | | if (time == 5 && !StringUtils.hasLength(insertTime)){ |
| | |
| | | } |
| | | |
| | | EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>(); |
| | | settlementDetailEntityWrapper.between("createTime", start, end); |
| | | // 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){ |
| | | settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList())); |
| | | settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList())) |
| | | .or().isNull("settlementRecordId"); |
| | | }else{ |
| | | settlementDetailEntityWrapper.eq("settlementRecordId", 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())); |
| | | settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList())) |
| | | .or().isNull("settlementRecordId");; |
| | | }else{ |
| | | settlementDetailEntityWrapper.eq("settlementRecordId", 0); |
| | | } |
| | |
| | | // 已领取司机奖励 |
| | | for (DriverActivityHistory driverActivityHistory : driverActivityHistories) { |
| | | GrantVO grantVO = new GrantVO(); |
| | | grantVO.setInsertTime(format.format(driverActivityHistory.getInsertTime())); |
| | | grantVO.setInsertTime(null == driverActivityHistory.getCompletionTime() ? format.format(driverActivityHistory.getInsertTime()) : format.format(driverActivityHistory.getCompletionTime())); |
| | | grantVO.setType("司机奖励"); |
| | | grantVO.setAmount(driverActivityHistory.getMoney().toString()); |
| | | TDriver tDriver = driverMap.get(driverActivityHistory.getDriverId()); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | 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.page.PageInfoBT; |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * 跳转领取统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/receiveRecord") |
| | |
| | | UserActivityRedenvelope userActivityRedenvelope = userActivityRedenvelopeService.selectOne(new EntityWrapper<UserActivityRedenvelope>().eq("userActivityId",activityId)); |
| | | if(SinataUtil.isNotEmpty(userActivityRegistered)){ |
| | | Map<String,Object> resultMap = userCouponRecordService.getCouponStatic(startTimes,endTimes,userActivityRegistered.getId(),2); |
| | | if (null != resultMap) { |
| | | totalMOney+=Double.parseDouble(resultMap.get("money").toString()); |
| | | map.put("userActivityRegisteredMoney",resultMap.get("money")); |
| | | map.put("userActivityRegisteredNumber",resultMap.get("number")); |
| | |
| | | map.put("userActivityRegisteredNumber",0); |
| | | map.put("userActivityRegisteredUseMoney",0); |
| | | } |
| | | } else { |
| | | map.put("userActivityRegisteredMoney", 0); |
| | | map.put("userActivityRegisteredNumber", 0); |
| | | map.put("userActivityRegisteredUseMoney", 0); |
| | | } |
| | | if(SinataUtil.isNotEmpty(userActivityInvite)){ |
| | | Map<String,Object> resultMap = userCouponRecordService.getCouponStatic(startTimes,endTimes,userActivityInvite.getId(),3); |
| | | if (null != resultMap) { |
| | | totalMOney+=Double.parseDouble(resultMap.get("money").toString()); |
| | | map.put("userActivityInviteMoney",resultMap.get("money")); |
| | | map.put("userActivityInviteNumber",resultMap.get("number")); |
| | | map.put("userActivityInviteUseMoney",resultMap.get("useMoney")); |
| | | } else { |
| | | map.put("userActivityInviteMoney", 0); |
| | | map.put("userActivityInviteNumber", 0); |
| | | map.put("userActivityInviteUseMoney", 0); |
| | | } |
| | | }else{ |
| | | map.put("userActivityInviteMoney",0); |
| | | map.put("userActivityInviteNumber",0); |
| | |
| | | Integer i = Integer.valueOf(string); |
| | | // 小件物流 |
| | | Map<String,Object> resultMap1 = userCouponRecordService.getDiscountStatic1(startTimes,endTimes,userActivityDiscount1.getId()); |
| | | if (null != resultMap1) { |
| | | BigDecimal bigDecimal1 = new BigDecimal(resultMap1.get("money").toString()); |
| | | String string1 = resultMap1.get("number").toString(); |
| | | Integer i1 = Integer.valueOf(string1); |
| | |
| | | map.put("userActivityDiscount1Money",0); |
| | | map.put("userActivityDiscount1Number",0); |
| | | } |
| | | } else { |
| | | map.put("userActivityDiscount1Money", 0); |
| | | map.put("userActivityDiscount1Number", 0); |
| | | } |
| | | if(SinataUtil.isNotEmpty(userActivityRedenvelope)){ |
| | | Map<String,Object> resultMap = userCouponRecordService.getRedStatic(startTimes,endTimes,userActivityRedenvelope.getId()); |
| | | if (null != resultMap) { |
| | | totalMOney+=Double.parseDouble(resultMap.get("money").toString()); |
| | | map.put("userActivityRedenvelopeMoney",resultMap.get("money")); |
| | | map.put("userActivityRedenvelopeNumber",resultMap.get("number")); |
| | | map.put("userActivityRedenvelopeUseMoney",resultMap.get("useMoney")); |
| | | } else { |
| | | map.put("userActivityRedenvelopeMoney", 0); |
| | | map.put("userActivityRedenvelopeNumber", 0); |
| | | map.put("userActivityRedenvelopeUseMoney", 0); |
| | | } |
| | | }else{ |
| | | map.put("userActivityRedenvelopeMoney",0); |
| | | map.put("userActivityRedenvelopeNumber",0); |
| | |
| | | public String index() { |
| | | return PREFIX + "userActivity.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转添加注册送优惠券页面 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("addRegist") |
| | | public String addRegist() { |
| | | return PREFIX + "addRegist.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转红包选择页面 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sysRedPacketRecord") |
| | | public String sysRedPacketRecord() { |
| | | return PREFIX + "sysRedPacketRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到选择优惠券页面 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sysCouponRecord") |
| | |
| | | public String sysCouponRecord1() { |
| | | return PREFIX + "sysCouponRecord1.html"; |
| | | } |
| | | |
| | | @RequestMapping("/sysCouponRecord2") |
| | | public String sysCouponRecord2(Model model,Integer type) { |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "sysCouponRecord2.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | |
| | | LogObjectHolder.me().set(userActivity); |
| | | return PREFIX + "userActivity_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | page.setRecords(userCouponRecordService.getBlanceList(page,beginTime,endTime,activityId)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param name 活动时间 |
| | | * @param startTime 时间区间 |
| | | * @param registCouponId 注册活动-优惠券id |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param name 活动时间 |
| | | * @param startTime 时间区间 |
| | | * @param registCouponId 注册活动-优惠券id |
| | |
| | | redenvelopeId, redenvelopeEnable, registerPrice, invitationPrice, redPrice,discountDistance,discountOrderNum); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | | * @param driverActivity |
| | | * @return |
| | | */ |
| | |
| | | userActivityService.updateById(driverActivity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "userActivity_immediately.html"; |
| | | } |
| | | |
| | | /** |
| | | * 立即处理操作 |
| | | */ |
| | |
| | | import com.stylefeng.guns.modular.system.service.ITOrderLogisticsService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderLogisticsId) { |
| | | TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(tOrderLogisticsId); |
| | | |
| | | if(Arrays.asList(6, 7, 8, 9, 10).contains(tOrderLogistics.getState())){ |
| | | return ERROR; |
| | | } |
| | | //修改之前司机状态 -- 空闲 |
| | | if(null != tOrderLogistics.getDriverId()){ |
| | | TDriver driver = itDriverService.selectById(tOrderLogistics.getDriverId()); |
| | |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderPrivateCarId) { |
| | | TOrderPrivateCar tOrderPrivateCar = tOrderPrivateCarService.selectById(tOrderPrivateCarId); |
| | | |
| | | if(Arrays.asList(6, 7, 8, 9, 10).contains(tOrderPrivateCar.getState())){ |
| | | return ERROR; |
| | | } |
| | | //修改之前司机状态 -- 空闲 |
| | | if(null != tOrderPrivateCar.getDriverId()){ |
| | | TDriver driver = tDriverService.selectById(tOrderPrivateCar.getDriverId()); |
| | |
| | | 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(),name,phone)); |
| | | page.setRecords(tReassignService.getCanSelectPrivateCarDriverList(page,privateCar.getCompanyId(),privateCar.getDriverId(),name,phone)); |
| | | 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.getType(),name,phone)); |
| | | page.setRecords(tReassignService.getCanSelectSmallDriverList(page,tOrderLogistics.getCompanyId(), tOrderLogistics.getDriverId(), tOrderLogistics.getType(),name,phone)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | */ |
| | | List<Map<String,Object>> getCanSelectPrivateCarDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | | |
| | |
| | | */ |
| | | List<Map<String,Object>> getCanSelectSmallDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("type") Integer type, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 4 and oc.state = 2) |
| | | left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 4) |
| | | ) as o |
| | | <where> |
| | | o.isDelete = 1 |
| | |
| | | oc.money as cancelMoney, |
| | | case when oc.payType = 1 then '手机支付' |
| | | when oc.payType = 2 then '银行卡支付' |
| | | when oc.payType = 3 then '余额支付' else '现金支付' end as cancelPayTypeStr |
| | | when oc.payType = 3 then '余额支付' |
| | | when oc.payType = 4 then '现金支付'else '' end as cancelPayTypeStr |
| | | FROM t_order_logistics as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId |
| | | left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 1 and oc.state = 2) |
| | | left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 1) |
| | | ) as o |
| | | <where> |
| | | o.isDelete = 1 and o.type = 1 |
| | |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_company as cc on cc.id = ot.companyId |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId |
| | | LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1 and oc.state = 2 |
| | | LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1 |
| | | LEFT JOIN ( |
| | | SELECT sum(ii.money) as money,ii.incomeId,cc.type FROM t_income as ii |
| | | LEFT JOIN t_company as cc on ii.objectId = cc.id |
| | |
| | | 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) |
| | | <if test="name != null and name != ''"> |
| | | and CONCAT(dd.firstName, ' ', dd.lastName) LIKE CONCAT('%',#{name},'%') |
| | |
| | | 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) |
| | | <if test="name != null and name != ''"> |
| | | and CONCAT(dd.firstName, ' ', dd.lastName) LIKE CONCAT('%',#{name},'%') |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, money, fullMoney, expirationTime, insertTime, companyId, state, couponUseType, couponType, userId, couponId, couponActivityId, activityType |
| | | id |
| | | , money, fullMoney, expirationTime, insertTime, companyId, state, couponUseType, couponType, userId, couponId, couponActivityId, activityType |
| | | </sql> |
| | | |
| | | <select id="getList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | |
| | | c.activityType, |
| | | u.nickName, |
| | | u.phone, |
| | | if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime), b.endServiceTime), a.endServiceTime) as useTime |
| | | if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime), |
| | | b.endServiceTime), a.endServiceTime) as useTime |
| | | FROM |
| | | t_user_coupon_record c |
| | | LEFT JOIN t_user u ON c.userId = u.id |
| | |
| | | c.redPacketActivityId, |
| | | u.nickName, |
| | | u.phone, |
| | | if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime), b.endServiceTime), a.endServiceTime) as useTime |
| | | if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime), |
| | | b.endServiceTime), a.endServiceTime) as useTime |
| | | FROM |
| | | t_user_red_packet_record c |
| | | LEFT JOIN t_user u ON c.userId = u.id |
| | |
| | | </if> |
| | | </select> |
| | | <select id="getCouponStatic" resultType="map"> |
| | | select |
| | | IFNULL(SUM(aa.money), 0) money, |
| | | IFNULL(SUM(aa.useMoney), 0) useMoney, |
| | | COUNT(aa.userId) as number |
| | | from ( |
| | | SELECT |
| | | IFNULL(SUM(money), 0) money, |
| | | IFNULL( |
| | | SUM( |
| | | CASE |
| | | WHEN state = 2 THEN |
| | | money |
| | | ELSE |
| | | 0 |
| | | END |
| | | ), |
| | | 0 |
| | | ) useMoney, |
| | | ( |
| | | select count(c.userId) from (select userId from t_user_coupon_record where activityType = #{activityType} and couponActivityId = #{activityId} |
| | | IFNULL(SUM(CASE WHEN state = 2 THEN money ELSE 0 END), 0) useMoney, |
| | | userId |
| | | FROM t_user_coupon_record WHERE activityType = #{activityType} AND couponActivityId = #{activityId} |
| | | <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
| | | and (insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | group by userId) as c |
| | | ) number |
| | | FROM |
| | | t_user_coupon_record |
| | | WHERE |
| | | activityType = #{activityType} |
| | | AND couponActivityId = #{activityId} |
| | | <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
| | | and (insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | group by userId |
| | | ) as aa |
| | | </select> |
| | | <select id="getRedStatic" resultType="map"> |
| | | SELECT |
| | | IFNULL(SUM(aa.money), 0) money, |
| | | IFNULL(SUM(aa.useMoney), 0) useMoney, |
| | | COUNT(aa.userId) number |
| | | FROM |
| | | ( |
| | | SELECT |
| | | IFNULL(SUM(money), 0) money, |
| | | IFNULL( |
| | | SUM( |
| | | CASE |
| | | WHEN state = 2 THEN |
| | | money |
| | | ELSE |
| | | 0 |
| | | END |
| | | ), |
| | | 0 |
| | | ) useMoney, |
| | | COUNT(id) number |
| | | IFNULL(SUM(CASE WHEN state = 2 THEN money ELSE 0 END ), 0) useMoney, |
| | | userId |
| | | FROM |
| | | t_user_red_packet_record |
| | | WHERE |
| | | redPacketActivityId = #{activityId} |
| | | WHERE redPacketActivityId = #{activityId} |
| | | <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
| | | and (insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | group by userId |
| | | ) as aa group by aa.userId |
| | | </select> |
| | | <select id="getDiscountStatic" resultType="map"> |
| | | SELECT IFNULL(SUM(discountMoney),0) money,COUNT(id) number FROM t_order_private_car WHERE activityId=#{activityId} |
| | | SELECT IFNULL(SUM(aa.money), 0) money, COUNT(aa.userId) number |
| | | FROM (select IFNULL(SUM(discountMoney), 0) money, userId |
| | | from t_order_private_car |
| | | WHERE activityId = #{activityId} |
| | | group by userId) as aa |
| | | </select> |
| | | <select id="getDiscountStatic1" resultType="map"> |
| | | SELECT IFNULL(SUM(discountMoney),0) money,COUNT(id) number FROM t_order_logistics WHERE activityId=#{activityId} |
| | | SELECT IFNULL(SUM(aa.money), 0) money, COUNT(aa.userId) number |
| | | FROM (select IFNULL(SUM(discountMoney), 0) money, userId |
| | | from t_order_logistics |
| | | WHERE activityId = #{activityId} |
| | | group by userId) as aa |
| | | </select> |
| | | <select id="getRegStatic" resultType="map"> |
| | | SELECT |
| | |
| | | and c.companyId = #{companyId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryCouponRegisterInfo1" resultType="map"> |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * 添加时间 |
| | | */ |
| | | private Date insertTime; |
| | | /** |
| | | * 完成时间 |
| | | */ |
| | | @TableField("completionTime") |
| | | private Date completionTime; |
| | | |
| | | |
| | | public Integer getId() { |
| | |
| | | this.insertTime = insertTime; |
| | | } |
| | | |
| | | public Date getCompletionTime() { |
| | | return completionTime; |
| | | } |
| | | |
| | | public void setCompletionTime(Date completionTime) { |
| | | this.completionTime = completionTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | */ |
| | | List<Map<String,Object>> getCanSelectPrivateCarDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | | |
| | |
| | | */ |
| | | List<Map<String,Object>> getCanSelectSmallDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("driverId") Integer driverId, |
| | | @Param("type") Integer type, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCanSelectPrivateCarDriverList(Page<Map<String, Object>> page, Integer companyId, String name, String phone) { |
| | | return this.baseMapper.getCanSelectPrivateCarDriverList(page, companyId, name, phone); |
| | | 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); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCanSelectSmallDriverList(Page<Map<String, Object>> page, Integer companyId, Integer type, String name, String phone) { |
| | | return this.baseMapper.getCanSelectSmallDriverList(page, companyId, type, name, phone); |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '可提现日期', field: 'weeks', visible: true, align: 'center', valign: 'middle', |
| | | { |
| | | title: '司机可提现日期(星期几)', field: 'weeks', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(value==1) { |
| | |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TOrderLogistics.seItem.state == 9 || TOrderLogistics.seItem.state == 10 ) { |
| | | if (TOrderLogistics.seItem.state == 6 || TOrderLogistics.seItem.state == 7 || TOrderLogistics.seItem.state == 8 || |
| | | TOrderLogistics.seItem.state == 9 || TOrderLogistics.seItem.state == 10 ) { |
| | | swal("取消失败", "【已完成】【已取消】状态下不能执行此操作", "warning"); |
| | | return; |
| | | } |
| | |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TOrderPrivateCar.seItem.state == 7 || TOrderPrivateCar.seItem.state == 8 || TOrderPrivateCar.seItem.state == 9 || TOrderPrivateCar.seItem.state == 10 ) { |
| | | swal("支付失败", "【待评价】【已完成】【已取消】状态下不能执行此操作", "warning"); |
| | | if (TOrderPrivateCar.seItem.state == 6 || TOrderPrivateCar.seItem.state == 7 || TOrderPrivateCar.seItem.state == 8 || TOrderPrivateCar.seItem.state == 9 || TOrderPrivateCar.seItem.state == 10 ) { |
| | | swal("取消失败", "【待评价】【已完成】【已取消】状态下不能执行此操作", "warning"); |
| | | return; |
| | | } |
| | | swal({ |
| | |
| | | {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '参与人次', field: 'number', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | { |
| | | title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if(value==1){ |
| | | return "待审核"; |
| | |
| | | if(type==null){ |
| | | UserActivity.seItem = selected[0]; |
| | | return true; |
| | | }else if(type==3 && selected[0].status!=3 && selected[0].status!=4){ |
| | | } else if (type == 3 && selected[0].status != 6 && selected[0].status != 7) { |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | }else if(type==3 && selected[0].status==3 && (selected[0].startTime>new Date() || new Date()>selected[0].endTime)){ |
| | | } else if (type == 3 && 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){ |