From b088628cf9be70c36e34032bb0d024548351541b Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期六, 11 三月 2023 17:37:12 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TYouTuiMapper.java | 16 management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaintAudit.html | 24 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TComplaintMapper.xml | 56 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TEvaluateMapper.java | 34 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java | 20 management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_add.html | 12 management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig.js | 313 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITComplaintService.java | 27 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITEvaluateService.java | 37 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java | 68 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java | 15 management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluateDetail.html | 161 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigCommissionShareRules.html | 68 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRechargeRecordMapper.java | 21 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java | 44 management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordAgent.js | 153 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserToCouponServiceImpl.java | 20 management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html | 84 management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_add.html | 15 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigPriceRules.html | 116 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TOrderController.java | 267 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderStartAndStopException.html | 30 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRechargeRecordService.java | 24 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderException.html | 80 management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html | 31 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_add.html | 28 management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderExceptionDetailCancelOrder.js | 137 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TYouTuiController.java | 157 management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaAdd.html | 14 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITYouTuiService.java | 16 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig.html | 38 management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver_info.js | 115 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html | 200 management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordAgent.html | 57 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TComplaintMapper.java | 31 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java | 26 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java | 81 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java | 28 management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver.html | 2 management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_edit.html | 15 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TYouTuiMapper.xml | 23 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_add.html | 32 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemConfigServiceImpl.java | 20 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java | 222 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeDetail.html | 113 management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js | 263 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java | 31 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html | 57 management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderException.js | 295 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordUser.html | 60 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigDispatchRules.html | 82 management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html | 50 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java | 222 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TOrderResp.java | 98 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java | 24 management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_edit.html | 32 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java | 19 management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tCoupon.js | 35 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEvaluateController.java | 190 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_edit.html | 32 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_edit.html | 28 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCancelOrderMapper.java | 46 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCancelOrderService.java | 47 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUserToCoupon.java | 152 management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui.html | 53 management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_add.html | 95 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java | 29 management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserException.js | 1 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserToCouponMapper.xml | 22 management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_edit.html | 12 management/guns-admin/src/main/webapp/static/modular/system/tOrder/tCancelOrder.js | 182 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tCancelOrder.html | 87 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TYouTuiServiceImpl.java | 20 management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_add.html | 32 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRechargeRecordMapper.xml | 46 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRechargeRecord.java | 17 management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate.js | 176 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TComplaintController.java | 177 management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent.js | 47 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderExceptionDetail.html | 190 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBranchOfficeResp.java | 75 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordUserResp.java | 29 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder.html | 38 management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate.html | 72 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html | 64 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrder.java | 11 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml | 80 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TRechargeRecordController.java | 152 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TEvaluate.java | 127 management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js | 86 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemConfigMapper.xml | 17 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEvaluateServiceImpl.java | 110 management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js | 86 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAppUser.java | 25 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigBalanceRules.html | 55 management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui_info.js | 160 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEvaluateMapper.xml | 44 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/CouponSendReq.java | 10 management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder.js | 103 management/guns-admin/src/main/webapp/static/modular/system/tOrder/tAppUser.js | 281 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java | 244 + management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder.js | 186 management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js | 44 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TEvaluateResp.java | 84 management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaAdd.html | 51 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCancelOrderServiceImpl.java | 66 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushMinistryOfTransportUtil.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentArea.html | 8 management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js | 78 management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint.html | 56 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml | 56 management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui.js | 166 management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaUpdate.html | 57 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java | 25 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigServiceMgmt.html | 34 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TComplaintResp.java | 43 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserToCouponMapper.java | 18 management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder_info.js | 7 management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint_info.js | 81 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java | 96 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemConfigMapper.java | 18 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemConfig.java | 74 management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html | 82 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon.html | 3 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TYouTui.java | 176 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBranchOfficeService.java | 35 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCouponController.java | 76 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/OrderStateEnum.java | 3 management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js | 332 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCancelOrder.java | 127 management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaUpdate.html | 10 management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigIntegralRules.html | 101 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemConfigService.java | 16 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserToCouponService.java | 16 management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder_info.js | 99 management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate_info.js | 99 management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig_info.js | 95 management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCouponException.html | 3 management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js | 108 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordAgentResp.java | 83 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderDetail.html | 196 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrderDetail.html | 212 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCancelOrderController.java | 201 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TComplaint.java | 133 management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordUser.js | 155 management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCoupon.html | 3 management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_edit.html | 34 148 files changed, 10,724 insertions(+), 839 deletions(-) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java index 9d5c098..4cd62ee 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java @@ -97,9 +97,28 @@ * 跳转区域页面 */ @RequestMapping("/areaDetail") - public String areaDetail(Model model) { + public String areaDetail(String area,String areaId,Model model) { + String[] split1 = areaId.split("/"); List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); model.addAttribute("province",tRegions); + List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); + // 查询市 + List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); + model.addAttribute("cityList",tRegions1); + if(StringUtils.hasLength(area) && StringUtils.hasLength(areaId)){ + String[] split = area.split("/"); + model.addAttribute("provinceName",split[0]); + model.addAttribute("cityName",split[1]); + + model.addAttribute("provinceId",split1[0]); + model.addAttribute("cityId",split1[1]); + }else { + model.addAttribute("provinceName",""); + model.addAttribute("cityName",""); + + model.addAttribute("provinceId",""); + model.addAttribute("cityId",""); + } return PREFIX + "tAgentArea.html"; } @@ -131,7 +150,9 @@ @ResponseBody public Object add(TAgent tAgent) { - int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("principalPhone", tAgent.getPrincipalPhone())); + String[] split1 = tAgent.getArea().split("/"); + + int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("provinceName", split1[0]).eq("cityName",split1[1])); if(count>0){ return new SuccessTip(500,"该代理商已存在!"); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java index 2e10b03..f707d54 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java @@ -11,9 +11,11 @@ import com.stylefeng.guns.modular.system.model.TAppUser; import com.stylefeng.guns.modular.system.model.TCoupon; import com.stylefeng.guns.modular.system.model.TOrder; +import com.stylefeng.guns.modular.system.model.TUserToCoupon; import com.stylefeng.guns.modular.system.service.ITAppUserService; import com.stylefeng.guns.modular.system.service.ITCouponService; import com.stylefeng.guns.modular.system.service.ITOrderService; +import com.stylefeng.guns.modular.system.service.ITUserToCouponService; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; @@ -54,6 +56,8 @@ private ITCouponService tCouponService; @Autowired private ITOrderService tOrderService; + @Autowired + private ITUserToCouponService tUserToCouponService; /** * 跳转到首页 @@ -176,10 +180,17 @@ for (TAppUser tAppUser : tAppUsers) { TAppUserResp tAppUserResp = new TAppUserResp(); BeanUtils.copyProperties(tAppUser,tAppUserResp); - List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUser.getId())); - List<TCoupon> notUsedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); - tAppUserResp.setCouponSum(tCoupons.size()); - tAppUserResp.setNotUsedCount(notUsedList.size()); + + // 查询当前用户优惠券数量 + List<TUserToCoupon> tUserToCoupons = tUserToCouponService.selectList(new EntityWrapper<TUserToCoupon>().eq("userId", tAppUser.getId())); + + int couponTotal = tUserToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); + int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); + +// List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUser.getId())); +// List<TCoupon> notUsedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); + tAppUserResp.setCouponSum(couponTotal); + tAppUserResp.setNotUsedCount(validCount); List<TOrder> orders = tOrderService.selectList(new EntityWrapper<TOrder>().eq("userId", tAppUser.getId()).orderBy(true,"createTime",false)); if(!CollectionUtils.isEmpty(orders)){ List<TOrder> collect1 = orders.stream().filter(order->Objects.nonNull(order.getState())) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java index bebefe7..a4b60b0 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java @@ -1,7 +1,20 @@ package com.stylefeng.guns.modular.system.controller.general; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.core.base.tips.SuccessTip; +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.modular.system.controller.resp.TBranchOfficeResp; +import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; +import com.stylefeng.guns.modular.system.model.*; +import com.stylefeng.guns.modular.system.service.ITRegionService; +import com.stylefeng.guns.modular.system.service.ITSystemConfigService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Controller; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.ui.Model; @@ -9,8 +22,11 @@ import org.springframework.beans.factory.annotation.Autowired; import com.stylefeng.guns.core.log.LogObjectHolder; import org.springframework.web.bind.annotation.RequestParam; -import com.stylefeng.guns.modular.system.model.TBranchOffice; import com.stylefeng.guns.modular.system.service.ITBranchOfficeService; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; /** * 控制器 @@ -26,6 +42,11 @@ @Autowired private ITBranchOfficeService tBranchOfficeService; + @Autowired + private ITSystemConfigService tSystemConfigService; + + @Autowired + private ITRegionService tRegionService; /** * 跳转到首页 @@ -48,10 +69,134 @@ */ @RequestMapping("/tBranchOffice_update/{tBranchOfficeId}") public String tBranchOfficeUpdate(@PathVariable Integer tBranchOfficeId, Model model) { + TBranchOffice tBranchOffice = tBranchOfficeService.selectById(tBranchOfficeId); - model.addAttribute("item",tBranchOffice); + TBranchOfficeResp tBranchOfficeResp = new TBranchOfficeResp(); + BeanUtils.copyProperties(tBranchOffice,tBranchOfficeResp); + + // 查询区域 + TRegion city = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tBranchOffice.getCityCode()) + .last("LIMIT 1")); + TRegion district = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tBranchOffice.getDistrictCode()) + .last("LIMIT 1")); + + if(StringUtils.hasLength(tBranchOffice.getDistrictName())){ + tBranchOfficeResp.setArea(tBranchOffice.getProvinceName()+"/"+tBranchOffice.getCityName()+"/"+tBranchOffice.getDistrictName()); + }else { + tBranchOfficeResp.setArea(tBranchOffice.getProvinceName()+"/"+tBranchOffice.getCityName()); + } + + if(Objects.nonNull(city)){ + if(Objects.nonNull(district)){ + tBranchOfficeResp.setAreaId(city.getParentId()+"/"+city.getId()+"/"+district.getId()); + }else { + tBranchOfficeResp.setAreaId(city.getParentId()+"/"+city.getId()); + } + } + + model.addAttribute("item",tBranchOfficeResp); LogObjectHolder.me().set(tBranchOffice); return PREFIX + "tBranchOffice_edit.html"; + } + + /** + * 跳转到详情 + */ + @RequestMapping("/tBranchOfficeDetail") + public String tBranchOfficeDetail(Integer tBranchOfficeId, Model model) { + tBranchOfficeService.tBranchOfficeDetail(tBranchOfficeId,model); + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 3)); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num2",jsonObject.getInteger("num2")); + model.addAttribute("num3",jsonObject.getInteger("num3")); + return PREFIX + "tBranchOfficeDetail.html"; + } + + /** + * 跳转区域页面新增 + */ + @RequestMapping("/areaPageAdd") + public String areaPageAdd(String area,String areaId,Model model) { + String[] split1 = areaId.split("/"); + List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); + model.addAttribute("provinceList",tRegions); + List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); + // 查询市 + List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); + model.addAttribute("cityList",tRegions1); + + // 查询区 + List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); + List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); + model.addAttribute("districtList",tRegions2); + + if(StringUtils.hasLength(area) && StringUtils.hasLength(areaId)){ + String[] split = area.split("/"); + model.addAttribute("provinceName",split[0]); + model.addAttribute("cityName",split[1]); + if(split.length>2){ + model.addAttribute("districtName",split[2]); + }else { + model.addAttribute("districtName",""); + } + + model.addAttribute("provinceId",split1[0]); + model.addAttribute("cityId",split1[1]); + if(split1.length>2) { + model.addAttribute("districtId", split1[2]); + }else { + model.addAttribute("districtId", ""); + } + }else { + model.addAttribute("provinceName",""); + model.addAttribute("cityName","split[1]"); + model.addAttribute("districtName",""); + + model.addAttribute("provinceId",""); + model.addAttribute("cityId","split1[1]"); + model.addAttribute("districtId", ""); + } + return PREFIX + "tBranchOfficeAreaAdd.html"; + } + + /** + * 跳转区域页面编辑 + */ + @RequestMapping("/areaPageUpdate") + public String areaPageUpdate(String area,String areaId,Model model) { + + String[] split = area.split("/"); + model.addAttribute("provinceName",split[0]); + model.addAttribute("cityName",split[1]); + if(split.length>2){ + model.addAttribute("districtName",split[2]); + }else { + model.addAttribute("districtName",""); + } + + String[] split1 = areaId.split("/"); + String provinceId = split1[0]; + model.addAttribute("provinceId",split1[0]); + model.addAttribute("cityId",split1[1]); + if(split1.length>2) { + model.addAttribute("districtId", split1[2]); + }else { + model.addAttribute("districtId", ""); + } + + List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); + model.addAttribute("provinceList",tRegions); +// List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); + // 查询市 + List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", provinceId)); + model.addAttribute("cityList",tRegions1); + + // 查询区 + List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); + List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); + model.addAttribute("districtList",tRegions2); + + return PREFIX + "tBranchOfficeAreaUpdate.html"; } /** @@ -59,7 +204,56 @@ */ @RequestMapping(value = "/list") @ResponseBody - public Object list(String condition) { + public Object list(String branchOfficeName,String principal,String principalPhone,Integer operatingBusiness ,Integer status) { + List<TBranchOfficeResp> tBranchOfficeRespList = tBranchOfficeService.getPageList(branchOfficeName,principal,principalPhone,operatingBusiness,status); + // 分公司查询优惠券,订单,司机等信息 + tBranchOfficeService.queryOtherInfo(tBranchOfficeRespList); + return tBranchOfficeRespList; + } + + @ApiOperation(value = "市区查询",notes="市区查询") + @RequestMapping(value = "/areaCity") + @ResponseBody + public Object areaCity(Integer parentId,Model model) { + List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", parentId)); + /*if(CollectionUtils.isEmpty(tRegions) && StringUtils.hasLength(parentName)){ + TRegion parent = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("name", parentName)); + tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", parentId)); + }*/ + model.addAttribute("list",tRegions); + return tRegions; + } + + /** + * 启用分公司 + */ + @RequestMapping(value = "/start") + @ResponseBody + public Object start(Integer id) { + TBranchOffice tBranchOffice = tBranchOfficeService.selectById(id); + tBranchOffice.setStatus(1); + tBranchOfficeService.updateById(tBranchOffice); + return SUCCESS_TIP; + } + + /** + * 冻结分公司 + */ + @RequestMapping(value = "/stop") + @ResponseBody + public Object updateStatus(Integer id) { + TBranchOffice tBranchOffice = tBranchOfficeService.selectById(id); + tBranchOffice.setStatus(2); + tBranchOfficeService.updateById(tBranchOffice); + return SUCCESS_TIP; + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list-back") + @ResponseBody + public Object listBack(String condition) { return tBranchOfficeService.selectList(null); } @@ -69,6 +263,17 @@ @RequestMapping(value = "/add") @ResponseBody public Object add(TBranchOffice tBranchOffice) { + int count = tBranchOfficeService.selectCount(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName())); + if(count>0){ + return new SuccessTip(500,"该分公司名称已存在!"); + } + + Object o = tBranchOfficeService.addOrUpdate(tBranchOffice); + if(Objects.nonNull(o)){ + return o; + } + tBranchOffice.setStatus(1); + tBranchOfficeService.insert(tBranchOffice); return SUCCESS_TIP; } @@ -89,6 +294,17 @@ @RequestMapping(value = "/update") @ResponseBody public Object update(TBranchOffice tBranchOffice) { + TBranchOffice office = tBranchOfficeService.selectOne(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName()) + .last("LIMIT 1")); + if(Objects.nonNull(office) && !tBranchOffice.getId().equals(office.getId())){ + return new SuccessTip(500,"该分公司名称已存在!"); + } +// Object ocr = ocr("E:\\071bf986db0b00355c0ed190bbd3b16.png"); +// System.err.println(ocr); + Object o = tBranchOfficeService.addOrUpdate(tBranchOffice); + if(Objects.nonNull(o)){ + return o; + } tBranchOfficeService.updateById(tBranchOffice); return SUCCESS_TIP; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCancelOrderController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCancelOrderController.java new file mode 100644 index 0000000..f1cc996 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCancelOrderController.java @@ -0,0 +1,201 @@ +package com.stylefeng.guns.modular.system.controller.general; + +import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; +import io.swagger.annotations.ApiOperation; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +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.RequestParam; +import com.stylefeng.guns.modular.system.model.TCancelOrder; +import com.stylefeng.guns.modular.system.service.ITCancelOrderService; + +import javax.servlet.http.HttpServletResponse; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Objects; + +/** + * 控制器 + * + * @author fengshuonan + * @Date 2023-02-27 15:52:01 + */ +@Controller +@RequestMapping("/tCancelOrder") +public class TCancelOrderController extends BaseController { + + private String PREFIX = "/system/tCancelOrder/"; + + @Autowired + private ITCancelOrderService tCancelOrderService; + + /** + * 跳转到首页 + */ + @RequestMapping("") + public String index() { + return PREFIX + "tCancelOrder.html"; + } + + /** + * 跳转到添加 + */ + @RequestMapping("/tCancelOrder_add") + public String tCancelOrderAdd() { + return PREFIX + "tCancelOrder_add.html"; + } + + /** + * 跳转到修改 + */ + @RequestMapping("/tCancelOrder_update/{tCancelOrderId}") + public String tCancelOrderUpdate(@PathVariable Integer tCancelOrderId, Model model) { + TCancelOrder tCancelOrder = tCancelOrderService.selectById(tCancelOrderId); + model.addAttribute("item",tCancelOrder); + LogObjectHolder.me().set(tCancelOrder); + return PREFIX + "tCancelOrder_edit.html"; + } + + /** + * 跳转详情页面 + */ + @RequestMapping("/cancelOrderDetail") + public String cancelOrderDetail(Integer cancelOrderId, Model model) { + tCancelOrderService.cancelOrderDetail(cancelOrderId,model); + return PREFIX + "tCancelOrderDetail.html"; + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(String condition) { + return tCancelOrderService.selectList(null); + } + + /** + * 获取列表 + */ + @ApiOperation(value = "获取取消订单列表") + @RequestMapping(value = "/cancelOrderList") + @ResponseBody + public Object cancelOrderList(String createTime, + String code, + Integer source, + String userName, + String userPhone, + Integer state, + String driverName) { + return tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); + } + /** + * 获取取消订单列表(订单异常详情页面使用) + */ + @ApiOperation(value = "获取取消订单列表(订单异常详情页面使用)") + @RequestMapping(value = "/userCancelOrderList") + @ResponseBody + public Object userCancelOrderList(Integer userId,Integer orderId) { + return tCancelOrderService.userCancelOrderList(userId,orderId); + } + + /** + * 新增 + */ + @RequestMapping(value = "/add") + @ResponseBody + public Object add(TCancelOrder tCancelOrder) { + tCancelOrderService.insert(tCancelOrder); + return SUCCESS_TIP; + } + + /** + * 删除 + */ + @RequestMapping(value = "/delete") + @ResponseBody + public Object delete(@RequestParam Integer tCancelOrderId) { + tCancelOrderService.deleteById(tCancelOrderId); + return SUCCESS_TIP; + } + + /** + * 修改 + */ + @RequestMapping(value = "/update") + @ResponseBody + public Object update(TCancelOrder tCancelOrder) { + tCancelOrderService.updateById(tCancelOrder); + return SUCCESS_TIP; + } + + /** + * 详情 + */ + @RequestMapping(value = "/detail/{tCancelOrderId}") + @ResponseBody + public Object detail(@PathVariable("tCancelOrderId") Integer tCancelOrderId) { + return tCancelOrderService.selectById(tCancelOrderId); + } + + @ApiOperation(value = "导出取消订单列表",notes="导出取消订单列表") + @RequestMapping(value = "/export") + @ResponseBody + public void export(String createTime, + String code, + Integer source, + String userName, + String userPhone, + Integer state, + String driverName, HttpServletResponse response) { + try { + Date date = new Date(); + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String time1 = format.format(date); + String fileName = "CancelOrderInfo"+time1+".xls"; + String[] title = new String[] {"下单时间","订单编号","订单来源","下单用户昵称", + "下单用户手机","起点地址","终点地址","接单司机","司机电话","转单原因","取消时间"}; + List<TOrderResp> orderList = tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); + String[][] values = new String[orderList.size()][]; + for (int i = 0; i < orderList.size(); i++) { + TOrderResp d = orderList.get(i); + values[i] = new String[title.length]; + values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getPlaceTime()); + values[i][1] = d.getCode(); + Integer source1 = d.getSource(); + if(1 == source1){ + values[i][2] = "小程序"; + }else if(2 == source1){ + values[i][2] = "司机创建"; + } + values[i][3] = d.getUserName(); + values[i][4] = d.getUserPhone(); + values[i][5] = d.getStartAddress(); + values[i][6] = d.getEndAddress(); + values[i][7] = d.getDriverName(); + values[i][8] = d.getDriverPhone(); + values[i][9] = d.getCause(); + values[i][10] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); + } + HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); + ExcelUtil.setResponseHeader(response, fileName); + OutputStream os = response.getOutputStream(); + wb.write(os); + os.flush(); + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TComplaintController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TComplaintController.java index b5589db..850999c 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TComplaintController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TComplaintController.java @@ -1,15 +1,11 @@ package com.stylefeng.guns.modular.system.controller.general; -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.base.tips.SuccessTip; import com.stylefeng.guns.core.shiro.ShiroKit; -import com.stylefeng.guns.core.util.SinataUtil; -import com.stylefeng.guns.modular.system.model.TProblem; -import com.stylefeng.guns.modular.system.model.TSystemNotice; -import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; -import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; -import org.springframework.beans.factory.annotation.Value; +import com.stylefeng.guns.core.shiro.ShiroUser; +import com.stylefeng.guns.modular.system.model.TDriver; +import org.apache.shiro.subject.Subject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -21,16 +17,13 @@ import com.stylefeng.guns.modular.system.model.TComplaint; import com.stylefeng.guns.modular.system.service.ITComplaintService; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; import java.util.Date; -import java.util.Map; /** - * 投诉列表控制器 + * 控制器 * * @author fengshuonan - * @Date 2020-06-09 17:31:24 + * @Date 2023-03-02 10:14:46 */ @Controller @RequestMapping("/tComplaint") @@ -41,19 +34,8 @@ @Autowired private ITComplaintService tComplaintService; - @Autowired - private ITSystemNoticeService tSystemNoticeService; - - @Autowired - private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; - - @Value("${pushMinistryOfTransport}") - private boolean pushMinistryOfTransport; - - - /** - * 跳转到投诉列表首页 + * 跳转到首页 */ @RequestMapping("") public String index() { @@ -61,112 +43,91 @@ } /** - * 跳转到查看详情 + * 跳转到添加 */ - @RequestMapping("/lookDetail/{id}/{type}") - public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { - TComplaint tComplaint = tComplaintService.selectById(id); - String str = ""; - if (1 == type){ - str = tComplaint.getReason(); - }else if (2 == type){ - str = tComplaint.getDescription(); - }else if (3 == type){ - str = tComplaint.getHandleResult(); - } - model.addAttribute("str",str); - return "/system/tComplaint/lookDetail.html"; + @RequestMapping("/tComplaint_add") + public String tComplaintAdd() { + return PREFIX + "tComplaint_add.html"; } /** - * 跳转到立即处理页面 + * 跳转到修改 */ - @RequestMapping("/tComplaint_immediately/{tComplaintId}") + @RequestMapping("/tComplaint_update/{tComplaintId}") public String tComplaintUpdate(@PathVariable Integer tComplaintId, Model model) { + TComplaint tComplaint = tComplaintService.selectById(tComplaintId); + model.addAttribute("item",tComplaint); + LogObjectHolder.me().set(tComplaint); + return PREFIX + "tComplaint_edit.html"; + } + /** + * 跳转到投诉处理 + */ + @RequestMapping("/immediatelyAudit") + public String immediatelyAudit(Integer tComplaintId,Model model) { model.addAttribute("tComplaintId",tComplaintId); - return PREFIX + "tComplaint_immediately.html"; + return PREFIX + "tComplaintAudit.html"; } /** - * 跳转到查看详情 + * 审核 */ - @RequestMapping("/lookDetail/{str}") - public String lookDetail(@PathVariable String str, Model model) { - System.out.println(str); - model.addAttribute("str",str); - return PREFIX + "lookDetail.html"; - } - - /** - * 获取投诉列表列表 - */ - @RequestMapping(value = "/list") + @RequestMapping(value = "/audit") @ResponseBody - public Object list(String insertTime, - String userName, - String userPhone, - String driverPhone, - Integer isHandle) { - 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(tComplaintService.getComplaintList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,userName,userPhone,driverPhone,isHandle)); - return super.packForBT(page); - } - - /** - * 删除投诉列表 - */ - @RequestMapping(value = "/immediately") - @ResponseBody - public Object immediately(@RequestParam Integer id,@RequestParam String handleResult) { - TComplaint tComplaint = tComplaintService.selectById(id); - if(SinataUtil.isNotEmpty(tComplaint)){ - tComplaint.setHandleResult(handleResult); - tComplaint.setHandleUserId(ShiroKit.getUser().getId()); - tComplaint.setIsHandle(1); - tComplaint.setHandleTime(new Date()); - tComplaintService.updateById(tComplaint); - - //增加系统消息 - TSystemNotice notice = new TSystemNotice(); - notice.setType(2); - notice.setUserType(1); - notice.setContent("投诉处理结果:【"+handleResult+"】。"); - notice.setUserId(tComplaint.getUserId()); - notice.setInsertTime(new Date()); - notice.setRead(1); - tSystemNoticeService.insert(notice); - - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){//上传数据 - pushMinistryOfTransportUtil.ratedPassengerComplaint(tComplaint.getId()); - } - } - }).start(); - } + public Object audit(Integer tComplaintId,String notes) { + TComplaint tComplaint = tComplaintService.selectById(tComplaintId); + tComplaint.setNotes(notes); + tComplaint.setState(2); + // 审核用户id + Subject subject = ShiroKit.getSubject(); + ShiroUser shiroUser = (ShiroUser)subject.getPrincipal(); + tComplaint.setAuditId(shiroUser.getId()); + tComplaint.setAuditPersonName(shiroUser.getName()); + tComplaint.setAuditTime(new Date()); + tComplaintService.updateById(tComplaint); return SUCCESS_TIP; } /** - * 删除投诉 + * 获取列表 + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(String createTime,String userName,String userPhone,String driverPhone,Integer state) { + return tComplaintService.getPageList(createTime,userName,userPhone,driverPhone,state); + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list-back") + @ResponseBody + public Object listBack(String condition) { + return tComplaintService.selectList(null); + } + + /** + * 新增 + */ + @RequestMapping(value = "/add") + @ResponseBody + public Object add(TComplaint tComplaint) { + tComplaintService.insert(tComplaint); + return SUCCESS_TIP; + } + + /** + * 删除 */ @RequestMapping(value = "/delete") @ResponseBody - public Object delete(Integer tComplaintId) { + public Object delete(@RequestParam Integer tComplaintId) { tComplaintService.deleteById(tComplaintId); return SUCCESS_TIP; } /** - * 修改投诉列表 + * 修改 */ @RequestMapping(value = "/update") @ResponseBody @@ -176,7 +137,7 @@ } /** - * 投诉列表详情 + * 详情 */ @RequestMapping(value = "/detail/{tComplaintId}") @ResponseBody diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCouponController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCouponController.java index e1535ec..3d745de 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCouponController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCouponController.java @@ -6,7 +6,11 @@ import com.stylefeng.guns.core.util.DateUtil; import com.stylefeng.guns.modular.system.controller.req.CouponSendReq; import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; +import com.stylefeng.guns.modular.system.model.TAgent; +import com.stylefeng.guns.modular.system.model.TUserToCoupon; +import com.stylefeng.guns.modular.system.service.ITUserToCouponService; import io.swagger.annotations.ApiOperation; +import org.apache.poi.hdf.extractor.TC; import org.springframework.stereotype.Controller; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; @@ -21,6 +25,8 @@ import com.stylefeng.guns.modular.system.model.TCoupon; import com.stylefeng.guns.modular.system.service.ITCouponService; +import java.time.LocalDate; +import java.time.ZoneId; import java.util.*; /** @@ -37,6 +43,8 @@ @Autowired private ITCouponService tCouponService; + @Autowired + private ITUserToCouponService tUserToCouponService; /** * 跳转到首页 @@ -86,8 +94,22 @@ wrapper.between("create_time",startTime,endTime); } wrapper.orderBy(true,"create_time",false); - wrapper.groupBy(true,"coupon_name"); - wrapper.groupBy(true,"coupon_type"); + return tCouponService.selectList(wrapper); + } + + /** + * 获取活动券列表 + */ + @RequestMapping(value = "/activityCouponList") + @ResponseBody + public Object activityCouponList(String couponName) { + EntityWrapper<TCoupon> wrapper = new EntityWrapper<>(); + if(StringUtils.hasLength(couponName)){ + wrapper.like("coupon_name",couponName); + } + wrapper.eq("coupon_type",1); + wrapper.eq("coupon_state",1); + wrapper.orderBy(true,"create_time",false); return tCouponService.selectList(wrapper); } @@ -126,6 +148,33 @@ } /** + * 修改优惠券状态 + */ + @RequestMapping(value = "/update-status") + @ResponseBody + public Object updateStatus(Integer id,Integer status) { + TCoupon tCoupon = tCouponService.selectById(id); + + // 查询已启用的新人券数量 + int count = tCouponService.selectCount(new EntityWrapper<TCoupon>().eq("coupon_state", 1) + .eq("coupon_type",2)); + + // 判断是否为新人券,新人券只可启用一条记录 + if(count > 0 && 2 == tCoupon.getCouponType() && 2 == status){ + return new SuccessTip(500,"已有启动的新人券!"); + } + + if(1 == status){ + tCoupon.setCouponState(2); + } + if(2 == status){ + tCoupon.setCouponState(1); + } + tCouponService.updateById(tCoupon); + return SUCCESS_TIP; + } + + /** * 修改 */ @RequestMapping(value = "/update") @@ -154,8 +203,27 @@ List<Integer> userIds = couponSendReq.getUserIds(); + // 查询选择的优惠券 + TCoupon tCoupon = tCouponService.selectById(couponSendReq.getCouponId()); + + List<TUserToCoupon> tUserToCoupons = new ArrayList<>(userIds.size()); + + for (Integer userId : userIds) { + // 创建用户优惠券关联表 + TUserToCoupon tUserToCoupon = new TUserToCoupon(); + tUserToCoupon.setCouponId(tCoupon.getId()); + tUserToCoupon.setUserId(userId); + tUserToCoupon.setCouponTotal(1); + tUserToCoupon.setValidCount(1); + Date expireTime = Date.from(LocalDate.now().plusDays(tCoupon.getCouponValidity()).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + System.err.println(expireTime); + tUserToCoupon.setExpireTime(expireTime); + tUserToCoupons.add(tUserToCoupon); + } + tUserToCouponService.insertBatch(tUserToCoupons); + // 查询该优惠券的列表 - List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("coupon_name", couponSendReq.getCouponName()) + /*List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("coupon_name", couponSendReq.getCouponName()) .eq("coupon_status",CouponStatusEnum.UNISSUED.getCode())); Assert.isTrue(!CollectionUtils.isEmpty(tCoupons),"该优惠券不存在!"); List<TCoupon> tCouponList = new ArrayList<>(); @@ -186,7 +254,7 @@ } if(!CollectionUtils.isEmpty(tCouponList)){ tCouponService.updateBatchById(tCouponList); - } + }*/ return SUCCESS_TIP; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java index 54fc2f8..ac13512 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java @@ -211,11 +211,46 @@ */ @RequestMapping("/areaPageUpdate") public String areaPageUpdate(String area,String areaId,Model model) { + + String[] split = area.split("/"); + model.addAttribute("provinceName",split[0]); + model.addAttribute("cityName",split[1]); + model.addAttribute("districtName",split[2]); + + String[] split1 = areaId.split("/"); + model.addAttribute("provinceId",split1[0]); + model.addAttribute("cityId",split1[1]); + model.addAttribute("districtId",split1[2]); + + + List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); + model.addAttribute("provinceList",tRegions); + List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); + + + // 查询市 + List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); + model.addAttribute("cityList",tRegions1); + + // 查询区 + List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); + List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); + model.addAttribute("districtList",tRegions2); + + return PREFIX + "tDriverAreaUpdate.html"; + } + + /** + * 跳转区域页面新增 + */ + @RequestMapping("/areaPageAdd") + public String areaPageAdd(String area,String areaId,Model model) { + String[] split1 = areaId.split("/"); List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); model.addAttribute("provinceList",tRegions); List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); // 查询市 - List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", provinceIds)); + List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); model.addAttribute("cityList",tRegions1); // 查询区 @@ -227,23 +262,28 @@ String[] split = area.split("/"); model.addAttribute("provinceName",split[0]); model.addAttribute("cityName",split[1]); - model.addAttribute("districtName",split[2]); + if(split.length>2){ + model.addAttribute("districtName",split[2]); + }else { + model.addAttribute("districtName",""); + } - String[] split1 = areaId.split("/"); model.addAttribute("provinceId",split1[0]); model.addAttribute("cityId",split1[1]); - model.addAttribute("districtId",split1[2]); - } - return PREFIX + "tDriverAreaUpdate.html"; - } + if(split1.length>2) { + model.addAttribute("districtId", split1[2]); + }else { + model.addAttribute("districtId", ""); + } + }else { + model.addAttribute("provinceName",""); + model.addAttribute("cityName","split[1]"); + model.addAttribute("districtName",""); - /** - * 跳转区域页面新增 - */ - @RequestMapping("/areaPageAdd") - public String areaPageAdd(Model model) { - List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); - model.addAttribute("provinceList",tRegions); + model.addAttribute("provinceId",""); + model.addAttribute("cityId","split1[1]"); + model.addAttribute("districtId", ""); + } return PREFIX + "tDriverAreaAdd.html"; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEvaluateController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEvaluateController.java new file mode 100644 index 0000000..ce46553 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEvaluateController.java @@ -0,0 +1,190 @@ +package com.stylefeng.guns.modular.system.controller.general; + +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; +import io.swagger.annotations.ApiOperation; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +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.RequestParam; +import com.stylefeng.guns.modular.system.model.TEvaluate; +import com.stylefeng.guns.modular.system.service.ITEvaluateService; + +import javax.servlet.http.HttpServletResponse; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; + +/** + * 控制器 + * + * @author fengshuonan + * @Date 2023-02-27 14:03:41 + */ +@Controller +@RequestMapping("/tEvaluate") +public class TEvaluateController extends BaseController { + + private String PREFIX = "/system/tEvaluate/"; + + @Autowired + private ITEvaluateService tEvaluateService; + + /** + * 跳转到首页 + */ + @RequestMapping("") + public String index() { + return PREFIX + "tEvaluate.html"; + } + + /** + * 跳转到添加 + */ + @RequestMapping("/tEvaluate_add") + public String tEvaluateAdd() { + return PREFIX + "tEvaluate_add.html"; + } + + /** + * 跳转到修改 + */ + @RequestMapping("/tEvaluate_update/{tEvaluateId}") + public String tEvaluateUpdate(@PathVariable Integer tEvaluateId, Model model) { + TEvaluate tEvaluate = tEvaluateService.selectById(tEvaluateId); + model.addAttribute("item",tEvaluate); + LogObjectHolder.me().set(tEvaluate); + return PREFIX + "tEvaluate_edit.html"; + } + + /** + * 跳转详情页面 + */ + @RequestMapping("/evaluateDetail") + public String evaluateDetail(Integer evaluateId, Model model) { + tEvaluateService.evaluateDetail(evaluateId,model); + return PREFIX + "tEvaluateDetail.html"; + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(String createTime,String userName,String driverName ,Integer score) { + return tEvaluateService.selectPageList(createTime,userName,driverName,null,score); + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list-back") + @ResponseBody + public Object listBack(String condition) { + return tEvaluateService.selectList(null); + } + + /** + * 新增 + */ + @RequestMapping(value = "/add") + @ResponseBody + public Object add(TEvaluate tEvaluate) { + tEvaluateService.insert(tEvaluate); + return SUCCESS_TIP; + } + + /** + * 删除 + */ + @RequestMapping(value = "/delete") + @ResponseBody + public Object delete(@RequestParam Integer tEvaluateId) { + tEvaluateService.deleteById(tEvaluateId); + return SUCCESS_TIP; + } + + /** + * 修改 + */ + @RequestMapping(value = "/update") + @ResponseBody + public Object update(TEvaluate tEvaluate) { + tEvaluateService.updateById(tEvaluate); + return SUCCESS_TIP; + } + + /** + * 详情 + */ + @RequestMapping(value = "/detail/{tEvaluateId}") + @ResponseBody + public Object detail(@PathVariable("tEvaluateId") Integer tEvaluateId) { + return tEvaluateService.selectById(tEvaluateId); + } + + @ApiOperation(value = "导出评价列表",notes="导出评价列表") + @RequestMapping(value = "/export") + @ResponseBody + public void export(String createTime,String userName,String driverName,Integer score, HttpServletResponse response) { + try { + Date date = new Date(); + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String time1 = format.format(date); + String fileName = "EvaluateInfo"+time1+".xls"; + String[] title = new String[] {"评价时间","订单编号","评论用户", + "评论用户手机号","评论司机","司机手机号","评价分数","评价内容"}; + List<TEvaluateResp> list = tEvaluateService.selectPageList(createTime, userName, driverName, null, score); + String[][] values = new String[list.size()][]; + for (int i = 0; i < list.size(); i++) { + TEvaluateResp d = list.get(i); + values[i] = new String[title.length]; + values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); + values[i][1] = d.getCode(); + values[i][2] = d.getUserName(); + values[i][3] = d.getUserPhone(); + values[i][4] = d.getDriverName(); + values[i][5] = d.getDriverPhone(); + values[i][6] = String.valueOf(Objects.nonNull(d.getScore())?d.getScore(): ""); + Integer score1 = d.getScore(); + if(Objects.nonNull(score1)){ + if(1 == score1){ + values[i][6] = "非常差"; + }else if (2 == score1){ + values[i][6] = "差"; + }else if (3 == score1){ + values[i][6] = "一般"; + }else if (4 == score1){ + values[i][6] = "满意"; + }else if (5 == score1){ + values[i][6] = "非常满意"; + } + }else { + values[i][6] = ""; + } + values[i][7] = d.getEvaluate(); + } + HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); + ExcelUtil.setResponseHeader(response, fileName); + OutputStream os = response.getOutputStream(); + wb.write(os); + os.flush(); + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TOrderController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TOrderController.java index a1c64e1..8fb8b15 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TOrderController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TOrderController.java @@ -4,11 +4,21 @@ import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.core.base.tips.SuccessTip; import com.stylefeng.guns.core.log.LogObjectHolder; import com.stylefeng.guns.modular.system.controller.resp.TAppUserDetailOrderResp; +import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; +import com.stylefeng.guns.modular.system.model.TAppUser; +import com.stylefeng.guns.modular.system.model.TDriver; import com.stylefeng.guns.modular.system.model.TOrder; +import com.stylefeng.guns.modular.system.service.ITAppUserService; import com.stylefeng.guns.modular.system.service.ITOrderService; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -18,7 +28,13 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import javax.servlet.http.HttpServletResponse; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Objects; @@ -36,6 +52,8 @@ @Autowired private ITOrderService tOrderService; + @Autowired + private ITAppUserService tAppUserService; /** * 跳转到首页 @@ -65,17 +83,106 @@ } /** + * 跳转异常页面 + * @return + */ + @RequestMapping("/tOrder-exception") + public String tOrderException(Model model) { + return PREFIX + "tOrderException.html"; + } + + /** + * 跳转到首页 + */ + @RequestMapping("/cancelOrder") + public String cancelOrder() { + return PREFIX + "tCancelOrder.html"; + } + + /** + * 跳转冻结页面 + * @return + */ + @RequestMapping("/tOrderException_start_and_stop") + public String tAppUserStartAndStop( Integer id, + Model model) { + + // 查询订单 + TOrder tOrder = tOrderService.selectById(id); + TAppUser tAppUser = new TAppUser(); + if(Objects.nonNull(tOrder)){ + tAppUser = tAppUserService.selectById(tOrder.getUserId()); + } + + model.addAttribute("id",id); + if(Objects.nonNull(tAppUser)){ + model.addAttribute("status",tAppUser.getStatus()); + } + return PREFIX + "tOrderStartAndStopException.html"; + } + + /** + * 跳转详情页面 + */ + @RequestMapping("/orderDetail") + public String orderDetail(Integer orderId, Model model) { + tOrderService.orderDetail(orderId,model); + return PREFIX + "tOrderDetail.html"; + } + + /** + * 跳转异常详情页面 + */ + @RequestMapping("/orderExceptionDetail") + public String orderExceptionDetail(Integer orderId, Model model) { + tOrderService.orderExceptionDetail(orderId,model); + return PREFIX + "tOrderExceptionDetail.html"; + } + + /** * 获取列表 */ - @ApiOperation(value = "获取订单列表") + @ApiOperation(value = "用户获取订单列表") @RequestMapping(value = "/list") @ResponseBody - public Object list(String condition,Integer userId) { + public Object list(Integer userId) { EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); if(Objects.nonNull(userId)){ wrapper.eq("user_id",userId); } return tOrderService.selectList(wrapper); + } + + /** + * 获取列表 + */ + @ApiOperation(value = "获取订单列表") + @RequestMapping(value = "/orderList") + @ResponseBody + public Object orderList(String createTime, + String code, + Integer source, + String userName, + String userPhone, + Integer state, + String driverName) { + return tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); + } + + /** + * 获取列表 + */ + @ApiOperation(value = "获取订单异常列表") + @RequestMapping(value = "/orderExceptionList") + @ResponseBody + public Object orderExceptionList(String createTime, + String code, + Integer source, + String userName, + String userPhone, + Integer state, + String driverName) { + return tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,2); } /** @@ -97,7 +204,7 @@ TAppUserDetailOrderResp tAppUserDetailOrderResp = new TAppUserDetailOrderResp(); BeanUtils.copyProperties(tOrder,tAppUserDetailOrderResp); - // 计算总里程 + // TODO 计算总里程 // 计算总时长 @@ -157,4 +264,158 @@ public Object detail(@PathVariable("tOrderId") Integer tOrderId) { return tOrderService.selectById(tOrderId); } + + @ApiOperation(value = "导出订单列表",notes="导出订单列表") + @RequestMapping(value = "/export") + @ResponseBody + public void export(String createTime, + String code, + Integer source, + String userName, + String userPhone, + Integer state, + String driverName,HttpServletResponse response) { + try { + Date date = new Date(); + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String time1 = format.format(date); + String fileName = "OrderInfo"+time1+".xls"; + String[] title = new String[] {"下单时间","订单编号","订单来源","开始服务时间","下单用户昵称", + "下单用户手机","起点地址","终点地址","接单司机","司机电话","预估价","取消次数","订单状态"}; + List<TOrderResp> orderList = tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); + String[][] values = new String[orderList.size()][]; + for (int i = 0; i < orderList.size(); i++) { + TOrderResp d = orderList.get(i); + values[i] = new String[title.length]; + values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); + values[i][1] = d.getCode(); + Integer source1 = d.getSource(); + if(1 == source1){ + values[i][2] = "小程序"; + }else if(2 == source1){ + values[i][2] = "司机创建"; + } + values[i][3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getStartTime()); + values[i][4] = d.getUserName(); + values[i][5] = d.getUserPhone(); + values[i][6] = d.getStartAddress(); + values[i][7] = d.getEndAddress(); + values[i][8] = d.getDriverName(); + values[i][9] = d.getDriverPhone(); + values[i][10] = String.valueOf(Objects.nonNull(d.getEstimatedPrice())?d.getEstimatedPrice(): BigDecimal.ZERO); + values[i][11] = String.valueOf(d.getCancelCount()); + Integer status1 = d.getState(); + if(101 == status1){ + values[i][12] = "待接单"; + }else if(102 == status1){ + values[i][12] = "已接单"; + }else if(103 == status1){ + values[i][12] = "前往预约点"; + }else if(104 == status1){ + values[i][12] = "到达预约点"; + }else if(105 == status1){ + values[i][12] = "开始服务"; + }else if(106 == status1){ + values[i][12] = "到达目的地"; + }else if(107 == status1){ + values[i][12] = "待支付"; + }else if(108 == status1){ + values[i][12] = "待评价"; + }else if(109 == status1){ + values[i][12] = "已完成"; + }else if(201 == status1){ + values[i][12] = "转单中"; + }else if(301 == status1){ + values[i][12] = "已取消"; + }else if(401 == status1){ + values[i][12] = "等待中"; + } + } + HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); + ExcelUtil.setResponseHeader(response, fileName); + OutputStream os = response.getOutputStream(); + wb.write(os); + os.flush(); + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @ApiOperation(value = "导出订单列表",notes="导出订单列表") + @RequestMapping(value = "/export-exception") + @ResponseBody + public void exportException(String createTime, + String code, + Integer source, + String userName, + String userPhone, + Integer state, + String driverName,HttpServletResponse response) { + try { + Date date = new Date(); + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String time1 = format.format(date); + String fileName = "OrderExceptionInfo"+time1+".xls"; + String[] title = new String[] {"下单时间","订单编号","订单来源","乘车时间","下单用户昵称", + "下单用户手机","起点","终点","接单司机","司机电话","预估价格","取消次数","订单状态"}; + List<TOrderResp> orderList = tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); + String[][] values = new String[orderList.size()][]; + for (int i = 0; i < orderList.size(); i++) { + TOrderResp d = orderList.get(i); + values[i] = new String[title.length]; + values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); + values[i][1] = d.getCode(); + Integer source1 = d.getSource(); + if(1 == source1){ + values[i][2] = "小程序"; + }else if(2 == source1){ + values[i][2] = "司机创建"; + } + values[i][3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getStartTime()); + values[i][4] = d.getUserName(); + values[i][5] = d.getUserPhone(); + values[i][6] = d.getStartAddress(); + values[i][7] = d.getEndAddress(); + values[i][8] = d.getDriverName(); + values[i][9] = d.getDriverPhone(); + values[i][10] = String.valueOf(Objects.nonNull(d.getEstimatedPrice())?d.getEstimatedPrice(): BigDecimal.ZERO); + values[i][11] = String.valueOf(d.getCancelCount()); + Integer status1 = d.getState(); + if(101 == status1){ + values[i][12] = "待接单"; + }else if(102 == status1){ + values[i][12] = "已接单"; + }else if(103 == status1){ + values[i][12] = "前往预约点"; + }else if(104 == status1){ + values[i][12] = "到达预约点"; + }else if(105 == status1){ + values[i][12] = "开始服务"; + }else if(106 == status1){ + values[i][12] = "到达目的地"; + }else if(107 == status1){ + values[i][12] = "待支付"; + }else if(108 == status1){ + values[i][12] = "待评价"; + }else if(109 == status1){ + values[i][12] = "已完成"; + }else if(201 == status1){ + values[i][12] = "转单中"; + }else if(301 == status1){ + values[i][12] = "已取消"; + }else if(401 == status1){ + values[i][12] = "等待中"; + } + } + HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); + ExcelUtil.setResponseHeader(response, fileName); + OutputStream os = response.getOutputStream(); + wb.write(os); + os.flush(); + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TRechargeRecordController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TRechargeRecordController.java index ad74cff..48b3b67 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TRechargeRecordController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TRechargeRecordController.java @@ -1,6 +1,16 @@ package com.stylefeng.guns.modular.system.controller.general; +import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordAgentResp; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp; +import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; +import com.stylefeng.guns.modular.system.model.TDriver; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -11,6 +21,15 @@ import org.springframework.web.bind.annotation.RequestParam; import com.stylefeng.guns.modular.system.model.TRechargeRecord; import com.stylefeng.guns.modular.system.service.ITRechargeRecordService; + +import javax.servlet.http.HttpServletResponse; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Objects; /** * 控制器 @@ -52,6 +71,40 @@ model.addAttribute("item",tRechargeRecord); LogObjectHolder.me().set(tRechargeRecord); return PREFIX + "tRechargeRecord_edit.html"; + } + + /** + * 跳转到用户充值列表 + */ + @RequestMapping("/userRecharge") + public String userRecharge() { + return PREFIX + "tRechargeRecordUser.html"; + } + + /** + * 跳转到代理商充值列表 + */ + @RequestMapping("/agentRecharge") + public String agentRecharge() { + return PREFIX + "tRechargeRecordAgent.html"; + } + + /** + * 获取用户充值列表 + */ + @RequestMapping(value = "/userRechargeList") + @ResponseBody + public Object userRechargeList(String userName,String userPhone,String code,String createTime) { + return tRechargeRecordService.userRecharge(userName,userPhone,code,createTime); + } + + /** + * 获取代理商充值列表 + */ + @RequestMapping(value = "/agentRechargeList") + @ResponseBody + public Object agentRechargeList(String driverName,String driverPhone,String createTime) { + return tRechargeRecordService.agentRechargeList(driverName,driverPhone,createTime); } /** @@ -101,4 +154,103 @@ public Object detail(@PathVariable("tRechargeRecordId") Integer tRechargeRecordId) { return tRechargeRecordService.selectById(tRechargeRecordId); } + + @ApiOperation(value = "导出用户充值列表",notes="导出用户充值列表") + @RequestMapping(value = "/exportUserRecharge") + @ResponseBody + public void exportUserRecharge(String userName,String userPhone,String code,String createTime, HttpServletResponse response) { + try { + Date date = new Date(); + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String time1 = format.format(date); + String fileName = "UserRechargeRecord"+time1+".xls"; + String[] title = new String[] {"充值时间","流水ID","用户姓名","用户手机号","充值金额", + "充值方式","状态"}; + List<TRechargeRecordUserResp> userRechargeList = tRechargeRecordService.userRecharge(userName,userPhone,code,createTime); + + String[][] values = new String[userRechargeList.size()][]; + for (int i = 0; i < userRechargeList.size(); i++) { + TRechargeRecordUserResp d = userRechargeList.get(i); + values[i] = new String[title.length]; + values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); + values[i][1] = d.getCode(); + values[i][2] = d.getUserName(); + values[i][3] = d.getUserPhone(); + values[i][4] = String.valueOf(Objects.nonNull(d.getAmount())?d.getAmount(): BigDecimal.ZERO); + Integer payType = d.getPayType(); + if(1 == payType){ + values[i][5] = "微信"; + }else if(2 == payType){ + values[i][5] = "系统充值"; + }else{ + values[i][5] = "其他"; + } + Integer status1 = d.getPayStatus(); + if(1 == status1){ + values[i][6] = "失败"; + }else if(2 == status1){ + values[i][6] = "成功"; + } + } + HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); + ExcelUtil.setResponseHeader(response, fileName); + OutputStream os = response.getOutputStream(); + wb.write(os); + os.flush(); + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @ApiOperation(value = "导出代理商充值列表",notes="导出代理商充值列表") + @RequestMapping(value = "/exportAgentRecharge") + @ResponseBody + public void exportAgentRecharge(String driverName,String driverPhone,String createTime, HttpServletResponse response) { + try { + Date date = new Date(); + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String time1 = format.format(date); + String fileName = "AgentRechargeRecord"+time1+".xls"; + String[] title = new String[] {"充值时间","代理商姓名","联系电话","代理区域","司机姓名","司机手机号","充值金额", + "充值方式","状态"}; + List<TRechargeRecordAgentResp> agentRechargeList = tRechargeRecordService.agentRechargeList(driverName,driverPhone,createTime); + + String[][] values = new String[agentRechargeList.size()][]; + for (int i = 0; i < agentRechargeList.size(); i++) { + TRechargeRecordAgentResp d = agentRechargeList.get(i); + values[i] = new String[title.length]; + values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); + values[i][1] = d.getPrincipal(); + values[i][2] = d.getPrincipalPhone(); + values[i][3] = d.getProvinceName()+d.getCityName(); + values[i][4] = d.getDriverName(); + values[i][5] = d.getDriverPhone(); + values[i][6] = String.valueOf(Objects.nonNull(d.getAmount())?d.getAmount(): BigDecimal.ZERO); + Integer payType = d.getPayType(); + if(1 == payType){ + values[i][7] = "微信"; + }else if(2 == payType){ + values[i][7] = "系统充值"; + }else{ + values[i][7] = "其他"; + } + Integer status1 = d.getPayStatus(); + if(1 == status1){ + values[i][8] = "失败"; + }else if(2 == status1){ + values[i][8] = "成功"; + } + } + HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); + ExcelUtil.setResponseHeader(response, fileName); + OutputStream os = response.getOutputStream(); + wb.write(os); + os.flush(); + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java new file mode 100644 index 0000000..3242865 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java @@ -0,0 +1,244 @@ +package com.stylefeng.guns.modular.system.controller.general; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.core.base.controller.BaseController; +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.RequestParam; +import com.stylefeng.guns.modular.system.model.TSystemConfig; +import com.stylefeng.guns.modular.system.service.ITSystemConfigService; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * 控制器 + * + * @author fengshuonan + * @Date 2023-03-02 17:09:55 + */ +@Controller +@RequestMapping("/tSystemConfig") +public class TSystemConfigController extends BaseController { + + private String PREFIX = "/system/tSystemConfig/"; + + @Autowired + private ITSystemConfigService tSystemConfigService; + + /** + * 跳转到首页 + */ + @RequestMapping("") + public String index() { + return PREFIX + "tSystemConfig.html"; + } + + /** + * 跳转到添加 + */ + @RequestMapping("/tSystemConfig_add") + public String tSystemConfigAdd() { + return PREFIX + "tSystemConfig_add.html"; + } + + /** + * 跳转到修改 + */ + @RequestMapping("/tSystemConfig_update/{tSystemConfigId}") + public String tSystemConfigUpdate(@PathVariable Integer tSystemConfigId, Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectById(tSystemConfigId); + model.addAttribute("item",tSystemConfig); + LogObjectHolder.me().set(tSystemConfig); + return PREFIX + "tSystemConfig_edit.html"; + } + + /** + * 跳转到派单规则 + */ + @RequestMapping("/dispatchRules") + public String dispatchRules(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 1) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num1",jsonObject.getInteger("num1")); + model.addAttribute("num2",jsonObject.getInteger("num2")); + model.addAttribute("num3",jsonObject.getInteger("num3")); + model.addAttribute("num4",jsonObject.getInteger("num4")); + model.addAttribute("num5",jsonObject.getInteger("num5")); + return PREFIX + "tSystemConfigDispatchRules.html"; + } + + /** + * 跳转到佣金分成规则 + */ + @RequestMapping("/commissionShareRules") + public String commissionShareRules(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 2) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num1",jsonObject.getInteger("num1")); + model.addAttribute("num2",jsonObject.getInteger("num2")); + model.addAttribute("num3",jsonObject.getInteger("num3")); + model.addAttribute("num4",jsonObject.getInteger("num4")); + model.addAttribute("num5",jsonObject.getInteger("num5")); + model.addAttribute("num6",jsonObject.getInteger("num6")); + model.addAttribute("num7",jsonObject.getInteger("num7")); + return PREFIX + "tSystemConfigCommissionShareRules.html"; + } + + /** + * 跳转到抽成规则 + */ + @RequestMapping("/extractionRules") + public String extractionRules(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 3) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num1",jsonObject.getInteger("num1")); + model.addAttribute("num2",jsonObject.getInteger("num2")); + model.addAttribute("num3",jsonObject.getInteger("num3")); + return PREFIX + "tSystemConfigExtractionRules.html"; + } + /** + * 跳转到积分规则 + */ + @RequestMapping("/integralRules") + public String integralRules(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 4) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num1",jsonObject.getString("num1")); + model.addAttribute("num2",jsonObject.getString("num2")); + model.addAttribute("num3",jsonObject.getInteger("num3")); + model.addAttribute("num4",jsonObject.getInteger("num4")); + model.addAttribute("num5",jsonObject.getInteger("num5")); + model.addAttribute("num6",jsonObject.getInteger("num6")); + model.addAttribute("num7",jsonObject.getInteger("num7")); + model.addAttribute("num8",jsonObject.getInteger("num8")); + model.addAttribute("num9",jsonObject.getInteger("num9")); + model.addAttribute("num10",jsonObject.getInteger("num10")); + return PREFIX + "tSystemConfigIntegralRules.html"; + } + + /** + * 跳转到价格规则 + */ + @RequestMapping("/priceRules") + public String priceRules(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 5) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + JSONArray array = jsonObject.getJSONArray("ChargeStandard"); + JSONArray objects = new JSONArray(); + for (int i = 0; i < array.size(); i++) { + JSONObject jsonObject1 = JSONObject.parseObject(JSONObject.toJSONString(array.get(i))); + if(i == 0){ + jsonObject1.put("key",0); + }else { + jsonObject1.put("key",1); + } + objects.add(jsonObject1); + } + model.addAttribute("array",objects); + JSONObject extraCost = JSONObject.parseObject(jsonObject.getString("ExtraCost")); + model.addAttribute("ExtraCost",extraCost); + return PREFIX + "tSystemConfigPriceRules.html"; + } + /** + * 跳转到余额规则 + */ + @RequestMapping("/balanceRules") + public String balanceRules(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 6) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num1",jsonObject.getInteger("num1")); + model.addAttribute("num2",jsonObject.getInteger("num2")); + return PREFIX + "tSystemConfigBalanceRules.html"; + } + /** + * 跳转到客服管理 + */ + @RequestMapping("/serviceMgmt") + public String serviceMgmt(Model model) { + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 7) + .last("LIMIT 1")); + JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); + model.addAttribute("num1",jsonObject.getString("num1")); + return PREFIX + "tSystemConfigServiceMgmt.html"; + } + + + /** + * 获取列表 + */ + @RequestMapping(value = "/systemConfigSubmit") + @ResponseBody + public Object systemConfigSubmit(Integer type,String content) { + + TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", type) + .last("LIMIT 1")); + + System.err.println(content); + + tSystemConfig.setContent(content); + + return tSystemConfigService.updateById(tSystemConfig); + } + /** + * 获取列表 + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(String condition) { + return tSystemConfigService.selectList(null); + } + + /** + * 新增 + */ + @RequestMapping(value = "/add") + @ResponseBody + public Object add(TSystemConfig tSystemConfig) { + tSystemConfigService.insert(tSystemConfig); + return SUCCESS_TIP; + } + + /** + * 删除 + */ + @RequestMapping(value = "/delete") + @ResponseBody + public Object delete(@RequestParam Integer tSystemConfigId) { + tSystemConfigService.deleteById(tSystemConfigId); + return SUCCESS_TIP; + } + + /** + * 修改 + */ + @RequestMapping(value = "/update") + @ResponseBody + public Object update(TSystemConfig tSystemConfig) { + tSystemConfigService.updateById(tSystemConfig); + return SUCCESS_TIP; + } + + /** + * 详情 + */ + @RequestMapping(value = "/detail/{tSystemConfigId}") + @ResponseBody + public Object detail(@PathVariable("tSystemConfigId") Integer tSystemConfigId) { + return tSystemConfigService.selectById(tSystemConfigId); + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TYouTuiController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TYouTuiController.java new file mode 100644 index 0000000..98c1b9c --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TYouTuiController.java @@ -0,0 +1,157 @@ +package com.stylefeng.guns.modular.system.controller.general; + +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.core.base.tips.SuccessTip; +import com.stylefeng.guns.core.util.DateUtil; +import com.stylefeng.guns.modular.system.model.TAgent; +import org.springframework.stereotype.Controller; +import org.springframework.util.StringUtils; +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.RequestParam; +import com.stylefeng.guns.modular.system.model.TYouTui; +import com.stylefeng.guns.modular.system.service.ITYouTuiService; + +import java.util.Date; +import java.util.Objects; + +/** + * 控制器 + * + * @author fengshuonan + * @Date 2023-03-01 16:17:43 + */ +@Controller +@RequestMapping("/tYouTui") +public class TYouTuiController extends BaseController { + + private String PREFIX = "/system/tYouTui/"; + + @Autowired + private ITYouTuiService tYouTuiService; + + /** + * 跳转到首页 + */ + @RequestMapping("") + public String index() { + return PREFIX + "tYouTui.html"; + } + + /** + * 跳转到添加 + */ + @RequestMapping("/tYouTui_add") + public String tYouTuiAdd() { + return PREFIX + "tYouTui_add.html"; + } + + /** + * 跳转到修改 + */ + @RequestMapping("/tYouTui_update/{tYouTuiId}") + public String tYouTuiUpdate(@PathVariable Integer tYouTuiId, Model model) { + TYouTui tYouTui = tYouTuiService.selectById(tYouTuiId); + model.addAttribute("item",tYouTui); + LogObjectHolder.me().set(tYouTui); + return PREFIX + "tYouTui_edit.html"; + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(String createTime,Integer type) { + EntityWrapper<TYouTui> wrapper = new EntityWrapper<>(); + + if(Objects.nonNull(type)){ + wrapper.eq("type",type); + } + + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + Date startTime = DateUtil.getDate_str4(split[0]); + Date endTime = DateUtil.getDate_str4(split[1]); + wrapper.between("createTime",startTime,endTime); + } + return tYouTuiService.selectList(wrapper); + } + + /** + * 获取列表 + */ + @RequestMapping(value = "/list-back") + @ResponseBody + public Object listBack(String condition) { + return tYouTuiService.selectList(null); + } + + /** + * 新增 + */ + @RequestMapping(value = "/add") + @ResponseBody + public Object add(TYouTui tYouTui) { + tYouTui.setContent(tYouTui.getServiceContent()); + tYouTuiService.insert(tYouTui); + return SUCCESS_TIP; + } + + /** + * 删除 + */ + @RequestMapping(value = "/delete") + @ResponseBody + public Object delete(@RequestParam Integer tYouTuiId) { + TYouTui tYouTui = tYouTuiService.selectById(tYouTuiId); + if(1 == tYouTui.getStatus()){ + return new SuccessTip(500,"启用下的优推不可删除!"); + } + + tYouTuiService.deleteById(tYouTuiId); + return SUCCESS_TIP; + } + + /** + * 修改用户状态 + */ + @RequestMapping(value = "/update-status") + @ResponseBody + public Object updateStatus(Integer id,Integer status) { + TYouTui tYouTui = tYouTuiService.selectById(id); + if(1 == status){ + tYouTui.setStatus(2); + } + if(2 == status){ + tYouTui.setStatus(1); + } + tYouTuiService.updateById(tYouTui); + return SUCCESS_TIP; + } + + /** + * 修改 + */ + @RequestMapping(value = "/update") + @ResponseBody + public Object update(TYouTui tYouTui) { + tYouTuiService.updateById(tYouTui); + return SUCCESS_TIP; + } + + /** + * 详情 + */ + @RequestMapping(value = "/detail/{tYouTuiId}") + @ResponseBody + public Object detail(@PathVariable("tYouTuiId") Integer tYouTuiId) { + return tYouTuiService.selectById(tYouTuiId); + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/CouponSendReq.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/CouponSendReq.java index 8b1224e..f662389 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/CouponSendReq.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/CouponSendReq.java @@ -14,6 +14,16 @@ @ApiModelProperty(value = "优惠券名称") private String couponName; + @ApiModelProperty(value = "优惠券ID") + private Integer couponId; + + public Integer getCouponId() { + return couponId; + } + + public void setCouponId(Integer couponId) { + this.couponId = couponId; + } public List<Integer> getUserIds() { return userIds; diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBranchOfficeResp.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBranchOfficeResp.java new file mode 100644 index 0000000..7bca4ae --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBranchOfficeResp.java @@ -0,0 +1,75 @@ +package com.stylefeng.guns.modular.system.controller.resp; + +import com.stylefeng.guns.modular.system.model.TBranchOffice; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; + +public class TBranchOfficeResp extends TBranchOffice { + + @ApiModelProperty(value = "订单数量") + private Integer orderCount; + + @ApiModelProperty(value = "有效订单") + private Integer effectiveOrderCount; + + @ApiModelProperty(value = "已发放优惠券") + private Integer totalCount; + + @ApiModelProperty(value = "已使用优惠券") + private Integer usedCount; + + @ApiModelProperty(value = "累计优惠券金额") + private BigDecimal orderPriceCount; + + @ApiModelProperty(value = "司机数量") + private Integer driverCount; + + public Integer getDriverCount() { + return driverCount; + } + + public void setDriverCount(Integer driverCount) { + this.driverCount = driverCount; + } + + public Integer getOrderCount() { + return orderCount; + } + + public void setOrderCount(Integer orderCount) { + this.orderCount = orderCount; + } + + public Integer getEffectiveOrderCount() { + return effectiveOrderCount; + } + + public void setEffectiveOrderCount(Integer effectiveOrderCount) { + this.effectiveOrderCount = effectiveOrderCount; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public Integer getUsedCount() { + return usedCount; + } + + public void setUsedCount(Integer usedCount) { + this.usedCount = usedCount; + } + + public BigDecimal getOrderPriceCount() { + return orderPriceCount; + } + + public void setOrderPriceCount(BigDecimal orderPriceCount) { + this.orderPriceCount = orderPriceCount; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TComplaintResp.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TComplaintResp.java new file mode 100644 index 0000000..f7d0c7d --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TComplaintResp.java @@ -0,0 +1,43 @@ +package com.stylefeng.guns.modular.system.controller.resp; + +import com.stylefeng.guns.modular.system.model.TAgent; +import com.stylefeng.guns.modular.system.model.TComplaint; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; + +public class TComplaintResp extends TComplaint { + + @ApiModelProperty(value = "投诉人名称") + private String userName; + + @ApiModelProperty(value = "投诉人电话") + private String userPhone; + + @ApiModelProperty(value = "司机电话") + private String driverPhone; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public String getDriverPhone() { + return driverPhone; + } + + public void setDriverPhone(String driverPhone) { + this.driverPhone = driverPhone; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TEvaluateResp.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TEvaluateResp.java new file mode 100644 index 0000000..f092b06 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TEvaluateResp.java @@ -0,0 +1,84 @@ +package com.stylefeng.guns.modular.system.controller.resp; + +import com.stylefeng.guns.modular.system.model.TEvaluate; +import io.swagger.annotations.ApiModelProperty; + +public class TEvaluateResp extends TEvaluate { + + @ApiModelProperty(value = "订单编号") + private String code; + + @ApiModelProperty(value = "评论用户名") + private String userName; + + @ApiModelProperty(value = "评论用户手机号") + private String userPhone; + + @ApiModelProperty(value = "评论司机") + private String driverName; + + @ApiModelProperty(value = "司机手机号") + private String driverPhone; + + @ApiModelProperty(value = "分公司id") + private Integer branchOfficeId; + + @ApiModelProperty(value = "代理商id") + private Integer agentId; + + public Integer getBranchOfficeId() { + return branchOfficeId; + } + + public void setBranchOfficeId(Integer branchOfficeId) { + this.branchOfficeId = branchOfficeId; + } + + public Integer getAgentId() { + return agentId; + } + + public void setAgentId(Integer agentId) { + this.agentId = agentId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public String getDriverName() { + return driverName; + } + + public void setDriverName(String driverName) { + this.driverName = driverName; + } + + public String getDriverPhone() { + return driverPhone; + } + + public void setDriverPhone(String driverPhone) { + this.driverPhone = driverPhone; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TOrderResp.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TOrderResp.java new file mode 100644 index 0000000..180547f --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TOrderResp.java @@ -0,0 +1,98 @@ +package com.stylefeng.guns.modular.system.controller.resp; + +import com.stylefeng.guns.modular.system.model.TOrder; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +public class TOrderResp extends TOrder { + + @ApiModelProperty(value = "下单用户昵称") + private String userName; + + @ApiModelProperty(value = "下单用户电话") + private String userPhone; + + @ApiModelProperty(value = "司机昵称") + private String driverName; + + @ApiModelProperty(value = "司机电话") + private String driverPhone; + + @ApiModelProperty(value = "取消次数") + private Integer cancelCount; + + @ApiModelProperty(value = "用户状态") + private Integer userStatus; + + @ApiModelProperty(value = "取消订单页面使用:下单时间") + private Date placeTime; + + @ApiModelProperty(value = "取消原因") + private String cause; + + + public Date getPlaceTime() { + return placeTime; + } + + public void setPlaceTime(Date placeTime) { + this.placeTime = placeTime; + } + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + public Integer getCancelCount() { + return cancelCount; + } + + public void setCancelCount(Integer cancelCount) { + this.cancelCount = cancelCount; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public String getDriverName() { + return driverName; + } + + public void setDriverName(String driverName) { + this.driverName = driverName; + } + + public String getDriverPhone() { + return driverPhone; + } + + public void setDriverPhone(String driverPhone) { + this.driverPhone = driverPhone; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordAgentResp.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordAgentResp.java new file mode 100644 index 0000000..a978f28 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordAgentResp.java @@ -0,0 +1,83 @@ +package com.stylefeng.guns.modular.system.controller.resp; + +import com.stylefeng.guns.modular.system.model.TRechargeRecord; +import io.swagger.annotations.ApiModelProperty; + +public class TRechargeRecordAgentResp extends TRechargeRecord { + + @ApiModelProperty(value = "司机姓名") + private String driverName; + + @ApiModelProperty(value = "司机手机号") + private String driverPhone; + + @ApiModelProperty(value = "代理商姓名") + private String principal; + + @ApiModelProperty(value = "联系电话") + private String principalPhone; + @ApiModelProperty(value = "省份") + private String provinceName; + + @ApiModelProperty(value = "市区") + private String cityName; + + @ApiModelProperty(value = "代理区域") + private String area; + + public String getCityName() { + return cityName; + } + + public void setCityName(String cityName) { + this.cityName = cityName; + } + + public String getProvinceName() { + return provinceName; + } + + public void setProvinceName(String provinceName) { + this.provinceName = provinceName; + } + + public String getDriverName() { + return driverName; + } + + public void setDriverName(String driverName) { + this.driverName = driverName; + } + + public String getDriverPhone() { + return driverPhone; + } + + public void setDriverPhone(String driverPhone) { + this.driverPhone = driverPhone; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public String getPrincipalPhone() { + return principalPhone; + } + + public void setPrincipalPhone(String principalPhone) { + this.principalPhone = principalPhone; + } + + public String getArea() { + return area; + } + + public void setArea(String area) { + this.area = area; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordUserResp.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordUserResp.java new file mode 100644 index 0000000..adc6099 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordUserResp.java @@ -0,0 +1,29 @@ +package com.stylefeng.guns.modular.system.controller.resp; + +import com.stylefeng.guns.modular.system.model.TRechargeRecord; +import io.swagger.annotations.ApiModelProperty; + +public class TRechargeRecordUserResp extends TRechargeRecord { + + @ApiModelProperty(value = "用户姓名") + private String userName; + + @ApiModelProperty(value = "用户手机号") + private String userPhone; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java index 5fcf581..f8f86c5 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java @@ -54,7 +54,7 @@ private Map<String, Integer> loginFailures = new HashMap<>(); - private List<String> ips = Arrays.asList("127.0.0.1"); + private List<String> ips = Arrays.asList("127.0.0.1","192.168.0.247"); @@ -164,9 +164,7 @@ // 校验密码 ShiroUser shiroUser1 = shiroFactory.shiroUser(user); SimpleAuthenticationInfo info = shiroFactory.info(shiroUser1, user, username); - System.out.println(info.getCredentials()); String pass = ShiroKit.md5(password, user.getSalt()); - System.out.println(pass); if(!info.getCredentials().equals(pass)){ f++; loginFailures.put(username, f); diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCancelOrderMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCancelOrderMapper.java new file mode 100644 index 0000000..a2f70da --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCancelOrderMapper.java @@ -0,0 +1,46 @@ +package com.stylefeng.guns.modular.system.dao; + +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.model.TCancelOrder; +import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * <p> + * 订单取消记录 Mapper 接口 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +@Mapper +public interface TCancelOrderMapper extends BaseMapper<TCancelOrder> { + + /** + * 查询取消订单列表 + * @param startTime + * @param endTime + * @param code + * @param source + * @param userName + * @param userPhone + * @param state + * @param driverName + * @return + */ + List<TOrderResp> getCancelOrderList(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("code") String code, + @Param("source") Integer source, @Param("userName")String userName, @Param("userPhone")String userPhone, + @Param("state")Integer state, @Param("driverName")String driverName,@Param("roleType")Integer roleType, + @Param("objectId")Integer objectId); + + /** + * 订单异常详情页面的取消记录列表 + * @param userId + * @param orderId + * @return + */ + List<TOrderResp> userCancelOrderList(@Param("userId") Integer userId,@Param("orderId") Integer orderId); +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TComplaintMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TComplaintMapper.java index bca3029..bad622f 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TComplaintMapper.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TComplaintMapper.java @@ -1,34 +1,35 @@ package com.stylefeng.guns.modular.system.dao; -import com.baomidou.mybatisplus.plugins.Page; +import com.stylefeng.guns.modular.system.controller.resp.TComplaintResp; import com.stylefeng.guns.modular.system.model.TComplaint; import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Map; /** * <p> - * 投诉管理 Mapper 接口 + * 投诉 Mapper 接口 * </p> * - * @author 吕雪 - * @since 2020-06-09 + * @author stylefeng + * @since 2023-03-02 */ +@Mapper public interface TComplaintMapper extends BaseMapper<TComplaint> { /** - * 根据条件查询投诉列表 + *获取列表 + * @param startTime + * @param endTime + * @param userName + * @param userPhone + * @param driverPhone + * @param state * @return */ - List<Map<String,Object>> getComplaintList(@Param("page") Page<Map<String, Object>> page, - @Param("roleType") Integer roleType, - @Param("nowUserId") Integer nowUserId, - @Param("beginTime") String beginTime, - @Param("endTime") String endTime, - @Param("userName") String userName, - @Param("userPhone") String userPhone, - @Param("driverPhone") String driverPhone, - @Param("isHandle") Integer isHandle); + List<TComplaintResp> getPageList(@Param("startTime") String startTime,@Param("endTime") String endTime, @Param("userName")String userName, + @Param("userPhone")String userPhone, @Param("driverPhone")String driverPhone, @Param("state")Integer state); + } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TEvaluateMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TEvaluateMapper.java new file mode 100644 index 0000000..a743632 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TEvaluateMapper.java @@ -0,0 +1,34 @@ +package com.stylefeng.guns.modular.system.dao; + +import com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp; +import com.stylefeng.guns.modular.system.model.TEvaluate; +import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * <p> + * 订单评价 Mapper 接口 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +@Mapper +public interface TEvaluateMapper extends BaseMapper<TEvaluate> { + + /** + * 查询评论列表 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @param userName 评论用户名 + * @param driverName 评论司机名 + * @param orderType 订单类型 + * @param score 评价分数 + * @return + */ + List<TEvaluateResp> selectPageList(@Param("startTime") String startTime,@Param("endTime") String endTime, @Param("userName")String userName, + @Param("driverName")String driverName, @Param("orderType")Integer orderType, @Param("score")Integer score); +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java index 58b6a54..9a2e7bb 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java @@ -1,8 +1,12 @@ package com.stylefeng.guns.modular.system.dao; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; import com.stylefeng.guns.modular.system.model.TOrder; import com.baomidou.mybatisplus.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * <p> @@ -15,4 +19,20 @@ @Mapper public interface TOrderMapper extends BaseMapper<TOrder> { + /** + * 查询订单列表 + * @param startTime + * @param endTime + * @param code + * @param source + * @param userName + * @param userPhone + * @param state + * @param driverName + * @return + */ + List<TOrderResp> getOrderList(@Param("startTime") String startTime,@Param("endTime")String endTime, @Param("code") String code, + @Param("source") Integer source,@Param("userName")String userName, @Param("userPhone")String userPhone, + @Param("state")Integer state,@Param("driverName")String driverName,@Param("isException") Integer isException, + @Param("roleType")Integer roleType,@Param("objectId")Integer objectId); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRechargeRecordMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRechargeRecordMapper.java index 47d2618..72c639b 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRechargeRecordMapper.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRechargeRecordMapper.java @@ -1,8 +1,13 @@ package com.stylefeng.guns.modular.system.dao; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordAgentResp; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp; import com.stylefeng.guns.modular.system.model.TRechargeRecord; import com.baomidou.mybatisplus.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * <p> @@ -10,9 +15,23 @@ * </p> * * @author stylefeng - * @since 2023-02-20 + * @since 2023-03-10 */ @Mapper public interface TRechargeRecordMapper extends BaseMapper<TRechargeRecord> { + /** + * 用户充值记录查询 + * @param userName 用户名 + * @param userPhone 用户手机号 + * @param code 流水号 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return List<TRechargeRecordUserResp> + */ + List<TRechargeRecordUserResp> userRecharge(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("userName")String userName, + @Param("userPhone")String userPhone, @Param("code")String code); + + List<TRechargeRecordAgentResp> agentRechargeList(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("driverName")String driverName, + @Param("driverPhone")String driverPhone, @Param("roleType")Integer roleType, @Param("objectId")Integer objectId); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemConfigMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemConfigMapper.java new file mode 100644 index 0000000..02ee4df --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemConfigMapper.java @@ -0,0 +1,18 @@ +package com.stylefeng.guns.modular.system.dao; + +import com.stylefeng.guns.modular.system.model.TSystemConfig; +import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * <p> + * 系统配置 Mapper 接口 + * </p> + * + * @author stylefeng + * @since 2023-03-02 + */ +@Mapper +public interface TSystemConfigMapper extends BaseMapper<TSystemConfig> { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserToCouponMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserToCouponMapper.java new file mode 100644 index 0000000..2f3614a --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserToCouponMapper.java @@ -0,0 +1,18 @@ +package com.stylefeng.guns.modular.system.dao; + +import com.stylefeng.guns.modular.system.model.TUserToCoupon; +import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * <p> + * 用户优惠券中间表 Mapper 接口 + * </p> + * + * @author stylefeng + * @since 2023-02-28 + */ +@Mapper +public interface TUserToCouponMapper extends BaseMapper<TUserToCoupon> { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TYouTuiMapper.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TYouTuiMapper.java new file mode 100644 index 0000000..a5eef6e --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TYouTuiMapper.java @@ -0,0 +1,16 @@ +package com.stylefeng.guns.modular.system.dao; + +import com.stylefeng.guns.modular.system.model.TYouTui; +import com.baomidou.mybatisplus.mapper.BaseMapper; + +/** + * <p> + * 优推 Mapper 接口 + * </p> + * + * @author stylefeng + * @since 2023-03-01 + */ +public interface TYouTuiMapper extends BaseMapper<TYouTui> { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml new file mode 100644 index 0000000..25e999b --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.stylefeng.guns.modular.system.dao.TCancelOrderMapper"> + + <!-- 通用查询映射结果 --> + <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TCancelOrder"> + <id column="id" property="id" /> + <result column="orderId" property="orderId" /> + <result column="userType" property="userType" /> + <result column="userId" property="userId" /> + <result column="cause" property="cause" /> + <result column="status" property="status" /> + <result column="createTime" property="createTime" /> + </resultMap> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + id, orderId, userType, userId, cause, status, createTime + </sql> + + <sql id="Base_Column_Order"> + co.id, co.orderId, co.userType, co.userId, co.cause, co.status, co.createTime,o.code, o.`source`, o.startAddress, o.endAddress,o.createTime AS placeTime, + a.nickname AS userName,a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone + </sql> + + <select id="getCancelOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> + select <include refid="Base_Column_Order"></include> + from t_cancel_order co + left join t_order o on co.orderId = o.id + left join t_app_user a on o.userId = a.id + left join t_driver d on o.driverId = d.id + <where> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND co.createTime between #{startTime} and #{endTime} + </if> + <if test="code != null and code != ''"> + AND o.code LIKE concat('%',#{code},'%') + </if> + <if test="source != null"> + AND o.source = #{source} + </if> + <if test="userName != null and userName != ''"> + AND a.nickname LIKE concat('%',#{userName},'%') + </if> + <if test="userPhone != null and userPhone != ''"> + AND a.phone LIKE concat('%',#{userPhone},'%') + </if> + <if test="state != null"> + AND o.state = #{state} + </if> + <if test="driverName != null and driverName != ''"> + AND d.name LIKE concat('%',#{driverName},'%') + </if> + <if test="roleType != null and roleType == 2"> + AND o.branchOfficeId = #{objectId} + </if> + <if test="roleType != null and roleType == 3"> + AND o.agentId = #{objectId} + </if> + AND co.userType = 1 + </where> + ORDER BY co.createTime + </select> + <select id="userCancelOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> + select co.createTime,o.code,o.startAddress,o.endAddress + from t_cancel_order co + left join t_order o on co.orderId = o.id + <where> + <if test="userId != null"> + AND co.userId = #{userId} + </if> + <if test="orderId != null"> + AND co.orderId = #{orderId} + </if> + AND co.userType = 1 + </where> + ORDER BY co.createTime DESC + </select> + +</mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TComplaintMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TComplaintMapper.xml index 2c882fe..3baaa02 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TComplaintMapper.xml +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TComplaintMapper.xml @@ -6,55 +6,45 @@ <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TComplaint"> <id column="id" property="id" /> <result column="userId" property="userId" /> - <result column="reason" property="reason" /> <result column="driverId" property="driverId" /> - <result column="description" property="description" /> - <result column="isHandle" property="isHandle" /> - <result column="insert_time" property="insertTime" /> - <result column="handleResult" property="handleResult" /> - <result column="handleUserId" property="handleUserId" /> + <result column="reason" property="reason" /> + <result column="notes" property="notes" /> + <result column="state" property="state" /> + <result column="status" property="status" /> + <result column="createTime" property="createTime" /> + <result column="auditId" property="auditId" /> + <result column="auditPersonName" property="auditPersonName" /> + <result column="auditTime" property="auditTime" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> - id, userId, reason, driverId, description, isHandle, insert_time, handleResult, handleUserId + id, userId, driverId, reason, notes, state, status, createTime,auditId,auditPersonName,auditTime </sql> - - <!--根据条件查询投诉列表--> - <select id="getComplaintList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> - SELECT * FROM (SELECT di.companyId,di.franchiseeId,ui.nickName as userName,ui.phone as userPhone,di.`name` as driverName,di.phone as driverPhone,si.`name` as handleUserName,cc.* FROM t_complaint as cc - LEFT JOIN (select * from t_user where flag != 3) as ui on ui.id = cc.userId - LEFT JOIN (select * from t_driver where flag != 3) as di on di.id = cc.driverId - LEFT JOIN sys_user as si on si.id = cc.handleUserId - ) as o + <select id="getPageList" resultType="com.stylefeng.guns.modular.system.controller.resp.TComplaintResp"> + select c.id, c.userId, c.driverId, c.reason, c.notes, c.state, c.status, c.createTime,c.auditId,c.auditPersonName,c.auditTime, + au.nickname AS userName,au.phone AS userPhone,d.phone AS driverPhone + from t_complaint c + left join t_app_user au on c.userId = au.id + left join t_driver d on c.driverId = d.id <where> - 1 = 1 - <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> - AND (o.insert_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND c.createTime between #{startTime} and #{endTime} </if> <if test="userName != null and userName != ''"> - and o.userName LIKE CONCAT('%',#{userName},'%') + AND au.nickname LIKE concat('%',#{userName},'%') </if> <if test="userPhone != null and userPhone != ''"> - and o.userPhone LIKE CONCAT('%',#{userPhone},'%') + AND au.phone LIKE concat('%',#{userPhone},'%') </if> <if test="driverPhone != null and driverPhone != ''"> - and o.driverPhone LIKE CONCAT('%',#{driverPhone},'%') + AND d.phone LIKE concat('%',#{driverPhone},'%') </if> - <if test="isHandle != null and isHandle != '' and isHandle == 2"> - and o.isHandle = 0 - </if> - <if test="isHandle != null and isHandle != '' and isHandle == 1"> - and o.isHandle = 1 - </if> - <if test="roleType != null and roleType != '' and roleType == 2"> - and o.companyId = #{nowUserId} and (o.franchiseeId = 0 or o.franchiseeId is null) - </if> - <if test="roleType != null and roleType != '' and roleType == 3"> - and o.franchiseeId = #{nowUserId} + <if test="state != null"> + AND c.state = #{state} </if> </where> - order by o.id desc + ORDER BY c.state </select> </mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEvaluateMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEvaluateMapper.xml new file mode 100644 index 0000000..e0dc37c --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEvaluateMapper.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.stylefeng.guns.modular.system.dao.TEvaluateMapper"> + + <!-- 通用查询映射结果 --> + <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TEvaluate"> + <id column="id" property="id" /> + <result column="orderId" property="orderId" /> + <result column="userId" property="userId" /> + <result column="score" property="score" /> + <result column="evaluate" property="evaluate" /> + <result column="status" property="status" /> + <result column="createTime" property="createTime" /> + </resultMap> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + id, orderId, userId, score, evaluate, status, createTime + </sql> + <select id="selectPageList" resultType="com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp"> + select e.id, e.orderId, e.userId, e.score, e.evaluate, e.status, e.createTime, + a.nickname AS userName,a.phone AS userPhone,o.code,o.agentId,o.branchOfficeId,d.name AS driverName,d.phone AS driverPhone + from t_evaluate e + left join t_app_user a on e.userId = a.id + left join t_order o on e.orderId = o.id + left join t_driver d on o.driverId = d.id + <where> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND e.createTime between #{startTime} and #{endTime} + </if> + <if test="userName != null and userName != ''"> + AND a.nickname LIKE concat('%',#{userName},'%') + </if> + <if test="driverName != null and driverName != ''"> + AND d.name LIKE concat('%',#{driverName},'%') + </if> + <if test="score != null"> + AND e.score = #{score} + </if> + </where> + ORDER BY e.createTime DESC + </select> + +</mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml index 1bdd71a..0a1fd14 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml @@ -8,7 +8,7 @@ <result column="code" property="code" /> <result column="userId" property="userId" /> <result column="driverId" property="driverId" /> - <result column="source" property="source" /> + <result column="`source`" property="source" /> <result column="agentId" property="agentId" /> <result column="branchOfficeId" property="branchOfficeId" /> <result column="startTime" property="startTime" /> @@ -27,7 +27,7 @@ <result column="couponId" property="couponId" /> <result column="payType" property="payType" /> <result column="payTime" property="payTime" /> - <result column="state" property="state" /> + <result column="`state`" property="state" /> <result column="status" property="status" /> <result column="createTime" property="createTime" /> <result column="startDistance" property="startLng" /> @@ -50,10 +50,58 @@ <!-- 通用查询结果列 --> <sql id="Base_Column_List"> - id, code, userId, driverId, source, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, - boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, state, status, createTime, + id, code, userId, driverId, `source`, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, + boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, `state`, status, createTime, startDistance,startPrice,overDriveDistance,overDrivePrice,longDistance,longDistancePrice,overLongDistance,overLongDistancePrice, waitTime,waitTimePrice,outWaitTime,outWaitTimePrice,badWeatherDistance,badWeatherPrice,overBadWeatherDistance,overBadWeatherPrice </sql> + <sql id="Base_Column_Order"> + o.id, o.code, o.userId, o.driverId, o.`source`, o.agentId, o.branchOfficeId, o.startTime, o.startAddress, o.startLat, o.startLng, o.endAddress, o.endLat, o.endLng, + o.boardingTime, o.getoffTime, o.estimatedPrice, o.orderMoney, o.payMoney, o.discountedPrice, o.couponId, o.payType, o.payTime, o.`state`, o.status, o.createTime, + o.startDistance,o.startPrice,o.overDriveDistance,o.overDrivePrice,o.longDistance,o.longDistancePrice,o.overLongDistance,o.overLongDistancePrice, +o.waitTime,o.waitTimePrice,o.outWaitTime,o.outWaitTimePrice,o.badWeatherDistance,o.badWeatherPrice,o.overBadWeatherDistance,o.overBadWeatherPrice,a.nickname AS userName, + a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone + </sql> + + <select id="getOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> + select <include refid="Base_Column_Order"></include> + from t_order o + left join t_app_user a on o.userId = a.id + left join t_driver d on o.driverId = d.id + <where> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND o.createTime between #{startTime} and #{endTime} + </if> + <if test="code != null and code != ''"> + AND o.code LIKE concat('%',#{code},'%') + </if> + <if test="source != null"> + AND o.source = #{source} + </if> + <if test="userName != null and userName != ''"> + AND a.nickname LIKE concat('%',#{userName},'%') + </if> + <if test="userPhone != null and userPhone != ''"> + AND a.phone LIKE concat('%',#{userPhone},'%') + </if> + <if test="state != null"> + AND o.state = #{state} + </if> + <if test="driverName != null and driverName != ''"> + AND d.name LIKE concat('%',#{driverName},'%') + </if> + <if test="isException != null"> + AND a.is_exception = #{isException} + </if> + <if test="roleType != null and roleType == 2"> + AND o.branchOfficeId = #{objectId} + </if> + <if test="roleType != null and roleType == 3"> + AND o.agentId = #{objectId} + </if> + </where> + ORDER BY o.createTime + </select> + </mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRechargeRecordMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRechargeRecordMapper.xml index 97e6cf3..5bd2456 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRechargeRecordMapper.xml +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRechargeRecordMapper.xml @@ -18,7 +18,51 @@ <!-- 通用查询结果列 --> <sql id="Base_Column_List"> - id, type, userId, code, amount, payType, payTime, payStatus, orderNumber, createTime + id, `type`, userId, code, amount, payType, payTime, payStatus, orderNumber, createTime </sql> + <select id="userRecharge" resultType="com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp"> + select rr.id, rr.`type`, rr.userId, rr.code, rr.amount, rr.payType, rr.payTime, rr.payStatus, rr.orderNumber, rr.createTime,au.nickname AS userName,au.phone AS userPhone + from t_recharge_record rr + left join t_app_user au on rr.userId = au.id + <where> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND rr.createTime between #{startTime} and #{endTime} + </if> + <if test="userName != null and userName != ''"> + AND au.nickname LIKE concat('%',#{userName},'%') + </if> + <if test="userPhone != null and userPhone != ''"> + AND au.phone LIKE concat('%',#{userPhone},'%') + </if> + <if test="code != null and code != ''"> + AND rr.code LIKE concat('%',#{code},'%') + </if> + AND rr.`type` = 1 + </where> + ORDER BY rr.createTime DESC + </select> + <select id="agentRechargeList" resultType="com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordAgentResp"> + select rr.id, rr.`type`, rr.userId, rr.code, rr.amount, rr.payType, rr.payTime, rr.payStatus, rr.orderNumber, rr.createTime, + d.name AS driverName,d.phone AS driverPhone,a.principal,a.principalPhone,a.provinceName,a.cityName + from t_recharge_record rr + left join t_driver d on rr.userId = d.id + left join t_agent a on d.agentId = a.id + <where> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND rr.createTime between #{startTime} and #{endTime} + </if> + <if test="driverName != null and driverName != ''"> + AND d.name LIKE concat('%',#{driverName},'%') + </if> + <if test="driverPhone != null and driverPhone != ''"> + AND d.phone LIKE concat('%',#{driverPhone},'%') + </if> + <if test="roleType != null and roleType == 3"> + AND a.id = #{objectId} + </if> + AND rr.`type` = 3 + </where> + ORDER BY rr.createTime DESC + </select> </mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemConfigMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemConfigMapper.xml new file mode 100644 index 0000000..3bcdc97 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemConfigMapper.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.stylefeng.guns.modular.system.dao.TSystemConfigMapper"> + + <!-- 通用查询映射结果 --> + <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TSystemConfig"> + <id column="id" property="id" /> + <result column="type" property="type" /> + <result column="content" property="content" /> + </resultMap> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + id, type, content + </sql> + +</mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserToCouponMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserToCouponMapper.xml new file mode 100644 index 0000000..9032559 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserToCouponMapper.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.stylefeng.guns.modular.system.dao.TUserToCouponMapper"> + + <!-- 通用查询映射结果 --> + <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TUserToCoupon"> + <id column="id" property="id" /> + <result column="userId" property="userId" /> + <result column="couponId" property="couponId" /> + <result column="couponTotal" property="couponTotal" /> + <result column="validCount" property="validCount" /> + <result column="expireTime" property="expireTime" /> + <result column="createTime" property="createTime" /> + <result column="status" property="status" /> + </resultMap> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + id, userId, couponId, couponTotal, validCount, expireTime, createTime, status + </sql> + +</mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TYouTuiMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TYouTuiMapper.xml new file mode 100644 index 0000000..4e2ef0c --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TYouTuiMapper.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.stylefeng.guns.modular.system.dao.TYouTuiMapper"> + + <!-- 通用查询映射结果 --> + <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TYouTui"> + <id column="id" property="id" /> + <result column="name" property="name" /> + <result column="type" property="type" /> + <result column="number" property="number" /> + <result column="integral" property="integral" /> + <result column="effectiveTime" property="effectiveTime" /> + <result column="content" property="content" /> + <result column="status" property="status" /> + <result column="createTime" property="createTime" /> + </resultMap> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + id, name, type, number, integral, effectiveTime, content, status, createTime + </sql> + +</mapper> diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/OrderStateEnum.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/OrderStateEnum.java index dacda5f..17af1fa 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/OrderStateEnum.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/OrderStateEnum.java @@ -20,7 +20,8 @@ WAIT_EVALUATED(107, "待评价"), FINISH(108, "已完成"), TRANSFERRING(201, "转单中"), - CANCELED(301,"已取消"); + CANCELED(301,"已取消"), + WAITING(401,"等待中"); private String desc; diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAppUser.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAppUser.java index a53ccae..3074beb 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAppUser.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAppUser.java @@ -89,6 +89,15 @@ @TableField(value = "remark") private String remark; + /** + * 取消订单次数,取消一次添加一次,若成功接单清零 + */ + @TableField(value = "cancelCount") + private Integer cancelCount; + + @ApiModelProperty(value = "是否拥有9折优惠 1是 0否") + @TableField(value = "havDiscount") + private Integer havDiscount; @TableField(exist = false) @ApiModelProperty(value = "注册开始时间") @@ -98,6 +107,22 @@ @ApiModelProperty(value = "注册结束时间") private Date endTime; + public Integer getHavDiscount() { + return havDiscount; + } + + public void setHavDiscount(Integer havDiscount) { + this.havDiscount = havDiscount; + } + + public Integer getCancelCount() { + return cancelCount; + } + + public void setCancelCount(Integer cancelCount) { + this.cancelCount = cancelCount; + } + public Integer getIsException() { return isException; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java index 324c224..fca2f76 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java @@ -1,10 +1,13 @@ 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 io.swagger.annotations.ApiModelProperty; + import java.io.Serializable; /** @@ -73,7 +76,85 @@ * 添加时间 */ private Date createTime; + /** + * 分公司名称 + */ + private String branchOfficeName; + /** + * 经营业务 1司机代驾 + */ + private Integer operatingBusiness; + /** + * 开户银行 + */ + @TableField(value = "bankDeposit") + @ApiModelProperty(value = "开户银行") + private String bankDeposit; + + /** + * 银行账户 + */ + @TableField(value = "bankAccount") + @ApiModelProperty(value = "银行账户") + private String bankAccount; + + + @TableField(exist = false) + @ApiModelProperty(value = "区域") + private String area; + + @TableField(exist = false) + @ApiModelProperty(value = "区域id") + private String areaId; + + public String getBankDeposit() { + return bankDeposit; + } + + public void setBankDeposit(String bankDeposit) { + this.bankDeposit = bankDeposit; + } + + public String getBankAccount() { + return bankAccount; + } + + public void setBankAccount(String bankAccount) { + this.bankAccount = bankAccount; + } + + public String getArea() { + return area; + } + + public void setArea(String area) { + this.area = area; + } + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getBranchOfficeName() { + return branchOfficeName; + } + + public void setBranchOfficeName(String branchOfficeName) { + this.branchOfficeName = branchOfficeName; + } + + public Integer getOperatingBusiness() { + return operatingBusiness; + } + + public void setOperatingBusiness(Integer operatingBusiness) { + this.operatingBusiness = operatingBusiness; + } public Integer getId() { return id; diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCancelOrder.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCancelOrder.java new file mode 100644 index 0000000..e2f2b88 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCancelOrder.java @@ -0,0 +1,127 @@ +package com.stylefeng.guns.modular.system.model; + +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; + +/** + * <p> + * 订单取消记录 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +@TableName("t_cancel_order") +public class TCancelOrder extends Model<TCancelOrder> { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 订单id + */ + private Integer orderId; + /** + * 用户类型(1=用户,2=司机) + */ + private Integer userType; + /** + * 用户id + */ + private Integer userId; + /** + * 转单原因 + */ + private String cause; + /** + * 状态(1=正常,2=冻结,3=删除) + */ + private Integer status; + /** + * 添加时间 + */ + private Date createTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public Integer getUserType() { + return userType; + } + + public void setUserType(Integer userType) { + this.userType = userType; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + protected Serializable pkVal() { + return this.id; + } + + @Override + public String toString() { + return "TCancelOrder{" + + "id=" + id + + ", orderId=" + orderId + + ", userType=" + userType + + ", userId=" + userId + + ", cause=" + cause + + ", status=" + status + + ", createTime=" + createTime + + "}"; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TComplaint.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TComplaint.java index 12c78ec..e21402c 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TComplaint.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TComplaint.java @@ -3,18 +3,17 @@ import com.baomidou.mybatisplus.enums.IdType; import java.util.Date; import com.baomidou.mybatisplus.annotations.TableId; -import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; /** * <p> - * 投诉管理 + * 投诉 * </p> * - * @author 吕雪 - * @since 2020-06-09 + * @author stylefeng + * @since 2023-03-02 */ @TableName("t_complaint") public class TComplaint extends Model<TComplaint> { @@ -27,49 +26,68 @@ @TableId(value = "id", type = IdType.AUTO) private Integer id; /** - * 用户Id + * 用户id */ private Integer userId; + /** + * 投诉司机id + */ + private Integer driverId; /** * 投诉原因 */ private String reason; /** - * 被投诉人Id + * 注释 */ - private Long driverId; + private String notes; /** - * 描述 + * 处理状态(1=待处理,2=已处理) */ - private String description; + private Integer state; /** - * 是否处理(0:未处理,1:已处理) + * 状态(1=正常,2=冻结,3=删除) */ - private Integer isHandle; + private Integer status; /** - * 投诉时间 + * 添加时间 */ - @TableField("insert_time") - private Date insertTime; - /** - * 处理结果 - */ - private String handleResult; + private Date createTime; /** * 处理人id */ - private Integer handleUserId; + private Integer auditId; + /** + * 处理人名称 + */ + private String auditPersonName; /** * 处理时间 */ - private Date handleTime; + private Date auditTime; - public Date getHandleTime() { - return handleTime; + public Date getAuditTime() { + return auditTime; } - public void setHandleTime(Date handleTime) { - this.handleTime = handleTime; + public void setAuditTime(Date auditTime) { + this.auditTime = auditTime; + } + + public Integer getAuditId() { + return auditId; + } + + public void setAuditId(Integer auditId) { + this.auditId = auditId; + } + + public String getAuditPersonName() { + return auditPersonName; + } + + public void setAuditPersonName(String auditPersonName) { + this.auditPersonName = auditPersonName; } public Integer getId() { @@ -88,6 +106,14 @@ this.userId = userId; } + public Integer getDriverId() { + return driverId; + } + + public void setDriverId(Integer driverId) { + this.driverId = driverId; + } + public String getReason() { return reason; } @@ -96,52 +122,36 @@ this.reason = reason; } - public Long getDriverId() { - return driverId; + public String getNotes() { + return notes; } - public void setDriverId(Long driverId) { - this.driverId = driverId; + public void setNotes(String notes) { + this.notes = notes; } - public String getDescription() { - return description; + public Integer getState() { + return state; } - public void setDescription(String description) { - this.description = description; + public void setState(Integer state) { + this.state = state; } - public Integer getIsHandle() { - return isHandle; + public Integer getStatus() { + return status; } - public void setIsHandle(Integer isHandle) { - this.isHandle = isHandle; + public void setStatus(Integer status) { + this.status = status; } - public Date getInsertTime() { - return insertTime; + public Date getCreateTime() { + return createTime; } - public void setInsertTime(Date insertTime) { - this.insertTime = insertTime; - } - - public String getHandleResult() { - return handleResult; - } - - public void setHandleResult(String handleResult) { - this.handleResult = handleResult; - } - - public Integer getHandleUserId() { - return handleUserId; - } - - public void setHandleUserId(Integer handleUserId) { - this.handleUserId = handleUserId; + public void setCreateTime(Date createTime) { + this.createTime = createTime; } @Override @@ -154,13 +164,12 @@ return "TComplaint{" + "id=" + id + ", userId=" + userId + - ", reason=" + reason + ", driverId=" + driverId + - ", description=" + description + - ", isHandle=" + isHandle + - ", insertTime=" + insertTime + - ", handleResult=" + handleResult + - ", handleUserId=" + handleUserId + + ", reason=" + reason + + ", notes=" + notes + + ", state=" + state + + ", status=" + status + + ", createTime=" + createTime + "}"; } } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java index d2b091b..bb4b822 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java @@ -89,6 +89,30 @@ @TableField("coupon_state") private Integer couponState; + @ApiModelProperty(value = "优惠券数量") + @TableField("coupon_count") + private Integer couponCount; + + @ApiModelProperty(value = "剩余数量") + @TableField("remaining_quantity") + private Integer remainingQuantity; + + public Integer getRemainingQuantity() { + return remainingQuantity; + } + + public void setRemainingQuantity(Integer remainingQuantity) { + this.remainingQuantity = remainingQuantity; + } + + public Integer getCouponCount() { + return couponCount; + } + + public void setCouponCount(Integer couponCount) { + this.couponCount = couponCount; + } + public Integer getAgentId() { return agentId; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TEvaluate.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TEvaluate.java new file mode 100644 index 0000000..95e6ce9 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TEvaluate.java @@ -0,0 +1,127 @@ +package com.stylefeng.guns.modular.system.model; + +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; + +/** + * <p> + * 订单评价 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +@TableName("t_evaluate") +public class TEvaluate extends Model<TEvaluate> { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 订单id + */ + private Integer orderId; + /** + * 用户id + */ + private Integer userId; + /** + * 评分 + */ + private Integer score; + /** + * 评价内容 + */ + private String evaluate; + /** + * 状态(1=正常,2=冻结,3=删除) + */ + private Integer status; + /** + * 添加时间 + */ + private Date createTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public String getEvaluate() { + return evaluate; + } + + public void setEvaluate(String evaluate) { + this.evaluate = evaluate; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + protected Serializable pkVal() { + return this.id; + } + + @Override + public String toString() { + return "TEvaluate{" + + "id=" + id + + ", orderId=" + orderId + + ", userId=" + userId + + ", score=" + score + + ", evaluate=" + evaluate + + ", status=" + status + + ", createTime=" + createTime + + "}"; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrder.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrder.java index 4825eed..6f06c4e 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrder.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrder.java @@ -177,6 +177,17 @@ @ApiModelProperty(value = "恶劣天气超出费") private BigDecimal overBadWeatherPrice; + @ApiModelProperty(value = "折扣优惠金额") + private BigDecimal discountAmount; + + public BigDecimal getDiscountAmount() { + return discountAmount; + } + + public void setDiscountAmount(BigDecimal discountAmount) { + this.discountAmount = discountAmount; + } + public Double getStartDistance() { return startDistance; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRechargeRecord.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRechargeRecord.java index e39acc1..2e3ec9a 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRechargeRecord.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRechargeRecord.java @@ -14,7 +14,7 @@ * </p> * * @author stylefeng - * @since 2023-02-20 + * @since 2023-03-10 */ @TableName("t_recharge_record") public class TRechargeRecord extends Model<TRechargeRecord> { @@ -27,7 +27,7 @@ @TableId(value = "id", type = IdType.AUTO) private Integer id; /** - * 数据类型(1=用户,2=司机) + * 数据类型(1=用户,2=司机,3 = 代理商) */ private Integer type; /** @@ -43,7 +43,7 @@ */ private BigDecimal amount; /** - * 支付方式(1=微信) + * 支付方式(1=微信 2 = 系统充值) */ private Integer payType; /** @@ -62,7 +62,18 @@ * 添加时间 */ private Date createTime; + /** + * 代理商id + */ + private Integer agentId; + public Integer getAgentId() { + return agentId; + } + + public void setAgentId(Integer agentId) { + this.agentId = agentId; + } public Integer getId() { return id; diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemConfig.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemConfig.java new file mode 100644 index 0000000..ac50b8d --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemConfig.java @@ -0,0 +1,74 @@ +package com.stylefeng.guns.modular.system.model; + +import com.baomidou.mybatisplus.enums.IdType; +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.activerecord.Model; +import com.baomidou.mybatisplus.annotations.TableName; +import java.io.Serializable; + +/** + * <p> + * 系统配置 + * </p> + * + * @author stylefeng + * @since 2023-03-02 + */ +@TableName("t_system_config") +public class TSystemConfig extends Model<TSystemConfig> { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 类型(1=派单规则,2=佣金分成规则,3=抽成规则,4=积分规则,5=价格规则,6=余额规则,7=客服管理) + */ + private Integer type; + /** + * 内容 + */ + private String content; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + @Override + protected Serializable pkVal() { + return this.id; + } + + @Override + public String toString() { + return "TSystemConfig{" + + "id=" + id + + ", type=" + type + + ", content=" + content + + "}"; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUserToCoupon.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUserToCoupon.java new file mode 100644 index 0000000..bb3e385 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUserToCoupon.java @@ -0,0 +1,152 @@ +package com.stylefeng.guns.modular.system.model; + +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; + +/** + * <p> + * 用户优惠券中间表 + * </p> + * + * @author stylefeng + * @since 2023-02-28 + */ +@TableName("t_user_to_coupon") +public class TUserToCoupon extends Model<TUserToCoupon> { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 用户id + */ + private Integer userId; + /** + * 优惠券id + */ + private Integer couponId; + /** + * 领取总数量 + */ + private Integer couponTotal; + /** + * 有效数量 + */ + private Integer validCount; + /** + * 过期时间 + */ + private Date expireTime; + /** + * 创建时间-领取时间 + */ + private Date createTime; + /** + * 状态 1正常 2冻结 3删除 + */ + private Integer status; + + /** + * 过期数量 + */ + private Integer expireCount; + + public Integer getExpireCount() { + return expireCount; + } + + public void setExpireCount(Integer expireCount) { + this.expireCount = expireCount; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getCouponId() { + return couponId; + } + + public void setCouponId(Integer couponId) { + this.couponId = couponId; + } + + public Integer getCouponTotal() { + return couponTotal; + } + + public void setCouponTotal(Integer couponTotal) { + this.couponTotal = couponTotal; + } + + public Integer getValidCount() { + return validCount; + } + + public void setValidCount(Integer validCount) { + this.validCount = validCount; + } + + public Date getExpireTime() { + return expireTime; + } + + public void setExpireTime(Date expireTime) { + this.expireTime = expireTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + protected Serializable pkVal() { + return this.id; + } + + @Override + public String toString() { + return "TUserToCoupon{" + + "id=" + id + + ", userId=" + userId + + ", couponId=" + couponId + + ", couponTotal=" + couponTotal + + ", validCount=" + validCount + + ", expireTime=" + expireTime + + ", createTime=" + createTime + + ", status=" + status + + "}"; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TYouTui.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TYouTui.java new file mode 100644 index 0000000..3378d21 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TYouTui.java @@ -0,0 +1,176 @@ +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 io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + +/** + * <p> + * 优推 + * </p> + * + * @author stylefeng + * @since 2023-03-01 + */ +@TableName("t_you_tui") +public class TYouTui extends Model<TYouTui> { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 名称 + */ + private String name; + /** + * 优推类型(1=次数,2=小时) + */ + private Integer type; + /** + * 优推值 + */ + private Integer number; + /** + * 所需积分 + */ + private Integer integral; + /** + * 有效天数 + */ + private Integer effectiveTime; + /** + * 服务内容 + */ + private String content; + /** + * 状态(1=正常,2=冻结,3=删除) + */ + private Integer status; + /** + * 添加时间 + */ + private Date createTime; + @ApiModelProperty(value = "优推距离") + private Integer distance; + + @TableField(exist = false) + private String serviceContent; + + public String getServiceContent() { + return serviceContent; + } + + public void setServiceContent(String serviceContent) { + this.serviceContent = serviceContent; + } + + public Integer getDistance() { + return distance; + } + + public void setDistance(Integer distance) { + this.distance = distance; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public Integer getIntegral() { + return integral; + } + + public void setIntegral(Integer integral) { + this.integral = integral; + } + + public Integer getEffectiveTime() { + return effectiveTime; + } + + public void setEffectiveTime(Integer effectiveTime) { + this.effectiveTime = effectiveTime; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + protected Serializable pkVal() { + return this.id; + } + + @Override + public String toString() { + return "TYouTui{" + + "id=" + id + + ", name=" + name + + ", type=" + type + + ", number=" + number + + ", integral=" + integral + + ", effectiveTime=" + effectiveTime + + ", content=" + content + + ", status=" + status + + ", createTime=" + createTime + + "}"; + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBranchOfficeService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBranchOfficeService.java index d07d5fc..ff45da3 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBranchOfficeService.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBranchOfficeService.java @@ -1,7 +1,11 @@ package com.stylefeng.guns.modular.system.service; +import com.stylefeng.guns.modular.system.controller.resp.TBranchOfficeResp; import com.stylefeng.guns.modular.system.model.TBranchOffice; import com.baomidou.mybatisplus.service.IService; +import org.springframework.ui.Model; + +import java.util.List; /** * <p> @@ -13,4 +17,35 @@ */ public interface ITBranchOfficeService extends IService<TBranchOffice> { + /** + * 跳转到详情 + * @param tBranchOfficeId + * @param model + */ + void tBranchOfficeDetail(Integer tBranchOfficeId, Model model); + + /** + * 分公司获取列表 + * @param branchOfficeName + * @param principal + * @param principalPhone + * @param operatingBusiness + * @param status + * @return + */ + List<TBranchOfficeResp> getPageList(String branchOfficeName, String principal, String principalPhone, Integer operatingBusiness, Integer status); + + /** + * 分公司查询优惠券,订单,司机等信息 + * @param tBranchOfficeRespList + */ + void queryOtherInfo(List<TBranchOfficeResp> tBranchOfficeRespList); + + /** + * 匹配代理商信息 + * @param tBranchOffice + * @return + */ + Object addOrUpdate(TBranchOffice tBranchOffice); + } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCancelOrderService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCancelOrderService.java new file mode 100644 index 0000000..24da899 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCancelOrderService.java @@ -0,0 +1,47 @@ +package com.stylefeng.guns.modular.system.service; + +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.model.TCancelOrder; +import com.baomidou.mybatisplus.service.IService; +import org.springframework.ui.Model; + +import java.util.List; + +/** + * <p> + * 订单取消记录 服务类 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +public interface ITCancelOrderService extends IService<TCancelOrder> { + + + /** + * 查询取消订单列表 + * @param createTime + * @param code + * @param source + * @param userName + * @param userPhone + * @param state + * @param driverName + * @return + */ + List<TOrderResp> getCancelOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName); + + /** + * 跳转详情页面 + * @param cancelOrderId + * @param model + */ + void cancelOrderDetail(Integer cancelOrderId, Model model); + + /** + * + * @param userId + * @return + */ + List<TOrderResp> userCancelOrderList(Integer userId,Integer orderId); +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITComplaintService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITComplaintService.java index 0f0a33c..c8f7335 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITComplaintService.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITComplaintService.java @@ -1,34 +1,29 @@ package com.stylefeng.guns.modular.system.service; -import com.baomidou.mybatisplus.plugins.Page; +import com.stylefeng.guns.modular.system.controller.resp.TComplaintResp; import com.stylefeng.guns.modular.system.model.TComplaint; import com.baomidou.mybatisplus.service.IService; -import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Map; /** * <p> - * 投诉管理 服务类 + * 投诉 服务类 * </p> * - * @author 吕雪 - * @since 2020-06-09 + * @author stylefeng + * @since 2023-03-02 */ public interface ITComplaintService extends IService<TComplaint> { /** - * 根据条件查询投诉列表 + * 获取列表 + * @param createTime + * @param userName + * @param userPhone + * @param driverPhone + * @param state * @return */ - List<Map<String,Object>> getComplaintList(@Param("page") Page<Map<String, Object>> page, - @Param("roleType") Integer roleType, - @Param("nowUserId") Integer nowUserId, - @Param("beginTime") String beginTime, - @Param("endTime") String endTime, - @Param("userName") String userName, - @Param("userPhone") String userPhone, - @Param("driverPhone") String driverPhone, - @Param("isHandle") Integer isHandle); + List<TComplaintResp> getPageList(String createTime, String userName, String userPhone, String driverPhone, Integer state); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITEvaluateService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITEvaluateService.java new file mode 100644 index 0000000..3d49a25 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITEvaluateService.java @@ -0,0 +1,37 @@ +package com.stylefeng.guns.modular.system.service; + +import com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp; +import com.stylefeng.guns.modular.system.model.TEvaluate; +import com.baomidou.mybatisplus.service.IService; +import org.springframework.ui.Model; + +import java.util.List; + +/** + * <p> + * 订单评价 服务类 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +public interface ITEvaluateService extends IService<TEvaluate> { + + /** + * 查询分页列表 + * @param createTime 评价时间 + * @param userName 评论用户名 + * @param driverName 评论司机名 + * @param orderType 订单类型 + * @param score 评价分数 + * @return + */ + List<TEvaluateResp> selectPageList(String createTime, String userName, String driverName, Integer orderType, Integer score); + + /** + * 跳转详情页面 + * @param evaluateId + * @param model + */ + void evaluateDetail(Integer evaluateId, Model model); +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java index 29fb92b..a8306be 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java @@ -1,7 +1,12 @@ package com.stylefeng.guns.modular.system.service; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; import com.stylefeng.guns.modular.system.model.TOrder; import com.baomidou.mybatisplus.service.IService; +import org.springframework.ui.Model; + +import java.util.List; /** * <p> @@ -13,4 +18,30 @@ */ public interface ITOrderService extends IService<TOrder> { + /** + * 获取订单列表 + * @param createTime + * @param code + * @param source + * @param userName + * @param userPhone + * @param state + * @param driverName + * @return + */ + List<TOrderResp> getOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName,Integer isException); + + /** + * 跳转详情页面 + * @param orderId + * @param model + */ + void orderDetail(Integer orderId, Model model); + + /** + * 跳转异常详情页面 + * @param orderId + * @param model + */ + void orderExceptionDetail(Integer orderId, Model model); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRechargeRecordService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRechargeRecordService.java index b65c02d..a795f19 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRechargeRecordService.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRechargeRecordService.java @@ -1,7 +1,11 @@ package com.stylefeng.guns.modular.system.service; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordAgentResp; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp; import com.stylefeng.guns.modular.system.model.TRechargeRecord; import com.baomidou.mybatisplus.service.IService; + +import java.util.List; /** * <p> @@ -9,8 +13,26 @@ * </p> * * @author stylefeng - * @since 2023-02-20 + * @since 2023-03-10 */ public interface ITRechargeRecordService extends IService<TRechargeRecord> { + /** + * 用户充值记录查询 + * @param userName 用户名 + * @param userPhone 用户手机号 + * @param code 流水号 + * @param createTime 充值时间 + * @return List<TRechargeRecordUserResp> + */ + List<TRechargeRecordUserResp> userRecharge(String userName, String userPhone, String code, String createTime); + + /** + * + * @param driverName 司机姓名 + * @param driverPhone 司机手机号 + * @param createTime 充值时间 + * @return List<TRechargeRecordAgentResp> + */ + List<TRechargeRecordAgentResp> agentRechargeList(String driverName, String driverPhone, String createTime); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemConfigService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemConfigService.java new file mode 100644 index 0000000..906697a --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemConfigService.java @@ -0,0 +1,16 @@ +package com.stylefeng.guns.modular.system.service; + +import com.stylefeng.guns.modular.system.model.TSystemConfig; +import com.baomidou.mybatisplus.service.IService; + +/** + * <p> + * 系统配置 服务类 + * </p> + * + * @author stylefeng + * @since 2023-03-02 + */ +public interface ITSystemConfigService extends IService<TSystemConfig> { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserToCouponService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserToCouponService.java new file mode 100644 index 0000000..ae02f6b --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserToCouponService.java @@ -0,0 +1,16 @@ +package com.stylefeng.guns.modular.system.service; + +import com.stylefeng.guns.modular.system.model.TUserToCoupon; +import com.baomidou.mybatisplus.service.IService; + +/** + * <p> + * 用户优惠券中间表 服务类 + * </p> + * + * @author stylefeng + * @since 2023-02-28 + */ +public interface ITUserToCouponService extends IService<TUserToCoupon> { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITYouTuiService.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITYouTuiService.java new file mode 100644 index 0000000..6693957 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITYouTuiService.java @@ -0,0 +1,16 @@ +package com.stylefeng.guns.modular.system.service; + +import com.stylefeng.guns.modular.system.model.TYouTui; +import com.baomidou.mybatisplus.service.IService; + +/** + * <p> + * 优推 服务类 + * </p> + * + * @author stylefeng + * @since 2023-03-01 + */ +public interface ITYouTuiService extends IService<TYouTui> { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java index 584192f..ae176d4 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java @@ -1,6 +1,7 @@ package com.stylefeng.guns.modular.system.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.core.shiro.ShiroKit; import com.stylefeng.guns.core.util.DateUtil; import com.stylefeng.guns.modular.system.controller.resp.TAgentResp; import com.stylefeng.guns.modular.system.dao.*; @@ -67,6 +68,10 @@ Date endTime = DateUtil.getDate_str4(split[1]); wrapper.between("createTime",startTime,endTime); } + // 判断是否为代理商 + if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 3){ + wrapper.eq("id",ShiroKit.getUser().getObjectId()); + } return wrapper; } @@ -106,7 +111,7 @@ } // 优惠券信息 // 过滤代理商发放的优惠券 - List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>().eq("agentId", tAgent.getId())); + List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>()); model.addAttribute("issuedCoupon",tCoupons.size()); // 司机信息 // 司机数 @@ -143,15 +148,15 @@ if(!CollectionUtils.isEmpty(tOrders)){ // 订单总量 - List<TOrder> orderList = tOrders.stream().filter(order -> order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); + List<TOrder> orderList = tOrders.stream().filter(order -> tAgent.getId().equals(order.getAgentId())).collect(Collectors.toList()); tAgentResp.setOrderSum(orderList.size()); // 过滤已完成和待评价订单,且支付金额在14元以上 List<TOrder> orders = tOrders.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) - && 0 < order.getPayMoney().compareTo(new BigDecimal("14")) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); + && 0 < order.getPayMoney().compareTo(new BigDecimal("14")) && tAgent.getId().equals(order.getAgentId())).collect(Collectors.toList()); tAgentResp.setValidOrder(orders.size()); // 过滤已使用优惠券 List<TOrder> usedCoupon = tOrders.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) - && Objects.nonNull(order.getCouponId()) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); + && Objects.nonNull(order.getCouponId()) && tAgent.getId().equals(order.getAgentId())).collect(Collectors.toList()); tAgentResp.setUsedCoupon(usedCoupon.size()); // 已使用优惠券金额求和,已使用优惠券id List<Integer> usedCouponId = usedCoupon.stream().map(TOrder::getCouponId).collect(Collectors.toList()); @@ -162,7 +167,7 @@ if(!CollectionUtils.isEmpty(tCoupons)){ // 过滤代理商发放的优惠券 - List<TCoupon> coupons = tCoupons.stream().filter(coupon -> coupon.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); + List<TCoupon> coupons = tCoupons.stream().filter(coupon -> tAgent.getId().equals(coupon.getAgentId())).collect(Collectors.toList()); tAgentResp.setIssuedCoupon(coupons.size()); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java index a151726..05ac136 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java @@ -4,12 +4,14 @@ import com.stylefeng.guns.core.util.DateUtil; import com.stylefeng.guns.modular.system.dao.TCouponMapper; import com.stylefeng.guns.modular.system.dao.TOrderMapper; +import com.stylefeng.guns.modular.system.dao.TUserToCouponMapper; import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; import com.stylefeng.guns.modular.system.enums.OrderStateEnum; import com.stylefeng.guns.modular.system.model.TAppUser; import com.stylefeng.guns.modular.system.dao.TAppUserMapper; import com.stylefeng.guns.modular.system.model.TCoupon; import com.stylefeng.guns.modular.system.model.TOrder; +import com.stylefeng.guns.modular.system.model.TUserToCoupon; import com.stylefeng.guns.modular.system.service.ITAppUserService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +44,8 @@ private TCouponMapper tCouponMapper; @Autowired private TOrderMapper tOrderMapper; + @Autowired + private TUserToCouponMapper tUserToCouponMapper; @Override public void detail(Integer tAppUserId, Model model) { @@ -57,14 +61,20 @@ model.addAttribute("customerChannel",""); // 消费信息:优惠券数据 - List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUserId)); - List<TCoupon> notUsedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); - List<TCoupon> usedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.USED.getCode())).collect(Collectors.toList()); - List<TCoupon> expiredList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.EXPIRED.getCode())).collect(Collectors.toList()); - model.addAttribute("couponSum",tCoupons.size()); - model.addAttribute("notUsedCount",notUsedList.size()); - model.addAttribute("usedCount",usedList.size()); - model.addAttribute("expiredCount",expiredList.size()); +// List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUserId)); +// List<TCoupon> notUsedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); +// List<TCoupon> usedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.USED.getCode())).collect(Collectors.toList()); +// List<TCoupon> expiredList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.EXPIRED.getCode())).collect(Collectors.toList()); + // 查询当前用户优惠券数量 + List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("userId", tAppUser.getId())); + + int couponTotal = tUserToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); + int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); + int expireCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getExpireCount).sum(); + model.addAttribute("couponSum",couponTotal); + model.addAttribute("notUsedCount",validCount); + model.addAttribute("usedCount",couponTotal-validCount-expireCount); + model.addAttribute("expiredCount",expireCount); // 查询订单数据 List<TOrder> orders = tOrderMapper.selectList(new EntityWrapper<TOrder>().eq("userId", tAppUserId).orderBy(true,"createTime",false)); if(!CollectionUtils.isEmpty(orders)){ diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java index 98aed9f..dc3122b 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java @@ -1,10 +1,30 @@ package com.stylefeng.guns.modular.system.service.impl; -import com.stylefeng.guns.modular.system.model.TBranchOffice; -import com.stylefeng.guns.modular.system.dao.TBranchOfficeMapper; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.core.base.tips.SuccessTip; +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.modular.system.controller.resp.TBranchOfficeResp; +import com.stylefeng.guns.modular.system.dao.*; +import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.ITBranchOfficeService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import com.stylefeng.guns.modular.system.service.ITRegionService; +import org.apache.poi.hdf.extractor.TC; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.ui.Model; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * <p> @@ -17,4 +37,202 @@ @Service public class TBranchOfficeServiceImpl extends ServiceImpl<TBranchOfficeMapper, TBranchOffice> implements ITBranchOfficeService { + @Autowired + private TBranchOfficeMapper tBranchOfficeMapper; + + @Autowired + private TCouponMapper tCouponMapper; + @Autowired + private TUserToCouponMapper tUserToCouponMapper; + + @Autowired + private TOrderMapper tOrderMapper; + @Autowired + private TDriverMapper tDriverMapper; + @Autowired + private ITRegionService tRegionService; + @Autowired + private TAgentMapper tAgentMapper; + + @Override + public void tBranchOfficeDetail(Integer tBranchOfficeId, Model model) { + // 分公司信息 + TBranchOffice tBranchOffice = tBranchOfficeMapper.selectById(tBranchOfficeId); + model.addAttribute("principal",tBranchOffice.getPrincipal()); + model.addAttribute("createTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tBranchOffice.getCreateTime())); + model.addAttribute("email",tBranchOffice.getEmail()); + model.addAttribute("area",tBranchOffice.getProvinceName()+tBranchOffice.getCityName()+tBranchOffice.getDistrictName()); + + // 统计时间 + model.addAttribute("startToEndTime",new SimpleDateFormat("yyyy.MM.dd").format(tBranchOffice.getCreateTime())+"-"+ + new SimpleDateFormat("yyyy.MM.dd").format(new Date())); + + // 订单数据 + List<TOrder> orders = tOrderMapper.selectList(new EntityWrapper<TOrder>().eq("branchOfficeId", tBranchOfficeId)); + model.addAttribute("orderCount",orders.size());// 订单数量 + List<TOrder> effectiveOrder = orders.stream().filter(order -> order.getPayMoney().compareTo(new BigDecimal("15")) > 0).collect(Collectors.toList()); + model.addAttribute("effectiveOrderCount",effectiveOrder.size());// 有效订单 + + // 优惠券数据,,,通过订单找到该区域的下单人,找出优惠券信息 + List<Integer> userIds = orders.stream().map(TOrder::getUserId).collect(Collectors.toList()); + List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().in("userId", userIds)); + // 优惠券有效数量 + int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); + // 过期数量 + int expireCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getExpireCount).sum(); + // 总数量 + int totalCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); + // 已使用优惠券;总数量减去有效数量 + model.addAttribute("usedCount",totalCount-validCount-expireCount); + + // 已发放优惠券 + model.addAttribute("totalCount",totalCount); + + BigDecimal orderPriceCount = new BigDecimal("0"); + + // 累计优惠券金额 + for (TUserToCoupon tUserToCoupon : tUserToCoupons) { + TCoupon tCoupon = tCouponMapper.selectById(tUserToCoupon.getCouponId()); + BigDecimal price = tCoupon.getCouponPreferentialAmount().multiply(new BigDecimal(tUserToCoupon.getCouponTotal())); + orderPriceCount = orderPriceCount.add(price); + } + model.addAttribute("orderPriceCount",orderPriceCount); + // 司机数量 + Integer driverCount = tDriverMapper.selectCount(new EntityWrapper<TDriver>().eq("branchOfficeId", tBranchOfficeId)); + model.addAttribute("driverCount",driverCount); + } + + @Override + public List<TBranchOfficeResp> getPageList(String branchOfficeName, String principal, String principalPhone, Integer operatingBusiness, Integer status) { + EntityWrapper<TBranchOffice> wrapper = new EntityWrapper<>(); + // 分公司名称 + if(StringUtils.hasLength(branchOfficeName)){ + wrapper.like("branchOfficeName",branchOfficeName); + } + // 负责人 + if(StringUtils.hasLength(principal)){ + wrapper.like("principal",principal); + } + // 负责人电话 + if(StringUtils.hasLength(principalPhone)){ + wrapper.like("principalPhone",principalPhone); + } + // 经营业务 + if(Objects.nonNull(operatingBusiness)){ + wrapper.eq("operatingBusiness",operatingBusiness); + } + // 状态 + if(Objects.nonNull(status)){ + wrapper.eq("status",status); + } + // 判断代理商 分公司 + Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); + if(2 == roleType){ + // 分公司 + wrapper.eq("id",objectId); + } + if(3 == roleType){ + // 代理商 + wrapper.eq("agentId",objectId); + } + List<TBranchOffice> tBranchOffices = tBranchOfficeMapper.selectList(wrapper); + List<TBranchOfficeResp> tBranchOfficeRespList = new ArrayList<>(tBranchOffices.size()); + for (TBranchOffice tBranchOffice : tBranchOffices) { + TBranchOfficeResp tBranchOfficeResp = new TBranchOfficeResp(); + BeanUtils.copyProperties(tBranchOffice,tBranchOfficeResp); + tBranchOfficeRespList.add(tBranchOfficeResp); + } + return tBranchOfficeRespList; + } + + @Override + public void queryOtherInfo(List<TBranchOfficeResp> tBranchOfficeRespList) { + List<TOrder> orders = tOrderMapper.selectList(new EntityWrapper<TOrder>()); + + for (TBranchOfficeResp tBranchOfficeResp : tBranchOfficeRespList) { + + List<TOrder> orderList = orders.stream().filter(t -> tBranchOfficeResp.getId().equals(t.getBranchOfficeId())).collect(Collectors.toList()); + + if(!CollectionUtils.isEmpty(orderList)){ + + // 订单数据 + tBranchOfficeResp.setOrderCount(orderList.size());// 订单数量 + List<TOrder> effectiveOrder = orderList.stream().filter(order -> Objects.nonNull(order.getPayMoney()) && order.getPayMoney().compareTo(new BigDecimal("15")) > 0).collect(Collectors.toList()); + tBranchOfficeResp.setEffectiveOrderCount(effectiveOrder.size());// 有效订单 + + // 优惠券数据,,,通过订单找到该区域的下单人,找出优惠券信息 + List<Integer> userIds = orderList.stream().map(TOrder::getUserId).collect(Collectors.toList()); + List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().in("userId", userIds)); + // 优惠券有效数量 + int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); + // 过期数量 + int expireCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getExpireCount).sum(); + // 总数量 + int totalCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); + // 已使用优惠券;总数量减去有效数量 + tBranchOfficeResp.setUsedCount(totalCount-validCount-expireCount); + + // 已发放优惠券 + tBranchOfficeResp.setTotalCount(totalCount); + + BigDecimal orderPriceCount = new BigDecimal("0"); + + // 累计优惠券金额 + for (TUserToCoupon tUserToCoupon : tUserToCoupons) { + TCoupon tCoupon = tCouponMapper.selectById(tUserToCoupon.getCouponId()); + BigDecimal price = tCoupon.getCouponPreferentialAmount().multiply(new BigDecimal(tUserToCoupon.getCouponTotal())); + orderPriceCount = orderPriceCount.add(price); + } + tBranchOfficeResp.setOrderPriceCount(orderPriceCount); + } + // 司机数量 + Integer driverCount = tDriverMapper.selectCount(new EntityWrapper<TDriver>().eq("branchOfficeId", tBranchOfficeResp.getId())); + tBranchOfficeResp.setDriverCount(driverCount); + } + + } + + @Override + public Object addOrUpdate(TBranchOffice tBranchOffice) { + // 对省市区做处理 + String[] split = tBranchOffice.getAreaId().split("/"); + // 查询省市 + // 黑龙江省/大兴安岭地区 + // 702/852 + TRegion province = tRegionService.selectById(split[0]); + tBranchOffice.setProvinceName(province.getName()); + tBranchOffice.setProvinceCode(province.getCode()); + + TRegion city = tRegionService.selectById(split[1]); + if(Objects.isNull(city)){ + city = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("name",split[1])); + } + tBranchOffice.setCityName(city.getName()); + tBranchOffice.setCityCode(city.getCode()); + + if(split.length>2){ + TRegion area = tRegionService.selectById(split[2]); + if(Objects.isNull(area)){ + area = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("name",split[2])); + } + tBranchOffice.setDistrictName(area.getName()); + tBranchOffice.setDistrictCode(area.getCode()); + }else { + tBranchOffice.setDistrictName(""); + tBranchOffice.setDistrictCode(""); + } + + // 通过省市查询代理商 + List<TAgent> tAgent = tAgentMapper.selectList(new EntityWrapper<TAgent>().eq("provinceCode", province.getCode()) + .eq("cityCode", city.getCode()) + .eq("status", 1) + .last("LIMIT 1")); + if(!CollectionUtils.isEmpty(tAgent)){ + tBranchOffice.setAgentId(tAgent.get(0).getId()); + }else { + return new SuccessTip(500, "该区域代理商被冻结或不存在"); + } + return null; + } } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCancelOrderServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCancelOrderServiceImpl.java new file mode 100644 index 0000000..9366c42 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCancelOrderServiceImpl.java @@ -0,0 +1,66 @@ +package com.stylefeng.guns.modular.system.service.impl; + +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.model.TCancelOrder; +import com.stylefeng.guns.modular.system.dao.TCancelOrderMapper; +import com.stylefeng.guns.modular.system.service.ITCancelOrderService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import com.stylefeng.guns.modular.system.service.ITOrderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.ui.Model; +import org.springframework.util.StringUtils; + +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Objects; + +/** + * <p> + * 订单取消记录 服务实现类 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +@Service +public class TCancelOrderServiceImpl extends ServiceImpl<TCancelOrderMapper, TCancelOrder> implements ITCancelOrderService { + + @Autowired + private TCancelOrderMapper tCancelOrderMapper; + @Autowired + private ITOrderService tOrderService; + + @Override + public List<TOrderResp> getCancelOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName) { + String startTime = null; + String endTime = null; + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + startTime = split[0]; + endTime = split[1]; + } + Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); + return tCancelOrderMapper.getCancelOrderList(startTime,endTime,code,source,userName,userPhone,state,driverName,roleType,objectId); + } + + @Override + public void cancelOrderDetail(Integer cancelOrderId, Model model) { + + // 查询取消订单记录 + TCancelOrder tCancelOrder = tCancelOrderMapper.selectById(cancelOrderId); + + model.addAttribute("cancelTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tCancelOrder.getCreateTime())); + model.addAttribute("cause",tCancelOrder.getCause()); + + tOrderService.orderDetail(tCancelOrder.getOrderId(),model); + } + + @Override + public List<TOrderResp> userCancelOrderList(Integer userId,Integer orderId) { + return tCancelOrderMapper.userCancelOrderList(userId,orderId); + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java index 1574c0d..fca4d93 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java @@ -1,28 +1,42 @@ package com.stylefeng.guns.modular.system.service.impl; -import com.baomidou.mybatisplus.plugins.Page; +import com.stylefeng.guns.modular.system.controller.resp.TComplaintResp; +import com.stylefeng.guns.modular.system.dao.TAppUserMapper; +import com.stylefeng.guns.modular.system.dao.TDriverMapper; import com.stylefeng.guns.modular.system.model.TComplaint; import com.stylefeng.guns.modular.system.dao.TComplaintMapper; import com.stylefeng.guns.modular.system.service.ITComplaintService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; import java.util.List; -import java.util.Map; /** * <p> - * 投诉管理 服务实现类 + * 投诉 服务实现类 * </p> * - * @author 吕雪 - * @since 2020-06-09 + * @author stylefeng + * @since 2023-03-02 */ @Service public class TComplaintServiceImpl extends ServiceImpl<TComplaintMapper, TComplaint> implements ITComplaintService { + @Autowired + private TComplaintMapper tComplaintMapper; + @Override - public List<Map<String, Object>> getComplaintList(Page<Map<String, Object>> page, Integer roleType, Integer nowUserId, String beginTime, String endTime, String userName, String userPhone, String driverPhone, Integer isHandle) { - return this.baseMapper.getComplaintList(page, roleType, nowUserId, beginTime, endTime, userName, userPhone, driverPhone, isHandle); + public List<TComplaintResp> getPageList(String createTime, String userName, String userPhone, String driverPhone, Integer state) { + String startTime = null; + String endTime = null; + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + startTime = split[0]; + endTime = split[1]; + } + return tComplaintMapper.getPageList(startTime,endTime,userName,userPhone,driverPhone,state); } } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java index cf65d45..ad9e895 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.stylefeng.guns.core.base.tips.SuccessTip; +import com.stylefeng.guns.core.shiro.ShiroKit; import com.stylefeng.guns.core.util.DateUtil; import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; @@ -84,6 +85,15 @@ wrapper.between("createTime",startTime,endTime); } wrapper.orderBy(true,"approvalStatus"); + // 判断是否为代理商或者分公司 + if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 2){ + // 分公司 + wrapper.eq("branchOfficeId",ShiroKit.getUser().getObjectId()); + } + if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 3){ + // 代理商 + wrapper.eq("agentId",ShiroKit.getUser().getObjectId()); + } return wrapper; } @@ -99,8 +109,10 @@ TDriverResp tDriverResp = new TDriverResp(); BeanUtils.copyProperties(tDriver,tDriverResp); - // 设置余额 - tDriverResp.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance())); + if(Objects.nonNull(tDriver.getBackgroundBalance()) && Objects.nonNull(tDriver.getBalance())){ + // 设置余额 + tDriverResp.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance())); + } // 所属代理商 TAgent tAgent = tAgentMapper.selectById(tDriver.getAgentId()); @@ -113,11 +125,11 @@ tDriverResp.setBranchName(tBranchOffice.getPrincipal()); } //累计订单量 - List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) + List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode())).collect(Collectors.toList()); tDriverResp.setCumulativeOrderCount(cumulativeOrderCount.size()); //当月订单量 - List<TOrder> monthOrderCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) + List<TOrder> monthOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode()) && new SimpleDateFormat("yyyyMM").format(order.getCreateTime()).equals(monthDate)).collect(Collectors.toList()); tDriverResp.setMonthOrderCount(monthOrderCount.size()); @@ -331,6 +343,15 @@ wrapper.like("name",name); } wrapper.orderBy(true,"approvalStatus"); + // 判断是否为代理商或者分公司 + if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 2){ + // 分公司 + wrapper.eq("branchOfficeId",ShiroKit.getUser().getObjectId()); + } + if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 3){ + // 代理商 + wrapper.eq("agentId",ShiroKit.getUser().getObjectId()); + } return wrapper; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEvaluateServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEvaluateServiceImpl.java new file mode 100644 index 0000000..d796a6c --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEvaluateServiceImpl.java @@ -0,0 +1,110 @@ +package com.stylefeng.guns.modular.system.service.impl; + +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp; +import com.stylefeng.guns.modular.system.dao.*; +import com.stylefeng.guns.modular.system.model.*; +import com.stylefeng.guns.modular.system.service.ITEvaluateService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.ui.Model; +import org.springframework.util.StringUtils; + +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * <p> + * 订单评价 服务实现类 + * </p> + * + * @author stylefeng + * @since 2023-02-27 + */ +@Service +public class TEvaluateServiceImpl extends ServiceImpl<TEvaluateMapper, TEvaluate> implements ITEvaluateService { + + @Autowired + private TEvaluateMapper tEvaluateMapper; + @Autowired + private TAppUserMapper tAppUserMapper; + + @Autowired + private TOrderMapper tOrderMapper; + @Autowired + private TDriverMapper tDriverMapper; + @Autowired + private TBranchOfficeMapper tBranchOfficeMapper; + + @Override + public List<TEvaluateResp> selectPageList(String createTime, String userName, String driverName, Integer orderType, Integer score) { + String startTime = null; + String endTime = null; + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + startTime = split[0]; + endTime = split[1]; + } + List<TEvaluateResp> list = tEvaluateMapper.selectPageList(startTime, endTime, userName, driverName, orderType, score); + Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); + if(3 == roleType){ + list = list.stream().filter(tEvaluate -> tEvaluate.getAgentId().equals(objectId)).collect(Collectors.toList()); + } + if(2 == roleType){ + list = list.stream().filter(tEvaluate -> tEvaluate.getBranchOfficeId().equals(objectId)).collect(Collectors.toList()); + } + return list; + } + + @Override + public void evaluateDetail(Integer evaluateId, Model model) { + // 查询评价 + TEvaluate tEvaluate = tEvaluateMapper.selectById(evaluateId); + + model.addAttribute("score",tEvaluate.getScore()); + model.addAttribute("evaluate",tEvaluate.getEvaluate()); + + // 查询用户 + TAppUser tAppUser = tAppUserMapper.selectById(tEvaluate.getUserId()); + if(Objects.nonNull(tAppUser)){ + model.addAttribute("userName",tAppUser.getNickname()); + model.addAttribute("userPhone",tAppUser.getPhone()); + }else { + model.addAttribute("userName",""); + model.addAttribute("userPhone",""); + } + + // 查询订单 + TOrder tOrder = tOrderMapper.selectById(tEvaluate.getOrderId()); + + model.addAttribute("createTime",new SimpleDateFormat("yyyy-MM-dd HH:mm").format(tOrder.getCreateTime())); + model.addAttribute("code",tOrder.getCode()); + model.addAttribute("source",tOrder.getSource()); + model.addAttribute("startTime",new SimpleDateFormat("yyyy-MM-dd HH:mm").format(tOrder.getStartTime())); + model.addAttribute("boardingTime",new SimpleDateFormat("yyyy-MM-dd HH:mm").format(tOrder.getBoardingTime())); + model.addAttribute("getoffTime",new SimpleDateFormat("yyyy-MM-dd HH:mm").format(tOrder.getGetoffTime())); + model.addAttribute("startAddress",tOrder.getStartAddress()); + model.addAttribute("endAddress",tOrder.getEndAddress()); + + // 查询司机 + TDriver tDriver = tDriverMapper.selectById(tOrder.getDriverId()); + if(Objects.nonNull(tDriver)){ + model.addAttribute("driverName",tDriver.getName()); + // 查询分公司 + TBranchOffice tBranchOffice = tBranchOfficeMapper.selectById(tDriver.getBranchOfficeId()); + if(Objects.nonNull(tBranchOffice)){ + model.addAttribute("branchOfficeName",tBranchOffice.getPrincipal()); + }else { + model.addAttribute("branchOfficeName",""); + } + }else { + model.addAttribute("driverName",""); + } + + } +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java index 75171ba..5fee007 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java @@ -1,10 +1,29 @@ package com.stylefeng.guns.modular.system.service.impl; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.core.util.DateUtil; +import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; +import com.stylefeng.guns.modular.system.dao.TAppUserMapper; +import com.stylefeng.guns.modular.system.dao.TBranchOfficeMapper; +import com.stylefeng.guns.modular.system.dao.TDriverMapper; +import com.stylefeng.guns.modular.system.model.TAppUser; +import com.stylefeng.guns.modular.system.model.TBranchOffice; +import com.stylefeng.guns.modular.system.model.TDriver; import com.stylefeng.guns.modular.system.model.TOrder; import com.stylefeng.guns.modular.system.dao.TOrderMapper; import com.stylefeng.guns.modular.system.service.ITOrderService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.ui.Model; +import org.springframework.util.StringUtils; + +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Objects; /** * <p> @@ -17,4 +36,81 @@ @Service public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> implements ITOrderService { + @Autowired + private TOrderMapper tOrderMapper; + @Autowired + private TAppUserMapper tAppUserMapper; + @Autowired + private TDriverMapper tDriverMapper; + @Autowired + private TBranchOfficeMapper tBranchOfficeMapper; + + @Override + public List<TOrderResp> getOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName,Integer isException) { + String startTime = null; + String endTime = null; + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + startTime = split[0]; + endTime = split[1]; + } + Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); + return tOrderMapper.getOrderList(startTime,endTime,code,source,userName,userPhone,state,driverName,isException,roleType,objectId); + } + + @Override + public void orderDetail(Integer orderId, Model model) { + // 订单信息 + TOrder tOrder = tOrderMapper.selectById(orderId); + model.addAttribute("createTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tOrder.getCreateTime()));//下单时间 + model.addAttribute("code",tOrder.getCode());//订单编号 + model.addAttribute("source",tOrder.getSource());//订单来源 + model.addAttribute("startAddress",tOrder.getStartAddress());//起点 + model.addAttribute("endAddress",tOrder.getEndAddress());//终点 + model.addAttribute("startTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tOrder.getStartTime()));//乘车时间 + model.addAttribute("boardingTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tOrder.getBoardingTime()));//上车时间 + model.addAttribute("getoffTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tOrder.getGetoffTime()));//下车时间 + model.addAttribute("startPrice",tOrder.getStartPrice());//起步价 + model.addAttribute("overDrivePrice",tOrder.getOverDrivePrice());//里程费 + model.addAttribute("waitTimePrice",tOrder.getWaitTimePrice());//等待费 + model.addAttribute("badWeatherPrice",tOrder.getBadWeatherPrice());//恶劣天气费用 + model.addAttribute("orderMoney",tOrder.getOrderMoney());//实际费用 + model.addAttribute("payMoney",tOrder.getPayMoney());//实际支付费用 + model.addAttribute("discountedPrice",tOrder.getDiscountedPrice());//优惠券抵扣费用 + model.addAttribute("payType",tOrder.getPayType());//支付方式 + model.addAttribute("discountAmount",tOrder.getDiscountAmount());//折扣金额 + model.addAttribute("userId",tOrder.getUserId());//用户id + + // 查询用户 + TAppUser tAppUser = tAppUserMapper.selectById(tOrder.getUserId()); + model.addAttribute("userName",tAppUser.getNickname()); + model.addAttribute("userPhone",tAppUser.getPhone()); + model.addAttribute("havDiscount",tAppUser.getHavDiscount()); + if(1 == tAppUser.getHavDiscount()){ + // 计算9折优惠金额 + BigDecimal multiply = tOrder.getOrderMoney().multiply(new BigDecimal("0.1")).setScale(2); + model.addAttribute("multiply",multiply); + } + + // 查询司机 + TDriver tDriver = tDriverMapper.selectById(tOrder.getDriverId()); + model.addAttribute("driverName",tDriver.getName()); + + // 查询司机所属分公司 + TBranchOffice tBranchOffice = tBranchOfficeMapper.selectById(tDriver.getBranchOfficeId()); + if(Objects.nonNull(tBranchOffice)){ + model.addAttribute("branchOfficeName",tBranchOffice.getPrincipal()); + }else { + model.addAttribute("branchOfficeName",""); + } + + } + + @Override + public void orderExceptionDetail(Integer orderId, Model model) { + this.orderDetail(orderId,model); + model.addAttribute("orderId",orderId); + } } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java index f765eb2..09aff6d 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java @@ -1,10 +1,18 @@ package com.stylefeng.guns.modular.system.service.impl; +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordAgentResp; +import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp; import com.stylefeng.guns.modular.system.model.TRechargeRecord; import com.stylefeng.guns.modular.system.dao.TRechargeRecordMapper; import com.stylefeng.guns.modular.system.service.ITRechargeRecordService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.util.List; +import java.util.Objects; /** * <p> @@ -12,9 +20,43 @@ * </p> * * @author stylefeng - * @since 2023-02-20 + * @since 2023-03-10 */ @Service public class TRechargeRecordServiceImpl extends ServiceImpl<TRechargeRecordMapper, TRechargeRecord> implements ITRechargeRecordService { + @Autowired + private TRechargeRecordMapper tRechargeRecordMapper; + + @Override + public List<TRechargeRecordUserResp> userRecharge(String userName, String userPhone, String code, String createTime) { + String startTime = null; + String endTime = null; + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + startTime = split[0]; + endTime = split[1]; + } + return tRechargeRecordMapper.userRecharge(startTime,endTime,userName,userPhone,code); + } + + @Override + public List<TRechargeRecordAgentResp> agentRechargeList(String driverName, String driverPhone, String createTime) { + String startTime = null; + String endTime = null; + // 开始,结束时间 + if(StringUtils.hasLength(createTime)){ + String[] split = createTime.split(" - "); + startTime = split[0]; + endTime = split[1]; + } + Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); + List<TRechargeRecordAgentResp> tRechargeRecordAgentRespList = tRechargeRecordMapper.agentRechargeList(startTime, endTime, driverName, driverPhone, roleType, objectId); + for (TRechargeRecordAgentResp tRechargeRecordAgentResp : tRechargeRecordAgentRespList) { + tRechargeRecordAgentResp.setArea(tRechargeRecordAgentResp.getProvinceName()+tRechargeRecordAgentResp.getCityName()); + } + return tRechargeRecordAgentRespList; + } } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemConfigServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemConfigServiceImpl.java new file mode 100644 index 0000000..8ca8c7a --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemConfigServiceImpl.java @@ -0,0 +1,20 @@ +package com.stylefeng.guns.modular.system.service.impl; + +import com.stylefeng.guns.modular.system.model.TSystemConfig; +import com.stylefeng.guns.modular.system.dao.TSystemConfigMapper; +import com.stylefeng.guns.modular.system.service.ITSystemConfigService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + * <p> + * 系统配置 服务实现类 + * </p> + * + * @author stylefeng + * @since 2023-03-02 + */ +@Service +public class TSystemConfigServiceImpl extends ServiceImpl<TSystemConfigMapper, TSystemConfig> implements ITSystemConfigService { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserToCouponServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserToCouponServiceImpl.java new file mode 100644 index 0000000..57f4690 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserToCouponServiceImpl.java @@ -0,0 +1,20 @@ +package com.stylefeng.guns.modular.system.service.impl; + +import com.stylefeng.guns.modular.system.model.TUserToCoupon; +import com.stylefeng.guns.modular.system.dao.TUserToCouponMapper; +import com.stylefeng.guns.modular.system.service.ITUserToCouponService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + * <p> + * 用户优惠券中间表 服务实现类 + * </p> + * + * @author stylefeng + * @since 2023-02-28 + */ +@Service +public class TUserToCouponServiceImpl extends ServiceImpl<TUserToCouponMapper, TUserToCoupon> implements ITUserToCouponService { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TYouTuiServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TYouTuiServiceImpl.java new file mode 100644 index 0000000..3398614 --- /dev/null +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TYouTuiServiceImpl.java @@ -0,0 +1,20 @@ +package com.stylefeng.guns.modular.system.service.impl; + +import com.stylefeng.guns.modular.system.model.TYouTui; +import com.stylefeng.guns.modular.system.dao.TYouTuiMapper; +import com.stylefeng.guns.modular.system.service.ITYouTuiService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + * <p> + * 优推 服务实现类 + * </p> + * + * @author stylefeng + * @since 2023-03-01 + */ +@Service +public class TYouTuiServiceImpl extends ServiceImpl<TYouTuiMapper, TYouTui> implements ITYouTuiService { + +} diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushMinistryOfTransportUtil.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushMinistryOfTransportUtil.java index d4da5aa..4a4ed3d 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushMinistryOfTransportUtil.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushMinistryOfTransportUtil.java @@ -537,7 +537,7 @@ * 乘客投诉信息 * @param id */ - public void ratedPassengerComplaint(Integer id){ + /*public void ratedPassengerComplaint(Integer id){ TComplaint tComplaint = complaintService.selectById(id); JSONObject jsonObject = new JSONObject(); jsonObject.put("OrderId", "");//订单号 @@ -548,7 +548,7 @@ map.put("ratedPassengerComplaint", jsonObject.toJSONString()); String result = HttpRequestUtil.postRequest(PushURL.ministry_of_transport_data + "/ratedPassengerComplaint", map); System.out.println("乘客投诉信息:" + result); - } + }*/ /** diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentArea.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentArea.html index b3989b7..ef237ec 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentArea.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentArea.html @@ -8,15 +8,19 @@ <div class="col-sm-6 control-label"> <label class="col-sm-1" style="width: 20px;">省:</label> <select class="input-group col-sm-2 " onclick="TAgent.areaProvince()" id="province" style="width: 200px;height: 33px" name="province"> - <option value="">请选择省</option> + <option value="">请选择</option> @for(i in province){ - <option id="${i.id}" value="${i.name}">${i.name}</option> + <option id="${i.id}" value="${i.name}"${i.name == provinceName ? 'selected=selected' : ''}>${i.name}</option> @} </select> </div> <div class="col-sm-6 control-label"> <label class="col-sm-1" style="width: 20px;">市:</label> <select class="input-group col-sm-2" id="city" style="width: 200px;height: 33px" name="city"> + <option value="">请选择</option> + @for(city in cityList){ + <option id="${city.id}" value="${city.name}"${city.name == cityName ? 'selected=selected' : ''}>${city.name}</option> + @} </select> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html index ae8f418..7ebef5f 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html @@ -3,7 +3,7 @@ <div class="ibox-content"> <div class="form-horizontal"> - <div class="row" > + <div class="row" id="tAgentInfoForm"> <div class="col-sm-12" style="text-align: center"> <input hidden id="areaId" value="areaId"> <div class="initialLevel col-sm-12 control-label form-group" style="text-align: center"> @@ -13,16 +13,6 @@ <input id="principal" name="principal" type="text" style="height: 30px" required> </div> </div> - <!--<div class="col-sm-12"> - <div class="form-group"> - <span style="color:red">*</span> - <label class="col-sm-3 control-label">负责人姓名:</label> - <div class="col-sm-6"> - <input class="form-control" id="principal" name="principal" type="text"> - </div> - </div> - <div class="hr-line-dashed"></div> - </div>--> <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-6 control-label form-group" > <span style="color:red">*</span> @@ -34,7 +24,7 @@ <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-6 control-label form-group" > <label class="control-label" >邮箱:</label> - <input id="email" name="email" type="email" style="height: 30px" required> + <input id="email" name="email" type="email" style="height: 30px"> </div> </div> @@ -42,32 +32,21 @@ <div class="initialLevel col-sm-6 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >代理区域:</label> - <input id="area" onclick="TAgent.area()" name="area" placeholder="请选择" style="height: 30px" readonly> + <input id="area" onclick="TAgent.area()" name="area" placeholder="请选择" style="height: 30px" readonly required> </div> </div> - - <!--<div class="col-sm-12"> - <div class="form-group"> - <span style="color:red">*</span> - <label class="col-sm-3 control-label">代理区域:</label> - <div class="col-sm-6"> - <input class="form-control" id="area" onclick="TAgent.area()" name="area" type="text" placeholder="请选择"> - </div> - </div> - <div class="hr-line-dashed"></div> - </div>--> <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-6 control-label form-group" > <label class="control-label" >开户银行:</label> - <input id="bankDeposit" name="bankDeposit" type="text" style="height: 30px" required> + <input id="bankDeposit" name="bankDeposit" type="text" style="height: 30px"> </div> </div> <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-6 control-label form-group" > <label class="control-label" >银行账户:</label> - <input id="bankAccount" name="bankAccount" type="number" style="height: 30px" required> + <input id="bankAccount" name="bankAccount" type="number" style="height: 30px"> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCoupon.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCoupon.html index 2146c3f..ced25a0 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCoupon.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCoupon.html @@ -11,7 +11,7 @@ <input hidden id="userIds" value="${userIds}"> <div class="row"> <div class="col-sm-3"> - <#NameCon id="condition" name="优惠券名称" placeholder="请输入优惠券名称"/> + <#NameCon id="couponName" name="优惠券名称" placeholder="请输入优惠券名称"/> </div> <div class="col-sm-3"> <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> @@ -28,7 +28,6 @@ </div> </div> </div> -<script src="${ctxPath}/static/modular/system/tCoupon/tCoupon.js"></script> <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCouponException.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCouponException.html index 108d236..bc1891e 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCouponException.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCouponException.html @@ -11,7 +11,7 @@ <input hidden id="userIds" value="${userIds}"> <div class="row"> <div class="col-sm-3"> - <#NameCon id="condition" name="优惠券名称" placeholder="请输入优惠券名称"/> + <#NameCon id="couponName" name="优惠券名称" placeholder="请输入优惠券名称"/> </div> <div class="col-sm-3"> <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> @@ -28,7 +28,6 @@ </div> </div> </div> -<script src="${ctxPath}/static/modular/system/tCoupon/tCoupon.js"></script> <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html index 532cb64..c6ae61e 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html @@ -9,24 +9,58 @@ <div class="row row-lg"> <div class="col-sm-12"> <div class="row"> - <div class="col-sm-3"> - <#NameCon id="condition" name="名称" /> + <div class="col-sm-2"> + <#NameCon id="branchOfficeName" name="分公司名称" /> </div> - <div class="col-sm-3"> + <div class="col-sm-2"> + <#NameCon id="principal" name="负责人名称" /> + </div> + <div class="col-sm-2"> + <#NameCon id="principalPhone" name="负责人电话" /> + </div> + <!--<div class="col-sm-2"> + <#NameCon id="condition" name="管理人名称" /> + </div> + <div class="col-sm-2"> + <#NameCon id="condition" name="管理人电话" /> + </div>--> + <div class="col-sm-2"> + <select class="input-group" id="operatingBusiness" style="width: 180px;height: 33px" name="operatingBusiness"> + <option value="">选择经营业务</option> + <option value="1">司机代驾</option> + </select> + </div> + <div class="col-sm-2"> + <select class="input-group" id="status" style="width: 180px;height: 33px" name="status"> + <option value="">选择状态</option> + <option value="1">正常</option> + <option value="2">冻结</option> + <option value="3">已删除</option> + </select> + </div> + <div class="col-sm-2"> <#button name="搜索" icon="fa-search" clickFun="TBranchOffice.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TBranchOffice.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + @if(shiro.hasPermission("/tBranchOffice/add")){ + <#button name="添加" icon="fa-plus" clickFun="TBranchOffice.openAddTBranchOffice()"/> + @} + @if(shiro.hasPermission("/tBranchOffice/update")){ + <#button name="编辑" icon="fa-edit" clickFun="TBranchOffice.openTBranchOfficeDetail()" space="true"/> + @} + <#button name="冻结" icon="fa-edit" clickFun="TBranchOffice.stop()" space="true"/> + <#button name="启动" icon="fa-edit" clickFun="TBranchOffice.start()" space="true"/> </div> </div> - <div class="hidden-xs" id="TBranchOfficeTableToolbar" role="group"> + <!--<div class="hidden-xs" id="TBranchOfficeTableToolbar" role="group"> @if(shiro.hasPermission("/tBranchOffice/add")){ <#button name="添加" icon="fa-plus" clickFun="TBranchOffice.openAddTBranchOffice()"/> @} @if(shiro.hasPermission("/tBranchOffice/update")){ <#button name="修改" icon="fa-edit" clickFun="TBranchOffice.openTBranchOfficeDetail()" space="true"/> @} - @if(shiro.hasPermission("/tBranchOffice/delete")){ - <#button name="删除" icon="fa-remove" clickFun="TBranchOffice.delete()" space="true"/> - @} - </div> + </div>--> <#table id="TBranchOfficeTable"/> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaAdd.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaAdd.html new file mode 100644 index 0000000..ed0b7df --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaAdd.html @@ -0,0 +1,51 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12" style="height: 100px;"> + + <div class="col-sm-4 control-label"> + <label class="col-sm-1" style="width: 20px;">省:</label> + <select class="input-group col-sm-2 " onclick="TBranchOffice.areaCity()" id="province" style="width: 200px;height: 33px" name="province"> + <option value="">请选择</option> + @for(i in provinceList){ + <option id="${i.id}" value="${i.name}"${i.name == provinceName ? 'selected=selected' : ''}>${i.name}</option> + @} + </select> + </div> + <div class="col-sm-4 control-label"> + <label class="col-sm-1" style="width: 20px;">市:</label> + <select class="input-group col-sm-2" onclick="TBranchOffice.areaDistrict()" id="city" style="width: 200px;height: 33px" name="city"> + <option value="">请选择</option> + @for(city in cityList){ + <option id="${city.id}" value="${city.name}"${city.name == cityName ? 'selected=selected' : ''}>${city.name}</option> + @} + </select> + </div> + <div class="col-sm-4 control-label"> + <label class="col-sm-1" style="width: 20px;">区:</label> + <select class="input-group col-sm-2" id="district" style="width: 200px;height: 33px" name="district"> + <option value="">请选择</option> + @for(district in districtList){ + <option id="${district.id}" value="${district.name}"${district.name == districtName ? 'selected=selected' : ''}>${district.name}</option> + @} + </select> + </div> + </div> + <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="text-align:center"> + <#button name="取消" icon="fa-plus" clickFun="TBranchOfficeInfoDlg.close()" /> + <#button name="确定" icon="fa-plus" clickFun="TBranchOffice.submitArea()"/> + </div> + + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> +<script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> +<script type="text/javascript"> +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaUpdate.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaUpdate.html new file mode 100644 index 0000000..45d2a7f --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaUpdate.html @@ -0,0 +1,57 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12" style="height: 100px;"> + <!--<input hidden id="provinceName" value="${provinceName}"> + <input hidden id="cityName" value="${cityName}"> + <input hidden id="districtName" value="${districtName}"> + <input hidden id="provinceId" value="${provinceId}"> + <input hidden id="cityId" value="${cityId}"> + <input hidden id="districtId" value="${districtId}">--> + + <div class="col-sm-4 control-label"> + <label class="col-sm-1" style="width: 20px;">省:</label> + <select class="input-group col-sm-2 " onclick="TBranchOffice.areaCity()" id="province" style="width: 200px;height: 33px" name="province"> + <option value="">请选择</option> + @for(i in provinceList){ + <option id="${i.id}" value="${i.name}"${i.name == provinceName ? 'selected=selected' : ''}>${i.name}</option> + @} + </select> + </div> + <div class="col-sm-4 control-label"> + <label class="col-sm-1" style="width: 20px;">市:</label> + <select class="input-group col-sm-2" onclick="TBranchOffice.areaDistrict()" id="city" style="width: 200px;height: 33px" name="city"> + <option>请选择</option> + @for(city in cityList){ + <option id="${city.id}" value="${city.name}"${city.name == cityName ? 'selected=selected' : ''}>${city.name}</option> + @} + </select> + </div> + <div class="col-sm-4 control-label"> + <label class="col-sm-1" style="width: 20px;">区:</label> + <select class="input-group col-sm-2" id="district" style="width: 200px;height: 33px" name="district"> + <option>请选择</option> + @for(district in districtList){ + <option id="${district.id}" value="${district.name}"${district.name == districtName ? 'selected=selected' : ''}>${district.name}</option> + @} + </select> + </div> + </div> + <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="text-align:center"> + <#button name="取消" icon="fa-plus" clickFun="TBranchOfficeInfoDlg.close()" /> + <#button name="确定" icon="fa-plus" clickFun="TBranchOffice.submitArea()"/> + </div> + + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> +<script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> +<script type="text/javascript"> +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeDetail.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeDetail.html new file mode 100644 index 0000000..9997698 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeDetail.html @@ -0,0 +1,113 @@ +@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"> + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">分公司资料</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >负责人姓名:</label> + <label>${principal}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">添加时间:</label> + <label>${createTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >邮箱:</label> + <label>${email}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">抽成规则:</label> + <label>每笔订单满</label> + <label>${num2}</label> + <label>元/单,抽取</label> + <label>${num3}</label> + <label>元</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">代理区域:</label> + <label>${area}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">基本信息</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >统计时间:</label> + <span>${startToEndTime}</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >累计订单量:</label> + <label>${orderCount}</label>单 + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">已使用优惠券:</label> + <label>${usedCount}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >有效订单:</label> + <label>${effectiveOrderCount}</label>单 + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">累计优惠券金额:</label> + <label>${orderPriceCount}</label>元 + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >已发放优惠券:</label> + <label>${totalCount}</label>张 + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">司机数量:</label> + <label>${driverCount}</label>人 + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tAgent/tAgent.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html index c0a72b0..8df3c2e 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html @@ -1,5 +1,82 @@ @layout("/common/_container.html"){ -<div class="ibox float-e-margins"> +<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" id="branchOfficeInfoForm"> + <div class="row row-lg"> + <div class="col-sm-12"> + <input hidden id="areaId" value="areaId"> + + <div class="col-sm-12" style="cursor: pointer;text-align: right;"> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >分公司名称:</label> + <input id="branchOfficeName" name="branchOfficeName" type="text" style="height: 30px" required="required"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >负责人姓名:</label> + <input id="principal" name="principal" type="text" style="height: 30px" required="required"> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >联系电话:</label> + <input id="principalPhone" name="principalPhone" type="number" style="height: 30px" required="required"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >邮箱:</label> + <input id="email" type="email" style="height: 30px"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >代理区域:</label> + <input id="area" onclick="TBranchOffice.areaAdd()" name="area" placeholder="请选择" style="height: 30px" readonly required> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >开户银行:</label> + <input id="bankDeposit" type="text" style="height: 30px"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >银行账户:</label> + <input id="bankAccount" type="text" style="height: 30px"> + </div> + </div> + + </div> + + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TBranchOfficeInfoDlg.addSubmit()"/> + </div> + </div> + </div> + </div> + </div> +</div> +<!--<div class="ibox float-e-margins"> <div class="ibox-content"> <div class="form-horizontal"> @@ -33,6 +110,7 @@ </div> </div> -</div> +</div>--> <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> +<script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html index 37e8aa5..8b42aa4 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html @@ -1,5 +1,84 @@ @layout("/common/_container.html"){ -<div class="ibox float-e-margins"> +<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" id="branchOfficeInfoForm"> + <div class="row row-lg"> + <div class="col-sm-12"> + <input hidden id="id" value="${item.id}"/> + <input hidden id="areaId" value="${item.areaId}"> + + <div class="col-sm-12" style="cursor: pointer;text-align: right;"> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >分公司名称:</label> + <input id="branchOfficeName" value="${item.branchOfficeName}" name="branchOfficeName" type="text" style="height: 30px" required="required"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >负责人姓名:</label> + <input id="principal" value="${item.principal}" name="principal" type="text" style="height: 30px" required="required"> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >联系电话:</label> + <input id="principalPhone" value="${item.principalPhone}" name="principalPhone" type="number" style="height: 30px" required="required"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >邮箱:</label> + <input id="email" value="${item.email}" type="email" style="height: 30px"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >代理区域:</label> + <input id="area" value="${item.area}" onclick="TBranchOffice.areaUpdate()" name="area" placeholder="请选择" style="height: 30px" readonly required> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >开户银行:</label> + <input id="bankDeposit" value="${item.bankDeposit}" type="text" style="height: 30px"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >银行账户:</label> + <input id="bankAccount" value="${item.bankAccount}" type="text" style="height: 30px"> + </div> + </div> + + </div> + + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TBranchOfficeInfoDlg.editSubmit()"/> + </div> + </div> + </div> + </div> + </div> +</div> +<!--<div class="ibox float-e-margins"> <div class="ibox-content"> <div class="form-horizontal"> @@ -33,6 +112,7 @@ </div> </div> -</div> +</div>--> <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> +<script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder.html new file mode 100644 index 0000000..9c95d30 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder.html @@ -0,0 +1,38 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-title"> + <h5>管理</h5> + </div> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12"> + <div class="row"> + <div class="col-sm-3"> + <#NameCon id="condition" name="名称" /> + </div> + <div class="col-sm-3"> + <#button name="搜索" icon="fa-search" clickFun="TCancelOrder.search()"/> + </div> + </div> + <div class="hidden-xs" id="TCancelOrderTableToolbar" role="group"> + @if(shiro.hasPermission("/tCancelOrder/add")){ + <#button name="添加" icon="fa-plus" clickFun="TCancelOrder.openAddTCancelOrder()"/> + @} + @if(shiro.hasPermission("/tCancelOrder/update")){ + <#button name="修改" icon="fa-edit" clickFun="TCancelOrder.openTCancelOrderDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tCancelOrder/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TCancelOrder.delete()" space="true"/> + @} + </div> + <#table id="TCancelOrderTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrderDetail.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrderDetail.html new file mode 100644 index 0000000..3d35322 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrderDetail.html @@ -0,0 +1,212 @@ +@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"> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">订单详情</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下单时间:</label> + <label>${createTime}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单编号:</label> + <label>${code}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单来源:</label> + @if(source==1){ + <label>小程序</label> + @} + @if(source==2){ + <label>APP</label> + @} + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >乘车时间:</label> + <label>${startTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color: green" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">下单用户昵称:</label> + <label>${userName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">下单用户手机号:</label> + <label>${userPhone}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">起点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">终点:</label> + <label>${endAddress}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color: red" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">接单司机:</label> + <label>${driverName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">所属机构:</label> + <label>${branchOfficeName}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">上下地点</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >上车地点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">上车时间:</label> + <label>${boardingTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下车地点:</label> + <label>${endAddress}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下车时间:</label> + <label>${getoffTime}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">取消信息</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >取消时间:</label> + <label>${cancelTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >取消原因:</label> + <div style="margin-left: 70px" > + <textarea id="cause" style="width: 681px; height: 249px;" readonly>${cause}</textarea> + </div> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">费用明细</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >起步价:</label> + <label>${startPrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >等待费:</label> + <label>${waitTimePrice}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >里程费:</label> + <label>${overDrivePrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >恶劣天气:</label> + <label>${badWeatherPrice}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >实际费用:</label> + <label>${orderMoney}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >实际支付费用:</label> + <label>${payMoney}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >优惠券抵扣费用:</label> + <label>${discountedPrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >支付方式:</label> + @if(payType==1){ + <label>微信支付</label> + @} + @if(payType==2){ + <label>余额支付</label> + @} + @if(payType==3){ + <label>线下收款</label> + @} + </div> + </div> + + <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="text-align: center"> + <#button name="取消" icon="fa-plus" clickFun="TCancelOrderInfoDlg.close()" /> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tCancelOrder.js"></script> +<script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder_info.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_add.html new file mode 100644 index 0000000..9dbf389 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_add.html @@ -0,0 +1,32 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" underline="true"/> + <#input id="orderId" name="订单id" underline="true"/> + <#input id="userType" name="用户类型(1=用户,2=司机)" underline="true"/> + <#input id="userId" name="用户id"/> + </div> + + <div class="col-sm-6"> + <#input id="cause" name="转单原因" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> + <#input id="createTime" name="添加时间" underline="true"/> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCancelOrderInfoDlg.addSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCancelOrderInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_edit.html new file mode 100644 index 0000000..061c4ea --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_edit.html @@ -0,0 +1,32 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" value="${item.id}" underline="true"/> + <#input id="orderId" name="订单id" value="${item.orderId}" underline="true"/> + <#input id="userType" name="用户类型(1=用户,2=司机)" value="${item.userType}" underline="true"/> + <#input id="userId" name="用户id" value="${item.userId}" /> + </div> + + <div class="col-sm-6"> + <#input id="cause" name="转单原因" value="${item.cause}" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> + <#input id="createTime" name="添加时间" value="${item.createTime}" /> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCancelOrderInfoDlg.editSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCancelOrderInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint.html index 2eebeb2..2ed53d8 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint.html @@ -3,44 +3,53 @@ <div class="col-sm-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> - <h5>投诉列表管理</h5> + <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 class="col-sm-2"> + <#TimeCon id="createTime" name="投诉时间" /> </div> - <div class="col-sm-3"> + <div class="col-sm-2"> <#NameCon id="userName" name="投诉人昵称" /> </div> - <div class="col-sm-3"> - <#NameCon id="userPhone" name="投诉人电话" /> + <div class="col-sm-2"> + <#NameCon id="userPhone" name="投诉人手机号" /> </div> - <div class="col-sm-3"> - <#NameCon id="driverPhone" name="投诉司机电话" /> + <div class="col-sm-2"> + <#NameCon id="driverPhone" name="司机手机号" /> </div> - <div class="col-sm-3"> - <#SelectCon id="isHandle" name="状态" > - <option value="">全部</option> - <option value="2">未处理</option> - <option value="1">已处理</option> - </#SelectCon> + <div class="col-sm-2"> + <select class="input-group" id="state" style="width: 180px;height: 33px" name="state"> + <option value="">选择状态</option> + <option value="1">待处理</option> + <option value="2">已处理</option> + </select> </div> - <div class="col-sm-3"> + <div class="col-sm-2"> <#button name="搜索" icon="fa-search" clickFun="TComplaint.search()"/> <#button name="重置" icon="fa-trash" clickFun="TComplaint.resetSearch()" space="true"/> </div> + <div class="col-sm-12"> + <#button name="立即处理" icon="" clickFun="TComplaint.immediatelyAudit()"/> + @if(shiro.hasPermission("/tComplaint/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TComplaint.delete()" space="true"/> + @} + </div> </div> - <div class="hidden-xs" id="TComplaintTableToolbar" role="group"> - @if(shiro.hasPermission("/tComplaint/immediately")){ - <#button name="立即处理" icon="fa-edit" clickFun="TComplaint.immediately()"/> + <!--<div class="hidden-xs" id="TComplaintTableToolbar" role="group"> + @if(shiro.hasPermission("/tComplaint/add")){ + <#button name="添加" icon="fa-plus" clickFun="TComplaint.openAddTComplaint()"/> + @} + @if(shiro.hasPermission("/tComplaint/update")){ + <#button name="修改" icon="fa-edit" clickFun="TComplaint.openTComplaintDetail()" space="true"/> @} @if(shiro.hasPermission("/tComplaint/delete")){ - <#button name="删除记录" icon="fa-remove" clickFun="TComplaint.delete()" space="true"/> + <#button name="删除" icon="fa-remove" clickFun="TComplaint.delete()" space="true"/> @} - </div> + </div>--> <#table id="TComplaintTable"/> </div> </div> @@ -49,10 +58,11 @@ </div> </div> <script src="${ctxPath}/static/modular/system/tComplaint/tComplaint.js"></script> -<script> +<script type="text/javascript"> laydate.render({ - elem: '#insertTime' - ,range: true + elem: '#createTime', + type: 'date', + range: true }); </script> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaintAudit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaintAudit.html new file mode 100644 index 0000000..2c2ae59 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaintAudit.html @@ -0,0 +1,24 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12"> + <input hidden id="tComplaintId" value="${tComplaintId}"> + <div class="col-lg-3"> + 备注:<textarea id="notes" placeholder="请输入备注" style="width: 681px; height: 249px;"></textarea> + </div> + <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:300px"> + <#button name="取消" icon="fa-plus" clickFun="TComplaintInfoDlg.close()" /> + <#button name="提交" icon="fa-plus" clickFun="TComplaint.audit()"/> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tComplaint/tComplaint.js"></script> +<script src="${ctxPath}/static/modular/system/tComplaint/tComplaint_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_add.html index 2b53ab9..923cd9f 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_add.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_add.html @@ -6,17 +6,16 @@ <div class="row"> <div class="col-sm-6 b-r"> <#input id="id" name="主键" underline="true"/> - <#input id="userId" name="用户Id" underline="true"/> - <#input id="reason" name="投诉原因" underline="true"/> - <#input id="driverId" name="被投诉人Id" underline="true"/> - <#input id="description" name="描述"/> + <#input id="userId" name="用户id" underline="true"/> + <#input id="driverId" name="投诉司机id" underline="true"/> + <#input id="reason" name="投诉原因"/> </div> <div class="col-sm-6"> - <#input id="isHandle" name="是否处理(0:未处理,1:已处理)" underline="true"/> - <#input id="insertTime" name="投诉时间" underline="true"/> - <#input id="handleResult" name="处理结果" underline="true"/> - <#input id="handleUserId" name="处理人id" underline="true"/> + <#input id="notes" name="注释" underline="true"/> + <#input id="state" name="处理状态(1=待处理,2=已处理)" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> + <#input id="createTime" name="添加时间" underline="true"/> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_edit.html index 2affa4e..e766c4a 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_edit.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_edit.html @@ -6,17 +6,16 @@ <div class="row"> <div class="col-sm-6 b-r"> <#input id="id" name="主键" value="${item.id}" underline="true"/> - <#input id="userId" name="用户Id" value="${item.userId}" underline="true"/> - <#input id="reason" name="投诉原因" value="${item.reason}" underline="true"/> - <#input id="driverId" name="被投诉人Id" value="${item.driverId}" underline="true"/> - <#input id="description" name="描述" value="${item.description}" /> + <#input id="userId" name="用户id" value="${item.userId}" underline="true"/> + <#input id="driverId" name="投诉司机id" value="${item.driverId}" underline="true"/> + <#input id="reason" name="投诉原因" value="${item.reason}" /> </div> <div class="col-sm-6"> - <#input id="isHandle" name="是否处理(0:未处理,1:已处理)" value="${item.isHandle}" underline="true"/> - <#input id="insertTime" name="投诉时间" value="${item.insertTime}" underline="true"/> - <#input id="handleResult" name="处理结果" value="${item.handleResult}" underline="true"/> - <#input id="handleUserId" name="处理人id" value="${item.handleUserId}" /> + <#input id="notes" name="注释" value="${item.notes}" underline="true"/> + <#input id="state" name="处理状态(1=待处理,2=已处理)" value="${item.state}" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> + <#input id="createTime" name="添加时间" value="${item.createTime}" /> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon.html index 66473de..7c10e66 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon.html @@ -25,8 +25,9 @@ <option value="1">通用券</option> </select> </div> - <div class="col-sm-1"> + <div class="col-sm-2"> <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TCoupon.resetSearch()" space="true"/> </div> </div> <div class="hidden-xs" id="TCouponTableToolbar" role="group"> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html index 9487e9f..7542e6e 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html @@ -1,103 +1,117 @@ @layout("/common/_container.html"){ -<div class="ibox float-e-margins"> - <div class="ibox-content"> - <div class="form-horizontal"> - - <div class="row"> - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">优惠券名称:</label> - <div class="col-sm-6"> - <input class="form-control" id="couponName" name="couponName" type="text"> - </div> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">优惠券类型:</label> - <select class="input-group col-sm-6" id="couponType" style="width: 180px;height: 33px" name="couponType"> - <option value="1">活动券</option> - <option value="2">优惠券</option> - </select> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">服务类类型:</label> - <select class="input-group col-sm-6" id="couponServiceType" style="width: 180px;height: 33px" name="couponType"> - <option value="1">通用型</option> - </select> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">优惠券数量:</label> - <div class="col-sm-6"> - <input class="form-control" id="couponCount" name="couponCount" type="text"> - </div> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">条件金额:订单满</label> - <div class="col-sm-6"> - <input class="form-control" id="couponConditionalAmount" name="couponConditionalAmount" type="text"> - </div> - <label class="col-sm-2 control-label">可使用</label> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">优惠金额:</label> - <div class="col-sm-6"> - <input class="form-control" id="couponPreferentialAmount" name="couponPreferentialAmount" type="text"> - </div> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">有效期:</label> - <div class="col-sm-6"> - <input class="form-control" id="couponValidity" name="couponValidity" type="text"> - </div> - <label class="col-sm-1 control-label">天</label> - </div> - <div class="hr-line-dashed"></div> - </div> - - <div class="col-sm-12"> - <div class="form-group"> - <label class="col-sm-3 control-label">赠送数量:</label> - <div class="col-sm-6"> - <input class="form-control" id="couponSendQuantity" name="couponSendQuantity" type="text"> - </div> - <label class="col-sm-1 control-label">张</label> - </div> - <div class="hr-line-dashed"></div> - </div> +<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" id="couponInfoForm"> - <div class="row btn-group-m-t"> - <div class="col-sm-10" style="text-align: center"> - <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCouponInfoDlg.addSubmit()"/> - <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCouponInfoDlg.close()"/> + <div class="row row-lg"> + <div class="col-sm-12" style="cursor: pointer;text-align: right;"> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >优惠券名称:</label> + <input id="couponName" name="couponName" type="text" style="height: 30px" required="required"> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >优惠券类型:</label> + <select id="couponType" name="couponType" onclick="TCoupon.changeCouponType()" style="height: 30px" required> + <option value="">请选择优惠券类型</option> + <option value="1">活动券</option> + <option value="2">新人券</option> + </select> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class=" control-label">服务类类型:</label> + <select id="couponServiceType" name="couponServiceType" style="height: 30px" required> + <option value="">请选择服务类类型</option> + <option value="1">通用型</option> + </select> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label">优惠券限制数量:</label> + <input id="couponCount" name="couponCount" type="number" style="height: 30px" required> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label">条件金额:订单满</label> + <input id="couponConditionalAmount" name="couponConditionalAmount" type="number" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <label>可使用</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label">优惠金额:</label> + <input id="couponPreferentialAmount" name="couponPreferentialAmount" type="number" style="height: 30px" required> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label">有效期:</label> + <input id="couponValidity" name="couponValidity" type="number" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <label>天</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label">优惠券总量:</label> + <input id="remainingQuantity" name="remainingQuantity" type="number" style="height: 30px" required> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" hidden id="changeCouponSendQuantity" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label">赠送数量:</label> + <input id="couponSendQuantity" name="couponSendQuantity" type="number" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <label>张</label> + </div> + </div> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCouponInfoDlg.addSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCouponInfoDlg.close()"/> + </div> </div> </div> </div> - </div> </div> <script src="${ctxPath}/static/modular/system/tCoupon/tCoupon_info.js"></script> +<script src="${ctxPath}/static/modular/system/tCoupon/tCoupon.js"></script> +<script type="text/javascript"> +</script> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver.html index 188d0cd..3e78867 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver.html @@ -26,7 +26,7 @@ <#button name="搜索" icon="fa-search" clickFun="TDriver.search()"/> <#button name="重置" icon="fa-trash" clickFun="TDriver.resetSearch()" space="true"/> </div> - <div class="col-sm-3"> + <div class="col-sm-12"> <button type="button" class="btn btn-primary " onclick="TDriver.auditPage()" id="audit"> <i class="fa "></i> 立即审核 </button> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaAdd.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaAdd.html index 0caa811..f78daf4 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaAdd.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaAdd.html @@ -9,22 +9,28 @@ <div class="col-sm-4 control-label"> <label class="col-sm-1" style="width: 20px;">省:</label> <select class="input-group col-sm-2 " onclick="TDriver.areaCity()" id="province" style="width: 200px;height: 33px" name="province"> - <option value="">请选择省</option> + <option value="">请选择</option> @for(i in provinceList){ - <option id="${i.id}" value="${i.name}"}>${i.name}</option> + <option id="${i.id}" value="${i.name}"${i.name == provinceName ? 'selected=selected' : ''}>${i.name}</option> @} </select> </div> <div class="col-sm-4 control-label"> <label class="col-sm-1" style="width: 20px;">市:</label> <select class="input-group col-sm-2" onclick="TDriver.areaDistrict()" id="city" style="width: 200px;height: 33px" name="city"> - <option>请选择市</option> + <option>请选择</option> + @for(city in cityList){ + <option id="${city.id}" value="${city.name}"${city.name == cityName ? 'selected=selected' : ''}>${city.name}</option> + @} </select> </div> <div class="col-sm-4 control-label"> <label class="col-sm-1" style="width: 20px;">区:</label> <select class="input-group col-sm-2" id="district" style="width: 200px;height: 33px" name="district"> - <option>请选择区</option> + <option>请选择</option> + @for(district in districtList){ + <option id="${district.id}" value="${district.name}"${district.name == districtName ? 'selected=selected' : ''}>${district.name}</option> + @} </select> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaUpdate.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaUpdate.html index 2876b71..1d53dbf 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaUpdate.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaUpdate.html @@ -5,17 +5,17 @@ <div class="ibox-content"> <div class="row row-lg"> <div class="col-sm-12" style="height: 100px;"> - <input hidden id="provinceName" value="${provinceName}"> + <!--<input hidden id="provinceName" value="${provinceName}"> <input hidden id="cityName" value="${cityName}"> <input hidden id="districtName" value="${districtName}"> <input hidden id="provinceId" value="${provinceId}"> <input hidden id="cityId" value="${cityId}"> - <input hidden id="districtId" value="${districtId}"> + <input hidden id="districtId" value="${districtId}">--> <div class="col-sm-4 control-label"> <label class="col-sm-1" style="width: 20px;">省:</label> <select class="input-group col-sm-2 " onclick="TDriver.areaCity()" id="province" style="width: 200px;height: 33px" name="province"> - <option value="">请选择省</option> + <option value="">请选择</option> @for(i in provinceList){ <option id="${i.id}" value="${i.name}"${i.name == provinceName ? 'selected=selected' : ''}>${i.name}</option> @} @@ -24,7 +24,7 @@ <div class="col-sm-4 control-label"> <label class="col-sm-1" style="width: 20px;">市:</label> <select class="input-group col-sm-2" onclick="TDriver.areaDistrict()" id="city" style="width: 200px;height: 33px" name="city"> - <option>请选择市</option> + <option>请选择</option> @for(city in cityList){ <option id="${city.id}" value="${city.name}"${city.name == cityName ? 'selected=selected' : ''}>${city.name}</option> @} @@ -33,7 +33,7 @@ <div class="col-sm-4 control-label"> <label class="col-sm-1" style="width: 20px;">区:</label> <select class="input-group col-sm-2" id="district" style="width: 200px;height: 33px" name="district"> - <option>请选择区</option> + <option>请选择</option> @for(district in districtList){ <option id="${district.id}" value="${district.name}"${district.name == districtName ? 'selected=selected' : ''}>${district.name}</option> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_add.html index f65db61..2d4d775 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_add.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_add.html @@ -5,7 +5,7 @@ <div class="ibox-title"> <h5>添加</h5> </div> - <div class="ibox-content"> + <div class="ibox-content" id="driverInfoForm"> <div class="row row-lg"> <div class="col-sm-12"> <input hidden id="areaId"> @@ -22,12 +22,12 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >姓名:</label> - <input id="name" type="text" style="height: 30px" required> + <input id="name" name="name" type="text" style="height: 30px" required="required"> </div> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >手机号:</label> - <input id="phone" type="number" style="height: 30px" required> + <input id="phone" name="phone" type="number" style="height: 30px" required="required"> </div> </div> @@ -35,12 +35,12 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >紧急联系人姓名:</label> - <input id="emergencyContact" type="text" style="height: 30px" required> + <input id="emergencyContact" name="emergencyContact" type="text" style="height: 30px" required> </div> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >紧急联系人电话:</label> - <input id="emergencyPhone" type="number" style="height: 30px" required> + <input id="emergencyPhone" name="emergencyPhone" type="number" style="height: 30px" required> </div> </div> @@ -77,7 +77,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >身份证号码:</label> - <input id="idcard" type="text" style="height: 30px" required> + <input id="idcard" name="idcard" type="text" style="height: 30px" required> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_edit.html index 6bae198..733f5cc 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_edit.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_edit.html @@ -5,7 +5,7 @@ <div class="ibox-title"> <h5>添加</h5> </div> - <div class="ibox-content"> + <div class="ibox-content" id="driverInfoForm"> <div class="row row-lg"> <div class="col-sm-12"> <input hidden id="id" value="${item.id}"/> @@ -22,12 +22,12 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >姓名:</label> - <input id="name" value="${item.name}" type="text" style="height: 30px" required> + <input id="name" name="name" value="${item.name}" type="text" style="height: 30px" required> </div> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >手机号:</label> - <input id="phone" value="${item.phone}" type="number" style="height: 30px" required> + <input id="phone" name="phone" value="${item.phone}" type="number" style="height: 30px" required> </div> </div> @@ -35,12 +35,12 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >紧急联系人姓名:</label> - <input id="emergencyContact" value="${item.emergencyContact}" type="text" style="height: 30px" required> + <input id="emergencyContact" name="emergencyContact" value="${item.emergencyContact}" type="text" style="height: 30px" required> </div> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >紧急联系人电话:</label> - <input id="emergencyPhone" value="${item.emergencyPhone}" type="number" style="height: 30px" required> + <input id="emergencyPhone" name="emergencyPhone" value="${item.emergencyPhone}" type="number" style="height: 30px" required> </div> </div> @@ -77,7 +77,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >身份证号码:</label> - <input id="idcard" value="${item.idcard}" type="text" style="height: 30px" required> + <input id="idcard" name="idcard" value="${item.idcard}" type="text" style="height: 30px" required> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate.html new file mode 100644 index 0000000..47aaa96 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate.html @@ -0,0 +1,72 @@ +@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-2"> + <#TimeCon id="createTime" name="评论时间" /> + </div> + <div class="col-sm-2"> + <#NameCon id="userName" name="用户名" /> + </div> + <div class="col-sm-2"> + <#NameCon id="driverName" name="司机名" /> + </div> + <!--<div class="col-sm-1"> + <select class="input-group" id="orderType" style="width: 120px;height: 33px" name="orderType"> + <option value="">选择订单类型</option> + </select> + </div>--> + <div class="col-sm-2"> + <select class="input-group" id="score" style="width: 120px;height: 33px" name="score"> + <option value="">选择分数</option> + <option value="1">非常差</option> + <option value="2">差</option> + <option value="3">一般</option> + <option value="4">满意</option> + <option value="5">非常满意</option> + </select> + </div> + <div class="col-sm-2"> + <#button name="搜索" icon="fa-search" clickFun="TEvaluate.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TEvaluate.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + <button type="button" class="btn btn-primary " onclick="TEvaluate.export()" id="export"> + <i class="fa "></i> 导出 + </button> + </div> + </div> + <div class="hidden-xs" id="TEvaluateTableToolbar" role="group"> + @if(shiro.hasPermission("/tEvaluate/add")){ + <#button name="添加" icon="fa-plus" clickFun="TEvaluate.openAddTEvaluate()"/> + @} + @if(shiro.hasPermission("/tEvaluate/update")){ + <#button name="修改" icon="fa-edit" clickFun="TEvaluate.openTEvaluateDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tEvaluate/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TEvaluate.delete()" space="true"/> + @} + </div> + <#table id="TEvaluateTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluateDetail.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluateDetail.html new file mode 100644 index 0000000..3fc7c19 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluateDetail.html @@ -0,0 +1,161 @@ +@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"> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">订单信息</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下单时间:</label> + <label>${createTime}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单编号:</label> + <label>${code}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单来源:</label> + <label>${source}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >乘车时间:</label> + <label>${startTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color: green" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">下单用户昵称:</label> + <label>${userName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">下单用户手机号:</label> + <label>${userPhone}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">上下地点</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >起点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">终点:</label> + <label>${endAddress}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color: red" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >接单司机:</label> + <label>${driverName}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >所属机构:</label> + <label>${branchOfficeName}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >上车地点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">上车时间:</label> + <label>${boardingTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下车地点:</label> + <label>${endAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">下车时间:</label> + <label>${getoffTime}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">评论详情</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >评论分数:</label> + @if(score==1){ + <label>非常差</label> + @} + @if(score==2){ + <label>差</label> + @} + @if(score==3){ + <label>一般</label> + @} + @if(score==4){ + <label>满意</label> + @} + @if(score==5){ + <label>非常满意</label> + @} + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >评论内容:</label> + <div style="margin-left: 70px" > + <textarea id="evaluate" style="width: 681px; height: 249px;" readonly>${evaluate}</textarea> + </div> + </div> + </div> + <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="text-align: center"> + <#button name="取消" icon="fa-plus" clickFun="TEvaluateInfoDlg.close()" /> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate.js"></script> +<script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate_info.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_add.html new file mode 100644 index 0000000..d01b75b --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_add.html @@ -0,0 +1,32 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" underline="true"/> + <#input id="orderId" name="订单id" underline="true"/> + <#input id="userId" name="用户id" underline="true"/> + <#input id="score" name="评分"/> + </div> + + <div class="col-sm-6"> + <#input id="evaluate" name="评价内容" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> + <#input id="createTime" name="添加时间" underline="true"/> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TEvaluateInfoDlg.addSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TEvaluateInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_edit.html new file mode 100644 index 0000000..dbef3a8 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_edit.html @@ -0,0 +1,32 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" value="${item.id}" underline="true"/> + <#input id="orderId" name="订单id" value="${item.orderId}" underline="true"/> + <#input id="userId" name="用户id" value="${item.userId}" underline="true"/> + <#input id="score" name="评分" value="${item.score}" /> + </div> + + <div class="col-sm-6"> + <#input id="evaluate" name="评价内容" value="${item.evaluate}" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> + <#input id="createTime" name="添加时间" value="${item.createTime}" /> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TEvaluateInfoDlg.editSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TEvaluateInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tCancelOrder.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tCancelOrder.html new file mode 100644 index 0000000..e2cfe39 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tCancelOrder.html @@ -0,0 +1,87 @@ +@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-2"> + <#TimeCon id="createTime" name="取消订单时间" /> + </div> + <div class="col-sm-2"> + <#NameCon id="code" name="订单编号" /> + </div> + <div class="col-sm-1"> + <select class="input-group" id="source" style="width: 120px;height: 33px" name="source"> + <option value="">请选择订单来源</option> + <option value="1">小程序</option> + <option value="2">司机创建</option> + </select> + </div> + <div class="col-sm-2"> + <#NameCon id="userName" name="下单用户昵称" /> + </div> + <div class="col-sm-2"> + <#NameCon id="userPhone" name="下单用户手机" /> + </div> + <div class="col-sm-1"> + <select class="input-group" id="state" style="width: 120px;height: 33px" name="state"> + <option value="">请选择订单状态</option> + <option value="101">待接单</option> + <option value="102">已接单</option> + <option value="103">前往预约点</option> + <option value="104">到达预约点</option> + <option value="105">开始服务</option> + <option value="106">到达目的地</option> + <option value="107">待支付</option> + <option value="108">待评价</option> + <option value="109">已完成</option> + <option value="201">转单中</option> + <option value="301">已取消</option> + <option value="401">等待中</option> + </select> + </div> + <div class="col-sm-2"> + <#NameCon id="driverName" name="司机姓名" /> + </div> + </div> + <div class="col-sm-12"> + <#button name="搜索" icon="fa-search" clickFun="TCancelOrder.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TCancelOrder.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + <button type="button" class="btn btn-primary " onclick="TCancelOrder.export()" id="export"> + <i class="fa "></i> 导出 + </button> + </div> + <div class="hidden-xs" id="TCancelOrderTableToolbar" role="group"> + @if(shiro.hasPermission("/tCancelOrder/add")){ + <#button name="添加" icon="fa-plus" clickFun="TCancelOrder.openAddTCancelOrder()"/> + @} + @if(shiro.hasPermission("/tCancelOrder/update")){ + <#button name="修改" icon="fa-edit" clickFun="TCancelOrder.openTCancelOrderDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tCancelOrder/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TCancelOrder.delete()" space="true"/> + @} + </div> + <#table id="TCancelOrderTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrder/tCancelOrder.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html index ec76def..9f0fd9b 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html @@ -9,12 +9,60 @@ <div class="row row-lg"> <div class="col-sm-12"> <div class="row"> - <div class="col-sm-3"> - <#NameCon id="condition" name="名称" /> + <div class="col-sm-2"> + <#TimeCon id="createTime" name="订单时间" /> </div> - <div class="col-sm-3"> - <#button name="搜索" icon="fa-search" clickFun="TOrder.search()"/> + <div class="col-sm-2"> + <#NameCon id="code" name="订单编号" /> </div> + <div class="col-sm-1"> + <select class="input-group" id="source" style="width: 120px;height: 33px" name="source"> + <option value="">请选择订单来源</option> + <option value="1">小程序</option> + <option value="2">司机创建</option> + </select> + </div> + <div class="col-sm-2"> + <#NameCon id="userName" name="下单用户昵称" /> + </div> + <div class="col-sm-2"> + <#NameCon id="userPhone" name="下单用户手机" /> + </div> + <div class="col-sm-1"> + <select class="input-group" id="state" style="width: 120px;height: 33px" name="state"> + <option value="">请选择订单状态</option> + <option value="101">待接单</option> + <option value="102">已接单</option> + <option value="103">前往预约点</option> + <option value="104">到达预约点</option> + <option value="105">开始服务</option> + <option value="106">到达目的地</option> + <option value="107">待支付</option> + <option value="108">待评价</option> + <option value="109">已完成</option> + <option value="201">转单中</option> + <option value="301">已取消</option> + <option value="401">等待中</option> + </select> + </div> + <div class="col-sm-2"> + <#NameCon id="driverName" name="司机姓名" /> + </div> + </div> + <div class="col-sm-12"> + <#button name="搜索" icon="fa-search" clickFun="TOrder.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TOrder.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + <button type="button" class="btn btn-primary " onclick="TOrder.cancelOrder()" id="cancelOrder"> + <i class="fa "></i> 取消订单 + </button> + <button type="button" class="btn btn-primary " onclick="TOrder.tOrderException()" id="orderException"> + <i class="fa "></i> 异常 + </button> + <button type="button" class="btn btn-primary " onclick="TOrder.export()" id="export"> + <i class="fa "></i> 导出 + </button> </div> <div class="hidden-xs" id="TOrderTableToolbar" role="group"> @if(shiro.hasPermission("/tOrder/add")){ @@ -35,4 +83,12 @@ </div> </div> <script src="${ctxPath}/static/modular/system/tOrder/tOrder.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrderException.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> @} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderDetail.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderDetail.html new file mode 100644 index 0000000..7320bcd --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderDetail.html @@ -0,0 +1,196 @@ +@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"> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">订单详情</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下单时间:</label> + <label>${createTime}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单编号:</label> + <label>${code}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单来源:</label> + @if(source==1){ + <label>小程序</label> + @} + @if(source==2){ + <label>APP</label> + @} + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >乘车时间:</label> + <label>${startTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color:green;" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">下单用户昵称:</label> + <label>${userName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">下单用户手机号:</label> + <label>${userPhone}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">起点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">终点:</label> + <label>${endAddress}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color:red;" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">接单司机:</label> + <label>${driverName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">所属机构:</label> + <label>${branchOfficeName}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">上下地点</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >上车地点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">上车时间:</label> + <label>${boardingTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下车地点:</label> + <label>${endAddress}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下车时间:</label> + <label>${getoffTime}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">费用明细</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >起步价:</label> + <label>${startPrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >等待费:</label> + <label>${waitTimePrice}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >里程费:</label> + <label>${overDrivePrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >恶劣天气:</label> + <label>${badWeatherPrice}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >实际费用:</label> + <label>${orderMoney}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >实际支付费用:</label> + <label>${payMoney}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >优惠券抵扣费用:</label> + <label>${discountedPrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >支付方式:</label> + @if(payType==1){ + <label>微信支付</label> + @} + @if(payType==2){ + <label>余额支付</label> + @} + @if(payType==3){ + <label>线下收款</label> + @} + </div> + </div> + + @if(havDiscount == 1){ + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >9折优惠:</label> + <label>${multiply}</label> + <label>元</label> + </div> + </div> + @} + + <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="text-align: center"> + <#button name="取消" icon="fa-plus" clickFun="TOrderInfoDlg.close()" /> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderException.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderException.html new file mode 100644 index 0000000..4461826 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderException.html @@ -0,0 +1,80 @@ +@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-2"> + <#TimeCon id="createTime" name="订单时间" /> + </div> + <div class="col-sm-2"> + <#NameCon id="code" name="订单编号" /> + </div> + <div class="col-sm-1"> + <select class="input-group" id="source" style="width: 120px;height: 33px" name="source"> + <option value="">请选择订单来源</option> + <option value="1">小程序</option> + <option value="2">司机创建</option> + </select> + </div> + <div class="col-sm-2"> + <#NameCon id="userName" name="下单用户昵称" /> + </div> + <div class="col-sm-2"> + <#NameCon id="userPhone" name="下单用户手机" /> + </div> + <div class="col-sm-1"> + <select class="input-group" id="state" style="width: 120px;height: 33px" name="state"> + <option value="">请选择订单状态</option> + <option value="101">待接单</option> + <option value="102">已接单</option> + <option value="103">前往预约点</option> + <option value="104">到达预约点</option> + <option value="105">开始服务</option> + <option value="106">到达目的地</option> + <option value="107">待支付</option> + <option value="108">待评价</option> + <option value="109">已完成</option> + <option value="201">转单中</option> + <option value="301">已取消</option> + <option value="401">等待中</option> + </select> + </div> + <div class="col-sm-2"> + <#NameCon id="driverName" name="司机姓名" /> + </div> + </div> + <div class="col-sm-12"> + <#button name="搜索" icon="fa-search" clickFun="TOrderException.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TOrderException.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + <button type="button" class="btn btn-primary " onclick="TOrderException.cancelOrder()" id="cancelOrder"> + <i class="fa "></i> 取消订单 + </button> + <button type="button" class="btn btn-primary " onclick="TOrderException.export()" id="export"> + <i class="fa "></i> 导出 + </button> + </div> + <#table id="TOrderExceptionTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrder/tOrderException.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderExceptionDetail.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderExceptionDetail.html new file mode 100644 index 0000000..7d16ff4 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderExceptionDetail.html @@ -0,0 +1,190 @@ +@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"> + + <input hidden id="userId" value="${userId}"> + <input hidden id="orderId" value="${orderId}"> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">订单详情</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下单时间:</label> + <label>${createTime}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单编号:</label> + <label>${code}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >订单来源:</label> + @if(source==1){ + <label>小程序</label> + @} + @if(source==2){ + <label>APP</label> + @} + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >乘车时间:</label> + <label>${startTime}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color: green" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">下单用户昵称:</label> + <label>${userName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">下单用户手机号:</label> + <label>${userPhone}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">起点:</label> + <label>${startAddress}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">终点:</label> + <label>${endAddress}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="color: red" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label">接单司机:</label> + <label>${driverName}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">所属机构:</label> + <label>${branchOfficeName}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >上车地点:</label> + <label>${startAddress}</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >下车地点:</label> + <label>${endAddress}</label> + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">费用明细</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >起步价:</label> + <label>${startPrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >等待费:</label> + <label>${waitTimePrice}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >里程费:</label> + <label>${overDrivePrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >恶劣天气:</label> + <label>${badWeatherPrice}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >实际费用:</label> + <label>${orderMoney}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >实际支付费用:</label> + <label>${payMoney}</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >优惠券抵扣费用:</label> + <label>${discountedPrice}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >支付方式:</label> + @if(payType==1){ + <label>微信支付</label> + @} + @if(payType==2){ + <label>余额支付</label> + @} + @if(payType==3){ + <label>线下收款</label> + @} + </div> + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">取消记录</label> + </div> + </div> + <hr/> + + <#table id="TOrderExceptionDetailCancelOrderTable"/> + + <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="text-align: center"> + <#button name="取消" icon="fa-plus" clickFun="TOrderInfoDlg.closeException()" /> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrder/tOrderException.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrderExceptionDetailCancelOrder.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> +<script type="text/javascript"> + $(function (){ + var queryData = {}; + queryData['userId'] = $("#userId").val(); + queryData['orderId'] = $("#orderId").val(); + TOrderExceptionDetailCancelOrder.table.refresh({query: queryData}); + }) + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderStartAndStopException.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderStartAndStopException.html new file mode 100644 index 0000000..572d9d7 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderStartAndStopException.html @@ -0,0 +1,30 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12"> + <input hidden id="id" value="${id}"> + <input hidden id="status" value="${status}"> + <div class="col-lg-3"> + @if(status==1){ + 冻结理由:<textarea id="stopRemark" placeholder="请输入冻结理由" style="width: 681px; height: 249px;"></textarea> + @} + @if(status==2){ + 启用理由:<textarea id="startRemark" placeholder="请输入启用理由" style="width: 681px; height: 249px;"></textarea> + @} + </div> + <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:300px"> + <#button name="取消" icon="fa-plus" clickFun="TOrderInfoDlg.closeException()" /> + <#button name="确定" icon="fa-plus" clickFun="TOrderException.updateStatus()"/> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrder/tOrderException.js"></script> +<script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordAgent.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordAgent.html new file mode 100644 index 0000000..20a852f --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordAgent.html @@ -0,0 +1,57 @@ +@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-2"> + <#NameCon id="driverName" name="司机姓名" /> + </div> + <div class="col-sm-2"> + <#NameCon id="driverPhone" name="司机手机号" /> + </div> + <div class="col-sm-2"> + <#TimeCon id="createTime" name="充值时间" /> + </div> + <div class="col-sm-2"> + <#button name="搜索" icon="fa-search" clickFun="TRechargeRecordAgent.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TRechargeRecordAgent.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + <button type="button" class="btn btn-primary " onclick="TRechargeRecordAgent.export()" id="export"> + <i class="fa "></i> 导出 + </button> + </div> + </div> + <!--<div class="hidden-xs" id="TRechargeRecordTableToolbar" role="group"> + @if(shiro.hasPermission("/tRechargeRecord/add")){ + <#button name="添加" icon="fa-plus" clickFun="TRechargeRecord.openAddTRechargeRecord()"/> + @} + @if(shiro.hasPermission("/tRechargeRecord/update")){ + <#button name="修改" icon="fa-edit" clickFun="TRechargeRecord.openTRechargeRecordDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tRechargeRecord/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TRechargeRecord.delete()" space="true"/> + @} + </div>--> + <#table id="TRechargeRecordAgentTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tRechargeRecord/tRechargeRecordAgent.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordUser.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordUser.html new file mode 100644 index 0000000..b438d4d --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordUser.html @@ -0,0 +1,60 @@ +@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-2"> + <#NameCon id="userName" name="用户姓名" /> + </div> + <div class="col-sm-2"> + <#NameCon id="userPhone" name="用户手机号" /> + </div> + <div class="col-sm-2"> + <#NameCon id="code" name="流水ID" /> + </div> + <div class="col-sm-2"> + <#TimeCon id="createTime" name="充值时间" /> + </div> + <div class="col-sm-2"> + <#button name="搜索" icon="fa-search" clickFun="TRechargeRecordUser.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TRechargeRecordUser.resetSearch()" space="true"/> + </div> + <div class="col-sm-12"> + <button type="button" class="btn btn-primary " onclick="TRechargeRecordUser.export()" id="export"> + <i class="fa "></i> 导出 + </button> + </div> + </div> + <div class="hidden-xs" id="TRechargeRecordTableToolbar" role="group"> + @if(shiro.hasPermission("/tRechargeRecord/add")){ + <#button name="添加" icon="fa-plus" clickFun="TRechargeRecord.openAddTRechargeRecord()"/> + @} + @if(shiro.hasPermission("/tRechargeRecord/update")){ + <#button name="修改" icon="fa-edit" clickFun="TRechargeRecord.openTRechargeRecordDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tRechargeRecord/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TRechargeRecord.delete()" space="true"/> + @} + </div> + <#table id="TRechargeRecordUserTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tRechargeRecord/tRechargeRecordUser.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig.html new file mode 100644 index 0000000..358f2b4 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig.html @@ -0,0 +1,38 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-title"> + <h5>管理</h5> + </div> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12"> + <div class="row"> + <div class="col-sm-3"> + <#NameCon id="condition" name="名称" /> + </div> + <div class="col-sm-3"> + <#button name="搜索" icon="fa-search" clickFun="TSystemConfig.search()"/> + </div> + </div> + <div class="hidden-xs" id="TSystemConfigTableToolbar" role="group"> + @if(shiro.hasPermission("/tSystemConfig/add")){ + <#button name="添加" icon="fa-plus" clickFun="TSystemConfig.openAddTSystemConfig()"/> + @} + @if(shiro.hasPermission("/tSystemConfig/update")){ + <#button name="修改" icon="fa-edit" clickFun="TSystemConfig.openTSystemConfigDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tSystemConfig/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TSystemConfig.delete()" space="true"/> + @} + </div> + <#table id="TSystemConfigTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigBalanceRules.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigBalanceRules.html new file mode 100644 index 0000000..95026ce --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigBalanceRules.html @@ -0,0 +1,55 @@ +@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="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >司机余额规则:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >余额低于</span> + <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元,停止接单</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >用户充值规则:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >余额充值满</span> + <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元,获得9折优惠权限</span> + </div> + </div> + + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.balanceRulesSubmit()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigCommissionShareRules.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigCommissionShareRules.html new file mode 100644 index 0000000..02b4f47 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigCommissionShareRules.html @@ -0,0 +1,68 @@ +@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="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label" >佣金分成规则:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >司机邀请1名用户,下单后完成订单后获得</span> + <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >司机A邀请1名司机B,完成有效单后获得</span> + <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >司机B邀请1名司机C,完成有效单后B获得</span> + <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单 司机A获得</span> + <input class="control-label" id="num4" name="num4" value="${num4}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >司机C邀请1名司机D,完成有效单后C获得</span> + <input class="control-label" id="num5" name="num5" value="${num5}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单 司机B获得</span> + <input class="control-label" id="num6" name="num6" value="${num6}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单 司机A获得</span> + <input class="control-label" id="num7" name="num7" value="${num7}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单</span> + </div> + </div> + + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.commissionShareRules()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigDispatchRules.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigDispatchRules.html new file mode 100644 index 0000000..df577a6 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigDispatchRules.html @@ -0,0 +1,82 @@ +@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="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >派单设置:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >派单距离第一轮</span> + <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >米</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >派单距离第二轮</span> + <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >米</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >派单距离第三轮</span> + <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >米</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >接单设置:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >接单时间</span> + <input class="control-label" id="num4" name="num4" value="${num4}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >秒</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >改派设置:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >改派后暂停接单</span> + <input class="control-label" id="num5" name="num5" value="${num5}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >分钟</span> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.dispatchRulesSubmit()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html new file mode 100644 index 0000000..8146d46 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html @@ -0,0 +1,57 @@ +@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="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >平台抽成:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >司机订单保险费,每天固定抽取</span> + <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/天</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >代理商抽成:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >抽成,每笔订单满</span> + <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/单,抽取</span> + <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元</span> + </div> + </div> + + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.extractionRulesSubmit()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigIntegralRules.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigIntegralRules.html new file mode 100644 index 0000000..9f77639 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigIntegralRules.html @@ -0,0 +1,101 @@ +@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="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >积分获取:</label> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-4 control-label form-group" > + <span class="control-label" >有效时长</span> + <input class="control-label" id="num1" name="num1" value="${num1}" type="text" style="height: 30px;width: 80px" placeholder="12:00"> + <span class="control-label" >——</span> + <input class="control-label" id="num2" name="num2" value="${num2}" type="text" style="height: 30px;width: 80px" placeholder="23:00"> + <span class="control-label" >每小时增加</span> + <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >推荐用户首次下单,完成订单后</span> + <input class="control-label" id="num4" name="num4" value="${num4}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >司机完成订单,获得</span> + <input class="control-label" id="num5" name="num5" value="${num5}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >获得5星好评,获得</span> + <input class="control-label" id="num6" name="num6" value="${num6}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >邀请司机注册成功获得</span> + <input class="control-label" id="num7" name="num7" value="${num7}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >恶劣天气完成订单获得</span> + <input class="control-label" id="num8" name="num8" value="${num8}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-3 control-label form-group" > + <label class="control-label" >积分扣除:</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >差评扣除</span> + <input class="control-label" id="num9" name="num9" value="${num9}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-2 control-label form-group" > + <span class="control-label" >拒绝订单扣除</span> + <input class="control-label" id="num10" name="num10" value="${num10}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >积分</span> + </div> + </div> + + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.integralRulesSubmit()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigPriceRules.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigPriceRules.html new file mode 100644 index 0000000..c26285f --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigPriceRules.html @@ -0,0 +1,116 @@ +@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"> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">基础费用</label> + </div> + </div> + <hr/> + + <input hidden id="array" value="${array}"> + + <div class="initialLevel col-sm-12 control-label form-group" id="rules" style="text-align: left" > + @for(ChargeStandard in array){ + <div name="rulesForm"> + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >时间段</span> + <input class="control-label" id="num1" name="num1" value="${ChargeStandard.num1}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> + <span class="control-label" >——</span> + <input class="control-label" id="num2" name="num2" value="${ChargeStandard.num2}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> + <span class="control-label" >代驾里程</span> + <input class="control-label" id="num3" name="num3" value="${ChargeStandard.num3}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >——</span> + <input class="control-label" id="num4" name="num4" value="${ChargeStandard.num4}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >公里,起步价</span> + <input class="control-label" id="num5" name="num5" value="${ChargeStandard.num5}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元,超出里程每</span> + <input class="control-label" id="num6" name="num6" value="${ChargeStandard.num6}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >公里,收费</span> + <input class="control-label" id="num7" name="num7" value="${ChargeStandard.num7}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元</span> + + @if(ChargeStandard.key == 0){ + <span class="fa fa-plus" onclick="TSystemConfig.addBox()"></span> + @} + @if(ChargeStandard.key == 1){ + <span class="fa fa-remove" onclick="TSystemConfig.delBox(this)"></span> + @} + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >代驾里程</span> + <input class="control-label" id="num8" name="num8" value="${ChargeStandard.num8}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >——</span> + <input class="control-label" id="num9" name="num9" value="${ChargeStandard.num9}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >公里,起步价</span> + <input class="control-label" id="num10" name="num10" value="${ChargeStandard.num10}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元,超出里程每</span> + <input class="control-label" id="num11" name="num11" value="${ChargeStandard.num11}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >公里,收费</span> + <input class="control-label" id="num12" name="num12" value="${ChargeStandard.num12}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元</span> + </div> + </div> + @} + </div> + + <hr/> + <div class="initialLevel col-sm-12 control-label form-group" > + <div style="background-color: gray;height: 35px;line-height: 35px"> + <label style="color: #0C0C0C">额外费用</label> + </div> + </div> + <hr/> + + <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >等待</span> + <input class="control-label" id="num13" name="num13" value="${ExtraCost.num1}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> + <span class="control-label" >分钟,收取</span> + <input class="control-label" id="num14" name="num14" value="${ExtraCost.num2}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> + <span class="control-label" >元,超出</span> + <input class="control-label" id="num15" name="num15" value="${ExtraCost.num3}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >分钟,收取</span> + <input class="control-label" id="num16" name="num16" value="${ExtraCost.num4}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元/分钟</span> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <span class="control-label" >恶劣天气</span> + <input class="control-label" id="num17" name="num17" value="${ExtraCost.num5}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >公里以内,加收</span> + <input class="control-label" id="num18" name="num18" value="${ExtraCost.num6}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元,超出</span> + <input class="control-label" id="num19" name="num19" value="${ExtraCost.num7}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >公里,收取订单的</span> + <input class="control-label" id="num20" name="num20" value="${ExtraCost.num8}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >倍计费,最高收取</span> + <input class="control-label" id="num21" name="num21" value="${ExtraCost.num9}" type="number" style="height: 30px;width: 80px"> + <span class="control-label" >元</span> + </div> + </div> + + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.priceRulesSubmit()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigServiceMgmt.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigServiceMgmt.html new file mode 100644 index 0000000..debdc4e --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigServiceMgmt.html @@ -0,0 +1,34 @@ +@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="initialLevel col-sm-12 control-label form-group" style="text-align: left" > + <div class="initialLevel col-sm-3 control-label form-group" > + <span class="control-label" >客服电话</span> + <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 160px"> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.serviceMgmtSubmit()"/> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_add.html new file mode 100644 index 0000000..fd409dc --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_add.html @@ -0,0 +1,28 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" underline="true"/> + <#input id="type" name="类型(1=派单规则,2=佣金分成规则,3=抽成规则,4=积分规则,5=价格规则,6=余额规则,7=客服管理)"/> + </div> + + <div class="col-sm-6"> + <#input id="content" name="内容" underline="true"/> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfigInfoDlg.addSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSystemConfigInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_edit.html new file mode 100644 index 0000000..6c9f7b6 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_edit.html @@ -0,0 +1,28 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" value="${item.id}" underline="true"/> + <#input id="type" name="类型(1=派单规则,2=佣金分成规则,3=抽成规则,4=积分规则,5=价格规则,6=余额规则,7=客服管理)" value="${item.type}" /> + </div> + + <div class="col-sm-6"> + <#input id="content" name="内容" value="${item.content}" /> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfigInfoDlg.editSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSystemConfigInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui.html new file mode 100644 index 0000000..ec6a562 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui.html @@ -0,0 +1,53 @@ +@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="createTime" name="发布时间" /> + </div> + <div class="col-sm-2"> + <select class="input-group" id="type" style="width: 180px;height: 33px" name="type"> + <option value="">服务类类型</option> + <option value="1">次数</option> + <option value="2">小时</option> + </select> + </div> + <div class="col-sm-3"> + <#button name="搜索" icon="fa-search" clickFun="TYouTui.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TYouTui.resetSearch()"/> + </div> + </div> + <div class="hidden-xs" id="TYouTuiTableToolbar" role="group"> + @if(shiro.hasPermission("/tYouTui/add")){ + <#button name="添加" icon="fa-plus" clickFun="TYouTui.openAddTYouTui()"/> + @} + @if(shiro.hasPermission("/tYouTui/update")){ + <#button name="修改" icon="fa-edit" clickFun="TYouTui.openTYouTuiDetail()" space="true"/> + @} + @if(shiro.hasPermission("/tYouTui/delete")){ + <#button name="删除" icon="fa-remove" clickFun="TYouTui.delete()" space="true"/> + @} + </div> + <#table id="TYouTuiTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tYouTui/tYouTui.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#createTime', + type: 'date', + range: true + }); +</script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_add.html new file mode 100644 index 0000000..77fd724 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_add.html @@ -0,0 +1,95 @@ +@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" id="youTuiInfoForm"> + <div class="row row-lg"> + <div class="col-sm-12"> + <input hidden id="areaId" value="areaId"> + <div class="col-sm-12" style="cursor: pointer;text-align: right;"> + + <div class="initialLevel col-sm-12 control-label form-group"> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >优推名称:</label> + <input id="name" name="name" type="text" placeholder="最多20个字" maxlength="20" style="height: 30px" required> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group"> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >优推类型:</label> + <input id="number" name="number" type="number" placeholder="请输入0以上的数字" min="0" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <select id="type" name="type" style="height: 30px" required> + <option value="">请选择类型</option> + <option value="1">次数</option> + <option value="2">小时</option> + </select> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group"> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >兑换条件:</label> + <input id="integral" name="integral" type="number" max="9999" placeholder="最多4位数" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <label>积分</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group"> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >优推距离:</label> + <input id="distance" name="distance" type="number" placeholder="最多2000米" max="2000" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <label>米</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group"> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >有效期:</label> + <input id="effectiveTime" name="effectiveTime" maxlength="4" placeholder="最多4位数" type="number" style="height: 30px" required> + </div> + <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > + <label>天</label> + </div> + </div> + + <div class="initialLevel col-sm-12 control-label form-group"> + <div class="initialLevel col-sm-3 control-label form-group" > + <span style="color:red">*</span> + <label class="control-label" >服务内容:</label> + <textarea id="serviceContent" name="serviceContent" placeholder="请输入" style="height: 80px" required></textarea> + </div> + </div> + + </div> + + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="text-align: center"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TYouTuiInfoDlg.addSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TYouTuiInfoDlg.close()"/> + </div> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tYouTui/tYouTui_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_edit.html new file mode 100644 index 0000000..d92f6b2 --- /dev/null +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_edit.html @@ -0,0 +1,34 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="row"> + <div class="col-sm-6 b-r"> + <#input id="id" name="主键" value="${item.id}" underline="true"/> + <#input id="name" name="名称" value="${item.name}" underline="true"/> + <#input id="type" name="优推类型(1=次数,2=小时)" value="${item.type}" underline="true"/> + <#input id="number" name="优推值" value="${item.number}" underline="true"/> + <#input id="integral" name="所需积分" value="${item.integral}" /> + </div> + + <div class="col-sm-6"> + <#input id="effectiveTime" name="有效天数" value="${item.effectiveTime}" underline="true"/> + <#input id="content" name="服务内容" value="${item.content}" underline="true"/> + <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> + <#input id="createTime" name="添加时间" value="${item.createTime}" /> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10"> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TYouTuiInfoDlg.editSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TYouTuiInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tYouTui/tYouTui_info.js"></script> +@} diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent.js b/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent.js index da37990..044ec4d 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent.js @@ -130,13 +130,17 @@ * 打开区域选择页面 */ TAgent.area = function () { + + var area = $('#area').val(); + var areaId = $('#areaId').val(); + var index = layer.open({ type: 2, title: '区域选择', area: ['800px', '270px'], //宽高 fix: false, //不固定 maxmin: true, - content: Feng.ctxPath + '/tAgent/areaDetail' + content: Feng.ctxPath + '/tAgent/areaDetail?area='+area+"&areaId="+areaId }); this.layerIndex = index; } @@ -145,7 +149,32 @@ * 查询市区 */ TAgent.areaProvince = function () { - var province = document.getElementById('province'); + + //监听第一个下拉菜单的变动操作 + $("#province").change(function(){ + //当第一级下拉列表没选择值时,将二级下拉列表和三级同时设置为空 + if(this.value==""){ + $("#city").empty();//二级联动设为空设为空 + $("#city").append('<option value="">请选择</option>'); + } + if(this.value!=""){//第一级下拉菜单选择了值 + $("#city").empty();//先行置空,防止上次选择留下的元素影响效果 + $("#city").append('<option value="">请选择</option>')//设置初始选项 + var province = document.getElementById('province'); + var index= province.selectedIndex ; + var id = province.options[index].id; + var ajax = new $ax(Feng.ctxPath + "/tAgent/areaCity?parentId="+id, function (data) { + for(var i=0,n=data.length;i<n;i++){//遍历 + $("#city").append('<option value="'+data[i].id+'">'+data[i].name+'</option>');//创造元素 + } + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start(); + } + }); + + /*var province = document.getElementById('province'); var index= province.selectedIndex ; var id = province.options[index].id; var ajax = new $ax(Feng.ctxPath + "/tAgent/areaCity?parentId="+id, function (data) { @@ -159,7 +188,7 @@ }, function (data) { Feng.error("查询失败!" + data.responseJSON.message + "!"); }); - ajax.start(); + ajax.start();*/ } /** * 选择省市 @@ -169,10 +198,22 @@ var provinceIndex= province.selectedIndex ; var provinceName = province.options[provinceIndex].value; var provinceId = province.options[provinceIndex].id; + + if(provinceName == null || provinceName == ''){ + Feng.error("请选择省份!") + return; + } + var city = document.getElementById('city'); var cityIndex= city.selectedIndex ; var cityId = city.options[cityIndex].value; var cityName = city.options[cityIndex].innerText; + + if(cityName == null || cityName == '' || cityName =='请选择'){ + Feng.error("请选择市区!") + return; + } + parent.$("#area").val(provinceName+'/'+cityName) parent.$("#areaId").val(provinceId+'/'+cityId) TAgentInfoDlg.close(); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js index 3077a02..77ce37c 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js @@ -2,7 +2,39 @@ * 初始化详情对话框 */ var TAgentInfoDlg = { - tAgentInfoData : {} + tAgentInfoData : {}, + validateFields: { + principal: { + validators: { + notEmpty: { + message: '负责人姓名不能为空' + } + } + }, + principalPhone: { + validators: { + notEmpty: { + message: '联系电话不能为空' + } + } + }, + area: { + validators: { + notEmpty: { + message: '请选择代理区域' + } + } + }, + } +}; + +/** + * 验证数据是否为空 + */ +TAgentInfoDlg.validate = function () { + $('#tAgentInfoForm').data("bootstrapValidator").resetForm(); + $('#tAgentInfoForm').bootstrapValidator('validate'); + return $("#tAgentInfoForm").data('bootstrapValidator').isValid(); }; /** @@ -67,6 +99,10 @@ this.clearData(); this.collectData(); + if(!this.validate()){ + return ; + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tAgent/add", function(data){ if(data.code == 500){ @@ -91,6 +127,10 @@ this.clearData(); this.collectData(); + if(!this.validate()){ + return ; + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tAgent/update", function(data){ Feng.success("修改成功!"); @@ -104,5 +144,5 @@ } $(function() { - + Feng.initValidator("tAgentInfoForm", TAgentInfoDlg.validateFields); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserException.js b/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserException.js index f607262..b5c7014 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserException.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserException.js @@ -249,6 +249,7 @@ }); ajax.setData({ userIds:$("#userIds").val(), + couponId:TCoupon.seItem.id, couponName:TCoupon.seItem.couponName }) ajax.start(); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tCoupon.js b/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tCoupon.js index 2b6198e..df9f65a 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tCoupon.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tCoupon.js @@ -14,17 +14,31 @@ TCoupon.initColumn = function () { return [ {field: 'selectItem', radio: true}, - {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, - {title: '创建时间', field: 'createtime', visible: true, align: 'center', valign: 'middle'}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, {title: '优惠券名称', field: 'couponName', visible: true, align: 'center', valign: 'middle'}, - {title: '优惠券类型', field: 'couponType', visible: true, align: 'center', valign: 'middle'}, - {title: '优惠券码', field: 'couponCode', visible: true, align: 'center', valign: 'middle'}, - {title: '优惠券状态', field: 'couponStatus', visible: true, align: 'center', valign: 'middle'}, - {title: '服务类型', field: 'couponServiceType', visible: true, align: 'center', valign: 'middle'}, + {title: '服务类型', field: 'couponServiceType', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.couponServiceType === 1){ + return '<span>通用型</span>' + } + } + }, + {title: '优惠券类型', field: 'couponType', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.couponType === 1){ + return '<span>活动券</span>' + }else if (row.couponType === 2){ + return '<span>新人券</span>' + } + } + }, + {title: '优惠券码', field: 'couponCode', visible: false, align: 'center', valign: 'middle'}, + {title: '优惠券状态', field: 'couponStatus', visible: false, align: 'center', valign: 'middle'}, {title: '条件金额', field: 'couponConditionalAmount', visible: true, align: 'center', valign: 'middle'}, {title: '优惠金额', field: 'couponPreferentialAmount', visible: true, align: 'center', valign: 'middle'}, - {title: '有效期', field: 'couponValidity', visible: true, align: 'center', valign: 'middle'}, - {title: '赠送数量', field: 'couponSendQuantity', visible: true, align: 'center', valign: 'middle'} + {title: '有效期', field: 'couponValidity', visible: false, align: 'center', valign: 'middle'}, + {title: '赠送数量', field: 'couponSendQuantity', visible: false, align: 'center', valign: 'middle'} ]; }; @@ -104,6 +118,7 @@ }); ajax.setData({ userIds:$("#userIds").val(), + couponId:this.seItem.id, couponName:this.seItem.couponName }) ajax.start(); @@ -133,13 +148,13 @@ */ TCoupon.search = function () { var queryData = {}; - queryData['condition'] = $("#condition").val(); + queryData['couponName'] = $("#couponName").val(); TCoupon.table.refresh({query: queryData}); }; $(function () { var defaultColunms = TCoupon.initColumn(); - var table = new BSTable(TCoupon.id, "/tCoupon/list", defaultColunms); + var table = new BSTable(TCoupon.id, "/tCoupon/activityCouponList", defaultColunms); table.setPaginationType("client"); TCoupon.table = table.init(); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js b/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js index 5914920..c2e71ce 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js @@ -14,19 +14,52 @@ TBranchOffice.initColumn = function () { return [ {field: 'selectItem', radio: true}, - {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, - {title: '代理商id', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, - {title: '负责人姓名', field: 'principal', visible: true, align: 'center', valign: 'middle'}, - {title: '负责人电话', field: 'principalPhone', visible: true, align: 'center', valign: 'middle'}, - {title: '邮箱', field: 'email', visible: true, align: 'center', valign: 'middle'}, - {title: '代理区域省编号', field: 'provinceCode', visible: true, align: 'center', valign: 'middle'}, - {title: '代理区域省名称', field: 'provinceName', visible: true, align: 'center', valign: 'middle'}, - {title: '代理区域市编号', field: 'cityCode', visible: true, align: 'center', valign: 'middle'}, - {title: '代理区域市名称', field: 'cityName', visible: true, align: 'center', valign: 'middle'}, - {title: '代理区域区编号', field: 'districtCode', visible: true, align: 'center', valign: 'middle'}, - {title: '代理区域区名称', field: 'districtName', visible: true, align: 'center', valign: 'middle'}, - {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: true, align: 'center', valign: 'middle'}, - {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '代理商id', field: 'agentId', visible: false, align: 'center', valign: 'middle'}, + {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '分公司名称', field: 'branchOfficeName', visible: true, align: 'center', valign: 'middle'}, + {title: '负责人姓名', field: 'principal', visible: true, align: 'center', valign: 'middle'}, + {title: '负责人电话', field: 'principalPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '邮箱', field: 'email', visible: false, align: 'center', valign: 'middle'}, + {title: '代理区域省编号', field: 'provinceCode', visible: false, align: 'center', valign: 'middle'}, + {title: '代理区域省名称', field: 'provinceName', visible: false, align: 'center', valign: 'middle'}, + {title: '代理区域市编号', field: 'cityCode', visible: false, align: 'center', valign: 'middle'}, + {title: '代理区域市名称', field: 'cityName', visible: false, align: 'center', valign: 'middle'}, + {title: '代理区域区编号', field: 'districtCode', visible: false, align: 'center', valign: 'middle'}, + {title: '代理区域区名称', field: 'districtName', visible: false, align: 'center', valign: 'middle'}, + + {title: '订单数量', field: 'orderCount', visible: true, align: 'center', valign: 'middle'}, + {title: '有效订单', field: 'effectiveOrderCount', visible: true, align: 'center', valign: 'middle'}, + {title: '已发放优惠券', field: 'totalCount', visible: true, align: 'center', valign: 'middle'}, + {title: '已使用优惠券', field: 'usedCount', visible: true, align: 'center', valign: 'middle'}, + {title: '累计优惠券金额', field: 'orderPriceCount', visible: true, align: 'center', valign: 'middle'}, + + {title: '经营业务', field: 'operatingBusiness', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.operatingBusiness === 1){ + return '<span>司机代驾</span>' + } + } + }, + + {title: '司机数', field: 'driverCount', visible: true, align: 'center', valign: 'middle'}, + {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.status === 1){ + return '<span>正常</span>' + }else if(row.status === 2){ + return '<span>冻结</span>' + }else if (row.status === 3){ + return '<span>已删除</span>' + } + } + }, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + return '<a href="#" onclick="TBranchOffice.searchTBranchOfficeDetail('+row.id+')" style="color:blue">详情</a>' +' ' + + '<a href="#" onclick="TBranchOffice.delete('+row.id+')" style="color:red">删除</a>' + } + } ]; }; @@ -51,7 +84,7 @@ var index = layer.open({ type: 2, title: '添加', - area: ['800px', '420px'], //宽高 + area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/tBranchOffice/tBranchOffice_add' @@ -67,7 +100,7 @@ var index = layer.open({ type: 2, title: '详情', - area: ['800px', '420px'], //宽高 + area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/tBranchOffice/tBranchOffice_update/' + TBranchOffice.seItem.id @@ -75,32 +108,285 @@ this.layerIndex = index; } }; +/** + * 打开查看详情(使用中) + */ +TBranchOffice.searchTBranchOfficeDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tBranchOffice/tBranchOfficeDetail?tBranchOfficeId=' + id + }); + this.layerIndex = index; +}; /** * 删除 */ -TBranchOffice.delete = function () { - if (this.check()) { - var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/delete", function (data) { - Feng.success("删除成功!"); - TBranchOffice.table.refresh(); +TBranchOffice.delete = function (id) { + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/delete", function (data) { + Feng.success("删除成功!"); + TBranchOffice.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tBranchOfficeId",id); + ajax.start(); +}; + +/** + * 提交冻结 + */ +TBranchOffice.stop = function () { + if(this.check()){ + if(2 == this.seItem.status){ + Feng.error("该条数据已冻结!"); + return; + } + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/stop?id="+this.seItem.id, function (data) { + if(500 == data.code){ + Feng.error(data.message); + return; + }else { + Feng.success("冻结成功!"); + TBranchOffice.table.refresh(); + } }, function (data) { - Feng.error("删除失败!" + data.responseJSON.message + "!"); + Feng.error("冻结失败!" + data.message + "!"); }); - ajax.set("tBranchOfficeId",this.seItem.id); ajax.start(); } }; + +/** + * 提交启用 + */ +TBranchOffice.start = function () { + if(this.check()){ + if(1 == this.seItem.status){ + Feng.error("该条数据已启用!"); + return; + } + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/start?id="+this.seItem.id, function (data) { + if(500 == data.code){ + Feng.error(data.message); + return; + }else { + Feng.success("启用成功!"); + TBranchOffice.table.refresh(); + } + }, function (data) { + Feng.error("启用失败!" + data.message + "!"); + }); + ajax.start(); + } +}; + +/** + * 打开区域选择页面新增 + */ +TBranchOffice.areaAdd = function () { + + var area = $("#area").val(); + var areaId = $("#areaId").val(); + + var index = layer.open({ + type: 2, + title: '区域选择', + area: ['1000px', '270px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tBranchOffice/areaPageAdd?area='+area+'&areaId='+areaId + }); + this.layerIndex = index; +} + +/** + * 打开区域选择页面编辑 + */ +TBranchOffice.areaUpdate = function () { + + var area = $("#area").val(); + var areaId = $("#areaId").val(); + + var index = layer.open({ + type: 2, + title: '区域选择', + area: ['1000px', '270px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tBranchOffice/areaPageUpdate?area='+area+'&areaId='+areaId + }); + this.layerIndex = index; +} + +/** + * 查询市 + */ +TBranchOffice.areaCity = function () { + + //监听第一个下拉菜单的变动操作 + $("#province").change(function(){ + //当第一级下拉列表没选择值时,将二级下拉列表和三级同时设置为空 + if(this.value==""){ + $("#city").empty();//二级联动设为空设为空 + $("#city").append('<option value="">请选择</option>'); + //region + $("#district").empty();//三级联动设为空设为空 + $("#district").append('<option value="">请选择</option>'); + + } + if(this.value!=""){//第一级下拉菜单选择了值 + $("#city").empty();//先行置空,防止上次选择留下的元素影响效果 + $("#city").append('<option value="">请选择</option>')//设置初始选项 + $("#district").empty();//三级联动设为空设为空 + $("#district").append('<option value="">请选择</option>'); + var province = document.getElementById('province'); + var index= province.selectedIndex ; + var id = province.options[index].id; + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/areaCity?parentId="+id, function (data) { + for(var i=0,n=data.length;i<n;i++){//遍历 + $("#city").append('<option value="'+data[i].id+'">'+data[i].name+'</option>');//创造元素 + } + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start(); + } + }); + + /*var province = document.getElementById('province'); + var index= province.selectedIndex ; + var id = province.options[index].id; + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/areaCity?parentId="+id, function (data) { + /!*var opts=document.getElementById('city').options; + opts.length=0;// 这一句是清空原有列表项 + for(var i=0,n=data.length;i<n;i++){ + var data1=data[i]; + var opt=new Option(data1.name,data1.id,true,true); + opts.add(opt); + }*!/ + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start();*/ +} + +/** + * 查询区 + */ +TBranchOffice.areaDistrict = function () { + //监听第二个下拉菜单的变动操作 + $("#city").change(function(){ + if(this.value==""){//第二级菜单为空,则将第三级菜单也置为空 + $("#district").empty(); + $("#district").append('<option value="">请选择</option>'); + } + if(this.value!=""){//第二级菜单不为空,则将第三级菜单动态生成 + $("#district").empty(); + $("#district").append('<option value="">请选择</option>'); + + var city = document.getElementById('city'); + var cityIndex= city.selectedIndex ; + var id = city.options[cityIndex].id; + if(id == ""){ + id = city.options[cityIndex].value; + } + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/areaCity?parentId="+id, function (data) { + for(var i=0,n=data.length;i<n;i++){//对区数据进行遍历,动态生成 + $("#district").append('<option value="'+data[i].id+'">'+data[i].name+'</option>'); + } + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start(); + } + }) + + /*var city = document.getElementById('city'); + var cityIndex= city.selectedIndex ; + var id = city.options[cityIndex].value; + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/areaCity?parentId="+id, function (data) { + var opts=document.getElementById('district').options; + opts.length=0;// 这一句是清空原有列表项 + for(var i=0,n=data.length;i<n;i++){ + var data1=data[i]; + var opt=new Option(data1.name,data1.id,true,true); + opts.add(opt); + } + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start();*/ +} + +/** + * 选择省市 + */ +TBranchOffice.submitArea = function () { + var province = document.getElementById('province'); + var provinceIndex= province.selectedIndex ; + var provinceName = province.options[provinceIndex].value; + var provinceId = province.options[provinceIndex].id; + + if(provinceName == null || provinceName == ''){ + Feng.error("请选择省份!") + return; + } + + var city = document.getElementById('city'); + var cityIndex= city.selectedIndex ; + var cityId = city.options[cityIndex].value; + var cityName = city.options[cityIndex].innerText; + + if(cityName == null || cityName == '' || cityName =='请选择'){ + Feng.error("请选择市区!") + return; + } + + var district = document.getElementById('district'); + var districtIndex= district.selectedIndex ; + var districtId = district.options[districtIndex].value; + var districtName = district.options[districtIndex].innerText; + + if(districtName == '' || districtName == null || districtName == '请选择'){ + parent.$("#area").val(provinceName+'/'+cityName) + parent.$("#areaId").val(provinceId+'/'+cityId) + }else { + parent.$("#area").val(provinceName+'/'+cityName+'/'+districtName) + parent.$("#areaId").val(provinceId+'/'+cityId+'/'+districtId) + } + TBranchOfficeInfoDlg.close(); +} /** * 查询列表 */ TBranchOffice.search = function () { var queryData = {}; - queryData['condition'] = $("#condition").val(); + queryData['branchOfficeName'] = $("#branchOfficeName").val(); + queryData['principal'] = $("#principal").val(); + queryData['principalPhone'] = $("#principalPhone").val(); + queryData['operatingBusiness'] = $("#operatingBusiness").val(); + queryData['status'] = $("#status").val(); TBranchOffice.table.refresh({query: queryData}); }; +/** + * 重置 + */ +TBranchOffice.resetSearch = function (){ + $("#branchOfficeName").val(''); + $("#principal").val(''); + $("#principalPhone").val(''); + $("#operatingBusiness").val(''); + $("#status").val(''); + TBranchOffice.search(); +} + $(function () { var defaultColunms = TBranchOffice.initColumn(); var table = new BSTable(TBranchOffice.id, "/tBranchOffice/list", defaultColunms); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js index 86c4666..99665da 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js @@ -2,7 +2,53 @@ * 初始化详情对话框 */ var TBranchOfficeInfoDlg = { - tBranchOfficeInfoData : {} + tBranchOfficeInfoData : {}, + validateFields: { + branchOfficeName: { + validators: { + notEmpty: { + message: '分公司名称不能为空' + } + } + }, + name: { + validators: { + notEmpty: { + message: '负责人姓名不能为空' + } + } + }, + phone: { + validators: { + notEmpty: { + message: '联系电话不能为空' + } + } + }, + area: { + validators: { + notEmpty: { + message: '请选择服务区域' + } + } + }, + emergencyPhone: { + validators: { + notEmpty: { + message: '代理商抽成不能为空' + } + } + }, + } +}; + +/** + * 验证数据是否为空 + */ +TBranchOfficeInfoDlg.validate = function () { + $('#branchOfficeInfoForm').data("bootstrapValidator").resetForm(); + $('#branchOfficeInfoForm').bootstrapValidator('validate'); + return $("#branchOfficeInfoForm").data('bootstrapValidator').isValid(); }; /** @@ -56,6 +102,12 @@ .set('cityName') .set('districtCode') .set('districtName') + .set('branchOfficeName') + .set('operatingBusiness') + .set('bankDeposit') + .set('bankAccount') + .set('area') + .set('areaId') .set('status') .set('createTime'); } @@ -68,11 +120,20 @@ this.clearData(); this.collectData(); + if(!this.validate()){ + return ; + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/add", function(data){ - Feng.success("添加成功!"); - window.parent.TBranchOffice.table.refresh(); - TBranchOfficeInfoDlg.close(); + if(data.code == 500){ + Feng.error("添加失败!" + data.message + "!"); + return false; + }else { + Feng.success("添加成功!"); + window.parent.TBranchOffice.table.refresh(); + TBranchOfficeInfoDlg.close(); + } },function(data){ Feng.error("添加失败!" + data.responseJSON.message + "!"); }); @@ -88,11 +149,20 @@ this.clearData(); this.collectData(); + if(!this.validate()){ + return ; + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/update", function(data){ - Feng.success("修改成功!"); - window.parent.TBranchOffice.table.refresh(); - TBranchOfficeInfoDlg.close(); + if(data.code == 500){ + Feng.error("修改失败!" + data.message + "!"); + return false; + }else { + Feng.success("修改成功!"); + window.parent.TBranchOffice.table.refresh(); + TBranchOfficeInfoDlg.close(); + } },function(data){ Feng.error("修改失败!" + data.responseJSON.message + "!"); }); @@ -101,5 +171,5 @@ } $(function() { - + Feng.initValidator("branchOfficeInfoForm", TBranchOfficeInfoDlg.validateFields); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder.js b/management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder.js new file mode 100644 index 0000000..97619c0 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder.js @@ -0,0 +1,103 @@ +/** + * 管理初始化 + */ +var TCancelOrder = { + id: "TCancelOrderTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TCancelOrder.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, + {title: '订单id', field: 'orderId', visible: true, align: 'center', valign: 'middle'}, + {title: '用户类型(1=用户,2=司机)', field: 'userType', visible: true, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, + {title: '转单原因', field: 'cause', visible: true, align: 'center', valign: 'middle'}, + {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: true, align: 'center', valign: 'middle'}, + {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} + ]; +}; + +/** + * 检查是否选中 + */ +TCancelOrder.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TCancelOrder.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TCancelOrder.openAddTCancelOrder = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TCancelOrder.openTCancelOrderDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_update/' + TCancelOrder.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 删除 + */ +TCancelOrder.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/delete", function (data) { + Feng.success("删除成功!"); + TCancelOrder.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tCancelOrderId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 查询列表 + */ +TCancelOrder.search = function () { + var queryData = {}; + queryData['condition'] = $("#condition").val(); + TCancelOrder.table.refresh({query: queryData}); +}; + +$(function () { + var defaultColunms = TCancelOrder.initColumn(); + var table = new BSTable(TCancelOrder.id, "/tCancelOrder/list", defaultColunms); + table.setPaginationType("client"); + TCancelOrder.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder_info.js new file mode 100644 index 0000000..52c82f5 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder_info.js @@ -0,0 +1,99 @@ +/** + * 初始化详情对话框 + */ +var TCancelOrderInfoDlg = { + tCancelOrderInfoData : {} +}; + +/** + * 清除数据 + */ +TCancelOrderInfoDlg.clearData = function() { + this.tCancelOrderInfoData = {}; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TCancelOrderInfoDlg.set = function(key, val) { + this.tCancelOrderInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; + return this; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TCancelOrderInfoDlg.get = function(key) { + return $("#" + key).val(); +} + +/** + * 关闭此对话框 + */ +TCancelOrderInfoDlg.close = function() { + parent.layer.close(window.parent.TCancelOrder.layerIndex); +} + +/** + * 收集数据 + */ +TCancelOrderInfoDlg.collectData = function() { + this + .set('id') + .set('orderId') + .set('userType') + .set('userId') + .set('cause') + .set('status') + .set('createTime'); +} + +/** + * 提交添加 + */ +TCancelOrderInfoDlg.addSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/add", function(data){ + Feng.success("添加成功!"); + window.parent.TCancelOrder.table.refresh(); + TCancelOrderInfoDlg.close(); + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tCancelOrderInfoData); + ajax.start(); +} + +/** + * 提交修改 + */ +TCancelOrderInfoDlg.editSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/update", function(data){ + Feng.success("修改成功!"); + window.parent.TCancelOrder.table.refresh(); + TCancelOrderInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tCancelOrderInfoData); + ajax.start(); +} + +$(function() { + +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js b/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js index 863a177..d4119d6 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js @@ -1,5 +1,5 @@ /** - * 投诉列表管理初始化 + * 管理初始化 */ var TComplaint = { id: "TComplaintTable", //表格id @@ -14,135 +14,28 @@ TComplaint.initColumn = function () { return [ {field: 'selectItem', radio: true}, - {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, - {title: '投诉时间', field: 'insert_time', visible: true, align: 'center', valign: 'middle',width:'10%', + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '投诉司机id', field: 'driverId', visible: false, align: 'center', valign: 'middle'}, + {title: '投诉时间', field: 'createTime', 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: 'reason', visible: true, align: 'center', valign: 'middle'}, + {title: '备注', field: 'notes', visible: true, align: 'center', valign: 'middle'}, + {title: '处理状态', field: 'state', visible: true, align: 'center', valign: 'middle', formatter: function (value, row) { - var btn = ""; - if(row.insert_time != '' && row.insert_time != null) { - var time = row.insert_time.replace(" ",'<br>'); - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insert_time + '" onfocus="TUser.tooltip()">' + time + '</p>'] + if (row.state === 1){ + return '<span>待处理</span>' + }else if (row.state === 2){ + return '<span>已处理</span>' } - return btn; } }, - {title: '投诉人昵称', field: 'userName', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.userName != '' && row.userName != null) { - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userName + '" onfocus="TUser.tooltip()">' + row.userName + '</p>'] - } - return btn; - } - }, - {title: '投诉人<br/>电话', field: 'userPhone', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.userPhone != '' && row.userPhone != null) { - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userPhone + '" onfocus="TUser.tooltip()">' + row.userPhone + '</p>'] - } - return btn; - } - }, - {title: '投诉司机<br/>电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.driverPhone != '' && row.driverPhone != null) { - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.driverPhone + '" onfocus="TUser.tooltip()">' + row.driverPhone + '</p>'] - } - return btn; - } - }, - {title: '投诉<br/>原因', field: 'reason', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.reason != '' && row.reason != null) { - var str = row.reason; - if (str.length > 20){ - str = str.substring(0,20)+'...<br><button class="btn btn-outline btn-primary" onclick="TComplaint.buttonClick(' + row.id+','+ 1+ ')">查看更多</button>'; - } - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.reason + '" onfocus="TUser.tooltip()">' + str + '</p>'] - } - return btn; - } - }, - {title: '描述', field: 'description', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.description != '' && row.description != null) { - var str = row.description; - if (str.length > 20){ - str = str.substring(0,20)+'...<br><button class="btn btn-outline btn-primary" onclick="TComplaint.buttonClick(' + row.id+','+ 2+ ')">查看更多</button>'; - } - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.description + '" onfocus="TUser.tooltip()">' + str + '</p>'] - } - return btn; - } - }, - {title: '备注', field: 'handleResult', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.handleResult != '' && row.handleResult != null) { - var str = row.handleResult; - if (str.length > 20){ - str = str.substring(0,20)+'...<br><button class="btn btn-outline btn-primary" onclick="TComplaint.buttonClick(' + row.id+','+ 3+ ')">查看更多</button>'; - } - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.handleResult + '" onfocus="TUser.tooltip()">' + str + '</p>'] - } - return btn; - } - }, - {title: '状态', field: 'isHandle', visible: true, align: 'center', valign: 'middle',width:'10%', - formatter: function (value, row) { - var btn = ""; - if(row.isHandle != '' && row.isHandle != null) { - if (row.isHandle == 1){ - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已处理" onfocus="TUser.tooltip()">已处理</p>'] - } - }else{ - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="未处理" onfocus="TUser.tooltip()">未处理</p>'] - } - return btn; - } - }, - {title: '处理时间', field: 'handleTime', visible: true, align: 'center', valign: 'middle',width:'10%', - formatter: function (value, row) { - var btn = ""; - if(row.handleTime != '' && row.handleTime != null) { - var time = row.handleTime.replace(" ",'<br>'); - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.handleTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] - } - return btn; - } - }, - {title: '处理人', field: 'handleUserName', visible: true, align: 'center', valign: 'middle',width:'10%', - formatter: function (value, row) { - var btn = ""; - if(row.handleUserName != '' && row.handleUserName != null) { - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.handleUserName + '" onfocus="TUser.tooltip()">' + row.handleUserName + '</p>'] - } - return btn; - } - } + {title: '处理时间', field: 'auditTime', visible: true, align: 'center', valign: 'middle'}, + {title: '处理人', field: 'auditPersonName', visible: true, align: 'center', valign: 'middle'}, + {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: false, align: 'center', valign: 'middle'} ]; }; - -/** - * 查看更多按钮 - * @param con - */ -TComplaint.buttonClick = function (id,type) { - var index = layer.open({ - type: 2, - title: '查看详情', - area: ['800px', '420px'], //宽高 - fix: false, //不固定 - maxmin: true, - content: Feng.ctxPath + '/tComplaint/lookDetail/'+id+"/"+type - }); - this.layerIndex = index; -} - - /** * 检查是否选中 @@ -159,81 +52,119 @@ }; /** - * 立即处理 + * 点击添加 */ -TComplaint.immediately = function(){ +TComplaint.openAddTComplaint = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tComplaint/tComplaint_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TComplaint.openTComplaintDetail = function () { if (this.check()) { - if (TComplaint.seItem.isHandle == 1) { - swal("处理失败", "【未处理】状态下才能执行此操作", "warning"); - return; - } var index = layer.open({ type: 2, - title: '立即处理', + title: '详情', area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, - content: Feng.ctxPath + '/tComplaint/tComplaint_immediately/' + TComplaint.seItem.id + content: Feng.ctxPath + '/tComplaint/tComplaint_update/' + TComplaint.seItem.id }); this.layerIndex = index; } -} +}; /** - * 删除投诉列表 + * 删除 */ TComplaint.delete = function () { if (this.check()) { - if (TComplaint.seItem.isHandle != 1) { - swal("删除失败", "【已处理】状态下才能执行此操作", "warning"); - return; - } - swal({ - title: "您是否确认删除该投诉记录?", - text: "请谨慎操作,删除后数据无法恢复!", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "删除", - closeOnConfirm: false - }, function () { - var ajax = new $ax(Feng.ctxPath + "/tComplaint/delete", function (data) { - swal("删除成功", "您已经删除了该投诉记录。", "success"); - TComplaint.table.refresh(); - }, function (data) { - swal("删除失败", data.responseJSON.message + "!", "warning"); - }); - ajax.set("tComplaintId", TComplaint.seItem.id); - ajax.start(); + var ajax = new $ax(Feng.ctxPath + "/tComplaint/delete", function (data) { + Feng.success("删除成功!"); + TComplaint.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); }); + ajax.set("tComplaintId",this.seItem.id); + ajax.start(); } }; /** - * 查询投诉列表列表 + * 立即处理页面跳转 + */ +TComplaint.immediatelyAudit = function () { + if (this.check()) { + if(2 == TComplaint.seItem.state){ + Feng.error("该数据已处理!"); + return; + } + + var index = layer.open({ + type: 2, + title: '投诉处理', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tComplaint/immediatelyAudit?tComplaintId=' + TComplaint.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 提交审核 + */ +TComplaint.audit = function () { + var ajax = new $ax(Feng.ctxPath + "/tComplaint/audit", function (data) { + Feng.success("修改成功!"); + TComplaintInfoDlg.close(); + parent.TComplaint.table.refresh(); + }, function (data) { + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tComplaintId",$("#tComplaintId").val()); + ajax.set("notes",$("#notes").val()); + ajax.start(); +}; + +/** + * 查询列表 */ TComplaint.search = function () { var queryData = {}; - queryData['insertTime'] = $("#insertTime").val(); + queryData['createTime'] = $("#createTime").val(); queryData['userName'] = $("#userName").val(); queryData['userPhone'] = $("#userPhone").val(); queryData['driverPhone'] = $("#driverPhone").val(); - queryData['isHandle'] = $("#isHandle").val(); + queryData['state'] = $("#state").val(); TComplaint.table.refresh({query: queryData}); }; -TComplaint.resetSearch = function () { - $("#insertTime").val(""); - $("#userName").val(""); - $("#userPhone").val(""); - $("#driverPhone").val(""); - $("#isHandle").val(""); +/** + * 重置 + */ +TComplaint.resetSearch = function (){ + $("#createTime").val(''); + $("#userName").val(''); + $("#userPhone").val(''); + $("#driverPhone").val(''); + $("#state").val(''); TComplaint.search(); -}; +} $(function () { var defaultColunms = TComplaint.initColumn(); var table = new BSTable(TComplaint.id, "/tComplaint/list", defaultColunms); - table.setPaginationType("server"); + table.setPaginationType("client"); TComplaint.table = table.init(); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint_info.js index ff1c132..40a4722 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint_info.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint_info.js @@ -1,30 +1,8 @@ /** - * 初始化投诉列表详情对话框 + * 初始化详情对话框 */ var TComplaintInfoDlg = { - tComplaintInfoData : {}, - validateFields: { - handleResult: { - validators: { - notEmpty: { - message: '备注不能为空' - }/*, - regexp: { - regexp: /^.{1,500}$/, - message: '备注不能超过500个长度' - }*/ - } - }, - } -}; - -/** - * 验证数据是否为空 - */ -TComplaintInfoDlg.validate = function () { - $('#complaintFormInfo').data("bootstrapValidator").resetForm(); - $('#complaintFormInfo').bootstrapValidator('validate'); - return $("#complaintFormInfo").data('bootstrapValidator').isValid(); + tComplaintInfoData : {} }; /** @@ -69,43 +47,54 @@ this .set('id') .set('userId') - .set('reason') .set('driverId') - .set('description') - .set('isHandle') - .set('insertTime') - .set('handleResult') - .set('handleUserId'); + .set('reason') + .set('notes') + .set('state') + .set('status') + .set('createTime'); } /** - * 立即处理 + * 提交添加 */ -TComplaintInfoDlg.immediately = function() { +TComplaintInfoDlg.addSubmit = function() { this.clearData(); this.collectData(); - if(!this.validate()){ - return ; - } - var handleResult = $("#handleResult").val(); - if (handleResult.length > 500){ - Feng.info("备注不能超过500个字"); - return; - } + //提交信息 - var ajax = new $ax(Feng.ctxPath + "/tComplaint/immediately", function(data){ - Feng.success("处理成功!"); + var ajax = new $ax(Feng.ctxPath + "/tComplaint/add", function(data){ + Feng.success("添加成功!"); window.parent.TComplaint.table.refresh(); TComplaintInfoDlg.close(); },function(data){ - Feng.error("处理失败!" + data.responseJSON.message + "!"); + Feng.error("添加失败!" + data.responseJSON.message + "!"); }); - ajax.set("id",$("#id").val()); - ajax.set("handleResult",$("#handleResult").val()); + ajax.set(this.tComplaintInfoData); + ajax.start(); +} + +/** + * 提交修改 + */ +TComplaintInfoDlg.editSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tComplaint/update", function(data){ + Feng.success("修改成功!"); + window.parent.TComplaint.table.refresh(); + TComplaintInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tComplaintInfoData); ajax.start(); } $(function() { - Feng.initValidator("complaintFormInfo", TComplaintInfoDlg.validateFields); + }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js b/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js index 2041f60..3d48823 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js @@ -14,9 +14,16 @@ TCoupon.initColumn = function () { return [ {field: 'selectItem', radio: true}, - {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, - {title: '创建时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, {title: '优惠券名称', field: 'couponName', visible: true, align: 'center', valign: 'middle'}, + {title: '服务类型', field: 'couponServiceType', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.couponServiceType === 1){ + return '<span>通用型</span>' + } + } + }, {title: '优惠券类型', field: 'couponType', visible: true, align: 'center', valign: 'middle', formatter: function (value, row) { if (row.couponType === 1){ @@ -26,8 +33,8 @@ } } }, - {title: '优惠券码', field: 'couponCode', visible: true, align: 'center', valign: 'middle'}, - {title: '优惠券状态', field: 'couponStatus', visible: true, align: 'center', valign: 'middle', + {title: '优惠券码', field: 'couponCode', visible: false, align: 'center', valign: 'middle'}, + {title: '优惠券状态', field: 'couponStatus', visible: false, align: 'center', valign: 'middle', formatter: function (value, row) { if (row.couponStatus === 1){ return '<span>未发放</span>' @@ -40,17 +47,18 @@ } } }, - {title: '服务类型', field: 'couponServiceType', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - if (row.couponServiceType === 1){ - return '<span>通用型</span>' - } - } - }, {title: '条件金额', field: 'couponConditionalAmount', visible: true, align: 'center', valign: 'middle'}, {title: '优惠金额', field: 'couponPreferentialAmount', visible: true, align: 'center', valign: 'middle'}, - {title: '有效期', field: 'couponValidity', visible: true, align: 'center', valign: 'middle'}, - {title: '赠送数量', field: 'couponSendQuantity', visible: true, align: 'center', valign: 'middle'}, + {title: '数量', field: 'couponCount', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.couponCount === 0){ + return '<span>无限制</span>' + }else{ + return row.couponCount + } + } + }, + {title: '有效期', field: 'couponValidity', visible: true, align: 'center', valign: 'middle'}, {title: '状态', field: 'couponState', visible: true, align: 'center', valign: 'middle', formatter: function (value, row) { if (row.couponState === 1){ @@ -64,10 +72,10 @@ {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, formatter: function (value, row) { if (row.couponState === 1){ - return '<a href="#" onclick="TCoupon.stop('+row.id+','+row.couponState+')" style="color:red">停用</a>' +' ' + + return '<a href="#" onclick="TCoupon.updateStatus('+row.id+','+row.couponState+')" style="color:red">停用</a>' +' ' + '<a href="#" onclick="TCoupon.delete('+row.id+')" style="color:red">删除</a>' }else if (row.couponState === 2){ - return '<a href="#" onclick="TCoupon.start('+row.id+','+row.couponState+')" style="color:green">启用</a>' +' ' + + return '<a href="#" onclick="TCoupon.updateStatus('+row.id+','+row.couponState+')" style="color:green">启用</a>' +' ' + '<a href="#" onclick="TCoupon.delete('+row.id+')" style="color:red">删除</a>' } } @@ -96,7 +104,7 @@ var index = layer.open({ type: 2, title: '添加', - area: ['800px', '420px'], //宽高 + area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/tCoupon/tCoupon_add' @@ -124,17 +132,55 @@ /** * 删除 */ -TCoupon.delete = function () { - if (this.check()) { - var ajax = new $ax(Feng.ctxPath + "/tCoupon/delete", function (data) { - Feng.success("删除成功!"); +TCoupon.delete = function (id) { + var ajax = new $ax(Feng.ctxPath + "/tCoupon/delete", function (data) { + Feng.success("删除成功!"); + TCoupon.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tCouponId",id); + ajax.start(); +}; + +/** + * 提交启用冻结 + */ +TCoupon.updateStatus = function (id,couponState) { + var ajax = new $ax(Feng.ctxPath + "/tCoupon/update-status?id="+id+'&status='+couponState, function (data) { + if(500 == data.code){ + Feng.error(data.message); + return; + }else { + Feng.success("修改成功!"); TCoupon.table.refresh(); - }, function (data) { - Feng.error("删除失败!" + data.responseJSON.message + "!"); - }); - ajax.set("tCouponId",this.seItem.id); - ajax.start(); - } + } + }, function (data) { + Feng.error("修改失败!" + data.message + "!"); + }); + ajax.start(); +}; + +/** + * 选择新人券或者活动券时 + */ +TCoupon.changeCouponType = function (id,couponState) { + + //监听下拉菜单的变动操作 + $("#couponType").change(function(){ + // 如果选择活动券,将赠送数量隐藏 + if(this.value == 1){ + $("#changeCouponSendQuantity").hide() + } + if(this.value == ""){ + $("#changeCouponSendQuantity").hide() + } + if(this.value == 2){ + $("#changeCouponSendQuantity").show() + } + + }) + }; /** @@ -148,6 +194,16 @@ TCoupon.table.refresh({query: queryData}); }; +/** + * 重置 + */ +TCoupon.resetSearch = function (){ + $("#couponType").val(''); + $("#couponServiceType").val(''); + $("#createTime").val(''); + TCoupon.search(); +} + $(function () { var defaultColunms = TCoupon.initColumn(); var table = new BSTable(TCoupon.id, "/tCoupon/list", defaultColunms); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js index 5fc5939..dbb7d8b 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js @@ -2,7 +2,74 @@ * 初始化详情对话框 */ var TCouponInfoDlg = { - tCouponInfoData : {} + tCouponInfoData : {}, + validateFields: { + couponName: { + validators: { + notEmpty: { + message: '优惠券名称不能为空' + } + } + }, + couponType: { + validators: { + notEmpty: { + message: '请选择优惠券类型' + } + } + }, + couponServiceType: { + validators: { + notEmpty: { + message: '请选择服务类类型' + } + } + }, + couponCount: { + validators: { + notEmpty: { + message: '优惠券数量不能为空' + } + } + }, + couponConditionalAmount: { + validators: { + notEmpty: { + message: '条件金额不能为空' + } + } + }, + couponPreferentialAmount: { + validators: { + notEmpty: { + message: '优惠金额不能为空' + } + } + }, + couponValidity: { + validators: { + notEmpty: { + message: '有效期不能为空' + } + } + }, + remainingQuantity: { + validators: { + notEmpty: { + message: '优惠券总量不能为空' + } + } + }, + } +}; + +/** + * 验证数据是否为空 + */ +TCouponInfoDlg.validate = function () { + $('#couponInfoForm').data("bootstrapValidator").resetForm(); + $('#couponInfoForm').bootstrapValidator('validate'); + return $("#couponInfoForm").data('bootstrapValidator').isValid(); }; /** @@ -46,7 +113,7 @@ TCouponInfoDlg.collectData = function() { this .set('id') - .set('createtime') + .set('createTime') .set('couponType') .set('couponServiceType') .set('couponCount') @@ -54,6 +121,7 @@ .set('couponPreferentialAmount') .set('couponValidity') .set('couponSendQuantity') + .set('remainingQuantity') .set('couponName'); } @@ -64,6 +132,10 @@ this.clearData(); this.collectData(); + + if(!this.validate()){ + return ; + } //提交信息 var ajax = new $ax(Feng.ctxPath + "/tCoupon/add", function(data){ @@ -98,5 +170,5 @@ } $(function() { - + Feng.initValidator("couponInfoForm", TCouponInfoDlg.validateFields); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js b/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js index add7c3d..9bbeebf 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js @@ -323,13 +323,16 @@ * 打开区域选择页面新增 */ TDriver.areaAdd = function () { + + var area = $("#area").val(); + var areaId = $("#areaId").val(); var index = layer.open({ type: 2, title: '区域选择', area: ['1000px', '270px'], //宽高 fix: false, //不固定 maxmin: true, - content: Feng.ctxPath + '/tDriver/areaPageAdd' + content: Feng.ctxPath + '/tDriver/areaPageAdd?area='+area+'&areaId='+areaId }); this.layerIndex = index; } @@ -338,7 +341,36 @@ * 查询市 */ TDriver.areaCity = function () { - var province = document.getElementById('province'); + //监听第一个下拉菜单的变动操作 + $("#province").change(function(){ + //当第一级下拉列表没选择值时,将二级下拉列表和三级同时设置为空 + if(this.value==""){ + $("#city").empty();//二级联动设为空设为空 + $("#city").append('<option value="">请选择</option>'); + //region + $("#district").empty();//三级联动设为空设为空 + $("#district").append('<option value="">请选择</option>'); + + } + if(this.value!=""){//第一级下拉菜单选择了值 + $("#city").empty();//先行置空,防止上次选择留下的元素影响效果 + $("#city").append('<option value="">请选择</option>')//设置初始选项 + $("#district").empty();//三级联动设为空设为空 + $("#district").append('<option value="">请选择</option>'); + var province = document.getElementById('province'); + var index= province.selectedIndex ; + var id = province.options[index].id; + var ajax = new $ax(Feng.ctxPath + "/tDriver/areaCity?parentId="+id, function (data) { + for(var i=0,n=data.length;i<n;i++){//遍历 + $("#city").append('<option value="'+data[i].id+'">'+data[i].name+'</option>');//创造元素 + } + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start(); + } + }); + /*var province = document.getElementById('province'); var index= province.selectedIndex ; var id = province.options[index].id; var ajax = new $ax(Feng.ctxPath + "/tDriver/areaCity?parentId="+id, function (data) { @@ -352,14 +384,42 @@ }, function (data) { Feng.error("查询失败!" + data.responseJSON.message + "!"); }); - ajax.start(); + ajax.start();*/ } /** * 查询区 */ TDriver.areaDistrict = function () { - var city = document.getElementById('city'); + + //监听第二个下拉菜单的变动操作 + $("#city").change(function(){ + if(this.value==""){//第二级菜单为空,则将第三级菜单也置为空 + $("#district").empty(); + $("#district").append('<option value="">请选择</option>'); + } + if(this.value!=""){//第二级菜单不为空,则将第三级菜单动态生成 + $("#district").empty(); + $("#district").append('<option value="">请选择</option>'); + + var city = document.getElementById('city'); + var cityIndex= city.selectedIndex ; + var id = city.options[cityIndex].id; + if(id == ""){ + id = city.options[cityIndex].value; + } + var ajax = new $ax(Feng.ctxPath + "/tDriver/areaCity?parentId="+id, function (data) { + for(var i=0,n=data.length;i<n;i++){//对区数据进行遍历,动态生成 + $("#district").append('<option value="'+data[i].id+'">'+data[i].name+'</option>'); + } + }, function (data) { + Feng.error("查询失败!" + data.responseJSON.message + "!"); + }); + ajax.start(); + } + }) + + /*var city = document.getElementById('city'); var cityIndex= city.selectedIndex ; var id = city.options[cityIndex].value; var ajax = new $ax(Feng.ctxPath + "/tDriver/areaCity?parentId="+id, function (data) { @@ -373,7 +433,7 @@ }, function (data) { Feng.error("查询失败!" + data.responseJSON.message + "!"); }); - ajax.start(); + ajax.start();*/ } /** @@ -385,19 +445,33 @@ var provinceName = province.options[provinceIndex].value; var provinceId = province.options[provinceIndex].id; + if(provinceName == null || provinceName == ''){ + Feng.error("请选择省份!") + return; + } + var city = document.getElementById('city'); var cityIndex= city.selectedIndex ; var cityId = city.options[cityIndex].value; var cityName = city.options[cityIndex].innerText; + + if(cityName == null || cityName == '' || cityName =='请选择'){ + Feng.error("请选择市区!") + return; + } var district = document.getElementById('district'); var districtIndex= district.selectedIndex ; var districtId = district.options[districtIndex].value; var districtName = district.options[districtIndex].innerText; + if(districtName == null || districtName == '' || districtName =='请选择'){ + Feng.error("请选择区县!") + return; + } + parent.$("#area").val(provinceName+'/'+cityName+'/'+districtName) parent.$("#areaId").val(provinceId+'/'+cityId+'/'+districtId) - console.log() TDriverInfoDlg.close(); } diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver_info.js index ab958df..6df0474 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver_info.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver_info.js @@ -2,7 +2,60 @@ * 初始化详情对话框 */ var TDriverInfoDlg = { - tDriverInfoData : {} + tDriverInfoData : {}, + validateFields: { + name: { + validators: { + notEmpty: { + message: '姓名不能为空' + } + } + }, + phone: { + validators: { + notEmpty: { + message: '手机号不能为空' + } + } + }, + emergencyContact: { + validators: { + notEmpty: { + message: '紧急联系人姓名不能为空' + } + } + }, + emergencyPhone: { + validators: { + notEmpty: { + message: '紧急联系人电话不能为空' + } + } + }, + area: { + validators: { + notEmpty: { + message: '请选择服务区域' + } + } + }, + idcard: { + validators: { + notEmpty: { + message: '身份证号码不能为空' + } + } + }, + } +}; + +/** + * 验证数据是否为空 + */ +TDriverInfoDlg.validate = function () { + $('#driverInfoForm').data("bootstrapValidator").resetForm(); + $('#driverInfoForm').bootstrapValidator('validate'); + return $("#driverInfoForm").data('bootstrapValidator').isValid(); }; /** @@ -91,15 +144,38 @@ this.clearData(); this.collectData(); + if(!this.validate()){ + return ; + } + + var idcardFront = $("#idcardFront").val(); + if ("" == idcardFront){ + Feng.info("请上传身份证正面照"); + return; + } + + var idcardBack = $("#idcardBack").val(); + if ("" == idcardBack){ + Feng.info("请上传身份证背面照"); + return; + } + + var driverLicense = $("#driverLicense").val(); + if ("" == driverLicense){ + Feng.info("请上传驾驶证"); + return; + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tDriver/add", function(data){ if(data.code == 500){ Feng.error("添加失败!" + data.message + "!"); return false; + }else { + Feng.success("添加成功!"); + window.parent.TDriver.table.refresh(); + TDriverInfoDlg.close(); } - Feng.success("添加成功!"); - window.parent.TDriver.table.refresh(); - TDriverInfoDlg.close(); },function(data){ Feng.error("添加失败!" + data.responseJSON.message + "!"); }); @@ -115,15 +191,38 @@ this.clearData(); this.collectData(); + if(!this.validate()){ + return ; + } + + var idcardFront = $("#idcardFront").val(); + if ("" == idcardFront){ + Feng.info("请上传身份证正面照"); + return; + } + + var idcardBack = $("#idcardBack").val(); + if ("" == idcardBack){ + Feng.info("请上传身份证背面照"); + return; + } + + var driverLicense = $("#driverLicense").val(); + if ("" == driverLicense){ + Feng.info("请上传驾驶证"); + return; + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tDriver/update", function(data){ if(data.code == 500){ Feng.error("修改失败!" + data.message + "!"); return false; + }else { + Feng.success("修改成功!"); + window.parent.TDriver.table.refresh(); + TDriverInfoDlg.close(); } - Feng.success("修改成功!"); - window.parent.TDriver.table.refresh(); - TDriverInfoDlg.close(); },function(data){ Feng.error("修改失败!" + data.responseJSON.message + "!"); }); @@ -132,5 +231,5 @@ } $(function() { - + Feng.initValidator("driverInfoForm", TDriverInfoDlg.validateFields); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate.js b/management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate.js new file mode 100644 index 0000000..0fe960c --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate.js @@ -0,0 +1,176 @@ +/** + * 管理初始化 + */ +var TEvaluate = { + id: "TEvaluateTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TEvaluate.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '订单id', field: 'orderId', visible: false, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: false, align: 'center', valign: 'middle'}, + {title: '评价时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + + {title: '订单编号', field: 'code', 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: 'driverName', visible: true, align: 'center', valign: 'middle'}, + {title: '司机手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '评价分数', field: 'score', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.score === 1){ + return '<span>非常差</span>' + }else if (row.score === 2){ + return '<span>差</span>' + }else if (row.score === 3){ + return '<span>一般</span>' + }else if (row.score === 4){ + return '<span>满意</span>' + }else if (row.score === 5){ + return '<span>非常满意</span>' + } + } + }, + {title: '评价内容', field: 'evaluate', visible: true, align: 'center', valign: 'middle'}, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + return '<a href="#" onclick="TEvaluate.searchTAppUserDetail('+row.id+')" style="color:blue">详情</a>' + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TEvaluate.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TEvaluate.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TEvaluate.openAddTEvaluate = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tEvaluate/tEvaluate_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TEvaluate.openTEvaluateDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tEvaluate/tEvaluate_update/' + TEvaluate.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 打开查看详情(使用中) + */ +TEvaluate.searchTAppUserDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tEvaluate/evaluateDetail?evaluateId=' + id + }); + this.layerIndex = index; +}; + +/** + * 删除 + */ +TEvaluate.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tEvaluate/delete", function (data) { + Feng.success("删除成功!"); + TEvaluate.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tEvaluateId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 订单信息导出 + */ +TEvaluate.export=function(){ + var createTime=$("#createTime").val() + var userName=$("#userName").val() + var driverName=$("#driverName").val() + var orderType=$("#orderType").val() + var score=$("#score").val() + window.location.href=Feng.ctxPath + "/tEvaluate/export?createTime="+createTime + +"&userName="+userName + +"&driverName="+driverName + +"&orderType="+orderType + +"&score="+score + ; +} + +/** + * 查询列表 + */ +TEvaluate.search = function () { + var queryData = {}; + queryData['createTime'] = $("#createTime").val(); + queryData['userName'] = $("#userName").val(); + queryData['driverName'] = $("#driverName").val(); + queryData['orderType'] = $("#orderType").val(); + queryData['score'] = $("#score").val(); + TEvaluate.table.refresh({query: queryData}); +}; + +/** + * 重置 + */ +TEvaluate.resetSearch = function (){ + $("#createTime").val(''); + $("#userName").val(''); + $("#driverName").val(''); + $("#orderType").val(''); + $("#score").val(''); + TEvaluate.search(); +} + +$(function () { + var defaultColunms = TEvaluate.initColumn(); + var table = new BSTable(TEvaluate.id, "/tEvaluate/list", defaultColunms); + table.setPaginationType("client"); + TEvaluate.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate_info.js new file mode 100644 index 0000000..4bb5a87 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate_info.js @@ -0,0 +1,99 @@ +/** + * 初始化详情对话框 + */ +var TEvaluateInfoDlg = { + tEvaluateInfoData : {} +}; + +/** + * 清除数据 + */ +TEvaluateInfoDlg.clearData = function() { + this.tEvaluateInfoData = {}; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TEvaluateInfoDlg.set = function(key, val) { + this.tEvaluateInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; + return this; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TEvaluateInfoDlg.get = function(key) { + return $("#" + key).val(); +} + +/** + * 关闭此对话框 + */ +TEvaluateInfoDlg.close = function() { + parent.layer.close(window.parent.TEvaluate.layerIndex); +} + +/** + * 收集数据 + */ +TEvaluateInfoDlg.collectData = function() { + this + .set('id') + .set('orderId') + .set('userId') + .set('score') + .set('evaluate') + .set('status') + .set('createTime'); +} + +/** + * 提交添加 + */ +TEvaluateInfoDlg.addSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tEvaluate/add", function(data){ + Feng.success("添加成功!"); + window.parent.TEvaluate.table.refresh(); + TEvaluateInfoDlg.close(); + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tEvaluateInfoData); + ajax.start(); +} + +/** + * 提交修改 + */ +TEvaluateInfoDlg.editSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tEvaluate/update", function(data){ + Feng.success("修改成功!"); + window.parent.TEvaluate.table.refresh(); + TEvaluateInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tEvaluateInfoData); + ajax.start(); +} + +$(function() { + +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tAppUser.js b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tAppUser.js new file mode 100644 index 0000000..2c50279 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tAppUser.js @@ -0,0 +1,281 @@ +/** + * 管理初始化 + */ +var TAppUser = { + id: "TAppUserTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TAppUser.initColumn = function () { + return [ + {field: 'selectItem', radio: false}, + {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, + {title: '用户昵称', field: 'nickname', visible: true, align: 'center', valign: 'middle'}, + {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, + {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.sex === 1){ + return '<span>男</span>' + }else if (row.sex === 2){ + return '<span>女</span>' + }else { + return '<span>未知</span>' + } + } + }, + {title: '头像', field: 'avatar', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + return '<img src="'+row.avatar+'" style="height: 60px;width: 60px"/>' + } + }, + {title: '微信openid', field: 'openid', visible: true, align: 'center', valign: 'middle'}, + {title: '微信unionid', field: 'unionid', visible: true, align: 'center', valign: 'middle'}, + {title: '紧急联系人', field: 'emergencyContact', visible: true, align: 'center', valign: 'middle'}, + {title: '紧急联系电话', field: 'emergencyPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '账户余额', field: 'accountBalance', visible: true, align: 'center', valign: 'middle'}, + {title: '用户标签id', field: 'userTagId', visible: true, align: 'center', valign: 'middle'}, + {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.status === 1){ + return '<span>正常</span>' + }else if (row.status === 2){ + return '<span>冻结</span>' + }else if (row.status === 3){ + return '<span>已删除</span>' + } + } + }, + {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + // {title: '是否异常', field: 'isException', hidden:true, visible: true, align: 'center', valign: 'middle'}, + // {title: '启用冻结理由', field: 'remark', hidden:true,visible: true, align: 'center', valign: 'middle'}, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + if (row.status === 1){ + return '<a href="#" onclick="TAppUser.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + + '<a href="#" onclick="TAppUser.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' + }else if (row.status === 2){ + return '<a href="#" onclick="TAppUser.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + + '<a href="#" onclick="TAppUser.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' + } + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TAppUser.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TAppUser.seItem = selected[0]; + return true; + } +}; + + +/** + * 用户信息导出 + */ +TAppUser.export=function(){ + var nickName=$("#nickName").val() + var status=$("#status").val() + var id=$("#id").val() + var createTime=$("#createTime").val() + var phone=$("#phone").val() + window.location.href=Feng.ctxPath + "/tAppUser/export-userInfo?nickname="+nickName + +"&status="+status + +"&id="+id + +"&createTime="+createTime + +"&phone="+phone + ; +} + + +/** + * 点击添加 + */ +TAppUser.openAddTAppUser = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tAppUser/tAppUser_add' + }); + this.layerIndex = index; +}; + + + +/** + * 停用 + */ +TAppUser.stop = function (id) { + var index = layer.open({ + type: 2, + title: '停用', + area: ['45%', '50%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id + }); + this.layerIndex = index; +}; + +/** + * 启动 + */ +TAppUser.start = function (id) { + var index = layer.open({ + type: 2, + title: '启用', + area: ['45%', '50%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id + }); + this.layerIndex = index; +}; + +/** + * 提交启用冻结 + */ +TAppUser.updateStatus = function () { + var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { + Feng.success("修改成功!"); + TAppUserInfoDlg.close(); + parent.TAppUser.table.refresh(); + }, function (data) { + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set("id",$("#id").val()); + ajax.set("status",$("#status").val()); + if($("#status").val() == 1){ + ajax.set("remark",$("#stopRemark").val()); + } + if($("#status").val() == 2){ + ajax.set("remark",$("#startRemark").val()); + } + ajax.start(); +}; + +/** + * 打开查看详情 + */ +TAppUser.openTAppUserDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tAppUser/tAppUser_update/' + TAppUser.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 打开查看详情(使用中) + */ +TAppUser.searchTAppUserDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tAppUser/userDetail?tAppUserId=' + id + }); + this.layerIndex = index; +}; + +/** + * 删除 + */ +TAppUser.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tAppUser/delete", function (data) { + Feng.success("删除成功!"); + TAppUser.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tAppUserId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 查询异常列表 + */ +TAppUser.searchExceptionList = function () { + var queryData = {}; + queryData.status = 2; + TAppUser.table.refresh({query: queryData}); +}; + +/** + * 查询列表 + */ +TAppUser.search = function () { + var queryData = {}; + queryData.nickname = $("#nickName").val(); + queryData.phone = $("#phone").val(); + queryData.createTime = $("#createTime").val(); + queryData.id = $("#id").val(); + queryData.status = $("#status").val(); + TAppUser.table.refresh({query: queryData}); +}; + +/** + * 跳转优惠卷页面 + */ +TAppUser.searchCoupon = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + var data = []; + for (let i = 0; i < selected.length; i++) { + data[i] = selected[i].id; + } + if(this.check()){ + var index = layer.open({ + type: 2, + title: '赠送优惠券', + area: ['80%', '80%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tAppUser/sendCoupon?userIds=' + data + }); + this.layerIndex = index; + } +}; + +/** + * 重置 + */ +TAppUser.resetSearch = function (){ + $("#nickName").val(''); + $("#phone").val(''); + $("#createTime").val(''); + $("#id").val(''); + $("#status").val(''); + TAppUser.search(); +} + +$(function () { + var defaultColunms = TAppUser.initColumn(); + var table = new BSTable(TAppUser.id, "/tAppUser/list", defaultColunms); + table.setPaginationType("client"); + TAppUser.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tCancelOrder.js b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tCancelOrder.js new file mode 100644 index 0000000..dc2e55e --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tCancelOrder.js @@ -0,0 +1,182 @@ +/** + * 管理初始化 + */ +var TCancelOrder = { + id: "TCancelOrderTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TCancelOrder.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, + + {title: '下单时间', field: 'placeTime', visible: true, align: 'center', valign: 'middle'}, + {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, + {title: '订单来源', field: 'source', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.source === 1){ + return '<span>小程序</span>' + }else if (row.source === 2){ + return '<span>司机创建</span>' + } + }}, + {title: '下单用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, + {title: '下单用户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '接单司机', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, + {title: '司机电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, + + {title: '订单id', field: 'orderId', visible: false, align: 'center', valign: 'middle'}, + {title: '用户类型(1=用户,2=司机)', field: 'userType', visible: false, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '转单原因', field: 'cause', visible: true, align: 'center', valign: 'middle'}, + {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: false, align: 'center', valign: 'middle'}, + {title: '取消时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + return '<a href="#" onclick="TCancelOrder.searchTCancelOrderDetail('+row.id+')" style="color:green">详情</a>' + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TCancelOrder.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TCancelOrder.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TCancelOrder.openAddTCancelOrder = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TCancelOrder.openTCancelOrderDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_update/' + TCancelOrder.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 打开查看详情(使用中) + */ +TCancelOrder.searchTCancelOrderDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/cancelOrderDetail?cancelOrderId=' + id + }); + this.layerIndex = index; +}; + +/** + * 删除 + */ +TCancelOrder.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/delete", function (data) { + Feng.success("删除成功!"); + TCancelOrder.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tCancelOrderId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 取消订单信息导出 + */ +TCancelOrder.export=function(){ + var createTime=$("#createTime").val() + var code=$("#code").val() + var source=$("#source").val() + var userName=$("#userName").val() + var userPhone=$("#userPhone").val() + var state=$("#state").val() + var driverName=$("#driverName").val() + window.location.href=Feng.ctxPath + "/tCancelOrder/export?createTime="+createTime + +"&code="+code + +"&source="+source + +"&userName="+userName + +"&userPhone="+userPhone + +"&state="+state + +"&driverName="+driverName + ; +} + +/** + * 查询列表 + */ +TCancelOrder.search = function () { + var queryData = {}; + queryData['createTime'] = $("#createTime").val(); + queryData['code'] = $("#code").val(); + queryData['source'] = $("#source").val(); + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['state'] = $("#state").val(); + queryData['driverName'] = $("#driverName").val(); + TCancelOrder.table.refresh({query: queryData}); +}; + +/** + * 重置 + */ +TCancelOrder.resetSearch = function (){ + $("#createTime").val(''); + $("#code").val(''); + $("#source").val(''); + $("#userName").val(''); + $("#userPhone").val(''); + $("#state").val(''); + $("#driverName").val(''); + TCancelOrder.search(); +} + +$(function () { + var defaultColunms = TCancelOrder.initColumn(); + var table = new BSTable(TCancelOrder.id, "/tCancelOrder/cancelOrderList", defaultColunms); + table.setPaginationType("client"); + TCancelOrder.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder.js b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder.js index 3dc9fae..165e28f 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder.js @@ -14,32 +14,76 @@ TOrder.initColumn = function () { return [ {field: 'selectItem', radio: true}, - {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, - {title: '编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, - {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, - {title: '司机id', field: 'driverId', visible: true, align: 'center', valign: 'middle'}, - {title: '订单来源(1=小程序)', field: 'source', visible: true, align: 'center', valign: 'middle'}, - {title: '代理商id', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, - {title: '分公司id', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, - {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, - {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, - {title: '起点纬度', field: 'startLat', visible: true, align: 'center', valign: 'middle'}, - {title: '起点经度', field: 'startLng', visible: true, align: 'center', valign: 'middle'}, - {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, - {title: '终点纬度', field: 'endLat', visible: true, align: 'center', valign: 'middle'}, - {title: '终点经度', field: 'endLng', visible: true, align: 'center', valign: 'middle'}, - {title: '上车时间', field: 'boardingTime', visible: true, align: 'center', valign: 'middle'}, - {title: '下车时间', field: 'getoffTime', visible: true, align: 'center', valign: 'middle'}, - {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, - {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle'}, - {title: '支付金额', field: 'payMoney', visible: true, align: 'center', valign: 'middle'}, - {title: '优惠金额', field: 'discountedPrice', visible: true, align: 'center', valign: 'middle'}, - {title: '优惠券id', field: 'couponId', visible: true, align: 'center', valign: 'middle'}, - {title: '支付类型(1=线上)', field: 'payType', visible: true, align: 'center', valign: 'middle'}, - {title: '支付时间', field: 'payTime', visible: true, align: 'center', valign: 'middle'}, - {title: '订单状态(1=待接单,2=已接单,3=)', field: 'state', visible: true, align: 'center', valign: 'middle'}, - {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: true, align: 'center', valign: 'middle'}, - {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '下单时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, + {title: '订单来源', field: 'source', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.source === 1){ + return '<span>小程序</span>' + }else if (row.source === 2){ + return '<span>司机创建</span>' + } + }}, + {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '下单用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, + {title: '下单用户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '起点纬度', field: 'startLat', visible: false, align: 'center', valign: 'middle'}, + {title: '起点经度', field: 'startLng', visible: false, align: 'center', valign: 'middle'}, + {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '终点纬度', field: 'endLat', visible: false, align: 'center', valign: 'middle'}, + {title: '终点经度', field: 'endLng', visible: false, align: 'center', valign: 'middle'}, + {title: '司机id', field: 'driverId', visible: false, align: 'center', valign: 'middle'}, + {title: '接单司机', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, + {title: '司机电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, + {title: '代理商id', field: 'agentId', visible: false, align: 'center', valign: 'middle'}, + {title: '分公司id', field: 'branchOfficeId', visible: false, align: 'center', valign: 'middle'}, + {title: '上车时间', field: 'boardingTime', visible: false, align: 'center', valign: 'middle'}, + {title: '下车时间', field: 'getoffTime', visible: false, align: 'center', valign: 'middle'}, + {title: '订单金额', field: 'orderMoney', visible: false, align: 'center', valign: 'middle'}, + {title: '支付金额', field: 'payMoney', visible: false, align: 'center', valign: 'middle'}, + {title: '优惠金额', field: 'discountedPrice', visible: false, align: 'center', valign: 'middle'}, + {title: '优惠券id', field: 'couponId', visible: false, align: 'center', valign: 'middle'}, + {title: '支付类型', field: 'payType', visible: false, align: 'center', valign: 'middle'}, + {title: '支付时间', field: 'payTime', visible: false, align: 'center', valign: 'middle'}, + {title: '取消次数', field: 'cancelCount', visible: true, align: 'center', valign: 'middle'}, + {title: '订单状态', field: 'state', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.state === 101){ + return '<span>待接单</span>' + }else if (row.state === 102){ + return '<span>已接单</span>' + }else if (row.state === 103){ + return '<span>前往预约点</span>' + }else if (row.state === 104){ + return '<span>到达预约点</span>' + }else if (row.state === 105){ + return '<span>开始服务</span>' + }else if (row.state === 106){ + return '<span>到达目的地</span>' + }else if (row.state === 107){ + return '<span>待支付</span>' + }else if (row.state === 108){ + return '<span>待评价</span>' + }else if (row.state === 109){ + return '<span>已完成</span>' + }else if (row.state === 201){ + return '<span>转单中</span>' + }else if (row.state === 301){ + return '<span>已取消</span>' + }else if (row.state === 401){ + return '<span>等待中</span>' + } + }}, + {title: '状态', field: 'status', visible: false, align: 'center', valign: 'middle'}, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + return '<a href="#" onclick="TOrder.searchTOrderDetail('+row.id+')" style="color:green">详情</a>' + } + } ]; }; @@ -90,6 +134,21 @@ }; /** + * 打开查看详情(使用中) + */ +TOrder.searchTOrderDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/orderDetail?orderId=' + id + }); + this.layerIndex = index; +}; + +/** * 删除 */ TOrder.delete = function () { @@ -106,17 +165,88 @@ }; /** + * 订单信息导出 + */ +TOrder.export=function(){ + var createTime=$("#createTime").val() + var code=$("#code").val() + var source=$("#source").val() + var userName=$("#userName").val() + var userPhone=$("#userPhone").val() + var state=$("#state").val() + var driverName=$("#driverName").val() + window.location.href=Feng.ctxPath + "/tOrder/export?createTime="+createTime + +"&code="+code + +"&source="+source + +"&userName="+userName + +"&userPhone="+userPhone + +"&state="+state + +"&driverName="+driverName + ; +} + +/** + * 订单异常页面 + */ +TOrder.tOrderException = function () { + var index = layer.open({ + type: 2, + title: '异常', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/tOrder-exception' + }); + this.layerIndex = index; +}; + +/** + * 取消订单页面 + */ +TOrder.cancelOrder = function () { + var index = layer.open({ + type: 2, + title: '取消订单', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/cancelOrder' + }); + this.layerIndex = index; +}; + +/** * 查询列表 */ TOrder.search = function () { var queryData = {}; - queryData['condition'] = $("#condition").val(); + queryData['createTime'] = $("#createTime").val(); + queryData['code'] = $("#code").val(); + queryData['source'] = $("#source").val(); + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['state'] = $("#state").val(); + queryData['driverName'] = $("#driverName").val(); TOrder.table.refresh({query: queryData}); }; +/** + * 重置 + */ +TOrder.resetSearch = function (){ + $("#createTime").val(''); + $("#code").val(''); + $("#source").val(''); + $("#userName").val(''); + $("#userPhone").val(''); + $("#state").val(''); + $("#driverName").val(''); + TOrder.search(); +} + $(function () { var defaultColunms = TOrder.initColumn(); - var table = new BSTable(TOrder.id, "/tOrder/list", defaultColunms); + var table = new BSTable(TOrder.id, "/tOrder/orderList", defaultColunms); table.setPaginationType("client"); TOrder.table = table.init(); }); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderException.js b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderException.js new file mode 100644 index 0000000..1765d0a --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderException.js @@ -0,0 +1,295 @@ +/** + * 管理初始化 + */ +var TOrderException = { + id: "TOrderExceptionTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TOrderException.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '下单时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, + {title: '订单来源', field: 'source', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.source === 1){ + return '<span>小程序</span>' + }else if (row.source === 2){ + return '<span>司机创建</span>' + } + }}, + {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '下单用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, + {title: '下单用户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '起点纬度', field: 'startLat', visible: false, align: 'center', valign: 'middle'}, + {title: '起点经度', field: 'startLng', visible: false, align: 'center', valign: 'middle'}, + {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '终点纬度', field: 'endLat', visible: false, align: 'center', valign: 'middle'}, + {title: '终点经度', field: 'endLng', visible: false, align: 'center', valign: 'middle'}, + {title: '司机id', field: 'driverId', visible: false, align: 'center', valign: 'middle'}, + {title: '接单司机', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, + {title: '司机电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, + {title: '代理商id', field: 'agentId', visible: false, align: 'center', valign: 'middle'}, + {title: '分公司id', field: 'branchOfficeId', visible: false, align: 'center', valign: 'middle'}, + {title: '上车时间', field: 'boardingTime', visible: false, align: 'center', valign: 'middle'}, + {title: '下车时间', field: 'getoffTime', visible: false, align: 'center', valign: 'middle'}, + {title: '订单金额', field: 'orderMoney', visible: false, align: 'center', valign: 'middle'}, + {title: '支付金额', field: 'payMoney', visible: false, align: 'center', valign: 'middle'}, + {title: '优惠金额', field: 'discountedPrice', visible: false, align: 'center', valign: 'middle'}, + {title: '优惠券id', field: 'couponId', visible: false, align: 'center', valign: 'middle'}, + {title: '支付类型', field: 'payType', visible: false, align: 'center', valign: 'middle'}, + {title: '支付时间', field: 'payTime', visible: false, align: 'center', valign: 'middle'}, + {title: '取消次数', field: 'cancelCount', visible: true, align: 'center', valign: 'middle'}, + {title: '订单状态', field: 'state', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.state === 101){ + return '<span>待接单</span>' + }else if (row.state === 102){ + return '<span>已接单</span>' + }else if (row.state === 103){ + return '<span>前往预约点</span>' + }else if (row.state === 104){ + return '<span>到达预约点</span>' + }else if (row.state === 105){ + return '<span>开始服务</span>' + }else if (row.state === 106){ + return '<span>到达目的地</span>' + }else if (row.state === 107){ + return '<span>待支付</span>' + }else if (row.state === 108){ + return '<span>待评价</span>' + }else if (row.state === 109){ + return '<span>已完成</span>' + }else if (row.state === 201){ + return '<span>转单中</span>' + }else if (row.state === 301){ + return '<span>已取消</span>' + }else if (row.state === 401){ + return '<span>等待中</span>' + } + }}, + {title: '状态', field: 'status', visible: false, align: 'center', valign: 'middle'}, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + if (row.userStatus === 1){ + return '<a href="#" onclick="TOrderException.searchTOrderExceptionDetail('+row.id+')" style="color:green">详情</a>' +' ' + + '<a href="#" onclick="TOrderException.stop('+row.id+','+row.status+')" style="color:red">冻结</a>' + }else if (row.userStatus === 2){ + return '<a href="#" onclick="TOrderException.searchTOrderExceptionDetail('+row.id+')" style="color:green">详情</a>' +' ' + + '<a href="#" onclick="TOrderException.start('+row.id+','+row.status+')" style="color:green">启用</a>' + } + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TOrderException.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TOrderException.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TOrderException.openAddTOrder = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/tOrder_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TOrderException.openTOrderDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/tOrder_update/' + TOrderException.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 打开查看详情(使用中) + */ +TOrderException.searchTOrderExceptionDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/orderExceptionDetail?orderId=' + id + }); + this.layerIndex = index; +}; + +/** + * 删除 + */ +TOrderException.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tOrder/delete", function (data) { + Feng.success("删除成功!"); + TOrderException.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tOrderId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 司机信息导出 + */ +TOrderException.export=function(){ + var createTime=$("#createTime").val() + var code=$("#code").val() + var source=$("#source").val() + var userName=$("#userName").val() + var userPhone=$("#userPhone").val() + var state=$("#state").val() + var driverName=$("#driverName").val() + window.location.href=Feng.ctxPath + "/tOrder/export-exception?createTime="+createTime + +"&code="+code + +"&source="+source + +"&userName="+userName + +"&userPhone="+userPhone + +"&state="+state + +"&driverName="+driverName + ; +} + +/** + * 停用 + */ +TOrderException.stop = function (id) { + var index = layer.open({ + type: 2, + title: '停用', + area: ['45%', '50%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/tOrderException_start_and_stop?id='+id + }); + this.layerIndex = index; +}; + +/** + * 启动 + */ +TOrderException.start = function (id) { + var index = layer.open({ + type: 2, + title: '启用', + area: ['45%', '50%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/tOrderException_start_and_stop?id='+id + }); + this.layerIndex = index; +}; + +/** + * 提交启用冻结 + */ +TOrderException.updateStatus = function () { + var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { + Feng.success("修改成功!"); + TOrderInfoDlg.closeException(); + parent.TOrderException.table.refresh(); + }, function (data) { + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set("id",$("#id").val()); + ajax.set("status",$("#status").val()); + if($("#status").val() == 1){ + ajax.set("remark",$("#stopRemark").val()); + } + if($("#status").val() == 2){ + ajax.set("remark",$("#startRemark").val()); + } + ajax.start(); +}; + +/** + * 取消订单页面 + */ +TOrderException.cancelOrder = function () { + var index = layer.open({ + type: 2, + title: '取消订单', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrder/cancelOrder' + }); + this.layerIndex = index; +}; + +/** + * 查询列表 + */ +TOrderException.search = function () { + var queryData = {}; + queryData['createTime'] = $("#createTime").val(); + queryData['code'] = $("#code").val(); + queryData['source'] = $("#source").val(); + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['state'] = $("#state").val(); + queryData['driverName'] = $("#driverName").val(); + TOrderException.table.refresh({query: queryData}); +}; + +/** + * 重置 + */ +TOrderException.resetSearch = function (){ + $("#createTime").val(''); + $("#code").val(''); + $("#source").val(''); + $("#userName").val(''); + $("#userPhone").val(''); + $("#state").val(''); + $("#driverName").val(''); + TOrderException.search(); +} + +$(function () { + var defaultColunms = TOrderException.initColumn(); + var table = new BSTable(TOrderException.id, "/tOrder/orderExceptionList", defaultColunms); + table.setPaginationType("client"); + TOrderException.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderExceptionDetailCancelOrder.js b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderExceptionDetailCancelOrder.js new file mode 100644 index 0000000..8fd43c5 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderExceptionDetailCancelOrder.js @@ -0,0 +1,137 @@ +/** + * 管理初始化 + */ +var TOrderExceptionDetailCancelOrder = { + id: "TOrderExceptionDetailCancelOrderTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TOrderExceptionDetailCancelOrder.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + + {title: '下单时间', field: 'placeTime', visible: false, align: 'center', valign: 'middle'}, + {title: '取消时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, + {title: '订单来源', field: 'source', visible: false, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.source === 1){ + return '<span>小程序</span>' + }else if (row.source === 2){ + return '<span>司机创建</span>' + } + }}, + {title: '下单用户昵称', field: 'userName', visible: false, align: 'center', valign: 'middle'}, + {title: '下单用户手机', field: 'userPhone', visible: false, align: 'center', valign: 'middle'}, + {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, + {title: '接单司机', field: 'driverName', visible: false, align: 'center', valign: 'middle'}, + + {title: '司机电话', field: 'driverPhone', visible: false, align: 'center', valign: 'middle'}, + {title: '订单id', field: 'orderId', visible: false, align: 'center', valign: 'middle'}, + {title: '用户类型(1=用户,2=司机)', field: 'userType', visible: false, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '转单原因', field: 'cause', visible: false, align: 'center', valign: 'middle'}, + {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: false, align: 'center', valign: 'middle'}, + ]; +}; + +/** + * 检查是否选中 + */ +TOrderExceptionDetailCancelOrder.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TOrderExceptionDetailCancelOrder.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TOrderExceptionDetailCancelOrder.openAddTCancelOrder = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TOrderExceptionDetailCancelOrder.openTCancelOrderDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_update/' + TCancelOrder.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 打开查看详情(使用中) + */ +TOrderExceptionDetailCancelOrder.searchTCancelOrderDetail = function (id) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tCancelOrder/cancelOrderDetail?cancelOrderId=' + id + }); + this.layerIndex = index; +}; + +/** + * 删除 + */ +TOrderExceptionDetailCancelOrder.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/delete", function (data) { + Feng.success("删除成功!"); + TCancelOrder.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tCancelOrderId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 查询列表 + */ +/*TOrderExceptionDetailCancelOrder.search = function () { + var queryData = {}; + queryData['userId'] = $("#userId").val(); + queryData['orderId'] = $("#orderId").val(); + TOrderExceptionDetailCancelOrder.table.refresh({query: queryData}); +};*/ + +$(function () { + var defaultColunms = TOrderExceptionDetailCancelOrder.initColumn(); + var table = new BSTable(TOrderExceptionDetailCancelOrder.id, "/tCancelOrder/userCancelOrderList", defaultColunms); + table.setPaginationType("client"); + TOrderExceptionDetailCancelOrder.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder_info.js index fe13585..9117794 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder_info.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder_info.js @@ -41,6 +41,13 @@ } /** + * 关闭此对话框 + */ +TOrderInfoDlg.closeException = function() { + parent.layer.close(window.parent.TOrderException.layerIndex); +} + +/** * 收集数据 */ TOrderInfoDlg.collectData = function() { diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordAgent.js b/management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordAgent.js new file mode 100644 index 0000000..31ce1ed --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordAgent.js @@ -0,0 +1,153 @@ +/** + * 管理初始化 + */ +var TRechargeRecordAgent = { + id: "TRechargeRecordAgentTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TRechargeRecordAgent.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '完成支付时间', field: 'payTime', visible: false, align: 'center', valign: 'middle'}, + {title: '充值时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '代理商姓名', field: 'principal', visible: true, align: 'center', valign: 'middle'}, + {title: '联系电话', field: 'principalPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '代理区域', field: 'area', visible: true, align: 'center', valign: 'middle'}, + {title: '三方流水号', field: 'orderNumber', visible: false, align: 'center', valign: 'middle'}, + {title: '数据类型(1=用户,2=司机)', field: 'type', visible: false, align: 'center', valign: 'middle'}, + {title: '司机id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '司机姓名', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, + {title: '司机手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '充值金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, + {title: '充值方式', field: 'payType', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.payType === 1){ + return '<span>微信</span>' + }else if (row.payType === 2){ + return '<span>系统充值</span>' + }else{ + return '<span>其他</span>' + } + } + }, + {title: '状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.payStatus === 1){ + return '<span>失败</span>' + }else if (row.payStatus === 2){ + return '<span>成功</span>' + } + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TRechargeRecordAgent.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TRechargeRecordAgent.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TRechargeRecordAgent.openAddTRechargeRecord = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tRechargeRecord/tRechargeRecord_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TRechargeRecordAgent.openTRechargeRecordDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tRechargeRecord/tRechargeRecord_update/' + TRechargeRecordAgent.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 删除 + */ +TRechargeRecordAgent.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tRechargeRecord/delete", function (data) { + Feng.success("删除成功!"); + TRechargeRecordAgent.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tRechargeRecordId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 司机信息导出 + */ +TRechargeRecordAgent.export=function(){ + var createTime=$("#createTime").val() + var driverName=$("#driverName").val() + var driverPhone=$("#driverPhone").val() + window.location.href=Feng.ctxPath + "/tRechargeRecord/exportAgentRecharge?createTime="+createTime + +"&driverName"+driverName + +"&driverPhone="+driverPhone + ; +} + +/** + * 查询列表 + */ +TRechargeRecordAgent.search = function () { + var queryData = {}; + queryData['driverName'] = $("#driverName").val(); + queryData['driverPhone'] = $("#driverPhone").val(); + queryData['createTime'] = $("#createTime").val(); + TRechargeRecordAgent.table.refresh({query: queryData}); +}; + +/** + * 重置 + */ +TRechargeRecordAgent.resetSearch = function (){ + $("#createTime").val(''); + $("#driverName").val(''); + $("#driverPhone").val(''); + TRechargeRecordAgent.search(); +} + +$(function () { + var defaultColunms = TRechargeRecordAgent.initColumn(); + var table = new BSTable(TRechargeRecordAgent.id, "/tRechargeRecord/agentRechargeList", defaultColunms); + table.setPaginationType("client"); + TRechargeRecordAgent.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordUser.js b/management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordUser.js new file mode 100644 index 0000000..d41b5e3 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordUser.js @@ -0,0 +1,155 @@ +/** + * 管理初始化 + */ +var TRechargeRecordUser = { + id: "TRechargeRecordUserTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TRechargeRecordUser.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '完成支付时间', field: 'payTime', visible: false, align: 'center', valign: 'middle'}, + {title: '充值时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '流水ID', field: 'code', visible: true, align: 'center', valign: 'middle'}, + {title: '三方流水号', field: 'orderNumber', visible: false, align: 'center', valign: 'middle'}, + {title: '数据类型(1=用户,2=司机)', field: 'type', visible: false, align: 'center', valign: 'middle'}, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '用户姓名', field: 'userName', visible: true, align: 'center', valign: 'middle'}, + {title: '用户手机号', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, + {title: '充值金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, + {title: '充值方式', field: 'payType', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.payType === 1){ + return '<span>微信</span>' + }else if (row.payType === 2){ + return '<span>系统充值</span>' + }else{ + return '<span>其他</span>' + } + } + }, + {title: '状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.payStatus === 1){ + return '<span>失败</span>' + }else if (row.payStatus === 2){ + return '<span>成功</span>' + } + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TRechargeRecordUser.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TRechargeRecordUser.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TRechargeRecordUser.openAddTRechargeRecord = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tRechargeRecord/tRechargeRecord_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TRechargeRecordUser.openTRechargeRecordDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tRechargeRecord/tRechargeRecord_update/' + TRechargeRecordUser.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 删除 + */ +TRechargeRecordUser.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tRechargeRecord/delete", function (data) { + Feng.success("删除成功!"); + TRechargeRecordUser.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tRechargeRecordId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 司机信息导出 + */ +TRechargeRecordUser.export=function(){ + var createTime=$("#createTime").val() + var userName=$("#userName").val() + var userPhone=$("#userPhone").val() + var code=$("#code").val() + window.location.href=Feng.ctxPath + "/tRechargeRecord/exportUserRecharge?createTime="+createTime + +"&userName="+userName + +"&userPhone="+userPhone + +"&code="+code + ; +} + +/** + * 查询列表 + */ +TRechargeRecordUser.search = function () { + var queryData = {}; + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['code'] = $("#code").val(); + queryData['createTime'] = $("#createTime").val(); + TRechargeRecordUser.table.refresh({query: queryData}); +}; + +/** + * 重置 + */ +TRechargeRecordUser.resetSearch = function (){ + $("#createTime").val(''); + $("#userName").val(''); + $("#userPhone").val(''); + $("#code").val(''); + TRechargeRecordUser.search(); +} + +$(function () { + var defaultColunms = TRechargeRecordUser.initColumn(); + var table = new BSTable(TRechargeRecordUser.id, "/tRechargeRecord/userRechargeList", defaultColunms); + table.setPaginationType("client"); + TRechargeRecordUser.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig.js b/management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig.js new file mode 100644 index 0000000..808eb76 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig.js @@ -0,0 +1,313 @@ +/** + * 管理初始化 + */ +var TSystemConfig = { + id: "TSystemConfigTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TSystemConfig.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, + {title: '类型(1=派单规则,2=佣金分成规则,3=抽成规则,4=积分规则,5=价格规则,6=余额规则,7=客服管理)', field: 'type', visible: true, align: 'center', valign: 'middle'}, + {title: '内容', field: 'content', visible: true, align: 'center', valign: 'middle'} + ]; +}; + +/** + * 检查是否选中 + */ +TSystemConfig.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TSystemConfig.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TSystemConfig.openAddTSystemConfig = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tSystemConfig/tSystemConfig_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TSystemConfig.openTSystemConfigDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tSystemConfig/tSystemConfig_update/' + TSystemConfig.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 删除 + */ +TSystemConfig.delete = function () { + if (this.check()) { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/delete", function (data) { + Feng.success("删除成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tSystemConfigId",this.seItem.id); + ajax.start(); + } +}; + +/** + * 派单规则 + */ +TSystemConfig.dispatchRulesSubmit = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + var reqData = {}; + reqData['num1'] = Number($("#num1").val()); + reqData['num2'] = Number($("#num2").val()); + reqData['num3'] = Number($("#num3").val()); + reqData['num4'] = Number($("#num4").val()); + reqData['num5'] = Number($("#num5").val()); + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",1); + ajax.start(); +}; + +/** + * 佣金分成规则 + */ +TSystemConfig.commissionShareRules = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + var reqData = {}; + reqData['num1'] = Number($("#num1").val()); + reqData['num2'] = Number($("#num2").val()); + reqData['num3'] = Number($("#num3").val()); + reqData['num4'] = Number($("#num4").val()); + reqData['num5'] = Number($("#num5").val()); + reqData['num6'] = Number($("#num6").val()); + reqData['num7'] = Number($("#num7").val()); + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",2); + ajax.start(); +}; +/** + * 抽成规则 + */ +TSystemConfig.extractionRulesSubmit = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + var reqData = {}; + reqData['num1'] = Number($("#num1").val()); + reqData['num2'] = Number($("#num2").val()); + reqData['num3'] = Number($("#num3").val()); + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",3); + ajax.start(); +}; + +/** + * 积分规则 + */ +TSystemConfig.integralRulesSubmit = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + var reqData = {}; + reqData['num1'] = $("#num1").val(); + reqData['num2'] = $("#num2").val(); + reqData['num3'] = Number($("#num3").val()); + reqData['num4'] = Number($("#num4").val()); + reqData['num5'] = Number($("#num5").val()); + reqData['num6'] = Number($("#num6").val()); + reqData['num7'] = Number($("#num7").val()); + reqData['num8'] = Number($("#num8").val()); + reqData['num9'] = Number($("#num9").val()); + reqData['num10'] = Number($("#num10").val()); + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",4); + ajax.start(); +}; + +/** + * 价格规则 + */ +TSystemConfig.priceRulesSubmit = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + + var json1=[]; + for (let i = 0; i < $('input[name="num1"]').length; i++) { + var arr = {} + arr['num1'] = $($('input[name="num1"]')[i]).val(); + arr['num2'] = $($('input[name="num2"]')[i]).val(); + arr['num3'] = Number($($('input[name="num3"]')[i]).val()); + arr['num4'] = Number($($('input[name="num4"]')[i]).val()); + arr['num5'] = Number($($('input[name="num5"]')[i]).val()); + arr['num6'] = Number($($('input[name="num6"]')[i]).val()); + arr['num7'] = Number($($('input[name="num7"]')[i]).val()); + arr['num8'] = Number($($('input[name="num8"]')[i]).val()); + arr['num9'] = Number($($('input[name="num9"]')[i]).val()); + arr['num10'] = Number($($('input[name="num10"]')[i]).val()); + arr['num11'] = Number($($('input[name="num11"]')[i]).val()); + arr['num12'] = Number($($('input[name="num12"]')[i]).val()); + json1.push(arr) + } + + var ExtraCost = {}; + ExtraCost['num1'] = Number($('#num13').val()); + ExtraCost['num2'] = Number($('#num14').val()); + ExtraCost['num3'] = Number($('#num15').val()); + ExtraCost['num4'] = Number($('#num16').val()); + ExtraCost['num5'] = Number($('#num17').val()); + ExtraCost['num6'] = Number($('#num18').val()); + ExtraCost['num7'] = Number($('#num19').val()); + ExtraCost['num8'] = Number($('#num20').val()); + ExtraCost['num9'] = Number($('#num21').val()); + + var reqData = {}; + reqData['ChargeStandard'] = json1; + reqData['ExtraCost'] = ExtraCost; + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",5); + ajax.start(); +}; + +/** + * 余额规则 + */ +TSystemConfig.balanceRulesSubmit = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + var reqData = {}; + reqData['num1'] = Number($("#num1").val()); + reqData['num2'] = Number($("#num2").val()); + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",6); + ajax.start(); +}; + +/** + * 客服管理 + */ +TSystemConfig.serviceMgmtSubmit = function () { + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { + Feng.success("保存成功!"); + TSystemConfig.table.refresh(); + }, function (data) { + Feng.error("保存失败!" + data.responseJSON.message + "!"); + }); + var reqData = {}; + reqData['num1'] = $("#num1").val(); + ajax.set("content",JSON.stringify(reqData)); + ajax.set("type",7); + ajax.start(); +}; + +TSystemConfig.addBox = function (){ + var i = $('input[name="num1"]').length + 1; + var a ="<div>\n" + + " <div class=\"initialLevel col-sm-12 control-label form-group\" >\n" + + " <span class=\"control-label\" >时间段</span>\n" + + " <input class=\"control-label\" id=\"num1-"+i+"\" name=\"num1\" type=\"text\" placeholder=\"00:00\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >——</span>\n" + + " <input class=\"control-label\" id=\"num2-"+i+"\" name=\"num2\" type=\"text\" placeholder=\"00:00\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >代驾里程</span>\n" + + " <input class=\"control-label\" id=\"num3-"+i+"\" name=\"num3\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >——</span>\n" + + " <input class=\"control-label\" id=\"num4-"+i+"\" name=\"num4\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >公里,起步价</span>\n" + + " <input class=\"control-label\" id=\"num5-"+i+"\" name=\"num5\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >元,超出里程每</span>\n" + + " <input class=\"control-label\" id=\"num6-"+i+"\" name=\"num6\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >公里,收费</span>\n" + + " <input class=\"control-label\" id=\"num7-"+i+"\" name=\"num7\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >元</span>\n" + + " <span class=\"fa fa-remove\" onclick=\"TSystemConfig.delBox(this)\"></span>\n" + + " </div>\n" + + " <div class=\"initialLevel col-sm-12 control-label form-group\" >\n" + + " <span class=\"control-label\" >代驾里程</span>\n" + + " <input class=\"control-label\" id=\"num8-"+i+"\" name=\"num8\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >——</span>\n" + + " <input class=\"control-label\" id=\"num9-"+i+"\" name=\"num9\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >公里,起步价</span>\n" + + " <input class=\"control-label\" id=\"num10-"+i+"\" name=\"num10\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >元,超出里程每</span>\n" + + " <input class=\"control-label\" id=\"num11-"+i+"\" name=\"num11\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >公里,收费</span>\n" + + " <input class=\"control-label\" id=\"num12-"+i+"\" name=\"num12\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + + " <span class=\"control-label\" >元</span>\n" + + " </div>\n" + + " </div>" + + $("#rules").append($(a)) +} + +TSystemConfig.delBox = function (o) { + $(o).parent("div").parent("div").remove() +}; + +/** + * 查询列表 + */ +TSystemConfig.search = function () { + var queryData = {}; + queryData['condition'] = $("#condition").val(); + TSystemConfig.table.refresh({query: queryData}); +}; + +$(function () { + var defaultColunms = TSystemConfig.initColumn(); + var table = new BSTable(TSystemConfig.id, "/tSystemConfig/list", defaultColunms); + table.setPaginationType("client"); + TSystemConfig.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig_info.js new file mode 100644 index 0000000..e4906c5 --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig_info.js @@ -0,0 +1,95 @@ +/** + * 初始化详情对话框 + */ +var TSystemConfigInfoDlg = { + tSystemConfigInfoData : {} +}; + +/** + * 清除数据 + */ +TSystemConfigInfoDlg.clearData = function() { + this.tSystemConfigInfoData = {}; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TSystemConfigInfoDlg.set = function(key, val) { + this.tSystemConfigInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; + return this; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TSystemConfigInfoDlg.get = function(key) { + return $("#" + key).val(); +} + +/** + * 关闭此对话框 + */ +TSystemConfigInfoDlg.close = function() { + parent.layer.close(window.parent.TSystemConfig.layerIndex); +} + +/** + * 收集数据 + */ +TSystemConfigInfoDlg.collectData = function() { + this + .set('id') + .set('type') + .set('content'); +} + +/** + * 提交添加 + */ +TSystemConfigInfoDlg.addSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/add", function(data){ + Feng.success("添加成功!"); + window.parent.TSystemConfig.table.refresh(); + TSystemConfigInfoDlg.close(); + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tSystemConfigInfoData); + ajax.start(); +} + +/** + * 提交修改 + */ +TSystemConfigInfoDlg.editSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/update", function(data){ + Feng.success("修改成功!"); + window.parent.TSystemConfig.table.refresh(); + TSystemConfigInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tSystemConfigInfoData); + ajax.start(); +} + +$(function() { + +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui.js b/management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui.js new file mode 100644 index 0000000..59da50f --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui.js @@ -0,0 +1,166 @@ +/** + * 管理初始化 + */ +var TYouTui = { + id: "TYouTuiTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TYouTui.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, + {title: '优推名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, + {title: '服务类型', field: 'type', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.type === 1){ + return row.number+'<span>次</span>' + }else if (row.type === 2){ + return row.number+'<span>小时</span>' + } + } + }, + {title: '服务内容', field: 'content', visible: true, align: 'center', valign: 'middle'}, + {title: '兑换积分数', field: 'integral', visible: true, align: 'center', valign: 'middle'}, + {title: '优推值', field: 'number', visible: false, align: 'center', valign: 'middle'}, + {title: '优推距离(米)', field: 'distance', visible: true, align: 'center', valign: 'middle'}, + {title: '有效期', field: 'effectiveTime', visible: false, align: 'center', valign: 'middle'}, + {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.status === 1){ + return '<span>正常</span>' + }else if (row.status === 2){ + return '<span>冻结</span>' + }else if (row.status === 3){ + return '<span>已删除</span>' + } + } + }, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + formatter: function (value, row) { + if (row.status === 1){ + return '<a href="#" onclick="TYouTui.updateStatus('+row.id+','+row.status+')" style="color:red">冻结</a>' +' ' + + '<a href="#" onclick="TYouTui.delete('+row.id+')" style="color:red">删除</a>' + }else if (row.status === 2){ + return '<a href="#" onclick="TYouTui.updateStatus('+row.id+','+row.status+')" style="color:green">解冻</a>' +' ' + + '<a href="#" onclick="TYouTui.delete('+row.id+')" style="color:red">删除</a>' + } + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TYouTui.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TYouTui.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加 + */ +TYouTui.openAddTYouTui = function () { + var index = layer.open({ + type: 2, + title: '添加', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tYouTui/tYouTui_add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看详情 + */ +TYouTui.openTYouTuiDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '详情', + area: ['800px', '420px'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tYouTui/tYouTui_update/' + TYouTui.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 删除 + */ +TYouTui.delete = function (id) { + var ajax = new $ax(Feng.ctxPath + "/tYouTui/delete", function (data) { + if(500 == data.code){ + Feng.error(data.message); + return; + }else { + Feng.success("删除成功!"); + TYouTui.table.refresh(); + } + }, function (data) { + Feng.error("删除失败!" + data.responseJSON.message + "!"); + }); + ajax.set("tYouTuiId",id); + ajax.start(); +}; + +/** + * 提交启用冻结 + */ +TYouTui.updateStatus = function (id,status) { + var ajax = new $ax(Feng.ctxPath + "/tYouTui/update-status?id="+id+'&status='+status, function (data) { + if(500 == data.code){ + Feng.error(data.message); + return; + }else { + Feng.success("修改成功!"); + TYouTui.table.refresh(); + } + }, function (data) { + Feng.error("修改失败!" + data.message + "!"); + }); + ajax.start(); +}; + +/** + * 查询列表 + */ +TYouTui.search = function () { + var queryData = {}; + queryData['createTime'] = $("#createTime").val(); + queryData['type'] = $("#type").val(); + TYouTui.table.refresh({query: queryData}); +}; + +/** + * 重置 + */ +TYouTui.resetSearch = function (){ + $("#createTime").val(''); + $("#type").val(''); + TYouTui.search(); +} + +$(function () { + var defaultColunms = TYouTui.initColumn(); + var table = new BSTable(TYouTui.id, "/tYouTui/list", defaultColunms); + table.setPaginationType("client"); + TYouTui.table = table.init(); +}); diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui_info.js b/management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui_info.js new file mode 100644 index 0000000..bd32ace --- /dev/null +++ b/management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui_info.js @@ -0,0 +1,160 @@ +/** + * 初始化详情对话框 + */ +var TYouTuiInfoDlg = { + tYouTuiInfoData : {}, + validateFields: { + name: { + validators: { + notEmpty: { + message: '优推名称不能为空' + } + } + }, + type: { + validators: { + notEmpty: { + message: '优推类型不能为空' + } + } + }, + integral: { + validators: { + notEmpty: { + message: '兑换条件不能为空' + } + } + }, + distance: { + validators: { + notEmpty: { + message: '优推距离不能为空' + } + } + }, + effectiveTime: { + validators: { + notEmpty: { + message: '有效期不能为空' + } + } + }, + serviceContent: { + validators: { + notEmpty: { + message: '服务内容不能为空' + } + } + }, + } +}; + +/** + * 验证数据是否为空 + */ +TYouTuiInfoDlg.validate = function () { + $('#youTuiInfoForm').data("bootstrapValidator").resetForm(); + $('#youTuiInfoForm').bootstrapValidator('validate'); + return $("#youTuiInfoForm").data('bootstrapValidator').isValid(); +}; + +/** + * 清除数据 + */ +TYouTuiInfoDlg.clearData = function() { + this.tYouTuiInfoData = {}; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TYouTuiInfoDlg.set = function(key, val) { + this.tYouTuiInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; + return this; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TYouTuiInfoDlg.get = function(key) { + return $("#" + key).val(); +} + +/** + * 关闭此对话框 + */ +TYouTuiInfoDlg.close = function() { + parent.layer.close(window.parent.TYouTui.layerIndex); +} + +/** + * 收集数据 + */ +TYouTuiInfoDlg.collectData = function() { + this + .set('id') + .set('name') + .set('type') + .set('number') + .set('integral') + .set('effectiveTime') + .set('content') + .set('status') + .set('distance') + .set('serviceContent') + .set('createTime'); +} + +/** + * 提交添加 + */ +TYouTuiInfoDlg.addSubmit = function() { + + this.clearData(); + this.collectData(); + + if(!this.validate()){ + return ; + } + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tYouTui/add", function(data){ + Feng.success("添加成功!"); + window.parent.TYouTui.table.refresh(); + TYouTuiInfoDlg.close(); + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tYouTuiInfoData); + ajax.start(); +} + +/** + * 提交修改 + */ +TYouTuiInfoDlg.editSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tYouTui/update", function(data){ + Feng.success("修改成功!"); + window.parent.TYouTui.table.refresh(); + TYouTuiInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tYouTuiInfoData); + ajax.start(); +} + +$(function() { + Feng.initValidator("youTuiInfoForm", TYouTuiInfoDlg.validateFields); +}); -- Gitblit v1.7.1