From 17a21eb623864ad92ca41087dfcd8814641a9587 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期一, 15 五月 2023 15:53:24 +0800 Subject: [PATCH] BUG修改 --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java | 11 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java | 3 management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js | 8 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml | 16 ++ management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js | 1 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java | 78 +++++++++- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java | 11 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBillServiceImpl.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html | 4 management/guns-admin/src/main/webapp/WEB-INF/view/login.html | 18 +- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java | 8 management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html | 1 management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html | 2 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java | 16 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent.html | 1 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCouponController.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html | 9 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemBulletinController.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java | 88 +++++++++++ management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js | 7 + management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEditionController.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java | 2 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEvaluateServiceImpl.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html | 9 + management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverException.html | 12 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TYouTuiController.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBroadcastController.java | 4 management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRevenueServiceImpl.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java | 24 +++ management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java | 4 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java | 4 35 files changed, 308 insertions(+), 77 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 6a4ba09..6c988c0 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 @@ -5,6 +5,7 @@ import com.stylefeng.guns.core.base.tips.SuccessTip; import com.stylefeng.guns.core.exception.GunsException; import com.stylefeng.guns.core.exception.ServiceExceptionEnum; +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.controller.util.ExcelUtil; @@ -69,7 +70,8 @@ * 跳转到首页 */ @RequestMapping("") - public String index() { + public String index(Model model) { + model.addAttribute("userType", Objects.requireNonNull(ShiroKit.getUser()).getRoleType()); return PREFIX + "tAgent.html"; } 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 7b9c86e..0894c4a 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 @@ -313,7 +313,7 @@ values[i][7] = d.getEmergencyContact(); values[i][8] = d.getEmergencyPhone(); values[i][9] = String.valueOf(d.getAccountBalance()); - values[i][10] = String.valueOf(d.getUserTagId()); + values[i][10] = String.valueOf(Objects.nonNull(d.getUserTagId())?d.getUserTagId():""); Integer status1 = d.getStatus(); if(1 == status1){ values[i][11] = "正常"; 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 5fde6b5..ad11034 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 @@ -59,7 +59,8 @@ * 跳转到首页 */ @RequestMapping("") - public String index() { + public String index(Model model) { + model.addAttribute("userType", Objects.requireNonNull(ShiroKit.getUser()).getRoleType()); return PREFIX + "tBranchOffice.html"; } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBroadcastController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBroadcastController.java index e1daf8e..c22b732 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBroadcastController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBroadcastController.java @@ -76,8 +76,8 @@ } if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createTime",startTime,endTime); } wrapper.ne("status", StatusEnum.DELETE.getCode()); 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 e38c646..f815215 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 @@ -91,8 +91,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("create_time",startTime,endTime); } wrapper.ne("status", StatusEnum.DELETE.getCode()); 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 d0bb555..0a5f6f0 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 @@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.baomidou.mybatisplus.mapper.Wrapper; import com.stylefeng.guns.core.base.controller.BaseController; import com.stylefeng.guns.core.base.tips.SuccessTip; import com.stylefeng.guns.core.log.LogObjectHolder; @@ -19,6 +20,7 @@ import com.stylefeng.guns.modular.system.model.TRechargeRecord; import com.stylefeng.guns.modular.system.model.TRegion; import com.stylefeng.guns.modular.system.service.*; +import com.stylefeng.guns.modular.system.util.DateUtil; import com.stylefeng.guns.modular.system.util.RedisUtil; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -47,6 +49,8 @@ import java.math.BigDecimal; import java.text.DateFormat; import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.Period; import java.util.Date; import java.util.List; import java.util.Objects; @@ -308,10 +312,33 @@ @ResponseBody public Object list(String createTime,String phone,Integer status) { EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); - wrapper.ne("isException",2); wrapper.orderBy("createTime",false); List<TDriver> tDrivers = tDriverService.selectList(wrapper); - return tDriverService.getTDriverResp(tDrivers); + List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); + for (TDriverResp driverResp : tDriverResp) { + TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() + .eq("driverId", driverResp.getId()) + .orderBy("workTime", false) + .last("LIMIT 1")); + if(Objects.nonNull(tDriverWork)){ + // 如果是下班状态,计算未上线天数,,如果为上班状态,则设置为0 + if(tDriverWork.getStatus() == 1){ + driverResp.setNotOnlineCount(0); + }else { + Period period = Period.between(DateUtil.dateToLocalDate(tDriverWork.getOffWorkTime()), LocalDate.now()); + driverResp.setNotOnlineCount(Math.abs(period.getDays())); + } + }else { + if(Objects.nonNull(driverResp.getApprovalTime())){ + // 没有上班记录,计算审核时间 + Period period = Period.between(DateUtil.dateToLocalDate(driverResp.getApprovalTime()), LocalDate.now()); + driverResp.setNotOnlineCount(Math.abs(period.getDays())); + }else { + driverResp.setNotOnlineCount(0); + } + } + } + return tDriverResp; } /** * 获取佣金列表 @@ -589,12 +616,11 @@ String time1 = format.format(date); String fileName = "DriverInfo"+time1+".xls"; String[] title = new String[] {"编号","姓名","手机号","性别","驾驶证号码","身份证号码", - "身份证","所属代理商","所属分公司","钱包余额","累计订单量","当月订单量","积分","拒单次数","状态","添加时间"}; + "身份证","所属代理商","所属分公司","钱包余额","累计订单量","当月订单量","积分","拒单次数","状态","审核状态","添加时间"}; EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); - // 是否异常 - List<TDriver> list = tDriverService.selectList(wrapper); - - List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(list); + wrapper.orderBy("createTime",false); + List<TDriver> tDrivers = tDriverService.selectList(wrapper); + List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); String[][] values = new String[tDriverResp.size()][]; for (int i = 0; i < tDriverResp.size(); i++) { @@ -633,7 +659,15 @@ }else { values[i][14] = "删除"; } - values[i][15] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); + Integer approvalStatus = d.getApprovalStatus(); + if(1 == approvalStatus){ + values[i][15] = "待审核"; + }else if(2 == approvalStatus){ + values[i][15] = "已同意"; + }else { + values[i][15] = "已拒绝"; + } + values[i][16] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); } HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); ExcelUtil.setResponseHeader(response, fileName); @@ -662,10 +696,28 @@ "身份证","累计订单量","当月订单量","积分","连续未上线(天)","状态","添加时间"}; EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); wrapper.eq("isException",2); - // 是否异常 - List<TDriver> list = tDriverService.selectList(wrapper); - - List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(list); + wrapper.orderBy("createTime",false); + List<TDriver> tDrivers = tDriverService.selectList(wrapper); + List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); + for (TDriverResp driverResp : tDriverResp) { + TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() + .eq("driverId", driverResp.getId()) + .orderBy("workTime", false) + .last("LIMIT 1")); + if(Objects.nonNull(tDriverWork)){ + // 如果是下班状态,计算未上线天数,,如果为上班状态,则设置为0 + if(tDriverWork.getStatus() == 1){ + driverResp.setNotOnlineCount(0); + }else { + Period period = Period.between(DateUtil.dateToLocalDate(tDriverWork.getOffWorkTime()), LocalDate.now()); + driverResp.setNotOnlineCount(Math.abs(period.getDays())); + } + }else { + // 没有上班记录,计算审核时间 + Period period = Period.between(DateUtil.dateToLocalDate(driverResp.getApprovalTime()), LocalDate.now()); + driverResp.setNotOnlineCount(Math.abs(period.getDays())); + } + } String[][] values = new String[tDriverResp.size()][]; for (int i = 0; i < tDriverResp.size(); i++) { @@ -706,7 +758,7 @@ e.printStackTrace(); } } - @ApiOperation(value = "导出司机异常列表",notes="导出司机异常列表") + @ApiOperation(value = "导出司机佣金列表",notes="导出司机佣金列表") @ApiImplicitParams({ @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), }) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEditionController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEditionController.java index e14e2ac..04ab48e 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEditionController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TEditionController.java @@ -69,8 +69,8 @@ EntityWrapper<TEdition> wrapper = new EntityWrapper<>(); if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createTime",startTime,endTime); } if(StringUtils.hasLength(editionNo)){ diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemBulletinController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemBulletinController.java index 96717de..cab36c6 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemBulletinController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemBulletinController.java @@ -85,8 +85,8 @@ } if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createTime",startTime,endTime); } wrapper.ne("status",3); 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 index 37d17bb..815c3ad 100644 --- 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 @@ -78,8 +78,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createTime",startTime,endTime); } wrapper.ne("status", StatusEnum.DELETE.getCode()); 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 63fdeb0..c28a53c 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 @@ -19,6 +19,7 @@ import com.stylefeng.guns.modular.system.service.IMenuService; import com.stylefeng.guns.modular.system.service.IUserService; import com.stylefeng.guns.modular.system.util.AESUtils; +import com.stylefeng.guns.modular.system.util.RedisUtil; import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.subject.Subject; @@ -49,6 +50,8 @@ @Autowired private IUserService userService; + @Autowired + private RedisUtil redisUtil; private Map<String, Integer> loginFailures = new HashMap<>(); @@ -117,7 +120,7 @@ * 点击登录执行的动作 */ @RequestMapping(value = "/login", method = RequestMethod.POST) - public String loginVali(String username, String password, String remember, Model model, HttpServletRequest request) { + public String loginVali(String username, String password,String sms_code, String remember, Model model, HttpServletRequest request) { Integer f = loginFailures.get(username); f = f == null ? 0 : f; // 校验账号,密码是否正确,如果错误,对次数进行加1 @@ -144,6 +147,25 @@ return "/login.html"; } } + +// if(!"aaaa".equals(sms_code)){ +// String value = redisUtil.getValue(user.getPhone()); +// if(ToolUtil.isEmpty(value) || !sms_code.equals(value)){ +// model.addAttribute("tips", "无效的验证码"); +// return "/login.html"; +// } +// } + + + //验证验证码是否正确 + if (KaptchaUtil.getKaptchaOnOff()) { + String kaptcha = super.getPara("kaptcha").trim(); + String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); + if (ToolUtil.isEmpty(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { + throw new InvalidKaptchaException(); + } + } + model.addAttribute("number", "3"); Subject currentUser = ShiroKit.getSubject(); UsernamePasswordToken token = new UsernamePasswordToken(username, password.toCharArray()); 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 2017470..c8d56b5 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 @@ -9,7 +9,9 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.math.BigDecimal; import java.time.LocalDate; +import java.util.Date; import java.util.List; /** @@ -152,4 +154,13 @@ * @return */ List<DataStatisticsOrderYearResp> getStatisticsOrderByMonthIds(@Param("ids")List<Integer> ids, @Param("dayDate")String dayDate); + + /** + * 查询司机当月有效订单数量 + * @param driverId + * @param orderMoney + * @param month + * @return + */ + Integer getValidOrderCount(@Param("driverId") Integer driverId,@Param("orderMoney") BigDecimal orderMoney, @Param("month")String month); } 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 903f048..63e4003 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 @@ -399,5 +399,21 @@ </where> GROUP BY `month` </select> + <select id="getValidOrderCount" resultType="java.lang.Integer"> + select count(id) + from t_order + <where> + <if test="driverId != null"> + AND driverId = #{driverId} + </if> + <if test="orderMoney != null"> + AND orderMoney > #{orderMoney} + </if> + <if test="month != null"> + AND DATE_FORMAT(createTime, '%Y-%m') = #{month} + </if> + AND (`state` = 107 OR `state` = 108 OR `state` = 109) + </where> + </select> </mapper> 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 87bb841..ae9138f 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 @@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.service.IService; import org.springframework.ui.Model; +import java.math.BigDecimal; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -154,4 +156,13 @@ * @param map */ void getStatisticsOrderByMonthIds(List<Integer> ids, String dayDate, Model model, Map<String, Object> map); + + /** + * 查询司机当月有效订单数量 + * @param driverId + * @param orderMoney + * @param month + * @return + */ + Integer getValidOrderCount(Integer driverId, BigDecimal orderMoney, String month); } 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 83397f1..b1cfe52 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 @@ -68,8 +68,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createTime",startTime,endTime); } // 判断是否为代理商 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 632cd90..12e6fac 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 @@ -140,8 +140,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createtime",startTime,endTime); } // if(Objects.nonNull(startTime) && Objects.nonNull(endTime)){ diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBillServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBillServiceImpl.java index c1ebb08..2aec94b 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBillServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBillServiceImpl.java @@ -63,8 +63,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0]+" 00:00:00"; + endTime = split[1] + " 23:59:59"; } Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); 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 a5a56be..bc26094 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 @@ -36,8 +36,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0] + " 00:00:00"; + endTime = split[1] + " 23:59:59"; } Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); 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 7658f40..5deea73 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 @@ -96,8 +96,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - Date startTime = DateUtil.getDate_str4(split[0]); - Date endTime = DateUtil.getDate_str4(split[1]); + Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); + Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); wrapper.between("createTime",startTime,endTime); } wrapper.orderBy(true,"approvalStatus"); 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 index d796a6c..d49a1f5 100644 --- 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 @@ -46,8 +46,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0] + " 00:00:00"; + endTime = split[1] + " 23:59:59"; } List<TEvaluateResp> list = tEvaluateMapper.selectPageList(startTime, endTime, userName, driverName, orderType, score); Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); 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 6384320..dd68d6a 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,6 +1,6 @@ package com.stylefeng.guns.modular.system.service.impl; -import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.stylefeng.guns.core.shiro.ShiroKit; import com.stylefeng.guns.modular.system.controller.resp.DataStatisticsOrderYearResp; import com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp; @@ -9,14 +9,13 @@ 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.dao.TOrderMapper; import com.stylefeng.guns.modular.system.enums.OrderStateEnum; 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 com.stylefeng.guns.modular.system.util.DateUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -56,8 +55,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0] + " 00:00:00"; + endTime = split[1] + " 23:59:59"; } Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); @@ -345,4 +344,11 @@ model.addAttribute("monthResp",resps); map.put("monthResp",resps); } + + + @Override + public Integer getValidOrderCount(Integer driverId, BigDecimal orderMoney, String month) { + // 查询司机当月有效订单数量 + return tOrderMapper.getValidOrderCount(driverId,orderMoney,month); + } } 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 c839d3c..34b328d 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 @@ -36,8 +36,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0] + " 00:00:00"; + endTime = split[1] + " 23:59:59"; } Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); @@ -58,8 +58,8 @@ // 开始,结束时间 if(StringUtils.hasLength(createTime)){ String[] split = createTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0] + " 00:00:00"; + endTime = split[1] + " 23:59:59"; } Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRevenueServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRevenueServiceImpl.java index 653f8fb..a21e4bd 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRevenueServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRevenueServiceImpl.java @@ -54,8 +54,8 @@ // 开始,结束时间 if(StringUtils.hasLength(businessTime)){ String[] split = businessTime.split(" - "); - startTime = split[0]; - endTime = split[1]; + startTime = split[0] + " 00:00:00"; + endTime = split[1] + " 23:59:59"; } Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); 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 cccc60c..414ffe2 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 @@ -2,16 +2,23 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.stylefeng.guns.modular.system.enums.UserTypeEnum; +import com.stylefeng.guns.modular.system.model.TAppUser; import com.stylefeng.guns.modular.system.model.TDriver; -import com.stylefeng.guns.modular.system.service.ITDriverService; -import com.stylefeng.guns.modular.system.service.ITLocationService; -import com.stylefeng.guns.modular.system.service.IUserCouponRecordService; +import com.stylefeng.guns.modular.system.model.TDriverWork; +import com.stylefeng.guns.modular.system.model.TOrder; +import com.stylefeng.guns.modular.system.service.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.Period; +import java.util.Date; import java.util.List; +import java.util.Objects; /** @@ -22,9 +29,14 @@ @Autowired private ITLocationService locationService; - @Autowired private ITDriverService driverService; + @Autowired + private ITAppUserService appUserService; + @Autowired + private ITOrderService orderService; + @Autowired + private ITDriverWorkService tDriverWorkService; @@ -51,4 +63,70 @@ e.printStackTrace(); } } + + /** + * 每半天检测用户是否有异常 + */ + @Scheduled(cron = "0 0 0,12 * * ? ") + public void queryUserIsException(){ + try { + List<TAppUser> appUserList = appUserService.selectList(new EntityWrapper<TAppUser>().ne("status", 3)); + for (TAppUser tAppUser : appUserList) { + TOrder tOrder = orderService.selectOne(new EntityWrapper<TOrder>() + .eq("userId", tAppUser.getId()) + .last("LIMIT 1")); + // 客户一个月未下单,状态异常 + Period period = Period.between(DateUtil.dateToLocalDate(tOrder.getCreateTime()), LocalDate.now()); + int day = Math.abs(period.getDays()); + if(day > 29){ + tAppUser.setIsException(2); + } + } + appUserService.updateBatchById(appUserList); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 每半天检测司机是否有异常 + */ + @Scheduled(cron = "0 0 9,21 * * ? ") + public void queryDriverIsException(){ + try { + List<TDriver> driverList = driverService.selectList(new EntityWrapper<TDriver>().ne("status", 3)); + for (TDriver driver : driverList) { + // 15天未上线异常,当月有效订单低于30单,异常 + Integer count = orderService.getValidOrderCount(driver.getId(),new BigDecimal(14),new SimpleDateFormat("yyyy-MM").format(new Date())); + if(count < 30){ + driver.setIsException(2); + } + TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() + .eq("driverId", driver.getId()) + .orderBy("workTime", false) + .last("LIMIT 1")); + if(Objects.nonNull(tDriverWork)){ + // 如果是下班状态,计算未上线天数,,如果为上班状态,则设置为0 + if(tDriverWork.getStatus() == 2){ + Period period = Period.between(DateUtil.dateToLocalDate(tDriverWork.getOffWorkTime()), LocalDate.now()); + int day = Math.abs(period.getDays()); + if(day>14){ + driver.setIsException(2); + } + } + }else { + // 没有上班记录,计算审核时间 + Period period = Period.between(DateUtil.dateToLocalDate(driver.getApprovalTime()), LocalDate.now()); + int day = Math.abs(period.getDays()); + if(day>14){ + driver.setIsException(2); + } + } + } + driverService.updateBatchById(driverList); + }catch (Exception e){ + e.printStackTrace(); + } + } + } diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html b/management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html index 5d39d78..29d2403 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html @@ -53,7 +53,7 @@ <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctxPath}/blackboard?type=${type}" frameborder="0" data-id="${ctxPath}/blackboard" seamless></iframe> </div> <div class="footer"> - <div class="pull-right">© 2019-2021 <a href="#" onclick="return false" target="_blank">超省新代驾</a> + <div class="pull-right">© 2023 <a href="#" onclick="return false" target="_blank">超省新代驾</a> </div> </div> </div> \ No newline at end of file diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/login.html b/management/guns-admin/src/main/webapp/WEB-INF/view/login.html index 9c823f5..0b73180 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/login.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/login.html @@ -64,7 +64,6 @@ <form class="m-t" role="form" action="${ctxPath}/login" method="post"> <div class="item"> <img src="${ctxPath}/static/img/account.png" /> - <input hidden id="number" value="${number}"> <input class="itemInput" type="text" name="username" id="username" placeholder="请输入您的账号" required="" value=""> </div> <div class="item"> @@ -75,7 +74,7 @@ @if(kaptcha.getKaptchaOnOff() == true){ <div class="form-group" style="float: left;"> <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;"> - <input class="form-control" type="text" name="kaptcha" id="verifyNumber" placeholder="验证码" > + <input class="form-control" type="text" name="kaptcha" id="verifyNumber" placeholder="验证码" required> </div> <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;"> <img src="${ctxPath}/kaptcha" id="kaptcha" width="100%" height="100%"/> @@ -103,13 +102,14 @@ <script src="${ctxPath}/static/crypto-js/crypto-js.js"></script> <script> $(function () { - if($("#number").val()==5){ - document.getElementById("verifyNumber").setAttribute("required","") - $("#verify").show() - }else { - $("#number").val(0) - $("#verify").hide() - } + // if($("#number").val()==5){ + // document.getElementById("verifyNumber").setAttribute("required","") + // $("#verify").show() + // }else { + // $("#number").val(0) + // $("#verify").hide() + // } + $("#verify").show() $("#kaptcha").on('click', function () { $("#kaptcha").attr('src', '${ctxPath}/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn(); diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent.html index de81247..af13e11 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent.html @@ -9,6 +9,7 @@ <div class="row row-lg"> <div class="col-sm-12"> <div class="row"> + <input hidden id="userType" value="${userType}"> <div class="col-sm-2"> <#NameCon id="principal" name="姓名" /> </div> 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 f891811..5a57737 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,6 +9,7 @@ <div class="row row-lg"> <div class="col-sm-12"> <div class="row"> + <input hidden id="userType" value="${userType}"> <div class="col-sm-2"> <#NameCon id="branchOfficeName" name="分公司名称" /> </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 d3bae4c..a4c010c 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 @@ -140,5 +140,14 @@ $("#homePageBanner").hide() } }) + //监听下拉菜单的变动操作 + $("#jumpType").change(function(){ + if(this.value == 1){ + $("#jumpUrlIsShow").hide() + } + if(this.value == 2){ + $("#jumpUrlIsShow").show() + } + }) </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 bd552cb..108f062 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 @@ -152,5 +152,14 @@ $("#homePageBanner").hide() } }) + //监听下拉菜单的变动操作 + $("#jumpType").change(function(){ + if(this.value == 1){ + $("#jumpUrlIsShow").hide() + } + if(this.value == 2){ + $("#jumpUrlIsShow").show() + } + }) </script> @} 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 bb14f87..2b3b9ba 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 @@ -44,7 +44,7 @@ <div class="initialLevel col-sm-12 control-label form-group" id="coupon1" > <div class="initialLevel col-sm-3 control-label form-group" > <label class="control-label">优惠券限制数量:</label> - <input id="couponCount" name="couponCount" type="number" min="0" maxlength="4" placeholder="最多4位数字" style="height: 30px" required> + <input id="couponCount" name="couponCount1" type="number" min="0" maxlength="4" placeholder="最多4位数字" style="height: 30px" required> </div> </div> @@ -52,7 +52,7 @@ <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" min="0" maxlength="4" placeholder="最多4位数字" style="height: 30px" required> + <input id="couponCount" name="couponCount2" type="number" min="1" maxlength="4" placeholder="最多4位数字" style="height: 30px" required> </div> </div> diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverException.html b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverException.html index 8305567..48962c6 100644 --- a/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverException.html +++ b/management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverException.html @@ -15,12 +15,12 @@ <div class="col-sm-3"> <#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-3"> <#button name="查询" icon="fa-search" clickFun="TDriverException.search()"/> 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 5ca0bb6..78b6aba 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 @@ -213,7 +213,7 @@ M.forEach(function(marker) { new AMap.Marker({ map: map, - icon: marker[2]==301?'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-1.png':((marker[2]==109||marker[2]==107||marker[2]==108)?'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-2.png': + icon: marker[2]==301?'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-1.png':((marker[2]==109||marker[2]==107||marker[2]==108)?'https://csxdj.obs.cn-south-1.myhuaweicloud.com/c1d2f38187de40daa353fcc70993288e.png': (marker[2]==101?'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-3.png':'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-4.png') ), position: [marker[0], marker[1]], @@ -230,7 +230,7 @@ M.forEach(function(marker) { new AMap.Marker({ map: map, - icon: marker[2]==1?'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-5.png':'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-6.png', + icon: 'https://csxdj.obs.cn-south-1.myhuaweicloud.com/c1d2f38187de40daa353fcc70993288e.png', position: [marker[0], marker[1]], offset: new AMap.Pixel(-13, -30) }); 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 c2e71ce..13ffad5 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 @@ -127,6 +127,13 @@ * 删除 */ TBranchOffice.delete = function (id) { + + var userType = $('#userType').val() + if(userType == 2){ + Feng.error("无权删除分公司!") + return; + } + var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/delete", function (data) { Feng.success("删除成功!"); TBranchOffice.table.refresh(); 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 d4119d6..e581956 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 @@ -20,6 +20,7 @@ {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: 'driverPhone', 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', 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 b92bbc2..b2549d4 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 @@ -156,13 +156,17 @@ return; } - var couponCount = $('#couponCount').val(); var couponType = $('#couponType').val(); - if(couponType == 2 && (couponCount == null || couponCount == '')){ + if(couponType == 2 && ($("input[name=couponCount2]").val() == null || $("input[name=couponCount2]").val() == '')){ Feng.info("请填写优惠券限制数量!") return; } + // if(couponType == 2 && $("input[name=couponCount2]").val() < 1){ + // Feng.info("新人优惠券限制数量必须大于0!") + // return; + // } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tCoupon/add", function(data){ if(500 == data.code){ -- Gitblit v1.7.1