From 566c44cc5712ab9c997424ee5a5438e0a81a016e Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期三, 17 五月 2023 18:49:38 +0800 Subject: [PATCH] BUG修改 --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java | 64 ++++ management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig.js | 9 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tCancelOrder.html | 44 +- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java | 27 ++ management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetail.html | 61 ++-- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/THomePageController.java | 13 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html | 20 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java | 49 ++- management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html | 22 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html | 22 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBranchOfficeResp.java | 10 management/guns-admin/src/main/resources/redis.properties | 2 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html | 21 + management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html | 16 management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserException.html | 12 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html | 2 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java | 14 management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderException.html | 42 +- management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html | 25 + management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js | 2 management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue.js | 6 management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js | 33 ++ management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html | 6 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgent.java | 24 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java | 18 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAudit.html | 67 ++++ management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java | 36 ++ management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js | 31 ++ management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java | 24 + 30 files changed, 571 insertions(+), 155 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 6c988c0..8ffc991 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 @@ -1,8 +1,10 @@ package com.stylefeng.guns.modular.system.controller.general; +import cn.hutool.crypto.SecureUtil; 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.common.constant.state.ManagerStatus; import com.stylefeng.guns.core.exception.GunsException; import com.stylefeng.guns.core.exception.ServiceExceptionEnum; import com.stylefeng.guns.core.shiro.ShiroKit; @@ -22,6 +24,8 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; @@ -62,6 +66,8 @@ private ITDriverService tDriverService; @Autowired private ITDriverWorkService tDriverWorkService; + @Autowired + private IUserService userService; @Autowired private RedisUtil redisUtil; @@ -158,6 +164,7 @@ */ @RequestMapping(value = "/add") @ResponseBody + @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) public Object add(TAgent tAgent) { String[] split1 = tAgent.getArea().split("/"); @@ -165,7 +172,11 @@ int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("provinceName", split1[0]).eq("cityName",split1[1])); if(count>0){ return new SuccessTip(500,"该代理商已存在!"); + } + int count1 = userService.selectCount(new EntityWrapper<User>().eq("account", tAgent.getAccount())); + if (count1 > 0){ + return new SuccessTip(500,"该账号已存在!"); } tAgent.setPrincipal(tAgent.getPrincipal().replace(" ","")); @@ -182,6 +193,22 @@ tAgent.setCityName(city.getName()); tAgent.setCityCode(city.getCode()); tAgentService.insert(tAgent); + + //添加User对象 + User user = new User(); + user.setAccount(tAgent.getAccount()); + user.setSalt(ShiroKit.getRandomSalt(5)); + user.setPassword(ShiroKit.md5(tAgent.getPassword(), user.getSalt())); + user.setStatus(ManagerStatus.OK.getCode()); + user.setRoleid("2"); + user.setDeptid(25); + user.setCreatetime(new Date()); + user.setRoleType(3); + user.setObjectId(tAgent.getId()); + user.setName(tAgent.getPrincipal()); + user.setSex(1); + userService.insert(user); + return SUCCESS_TIP; } 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 bf1f4eb..8e7f977 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,10 +1,13 @@ package com.stylefeng.guns.modular.system.controller.general; +import cn.hutool.crypto.SecureUtil; 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.common.constant.state.ManagerStatus; import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.core.util.SinataUtil; import com.stylefeng.guns.modular.system.controller.resp.TBranchOfficeResp; import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; import com.stylefeng.guns.modular.system.enums.StatusEnum; @@ -14,6 +17,8 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; @@ -52,6 +57,8 @@ private ITDriverService tDriverService; @Autowired private ITDriverWorkService tDriverWorkService; + @Autowired + private IUserService userService; @Autowired private RedisUtil redisUtil; @@ -290,10 +297,15 @@ */ @RequestMapping(value = "/add") @ResponseBody + @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) public Object add(TBranchOffice tBranchOffice) { int count = tBranchOfficeService.selectCount(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName())); if(count>0){ return new SuccessTip(500,"该分公司名称已存在!"); + } + int count1 = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount())); + if (count1 > 0){ + return new SuccessTip(500,"该账号已存在!"); } Object o = tBranchOfficeService.addOrUpdate(tBranchOffice); @@ -304,6 +316,22 @@ tBranchOffice.setStatus(StatusEnum.NORMAL.getCode()); tBranchOfficeService.insert(tBranchOffice); + + //添加User对象 + User user = new User(); + user.setAccount(tBranchOffice.getAccount()); + user.setSalt(ShiroKit.getRandomSalt(5)); + user.setPassword(ShiroKit.md5(tBranchOffice.getPassword(), user.getSalt())); + user.setStatus(ManagerStatus.OK.getCode()); + user.setRoleid("3"); + user.setDeptid(25); + user.setCreatetime(new Date()); + user.setRoleType(2); + user.setObjectId(tBranchOffice.getId()); + user.setName(tBranchOffice.getPrincipal()); + user.setSex(1); + userService.insert(user); + return SUCCESS_TIP; } @@ -324,7 +352,43 @@ */ @RequestMapping(value = "/update") @ResponseBody + @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) public Object update(TBranchOffice tBranchOffice) { + TBranchOffice branchOffice = tBranchOfficeService.selectById(tBranchOffice.getId()); + User user = userService.selectOne(new EntityWrapper<User>() + .eq("role_type", 2) + .eq("object_id", branchOffice.getId()) + .last("LIMIT 1")); + //判断账号是否已存在 + if (SinataUtil.isNotEmpty(tBranchOffice.getAccount()) && SinataUtil.isNotEmpty(tBranchOffice.getPassword())){ + if(Objects.isNull(user)){ + //添加User对象 + user.setAccount(tBranchOffice.getAccount()); + user.setSalt(ShiroKit.getRandomSalt(5)); + user.setPassword(ShiroKit.md5(tBranchOffice.getPassword(), user.getSalt())); + user.setStatus(ManagerStatus.OK.getCode()); + user.setRoleid("3"); + user.setDeptid(25); + user.setCreatetime(new Date()); + user.setRoleType(2); + user.setObjectId(tBranchOffice.getId()); + user.setName(tBranchOffice.getPrincipal()); + user.setSex(1); + userService.insert(user); + }else { + if (!tBranchOffice.getAccount().equals(user.getAccount())){ + //判断账号是否已存在 + int count = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount())); + if (count > 0){ + return new SuccessTip(500,"该账号已存在!"); + } + } + user.setAccount(tBranchOffice.getAccount()); + user.setPassword(ShiroKit.md5(user.getPassword(), user.getSalt())); + userService.updateById(user); + } + } + TBranchOffice office = tBranchOfficeService.selectOne(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName()) .last("LIMIT 1")); if(Objects.nonNull(office) && !tBranchOffice.getId().equals(office.getId())){ diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/THomePageController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/THomePageController.java index a4789e6..e966706 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/THomePageController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/THomePageController.java @@ -28,6 +28,7 @@ import java.time.LocalDate; import java.time.Period; import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; /** @@ -130,7 +131,15 @@ } model.addAttribute("allList",list); List<List<String>> list1 = new ArrayList<>(); + AtomicInteger count = new AtomicInteger(0); for (TDriver tDriver : onLineDriver) { + + String value1 = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); + String value2 = redisUtil.getValue(value1); + if(ToolUtil.isNotEmpty(value2)){ + count.addAndGet(1); + } + List<String> obj = new ArrayList<>(3); String value = redisUtil.getValue("DRIVER" + tDriver.getId()); if(ToolUtil.isEmpty(value)){ @@ -141,7 +150,7 @@ obj.add(String.valueOf(tDriver.getServerStatus()));// 服务状态 list1.add(obj); } - model.addAttribute("onLineDriverCount",list1.size()); + model.addAttribute("onLineDriverCount",count.get()); // 拿到所有在线司机地址 model.addAttribute("onLineDriver",list1); return PREFIX + "tHomePageMap.html"; @@ -150,7 +159,7 @@ @RequestMapping("/getMap") @ResponseBody public Object getMap(Integer agentId,Integer type,Model model) { - Integer objectId = ShiroKit.getUser().getObjectId(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); Integer roleType = ShiroKit.getUser().getRoleType(); if(roleType == 3 && Objects.nonNull(objectId)){ agentId = objectId; 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 index faea423..678e0f6 100644 --- 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 @@ -184,10 +184,20 @@ */ @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")); + Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); + Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); + if(roleType == 1){ + 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")); + } + if(roleType == 3){ + TAgent tAgent = agentService.selectById(objectId); + if (Objects.nonNull(tAgent)){ + model.addAttribute("num1",tAgent.getServiceCalls()); + } + } return PREFIX + "tSystemConfigServiceMgmt.html"; } 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 index 47b6137..e38edc5 100644 --- 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 @@ -8,19 +8,19 @@ public class TBranchOfficeResp extends TBranchOffice { @ApiModelProperty(value = "订单数量") - private Integer orderCount; + private Integer orderCount=0; @ApiModelProperty(value = "有效订单") - private Integer effectiveOrderCount; + private Integer effectiveOrderCount=0; @ApiModelProperty(value = "已发放优惠券") - private Integer totalCount; + private Integer totalCount=0; @ApiModelProperty(value = "已使用优惠券") - private Integer usedCount; + private Integer usedCount=0; @ApiModelProperty(value = "累计优惠券金额") - private BigDecimal orderPriceCount; + private BigDecimal orderPriceCount=BigDecimal.ZERO; @ApiModelProperty(value = "司机数量") private Integer driverCount; diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgent.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgent.java index 0747152..795969b 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgent.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgent.java @@ -94,6 +94,30 @@ @ApiModelProperty(value = "区域id") private String areaId; + @TableField(exist = false) + @ApiModelProperty(value = "账号") + private String account; + + @TableField(exist = false) + @ApiModelProperty(value = "密码") + private String password; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + public String getServiceCalls() { return serviceCalls; } 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 fca2f76..e7af820 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 @@ -108,6 +108,30 @@ @ApiModelProperty(value = "区域id") private String areaId; + @TableField(exist = false) + @ApiModelProperty(value = "账号") + private String account; + + @TableField(exist = false) + @ApiModelProperty(value = "密码") + private String password; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + public String getBankDeposit() { return bankDeposit; } 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 9806b00..6bb9d6e 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 @@ -106,7 +106,7 @@ model.addAttribute("orderSum",orderList.size()); // 过滤已完成和待评价订单,且支付金额在14元以上 List<TOrder> orders = orderList.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.getOrderMoney().compareTo(new BigDecimal("14")) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); model.addAttribute("validOrder",orders.size()); // 过滤已使用优惠券 List<TOrder> usedCoupon = orderList.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) @@ -180,7 +180,7 @@ 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")) && tAgent.getId().equals(order.getAgentId())).collect(Collectors.toList()); + && 0 < order.getOrderMoney().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())) 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 12e6fac..572adb0 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 @@ -16,6 +16,7 @@ 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.apache.poi.hdf.extractor.TC; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -65,9 +66,18 @@ // 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())); - + // 查询全部未删除优惠券 + List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>() + .eq("status", true)); + List<Integer> couponIds = tCoupons.stream().map(TCoupon::getId).collect(Collectors.toList()); + List<TUserToCoupon> tUserToCoupons; + if(CollectionUtils.isEmpty(couponIds)){ + tUserToCoupons = new ArrayList<>(); + }else { + // 查询当前用户优惠券数量 + tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("userId", tAppUser.getId()) + .in("couponId",couponIds)); + } int couponTotal = tUserToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); int expireCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getExpireCount).sum(); @@ -85,11 +95,21 @@ .filter(order -> OrderStateEnum.CANCELED.getCode() == order.getState()).collect(Collectors.toList()); model.addAttribute("canceledNumber",collect.size()); - TOrder tOrder = orders.get(0); - // 最近消费时间 - model.addAttribute("latelyTime",DateUtil.formatDate(tOrder.getCreateTime())); - // 最近消费金额 - model.addAttribute("latelyPrice",tOrder.getPayMoney()); + // 获取已支付订单 + List<TOrder> payOrder = orders.stream().filter(order -> order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) + || order.getState().equals(OrderStateEnum.FINISH.getCode())).collect(Collectors.toList()); + if(CollectionUtils.isEmpty(payOrder)){ + // 最近消费时间 + model.addAttribute("latelyTime",""); + // 最近消费金额 + model.addAttribute("latelyPrice",""); + }else { + TOrder tOrder = payOrder.get(0); + // 最近消费时间 + model.addAttribute("latelyTime",DateUtil.formatDate(tOrder.getCreateTime())); + // 最近消费金额 + model.addAttribute("latelyPrice",tOrder.getPayMoney()); + } // 总消费次数 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/service/impl/TBranchOfficeServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java index a82dbcc..daf7f4a 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 @@ -154,9 +154,13 @@ 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()); + + List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("objectId", tBranchOfficeResp.getId()) + .eq("roleType",2)); if(!CollectionUtils.isEmpty(orderList)){ @@ -167,30 +171,29 @@ // 优惠券数据,,,通过订单找到该区域的下单人,找出优惠券信息 List<Integer> userIds = orderList.stream().map(TOrder::getUserId).collect(Collectors.toList()); - List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("objectId", tBranchOfficeResp.getId()) - .eq("roleType",2)); - // 优惠券有效数量 - 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); } + + // 优惠券有效数量 + 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); diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java index 684cd4a..62e7a81 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java @@ -106,6 +106,8 @@ Integer count = orderService.getValidOrderCount(driver.getId(),new BigDecimal(14),new SimpleDateFormat("yyyy-MM").format(new Date())); if(count < 30){ driver.setIsException(2); + }else { + driver.setIsException(1); } TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() .eq("driverId", driver.getId()) @@ -121,11 +123,13 @@ } } }else { - // 没有上班记录,计算审核时间 - Period period = Period.between(DateUtil.dateToLocalDate(driver.getApprovalTime()), LocalDate.now()); - int day = Math.abs(period.getDays()); - if(day>14){ - driver.setIsException(2); + if(Objects.nonNull(driver.getApprovalTime())){ + // 没有上班记录,计算审核时间 + Period period = Period.between(DateUtil.dateToLocalDate(driver.getApprovalTime()), LocalDate.now()); + int day = Math.abs(period.getDays()); + if(day>14){ + driver.setIsException(2); + } } } } diff --git a/management/guns-admin/src/main/resources/redis.properties b/management/guns-admin/src/main/resources/redis.properties index 241c4f9..dc7e9bd 100644 --- a/management/guns-admin/src/main/resources/redis.properties +++ b/management/guns-admin/src/main/resources/redis.properties @@ -1,7 +1,7 @@ #redis���ÿ�ʼ # Redis���ݿ�������Ĭ��Ϊ0�� spring.redis.database=0 -## Redis��������ַ +# Redis��������ַ spring.redis.host=127.0.0.1 ## Redis���������Ӷ˿� spring.redis.port=16379 diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html b/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html index 0d33e83..786a2b0 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html @@ -139,8 +139,12 @@ </select> </div> <div class="initialLevel col-sm-2 control-label form-group" > - <#button name="查询" icon="fa-search" clickFun="getData()"/> - <#button name="重置" icon="fa-trash" clickFun="reset()" space="true"/> + <button type="button" class="btn btn-primary" onclick="getData()" style="height: 33px"> + <i class="fa fa-search"></i> 查询 + </button> + <button type="button" class="btn btn-primary button-margin" onclick="reset()" style="height: 33px"> + <i class="fa fa-trash"></i> 重置 + </button> </div> </div> <div class="col-sm-12" > @@ -174,8 +178,12 @@ </select> </div> <div class="initialLevel col-sm-2 control-label form-group" > - <#button name="查询" icon="fa-search" clickFun="getDataOrder()"/> - <#button name="重置" icon="fa-trash" clickFun="resetOrder()" space="true"/> + <button type="button" class="btn btn-primary " onclick="getDataOrder()" style="height: 33px"> + <i class="fa fa-search"></i> 查询 + </button> + <button type="button" class="btn btn-primary button-margin" onclick="resetOrder()" style="height: 33px"> + <i class="fa fa-trash"></i> 重置 + </button> </div> </div> <div class="col-sm-10" > 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 eae4274..982e78f 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 @@ -49,10 +49,31 @@ <input id="bankAccount" name="bankAccount" type="number" maxlength="20" placeholder="请输入" 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="serviceCalls" name="serviceCalls" type="number" maxlength="20" placeholder="请输入" 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="serviceCalls" name="serviceCalls" type="number" maxlength="20" placeholder="请输入" style="height: 30px"> + <span style="color:red">*</span> + <label class="control-label" >登录账号:</label> + <input id="account" name="account" type="text" maxlength="20" placeholder="请输入" 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" > + <span style="color:red">*</span> + <label class="control-label" >登录密码:</label> + <input id="password" name="password" type="password" maxlength="20" placeholder="请输入密码" 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" > + <span style="color:red">*</span> + <label class="control-label" >确认密码:</label> + <input id="rePassword" name="rePassword" type="password" maxlength="20" placeholder="请输入确认密码" style="height: 30px"> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetail.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetail.html index db67408..0d92965 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetail.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetail.html @@ -17,36 +17,43 @@ </div> <hr/> - <div class="initialLevel col-sm-12 control-label form-group" > - <div class="initialLevel col-sm-1 control-label form-group" style="margin-left: 10px" > - <img src="${avatar}" style="height: 100px;width: 100px"/> - </div> - <div class="initialLevel col-sm-3 control-label form-group" > - <label class="control-label" >昵称:</label> - <label>${nickname}</label> - </div> - <div class="initialLevel col-sm-2 control-label form-group" > - <label class="control-label">ID:</label> - <label>${id}</label> - </div> - <div class="initialLevel col-sm-3 control-label form-group" > - <label class="control-label">注册时间:</label> - <label>${createTime}</label> + <div class="col-lg-2"> + <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-1 control-label form-group" style="margin-left: 10px" > + <img src="${avatar}" style="height: 100px;width: 100px"/> + </div> </div> </div> + <div class="col-lg-10"> + <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>${nickname}</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label">ID:</label> + <label>${id}</label> + </div> + <div class="initialLevel col-sm-3 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" style="margin-left: 150px"> - <label class="control-label">客户渠道:</label> - <label>${customerChannel}</label> - </div> - <div class="initialLevel col-sm-2 control-label form-group" style="margin-left: 150px"> - <label class="control-label" >下单次数:</label> - <label>${numberOfOrder}</label> - </div> - <div class="initialLevel col-sm-3 control-label form-group" style="margin-left: 150px" > - <label class="control-label" >取消次数:</label> - <label>${canceledNumber}</label> + <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>${customerChannel}</label>--> + <label>微信小程序</label> + </div> + <div class="initialLevel col-sm-2 control-label form-group" > + <label class="control-label" >下单次数:</label> + <label>${numberOfOrder}</label> + </div> + <div class="initialLevel col-sm-3 control-label form-group"> + <label class="control-label" >取消次数:</label> + <label>${canceledNumber}</label> + </div> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserException.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserException.html index ca0d780..8c5c169 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserException.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserException.html @@ -21,12 +21,12 @@ <div class="col-sm-2"> <#NameCon id="phone" name="手机号" /> </div> - <div class="col-sm-1"> - <select class="input-group" id="status" style="width: 80px;height: 33px" name="status"> - <option value="">状态</option> - <option value="1">正常</option> - <option value="2">冻结</option> - </select> + <div class="col-sm-2"> + <#SelectCon id="status" name="状态" > + <option value="">状态</option> + <option value="1">正常</option> + <option value="2">冻结</option> + </#SelectCon> </div> <div class="col-sm-2"> <#button name="查询" icon="fa-search" clickFun="TAppUserException.search()"/> 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 2af7f0b..dd80a9c 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 @@ -61,6 +61,28 @@ </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="account" name="account" type="text" maxlength="20" placeholder="请输入" 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="password" name="password" type="password" maxlength="20" placeholder="请输入密码" 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="rePassword" name="rePassword" type="password" maxlength="20" placeholder="请输入确认密码" style="height: 30px"> + </div> + </div> + </div> </div> 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 4efc1a3..75955b5 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 @@ -63,6 +63,28 @@ </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="account" name="account" type="text" maxlength="20" placeholder="请输入" 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="password" name="password" type="password" maxlength="20" placeholder="请输入密码" 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="rePassword" name="rePassword" type="password" maxlength="20" placeholder="请输入确认密码" style="height: 30px"> + </div> + </div> + </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html index a4c010c..5c21d93 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html @@ -90,7 +90,7 @@ <input id="sort" name="sort" type="number" style="height: 30px" maxlength="4" placeholder="请输入排序" required="required"> </div> </div> - <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-12 control-label form-group" id="detailContent" > <div class="initialLevel col-sm-6 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >详情内容: </label> @@ -125,10 +125,12 @@ if(this.value == 1){ $("#jumpTypeIsShow").show() $("#jumpUrlIsShow").show() + $("#detailContent").show() } if(this.value == 0){ $("#jumpTypeIsShow").hide() $("#jumpUrlIsShow").hide() + $("#detailContent").hide() } }) //监听下拉菜单的变动操作 @@ -144,9 +146,11 @@ $("#jumpType").change(function(){ if(this.value == 1){ $("#jumpUrlIsShow").hide() + $("#detailContent").show() } if(this.value == 2){ $("#jumpUrlIsShow").show() + $("#detailContent").hide() } }) </script> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html index 108f062..f0dcc44 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html @@ -39,7 +39,7 @@ </div> </div> - <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-12 control-label form-group" id="homePageBannerIsShow"> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >广告类型: </label> @@ -87,7 +87,7 @@ <input id="sort" value="${item.sort}" type="number" style="height: 30px" maxlength="4" placeholder="请输入排序" required="required"> </div> </div> - <div class="initialLevel col-sm-12 control-label form-group" > + <div class="initialLevel col-sm-12 control-label form-group" id="detailContent"> <div class="initialLevel col-sm-6 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >详情内容: </label> @@ -120,9 +120,12 @@ if(1 == $("#isJump").val()){ $("#jumpTypeIsShow").show() $("#jumpUrlIsShow").show() - }else { + $("#detailContent").show() + } + if(0 == $("#isJump").val()) { $("#jumpTypeIsShow").hide() $("#jumpUrlIsShow").hide() + $("#detailContent").hide() } if(1 == $("#device").val()){ @@ -137,10 +140,20 @@ if(this.value == 1){ $("#jumpTypeIsShow").show() $("#jumpUrlIsShow").show() + $("#detailContent").show() + if(1 == $("#jumpType").val()){ + $("#jumpUrlIsShow").hide() + $("#detailContent").show() + } + if(2 == $("#jumpType").val()){ + $("#jumpUrlIsShow").show() + $("#detailContent").hide() + } } if(this.value == 0){ $("#jumpTypeIsShow").hide() $("#jumpUrlIsShow").hide() + $("#detailContent").hide() } }) //监听下拉菜单的变动操作 @@ -156,9 +169,11 @@ $("#jumpType").change(function(){ if(this.value == 1){ $("#jumpUrlIsShow").hide() + $("#detailContent").show() } if(this.value == 2){ $("#jumpUrlIsShow").show() + $("#detailContent").hide() } }) </script> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAudit.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAudit.html index aed8ad4..031077d 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAudit.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAudit.html @@ -18,7 +18,66 @@ </div> <hr/> - <div class="initialLevel col-sm-12 control-label form-group" > + <div class="col-lg-4"> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label" >姓名:</label> + <label>${name}</label> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label" >手机号:</label> + <label>${phone}</label> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label" >性别:</label> + @if(sex==1){ + <label>男</label> + @} + @if(sex==2){ + <label>女</label> + @} + @if(sex==3){ + <label>未知</label> + @} + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">司机来源:</label> + <label></label> + </div> + + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label" >驾驶证号码:</label> + <label>${driverLicenseNumber}</label> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">驾龄:</label> + <label>${drivingExperience}</label> + </div> + </div> + <div class="col-lg-4"> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">头像:</label> + <img src="${avatar}" style="height: 100px;width: 100px"/> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">邀请人:</label> + <label>${inviterName}</label> + </div> + </div> + <div class="col-lg-4"> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">紧急联系人:</label> + <label>${emergencyContact}</label> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">紧急联系人电话:</label> + <label>${emergencyPhone}</label> + </div> + <div class="initialLevel col-sm-12 control-label form-group" > + <label class="control-label">电话:</label> + <label>${inviterPhone}</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>${name}</label> @@ -87,7 +146,7 @@ <label class="control-label">驾龄:</label> <label>${drivingExperience}</label> </div> - </div> + </div>--> <hr/> <div class="initialLevel col-sm-12 control-label form-group" > @@ -99,11 +158,11 @@ <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 class="control-label" >驾驶证照片:</label><br/> <img src="${driverLicense}" style="height: 100px;width: 100px"/> </div> <div class="initialLevel col-sm-2 control-label form-group" > - <label class="control-label">身份证照片:</label> + <label class="control-label">身份证照片:</label><br/> <img src="${idcardFront}" style="height: 100px;width: 100px"/> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html index 78b6aba..25df26f 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html @@ -9,12 +9,6 @@ <div class="row row-lg"> <div class="col-sm-12" > -<!-- <div class="initialLevel col-sm-12 control-label form-group" style="cursor: pointer;text-align: left;">--> -<!-- <div class="initialLevel col-sm-3 control-label form-group" >--> -<!-- <label class="control-label" >运营数据总览/车辆地图总览/</label>--> -<!-- <label class="control-label" style="color: red">订单热点图</label>--> -<!-- </div>--> -<!-- </div>--> <div class="initialLevel col-sm-12 control-label form-group" style="cursor: pointer;text-align: left;"> <div class="initialLevel col-sm-1 control-label form-group" > @@ -34,9 +28,13 @@ <option value="4">已取消</option> </select> </div> - <div class="initialLevel col-sm-2 control-label form-group" > - <#button name="查询" icon="fa-search" clickFun="getData()"/> - <#button name="重置" icon="fa-trash" clickFun="reset()" space="true"/> + <div class="col-sm-2"> + <button type="button" class="btn btn-primary " onclick="getData()" style="height: 33px"> + <i class="fa fa-search"></i> 查询 + </button> + <button type="button" class="btn btn-primary button-margin" onclick="reset()" style="height: 33px"> + <i class="fa fa-trash"></i> 重置 + </button> </div> </div> <div class="col-sm-10" > @@ -125,6 +123,9 @@ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; overflow: hidden; + } + .btn{ + height: 33px } </style> <script type="text/javascript"> @@ -278,6 +279,7 @@ $(function(){ + $('.btn').css('height','33px') map(""); getOrder(); }) 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 index 1ab0bf9..d004a7d 100644 --- 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 @@ -15,12 +15,12 @@ <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 class="col-sm-2"> + <#SelectCon id="source" name="订单来源" > + <option value="">请选择订单来源</option> + <option value="1">小程序</option> + <option value="2">司机创建</option> + </#SelectCon> </div> <div class="col-sm-2"> <#NameCon id="userName" name="下单用户昵称" /> @@ -28,22 +28,22 @@ <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 class="col-sm-2"> + <#SelectCon id="state" name="订单状态" > + <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> + </#SelectCon> </div> <div class="col-sm-2"> <#NameCon id="driverName" name="司机姓名" /> 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 9477cdf..10132af 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 @@ -29,7 +29,7 @@ <#NameCon id="userPhone" name="下单用户手机" /> </div> <div class="col-sm-3"> - <#SelectCon id="state" name="状态" > + <#SelectCon id="state" name="订单状态" > <option value="">请选择订单状态</option> <option value="101">待接单</option> <option value="102">已接单</option> 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 index 90e1bc5..56b7034 100644 --- 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 @@ -15,12 +15,12 @@ <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 class="col-sm-2"> + <#SelectCon id="source" name="订单来源" > + <option value="">请选择订单来源</option> + <option value="1">小程序</option> + <option value="2">司机创建</option> + </#SelectCon> </div> <div class="col-sm-2"> <#NameCon id="userName" name="下单用户昵称" /> @@ -29,21 +29,21 @@ <#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> + <#SelectCon id="state" name="订单状态" > + <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> + </#SelectCon> </div> <div class="col-sm-2"> <#NameCon id="driverName" name="司机姓名" /> 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 af14472..ef7f181 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 @@ -33,6 +33,35 @@ } } }, + account: { + validators: { + notEmpty: { + message: '登录账号不能为空' + } + } + }, + password: { + validators: { + notEmpty: { + message: '登录密码不能为空' + }, + identical: { + field: 'rePassword', + message: '两次密码不一致' + }, + } + }, + rePassword: { + validators: { + notEmpty: { + message: '密码不能为空' + }, + identical: { + field: 'password', + message: '两次密码不一致' + }, + } + } } }; @@ -96,6 +125,8 @@ .set('status') .set('area') .set('areaId') + .set('account') + .set('password') .set('createTime'); } 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 a51016d..c50136b 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 @@ -47,6 +47,35 @@ } } }, + account: { + validators: { + notEmpty: { + message: '登录账号不能为空' + } + } + }, + password: { + validators: { + notEmpty: { + message: '登录密码不能为空' + }, + identical: { + field: 'rePassword', + message: '两次密码不一致' + }, + } + }, + rePassword: { + validators: { + notEmpty: { + message: '密码不能为空' + }, + identical: { + field: 'password', + message: '两次密码不一致' + }, + } + } } }; @@ -117,6 +146,8 @@ .set('area') .set('areaId') .set('status') + .set('account') + .set('password') .set('createTime'); } @@ -135,7 +166,7 @@ //提交信息 var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/add", function(data){ if(data.code == 500){ - Feng.error("添加失败!" + data.message + "!"); + Feng.error(data.message); return false; }else { Feng.success("添加成功!"); 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 9aece9f..424d751 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 @@ -66,7 +66,7 @@ } }}, {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, - {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, + {title: '操作', visible: true, align: 'center', valign: 'middle',width:'160px',fixed:'true', formatter: function (value, row) { if (row.status === 1){ return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue.js b/management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue.js index 9c6fe95..a3d131d 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue.js @@ -88,11 +88,11 @@ {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, formatter: function (value, row) { if (row.businessType === 1){ - return '<a href="#" onclick="TRevenue.searchTRevenueOrderDetail('+row.code+')" style="color:blue">详情</a>' + return `<a href="#" onclick="TRevenue.searchTRevenueOrderDetail('${row.code}')" style="color:blue">详情</a>` }else if (row.businessType === 11){ - return '<a href="#" onclick="TRevenue.searchTRevenueCommissionDetail('+row.code+')" style="color:blue">详情</a>' + return `<a href="#" onclick="TRevenue.searchTRevenueCommissionDetail('${row.code}')" style="color:blue">详情</a>` }else if (row.businessType === 12){ - return '<a href="#" onclick="TRevenue.searchTRevenueBalanceDetail('+row.code+')" style="color:blue">详情</a>' + return `<a href="#" onclick="TRevenue.searchTRevenueBalanceDetail('${row.code}')" style="color:blue">详情</a>` } } } 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 index 356f0ea..d78dd52 100644 --- 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 @@ -239,6 +239,15 @@ * 客服管理 */ TSystemConfig.serviceMgmtSubmit = function () { + + var num1 = $("#num1").val(); + var reg=/^1[3-9]\d{9}$/;//由 1-9开头 的正则表达式 + //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 + if(!reg.test(num1)){ + Feng.error("请输入合法手机号!"); + return; + } + var ajax = new $ax(Feng.ctxPath + "/tSystemConfig/systemConfigSubmit", function (data) { Feng.success("保存成功!"); TSystemConfig.table.refresh(); -- Gitblit v1.7.1