| | |
| | | * @date 2017-07-13 21:05 |
| | | */ |
| | | @Configuration |
| | | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 86400) //session过期时间 如果部署多机环境,需要打开注释 |
| | | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 28800) //session过期时间 如果部署多机环境,需要打开注释 |
| | | @ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true") |
| | | public class SpringSessionConfig { |
| | | |
| | |
| | | |
| | | @Bean |
| | | public FilterRegistrationBean getOnconMDCasFilter() { |
| | | // OnconMDCasFilter onconMDCasFilter = new OnconMDCasFilter(); |
| | | // FilterRegistrationBean registrationBean = new FilterRegistrationBean(); |
| | | // registrationBean.setFilter(onconMDCasFilter); |
| | | // List<String> urlPatterns = new ArrayList<String>(); |
| | | // urlPatterns.add("/*"); |
| | | // registrationBean.setUrlPatterns(urlPatterns); |
| | | // registrationBean.setOrder(2); |
| | | // |
| | | // registrationBean.addInitParameter("oncon.com.security.urls", "/**"); |
| | | // registrationBean.addInitParameter("erp.si-tech.com.cn.noCheckUrl", "/index.html,/static/**,/upload/**"); |
| | | // registrationBean.addInitParameter("erp.si-tech.com.cn.nologinstatus", "/*"); |
| | | // registrationBean.addInitParameter("erp.si-tech.com.cn.loginstatus", "/*"); |
| | | // registrationBean.addInitParameter("com.oncon.sso.urlparams.nologin", "code,code2"); |
| | | // |
| | | // registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.loginUrl", "https://testsso1.teamshub.com/login"); |
| | | // registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.validateUrl", "https://testsso1.teamshub.com/serviceValidate"); |
| | | // registrationBean.addInitParameter("com.oncon.md.loginUrl", "https://testsso1.teamshub.com/sso-session/login"); |
| | | // registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "https://traffic.qytzt.cn:443"); |
| | | |
| | | |
| | | OnconMDCasFilter onconMDCasFilter = new OnconMDCasFilter(); |
| | | FilterRegistrationBean registrationBean = new FilterRegistrationBean(); |
| | | registrationBean.setFilter(onconMDCasFilter); |
| | |
| | | registrationBean.addInitParameter("erp.si-tech.com.cn.loginstatus", "/*"); |
| | | registrationBean.addInitParameter("com.oncon.sso.urlparams.nologin", "code,code2"); |
| | | |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.loginUrl", "https://testsso1.teamshub.com/login"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.validateUrl", "https://testsso1.teamshub.com/serviceValidate"); |
| | | registrationBean.addInitParameter("com.oncon.md.loginUrl", "https://testsso1.teamshub.com/sso-session/login"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.loginUrl", "https://sso.teamshub.com/login"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.validateUrl", "https://sso.teamshub.com/serviceValidate"); |
| | | registrationBean.addInitParameter("com.oncon.md.loginUrl", "https://passport.teamshub.com/login"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "https://traffic.qytzt.cn:443"); |
| | | // registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "http://127.0.0.1:8010"); |
| | | |
| | | return registrationBean; |
| | | } |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.ResponseStatus; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.UndeclaredThrowableException; |
| | | |
| | | import static com.stylefeng.guns.core.support.HttpKit.getIp; |
| | |
| | | @ControllerAdvice |
| | | @Order(-1) |
| | | public class GlobalExceptionHandler { |
| | | |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 拦截业务异常 |
| | | */ |
| | |
| | | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) |
| | | @ResponseBody |
| | | public ErrorTip notFount(GunsException e) { |
| | | LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroExtUtil.getUser().getId(), e)); |
| | | LogManager.me().executeLog(LogTaskFactory.exceptionLog(shiroExtUtil.getUser().getId(), e)); |
| | | getRequest().setAttribute("tip", e.getMessage()); |
| | | log.error("业务异常:", e); |
| | | return new ErrorTip(e.getCode(), e.getMessage()); |
| | |
| | | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) |
| | | @ResponseBody |
| | | public ErrorTip notFount(RuntimeException e) { |
| | | LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroExtUtil.getUser().getId(), e)); |
| | | LogManager.me().executeLog(LogTaskFactory.exceptionLog(shiroExtUtil.getUser().getId(), e)); |
| | | getRequest().setAttribute("tip", "服务器未知运行时异常"); |
| | | log.error("运行时异常:", e); |
| | | return new ErrorTip(BizExceptionEnum.SERVER_ERROR.getCode(), BizExceptionEnum.SERVER_ERROR.getMessage()); |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Aspect |
| | | @Component |
| | | public class LogAop { |
| | | |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Pointcut(value = "@annotation(com.stylefeng.guns.core.common.annotion.BussinessLog)") |
| | | public void cutService() { |
| | | } |
| | | |
| | | |
| | | @Around("cutService()") |
| | | public Object recordSysLog(ProceedingJoinPoint point) throws Throwable { |
| | | |
| | | |
| | | //先执行业务 |
| | | Object result = point.proceed(); |
| | | |
| | |
| | | String methodName = currentMethod.getName(); |
| | | |
| | | //如果当前用户未登录,不做日志 |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | if (null == user) { |
| | | return; |
| | | } |
| | |
| | | import com.stylefeng.guns.core.tag.DictSelectorTag; |
| | | import com.stylefeng.guns.core.util.KaptchaUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.util.SpringContextsUtil; |
| | | import org.beetl.core.Context; |
| | | import org.beetl.core.Function; |
| | | import org.beetl.core.Tag; |
| | |
| | | * @Date 2018/2/22 21:03 |
| | | */ |
| | | public class BeetlConfiguration extends BeetlGroupUtilConfiguration { |
| | | |
| | | |
| | | @Autowired |
| | | Environment env; |
| | | |
| | | |
| | | @Autowired |
| | | ApplicationContext applicationContext; |
| | | |
| | | |
| | | @Autowired |
| | | DictSelectorTag dictSelectorTag; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void initOther() { |
| | | groupTemplate.registerFunctionPackage("shiro", new ShiroExtUtil()); |
| | | groupTemplate.registerFunctionPackage("shiro", SpringContextsUtil.getBean(ShiroExtUtil.class)); |
| | | groupTemplate.registerFunctionPackage("tool", new ToolUtil()); |
| | | groupTemplate.registerFunctionPackage("kaptcha", new KaptchaUtil()); |
| | | groupTemplate.registerTagFactory("dictSelector", new TagFactory() { |
| | |
| | | */ |
| | | package com.stylefeng.guns.core.beetl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.modular.system.warpper.LoginUser; |
| | | import org.apache.commons.codec.binary.Base64; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import java.util.HashMap; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Component |
| | | public class ShiroExtUtil { |
| | | private static final String NAMES_DELIMETER = ","; |
| | | private final String NAMES_DELIMETER = ","; |
| | | |
| | | public static Map<String, ShiroUser> map = new HashMap<>(); |
| | | |
| | | /** |
| | | * 获取当前 Subject |
| | | * |
| | | * @return Subject |
| | | */ |
| | | protected static Subject getSubject() { |
| | | return SecurityUtils.getSubject(); |
| | | } |
| | | |
| | | /** |
| | | * 获取封装的 ShiroUser |
| | | * |
| | | * @return ShiroUser |
| | | */ |
| | | public static ShiroUser getUser() { |
| | | String sessionId = RequestContextHolder.currentRequestAttributes().getSessionId(); |
| | | ShiroUser shiroUser = map.get(sessionId); |
| | | if(null == shiroUser){ |
| | | throw new GunsException(BizExceptionEnum.TOKEN_ERROR); |
| | | } |
| | | return shiroUser; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于该角色?,使用时与lacksRole 搭配使用 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 属于该角色:true,否则false |
| | | */ |
| | | public boolean hasRole(String roleName) { |
| | | return getSubject() != null && roleName != null |
| | | && roleName.length() > 0 && getSubject().hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 不属于该角色:true,否则false |
| | | */ |
| | | public boolean lacksRole(String roleName) { |
| | | return !hasRole(roleName); |
| | | } |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, String> redisTemplate; |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下任意一个角色。 |
| | | * |
| | | * @param roleNames 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | public static boolean hasAnyRoles(String roleNames) { |
| | | public boolean hasAnyRoles(String roleNames) { |
| | | boolean hasAnyRole = false; |
| | | ShiroUser user = getUser(); |
| | | if (user != null && roleNames != null && roleNames.length() > 0) { |
| | |
| | | } |
| | | return hasAnyRole; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取封装的 ShiroUser |
| | | * |
| | | * @return ShiroUser |
| | | */ |
| | | public ShiroUser getUser() { |
| | | ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
| | | if (attrs != null) { |
| | | HttpServletRequest request = attrs.getRequest(); |
| | | HttpSession session = request.getSession(); |
| | | String onconParam = edu.yale.its.tp.cas.client.Util.getOnconParam(session); |
| | | try { |
| | | onconParam = new String(Base64.decodeBase64(onconParam), "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | LoginUser loginUser = JSON.parseObject(onconParam, LoginUser.class); |
| | | System.out.println("当前登录用户:" + JSON.toJSONString(loginUser)); |
| | | String shiroUser = redisTemplate.opsForValue().get(loginUser.getOnconUUID()); |
| | | System.out.println("当前登录用户缓存数据:" + shiroUser); |
| | | return JSON.parseObject(shiroUser, ShiroUser.class); |
| | | } |
| | | throw new GunsException(BizExceptionEnum.TOKEN_ERROR); |
| | | } |
| | | |
| | | /** |
| | | * 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 不属于该角色:true,否则false |
| | | */ |
| | | public boolean lacksRole(String roleName) { |
| | | return !hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于该角色?,使用时与lacksRole 搭配使用 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 属于该角色:true,否则false |
| | | */ |
| | | public boolean hasRole(String roleName) { |
| | | return getSubject() != null && roleName != null |
| | | && roleName.length() > 0 && getSubject().hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前 Subject |
| | | * |
| | | * @return Subject |
| | | */ |
| | | protected Subject getSubject() { |
| | | return SecurityUtils.getSubject(); |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下所有角色。 |
| | | * |
| | |
| | | } |
| | | return hasAllRole; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 验证当前用户是否拥有指定权限,使用时与lacksPermission 搭配使用 |
| | | * |
| | | * @param permission 权限名 |
| | | * @return 拥有权限:true,否则false |
| | | */ |
| | | public static boolean hasPermission(String permission) { |
| | | public boolean hasPermission(String permission) { |
| | | ShiroUser user = getUser(); |
| | | if(null == user){ |
| | | if (null == user) { |
| | | return false; |
| | | } |
| | | if(user.isAdmin()){ |
| | | if (user.isAdmin()) { |
| | | return true; |
| | | } |
| | | return user.getMenuIds().contains(permission); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 与hasPermission标签逻辑相反,当前用户没有制定权限时,验证通过。 |
| | | * |
| | |
| | | public boolean lacksPermission(String permission) { |
| | | return !hasPermission(permission); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 已认证通过的用户。不包含已记住的用户,这是与user标签的区别所在。与notAuthenticated搭配使用 |
| | | * |
| | |
| | | public boolean authenticated() { |
| | | return getSubject() != null && getSubject().isAuthenticated(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 未认证通过用户,与authenticated标签相对应。与guest标签的区别是,该标签包含已记住用户。。 |
| | | * |
| | |
| | | public boolean notAuthenticated() { |
| | | return !authenticated(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 认证通过或已记住的用户。与guset搭配使用。 |
| | | * |
| | |
| | | public boolean isUser() { |
| | | return getSubject() != null && getSubject().getPrincipal() != null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 验证当前用户是否为“访客”,即未认证(包含未记住)的用户。用user搭配使用 |
| | | * |
| | |
| | | public boolean isGuest() { |
| | | return !isUser(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 输出当前用户信息,通常为登录帐号信息。 |
| | | * |
| | |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | |
| | | @DependsOn("springContextHolder") |
| | | @Transactional(readOnly = true) |
| | | public class PermissionCheckFactory implements ICheck { |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | public static ICheck me() { |
| | | return SpringContextHolder.getBean(ICheck.class); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean check(Object[] permissions) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | if (null == user) { |
| | | return false; |
| | | } |
| | |
| | | return true; |
| | | } |
| | | String join = CollectionKit.join(permissions, ","); |
| | | if (ShiroExtUtil.hasAnyRoles(join)) { |
| | | if (shiroExtUtil.hasAnyRoles(join)) { |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | @Override |
| | | public boolean checkAll() { |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | if (null == user) { |
| | | return false; |
| | | } |
| | |
| | | if (str.length > 3) { |
| | | requestURI = "/" + str[1] + "/" + str[2]; |
| | | } |
| | | if (ShiroExtUtil.hasPermission(requestURI)) { |
| | | if (shiroExtUtil.hasPermission(requestURI)) { |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showCarRental") |
| | | public String showCarRental(Model model){ |
| | | public String showCarRental(Model model) { |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | model.addAttribute("userType", ShiroExtUtil.getUser().getRoleType()); |
| | | model.addAttribute("userType", shiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "carRental.html"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/carRental_add") |
| | | public String carRental_add(Model model){ |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | model.addAttribute("push", shiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | List<TRegion> regions = regionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | |
| | | model.addAttribute("province", regions); |
| | | regions = regionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getProvinceCode())).getId())); |
| | | model.addAttribute("city", regions); |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | model.addAttribute("push", shiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | return PREFIX + "carRental_edit.html"; |
| | | } |
| | | |
| | |
| | | carRental.setImgUrl(eighteen); |
| | | carRental.setVideoUrl(nineteen); |
| | | carRental.setFirstPageShow(2); |
| | | carRental.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | carRental.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | carRentalService.insert(carRental); |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.math.BigDecimal; |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | |
| | | |
| | | @Autowired |
| | | private IDriverActivityOnlineService driverActivityOnlineService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverActivityOrderService driverActivityOrderService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverActivityRegisteredService driverActivityRegisteredService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverActivityHistoryService driverActivityHistoryService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "driverActivity.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String name) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(driverActivityService.getList(page,beginTime,endTime,name,user.getRoleType(),user.getObjectId())); |
| | | page.setRecords(driverActivityService.getList(page, beginTime, endTime, name, user.getRoleType(), user.getObjectId())); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderPrivateCarService itOrderPrivateCarService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderCrossCityService itOrderCrossCityService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService itOrderLogisticsService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverOnlineService driverOnlineService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("/openNetCarInfo") |
| | | public Object openNetCarInfo(Integer id, Model model){ |
| | | public Object openNetCarInfo(Integer id, Model model) { |
| | | model.addAttribute("id", id); |
| | | return "/netCarInfo.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/showDriverOnline") |
| | | public String showDriverOnline(){ |
| | | public String showDriverOnline() { |
| | | return "/driverOnline.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSumData") |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end){ |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end) { |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(companyId == null && user.getRoleType() != 1){ |
| | | if (companyId == null && user.getRoleType() != 1) { |
| | | companyId = user.getObjectId(); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | Calendar calendar2 = Calendar.getInstance(); |
| | | Calendar calendar3 = Calendar.getInstance(); |
| | | Calendar calendar4 = Calendar.getInstance(); |
| | | if(addDate == null){ |
| | | if (addDate == null) { |
| | | calendar1.setTime(date); |
| | | calendar2.setTime(date); |
| | | }else{ |
| | |
| | | calendar4.set(Calendar.HOUR_OF_DAY, 23); |
| | | calendar4.set(Calendar.MINUTE, 59); |
| | | calendar4.set(Calendar.SECOND, 59); |
| | | |
| | | |
| | | //【今日运行情况】 |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | Wrapper<TUser> ne = new EntityWrapper<TUser>().between("insertTime", calendar1.getTime(), calendar2.getTime()).ne("flag", 3); |
| | | if(companyId != null){ |
| | | if (companyId != null) { |
| | | ne.eq("companyId", companyId); |
| | | } |
| | | int i = tUserService.selectCount(ne); |
| | | map1.put("passengerInfo", i); //新增用户 |
| | | |
| | | |
| | | Wrapper<TDriver> ne1 = new EntityWrapper<TDriver>().ne("state", 1).eq("authState", 2).ne("flag", 3); |
| | | if(companyId != null){ |
| | | if (companyId != null) { |
| | | ne1.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | List<TDriver> tDrivers = tDriverService.selectList(ne1); |
| | | int size = driverOnlineService.queryOnlineDriverCount(null, null); |
| | | map1.put("netcardriver", size); //在线司机 |
| | | |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().ne("state", 1).eq("authState", 2).ne("flag", 3)); |
| | | map1.put("netcardriver", count); //在线司机 |
| | | |
| | | Wrapper<TOrderTaxi> travelTime1 = new EntityWrapper<TOrderTaxi>().between("insertTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | if (companyId != null) { |
| | | travelTime1.eq("companyId", companyId); |
| | | } |
| | | int i1 = tOrderTaxiService.selectCount(travelTime1); |
| | | map1.put("orderDetail2", i1); //出租车订单 |
| | | |
| | | |
| | | Wrapper<TOrderPrivateCar> zcTodayTme = new EntityWrapper<TOrderPrivateCar>().between("insertTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | if (companyId != null) { |
| | | zcTodayTme.eq("companyId", companyId); |
| | | } |
| | | int zcTodayNum = itOrderPrivateCarService.selectCount(zcTodayTme); |
| | | map1.put("orderDetail1", zcTodayNum); //快车订单 |
| | | |
| | | |
| | | Wrapper<TOrderCrossCity> kcTodayTme = new EntityWrapper<TOrderCrossCity>().between("insertTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | if (companyId != null) { |
| | | kcTodayTme.eq("companyId", companyId); |
| | | } |
| | | int kcTodayNum = itOrderCrossCityService.selectCount(kcTodayTme); |
| | | map1.put("orderDetail3", kcTodayNum); //跨城订单 |
| | | |
| | | |
| | | Wrapper<TOrderLogistics> tcxTodayTme = new EntityWrapper<TOrderLogistics>().between("insertTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | tcxTodayTme.eq("companyId", companyId); |
| | |
| | | Double allIncomeMoney = tOrderTaxiService.getAllIncomeMoney(companyId, null, null); |
| | | |
| | | /// 购买打车卡产生的收益 |
| | | Double allCardMoney = taxiCardService.AllCardMoney(ShiroExtUtil.getUser().getObjectId()); |
| | | Double allCardMoney = taxiCardService.AllCardMoney(shiroExtUtil.getUser().getObjectId()); |
| | | if(allCardMoney==null){ |
| | | allCardMoney=0.0; |
| | | } |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getDriverPosition") |
| | | public Object getDriverPosition(Integer companyId){ |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | public Object getDriverPosition(Integer companyId) { |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if (companyId == null && user.getRoleType() != 1) { |
| | | companyId = user.getObjectId(); |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getCompanyInfoByUserId") |
| | | public Object getCompanyInfoByUserId(){ |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | public Object getCompanyInfoByUserId() { |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | companys = new ArrayList<>(); |
| | | List<TCompany> ids = new ArrayList<>(); |
| | | TCompany tCompany = null; |
| | | if(user.getRoleType() == 1 && user.getObjectId() == null){ |
| | | if (user.getRoleType() == 1 && user.getObjectId() == null) { |
| | | tCompany = tCompanyService.selectById(1); |
| | | }else{ |
| | | } else { |
| | | tCompany = tCompanyService.selectById(user.getObjectId()); |
| | | } |
| | | ids.add(tCompany); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TBalanceModifyRecord; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | @Autowired |
| | | private ITTaxiCardPaymentService taxiCardPaymentService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderTaxiService orderTaxiService; |
| | | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到订单收益 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("order") |
| | |
| | | page.setRecords(null); |
| | | }else{*/ |
| | | |
| | | List<Map<String, Object>> list = orderTaxiService.getIncomeOrderList(page, beginTime, endTime, phone, name, state, type, ShiroExtUtil.getUser().getObjectId(), income, payType); |
| | | list = list.stream().filter(e-> ToolUtil.isNotEmpty(e.get("payState"))).collect(Collectors.toList()); |
| | | List<Map<String, Object>> list = orderTaxiService.getIncomeOrderList(page, beginTime, endTime, phone, name, state, type, shiroExtUtil.getUser().getObjectId(), income, payType); |
| | | list = list.stream().filter(e -> ToolUtil.isNotEmpty(e.get("payState"))).collect(Collectors.toList()); |
| | | Page<Map<String, Object>> page1 = new Page<>(0, 1000000); |
| | | List<Map<String, Object>> list1 = orderTaxiService.getIncomeOrderList(page1, beginTime, endTime, phone, name, state, type, ShiroExtUtil.getUser().getObjectId(), income, payType); |
| | | list1 = list1.stream().filter(e->ToolUtil.isNotEmpty(e.get("payState"))).collect(Collectors.toList()); |
| | | BigDecimal orderMoney = new BigDecimal("0"); |
| | | BigDecimal money = new BigDecimal("0"); |
| | | BigDecimal payMoney = new BigDecimal("0"); |
| | | BigDecimal couponMoney = new BigDecimal("0"); |
| | | BigDecimal discountAmount = new BigDecimal("0"); |
| | | BigDecimal redPacketMoney = new BigDecimal("0"); |
| | | BigDecimal additionalFee = new BigDecimal("0"); |
| | | BigDecimal other = new BigDecimal("0"); |
| | | List<Map<String, Object>> list1 = orderTaxiService.getIncomeOrderList(page1, beginTime, endTime, phone, name, state, type, shiroExtUtil.getUser().getObjectId(), income, payType); |
| | | list1 = list1.stream().filter(e -> ToolUtil.isNotEmpty(e.get("payState"))).collect(Collectors.toList()); |
| | | BigDecimal orderMoney = new BigDecimal("0"); |
| | | BigDecimal money = new BigDecimal("0"); |
| | | BigDecimal payMoney = new BigDecimal("0"); |
| | | BigDecimal couponMoney = new BigDecimal("0"); |
| | | BigDecimal discountAmount = new BigDecimal("0"); |
| | | BigDecimal redPacketMoney = new BigDecimal("0"); |
| | | BigDecimal additionalFee = new BigDecimal("0"); |
| | | BigDecimal other = new BigDecimal("0"); |
| | | for (Map<String, Object> map : list) { |
| | | Object money1 = map.get("money"); |
| | | BigDecimal bigDecimal = new BigDecimal(money1.toString()); |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = orderTaxiService.getIncomeOrderListEx(beginTime, endTime, phone, name, state, type, ShiroExtUtil.getUser().getObjectId(), income, payType); |
| | | List<Map<String, Object>> mapList = orderTaxiService.getIncomeOrderListEx(beginTime, endTime, phone, name, state, type, shiroExtUtil.getUser().getObjectId(), income, payType); |
| | | mapList = mapList.stream().filter(e-> ToolUtil.isNotEmpty(e.get("payState"))).collect(Collectors.toList()); |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | page.setRecords(null); |
| | | }else{*/ |
| | | |
| | | List<Map<String, Object>> list = orderLogisticsService.getTimeOutOrderList(page, beginTime, endTime, phone, name, id, ShiroExtUtil.getUser().getObjectId(), orderType); |
| | | Map<String, Object> map = orderLogisticsService.getTimeOutOrderSumMoney(beginTime, endTime, phone, name, id, ShiroExtUtil.getUser().getObjectId(), orderType); |
| | | List<Map<String, Object>> list = orderLogisticsService.getTimeOutOrderList(page, beginTime, endTime, phone, name, id, shiroExtUtil.getUser().getObjectId(), orderType); |
| | | Map<String, Object> map = orderLogisticsService.getTimeOutOrderSumMoney(beginTime, endTime, phone, name, id, shiroExtUtil.getUser().getObjectId(), orderType); |
| | | if (!list.isEmpty() && map != null) { |
| | | map.put("id", "合计"); |
| | | list.add(map); |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = orderLogisticsService.getTimeOutOrderListEx(beginTime, endTime, phone, name, id, ShiroExtUtil.getUser().getObjectId(), orderType); |
| | | List<Map<String, Object>> mapList = orderLogisticsService.getTimeOutOrderListEx(beginTime, endTime, phone, name, id, shiroExtUtil.getUser().getObjectId(), orderType); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | String cardName) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | |
| | | page.setRecords(null); |
| | | }else{*/ |
| | | |
| | | List<Map<String, Object>> list = taxiCardPaymentService.getList(page, beginTime, endTime, null, type, phone, name, id, cardName, ShiroExtUtil.getUser().getObjectId()); |
| | | if(list!=null && list.size()>0){ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("id", "合计"); |
| | | map.put("payMoney", taxiCardPaymentService.getSumMoney(beginTime, endTime, null, type, phone, name, id, cardName, ShiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | } |
| | | |
| | | page.setRecords(list); |
| | | /* }*/ |
| | | List<Map<String, Object>> list = taxiCardPaymentService.getList(page, beginTime, endTime, null, type, phone, name, id, cardName, shiroExtUtil.getUser().getObjectId()); |
| | | if (list != null && list.size() > 0) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", "合计"); |
| | | map.put("payMoney", taxiCardPaymentService.getSumMoney(beginTime, endTime, null, type, phone, name, id, cardName, shiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | } |
| | | |
| | | page.setRecords(list); |
| | | /* }*/ |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time = format.format(date); |
| | | String fileName = "打车卡"+time+".xls"; |
| | | String[] title = new String[] {"支付时间","流水ID","打车卡名称","打车卡类型","乘客名称","乘客手机号","支付类型","收益金额"}; |
| | | |
| | | |
| | | String[] title = new String[]{"支付时间", "流水ID", "打车卡名称", "打车卡类型", "乘客名称", "乘客手机号", "支付类型", "收益金额"}; |
| | | |
| | | |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new Page<>(1, 10000000); |
| | | List<Map<String, Object>> mapList = taxiCardPaymentService.getList(page, beginTime, endTime, null, type, phone, name, id, cardName, ShiroExtUtil.getUser().getObjectId()); |
| | | |
| | | List<Map<String, Object>> mapList = taxiCardPaymentService.getList(page, beginTime, endTime, null, type, phone, name, id, cardName, shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | | Map<String,Object> d=mapList.get(i); |
| | | Map<String, Object> d = mapList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0]=d.get("createTime").toString(); |
| | | values[i][1]=d.get("id").toString(); |
| | | values[i][2]=d.get("cardName").toString(); |
| | | values[i][3]=d.get("typeName").toString(); |
| | | values[i][4]=d.get("nickName")!=null?d.get("nickName").toString():""; |
| | | values[i][0] = d.get("createTime").toString(); |
| | | values[i][1] = d.get("id").toString(); |
| | | values[i][2] = d.get("cardName").toString(); |
| | | values[i][3] = d.get("typeName").toString(); |
| | | values[i][4] = d.get("nickName") != null ? d.get("nickName").toString():""; |
| | | values[i][5]=d.get("phone")!=null?d.get("phone").toString():""; |
| | | String payType = d.get("payType").toString(); |
| | | if("1".equals(payType)){ |
| | |
| | | String id) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | |
| | | List<Map<String, Object>> list = complaintDeductmoneyService.getList(page, beginTime, endTime, null, userPhone, userName, id, ShiroExtUtil.getUser().getObjectId()); |
| | | if(list!=null && list.size()>0){ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("id", "合计"); |
| | | map.put("money", complaintDeductmoneyService.getSumMoney(beginTime, endTime, null, userPhone, userName, id, ShiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | | List<Map<String, Object>> list = complaintDeductmoneyService.getList(page, beginTime, endTime, null, userPhone, userName, id, shiroExtUtil.getUser().getObjectId()); |
| | | if (list != null && list.size() > 0) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", "合计"); |
| | | map.put("money", complaintDeductmoneyService.getSumMoney(beginTime, endTime, null, userPhone, userName, id, shiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = complaintDeductmoneyService.getListEx(beginTime, endTime, null, userPhone, userName, id, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> mapList = complaintDeductmoneyService.getListEx(beginTime, endTime, null, userPhone, userName, id, shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IUserMerchantCouponService userMerchantCouponService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITMerchantService merchantService; |
| | | |
| | | |
| | | @Autowired |
| | | private IMerchantActivitySlaveService merchantActivitySlaveService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("/index") |
| | | public String index() { |
| | | return PREFIX + "merchantActivity.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param startTime |
| | | * @param endTime |
| | |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public Object list(String startTime, String endTime, Integer type, String merchantName, Integer status) { |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String, Object>> list = merchantActivityService.list(startTime, endTime, type, merchantName, status, companyId, page); |
| | |
| | | @ResponseBody |
| | | public Object add(@RequestBody MerchantActivity activity) { |
| | | |
| | | Integer userId = ShiroExtUtil.getUser().getId(); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | if (ToolUtil.isNotEmpty(user)) { |
| | | if (user.getRoleType().equals(2)) { |
| | |
| | | public Object activityExamineList(String startTime, String endTime, Integer type, Integer auditStatus) { |
| | | |
| | | Integer companyId = null; |
| | | if (ShiroExtUtil.getUser().getRoleType().equals(1)) { |
| | | companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | if (shiroExtUtil.getUser().getRoleType().equals(1)) { |
| | | companyId = shiroExtUtil.getUser().getObjectId(); |
| | | } |
| | | |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | |
| | | @RequestMapping("/examine") |
| | | @ResponseBody |
| | | public Object examine(Integer id, Integer state, String auditNote) { |
| | | |
| | | |
| | | MerchantActivity activity = merchantActivityService.selectById(id); |
| | | |
| | | Integer userId = ShiroExtUtil.getUser().getId(); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | |
| | | |
| | | if (ToolUtil.isNotEmpty(activity)) { |
| | | activity.setAuditStatus(state); |
| | | activity.setAuditNote(auditNote); |
| | | activity.setAuditUserId(user.getObjectId()); |
| | | activity.setAuditTime(new Date()); |
| | | |
| | | |
| | | merchantActivityService.updateById(activity); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.MerchantActivity; |
| | | import com.stylefeng.guns.modular.system.model.MerchantActivitySlave; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import com.stylefeng.guns.modular.system.model.UserMerchantCoupon; |
| | | import com.stylefeng.guns.modular.system.response.MerchantActivityVo; |
| | | import com.stylefeng.guns.modular.system.response.UserRequest; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private ITMerchantService merchantService; |
| | | @Autowired |
| | | private IUserMerchantCouponService userMerchantCouponService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("/index") |
| | | public String index() { |
| | | return PREFIX + "merchantActivityGive.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param startTime |
| | | * @param endTime |
| | |
| | | @ResponseBody |
| | | public Object list(String startTime, String endTime, Integer type, String merchantName, Integer status) { |
| | | |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String, Object>> list = merchantActivityService.getMerchantActivityGiveList(startTime, endTime, type, merchantName, status, companyId, page); |
| | | page.setRecords(list); |
| | |
| | | @RequestMapping("/add") |
| | | public Object add(@RequestBody MerchantActivity activity) { |
| | | |
| | | Integer userId = ShiroExtUtil.getUser().getId(); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | if (ToolUtil.isNotEmpty(user)) { |
| | | if (user.getRoleType().equals(2)) { |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/recruit") |
| | | public class RecruitController { |
| | | |
| | | |
| | | private String PREFIX = "/system/recruit/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private IRecruitService recruitService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showRecruit") |
| | | public String showRecruit(){ |
| | | public String showRecruit() { |
| | | return PREFIX + "recruit.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加页 |
| | | * @return |
| | |
| | | @PostMapping("/addRecruit") |
| | | public ResultUtil addRecruit(Recruit recruit){ |
| | | try { |
| | | recruit.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | recruit.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | recruit.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | recruit.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | recruit.setProvinceName(regionService.selectOne(new EntityWrapper<TRegion>().eq("code", recruit.getProvinceCode())).getName()); |
| | | recruit.setCityName(regionService.selectOne(new EntityWrapper<TRegion>().eq("code", recruit.getCityCode())).getName()); |
| | | recruit.setFirstPageShow(2); |
| | | recruit.setCreateTime(new Date()); |
| | | recruit.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | recruit.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | if (recruit.getInterviewOrNot() == 1) { |
| | | recruit.setStartSalary(0D); |
| | | recruit.setEndSalary(0D); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | |
| | | |
| | | @Autowired |
| | | private ITPubWithdrawalService tPubWithdrawalService; |
| | | |
| | | |
| | | @Autowired |
| | | private IComplaintDeductmoneyService complaintDeductmoneyService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITTaxiCardPaymentService taxiCardPaymentService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderTaxiService orderTaxiService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | | */ |
| | |
| | | public String user() { |
| | | return PREFIX + "tUser.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到订单收益 |
| | | * @return |
| | |
| | | String ids,Integer type,String payType) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | |
| | | /*if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{*/ |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | List<Map<String, Object>> list = orderTaxiService.getOrderList(page, beginTime, endTime, ids, type, payType, user.getObjectId()); |
| | | page.setRecords(list); |
| | | /* }*/ |
| | | page.setRecords(list); |
| | | /* }*/ |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = orderTaxiService.getOrderListEx(beginTime, endTime, ids, type, payType, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> mapList = orderTaxiService.getOrderListEx(beginTime, endTime, ids, type, payType, shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | String ids) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | |
| | |
| | | String ids,String type) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | |
| | | List<Map<String, Object>> list = taxiCardPaymentService.getList(page, beginTime, endTime, ids, type, null, null, null, null, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> list = taxiCardPaymentService.getList(page, beginTime, endTime, ids, type, null, null, null, null, shiroExtUtil.getUser().getObjectId()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", "合计"); |
| | | map.put("payMoney", taxiCardPaymentService.getSumMoney(beginTime, endTime, ids, type, null, null, null, null, ShiroExtUtil.getUser().getObjectId())); |
| | | map.put("payMoney", taxiCardPaymentService.getSumMoney(beginTime, endTime, ids, type, null, null, null, null, shiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | page.setRecords(list); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = taxiCardPaymentService.getListEx(beginTime, endTime, ids, type, null, null, null, null, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> mapList = taxiCardPaymentService.getListEx(beginTime, endTime, ids, type, null, null, null, null, shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | String ids) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | |
| | | List<Map<String, Object>> list = complaintDeductmoneyService.getList(page, beginTime, endTime, ids, null, null, null, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> list = complaintDeductmoneyService.getList(page, beginTime, endTime, ids, null, null, null, shiroExtUtil.getUser().getObjectId()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", "合计"); |
| | | map.put("money", complaintDeductmoneyService.getSumMoney(beginTime, endTime, ids, null, null, null, ShiroExtUtil.getUser().getObjectId())); |
| | | map.put("money", complaintDeductmoneyService.getSumMoney(beginTime, endTime, ids, null, null, null, shiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | page.setRecords(list); |
| | | } |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = complaintDeductmoneyService.getListEx(beginTime, endTime, ids, null, null, null, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> mapList = complaintDeductmoneyService.getListEx(beginTime, endTime, ids, null, null, null, shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | String ids) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showSellingCarList") |
| | | public String showSellingCarList(Model model){ |
| | | public String showSellingCarList(Model model) { |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | model.addAttribute("userType", ShiroExtUtil.getUser().getRoleType()); |
| | | model.addAttribute("userType", shiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "sellingCar.html"; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/sellingCar_add") |
| | | public String sellingCar_add(Model model){ |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | public String sellingCar_add(Model model) { |
| | | model.addAttribute("push", shiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | List<TRegion> regions = regionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/sellingCar_update") |
| | | public String sellingCar_update(Model model, Integer id){ |
| | | public String sellingCar_update(Model model, Integer id) { |
| | | SellingCar sellingCar = sellingCarService.selectById(id); |
| | | model.addAttribute("item", sellingCar); |
| | | model.addAttribute("imgs", sellingCar.getImgUrl().split(",")); |
| | | model.addAttribute("videos", sellingCar.getVideoUrl().split(",")); |
| | | model.addAttribute("describeImgs", sellingCar.getDescribeImgUrl().split(",")); |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | model.addAttribute("push", shiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | List<TRegion> regions = regionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSysWithdrawalPoundageService withdrawalPoundageService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITTimeoutAppealService timeoutAppealService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITReassignService reassignService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转订单收益明细 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "orderRevenueDetails.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到奖励收益明细 |
| | | */ |
| | |
| | | */ |
| | | @RequestMapping(value = "/detail/{driverId}") |
| | | public String detail(@PathVariable Integer driverId, Model model){ |
| | | Map<String, Object> map = driverService.selectMap(new EntityWrapper<TDriver>().eq("id", driverId).eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | Map<String, Object> map = driverService.selectMap(new EntityWrapper<TDriver>().eq("id", driverId).eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | |
| | | double activityIncome; |
| | | Wrapper wrapper1 = new EntityWrapper<Income>().eq("userType",2).eq("objectId",driverId).eq("type",1); |
| | |
| | | @ResponseBody |
| | | public Object list(String driverName, String driverPhone, String startTime, String endTime) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<TDriver>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | |
| | | Wrapper wrapper = new EntityWrapper<TDriver>().eq("companyId", shiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | |
| | | if (ToolUtil.isNotEmpty(driverName)) { |
| | | wrapper.like("name", driverName); |
| | | } |
| | | if (ToolUtil.isNotEmpty(driverPhone)) { |
| | | wrapper.like("phone", driverPhone); |
| | | } |
| | | |
| | | |
| | | List<Map<String, Object>> list = driverService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | |
| | | for (Map<String, Object> map : list) { |
| | | |
| | | /// 活动收益 |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/sysCouponActivity") |
| | | public class SysCouponActivityController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/sysCouponActivity/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ISysCouponActivityService sysCouponActivityService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService couponRecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "sysCouponActivity.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到选择优惠券页面 |
| | | * @return |
| | |
| | | } |
| | | if(SinataUtil.isNotEmpty(couponUseType)){wrapper.eq("couponUseType",couponUseType);} |
| | | if(SinataUtil.isNotEmpty(status)){wrapper.eq("status",status);} |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | if(user.getRoleType()!=1){ |
| | | wrapper.eq("companyId",user.getObjectId()); |
| | | wrapper.eq("companyType",user.getRoleType()); |
| | |
| | | sysCouponActivity.setFullMoney(sysCouponRecord.getFullMoney()); |
| | | sysCouponActivity.setInsertTime(new Date()); |
| | | sysCouponActivity.setCouponId(activityId); |
| | | sysCouponActivity.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | sysCouponActivity.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | sysCouponActivity.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | sysCouponActivity.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | sysCouponActivity.setStatus(sysCouponActivity.getCompanyType() == 1 ? 3 : 1); |
| | | sysCouponActivityService.insert(sysCouponActivity); |
| | | if (sysCouponActivity.getCompanyType() == 1) { |
| | |
| | | sysCouponActivity.setFullMoney(sysCouponRecord.getFullMoney()); |
| | | sysCouponActivity.setInsertTime(new Date()); |
| | | sysCouponActivity.setCouponId(activityId); |
| | | sysCouponActivity.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | sysCouponActivity.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | sysCouponActivity.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | sysCouponActivity.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | sysCouponActivity.setStatus(sysCouponActivity.getCompanyType() == 1 ? 3 : 1); |
| | | sysCouponActivityService.updateById(sysCouponActivity); |
| | | return SUCCESS_TIP; |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysCouponRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysCouponRecordService; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @Controller |
| | | @RequestMapping("/sysCouponRecord") |
| | | public class SysCouponRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/sysCouponRecord/"; |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("jumpType",1); |
| | | model.addAttribute("num",0); |
| | | return PREFIX + "sysCouponRecord.html"; |
| | | } |
| | | |
| | | private String PREFIX = "/system/sysCouponRecord/"; |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("jumpType", 1); |
| | | model.addAttribute("num", 0); |
| | | return PREFIX + "sysCouponRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,Integer couponUseType,Integer couponType) { |
| | | |
| | | Date startTimes = null; |
| | | Date endTimes = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | startTimes = DateUtil.getDate_str3(timeArray[0]+" 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1]+" 23:59:59"); |
| | | } |
| | | Page<SysCouponRecord> page = new PageFactory<SysCouponRecord>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<SysCouponRecord>(); |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | wrapper.between("insertTime", startTimes, endTimes); |
| | | } |
| | | if (SinataUtil.isNotEmpty(couponUseType)) { |
| | | wrapper.eq("couponUseType", couponUseType); |
| | | } |
| | | if (SinataUtil.isNotEmpty(couponType)) { |
| | | wrapper.eq("couponType", couponType); |
| | | } |
| | | wrapper.eq("companyId", ShiroExtUtil.getUser().getObjectId()); |
| | | wrapper.eq("companyType", ShiroExtUtil.getUser().getRoleType()); |
| | | wrapper.orderBy("id", false); |
| | | return super.packForBT(sysCouponRecordService.selectPage(page, wrapper)); |
| | | |
| | | Date startTimes = null; |
| | | Date endTimes = null; |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | String[] timeArray = createTime.split(" - "); |
| | | startTimes = DateUtil.getDate_str3(timeArray[0] + " 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1] + " 23:59:59"); |
| | | } |
| | | Page<SysCouponRecord> page = new PageFactory<SysCouponRecord>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<SysCouponRecord>(); |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | wrapper.between("insertTime", startTimes, endTimes); |
| | | } |
| | | if (SinataUtil.isNotEmpty(couponUseType)) { |
| | | wrapper.eq("couponUseType", couponUseType); |
| | | } |
| | | if (SinataUtil.isNotEmpty(couponType)) { |
| | | wrapper.eq("couponType", couponType); |
| | | } |
| | | wrapper.eq("companyId", shiroExtUtil.getUser().getObjectId()); |
| | | wrapper.eq("companyType", shiroExtUtil.getUser().getRoleType()); |
| | | wrapper.orderBy("id", false); |
| | | return super.packForBT(sysCouponRecordService.selectPage(page, wrapper)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(SysCouponRecord sysCouponRecord) { |
| | | sysCouponRecord.setInsertTime(new Date()); |
| | | sysCouponRecord.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | sysCouponRecord.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | sysCouponRecordService.insert(sysCouponRecord); |
| | | return SUCCESS_TIP; |
| | | sysCouponRecord.setInsertTime(new Date()); |
| | | sysCouponRecord.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | sysCouponRecord.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | sysCouponRecordService.insert(sysCouponRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysRedPacketRecordService; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @Controller |
| | | @RequestMapping("/sysRedPacketRecord") |
| | | public class SysRedPacketRecordController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/sysRedPacketRecord/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "sysRedPacketRecord.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | wrapper.between("insertTime", startTimes, endTimes); |
| | | } |
| | | wrapper.eq("companyId", ShiroExtUtil.getUser().getObjectId()); |
| | | wrapper.eq("companyType", ShiroExtUtil.getUser().getRoleType()); |
| | | wrapper.eq("companyId", shiroExtUtil.getUser().getObjectId()); |
| | | wrapper.eq("companyType", shiroExtUtil.getUser().getRoleType()); |
| | | wrapper.orderBy("id", false); |
| | | return super.packForBT(sysRedPacketRecordService.selectPage(page, wrapper)); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object add(SysRedPacketRecord sysRedPacketRecord) { |
| | | sysRedPacketRecord.setInsertTime(new Date()); |
| | | sysRedPacketRecord.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | sysRedPacketRecord.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | sysRedPacketRecord.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | sysRedPacketRecord.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | sysRedPacketRecordService.insert(sysRedPacketRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TAdditionalFee; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Controller |
| | | @RequestMapping("/tAdditionalFee") |
| | | public class TAdditionalFeeController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tAdditionalFee/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITAdditionalFeeService additionalFeeService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("") |
| | | public String index(){ |
| | | public String index() { |
| | | return PREFIX + "tAdditionalFee.html"; |
| | | } |
| | | |
| | | |
| | | /// 跳转添加 |
| | | @RequestMapping("/tAdditionalFee_add") |
| | | public String tAdditionalFee_add(){ |
| | | public String tAdditionalFee_add() { |
| | | return PREFIX + "tAdditionalFee_add.html"; |
| | | } |
| | | |
| | |
| | | @RequestMapping("/add") |
| | | @ResponseBody |
| | | public Object add(TAdditionalFee additionalFee){ |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | additionalFee.setCreateTime(DateUtil.parseTime(DateUtil.getTime())); |
| | | additionalFee.setState(1); |
| | | additionalFee.setCompanyId(companyId); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TAdvertisement; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITAdvertisementService; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TAdvertisement; |
| | | import com.stylefeng.guns.modular.system.service.ITAdvertisementService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @Controller |
| | | @RequestMapping("/tAdvertisement") |
| | | public class TAdvertisementController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tAdvertisement/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITAdvertisementService tAdvertisementService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到广告设置首页 |
| | | */ |
| | |
| | | @ResponseBody |
| | | public Object add(TAdvertisement tAdvertisement) { |
| | | tAdvertisement.setInsertTime(new Date()); |
| | | tAdvertisement.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | tAdvertisement.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tAdvertisementService.insert(tAdvertisement); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object opt(@RequestParam Integer tAdvertisementId,@RequestParam Integer optType) { |
| | | TAdvertisement tAdvertisement = tAdvertisementService.selectById(tAdvertisementId); |
| | | if (SinataUtil.isNotEmpty(tAdvertisement)){ |
| | | if (1 == optType.intValue()){ //上线 |
| | | if (SinataUtil.isNotEmpty(tAdvertisement)) { |
| | | if (1 == optType.intValue()) { //上线 |
| | | tAdvertisement.setState(1); |
| | | }else if (2 == optType.intValue()){ //下线 |
| | | } else if (2 == optType.intValue()) { //下线 |
| | | tAdvertisement.setState(2); |
| | | } |
| | | tAdvertisement.setUpdateTime(new Date()); |
| | | tAdvertisement.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tAdvertisement.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tAdvertisementService.updateById(tAdvertisement); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | @ResponseBody |
| | | public Object update(TAdvertisement tAdvertisement) { |
| | | tAdvertisement.setUpdateTime(new Date()); |
| | | tAdvertisement.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tAdvertisement.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tAdvertisementService.updateById(tAdvertisement); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TAgreement; |
| | | import com.stylefeng.guns.modular.system.service.ITAgreementService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户端协议管理控制器 |
| | |
| | | @Controller |
| | | @RequestMapping("/tAgreement") |
| | | public class TAgreementController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tAgreement/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITAgreementService tAgreementService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户端协议管理首页 |
| | | */ |
| | |
| | | TAgreement agreement = tAgreementService.selectById(id); |
| | | agreement.setContent(context); |
| | | agreement.setUpdateTime(new Date()); |
| | | agreement.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | agreement.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tAgreementService.updateById(agreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | @RequestMapping(value = "/addOrUpdateIntimateAgreement") |
| | | @ResponseBody |
| | | public Object addOrUpdateIntimateAgreement(TAgreement tAgreement) { |
| | | if (tAgreement.getId() == 0){ |
| | | if (tAgreement.getId() == 0) { |
| | | tAgreement.setId(null); |
| | | tAgreement.setInsertUser(ShiroExtUtil.getUser().getName()); |
| | | tAgreement.setInsertUser(shiroExtUtil.getUser().getName()); |
| | | tAgreement.setUseType(1); |
| | | tAgreement.setType(16); |
| | | tAgreement.setFlag("1"); |
| | | tAgreement.setInsertTime(DateUtil.parseTime(DateUtil.getTime())); |
| | | tAgreement.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | |
| | | tAgreement.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | |
| | | /// 过滤富文本的特殊字符 |
| | | String content = tAgreement.getContent(); |
| | | content = content.replaceAll("& lt;", "<").replaceAll("& gt;", ">"); |
| | | |
| | | |
| | | content = content.replaceAll("\\(", "& #40;").replaceAll("\\)", "& #41;"); |
| | | tAgreement.setContent(content); |
| | | tAgreementService.insert(tAgreement); |
| | | }else { |
| | | tAgreement.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tAgreement.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tAgreement.setUpdateTime(DateUtil.parseTime(DateUtil.getTime())); |
| | | tAgreement.setFlag("2"); |
| | | |
| | | |
| | | /// 过滤富文本的特殊字符 |
| | | String content = tAgreement.getContent(); |
| | | content = content.replaceAll("& lt;", "<").replaceAll("& gt;", ">"); |
| | | |
| | | |
| | | content = content.replaceAll("\\(", "& #40;").replaceAll("\\)", "& #41;"); |
| | | tAgreement.setContent(content); |
| | | tAgreementService.updateById(tAgreement); |
| | |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | |
| | | |
| | | @Autowired |
| | | private ITCarServiceService itCarServiceService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService itServerCarmodelService; |
| | | |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | |
| | | @Resource |
| | | private CarInsuranceMapper carInsuranceMapper; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("companyList", companyList); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType", roleType); |
| | | if (2 == roleType) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", ShiroExtUtil.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", shiroExtUtil.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } else { |
| | | model.addAttribute("franchiseeList", null); |
| | | } |
| | | //查询当前用户所属分公司/加盟商 |
| | | model.addAttribute("objectName", tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()).getName()); |
| | | model.addAttribute("objectName", tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()).getName()); |
| | | |
| | | //车辆品牌 |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | |
| | | model.addAttribute("item", tCar); |
| | | LogObjectHolder.me().set(tCar); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType", roleType); |
| | | model.addAttribute("objectName", tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()).getName()); |
| | | model.addAttribute("objectName", tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 0).ne("flag", 3)); |
| | |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", tCar.getCompanyId()).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } else if (2 == roleType) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", ShiroExtUtil.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", shiroExtUtil.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } |
| | | |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tCarService.getCarList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, id, brandName, modelName, carColor, serverStr, carLicensePlate, driverName, companyName, franchiseeName)); |
| | | page.setRecords(tCarService.getCarList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, id, brandName, modelName, carColor, serverStr, carLicensePlate, driverName, companyName, franchiseeName)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | tCar.setAddType(2); |
| | | tCar.setIsPlatCar(1); |
| | | } else if (2 == roleType) { //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)) { |
| | | tCar.setFranchiseeId(franchiseeId); |
| | | } |
| | | tCar.setIsPlatCar(2); |
| | | tCar.setAddType(3); |
| | | tCar.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | tCar.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | } else if (3 == roleType) { //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | TCompany tCompany = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)) { |
| | | tCar.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setFranchiseeId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setFranchiseeId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | tCar.setIsPlatCar(2); |
| | | tCar.setAddType(4); |
| | | tCar.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | tCar.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | tCar.setInsertTime(new Date()); |
| | | tCar.setState(1); |
| | |
| | | tCar.setFranchiseeId(0); |
| | | } |
| | | } else if (2 == roleType) { //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)) { |
| | | tCar.setFranchiseeId(franchiseeId); |
| | | } |
| | | } else if (3 == roleType) { //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | TCompany tCompany = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)) { |
| | | tCar.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setFranchiseeId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tCar.setFranchiseeId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | } |
| | | |
| | |
| | | car.setCommercialInsuranceTime(DateUtil.parseDate(fifteen)); |
| | | car.setInsertTime(new Date()); |
| | | car.setState(1); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | car.setAddType(2); |
| | | } else if (ShiroExtUtil.getUser().getRoleType() == 2) { |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 2) { |
| | | car.setAddType(3); |
| | | car.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | } else if (ShiroExtUtil.getUser().getRoleType() == 3) { |
| | | car.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 3) { |
| | | car.setAddType(4); |
| | | car.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | car.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | tCarService.insert(car); |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/outCar") |
| | | public void outCar(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String, Object>> listMap = tCarService.getCarListNoPage(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> listMap = tCarService.getCarListNoPage(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private ITTaxiCardService cardService; |
| | | |
| | | @Autowired |
| | | private ITCompanyCityService tCompanyCityService; |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | @Autowired |
| | | private ISpellOrderRuleService spellOrderRuleService; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改平台信息 |
| | | */ |
| | | |
| | | @Autowired |
| | | private ITCompanyCityService tCompanyCityService; |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | @Autowired |
| | | private ISpellOrderRuleService spellOrderRuleService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改平台信息 |
| | | */ |
| | | @RequestMapping("/admin_update") |
| | | public String tCompanyUpdate(Model model) { |
| | | TCompany tCompany = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type",1).notIn("flag",3)); |
| | |
| | | */ |
| | | @RequestMapping("/tCompany_addFranchisee") |
| | | public String tCompany_addFranchisee(Model model) { |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | if (1 == roleType){ |
| | | //查询分公司 |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | }else if (2 == roleType){ |
| | | TCompany tCompany = tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | TCompany tCompany = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | model.addAttribute("company",tCompany); |
| | | } |
| | | model.addAttribute("roleType",roleType); |
| | |
| | | model.addAttribute("item", tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType", roleType); |
| | | |
| | | TCompany obj = tCompanyService.selectById(tCompany.getSuperiorId()); |
| | |
| | | model.addAttribute("item", tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | if (1 == roleType) { |
| | | //查询分公司 |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList", companyList); |
| | | } else if (2 == roleType) { |
| | | TCompany obj = tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | TCompany obj = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | model.addAttribute("company", obj); |
| | | } |
| | | model.addAttribute("roleType", roleType); |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 3) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 3) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tCompanyService.getFranchiseeList(page, beginTime, endTime, name, account, principalName, principalPhone, serviceStr, state, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId())); |
| | | page.setRecords(tCompanyService.getFranchiseeList(page, beginTime, endTime, name, account, principalName, principalPhone, serviceStr, state, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId())); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | tCompany.setEnterCode(enterCode); |
| | | tCompany.setType(2); //2:分公司 |
| | | tCompany.setState(0); //0:正常 |
| | | tCompany.setFlag("1"); |
| | | tCompany.setInsertTime(new Date()); |
| | | tCompany.setUpdateTime(new Date()); |
| | | tCompanyService.insert(tCompany); |
| | |
| | | |
| | | tCompany.setEnterCode(enterCode); |
| | | tCompany.setType(3); //2:分公司 |
| | | if (ShiroExtUtil.getUser().getRoleType() == 2) { |
| | | tCompany.setSuperiorId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (shiroExtUtil.getUser().getRoleType() == 2) { |
| | | tCompany.setSuperiorId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | tCompany.setState(0); //0:正常 |
| | | tCompany.setFlag("1"); |
| | | tCompany.setInsertTime(new Date()); |
| | | tCompanyService.insert(tCompany); |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCompanyWithdraw; |
| | | import com.stylefeng.guns.modular.system.model.TEnterpriseWithdrawal; |
| | |
| | | @Controller |
| | | @RequestMapping("/tCompanyWithdraw") |
| | | public class TCompanyWithdrawController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tCompanyWithdraw/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyWithdrawService tCompanyWithdrawService; |
| | | |
| | | |
| | | @Resource |
| | | private ITEnterpriseWithdrawalService enterpriseWithdrawalService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Integer id = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer id = shiroExtUtil.getUser().getObjectId(); |
| | | List<TEnterpriseWithdrawal> companyId = enterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", id)); |
| | | if(companyId.size()>0){ |
| | | }else { |
| | | if (companyId.size() > 0) { |
| | | } else { |
| | | model.addAttribute("money",0); |
| | | } |
| | | return PREFIX + "tCompanyWithdraw.html"; |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,Integer state) { |
| | | Integer id = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer id = shiroExtUtil.getUser().getObjectId(); |
| | | EntityWrapper<TCompanyWithdraw> withdrawEntityWrapper = new EntityWrapper<>(); |
| | | String sTime=null; |
| | | String eTime=null; |
| | |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object add(Double money,String type,String remark) { |
| | | List<TEnterpriseWithdrawal> companyId = enterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | List<TEnterpriseWithdrawal> companyId = enterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (companyId.size() > 0) { |
| | | } |
| | | TCompanyWithdraw tCompanyWithdraw = new TCompanyWithdraw(); |
| | | tCompanyWithdraw.setWithdrawMoney(new BigDecimal(money)); |
| | | tCompanyWithdraw.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tCompanyWithdraw.setCreateId(ShiroExtUtil.getUser().getId()); |
| | | tCompanyWithdraw.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tCompanyWithdraw.setCreateId(shiroExtUtil.getUser().getId()); |
| | | tCompanyWithdraw.setCreateTime(new Date()); |
| | | if ("提现".equals(type)) { |
| | | tCompanyWithdraw.setType(1); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TProblem; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.service.ITComplaintService; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import com.stylefeng.guns.modular.system.service.ITComplaintService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tComplaint") |
| | | public class TComplaintController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tComplaint/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITComplaintService tComplaintService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到投诉列表首页 |
| | | */ |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tComplaintService.getComplaintList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverPhone, isHandle, null)); |
| | | page.setRecords(tComplaintService.getComplaintList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverPhone, isHandle, null)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer id,@RequestParam String handleResult) { |
| | | TComplaint tComplaint = tComplaintService.selectById(id); |
| | | if(SinataUtil.isNotEmpty(tComplaint)){ |
| | | if(SinataUtil.isNotEmpty(tComplaint)) { |
| | | tComplaint.setHandleResult(handleResult); |
| | | tComplaint.setHandleUserId(ShiroExtUtil.getUser().getId()); |
| | | tComplaint.setHandleUserId(shiroExtUtil.getUser().getId()); |
| | | tComplaint.setIsHandle(1); |
| | | tComplaint.setHandleTime(new Date()); |
| | | tComplaintService.updateById(tComplaint); |
| | | |
| | | |
| | | //增加系统消息 |
| | | TSystemNotice notice = new TSystemNotice(); |
| | | notice.setType(2); |
| | | notice.setUserType(1); |
| | | notice.setContent("投诉处理结果:【"+handleResult+"】。"); |
| | | notice.setContent("投诉处理结果:【" + handleResult + "】。"); |
| | | notice.setUserId(tComplaint.getUserId()); |
| | | notice.setInsertTime(new Date()); |
| | | notice.setRead(1); |
| | |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.EmployeeUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.UserUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转投诉页面 |
| | | * |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tComplaintService.getComplaintList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverPhone, isHandle, driverId)); |
| | | page.setRecords(tComplaintService.getComplaintList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverPhone, isHandle, driverId)); |
| | | return super.packForBT(page); |
| | | } |
| | | /** |
| | |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList", companyList); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType", roleType); |
| | | if (2 == roleType) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>() |
| | | .eq("type", 3) |
| | | .eq("superiorId", ShiroExtUtil.getUser().getObjectId()) |
| | | .eq("superiorId", shiroExtUtil.getUser().getObjectId()) |
| | | .notIn("state", 1) |
| | | .notIn("flag", 3)); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | |
| | | model.addAttribute("franchiseeList", null); |
| | | } |
| | | //查询当前用户所属分公司/加盟商 |
| | | model.addAttribute("objectName", tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()).getName()); |
| | | model.addAttribute("objectName", tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()).getName()); |
| | | |
| | | //查询线路列表 |
| | | List<TLine> lineList = itLineService.selectList(new EntityWrapper<TLine>().eq("state", 1)); |
| | |
| | | model.addAttribute("item", tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType", roleType); |
| | | model.addAttribute("objectName", tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()).getName()); |
| | | model.addAttribute("objectName", tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).ne("flag", 3)); |
| | |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", tDriver.getCompanyId())); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } else if (2 == roleType) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", ShiroExtUtil.getUser().getObjectId())); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } |
| | | |
| | |
| | | Integer authState) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tDriverService.getAuthDriverList(page, beginTime, endTime, companyName, phone, account, addType, authState)); |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getDriverList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, companyName, phone, name, addType, authState)); |
| | | page.setRecords(tDriverService.getDriverList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, companyName, phone, name, addType, authState)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | }*/ |
| | | //2020-08-21:新需求,已被绑定的车辆可以被继续绑定 |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getCanSelectCarList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), null, carLicensePlate, brandName, modelName, color, serverStr)); |
| | | page.setRecords(tDriverService.getCanSelectCarList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), null, carLicensePlate, brandName, modelName, color, serverStr)); |
| | | return super.packForBT(page); |
| | | |
| | | } |
| | |
| | | System.out.println("司机注册审核发送短信 :【driverId=" + tDriver.getId().toString() + "】,调用接口:" + result); |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == tDriver.getAuthState()) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | User user1 = userService.selectById(user.getId()); |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | empId = saveStaffNode.getEmpId(); |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | TCompany tCompany1 = itCompanyService.selectById(tDriver.getCompanyId()); |
| | | tDriver.setEmpId(saveStaffNode.getEmpId()); |
| | | tDriver.setEmpId(empId); |
| | | tDriver.setEntercode(tCompany1.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | } |
| | |
| | | tDriver.setIsPlatCar(1); |
| | | tDriver.setAuthState(2); |
| | | }else if (2 == roleType) { //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)) { |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | |
| | | tDriver.setAddType(3); |
| | | tDriver.setIsPlatCar(2); |
| | | tDriver.setAuthState(1); |
| | | tDriver.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | tDriver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | }else if (3 == roleType) { //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | TCompany tCompany = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)) { |
| | | tDriver.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setFranchiseeId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setFranchiseeId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | tDriver.setAddType(4); |
| | | tDriver.setIsPlatCar(2); |
| | | tDriver.setAuthState(1); |
| | | tDriver.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | tDriver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | tDriver.setInsertTime(new Date()); |
| | | tDriver.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | tDriver.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == tDriver.getAuthState()) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | User user1 = userService.selectById(user.getId()); |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | empId = saveStaffNode.getEmpId(); |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | |
| | | TCompany tCompany1 = itCompanyService.selectById(tDriver.getCompanyId()); |
| | | tDriver.setEmpId(saveStaffNode.getEmpId()); |
| | | tDriver.setEmpId(empId); |
| | | tDriver.setEntercode(tCompany1.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | } |
| | |
| | | public Object delete(@RequestParam Integer tDriverId) { |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | driver.setFlag("3"); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | User user1 = userService.selectById(user.getId()); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TCompany tCompany = itCompanyService.selectById(user.getObjectId()); |
| | | //中台先删除司机 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(driver.getEmpId()); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); |
| | | if (null != staffNode && "1".equals(staffNode.getIsValid())) { |
| | | DeleteStafNodeRequest deleteStafNodeRequest = new DeleteStafNodeRequest(); |
| | | deleteStafNodeRequest.setEmpId(driver.getEmpId()); |
| | | deleteStafNodeRequest.setEntercode(tCompany.getEnterCode()); |
| | | deleteStafNodeRequest.setMobile(user1.getPhone()); |
| | | EmployeeUtil.ecrmDeleteStafNode(deleteStafNodeRequest); |
| | | if (null != driver.getEmpId()) { |
| | | //中台先删除司机 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(driver.getEmpId()); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); |
| | | if (null != staffNode && "1".equals(staffNode.getIsValid())) { |
| | | DeleteStafNodeRequest deleteStafNodeRequest = new DeleteStafNodeRequest(); |
| | | deleteStafNodeRequest.setEmpId(driver.getEmpId()); |
| | | deleteStafNodeRequest.setEntercode(tCompany.getEnterCode()); |
| | | deleteStafNodeRequest.setMobile(tCompany.getPrincipalPhone()); |
| | | EmployeeUtil.ecrmDeleteStafNode(deleteStafNodeRequest); |
| | | } |
| | | } |
| | | tDriverService.updateById(driver); |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER_" + driver.getPhone()); |
| | | redisTemplate.delete(value); |
| | | if (ToolUtil.isNotEmpty(value)) { |
| | | redisTemplate.delete(value); |
| | | } |
| | | redisTemplate.delete("DRIVER_" + driver.getId()); |
| | | redisTemplate.delete("DRIVER_" + driver.getPhone()); |
| | | return SUCCESS_TIP; |
| | |
| | | }).start(); |
| | | |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER_" + tDriver.getPhone()); |
| | | redisTemplate.delete(value); |
| | | if (ToolUtil.isNotEmpty(value)) { |
| | | redisTemplate.delete(value); |
| | | } |
| | | redisTemplate.delete("DRIVER_" + tDriver.getId()); |
| | | redisTemplate.delete("DRIVER_" + tDriver.getPhone()); |
| | | } |
| | | tDriver.setRemark(remark); |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == tDriver.getAuthState()) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | if (2 == tDriver.getAuthState() && tDriver.getEmpId() == null) { |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | User user1 = userService.selectById(user.getId()); |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | empId = saveStaffNode.getEmpId(); |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | |
| | | TCompany tCompany1 = itCompanyService.selectById(tDriver.getCompanyId()); |
| | | tDriver.setEmpId(saveStaffNode.getEmpId()); |
| | | tDriver.setEmpId(empId); |
| | | tDriver.setEntercode(tCompany1.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | } |
| | |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (2 == roleType) { //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)) { |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (3 == roleType) { //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | } else if (3 == roleType) { //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)) { |
| | | tDriver.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setFranchiseeId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(shiroExtUtil.getUser().getObjectId())) { |
| | | tDriver.setFranchiseeId(shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | } |
| | | tDriver.setUpdateTime(new Date()); |
| | | tDriver.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tDriver.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | if(ToolUtil.isEmpty(tDriver.getPassword())){ |
| | | if (ToolUtil.isEmpty(tDriver.getPassword())) { |
| | | tDriver.setPassword(obj.getPassword()); |
| | | }else{ |
| | | } else { |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | } |
| | | obj.setCompanyId(tDriver.getCompanyId()); |
| | |
| | | obj.setEmergencyContactPhone(tDriver.getEmergencyContactPhone()); |
| | | obj.setEmergencyContactAddress(tDriver.getEmergencyContactAddress()); |
| | | obj.setUpdateTime(new Date()); |
| | | obj.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | obj.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tDriverService.updateAllColumnById(obj); |
| | | |
| | | |
| | | //删除业务 |
| | | tDriverServiceService.delete(new EntityWrapper<TDriverService>().eq("driverId",tDriver.getId())); |
| | | |
| | | tDriverServiceService.delete(new EntityWrapper<TDriverService>().eq("driverId", tDriver.getId())); |
| | | |
| | | //删除线路 |
| | | tDriverLineService.delete(new EntityWrapper<TDriverLine>().eq("driverId",tDriver.getId())); |
| | | |
| | | tDriverLineService.delete(new EntityWrapper<TDriverLine>().eq("driverId", tDriver.getId())); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | for (int i = 0; i < serverArray.length; i++) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(tDriver.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | |
| | | public void uploadDriverModel(HttpServletRequest request, HttpServletResponse response) { |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<List<String>>(); |
| | | |
| | | |
| | | String title = ""; |
| | | |
| | | |
| | | // 首行【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | title = "平台导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } else if (ShiroExtUtil.getUser().getRoleType() == 2) { |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 2) { |
| | | title = "分公司导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } else if (ShiroExtUtil.getUser().getRoleType() == 3) { |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 3) { |
| | | title = "加盟商导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | try { |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | |
| | | if (SinataUtil.isNotEmpty(cell0)) { |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | |
| | | Cell cell1 = row.getCell(1); //所属机构[平台司机/加盟司机] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | if (SinataUtil.isNotEmpty(cell1)) { |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | |
| | | Cell cell2 = row.getCell(2); //所属分公司[提示:加盟司机选填] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | if (SinataUtil.isNotEmpty(cell2)) { |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | |
| | | driver.setDriverAge(Integer.valueOf(six)); |
| | | driver.setDriveCard(five); |
| | | driver.setTaxiAptitudeCard(nine); |
| | | if ("平台司机".equals(one)){ |
| | | if ("平台司机".equals(one)) { |
| | | driver.setIsPlatCar(1); |
| | | }else if ("加盟司机".equals(one)){ |
| | | } else if ("加盟司机".equals(one)) { |
| | | driver.setIsPlatCar(2); |
| | | } |
| | | driver.setCompanyId(companyId); |
| | |
| | | driver.setState(2); |
| | | driver.setAuthState(2); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | driver.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(2); |
| | | driver.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | driver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(eight)) { |
| | | driver.setDriverAddress(eight); |
| | | } |
| | | |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == driver.getAuthState()) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | User user1 = userService.selectById(user.getId()); |
| | | SaveStaffNodeRequest saveStaffNodeRequest = new SaveStaffNodeRequest(); |
| | | saveStaffNodeRequest.setMobile(user1.getPhone()); |
| | | saveStaffNodeRequest.setEntercode(tCompany.getEnterCode()); |
| | | saveStaffNodeRequest.setEmpName(driver.getName()); |
| | | saveStaffNodeRequest.setEmpNickname(driver.getName()); |
| | | saveStaffNodeRequest.setLoginNo(driver.getPhone()); |
| | | saveStaffNodeRequest.setEmpSex(driver.getSex() == 1 ? "男" : "女"); |
| | | saveStaffNodeRequest.setMphone(driver.getPhone()); |
| | | saveStaffNodeRequest.setEmail(driver.getPhone() + "@qyt.com"); |
| | | saveStaffNodeRequest.setDeptId(0); |
| | | saveStaffNodeRequest.setPositionId(1); |
| | | saveStaffNodeRequest.setSuperLevel(0); |
| | | saveStaffNodeRequest.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(saveStaffNodeRequest); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(driver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest saveStaffNodeRequest = new SaveStaffNodeRequest(); |
| | | saveStaffNodeRequest.setMobile(tCompany.getPrincipalPhone()); |
| | | saveStaffNodeRequest.setEntercode(tCompany.getEnterCode()); |
| | | saveStaffNodeRequest.setEmpName(driver.getName()); |
| | | saveStaffNodeRequest.setEmpNickname(driver.getName()); |
| | | saveStaffNodeRequest.setLoginNo(driver.getPhone()); |
| | | saveStaffNodeRequest.setEmpSex(driver.getSex() == 1 ? "男" : "女"); |
| | | saveStaffNodeRequest.setMphone(driver.getPhone()); |
| | | saveStaffNodeRequest.setEmail(driver.getPhone() + "@qyt.com"); |
| | | saveStaffNodeRequest.setDeptId(0); |
| | | saveStaffNodeRequest.setPositionId(1); |
| | | saveStaffNodeRequest.setSuperLevel(0); |
| | | saveStaffNodeRequest.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(saveStaffNodeRequest); |
| | | empId = saveStaffNode.getEmpId(); |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | |
| | | TCompany tCompany1 = itCompanyService.selectById(driver.getCompanyId()); |
| | | driver.setEmpId(saveStaffNode.getEmpId()); |
| | | driver.setEmpId(empId); |
| | | driver.setEntercode(tCompany1.getEnterCode()); |
| | | driver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | } |
| | |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(fifteen)){ |
| | | if ("是".equals(fifteen)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | |
| | | } |
| | | } |
| | | } |
| | | } else if (ShiroExtUtil.getUser().getRoleType() == 2) { |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 2) { |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | |
| | | if (SinataUtil.isNotEmpty(cell0)) { |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | |
| | | Cell cell1 = row.getCell(1); //所属加盟商[选填] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | if (SinataUtil.isNotEmpty(cell1)) { |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | |
| | | Cell cell2 = row.getCell(2); //性别[男/女] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | if (SinataUtil.isNotEmpty(cell2)) { |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(fifteen)){ |
| | | if (!isPhone(fifteen)) { |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(sixteen)){ |
| | | if (!isPassword(sixteen)) { |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | Integer franchiseeId = 0; |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId",companyId).eq("name", one).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | if (SinataUtil.isNotEmpty(one)) { |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId", companyId).eq("name", one).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)) { |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | } |
| | | |
| | | |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(fifteen); |
| | | driver.setJobNumber(eight); |
| | |
| | | driver.setState(1); |
| | | driver.setAuthState(1); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | driver.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(3); |
| | | driver.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(six)){ |
| | | driver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(six)) { |
| | | driver.setDriverAddress(six); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | |
| | | //添加快车服务模式 |
| | | if ("是".equals(nine)){ |
| | | if ("是".equals(nine)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | if ("是".equals(thirteen)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | |
| | | |
| | | } |
| | | } |
| | | } else if (ShiroExtUtil.getUser().getRoleType() == 3) { |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 3) { |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | |
| | | if (SinataUtil.isNotEmpty(cell0)) { |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | |
| | | Cell cell2 = row.getCell(1); //性别[男/女] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | if (SinataUtil.isNotEmpty(cell2)) { |
| | | one = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | |
| | | Cell cell3 = row.getCell(2); //驾驶证号码 |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | if (SinataUtil.isNotEmpty(cell3)) { |
| | | two = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(fourteen)){ |
| | | if (!isPhone(fourteen)) { |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(fifteen)){ |
| | | if (!isPassword(fifteen)) { |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = 0; |
| | | Integer franchiseeId = 0; |
| | | TCompany franchisee = itCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | TCompany franchisee = itCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(franchisee)) { |
| | | companyId = franchisee.getSuperiorId(); |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | if (companyId == 0 && franchiseeId == 0){ |
| | | if (companyId == 0 && franchiseeId == 0) { |
| | | return new ErrorTip(500, "当前登录账户上级分公司不能为空"); |
| | | } |
| | | |
| | | |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(fourteen); |
| | | driver.setJobNumber(seven); |
| | |
| | | driver.setState(1); |
| | | driver.setAuthState(1); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | driver.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(4); |
| | | driver.setAddObjectId(ShiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(five)){ |
| | | driver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(five)) { |
| | | driver.setDriverAddress(five); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | |
| | | //添加快车服务模式 |
| | | if ("是".equals(eight)){ |
| | | if ("是".equals(eight)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | |
| | | */ |
| | | @RequestMapping(value = "/outDriver") |
| | | public void outDriver(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String, Object>> listMap = tDriverService.getDriverListNoPage(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> listMap = tDriverService.getDriverListNoPage(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.controller.util.Base64Util; |
| | | import com.stylefeng.guns.modular.system.model.TBank; |
| | |
| | | @Controller |
| | | @RequestMapping("/tEnterpriseWithdrawal") |
| | | public class TEnterpriseWithdrawalController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tEnterpriseWithdrawal/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITEnterpriseWithdrawalService tEnterpriseWithdrawalService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITBankService bankService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITBankNextService bankNextService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | TEnterpriseWithdrawal companyId = tEnterpriseWithdrawalService.selectOne(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TEnterpriseWithdrawal companyId = tEnterpriseWithdrawalService.selectOne(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (companyId != null) { |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | model.addAttribute("item", companyId); |
| | |
| | | @Transactional(readOnly = false,propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
| | | public Object add(TEnterpriseWithdrawal tEnterpriseWithdrawal,Integer accountType,String code,String businessExpireTimeOne,String unifiedSocialCreditCodeExpireTimeOne,String certificateExpireTimeOne) { |
| | | tEnterpriseWithdrawal.setCode(code); |
| | | List<TEnterpriseWithdrawal> companyId = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | List<TEnterpriseWithdrawal> companyId = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if(companyId.size()>0){ |
| | | return "5001"; |
| | | } |
| | |
| | | tEnterpriseWithdrawal.setBusinessExpireTime(tEnterpriseWithdrawal.getBusinessExpireTime()+",长期"); |
| | | } |
| | | if(ToolUtil.isNotEmpty(unifiedSocialCreditCodeExpireTimeOne)){ |
| | | tEnterpriseWithdrawal.setUnifiedSocialCreditCodeExpireTime(tEnterpriseWithdrawal.getUnifiedSocialCreditCodeExpireTime()+","+unifiedSocialCreditCodeExpireTimeOne); |
| | | }else { |
| | | tEnterpriseWithdrawal.setUnifiedSocialCreditCodeExpireTime(tEnterpriseWithdrawal.getUnifiedSocialCreditCodeExpireTime()+",长期"); |
| | | |
| | | tEnterpriseWithdrawal.setUnifiedSocialCreditCodeExpireTime(tEnterpriseWithdrawal.getUnifiedSocialCreditCodeExpireTime() + "," + unifiedSocialCreditCodeExpireTimeOne); |
| | | } else { |
| | | tEnterpriseWithdrawal.setUnifiedSocialCreditCodeExpireTime(tEnterpriseWithdrawal.getUnifiedSocialCreditCodeExpireTime() + ",长期"); |
| | | |
| | | } |
| | | if(ToolUtil.isNotEmpty(certificateExpireTimeOne)){ |
| | | tEnterpriseWithdrawal.setCertificateExpireTime(tEnterpriseWithdrawal.getCertificateExpireTime()+","+certificateExpireTimeOne); |
| | | }else { |
| | | tEnterpriseWithdrawal.setCertificateExpireTime(tEnterpriseWithdrawal.getCertificateExpireTime()+",长期"); |
| | | if (ToolUtil.isNotEmpty(certificateExpireTimeOne)) { |
| | | tEnterpriseWithdrawal.setCertificateExpireTime(tEnterpriseWithdrawal.getCertificateExpireTime() + "," + certificateExpireTimeOne); |
| | | } else { |
| | | tEnterpriseWithdrawal.setCertificateExpireTime(tEnterpriseWithdrawal.getCertificateExpireTime() + ",长期"); |
| | | } |
| | | |
| | | tEnterpriseWithdrawal.setIsAudit(1); |
| | | tEnterpriseWithdrawal.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tEnterpriseWithdrawal.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tEnterpriseWithdrawal.setAccountType(accountType); |
| | | String randomString = ToolUtil.getRandomString(32); |
| | | tEnterpriseWithdrawal.setOutRequestNo(randomString); |
| | | if(tEnterpriseWithdrawal.getEnterpriseType()==1){ |
| | | if (tEnterpriseWithdrawal.getEnterpriseType() == 1) { |
| | | tEnterpriseWithdrawal.setAccountType(2); |
| | | } |
| | | try { |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tFeedback") |
| | | public class TFeedbackController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tFeedback/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITFeedbackService tFeedbackService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到司机反馈管理首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tFeedback.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到用户反馈管理首页 |
| | | */ |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tFeedbackService.getFeedbackList(page, beginTime, endTime, 2, driverName, driverPhone, state)); |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tFeedbackService.getFeedbackList(page, beginTime, endTime, 1, userName, userPhone, state)); |
| | |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer id,@RequestParam String remark) { |
| | | TFeedback tFeedback = tFeedbackService.selectById(id); |
| | | if (SinataUtil.isNotEmpty(tFeedback)){ |
| | | if (SinataUtil.isNotEmpty(tFeedback)) { |
| | | tFeedback.setCldate(new Date()); |
| | | tFeedback.setRemark(remark); |
| | | tFeedback.setHandleUserId(ShiroExtUtil.getUser().getId()); |
| | | tFeedback.setHandleUserId(shiroExtUtil.getUser().getId()); |
| | | tFeedback.setState(2); |
| | | tFeedbackService.updateById(tFeedback); |
| | | |
| | | |
| | | //增加系统消息 |
| | | TSystemNotice notice = new TSystemNotice(); |
| | | notice.setType(2); |
| | | notice.setUserType(tFeedback.getType()); |
| | | notice.setContent("反馈处理结果:【"+remark+"】。"); |
| | | notice.setContent("反馈处理结果:【" + remark + "】。"); |
| | | notice.setUserId(tFeedback.getUserId()); |
| | | notice.setInsertTime(new Date()); |
| | | notice.setRead(1); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TInvoice; |
| | | import com.stylefeng.guns.modular.system.service.ITInvoiceService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/tInvoice") |
| | | public class TInvoiceController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tInvoice/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITInvoiceService tInvoiceService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到开发票列表首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tInvoice.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tInvoiceService.getInvoiceList(page, beginTime, endTime, email, name, type, state)); |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | @Controller |
| | | @RequestMapping("/tNotices") |
| | | public class TNoticesController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tNotices/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITNoticesService tNoticesService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到滚动消息设置首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tNotices.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到系统公告设置首页 |
| | | */ |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tNoticesService.getRollingNoticeList(page, beginTime, endTime, 1, content)); |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tNoticesService.getRollingNoticeList(page, beginTime, endTime, 2, content)); |
| | |
| | | public Object add(TNotices tNotices) { |
| | | tNotices.setIsDelete(1); |
| | | tNotices.setInsertTime(new Date()); |
| | | tNotices.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | tNotices.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tNotices.setType(1); |
| | | tNoticesService.insert(tNotices); |
| | | return SUCCESS_TIP; |
| | |
| | | public Object addSystem(TNotices tNotices) { |
| | | tNotices.setIsDelete(1); |
| | | tNotices.setInsertTime(new Date()); |
| | | tNotices.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | tNotices.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tNotices.setType(2); |
| | | tNoticesService.insert(tNotices); |
| | | |
| | |
| | | } |
| | | tNotices.setIsShow(1); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNotices.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tNotices.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tNoticesService.updateById(tNotices); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | tNotices.setIsDelete(2); |
| | | tNotices.setFlag("3"); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNotices.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tNotices.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tNoticesService.updateById(tNotices); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TNotices tNotices) { |
| | | tNotices.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tNotices.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNoticesService.updateById(tNotices); |
| | | return SUCCESS_TIP; |
| | |
| | | @RequestMapping(value = "/updateSystem") |
| | | @ResponseBody |
| | | public Object updateSystem(TNotices tNotices) { |
| | | tNotices.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tNotices.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNoticesService.updateById(tNotices); |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TOpenCity; |
| | | import com.stylefeng.guns.modular.system.model.TOpenCityBusiness; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITOpenCityBusinessService; |
| | | import com.stylefeng.guns.modular.system.service.ITOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.stylefeng.guns.modular.system.util.GaoDeMapUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOpenCity; |
| | | import com.stylefeng.guns.modular.system.service.ITOpenCityService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | @Controller |
| | | @RequestMapping("/tOpenCity") |
| | | public class TOpenCityController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tOpenCity/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOpenCityService tOpenCityService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOpenCityBusinessService tOpenCityBusinessService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到城市管理首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tOpenCity.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加城市管理 |
| | | */ |
| | |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getCityName())){ |
| | | address+=tOpenCity.getCityName(); |
| | | } |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getProvinceName())){ |
| | | address+=tOpenCity.getProvinceName(); |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getProvinceName())) { |
| | | address += tOpenCity.getProvinceName(); |
| | | } |
| | | JSONObject positionObj = GaoDeMapUtil.getLngAndLat(address); |
| | | String longitude = positionObj.getString("longitude"); |
| | |
| | | tOpenCity.setLon(Double.valueOf(longitude)); |
| | | tOpenCity.setLat(Double.valueOf(latitude)); |
| | | tOpenCity.setInsertTime(new Date()); |
| | | tOpenCity.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | tOpenCity.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tOpenCityService.insert(tOpenCity); |
| | | |
| | | |
| | | //添加经营业务 |
| | | testJSONStrToJSONArray(businessTypeStr,tOpenCity.getId()); |
| | | testJSONStrToJSONArray(businessTypeStr, tOpenCity.getId()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | for (int i = 0; i < size; i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TOpenCityBusiness business = new TOpenCityBusiness(); |
| | | if (SinataUtil.isNotEmpty(jsonObject.getInteger("busId")) && jsonObject.getInteger("busId") != 0){ |
| | | if (SinataUtil.isNotEmpty(jsonObject.getInteger("busId")) && jsonObject.getInteger("busId") != 0) { |
| | | business = tOpenCityBusinessService.selectById(jsonObject.getInteger("busId")); |
| | | business.setUpdateTime(new Date()); |
| | | business.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | business.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | business.setFlag("2"); |
| | | }else{ |
| | | }else { |
| | | business.setInsertTime(DateUtil.parse(jsonObject.getString("time") + " 00:00:00", "yyyy-MM-dd HH:mm:ss")); |
| | | business.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | business.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | } |
| | | business.setOpenCityId(tOpenCityId); |
| | | String type = jsonObject.getString("type"); |
| | |
| | | //获取经纬度 |
| | | String address = tOpenCity.getAreaName(); |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getCityName())){ |
| | | address+=tOpenCity.getCityName(); |
| | | address += tOpenCity.getCityName(); |
| | | } |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getProvinceName())){ |
| | | address+=tOpenCity.getProvinceName(); |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getProvinceName())) { |
| | | address += tOpenCity.getProvinceName(); |
| | | } |
| | | JSONObject positionObj = GaoDeMapUtil.getLngAndLat(address); |
| | | String longitude = positionObj.getString("longitude"); |
| | |
| | | tOpenCity.setLon(Double.valueOf(longitude)); |
| | | tOpenCity.setLat(Double.valueOf(latitude)); |
| | | tOpenCity.setUpdateTime(new Date()); |
| | | tOpenCity.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tOpenCity.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tOpenCityService.updateById(tOpenCity); |
| | | |
| | | |
| | | //删除经营业务 |
| | | TOpenCityBusiness business = new TOpenCityBusiness(); |
| | | business.setFlag("3"); |
| | | tOpenCityBusinessService.update(business,new EntityWrapper<TOpenCityBusiness>().eq("openCityId",tOpenCity.getId())); |
| | | tOpenCityBusinessService.update(business, new EntityWrapper<TOpenCityBusiness>().eq("openCityId", tOpenCity.getId())); |
| | | //添加经营业务 |
| | | testJSONStrToJSONArray(businessTypeStr,tOpenCity.getId()); |
| | | testJSONStrToJSONArray(businessTypeStr, tOpenCity.getId()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TOrderEvaluate; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderEvaluateService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/tOrderEvaluate") |
| | | public class TOrderEvaluateController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tOrderEvaluate/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderEvaluateService tOrderEvaluateService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到评价列表首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tOrderEvaluate.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderEvaluateService.getOrderEvaluateList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverName, driverPhone, fraction, orderType)); |
| | | page.setRecords(tOrderEvaluateService.getOrderEvaluateList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverName, driverPhone, fraction, orderType)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TFeedback; |
| | | import com.stylefeng.guns.modular.system.model.TProblem; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.service.ITProblemService; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TProblem; |
| | | import com.stylefeng.guns.modular.system.service.ITProblemService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tProblem") |
| | | public class TProblemController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tProblem/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITProblemService tProblemService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService itSystemNoticeService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户留言管理首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tProblem.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tProblemService.getProblemList(page, beginTime, endTime, userName, state)); |
| | |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer tProblemId,@RequestParam String answer) { |
| | | TProblem tProblem = tProblemService.selectById(tProblemId); |
| | | if (SinataUtil.isNotEmpty(tProblem)){ |
| | | if (SinataUtil.isNotEmpty(tProblem)) { |
| | | tProblem.setAnswer(answer); |
| | | tProblem.setHandleTime(new Date()); |
| | | tProblem.setHandleUserId(ShiroExtUtil.getUser().getId()); |
| | | tProblem.setHandleUserId(shiroExtUtil.getUser().getId()); |
| | | tProblem.setState(2); |
| | | tProblemService.updateById(tProblem); |
| | | |
| | | |
| | | //增加系统消息 |
| | | TSystemNotice notice = new TSystemNotice(); |
| | | notice.setType(2); |
| | | notice.setUserType(1); |
| | | notice.setContent("您的留言被回复啦:【"+answer+"】"); |
| | | notice.setContent("您的留言被回复啦:【" + answer + "】"); |
| | | notice.setUserId(tProblem.getUserId()); |
| | | notice.setInsertTime(new Date()); |
| | | notice.setRead(1); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | @Slf4j |
| | | @RequestMapping("/tPubWithdrawal") |
| | | public class TPubWithdrawalController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tPubWithdrawal/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITPubWithdrawalService tPubWithdrawalService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | @Resource |
| | | private IUserWithdrawalService userWithdrawalService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到提现列表首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("id", ShiroExtUtil.getUser().getObjectId()); |
| | | model.addAttribute("id", shiroExtUtil.getUser().getObjectId()); |
| | | return PREFIX + "tPubWithdrawal.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | tPubWithdrawal.setHandleTime(new Date()); |
| | | if (SinataUtil.isNotEmpty(tPubWithdrawal)){ |
| | | // tPubWithdrawal.setState(state); //调用接口修改状态 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | Integer stateObj = 1; |
| | | if (2 == state){ //同意提现 |
| | | if (2 == state) { //同意提现 |
| | | stateObj = 1; |
| | | }else if (3 == state){ //拒绝提现 |
| | | } else if (3 == state) { //拒绝提现 |
| | | stateObj = 2; |
| | | } |
| | | |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | // 获取手续费 |
| | | Double poundage = tPubWithdrawalService.getPoundage(objectId); |
| | | if(poundage!=null && poundage>0){ |
| | | if (poundage != null && poundage > 0) { |
| | | BigDecimal money = tPubWithdrawal.getMoney(); |
| | | if(money.doubleValue()>=1){ |
| | | if (money.doubleValue() >= 1) { |
| | | BigDecimal divide = new BigDecimal(poundage).divide(new BigDecimal(100)); |
| | | tPubWithdrawal.setMoney(money.subtract(money.multiply(divide))); |
| | | } |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSmsrecord; |
| | | import com.stylefeng.guns.modular.system.service.ITSmsrecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/tSmsrecord") |
| | | public class TSmsrecordController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tSmsrecord/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSmsrecordService tSmsrecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到短信记录首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tSmsrecord.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tSmsrecordService.getSmsCodeList(page, beginTime, endTime, phone)); |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | |
| | | @Autowired |
| | | private ITElectricRecordService recordService; |
| | | |
| | | @Autowired |
| | | ITSystemPriceService priceService; |
| | | @Autowired |
| | | private ITServerCarmodelService serverCarmodelService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping ("/check-change/{id}") |
| | | @ResponseBody |
| | | public ResultUtil Change(@PathVariable Integer id,String priceType,String isCheck ) { |
| | |
| | | } |
| | | } |
| | | } |
| | | String join = String.join(",", split); |
| | | carModel.setIsCheck(join); |
| | | serverCarmodelService.updateById(carModel); |
| | | System.err.println("================="+id+"===="+priceType); |
| | | return new ResultUtil(null,0,"保存成功"); |
| | | String join = String.join(",", split); |
| | | carModel.setIsCheck(join); |
| | | serverCarmodelService.updateById(carModel); |
| | | System.err.println("=================" + id + "====" + priceType); |
| | | return new ResultUtil(null, 0, "保存成功"); |
| | | } |
| | | @Autowired |
| | | private ITServerCarmodelService serverCarmodelService; |
| | | @Autowired ITSystemPriceService priceService; |
| | | @RequestMapping("/checklist") |
| | | @ResponseBody |
| | | public Object checklist(Model model) { |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | |
| | | @RequestMapping("/checklist") |
| | | @ResponseBody |
| | | public Object checklist(Model model) { |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | // List<TSystemPrice> tSystemPrices = priceService.selectList(new EntityWrapper<TSystemPrice>().eq("companyId", id).eq("type", 1).eq("state", 1)); |
| | | // List<Integer> ids = new ArrayList<>(); |
| | | // for (TSystemPrice tSystemPrice : tSystemPrices) { |
| | | // ids.add(tSystemPrice.getServerCarModelId()); |
| | | // } |
| | | |
| | | |
| | | List<TServerCarmodel> tCarModels = serverCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("state",1).eq("type",1)); |
| | | |
| | | |
| | | List<TServerCarmodel> tCarModels = serverCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("state",1).eq("type",1)); |
| | | TServerCarmodel type = serverCarmodelService.selectOne(new EntityWrapper<TServerCarmodel>().eq("type", 4)); |
| | | List<TServerCarmodel> returnList = new ArrayList<>(); |
| | | for (TServerCarmodel tCarModel : tCarModels) { |
| | |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | //改派设置 |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("reformist",reformist); |
| | | //积分设置 |
| | | TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("integral",integral); |
| | | //人脸识别 |
| | | TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("faceDistinguish",faceDistinguish); |
| | | |
| | | //快车推单(第一轮) |
| | | TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); |
| | | TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); |
| | | model.addAttribute("zcOne",zcOne); |
| | | //快车推单(第二轮) |
| | | TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); |
| | | TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); |
| | | model.addAttribute("zcTwo",zcTwo); |
| | | //快车推单(第三轮) |
| | | TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); |
| | | TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); |
| | | model.addAttribute("zcThree",zcThree); |
| | | |
| | | //出租车推单(第一轮) |
| | | TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); |
| | | TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); |
| | | model.addAttribute("czcOne",czcOne); |
| | | //出租车推单(第二轮) |
| | | TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); |
| | | TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); |
| | | model.addAttribute("czcTwo",czcTwo); |
| | | //出租车推单(第三轮) |
| | | TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); |
| | | TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); |
| | | model.addAttribute("czcThree",czcThree); |
| | | |
| | | //普通取消设置(快车) |
| | | TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | model.addAttribute("ptCancel1",ptCancel1); |
| | | //普通取消设置(出租车) |
| | | TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | model.addAttribute("ptCancel2",ptCancel2); |
| | | //普通取消设置(跨城出行) |
| | | TSysCancleOrder ptCancel3 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | | TSysCancleOrder ptCancel3 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | | model.addAttribute("ptCancel3",ptCancel3); |
| | | |
| | | //预约取消设置(快车) |
| | | TSysCancleOrder yyCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); |
| | | TSysCancleOrder yyCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); |
| | | model.addAttribute("yyCancel1",yyCancel1); |
| | | //预约取消设置(出租车) |
| | | TSysCancleOrder yyCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); |
| | | TSysCancleOrder yyCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); |
| | | model.addAttribute("yyCancel2",yyCancel2); |
| | | |
| | | //拼车设置 |
| | | SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("spellOrderRule", null == spellOrderRule ? "" : JSONObject.parseObject(spellOrderRule.getContent())); |
| | | |
| | | //报警电话 |
| | | TPhone phone1 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1)); |
| | | TPhone phone1 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1)); |
| | | model.addAttribute("phone1",phone1); |
| | | //客服电话 |
| | | TPhone phone2 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2)); |
| | | TPhone phone2 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2)); |
| | | model.addAttribute("phone2",phone2); |
| | | //客服电话 |
| | | TPhone phone3 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 3)); |
| | | TPhone phone3 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 3)); |
| | | model.addAttribute("phone3",phone3); |
| | | //95128电召电话 |
| | | TPhone phone4 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 4)); |
| | | TPhone phone4 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 4)); |
| | | model.addAttribute("phone4",phone4); |
| | | //招聘电话 |
| | | TPhone phone5 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 5)); |
| | | TPhone phone5 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 5)); |
| | | model.addAttribute("phone5",phone5); |
| | | //节假日服务费 |
| | | BigDecimal holidayFee = companyService.selectById(ShiroExtUtil.getUser().getObjectId()).getHolidayFee(); |
| | | BigDecimal holidayFee = companyService.selectById(shiroExtUtil.getUser().getObjectId()).getHolidayFee(); |
| | | model.addAttribute("holidayFee",holidayFee); |
| | | //超时扣款 |
| | | TSysTimeoutMoney tSysTimeoutMoney = timeoutMoneyService.selectOne(null); |
| | |
| | | } |
| | | } |
| | | model.addAttribute("showModulars", map); |
| | | TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", ShiroExtUtil.getUser().getObjectId())); |
| | | TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", shiroExtUtil.getUser().getObjectId())); |
| | | if(tDriverPayDays!=null){ |
| | | model.addAttribute("driverDay", tDriverPayDays.getDay()); |
| | | }else { |
| | |
| | | Integer dck1, Integer dck2,Integer driverDays) { |
| | | //改派设置 |
| | | if("reassigningSet".equals(type)){ |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(reformist)){ |
| | | reformist.setMoney(one); |
| | | reformist.setIsSpecialCar(isSpecialCar); |
| | | reformist.setIsTaxiCar(isTaxiCar); |
| | | tSysReformistService.updateById(reformist); |
| | | }else{ |
| | | reformist = new TSysReformist(); |
| | | reformist.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | reformist.setMoney(one); |
| | | reformist.setIsSpecialCar(isSpecialCar); |
| | | reformist.setIsTaxiCar(isTaxiCar); |
| | | tSysReformistService.insert(reformist); |
| | | }else { |
| | | reformist = new TSysReformist(); |
| | | reformist.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | reformist.setMoney(one); |
| | | reformist.setIsSpecialCar(isSpecialCar); |
| | | reformist.setIsTaxiCar(isTaxiCar); |
| | | tSysReformistService.insert(reformist); |
| | | } |
| | | } |
| | | if("driverPayDays".equals(type)){ |
| | | TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", ShiroExtUtil.getUser().getObjectId())); |
| | | TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", shiroExtUtil.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(tDriverPayDays)){ |
| | | tDriverPayDays.setDay(driverDays); |
| | | tDriverPayDays.setUpdateTime(new Date()); |
| | | driverPayDaysService.updateById(tDriverPayDays); |
| | | }else{ |
| | | tDriverPayDays = new TDriverPayDays(); |
| | | tDriverPayDays.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tDriverPayDays.setUpdateTime(new Date()); |
| | | tDriverPayDays.setDay(driverDays); |
| | | driverPayDaysService.insert(tDriverPayDays); |
| | | }else { |
| | | tDriverPayDays = new TDriverPayDays(); |
| | | tDriverPayDays.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tDriverPayDays.setUpdateTime(new Date()); |
| | | tDriverPayDays.setDay(driverDays); |
| | | driverPayDaysService.insert(tDriverPayDays); |
| | | } |
| | | } |
| | | |
| | | //积分设置 |
| | | if("integralSet".equals(type)){ |
| | | TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(integral)){ |
| | | integral.setIntegral(two); |
| | | tSysIntegralService.updateById(integral); |
| | | }else{ |
| | | integral = new TSysIntegral(); |
| | | integral.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | integral.setIntegral(two); |
| | | tSysIntegralService.insert(integral); |
| | | }else { |
| | | integral = new TSysIntegral(); |
| | | integral.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | integral.setIntegral(two); |
| | | tSysIntegralService.insert(integral); |
| | | } |
| | | } |
| | | |
| | | //人脸识别 |
| | | if("faceRecognitionSettings".equals(type)){ |
| | | TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(faceDistinguish)){ |
| | | faceDistinguish.setIsOpen(three); |
| | | faceDistinguish.setMinuteNum(openValue); |
| | | tSysFaceDistinguishService.updateById(faceDistinguish); |
| | | }else{ |
| | | faceDistinguish = new TSysFaceDistinguish(); |
| | | faceDistinguish.setIsOpen(three); |
| | | faceDistinguish.setMinuteNum(openValue); |
| | | faceDistinguish.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tSysFaceDistinguishService.insert(faceDistinguish); |
| | | }else { |
| | | faceDistinguish = new TSysFaceDistinguish(); |
| | | faceDistinguish.setIsOpen(three); |
| | | faceDistinguish.setMinuteNum(openValue); |
| | | faceDistinguish.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tSysFaceDistinguishService.insert(faceDistinguish); |
| | | } |
| | | } |
| | | |
| | | //推单设置 |
| | | if("pushOrderSettings".equals(type)){ |
| | | //快车推单(第一轮) |
| | | TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); |
| | | TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); |
| | | if (SinataUtil.isNotEmpty(zcOne)){ |
| | | zcOne.setPushDistance(zc1); |
| | | zcOne.setPushTime(zc2); |
| | | zcOne.setDriverProportion(zc3); |
| | | tSysPushOrderService.updateById(zcOne); |
| | | }else{ |
| | | zcOne = new TSysPushOrder(); |
| | | zcOne.setPushDistance(zc1); |
| | | zcOne.setPushTime(zc2); |
| | | zcOne.setDriverProportion(zc3); |
| | | zcOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | zcOne.setPushType(1); |
| | | zcOne.setType(1); |
| | | tSysPushOrderService.insert(zcOne); |
| | | }else { |
| | | zcOne = new TSysPushOrder(); |
| | | zcOne.setPushDistance(zc1); |
| | | zcOne.setPushTime(zc2); |
| | | zcOne.setDriverProportion(zc3); |
| | | zcOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | zcOne.setPushType(1); |
| | | zcOne.setType(1); |
| | | tSysPushOrderService.insert(zcOne); |
| | | } |
| | | //快车推单(第二轮) |
| | | TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); |
| | | TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); |
| | | if (SinataUtil.isNotEmpty(zcTwo)){ |
| | | zcTwo.setPushDistance(zc4); |
| | | zcTwo.setPushTime(zc5); |
| | | zcTwo.setDriverProportion(zc6); |
| | | tSysPushOrderService.updateById(zcTwo); |
| | | }else{ |
| | | zcTwo = new TSysPushOrder(); |
| | | zcTwo.setPushDistance(zc4); |
| | | zcTwo.setPushTime(zc5); |
| | | zcTwo.setDriverProportion(zc6); |
| | | zcTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | zcTwo.setPushType(1); |
| | | zcTwo.setType(2); |
| | | tSysPushOrderService.insert(zcTwo); |
| | | }else { |
| | | zcTwo = new TSysPushOrder(); |
| | | zcTwo.setPushDistance(zc4); |
| | | zcTwo.setPushTime(zc5); |
| | | zcTwo.setDriverProportion(zc6); |
| | | zcTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | zcTwo.setPushType(1); |
| | | zcTwo.setType(2); |
| | | tSysPushOrderService.insert(zcTwo); |
| | | } |
| | | //快车推单(第三轮) |
| | | TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); |
| | | TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); |
| | | if (SinataUtil.isNotEmpty(zcThree)){ |
| | | zcThree.setPushDistance(zc7); |
| | | zcThree.setPushTime(zc8); |
| | | zcThree.setDriverProportion(zc9); |
| | | tSysPushOrderService.updateById(zcThree); |
| | | }else{ |
| | | zcThree = new TSysPushOrder(); |
| | | zcThree.setPushDistance(zc7); |
| | | zcThree.setPushTime(zc8); |
| | | zcThree.setDriverProportion(zc9); |
| | | zcThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | zcThree.setPushType(1); |
| | | zcThree.setType(3); |
| | | tSysPushOrderService.insert(zcThree); |
| | | }else { |
| | | zcThree = new TSysPushOrder(); |
| | | zcThree.setPushDistance(zc7); |
| | | zcThree.setPushTime(zc8); |
| | | zcThree.setDriverProportion(zc9); |
| | | zcThree.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | zcThree.setPushType(1); |
| | | zcThree.setType(3); |
| | | tSysPushOrderService.insert(zcThree); |
| | | } |
| | | |
| | | //出租车推单(第一轮) |
| | | TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); |
| | | TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); |
| | | if (SinataUtil.isNotEmpty(czcOne)){ |
| | | czcOne.setPushDistance(czc1); |
| | | czcOne.setPushTime(czc2); |
| | | czcOne.setDriverProportion(czc3); |
| | | tSysPushOrderService.updateById(czcOne); |
| | | }else{ |
| | | czcOne = new TSysPushOrder(); |
| | | czcOne.setPushDistance(czc1); |
| | | czcOne.setPushTime(czc2); |
| | | czcOne.setDriverProportion(czc3); |
| | | czcOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | czcOne.setPushType(2); |
| | | czcOne.setType(1); |
| | | tSysPushOrderService.insert(czcOne); |
| | | }else { |
| | | czcOne = new TSysPushOrder(); |
| | | czcOne.setPushDistance(czc1); |
| | | czcOne.setPushTime(czc2); |
| | | czcOne.setDriverProportion(czc3); |
| | | czcOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | czcOne.setPushType(2); |
| | | czcOne.setType(1); |
| | | tSysPushOrderService.insert(czcOne); |
| | | } |
| | | //出租车推单(第二轮) |
| | | TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); |
| | | TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); |
| | | if (SinataUtil.isNotEmpty(czcTwo)){ |
| | | czcTwo.setPushDistance(czc4); |
| | | czcTwo.setPushTime(czc5); |
| | | czcTwo.setDriverProportion(czc6); |
| | | tSysPushOrderService.updateById(czcTwo); |
| | | }else{ |
| | | czcTwo = new TSysPushOrder(); |
| | | czcTwo.setPushDistance(czc4); |
| | | czcTwo.setPushTime(czc5); |
| | | czcTwo.setDriverProportion(czc6); |
| | | czcTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | czcTwo.setPushType(2); |
| | | czcTwo.setType(2); |
| | | tSysPushOrderService.insert(czcTwo); |
| | | }else { |
| | | czcTwo = new TSysPushOrder(); |
| | | czcTwo.setPushDistance(czc4); |
| | | czcTwo.setPushTime(czc5); |
| | | czcTwo.setDriverProportion(czc6); |
| | | czcTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | czcTwo.setPushType(2); |
| | | czcTwo.setType(2); |
| | | tSysPushOrderService.insert(czcTwo); |
| | | } |
| | | //出租车推单(第三轮) |
| | | TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); |
| | | TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); |
| | | if (SinataUtil.isNotEmpty(czcThree)){ |
| | | czcThree.setPushDistance(czc7); |
| | | czcThree.setPushTime(czc8); |
| | | czcThree.setDriverProportion(czc9); |
| | | tSysPushOrderService.updateById(czcThree); |
| | | }else{ |
| | | czcThree = new TSysPushOrder(); |
| | | czcThree.setPushDistance(czc7); |
| | | czcThree.setPushTime(czc8); |
| | | czcThree.setDriverProportion(czc9); |
| | | czcThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | czcThree.setPushType(2); |
| | | czcThree.setType(3); |
| | | tSysPushOrderService.insert(czcThree); |
| | | }else { |
| | | czcThree = new TSysPushOrder(); |
| | | czcThree.setPushDistance(czc7); |
| | | czcThree.setPushTime(czc8); |
| | | czcThree.setDriverProportion(czc9); |
| | | czcThree.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | czcThree.setPushType(2); |
| | | czcThree.setType(3); |
| | | tSysPushOrderService.insert(czcThree); |
| | | } |
| | | } |
| | | |
| | | //取消设置 |
| | | if("cancelOrderSettings".equals(type)){ |
| | | //普通取消设置(快车) |
| | | TSysCancleOrder ptCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | TSysCancleOrder ptCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | if (SinataUtil.isNotEmpty(ptCancelOne)){ |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | tSysCancleOrderService.updateById(ptCancelOne); |
| | | }else{ |
| | | ptCancelOne = new TSysCancleOrder(); |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | ptCancelOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | ptCancelOne.setType(1); |
| | | ptCancelOne.setOrderType(1); |
| | | tSysCancleOrderService.insert(ptCancelOne); |
| | | }else { |
| | | ptCancelOne = new TSysCancleOrder(); |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | ptCancelOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | ptCancelOne.setType(1); |
| | | ptCancelOne.setOrderType(1); |
| | | tSysCancleOrderService.insert(ptCancelOne); |
| | | } |
| | | |
| | | //普通取消设置(出租车) |
| | | TSysCancleOrder ptCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | TSysCancleOrder ptCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | if (SinataUtil.isNotEmpty(ptCancelTwo)){ |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | tSysCancleOrderService.updateById(ptCancelTwo); |
| | | }else{ |
| | | ptCancelTwo = new TSysCancleOrder(); |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | ptCancelTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | ptCancelTwo.setType(1); |
| | | ptCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(ptCancelTwo); |
| | | }else { |
| | | ptCancelTwo = new TSysCancleOrder(); |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | ptCancelTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | ptCancelTwo.setType(1); |
| | | ptCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(ptCancelTwo); |
| | | } |
| | | |
| | | //普通取消设置(跨城出行) |
| | | TSysCancleOrder ptCancelThree = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | | TSysCancleOrder ptCancelThree = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | | if (SinataUtil.isNotEmpty(ptCancelThree)){ |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | tSysCancleOrderService.updateById(ptCancelThree); |
| | | }else{ |
| | | ptCancelThree = new TSysCancleOrder(); |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | ptCancelThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | ptCancelThree.setType(1); |
| | | ptCancelThree.setOrderType(3); |
| | | tSysCancleOrderService.insert(ptCancelThree); |
| | | }else { |
| | | ptCancelThree = new TSysCancleOrder(); |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | ptCancelThree.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | ptCancelThree.setType(1); |
| | | ptCancelThree.setOrderType(3); |
| | | tSysCancleOrderService.insert(ptCancelThree); |
| | | } |
| | | } |
| | | |
| | | //预约取消设置 |
| | | if("cancelTheReservationOrderSetting".equals(type)){ |
| | | //预约取消设置(快车) |
| | | TSysCancleOrder yyCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); |
| | | TSysCancleOrder yyCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); |
| | | if (SinataUtil.isNotEmpty(yyCancelOne)){ |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | tSysCancleOrderService.updateById(yyCancelOne); |
| | | }else{ |
| | | yyCancelOne = new TSysCancleOrder(); |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | yyCancelOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | yyCancelOne.setType(2); |
| | | yyCancelOne.setOrderType(1); |
| | | tSysCancleOrderService.insert(yyCancelOne); |
| | | }else { |
| | | yyCancelOne = new TSysCancleOrder(); |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | yyCancelOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | yyCancelOne.setType(2); |
| | | yyCancelOne.setOrderType(1); |
| | | tSysCancleOrderService.insert(yyCancelOne); |
| | | } |
| | | //预约取消设置(出租车) |
| | | TSysCancleOrder yyCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); |
| | | TSysCancleOrder yyCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); |
| | | if (SinataUtil.isNotEmpty(yyCancelTwo)){ |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | tSysCancleOrderService.updateById(yyCancelTwo); |
| | | }else{ |
| | | yyCancelTwo = new TSysCancleOrder(); |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | yyCancelTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | yyCancelTwo.setType(2); |
| | | yyCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(yyCancelTwo); |
| | | }else { |
| | | yyCancelTwo = new TSysCancleOrder(); |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | yyCancelTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | yyCancelTwo.setType(2); |
| | | yyCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(yyCancelTwo); |
| | | } |
| | | } |
| | | |
| | | //拼单派单 |
| | | if("spellOrderSetting".equals(type)){ |
| | | SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("num1", pdpd1); |
| | | jsonObject.put("num2", pdpd2); |
| | | jsonObject.put("num3", pdpd3); |
| | | jsonObject.put("num4", pdpd4); |
| | | jsonObject.put("num5", pdpd5); |
| | | jsonObject.put("num6", pdpd6); |
| | | if(SinataUtil.isNotEmpty(spellOrderRule)){ |
| | | spellOrderRule.setContent(jsonObject.toJSONString()); |
| | | spellOrderRuleService.updateById(spellOrderRule); |
| | | }else{ |
| | | spellOrderRule = new SpellOrderRule(); |
| | | spellOrderRule.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | spellOrderRule.setContent(jsonObject.toJSONString()); |
| | | spellOrderRuleService.insert(spellOrderRule); |
| | | } |
| | | if("spellOrderSetting".equals(type)) { |
| | | SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("num1", pdpd1); |
| | | jsonObject.put("num2", pdpd2); |
| | | jsonObject.put("num3", pdpd3); |
| | | jsonObject.put("num4", pdpd4); |
| | | jsonObject.put("num5", pdpd5); |
| | | jsonObject.put("num6", pdpd6); |
| | | if (SinataUtil.isNotEmpty(spellOrderRule)) { |
| | | spellOrderRule.setContent(jsonObject.toJSONString()); |
| | | spellOrderRuleService.updateById(spellOrderRule); |
| | | } else { |
| | | spellOrderRule = new SpellOrderRule(); |
| | | spellOrderRule.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | spellOrderRule.setContent(jsonObject.toJSONString()); |
| | | spellOrderRuleService.insert(spellOrderRule); |
| | | } |
| | | } |
| | | |
| | | //电话设置 |
| | | if("phoneSettings".equals(type)){ |
| | | //报警电话 |
| | | TPhone phoneOne = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1)); |
| | | TPhone phoneOne = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1)); |
| | | if (SinataUtil.isNotEmpty(phoneOne)){ |
| | | phoneOne.setPhone(phone1); |
| | | tPhoneService.updateById(phoneOne); |
| | | }else{ |
| | | phoneOne = new TPhone(); |
| | | phoneOne.setPhone(phone1); |
| | | phoneOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | phoneOne.setType(1); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneOne.setPlatform(1); |
| | | } else { |
| | | phoneOne.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneOne); |
| | | }else { |
| | | phoneOne = new TPhone(); |
| | | phoneOne.setPhone(phone1); |
| | | phoneOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneOne.setType(1); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneOne.setPlatform(1); |
| | | } else { |
| | | phoneOne.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneOne); |
| | | } |
| | | //客服电话 |
| | | TPhone phoneTwo = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2)); |
| | | TPhone phoneTwo = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2)); |
| | | if (SinataUtil.isNotEmpty(phoneTwo)){ |
| | | phoneTwo.setPhone(phone2); |
| | | tPhoneService.updateById(phoneTwo); |
| | | }else{ |
| | | phoneTwo = new TPhone(); |
| | | phoneTwo.setPhone(phone2); |
| | | phoneTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | phoneTwo.setType(2); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneTwo.setPlatform(1); |
| | | } else { |
| | | phoneTwo.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneTwo); |
| | | }else { |
| | | phoneTwo = new TPhone(); |
| | | phoneTwo.setPhone(phone2); |
| | | phoneTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneTwo.setType(2); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneTwo.setPlatform(1); |
| | | } else { |
| | | phoneTwo.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneTwo); |
| | | } |
| | | |
| | | //客服电话 |
| | | TPhone phone = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 3)); |
| | | TPhone phone = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 3)); |
| | | if (SinataUtil.isNotEmpty(phone)){ |
| | | phone.setPhone(phone3); |
| | | tPhoneService.updateById(phone); |
| | | }else{ |
| | | phone = new TPhone(); |
| | | phone.setPhone(phone3); |
| | | phone.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | phone.setType(3); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | phone.setPlatform(1); |
| | | } else { |
| | | phone.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phone); |
| | | }else { |
| | | phone = new TPhone(); |
| | | phone.setPhone(phone3); |
| | | phone.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phone.setType(3); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phone.setPlatform(1); |
| | | } else { |
| | | phone.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phone); |
| | | } |
| | | |
| | | //招聘电话 |
| | | TPhone phoneFive = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 5)); |
| | | TPhone phoneFive = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 5)); |
| | | if (SinataUtil.isNotEmpty(phoneFive)){ |
| | | phoneFive.setPhone(phone5); |
| | | tPhoneService.updateById(phoneFive); |
| | | }else{ |
| | | phoneFive = new TPhone(); |
| | | phoneFive.setPhone(phone5); |
| | | phoneFive.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | phoneFive.setType(5); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneFive.setPlatform(1); |
| | | } else { |
| | | phoneFive.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneFive); |
| | | }else { |
| | | phoneFive = new TPhone(); |
| | | phoneFive.setPhone(phone5); |
| | | phoneFive.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneFive.setType(5); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneFive.setPlatform(1); |
| | | } else { |
| | | phoneFive.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneFive); |
| | | } |
| | | } |
| | | |
| | | //95128 |
| | | if("95128TheOnCall".equals(type)){ |
| | | //95128电召电话 |
| | | TPhone phoneFour = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 4)); |
| | | TPhone phoneFour = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 4)); |
| | | if (SinataUtil.isNotEmpty(phoneFour)){ |
| | | phoneFour.setPhone(phone4); |
| | | tPhoneService.updateById(phoneFour); |
| | | }else{ |
| | | phoneFour = new TPhone(); |
| | | phoneFour.setPhone(phone4); |
| | | phoneFour.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | phoneFour.setType(4); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneFour.setPlatform(1); |
| | | } else { |
| | | phoneFour.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneFour); |
| | | }else { |
| | | phoneFour = new TPhone(); |
| | | phoneFour.setPhone(phone4); |
| | | phoneFour.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneFour.setType(4); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneFour.setPlatform(1); |
| | | } else { |
| | | phoneFour.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneFour); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// 节假日服务费 |
| | | if("holidayServiceFeeSetting".equals(type)){ |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | TCompany company = companyService.selectById(companyId); |
| | | company.setHolidayFee(holidayFee); |
| | | companyService.updateById(company); |
| | | if("holidayServiceFeeSetting".equals(type)) { |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | TCompany company = companyService.selectById(companyId); |
| | | company.setHolidayFee(holidayFee); |
| | | companyService.updateById(company); |
| | | } |
| | | |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSysSensitiveWords; |
| | | import com.stylefeng.guns.modular.system.service.ITSysSensitiveWordsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tSysSensitiveWords") |
| | | public class TSysSensitiveWordsController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSysSensitiveWords/"; |
| | | |
| | | @Autowired |
| | | private ITSysSensitiveWordsService tSysSensitiveWordsService; |
| | | |
| | | /** |
| | | * 跳转到敏感词管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tSysSensitiveWords.html"; |
| | | } |
| | | |
| | | /** |
| | | |
| | | private String PREFIX = "/system/tSysSensitiveWords/"; |
| | | |
| | | @Autowired |
| | | private ITSysSensitiveWordsService tSysSensitiveWordsService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到敏感词管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tSysSensitiveWords.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加敏感词管理 |
| | | */ |
| | | @RequestMapping("/tSysSensitiveWords_add") |
| | |
| | | @ResponseBody |
| | | public Object list(String createTime, |
| | | String content) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tSysSensitiveWordsService.getSensitiveWordList(page, beginTime, endTime, content)); |
| | | } |
| | | return super.packForBT(page); |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tSysSensitiveWordsService.getSensitiveWordList(page, beginTime, endTime, content)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.text.DateFormat; |
| | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITTaxiCardPaymentService taxiCardPaymentService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("") |
| | | public String index(){ |
| | | public String index() { |
| | | return PREFIX + "tTaxiCard.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/audit") |
| | | public String audit(){ |
| | | public String audit() { |
| | | return PREFIX + "tTaxiCardAudit.html"; |
| | | } |
| | | |
| | |
| | | |
| | | @RequestMapping("/tTaxiCard_add") |
| | | public String tTaxiCardAdd(Model model){ |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | model.addAttribute("roleType", shiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "tTaxiCard_add.html"; |
| | | } |
| | | |
| | |
| | | model.addAttribute("viewIdentity","myself"); /// 查看角色--自己 |
| | | |
| | | model.addAttribute("item", tTaxiCard); |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | model.addAttribute("roleType", shiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "tTaxiCard_edit.html"; |
| | | } |
| | | |
| | |
| | | public Object ttaxiCardList(String startTime, String endTime, Integer type, String nameStr){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().eq("auditStatus", 2) |
| | | .eq("companyId", ShiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | .eq("companyId", shiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | |
| | | if (ToolUtil.isNotEmpty(startTime) && ToolUtil.isNotEmpty(endTime)){ |
| | | wrapper.between("createTime",startTime + " 00:00:00",endTime + " 23:59:59"); |
| | |
| | | @ResponseBody |
| | | public Object tTaxiCardAuditList(String startTime, String endTime, Integer type, String nameStr){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().ne("companyId", ShiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().ne("companyId", shiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | |
| | | if (ToolUtil.isNotEmpty(startTime) && ToolUtil.isNotEmpty(endTime)){ |
| | | wrapper.between("createTime",startTime + " 00:00:00",endTime + " 23:59:59"); |
| | |
| | | @RequestMapping("/initSuitCity") |
| | | @ResponseBody |
| | | public Object initSuitCity(){ |
| | | List<TCompanyCity> list = companyCityService.selectList(new EntityWrapper<TCompanyCity>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | List<TCompanyCity> list = companyCityService.selectList(new EntityWrapper<TCompanyCity>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | List<String> stringList = new ArrayList<>(); |
| | | for (TCompanyCity tCompanyCity : list) { |
| | | String area = ""; |
| | |
| | | @RequestMapping("/add") |
| | | @ResponseBody |
| | | public Object add(TTaxiCard taxiCard) { |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer createUserId = ShiroExtUtil.getUser().getId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | Integer createUserId = shiroExtUtil.getUser().getId(); |
| | | taxiCard.setCompanyId(companyId); |
| | | taxiCard.setCreateUserId(createUserId); |
| | | taxiCard.setState(2); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | taxiCard.setAuditStatus(2); |
| | | } else { |
| | | taxiCard.setAuditStatus(1); |
| | |
| | | @RequestMapping("/searchCoupons") |
| | | @ResponseBody |
| | | public Object searchCoupons(){ |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | return couponRecordService.selectList(new EntityWrapper<SysCouponRecord>().eq("companyId",companyId)); |
| | | } |
| | | |
| | |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.TBalanceModifyRecord; |
| | | import com.stylefeng.guns.modular.system.model.TCompany; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ExcelExportUtil; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | |
| | | @Controller |
| | | @RequestMapping("/tUser") |
| | | public class TUserController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tUser/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tUser.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改用户管理 |
| | | */ |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tUserService.getUserList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName)); |
| | | page.setRecords(tUserService.getUserList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName)); |
| | | return super.packForBT(page); |
| | | } |
| | | /** |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tUserService.getUserListCoupon(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName)); |
| | | page.setRecords(tUserService.getUserListCoupon(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | public Object updateBalance(@RequestParam Integer tUserId, |
| | | @RequestParam Integer updateType, |
| | | @RequestParam BigDecimal money) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | |
| | | List<TEnterpriseWithdrawal> companyId = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", objectId)); |
| | | if(companyId.size()==0){ |
| | | return "5000"; |
| | | } |
| | | |
| | | List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); |
| | | if(userWithdrawals.size()==0){ |
| | | return "5001"; |
| | | } |
| | | |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | if (1 == updateType.intValue()){ //增加 |
| | | // List<TEnterpriseWithdrawal> companyId = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", objectId)); |
| | | // if (companyId.size() == 0) { |
| | | // return "5000"; |
| | | // } |
| | | // |
| | | // List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); |
| | | // if (userWithdrawals.size() == 0) { |
| | | // return "5001"; |
| | | // } |
| | | |
| | | if (SinataUtil.isNotEmpty(tUser)) { |
| | | if (1 == updateType.intValue()) { //增加 |
| | | tUser.setBalance(tUser.getBalance().add(money)); |
| | | |
| | | }else if (2 == updateType.intValue()){ //减少 |
| | | if((tUser.getBalance().subtract(money)).compareTo(new BigDecimal(0)) == -1){ |
| | | |
| | | } else if (2 == updateType.intValue()) { //减少 |
| | | if ((tUser.getBalance().subtract(money)).compareTo(new BigDecimal(0)) == -1) { |
| | | tUser.setBalance(new BigDecimal(0)); |
| | | }else{ |
| | | } else { |
| | | tUser.setBalance(tUser.getBalance().subtract(money)); |
| | | } |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | |
| | | |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | |
| | | |
| | | /// 插入余额修改记录 |
| | | TBalanceModifyRecord tBalanceModifyRecord = new TBalanceModifyRecord(); |
| | | tBalanceModifyRecord.setCreateTime(DateUtil.parseTime(DateUtil.getTime())); |
| | | tBalanceModifyRecord.setMoney(money); |
| | | tBalanceModifyRecord.setType(updateType); |
| | | |
| | | |
| | | Random random = new Random(); |
| | | String result=""; |
| | | for (int i=0;i<8;i++) |
| | | { |
| | | String result = ""; |
| | | for (int i = 0; i < 8; i++) { |
| | | result+=random.nextInt(10); |
| | | } |
| | | tBalanceModifyRecord.setRecordID(result); |
| | |
| | | public Object updatePassword(@RequestParam Integer tUserId, |
| | | @RequestParam String password) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | if (SinataUtil.isNotEmpty(tUser)) { |
| | | tUser.setPassWord(ShiroKit.md5(password, "&a.s")); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | public Object optUser(@RequestParam Integer tUserId,@RequestParam Integer optType,@RequestParam String remark) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | if (1 == optType.intValue()){ //冻结 |
| | | if (1 == optType.intValue()) { //冻结 |
| | | tUser.setState(2); |
| | | tUser.setRemark(remark); |
| | | |
| | | |
| | | //增加推送 |
| | | Map<String,String> map = new HashMap<>(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("uid", tUser.getId().toString()); |
| | | String result = HttpRequestUtil.postRequest(PushURL.freeze_user_url, map); |
| | | System.out.println("冻结用户:【userId="+tUser.getId().toString()+"】,调用接口:"+result); |
| | | |
| | | }else if (2 == optType.intValue()){ //解冻 |
| | | System.out.println("冻结用户:【userId=" + tUser.getId().toString() + "】,调用接口:" + result); |
| | | |
| | | } else if (2 == optType.intValue()) { //解冻 |
| | | tUser.setState(1); |
| | | tUser.setRemark(remark); |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | } |
| | | user.setEmergencyContact(emergencyContact); |
| | | user.setEmergencyContactNumber(emergencyContactNumber); |
| | | if ("是".equals(isAuth)){ |
| | | if ("是".equals(isAuth)) { |
| | | user.setIsAuth(2); |
| | | }else if ("否".equals(isAuth)){ |
| | | } else if ("否".equals(isAuth)) { |
| | | user.setIsAuth(1); |
| | | } |
| | | user.setName(name); |
| | |
| | | user.setPassWord(ShiroKit.md5(passWord, "&a.s")); |
| | | user.setState(1); |
| | | user.setFlag("1"); |
| | | user.setInsertTime(new Date()); |
| | | user.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | tUserService.insert(user); |
| | | user.setInsertTime(new Date()); |
| | | user.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.insert(user); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | */ |
| | | @RequestMapping(value = "/outUser") |
| | | public void outUser(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String, Object>> listMap = tUserService.getUserListNoPage(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> listMap = tUserService.getUserListNoPage(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.model.TVerified; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import com.stylefeng.guns.modular.system.service.ITVerifiedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TVerified; |
| | | import com.stylefeng.guns.modular.system.service.ITVerifiedService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.Date; |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/tVerified") |
| | | public class TVerifiedController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tVerified/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITVerifiedService tVerifiedService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到实名认证列表首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tVerified.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加实名认证列表 |
| | | */ |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tVerifiedService.getVerifiedList(page, beginTime, endTime, userName, userPhone, name, state)); |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | |
| | | @Controller |
| | | @RequestMapping("/tVersionManagement") |
| | | public class TVersionManagementController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tVersionManagement/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITVersionManagementService tVersionManagementService; |
| | | |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | /** |
| | | * 跳转到版本管理首页 |
| | | */ |
| | |
| | | String version) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tVersionManagementService.getVersionList(page, beginTime, endTime, version)); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.page.PageInfoBT; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserRedPacketRecordService redPacketRecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转领取统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/receiveRecord") |
| | | public String receiveRecord(Model model,Integer activityId){ |
| | | model.addAttribute("activityId",activityId); |
| | | public String receiveRecord(Model model, Integer activityId) { |
| | | model.addAttribute("activityId", activityId); |
| | | UserActivity userActivity = userActivityService.selectById(activityId); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | model.addAttribute("startTime", sdf.format(userActivity.getStartTime())); |
| | |
| | | @RequestMapping(value = "/blanceList") |
| | | @ResponseBody |
| | | public Object blanceList(String createTime,Integer activityId) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userCouponRecordService.getBlanceList(page,beginTime,endTime,activityId)); |
| | | page.setRecords(userCouponRecordService.getBlanceList(page, beginTime, endTime, activityId)); |
| | | return super.packForBT(page); |
| | | } |
| | | /** |
| | |
| | | startTimes = DateUtil.getDate_str3(timeArray[0]+" 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1]+" 23:59:59"); |
| | | } |
| | | Integer uid = ShiroExtUtil.getUser().getId(); |
| | | Integer uid = shiroExtUtil.getUser().getId(); |
| | | return userActivityService.queryUserActivityList(uid, startTimes, endTimes, name, status, offset, limit); |
| | | } |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCompany; |
| | | import com.stylefeng.guns.modular.system.model.TDispatch; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.service.ITDispatchService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TDispatch; |
| | | import com.stylefeng.guns.modular.system.service.ITDispatchService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | @Controller |
| | | @RequestMapping("/tDispatch") |
| | | public class TDispatchController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tDispatch/"; |
| | | |
| | | @Autowired |
| | | private ITDispatchService tDispatchService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | /** |
| | | * 跳转到调度管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tDispatch.html"; |
| | | } |
| | | |
| | | /** |
| | | |
| | | private String PREFIX = "/system/tDispatch/"; |
| | | |
| | | @Autowired |
| | | private ITDispatchService tDispatchService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到调度管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tDispatch.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加调度管理 |
| | | */ |
| | | @RequestMapping("/tDispatch_add") |
| | | public String tDispatchAdd(Model model) { |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2) |
| | | .eq("isCross", 1) |
| | | .last(" and state != 1 and FIND_IN_SET(flag,'1,2')")); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | if (2 == ShiroExtUtil.getUser().getRoleType()) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId", ShiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } else { |
| | | model.addAttribute("franchiseeList", null); |
| | | } |
| | | return PREFIX + "tDispatch_add.html"; |
| | | model.addAttribute("roleType", shiroExtUtil.getUser().getRoleType()); |
| | | |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2) |
| | | .eq("isCross", 1) |
| | | .last(" and state != 1 and FIND_IN_SET(flag,'1,2')")); |
| | | model.addAttribute("companyList", companyList); |
| | | |
| | | if (2 == shiroExtUtil.getUser().getRoleType()) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } else { |
| | | model.addAttribute("franchiseeList", null); |
| | | } |
| | | return PREFIX + "tDispatch_add.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping("/tDispatch_update/{tDispatchId}") |
| | | public String tDispatchUpdate(@PathVariable Integer tDispatchId, Model model) { |
| | | TDispatch tDispatch = tDispatchService.selectById(tDispatchId); |
| | | model.addAttribute("item",tDispatch); |
| | | LogObjectHolder.me().set(tDispatch); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2) |
| | | .eq("isCross", 1) |
| | | .last(" and state != 1 and FIND_IN_SET(flag,'1,2')")); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId",tDispatch.getCompanyId()) |
| | | .eq("isCross", 1) |
| | | TDispatch tDispatch = tDispatchService.selectById(tDispatchId); |
| | | model.addAttribute("item", tDispatch); |
| | | LogObjectHolder.me().set(tDispatch); |
| | | |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType", roleType); |
| | | if (1 == roleType) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2) |
| | | .eq("isCross", 1) |
| | | .last(" and state != 1 and FIND_IN_SET(flag,'1,2')")); |
| | | model.addAttribute("companyList", companyList); |
| | | |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId", tDispatch.getCompanyId()) |
| | | .eq("isCross", 1) |
| | | .last(" and state != 1 and FIND_IN_SET(flag,'1,2')")); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId", ShiroExtUtil.getUser().getObjectId()) |
| | | .eq("superiorId", shiroExtUtil.getUser().getObjectId()) |
| | | .eq("isCross", 1) |
| | | .last(" and state != 1 and FIND_IN_SET(flag,'1,2')")); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDispatchService.getDispatchList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, name, companyName, franchiseeName, account, state)); |
| | | page.setRecords(tDispatchService.getDispatchList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, name, companyName, franchiseeName, account, state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TDispatch tDispatch) { |
| | | //判断账号是否存在 |
| | | int count = tDispatchService.selectCount(new EntityWrapper<TDispatch>().eq("account", tDispatch.getAccount()).last(" and FIND_IN_SET(state,'1,2')")); |
| | | if (count > 0) { |
| | | return new ErrorTip(500, "账号已存在,请重新输入"); |
| | | } |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | if (2 == roleType) { |
| | | tDispatch.setCompanyId(objectId); |
| | | } else if (3 == roleType) { |
| | | TCompany company = tCompanyService.selectById(objectId); |
| | | tDispatch.setCompanyId(company.getSuperiorId()); |
| | | tDispatch.setFranchiseeId(objectId); |
| | | } |
| | | tDispatch.setInsertTime(new Date()); |
| | | tDispatch.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tDispatch.setInsertUserRole(roleType); |
| | | tDispatch.setState(1); |
| | | if(tDispatch.getCompanyId() == null){ |
| | | Integer objectId1 = userService.selectById(ShiroExtUtil.getUser().getId()).getObjectId(); |
| | | tDispatch.setCompanyId(objectId1); |
| | | } |
| | | tDispatch.setPassword(ShiroKit.md5(tDispatch.getPassword(), "WL:x9#")); |
| | | tDispatchService.insert(tDispatch); |
| | | return SUCCESS_TIP; |
| | | //判断账号是否存在 |
| | | int count = tDispatchService.selectCount(new EntityWrapper<TDispatch>().eq("account", tDispatch.getAccount()).last(" and FIND_IN_SET(state,'1,2')")); |
| | | if (count > 0) { |
| | | return new ErrorTip(500, "账号已存在,请重新输入"); |
| | | } |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | if (2 == roleType) { |
| | | tDispatch.setCompanyId(objectId); |
| | | } else if (3 == roleType) { |
| | | TCompany company = tCompanyService.selectById(objectId); |
| | | tDispatch.setCompanyId(company.getSuperiorId()); |
| | | tDispatch.setFranchiseeId(objectId); |
| | | } |
| | | tDispatch.setInsertTime(new Date()); |
| | | tDispatch.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | tDispatch.setInsertUserRole(roleType); |
| | | tDispatch.setState(1); |
| | | if (tDispatch.getCompanyId() == null) { |
| | | Integer objectId1 = userService.selectById(shiroExtUtil.getUser().getId()).getObjectId(); |
| | | tDispatch.setCompanyId(objectId1); |
| | | } |
| | | tDispatch.setPassword(ShiroKit.md5(tDispatch.getPassword(), "WL:x9#")); |
| | | tDispatchService.insert(tDispatch); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TDispatch tDispatch) { |
| | | TDispatch obj = tDispatchService.selectById(tDispatch.getId()); |
| | | if (!obj.getAccount().equals(tDispatch.getAccount())) { |
| | | //判断账号是否存在 |
| | | int count = tDispatchService.selectCount(new EntityWrapper<TDispatch>().eq("account", tDispatch.getAccount()).last(" and FIND_IN_SET(state,'1,2')")); |
| | | if (count > 0) { |
| | | return new ErrorTip(500, "账号已存在,请重新输入"); |
| | | } |
| | | } |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | if (2 == roleType) { |
| | | tDispatch.setCompanyId(objectId); |
| | | } else if (3 == roleType) { |
| | | TCompany company = tCompanyService.selectById(objectId); |
| | | tDispatch.setCompanyId(company.getSuperiorId()); |
| | | tDispatch.setFranchiseeId(objectId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(tDispatch.getPassword())) { |
| | | tDispatch.setPassword(ShiroKit.md5(tDispatch.getPassword(), "WL:x9#")); |
| | | } |
| | | tDispatchService.updateById(tDispatch); |
| | | return SUCCESS_TIP; |
| | | TDispatch obj = tDispatchService.selectById(tDispatch.getId()); |
| | | if (!obj.getAccount().equals(tDispatch.getAccount())) { |
| | | //判断账号是否存在 |
| | | int count = tDispatchService.selectCount(new EntityWrapper<TDispatch>().eq("account", tDispatch.getAccount()).last(" and FIND_IN_SET(state,'1,2')")); |
| | | if (count > 0) { |
| | | return new ErrorTip(500, "账号已存在,请重新输入"); |
| | | } |
| | | } |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | if (2 == roleType) { |
| | | tDispatch.setCompanyId(objectId); |
| | | } else if (3 == roleType) { |
| | | TCompany company = tCompanyService.selectById(objectId); |
| | | tDispatch.setCompanyId(company.getSuperiorId()); |
| | | tDispatch.setFranchiseeId(objectId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(tDispatch.getPassword())) { |
| | | tDispatch.setPassword(ShiroKit.md5(tDispatch.getPassword(), "WL:x9#")); |
| | | } |
| | | tDispatchService.updateById(tDispatch); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TIntegralGoods; |
| | | import com.stylefeng.guns.modular.system.service.ITIntegralGoodsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tIntegralGoods") |
| | | public class TIntegralGoodsController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tIntegralGoods/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITIntegralGoodsService tIntegralGoodsService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到商品管理首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tIntegralGoods.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加商品管理 |
| | | */ |
| | |
| | | public Object list(String insertTime,String name,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tIntegralGoodsService.getIntegralGoodsList(page, beginTime, endTime, name, state)); |
| | |
| | | @ResponseBody |
| | | public Object add(TIntegralGoods tIntegralGoods) { |
| | | tIntegralGoods.setInsertTime(new Date()); |
| | | tIntegralGoods.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tIntegralGoods.setInsertUserRole(ShiroExtUtil.getUser().getRoleType()); |
| | | tIntegralGoods.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | tIntegralGoods.setInsertUserRole(shiroExtUtil.getUser().getRoleType()); |
| | | tIntegralGoods.setState(1); |
| | | tIntegralGoodsService.insert(tIntegralGoods); |
| | | return SUCCESS_TIP; |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TOrderCharter; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TIntegralOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITIntegralOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/tIntegralOrder") |
| | | public class TIntegralOrderController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tIntegralOrder/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITIntegralOrderService tIntegralOrderService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到积分兑换订单首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tIntegralOrder.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | public Object list(String insertTime,String userName,String goodsName,String consigneeName,String consigneePhone,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tIntegralOrderService.getIntegralOrderList(page, beginTime, endTime, userName, goodsName, consigneeName, consigneePhone, state)); |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | |
| | | @Autowired |
| | | private ITLinePriceService itLinePriceService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITLineShiftService itLineShiftService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITLineCompanyService itLineCompanyService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到跨城站点管理首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tLine.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加跨城站点管理 |
| | | */ |
| | |
| | | public Object list(String insertTime,String name,String insertUser,String modelStr,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tLineService.getLineList(page, beginTime, endTime, name, insertUser, modelStr, state)); |
| | |
| | | tLine.setName(name); |
| | | tLine.setState(1); |
| | | tLine.setInsertTime(new Date()); |
| | | tLine.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tLine.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | tLineService.insert(tLine); |
| | | |
| | | |
| | | //添加线路站点起点+终点 |
| | | TLineSite start = new TLineSite(); |
| | | start.setLineId(tLine.getId()); |
| | |
| | | lineCompany.setLineId(lineId); |
| | | lineCompany.setCompanyId(jsonObject.getInteger("companyId")); |
| | | lineCompany.setInsertTime(new Date()); |
| | | lineCompany.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | lineCompany.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | itLineCompanyService.insert(lineCompany); |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TOrderEvaluate; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOrderCharter; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderCharterService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping("/tOrderCharter") |
| | | public class TOrderCharterController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tOrderCharter/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderCharterService tOrderCharterService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到旅游包车订单首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tOrderCharter.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | public Object list(String insertTime,String userName,String contactName,String contactPhone,String useDemand,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tOrderCharterService.getCharterOrderList(page, beginTime, endTime, userName, contactName, contactPhone, useDemand, state)); |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tOrderCharteredCar") |
| | | public class TOrderCharteredCarController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tOrderCharteredCar/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderCharteredCarService tOrderCharteredCarService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到旅游包车订单首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tOrderCharteredCar.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改旅游包车订单 |
| | | */ |
| | |
| | | public Object list(String insertTime,String userName,String contactPerson,String contactPhone,String modelUse,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | List<Map<String, Object>> charterCarOrderList = tOrderCharteredCarService.getCharterCarOrderList(page, beginTime, endTime, userName, contactPerson, contactPhone, modelUse, state, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> charterCarOrderList = tOrderCharteredCarService.getCharterCarOrderList(page, beginTime, endTime, userName, contactPerson, contactPhone, modelUse, state, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | for (Map<String, Object> map : charterCarOrderList) { |
| | | String[] prices = map.get("price").toString().split("-"); |
| | | String p = Double.valueOf(prices[0]) * Integer.valueOf(map.get("peopleNumber").toString()) + "-" + Double.valueOf(prices[1]) * Integer.valueOf(map.get("peopleNumber").toString()); |
| | |
| | | |
| | | @Resource |
| | | private MongoTemplate mongoTemplate; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | model.addAttribute("tOrderCrossCityId",tOrderCrossCityId); |
| | | return PREFIX + "tOrderCrossCity_track.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * |
| | | * @param orderDetailId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getOrderTrack", method = RequestMethod.POST) |
| | | public ResultUtil getOrderTrack(String orderDetailId){ |
| | | if(ToolUtil.isNotEmpty(orderDetailId)){ |
| | | public ResultUtil getOrderTrack(Integer orderDetailId) { |
| | | if (ToolUtil.isNotEmpty(orderDetailId)) { |
| | | try { |
| | | Query query = new Query() |
| | | .addCriteria(Criteria.where("orderId").is(orderDetailId).and("orderType").is(3)) |
| | | .with(new Sort(Sort.Direction.ASC, "insertTime")); |
| | | List<TOrderPosition> positions = mongoTemplate.find(query, TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(positions); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | | } |
| | | }else { |
| | | } else { |
| | | resultUtil = ResultUtil.paranErr(); |
| | | } |
| | | return resultUtil; |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderCrossCityService.getCrossCityOrderList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), orderNum, orderSource, userName, userPhone, passengers, passengersPhone, serverCarModelId, driver, lineId, state)); |
| | | page.setRecords(tOrderCrossCityService.getCrossCityOrderList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), orderNum, orderSource, userName, userPhone, passengers, passengersPhone, serverCarModelId, driver, lineId, state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderCrossCityId) throws Exception { |
| | | TOrderCrossCity tOrderCrossCity = tOrderCrossCityService.selectById(tOrderCrossCityId); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | |
| | | TOrderCrossCity orderCrossCity = tOrderCrossCityService.selectById(tOrderCrossCityId); |
| | | if(orderCrossCity.getState() > 5 && orderCrossCity.getState() != 11 && orderCrossCity.getState() != 7){ |
| | | if (orderCrossCity.getState() > 5 && orderCrossCity.getState() != 11 && orderCrossCity.getState() != 7) { |
| | | return ResultUtil.error("订单状态不在可取消范围内"); |
| | | } |
| | | orderCrossCity.setState(10); |
| | | tOrderCrossCityService.updateById(orderCrossCity); |
| | | |
| | | if(orderCrossCity.getDriverId() != null){ |
| | | |
| | | if (orderCrossCity.getDriverId() != null) { |
| | | //修改司机信息 |
| | | LineShiftDriver lineShiftDriver = lineShiftDriverMapper.selectById(orderCrossCity.getLineShiftDriverId()); |
| | | lineShiftDriver.setLaveSeat(lineShiftDriver.getLaveSeat() + orderCrossCity.getPeopleNumber() > lineShiftDriver.getTotalSeat() ? |
| | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITTimeoutAppealService timeoutAppealService; |
| | | |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到小件物流订单首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tOrderLogistics.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加小件物流订单 |
| | | */ |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderLogisticsService.getLogisticsOrderList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), |
| | | page.setRecords(tOrderLogisticsService.getLogisticsOrderList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), |
| | | orderNum, orderSource, type, userName, userPhone, recipient, recipientPhone, driver, state)); |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | @RequestMapping(value = "/cancel") |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderLogisticsId) { |
| | | try{ |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | try { |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(tOrderLogisticsId); |
| | | tOrderLogistics.setState(10); |
| | | |
| | | |
| | | //已支付的情况下进行退款操作 |
| | | if(null != tOrderLogistics.getPayType() && null != tOrderLogistics.getPayMoney()) { |
| | | if (tOrderLogistics.getPayType() ==3) {//余额支付 |
| | | if (null != tOrderLogistics.getPayType() && null != tOrderLogistics.getPayMoney()) { |
| | | if (tOrderLogistics.getPayType() == 3) {//余额支付 |
| | | TUser tUser = userService.selectById(tOrderLogistics.getUserId()); |
| | | tUser.setBalance(tUser.getBalance().add(tOrderLogistics.getPayMoney())); |
| | | userService.updateById(tUser); |
| | |
| | | @Resource |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到快车订单首页 |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderPrivateCarService.getPrivateCarOrderList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), |
| | | page.setRecords(tOrderPrivateCarService.getPrivateCarOrderList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), |
| | | orderNum, orderSource, userName, userPhone, passengers, passengersPhone, serverCarModelId, driver, state, rideType)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * |
| | | * @param orderDetailId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getOrderTrack", method = RequestMethod.POST) |
| | | public ResultUtil getOrderTrack(String orderDetailId){ |
| | | if(ToolUtil.isNotEmpty(orderDetailId)){ |
| | | public ResultUtil getOrderTrack(Integer orderDetailId) { |
| | | if (ToolUtil.isNotEmpty(orderDetailId)) { |
| | | try { |
| | | Query query = new Query() |
| | | .addCriteria(Criteria.where("orderId").is(orderDetailId).and("orderType").is(1)) |
| | | .with(new Sort(Sort.Direction.ASC, "insertTime")); |
| | | List<TOrderPosition> positions = mongoTemplate.find(query, TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(positions); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | | } |
| | | }else { |
| | | } else { |
| | | resultUtil = ResultUtil.paranErr(); |
| | | } |
| | | return resultUtil; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消快车订单 |
| | | */ |
| | |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderTaxiService orderTaxiService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到快车改派管理首页 |
| | | */ |
| | |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | //page.setRecords(tReassignService.getPrivateCarReassignOrderList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,originalDriverName,originalDriverPhone,orderNum,nowDriverName,nowDriverPhone,orderState,state)); |
| | | List<Map<String, Object>> list = tReassignService.getPrivateCarReassignOrderList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | List<Map<String, Object>> list = tReassignService.getPrivateCarReassignOrderList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if(!list.isEmpty()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("insertTime", "改派金额合计"); |
| | | map.put("money", tReassignService.getPrivateCarReassignOrderListMoney(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | map.put("money", tReassignService.getPrivateCarReassignOrderListMoney(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = tReassignService.getPrivateCarReassignOrderListEx(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | List<Map<String, Object>> mapList = tReassignService.getPrivateCarReassignOrderListEx(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | //page.setRecords(tReassignService.getCrossReassignOrderList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,originalDriverName,originalDriverPhone,orderNum,nowDriverName,nowDriverPhone,orderState,state)); |
| | | List<Map<String, Object>> list = tReassignService.getCrossReassignOrderList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if(!list.isEmpty()){ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = tReassignService.getCrossReassignOrderList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if(!list.isEmpty()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("insertTime", "改派金额合计"); |
| | | map.put("money", tReassignService.getCrossReassignOrderListMoney(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | map.put("money", tReassignService.getCrossReassignOrderListMoney(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = tReassignService.getCrossReassignOrderListEx(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | List<Map<String, Object>> mapList = tReassignService.getCrossReassignOrderListEx(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String, Object>> list = tReassignService.getSmallPieceLogisticsList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if(!list.isEmpty()){ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = tReassignService.getSmallPieceLogisticsList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if (!list.isEmpty()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("insertTime", "改派金额合计"); |
| | | map.put("money", tReassignService.getSmallPieceLogisticsListMoney(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | map.put("money", tReassignService.getSmallPieceLogisticsListMoney(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = tReassignService.getSmallPieceLogisticsListEx(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | List<Map<String, Object>> mapList = tReassignService.getSmallPieceLogisticsListEx(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | //page.setRecords(tReassignService.getTaxiReassignOrderList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,originalDriverName,originalDriverPhone,orderNum,nowDriverName,nowDriverPhone,orderState,state)); |
| | | List<Map<String, Object>> list = tReassignService.getTaxiReassignOrderList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if(!list.isEmpty()){ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = tReassignService.getTaxiReassignOrderList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | if(!list.isEmpty()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("insertTime", "改派金额合计"); |
| | | map.put("money", tReassignService.getTaxiReassignOrderListMoney(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | map.put("money", tReassignService.getTaxiReassignOrderListMoney(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state)); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> mapList = tReassignService.getTaxiReassignOrderListEx(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | List<Map<String, Object>> mapList = tReassignService.getTaxiReassignOrderListEx(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | | |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | |
| | | @RequestMapping(value = "/opt") |
| | | @ResponseBody |
| | | public Object opt(@RequestParam Integer tReassignId,@RequestParam Integer optType) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TReassign tReassign = tReassignService.selectById(tReassignId); |
| | | if (1 == optType){ |
| | | if (1 == optType) { |
| | | Integer originalDriverId = tReassign.getOriginalDriverId(); |
| | | |
| | | |
| | | TDriver driver = itDriverService.selectById(originalDriverId); |
| | | driver.setBalance(driver.getBalance().add(new BigDecimal(tReassign.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).add(new BigDecimal(tReassign.getMoney())).doubleValue()); |
| | | itDriverService.updateById(driver); |
| | | |
| | | |
| | | tReassign.setState(5); |
| | | tReassignService.updateById(tReassign); |
| | | //还原订单状态 |
| | |
| | | public Object optCross(@RequestParam Integer tReassignId,@RequestParam Integer optType) { |
| | | try { |
| | | TReassign tReassign = tReassignService.selectById(tReassignId); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | if (1 == optType){ |
| | | |
| | | |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | if (1 == optType) { |
| | | |
| | | |
| | | Integer originalDriverId = tReassign.getOriginalDriverId(); |
| | | |
| | | |
| | | TDriver driver = itDriverService.selectById(originalDriverId); |
| | | driver.setBalance(driver.getBalance().add(new BigDecimal(tReassign.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).add(new BigDecimal(tReassign.getMoney())).doubleValue()); |
| | | itDriverService.updateById(driver); |
| | | |
| | | |
| | | tReassign.setState(5); |
| | | tReassign.setReviewer(user.getId()); |
| | | tReassign.setReviewerType(2); |
| | |
| | | @ResponseBody |
| | | public Object optSmall(@RequestParam Integer tReassignId,@RequestParam Integer optType) { |
| | | try { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TReassign tReassign = tReassignService.selectById(tReassignId); |
| | | if (1 == optType){ |
| | | if (1 == optType) { |
| | | Integer originalDriverId = tReassign.getOriginalDriverId(); |
| | | |
| | | |
| | | TDriver driver = itDriverService.selectById(originalDriverId); |
| | | driver.setBalance(driver.getBalance().add(new BigDecimal(tReassign.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).add(new BigDecimal(tReassign.getMoney())).doubleValue()); |
| | | itDriverService.updateById(driver); |
| | | |
| | | |
| | | |
| | | |
| | | tReassign.setState(5); |
| | | tReassignService.updateById(tReassign); |
| | | |
| | |
| | | @RequestMapping(value = "/optTaxi") |
| | | @ResponseBody |
| | | public Object optTaxi(@RequestParam Integer tReassignId,@RequestParam Integer optType) { |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TReassign tReassign = tReassignService.selectById(tReassignId); |
| | | if (1 == optType){ |
| | | |
| | | if (1 == optType) { |
| | | |
| | | Integer originalDriverId = tReassign.getOriginalDriverId(); |
| | | |
| | | |
| | | TDriver driver = itDriverService.selectById(originalDriverId); |
| | | driver.setBalance(driver.getBalance().add(new BigDecimal(tReassign.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).add(new BigDecimal(tReassign.getMoney())).doubleValue()); |
| | |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TServerCarmodel; |
| | | import com.stylefeng.guns.modular.system.service.ITServerCarmodelService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Controller |
| | | @RequestMapping("/tServerCarmodel") |
| | | public class TServerCarmodelController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tServerCarmodel/"; |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService tServerCarmodelService; |
| | | |
| | | /** |
| | | * 跳转到快车车型设置首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tServerCarmodel.html"; |
| | | } |
| | | |
| | | /** |
| | | |
| | | private String PREFIX = "/system/tServerCarmodel/"; |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService tServerCarmodelService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到快车车型设置首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tServerCarmodel.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到跨城车型设置首页 |
| | | */ |
| | | @RequestMapping("/acrossCity") |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page, 1, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page, 1, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | @RequestMapping(value = "/listAcrossCity") |
| | | @ResponseBody |
| | | public Object listAcrossCity(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page, 2, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page, 2, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | @RequestMapping(value = "/listCharter") |
| | | @ResponseBody |
| | | public Object listCharter(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page, 3, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page, 3, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TDriverLine; |
| | | import com.stylefeng.guns.modular.system.model.TLocation; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.model.TSite; |
| | | import com.stylefeng.guns.modular.system.service.ITLocationService; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.stylefeng.guns.modular.system.service.ITSiteService; |
| | | import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSite; |
| | | import com.stylefeng.guns.modular.system.service.ITSiteService; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private ITSiteService tSiteService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITLocationService itLocationService; |
| | | |
| | | |
| | | @Autowired |
| | | private GDMapElectricFenceUtil gdMapElectricFenceUtil; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到跨城站点管理首页 |
| | | */ |
| | |
| | | public Object list(String insertTime,String name,String insertUser,String city,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tSiteService.getSiteList(page, beginTime, endTime, name, insertUser, city, state)); |
| | |
| | | @ResponseBody |
| | | public Object add(TSite tSite,@RequestParam String subArr) { |
| | | tSite.setInsertTime(new Date()); |
| | | tSite.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tSite.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | tSite.setState(1); |
| | | tSiteService.insert(tSite); |
| | | |
| | | |
| | | //添加站点区域 |
| | | addLocation(subArr,tSite.getId()); |
| | | addLocation(subArr, tSite.getId()); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TServerCarmodel; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import com.stylefeng.guns.modular.system.model.TSystemPrice; |
| | | import com.stylefeng.guns.modular.system.service.ITServerCarmodelService; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemPriceService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSystemPrice; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemPriceService; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private ITSystemPriceService tSystemPriceService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService tServerCarmodelService; |
| | | |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到快车价格设置首页 |
| | | */ |
| | |
| | | @RequestMapping("/small") |
| | | public String small(Model model) { |
| | | //跨城小件物流 |
| | | TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("state", 1)); |
| | | TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("state", 1)); |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | JSONObject json1 = JSONObject.fromObject(one.getContent()); |
| | | model.addAttribute("json1",json1); |
| | | } |
| | | //同城小件物流 |
| | | TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("state", 1)); |
| | | TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("state", 1)); |
| | | if (SinataUtil.isNotEmpty(two)){ |
| | | JSONObject json2 = JSONObject.fromObject(two.getContent()); |
| | | model.addAttribute("json2",json2); |
| | |
| | | |
| | | @RequestMapping("/taxi") |
| | | public String taxi(Model model) { |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 2).eq("companyId", id)); |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | if (SinataUtil.isNotEmpty(one)) { |
| | | JSONObject json1 = JSONObject.fromObject(one.getContent()); |
| | | model.addAttribute("json",json1); |
| | | model.addAttribute("json", json1); |
| | | } |
| | | return PREFIX + "taxiSet.html"; |
| | | } |
| | | return PREFIX + "taxiSet.html"; |
| | | } |
| | | /** |
| | | * 跳转到添加快车价格设置 |
| | | */ |
| | | @RequestMapping("/tSystemPrice_add") |
| | | public String tSystemPriceAdd(Model model) { |
| | | //查询所有快车车型 |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 1).eq("companyId", ShiroExtUtil.getUser().getObjectId()).ne("state", 3)); |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 1).eq("companyId", shiroExtUtil.getUser().getObjectId()).ne("state", 3)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); |
| | | List<TServerCarmodel> serverCarmodels = new ArrayList<>(); |
| | | for(TServerCarmodel tsc : modelList){ |
| | | for (TServerCarmodel tsc : modelList) { |
| | | boolean b = true; |
| | | for(TSystemPrice tsp : tSystemPrices){ |
| | | if(tsc.getId() == tsp.getServerCarModelId()){ |
| | | for (TSystemPrice tsp : tSystemPrices) { |
| | | if (tsc.getId() == tsp.getServerCarModelId()) { |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | if (b) { |
| | | serverCarmodels.add(tsc); |
| | | } |
| | | } |
| | |
| | | |
| | | JSONObject json = JSONObject.fromObject(tSystemPrice.getContent()); |
| | | model.addAttribute("content",json); |
| | | |
| | | model.addAttribute("contentPutOne",JSONObject.fromObject(tSystemPrice.getContentPutOne())); |
| | | model.addAttribute("contentNotOne",JSONObject.fromObject(tSystemPrice.getContentNotOne())); |
| | | model.addAttribute("contentPutTwo",JSONObject.fromObject(tSystemPrice.getContentPutTwo())); |
| | | model.addAttribute("contentNotTwo",JSONObject.fromObject(tSystemPrice.getContentNotTwo())); |
| | | model.addAttribute("contentPutThree",JSONObject.fromObject(tSystemPrice.getContentPutThree())); |
| | | model.addAttribute("contentNotThree",JSONObject.fromObject(tSystemPrice.getContentNotThree())); |
| | | model.addAttribute("contentExclusive",JSONObject.fromObject(tSystemPrice.getContentExclusive())); |
| | | model.addAttribute("contentPrice",JSONObject.fromObject(tSystemPrice.getContentPrice())); |
| | | |
| | | |
| | | model.addAttribute("contentPutOne", JSONObject.fromObject(tSystemPrice.getContentPutOne())); |
| | | model.addAttribute("contentNotOne", JSONObject.fromObject(tSystemPrice.getContentNotOne())); |
| | | model.addAttribute("contentPutTwo", JSONObject.fromObject(tSystemPrice.getContentPutTwo())); |
| | | model.addAttribute("contentNotTwo", JSONObject.fromObject(tSystemPrice.getContentNotTwo())); |
| | | model.addAttribute("contentPutThree", JSONObject.fromObject(tSystemPrice.getContentPutThree())); |
| | | model.addAttribute("contentNotThree", JSONObject.fromObject(tSystemPrice.getContentNotThree())); |
| | | model.addAttribute("contentExclusive", JSONObject.fromObject(tSystemPrice.getContentExclusive())); |
| | | model.addAttribute("contentPrice", JSONObject.fromObject(tSystemPrice.getContentPrice())); |
| | | |
| | | //查询所有快车车型 |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 1).eq("companyId", ShiroExtUtil.getUser().getObjectId()).ne("state", 3)); |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 1).eq("companyId", shiroExtUtil.getUser().getObjectId()).ne("state", 3)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1) |
| | | .notIn("id", tSystemPrices.stream().map(TSystemPrice::getServerCarModelId).collect(Collectors.toList()))); |
| | | List<TServerCarmodel> serverCarmodels = new ArrayList<>(); |
| | | |
| | | |
| | | modelList.add(tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId())); |
| | | // boolean b = true; |
| | | // for(TSystemPrice tsp : tSystemPrices){ |
| | |
| | | @ResponseBody |
| | | public Object list(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tSystemPriceService.getSpecialPriceList(page, ShiroExtUtil.getUser().getObjectId(), name, state)); |
| | | page.setRecords(tSystemPriceService.getSpecialPriceList(page, shiroExtUtil.getUser().getObjectId(), name, state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | int count = tSystemPriceService.selectCount(new EntityWrapper<TSystemPrice>() |
| | | .eq("type", 1) |
| | | .eq("serverCarModelId", tSystemPrice.getServerCarModelId()) |
| | | .eq("companyId", ShiroExtUtil.getUser().getObjectId()) |
| | | .eq("companyId", shiroExtUtil.getUser().getObjectId()) |
| | | .last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | if (count > 0) { |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | | return new ErrorTip(500, "【"+one.getName()+"】已存在,请重新选择"); |
| | | return new ErrorTip(500, "【" + one.getName() + "】已存在,请重新选择"); |
| | | } |
| | | tSystemPrice.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tSystemPrice.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tSystemPrice.setType(1); |
| | | tSystemPrice.setState(1); |
| | | tSystemPriceService.insert(tSystemPrice); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | if (pushMinistryOfTransport) {//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyFare(tSystemPrice.getId()); |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/taxiSet") |
| | | @ResponseBody |
| | | public Object taxiSet(String content) { |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | TSystemPrice tSystemPrice1 = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 2).eq("companyId", id)); |
| | | if (tSystemPrice1==null) { |
| | | if (tSystemPrice1 == null) { |
| | | TSystemPrice tSystemPrice = new TSystemPrice(); |
| | | tSystemPrice.setContent(content); |
| | | tSystemPrice.setType(2); |
| | | tSystemPrice.setCompanyId(id); |
| | | tSystemPriceService.insert(tSystemPrice); |
| | | }else { |
| | | } else { |
| | | tSystemPrice1.setContent(content); |
| | | tSystemPriceService.updateById(tSystemPrice1); |
| | | } |
| | |
| | | int count = tSystemPriceService.selectCount(new EntityWrapper<TSystemPrice>() |
| | | .eq("type", 1) |
| | | .eq("serverCarModelId", tSystemPrice.getServerCarModelId()) |
| | | .eq("companyId", ShiroExtUtil.getUser().getObjectId()) |
| | | .eq("companyId", shiroExtUtil.getUser().getObjectId()) |
| | | .last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | |
| | | @ResponseBody |
| | | public Object smallSubmit(String json1,String json2) { |
| | | //跨城小件物流 |
| | | TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | one.setContent(json1); |
| | | tSystemPriceService.updateById(one); |
| | | }else{ |
| | | }else { |
| | | one = new TSystemPrice(); |
| | | one.setState(1); |
| | | one.setType(5); |
| | | one.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | one.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | one.setContent(json1); |
| | | tSystemPriceService.insert(one); |
| | | } |
| | | //同城小件物流 |
| | | TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(two)){ |
| | | two.setContent(json2); |
| | | tSystemPriceService.updateById(two); |
| | | }else{ |
| | | }else { |
| | | two = new TSystemPrice(); |
| | | two.setState(1); |
| | | two.setType(4); |
| | | two.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | two.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | two.setContent(json2); |
| | | tSystemPriceService.insert(two); |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | /** |
| | | * 跳转到黑板 |
| | | */ |
| | | @RequestMapping("") |
| | | public String blackboard(Model model,Integer type) { |
| | | //查询当前用户是否有"首页"菜单的权限 |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | Integer menuNum = userService.getMenuNumByRole(user.getRoleid()); |
| | | if (menuNum > 0){ |
| | | return "/home.html"; |
| | | } else { |
| | | //查询登录次数 |
| | | int count = loginLogService.selectCount(new EntityWrapper<LoginLog>().eq("userid", ShiroExtUtil.getUser().getId())); |
| | | model.addAttribute("loginNum", count); |
| | | |
| | | Role role = roleService.selectById(user.getRoleid()); |
| | | Dept dept = deptService.selectById(user.getDeptid()); |
| | | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到黑板 |
| | | */ |
| | | @RequestMapping("") |
| | | public String blackboard(Model model, Integer type) { |
| | | //查询当前用户是否有"首页"菜单的权限 |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | Integer menuNum = userService.getMenuNumByRole(user.getRoleid()); |
| | | if (menuNum > 0) { |
| | | return "/home.html"; |
| | | } else { |
| | | //查询登录次数 |
| | | int count = loginLogService.selectCount(new EntityWrapper<LoginLog>().eq("userid", shiroExtUtil.getUser().getId())); |
| | | model.addAttribute("loginNum", count); |
| | | |
| | | Role role = roleService.selectById(user.getRoleid()); |
| | | Dept dept = deptService.selectById(user.getDeptid()); |
| | | |
| | | model.addAttribute("deptName",dept==null?"顶级":dept.getFullname()); |
| | | model.addAttribute("roleName", role.getName()); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.system; |
| | | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.code.kaptcha.Constants; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.exception.InvalidKaptchaException; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | | import com.stylefeng.guns.core.log.factory.LogTaskFactory; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.stylefeng.guns.core.support.HttpKit.getIp; |
| | |
| | | private IUserService userService; |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | private RedisTemplate<String, String> redisTemplate; |
| | | |
| | | @Autowired |
| | | private IShiro shiro; |
| | |
| | | model.addAttribute("avatar", avatar); |
| | | model.addAttribute("userName", user.getName()); |
| | | model.addAttribute("type", 0); |
| | | String sessionId = RequestContextHolder.currentRequestAttributes().getSessionId(); |
| | | ShiroExtUtil.map.put(sessionId, shiroUser); |
| | | redisTemplate.opsForValue().set(loginUser.getOnconUUID(), JSON.toJSONString(shiroUser), 10, TimeUnit.HOURS); |
| | | return "/index.html"; |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/logout", method = RequestMethod.GET) |
| | | public String logOut(HttpServletRequest request) { |
| | | request.getSession().invalidate(); |
| | | // HttpUtil.get("https://testsso1.teamshub.com/logout?logouturl=https%3A%2F%2Fsso.teamshub.com%2Flogout%3Flogoutat%3Dhttps%3A%2F%2Ftraffic.qytzt.cn%2F"); |
| | | HttpUtil.get("https://passport.teamshub.com/logout?logouturl=https%3A%2F%2Fsso.teamshub.com%2Flogout%3F%0Alogoutat%3Dhttps%253A%252F%252Ftraffic.qytzt.cn%253A443%252F"); |
| | | return REDIRECT + "/"; |
| | | } |
| | | |
| | |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import com.stylefeng.guns.modular.system.transfer.UserDto; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.EmployeeUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.UserUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.naming.NoPermissionException; |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping("/user_info") |
| | | public String userInfo(Model model) { |
| | | Integer userId = ShiroExtUtil.getUser().getId(); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | if (ToolUtil.isEmpty(userId)) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | |
| | | if (!newPwd.equals(rePwd)) { |
| | | throw new GunsException(BizExceptionEnum.TWO_PWD_NOT_MATCH); |
| | | } |
| | | Integer userId = ShiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | String oldMd5 = ShiroKit.md5(oldPwd, user.getSalt()); |
| | | if (user.getPassword().equals(oldMd5)) { |
| | | String newMd5 = ShiroKit.md5(newPwd, user.getSalt()); |
| | |
| | | //创建日期 |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | if (ShiroExtUtil.getUser().isAdmin()) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userService.getUserListPage(page, null, name, beginTime, endTime, deptid)); |
| | | return super.packForBT(page); |
| | | } else { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userService.getUserListPage(page, null, name, beginTime, endTime, deptid)); |
| | | return super.packForBT(page); |
| | | } |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | if (shiroExtUtil.getUser().isAdmin()) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userService.getUserListPage(page, null, name, beginTime, endTime, deptid)); |
| | | return super.packForBT(page); |
| | | } else { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userService.getUserListPage(page, null, name, beginTime, endTime, deptid)); |
| | | return super.packForBT(page); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | if (theUser != null) { |
| | | throw new GunsException(BizExceptionEnum.USER_ALREADY_REG); |
| | | } |
| | | ShiroUser user1 = ShiroExtUtil.getUser(); |
| | | ShiroUser user1 = shiroExtUtil.getUser(); |
| | | User user2 = userService.selectById(user1.getId()); |
| | | TCompany tCompany = companyService.selectById(user2.getObjectId()); |
| | | SaveStaffNodeRequest request1 = new SaveStaffNodeRequest(); |
| | | request1.setMobile(user2.getPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEmpName(user.getName()); |
| | | request1.setEmpNickname(user.getName()); |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | | request1.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request1); |
| | | Long empId = saveStaffNode.getEmpId(); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(user.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request1 = new SaveStaffNodeRequest(); |
| | | request1.setMobile(tCompany.getPrincipalPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEmpName(user.getName()); |
| | | request1.setEmpNickname(user.getName()); |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | | request1.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request1); |
| | | empId = saveStaffNode.getEmpId(); |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | |
| | | // 完善账号信息 |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | User oldUser = userService.selectById(user.getId()); |
| | | ShiroUser user1 = ShiroExtUtil.getUser(); |
| | | ShiroUser user1 = shiroExtUtil.getUser(); |
| | | User user2 = userService.selectById(user1.getId()); |
| | | TCompany tCompany = companyService.selectById(user2.getObjectId()); |
| | | //调用中台接口 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(oldUser.getEmpId()); |
| | | request.setMobile(user2.getPhone()); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); |
| | | Long empId = null; |
| | | if (null == staffNode || "0".equals(staffNode.getIsValid())) { |
| | | SaveStaffNodeRequest request1 = new SaveStaffNodeRequest(); |
| | | request1.setMobile(user2.getPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEmpName(user.getName()); |
| | | request1.setEmpNickname(user.getName()); |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | | request1.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request1); |
| | | empId = saveStaffNode.getEmpId(); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(user.getPhone(), tCompany.getEnterCode()); |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request1 = new SaveStaffNodeRequest(); |
| | | request1.setMobile(tCompany.getPrincipalPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEmpName(user.getName()); |
| | | request1.setEmpNickname(user.getName()); |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | | request1.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request1); |
| | | empId = saveStaffNode.getEmpId(); |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | } else { |
| | | EditStaffNodeRequest request1 = new EditStaffNodeRequest(); |
| | | request1.setEmpId(staffNode.getEmpId()); |
| | | request1.setMobile(user2.getPhone()); |
| | | request1.setMobile(tCompany.getPrincipalPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEnterId(Long.valueOf(tCompany.getEnterCode())); |
| | | request1.setEmpName(user.getName()); |
| | |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | | request1.setHideMobile(0); |
| | | EmployeeUtil.editStaffNode(request1); |
| | | empId = staffNode.getEmpId(); |
| | | EmployeeUtil.editStaffNode(request1); |
| | | empId = staffNode.getEmpId(); |
| | | } |
| | | oldUser.setEmpId(empId); |
| | | oldUser.setEntercode(tCompany.getEnterCode()); |
| | |
| | | user.setEntercode(tCompany.getEnterCode()); |
| | | user.setEnterId(Long.valueOf(tCompany.getEnterCode())); |
| | | |
| | | if (ShiroExtUtil.getUser().isAdmin) { |
| | | if (shiroExtUtil.getUser().isAdmin) { |
| | | this.userService.updateById(UserFactory.editUser(user, oldUser)); |
| | | return SUCCESS_TIP; |
| | | } else { |
| | | ShiroUser shiroUser = ShiroExtUtil.getUser(); |
| | | ShiroUser shiroUser = shiroExtUtil.getUser(); |
| | | if (shiroUser.getId().equals(user.getId())) { |
| | | this.userService.updateById(UserFactory.editUser(user, oldUser)); |
| | | return SUCCESS_TIP; |
| | |
| | | throw new GunsException(BizExceptionEnum.CANT_DELETE_ADMIN); |
| | | } |
| | | User user = userService.selectById(userId); |
| | | ShiroUser user1 = ShiroExtUtil.getUser(); |
| | | ShiroUser user1 = shiroExtUtil.getUser(); |
| | | User user2 = userService.selectById(user1.getId()); |
| | | TCompany tCompany = companyService.selectById(user2.getObjectId()); |
| | | //调用中台接口 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(user.getEmpId()); |
| | | request.setMobile(user2.getPhone()); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); |
| | | if (null != staffNode && "1".equals(staffNode.getIsValid())) { |
| | | DeleteStafNodeRequest request1 = new DeleteStafNodeRequest(); |
| | | request1.setEmpId(user.getEnterId()); |
| | | request1.setMobile(user2.getPhone()); |
| | | request1.setMobile(tCompany.getPrincipalPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | EmployeeUtil.ecrmDeleteStafNode(request1); |
| | | } |
| | |
| | | @Resource |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到出租车订单首页 |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderTaxiService.getTaxiOrderList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), orderNum, orderSource, userName, userPhone, passengers, passengersPhone, driver, state)); |
| | | page.setRecords(tOrderTaxiService.getTaxiOrderList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), orderNum, orderSource, userName, userPhone, passengers, passengersPhone, driver, state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * |
| | |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getOrderTrack", method = RequestMethod.POST) |
| | | public ResultUtil getOrderTrack(String orderDetailId) { |
| | | public ResultUtil getOrderTrack(Integer orderDetailId) { |
| | | if (ToolUtil.isNotEmpty(orderDetailId)) { |
| | | try { |
| | | Query query = new Query() |
| | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOrderTaxi tOrderTaxi) { |
| | | if (ToolUtil.isEmpty(tOrderTaxi.getStartLat()) || ToolUtil.isEmpty(tOrderTaxi.getStartLon())) { |
| | | return "请选择有效的上车地点"; |
| | | } |
| | | if (ToolUtil.isEmpty(tOrderTaxi.getEndLat()) || ToolUtil.isEmpty(tOrderTaxi.getEndLon())) { |
| | | return "请选择有效的下车地点"; |
| | | } |
| | | TUser user = userService.selectOne(new EntityWrapper<TUser>().eq("phone", tOrderTaxi.getPassengersPhone())); |
| | | if (ToolUtil.isNotEmpty(user)) {/// 用户是平台用户 |
| | | tOrderTaxi.setOrderNum("TAXI" + String.valueOf(1000000 + tOrderTaxiService.selectList(null).size() + 1).substring(1)); |
| | |
| | | tUser.setInsertTime(DateUtil.parseTime(DateUtil.getTime())); |
| | | tUser.setPhone(tOrderTaxi.getPassengersPhone()); |
| | | tUser.setName(tOrderTaxi.getPassengers()); |
| | | tUser.setNickName("QYT" + String.valueOf(1000000 + userService.selectList(null).size() + 1).substring(1)); |
| | | tUser.setNickName("GRJY" + String.valueOf(1000000 + userService.selectList(null).size() + 1).substring(1)); |
| | | userService.insert(tUser); |
| | | |
| | | /// 存入订单信息 |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.CarRentalMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private ITCarBrandService carBrandService; |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | @Autowired |
| | | private IMessNumService messNumService; |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService systemNoticeService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> list(String createTime, String title, Integer brandId, String insertUser, List<Integer> status, Integer userType, Integer offset, Integer limit) throws Exception { |
| | | Integer companyId = ShiroExtUtil.getUser().getRoleType() == 1 ? null : ShiroExtUtil.getUser().getObjectId(); |
| | | String start = ""; |
| | | String end = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | start = split[0]; |
| | | end = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.list(companyId, start, end, title, brandId, insertUser, status, userType, offset, limit); |
| | | int count = this.baseMapper.listCount(companyId, start, end, title, brandId, insertUser, status, userType); |
| | | map.put("rows", list); |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | @Autowired |
| | | private IMessNumService messNumService; |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService systemNoticeService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> list(String createTime, String title, Integer brandId, String insertUser, List<Integer> status, Integer userType, Integer offset, Integer limit) throws Exception { |
| | | Integer companyId = shiroExtUtil.getUser().getRoleType() == 1 ? null : shiroExtUtil.getUser().getObjectId(); |
| | | String start = ""; |
| | | String end = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | start = split[0]; |
| | | end = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.list(companyId, start, end, title, brandId, insertUser, status, userType, offset, limit); |
| | | int count = this.baseMapper.listCount(companyId, start, end, title, brandId, insertUser, status, userType); |
| | | map.put("rows", list); |
| | | map.put("total", count); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil addCarRental(CarRental carRental) throws Exception { |
| | | carRental.setUserType(3); |
| | | carRental.setUserId(ShiroExtUtil.getUser().getObjectId()); |
| | | TCarBrand tCarBrand = carBrandService.selectById(carRental.getBrandId()); |
| | | carRental.setBrandName(tCarBrand.getName()); |
| | | TRegion region = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getProvinceCode())); |
| | | carRental.setProvinceName(region.getName()); |
| | | region = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getCityCode())); |
| | | carRental.setCityName(region.getName()); |
| | | carRental.setCreateTime(new Date()); |
| | | carRental.setFirstPageShow(2); |
| | | carRental.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1 && carRental.getStatus() == 1) { |
| | | carRental.setStatus(4); |
| | | } |
| | | this.insert(carRental); |
| | | return ResultUtil.success(); |
| | | carRental.setUserType(3); |
| | | carRental.setUserId(shiroExtUtil.getUser().getObjectId()); |
| | | TCarBrand tCarBrand = carBrandService.selectById(carRental.getBrandId()); |
| | | carRental.setBrandName(tCarBrand.getName()); |
| | | TRegion region = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getProvinceCode())); |
| | | carRental.setProvinceName(region.getName()); |
| | | region = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getCityCode())); |
| | | carRental.setCityName(region.getName()); |
| | | carRental.setCreateTime(new Date()); |
| | | carRental.setFirstPageShow(2); |
| | | carRental.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1 && carRental.getStatus() == 1) { |
| | | carRental.setStatus(4); |
| | | } |
| | | this.insert(carRental); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityHistory; |
| | | import com.stylefeng.guns.modular.system.dao.DriverActivityHistoryMapper; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityHistory; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityHistoryService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | @Service |
| | | public class DriverActivityHistoryServiceImpl extends ServiceImpl<DriverActivityHistoryMapper, DriverActivityHistory> implements IDriverActivityHistoryService { |
| | | @Override |
| | | public List<Map<String, Object>> getList(Page<Map<String, Object>> page, Integer activityId, Integer type) { |
| | | return this.baseMapper.getList(page,activityId,type); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getListt(Integer activityId, Integer type) { |
| | | return this.baseMapper.getListt(activityId, type); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getList(Page<Map<String, Object>> page, Integer activityId, Integer type) { |
| | | return this.baseMapper.getList(page, activityId, type); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getListt(Integer activityId, Integer type) { |
| | | return this.baseMapper.getListt(activityId, type); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> rewardDetailsList(String driverName, String driverPhone, String createTime, Integer offset, Integer limit) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.rewardDetailsList(ShiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime, offset, limit); |
| | | int count = this.baseMapper.rewardDetailsListCount(ShiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime); |
| | | Double aDouble = this.baseMapper.rewardDetailsListSum(ShiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("insertTime", "合计"); |
| | | map1.put("money", aDouble); |
| | | list.add(map1); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("rows", list); |
| | | map.put("total", count); |
| | | return map; |
| | | } |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.rewardDetailsList(shiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime, offset, limit); |
| | | int count = this.baseMapper.rewardDetailsListCount(shiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime); |
| | | Double aDouble = this.baseMapper.rewardDetailsListSum(shiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("insertTime", "合计"); |
| | | map1.put("money", aDouble); |
| | | list.add(map1); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("rows", list); |
| | | map.put("total", count); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public HSSFWorkbook exportRewardDetails(String driverName, String driverPhone, String createTime) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.rewardDetailsList(ShiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime, null, null); |
| | | String[] title = new String[]{"时间", "司机名称", "活动名称", "奖励支出"}; |
| | | String[][] values = new String[list.size()][5]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> map = list.get(i); |
| | | values[i][0] = null != map.get("insertTime") ? map.get("insertTime").toString() : ""; |
| | | values[i][1] = null != map.get("name") ? map.get("name").toString() : ""; |
| | | values[i][2] = null != map.get("activityName") ? map.get("activityName").toString() : ""; |
| | | values[i][3] = null != map.get("money") ? map.get("money").toString() : ""; |
| | | } |
| | | |
| | | return ExcelUtil.getHSSFWorkbook("奖励明细", title, values, null); |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.rewardDetailsList(shiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime, null, null); |
| | | String[] title = new String[]{"时间", "司机名称", "活动名称", "奖励支出"}; |
| | | String[][] values = new String[list.size()][5]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> map = list.get(i); |
| | | values[i][0] = null != map.get("insertTime") ? map.get("insertTime").toString() : ""; |
| | | values[i][1] = null != map.get("name") ? map.get("name").toString() : ""; |
| | | values[i][2] = null != map.get("activityName") ? map.get("activityName").toString() : ""; |
| | | values[i][3] = null != map.get("money") ? map.get("money").toString() : ""; |
| | | } |
| | | |
| | | return ExcelUtil.getHSSFWorkbook("奖励明细", title, values, null); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.DriverActivity; |
| | | import com.stylefeng.guns.modular.system.dao.DriverActivityMapper; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivity; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityOnline; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityOrder; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityRegistered; |
| | |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityOrderService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityRegisteredService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityService; |
| | | 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; |
| | | |
| | | import java.math.BigDecimal; |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | @Service |
| | | public class DriverActivityServiceImpl extends ServiceImpl<DriverActivityMapper, DriverActivity> implements IDriverActivityService { |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverActivityOnlineService driverActivityOnlineService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverActivityOrderService driverActivityOrderService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverActivityRegisteredService driverActivityRegisteredService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, |
| | | Integer companyType, |
| | | Integer companyId) { |
| | | return this.baseMapper.getList(page,beginTime,endTime,name,companyType,companyId); |
| | | return this.baseMapper.getList(page, beginTime, endTime, name, companyType, companyId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void insertOrUpdate(Integer id, String staTime, String startTime, String num1, Double num2, Double num3, Integer num4, Double num5, Integer num6, Double num7, Integer num8, Double num9, Integer num10, Double num11) { |
| | | //判断id是否为空,为空执行添加,或者执行修改 |
| | |
| | | String[] timeArray = startTime.split(" - "); |
| | | Date startTimes = DateUtil.getDate_str3(timeArray[0]); |
| | | Date endTimes = DateUtil.getDate_str3(timeArray[1]); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Date nowDay = new Date(); |
| | | //添加活动 |
| | | DriverActivity driverActivity = new DriverActivity(); |
| | | driverActivity.setInsertTime(nowDay); |
| | | driverActivity.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | driverActivity.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | driverActivity.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | driverActivity.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | driverActivity.setStatus(driverActivity.getCompanyType() == 1 ? 3 : 1); |
| | | driverActivity.setName(num1); |
| | | driverActivity.setStartTime(startTimes); |
| | |
| | | String[] timeArray = startTime.split(" - "); |
| | | Date startTimes = DateUtil.getDate_str3(timeArray[0]); |
| | | Date endTimes = DateUtil.getDate_str3(timeArray[1]); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | |
| | | Date nowDay = new Date(); |
| | | //添加活动 |
| | | DriverActivity driverActivity = new DriverActivity(); |
| | | driverActivity.setId(id); |
| | | driverActivity.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | driverActivity.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | driverActivity.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | driverActivity.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | driverActivity.setStatus(driverActivity.getCompanyType() == 1 ? 3 : 1); |
| | | driverActivity.setName(num1); |
| | | driverActivity.setStartTime(startTimes); |
| | |
| | | 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.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.IncomeMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.Income; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderCallService orderCallService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderCharteredCarService orderCharteredCarService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param userType |
| | |
| | | Map<String, Object> maps = new HashMap<>(); |
| | | |
| | | List<Map<String, Object>> datas = new ArrayList<>(); |
| | | List<Map<String, Object>> list2 = this.baseMapper.summaryOfIncomeDetailsListGroupSum1(1, ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, offset, limit); |
| | | List<Map<String, Object>> list2 = this.baseMapper.summaryOfIncomeDetailsListGroupSum1(1, shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, offset, limit); |
| | | for (Map<String, Object> income : list2) { |
| | | Double orderMoney = Double.valueOf(null != income.get("orderMoney") ? income.get("orderMoney").toString() : "0"); |
| | | Double payMoney = Double.valueOf(income.get("payMoney").toString()); |
| | |
| | | } |
| | | |
| | | List<Map<String, Object>> datas1 = new ArrayList<>(); |
| | | list2 = this.baseMapper.summaryOfIncomeDetailsListGroupSum1(1, ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | list2 = this.baseMapper.summaryOfIncomeDetailsListGroupSum1(1, shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | for (Map<String, Object> income : list2) { |
| | | Double orderMoney = Double.valueOf(null != income.get("orderMoney") ? income.get("orderMoney").toString() : "0"); |
| | | Double payMoney = Double.valueOf(income.get("payMoney").toString()); |
| | |
| | | public HSSFWorkbook exportSummaryOfIncomeDetails(String insertTime, Integer orderType, Integer incomeType, String name, String phone) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(insertTime)){ |
| | | if (ToolUtil.isNotEmpty(insertTime)) { |
| | | String[] split = insertTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | |
| | | List<Map<String, Object>> list = this.baseMapper.summaryOfIncomeDetailsListGroupSum1(1, ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | List<Map<String, Object>> list = this.baseMapper.summaryOfIncomeDetailsListGroupSum1(1, shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | List<Map<String, Object>> datas = new ArrayList<>(); |
| | | Integer num = 0; |
| | | |
| | | |
| | | for (Map<String, Object> income : list) { |
| | | Double orderMoney = Double.valueOf(null != income.get("orderMoney") ? income.get("orderMoney").toString() : "0"); |
| | | Double payMoney = Double.valueOf(income.get("payMoney").toString()); |
| | |
| | | Double overtimeDeduction = Double.valueOf(income.get("overtimeDeduction").toString()); |
| | | Double complaint = Double.valueOf(income.get("complaint").toString()); |
| | | String insertTime1 = income.get("insertTime").toString(); |
| | | Double taxiCardRevenue = Double.valueOf(new BigDecimal(income.get("taxiCardRevenue").toString()).setScale(2,RoundingMode.HALF_UP).toString()); |
| | | Double taxiCardRevenue = Double.valueOf(new BigDecimal(income.get("taxiCardRevenue").toString()).setScale(2, RoundingMode.HALF_UP).toString()); |
| | | Double other = Double.valueOf(new BigDecimal(income.get("other").toString()).setScale(2,RoundingMode.HALF_UP).toString()); |
| | | money = orderMoney - money; |
| | | |
| | |
| | | } |
| | | Map<String, Object> maps = new HashMap<>(); |
| | | |
| | | List<Map<String, Object>> list1 = this.baseMapper.summaryOfSpendingDetailsList1(ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, offset, limit); |
| | | List<Map<String, Object>> list2 = this.baseMapper.summaryOfSpendingDetailsList1(ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | List<Map<String, Object>> list1 = this.baseMapper.summaryOfSpendingDetailsList1(shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, offset, limit); |
| | | List<Map<String, Object>> list2 = this.baseMapper.summaryOfSpendingDetailsList1(shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | BigDecimal orderRevenue = new BigDecimal("0"); |
| | | BigDecimal activityAward = new BigDecimal("0"); |
| | | BigDecimal other = new BigDecimal("0"); |
| | |
| | | map.put("all", all.toString()); |
| | | list1.add(map); |
| | | maps.put("rows", list1); |
| | | System.out.println("支出明细"+list1); |
| | | System.out.println("支出明细" + list1); |
| | | |
| | | list1 = this.baseMapper.summaryOfSpendingDetailsList1(ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | list1 = this.baseMapper.summaryOfSpendingDetailsList1(shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | maps.put("total", list1.size()); |
| | | return maps; |
| | | } |
| | |
| | | public HSSFWorkbook exportSummaryOfSpendingDetails(String insertTime, Integer orderType, Integer incomeType, String name, String phone) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(insertTime)){ |
| | | if (ToolUtil.isNotEmpty(insertTime)) { |
| | | String[] split = insertTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | |
| | | List<Map<String, Object>> list1 = this.baseMapper.summaryOfSpendingDetailsList1(ShiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | List<Map<String, Object>> list1 = this.baseMapper.summaryOfSpendingDetailsList1(shiroExtUtil.getUser().getObjectId(), startTime, endTime, orderType, incomeType, name, phone, null, null); |
| | | String[] title = new String[]{"时间", "订单类型", "收益类型", "司机名称", "司机手机号", "订单应支付金额", "平台奖励支出", "其他支出", "支出合计"}; |
| | | String[][] values = new String[list1.size()][9]; |
| | | int n = 0; |
| | |
| | | Object insertTime1 = map1.get("insertTime"); |
| | | values[n][0] = insertTime1.toString(); |
| | | values[n][1] = ""; |
| | | if(null != map1.get("orderType")){ |
| | | switch (Integer.valueOf(map1.get("orderType").toString())){ |
| | | if (null != map1.get("orderType")) { |
| | | switch (Integer.valueOf(map1.get("orderType").toString())) { |
| | | case 1: |
| | | values[n][1] = "快车"; |
| | | break; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.RecruitMapper; |
| | | import com.stylefeng.guns.modular.system.model.Recruit; |
| | | import com.stylefeng.guns.modular.system.service.IRecruitService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> implements IRecruitService { |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Override |
| | | public Map<String, Object> list(String createTime, String title, String experienceRequirements, String insertUser, String driverType, Integer offset, Integer limit) throws Exception { |
| | | Integer companyId = ShiroExtUtil.getUser().getRoleType() == 1 ? null : ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getRoleType() == 1 ? null : shiroExtUtil.getUser().getObjectId(); |
| | | String start = ""; |
| | | String end = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | start = split[0]; |
| | | end = split[1]; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private ITCarBrandService carBrandService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private IMessNumService messNumService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService systemNoticeService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> list(String createTime, String carLicensePlate, Integer brandId, String insertUser, List<Integer> status, Integer userType, Integer offset, Integer limit) throws Exception { |
| | | Integer companyId = ShiroExtUtil.getUser().getRoleType() == 1 ? null : ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getRoleType() == 1 ? null : shiroExtUtil.getUser().getObjectId(); |
| | | String start = ""; |
| | | String end = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | start = split[0]; |
| | | end = split[1]; |
| | |
| | | @Override |
| | | public ResultUtil addSellingCar(SellingCar sellingCar) throws Exception { |
| | | sellingCar.setUserType(3); |
| | | sellingCar.setUserId(ShiroExtUtil.getUser().getObjectId()); |
| | | sellingCar.setUserId(shiroExtUtil.getUser().getObjectId()); |
| | | TCarBrand tCarBrand = carBrandService.selectById(sellingCar.getBrandId()); |
| | | sellingCar.setBrandName(tCarBrand.getName()); |
| | | TRegion province = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", sellingCar.getProvinceCode())); |
| | |
| | | sellingCar.setCityName(city.getName()); |
| | | sellingCar.setCreateTime(new Date()); |
| | | sellingCar.setFirstPageShow(2); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1 && sellingCar.getStatus() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1 && sellingCar.getStatus() == 1) { |
| | | sellingCar.setStatus(4); |
| | | } |
| | | this.insert(sellingCar); |
| | |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | */ |
| | | @Service |
| | | public class TDriverServiceImpl extends ServiceImpl<TDriverMapper, TDriver> implements ITDriverService { |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getAuthDriverList(Page<Map<String, Object>> page, String beginTime, String endTime, String companyName, String phone, String account, Integer addType, Integer authState) { |
| | | return this.baseMapper.getAuthDriverList(page, beginTime, endTime, companyName, phone, account, addType, authState); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> getDriverById(Integer driverId) { |
| | | return this.baseMapper.getDriverById(driverId); |
| | |
| | | public List<Map<String, Object>> orderRevenueDetailsList(Page<Map<String, Object>> page, String driverName, String driverPhone, String createTime, Integer orderType) { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | startTime = createTime.split(" - ")[0]; |
| | | endTime = createTime.split(" - ")[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderRevenueDetailsList(page, driverName, driverPhone, startTime, endTime, ShiroExtUtil.getUser().getObjectId(), orderType); |
| | | |
| | | List<Map<String, Object>> list = this.baseMapper.orderRevenueDetailsList(page, driverName, driverPhone, startTime, endTime, shiroExtUtil.getUser().getObjectId(), orderType); |
| | | |
| | | page = new Page<>(0, 100000000); |
| | | List<Map<String, Object>> list1 = this.baseMapper.orderRevenueDetailsList(page, driverName, driverPhone, startTime, endTime, ShiroExtUtil.getUser().getObjectId(), orderType); |
| | | List<Map<String, Object>> list1 = this.baseMapper.orderRevenueDetailsList(page, driverName, driverPhone, startTime, endTime, shiroExtUtil.getUser().getObjectId(), orderType); |
| | | BigDecimal orderMoney = new BigDecimal("0"); |
| | | BigDecimal money = new BigDecimal("0"); |
| | | BigDecimal payMoney = new BigDecimal("0"); |
| | |
| | | public HSSFWorkbook exportOrderRevenueDetails(String driverName, String driverPhone, String createTime, Integer orderType) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | startTime = createTime.split(" - ")[0]; |
| | | endTime = createTime.split(" - ")[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new Page<>(0, 100000000); |
| | | List<Map<String, Object>> list = this.baseMapper.orderRevenueDetailsList(page, driverName, driverPhone, startTime, endTime, ShiroExtUtil.getUser().getObjectId(), orderType); |
| | | List<Map<String, Object>> list = this.baseMapper.orderRevenueDetailsList(page, driverName, driverPhone, startTime, endTime, shiroExtUtil.getUser().getObjectId(), orderType); |
| | | String[] title = new String[]{"交易时间", "收益类型", "订单类型", "订单ID", "下单用户昵称", "下单用户手机", "乘车用户姓名" |
| | | , "乘车用户手机", "起点", "终点", "司机名称", "司机手机号", "接单车辆", "支付类型", "订单原始金额", "平台抽佣金额", "司机订单收益支出"}; |
| | | String[][] values = new String[list.size()][17]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> d = list.get(i); |
| | | values[i][0]=null!=d.get("insertTime")?d.get("insertTime").toString():""; |
| | | values[i][1]=d.get("incomeType")==null?"": |
| | | d.get("incomeType").toString().equals("1")?"活动收入": |
| | | d.get("incomeType").toString().equals("2")?"跑单收入": |
| | | d.get("incomeType").toString().equals("3")?"取消订单收入": |
| | | d.get("incomeType").toString().equals("4")?"改派订单收入": |
| | | d.get("incomeType").toString().equals("6")?"感谢费": |
| | | values[i][0] = null != d.get("insertTime") ? d.get("insertTime").toString() : ""; |
| | | values[i][1] = d.get("incomeType") == null ? "" : |
| | | d.get("incomeType").toString().equals("1") ? "活动收入" : |
| | | d.get("incomeType").toString().equals("2") ? "跑单收入" : |
| | | d.get("incomeType").toString().equals("3") ? "取消订单收入" : |
| | | d.get("incomeType").toString().equals("4") ? "改派订单收入" : |
| | | d.get("incomeType").toString().equals("6") ? "感谢费" : |
| | | d.get("incomeType").toString().equals("7")?"超时扣款": |
| | | d.get("incomeType").toString().equals("8")?"投诉扣款": |
| | | d.get("incomeType").toString().equals("9")?"小件物流超时退款":""; |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderTaxiMapper; |
| | |
| | | |
| | | @Autowired |
| | | private ITReassignService reassignService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITLineService lineService; |
| | | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getTaxiOrderList(Page<Map<String, Object>> page, String beginTime, String endTime, Integer roleType, Integer nowUserId, String orderNum, Integer orderSource, String userName, String userPhone, String passengers, String passengersPhone, String driver, Integer state) { |
| | | return this.baseMapper.getTaxiOrderList(page, beginTime, endTime, roleType, nowUserId, orderNum, orderSource, userName, userPhone, passengers, passengersPhone, driver, state); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> getTaxiOrderDetailById(Integer orderId) { |
| | | return this.baseMapper.getTaxiOrderDetailById(orderId); |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryOtherIncomeDetail(Page<Map<String, Object>> page, String beginTime, String endTime, String orderNo, String name, String phone) { |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | return this.baseMapper.queryOtherIncomeDetail(page, beginTime, endTime, orderNo, name, phone,objectId); |
| | | } |
| | | |
| | |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time = format.format(date); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | List<Map<String, Object>> mapList = this.baseMapper.exportOtherIncomeDetail(beginTime, endTime, orderNo, name, phone, objectId); |
| | | String[] title = new String[] {"交易时间","订单号","下单用户昵称","下单用户手机号","感谢费"/*,"附加费"*/}; |
| | | String[] title = new String[]{"交易时间", "订单号", "下单用户昵称", "下单用户手机号", "感谢费"/*,"附加费"*/}; |
| | | String[][] values = new String[mapList.size()][]; |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | | Map<String,Object> d=mapList.get(i); |
| | | Map<String, Object> d = mapList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0]=null == d.get("insertTime") ? "" : d.get("insertTime").toString(); |
| | | values[i][1]=null == d.get("orderNum") ? "" : d.get("orderNum").toString(); |
| | | values[i][2]=null == d.get("nickName") ? "" : d.get("nickName").toString(); |
| | | values[i][3]=null == d.get("phone") ? "" : d.get("phone").toString(); |
| | | values[i][4]=null == d.get("thankYouFee") ? "0" : d.get("thankYouFee").toString(); |
| | | values[i][0] = null == d.get("insertTime") ? "" : d.get("insertTime").toString(); |
| | | values[i][1] = null == d.get("orderNum") ? "" : d.get("orderNum").toString(); |
| | | values[i][2] = null == d.get("nickName") ? "" : d.get("nickName").toString(); |
| | | values[i][3] = null == d.get("phone") ? "" : d.get("phone").toString(); |
| | | values[i][4] = null == d.get("thankYouFee") ? "0" : d.get("thankYouFee").toString(); |
| | | // values[i][5]=null == d.get("additionalFee") ? "0" : d.get("additionalFee").toString(); |
| | | } |
| | | String fileNameTitle="平台其他收入明细"; |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TPubWithdrawal; |
| | | import com.stylefeng.guns.modular.system.dao.TPubWithdrawalMapper; |
| | | import com.stylefeng.guns.modular.system.model.TPubWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITPubWithdrawalService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TPubWithdrawalServiceImpl extends ServiceImpl<TPubWithdrawalMapper, TPubWithdrawal> implements ITPubWithdrawalService { |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getWithdrawalList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, Integer withdrawalType) { |
| | | List<Map<String, Object>> withdrawalList = this.baseMapper.getWithdrawalList(page, beginTime, endTime, name, withdrawalType, ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | if (ShiroExtUtil.getUser().getObjectId() != 1) { |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | System.out.println(objectId); |
| | | |
| | | for (Map<String, Object> map : withdrawalList) { |
| | | if (ToolUtil.isNotEmpty(map.get("companyId")) && map.get("companyId").toString().equals(String.valueOf(objectId))) { |
| | | list.add(map); |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getWithdrawalList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, Integer withdrawalType) { |
| | | List<Map<String, Object>> withdrawalList = this.baseMapper.getWithdrawalList(page, beginTime, endTime, name, withdrawalType, shiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | if (shiroExtUtil.getUser().getObjectId() != 1) { |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | System.out.println(objectId); |
| | | |
| | | for (Map<String, Object> map : withdrawalList) { |
| | | if (ToolUtil.isNotEmpty(map.get("companyId")) && map.get("companyId").toString().equals(String.valueOf(objectId))) { |
| | | list.add(map); |
| | | } |
| | | } |
| | | // withdrawalList = withdrawalList.stream().filter(e -> (e.get("companyId").toString()).equals(ShiroKit.getUser().getObjectId())).collect(Collectors.toList()); |
| | | } else { |
| | | list = withdrawalList; |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | } else { |
| | | list = withdrawalList; |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getReportWithdrawalList(Page<Map<String, Object>> page, String beginTime, String endTime, String userId) { |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> orderWithdrawalDetailsList(String driverName, String driverPhone, String createTime, Integer offset, Integer limit) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, offset, limit); |
| | | int count = this.baseMapper.orderWithdrawalDetailsListCount(ShiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime); |
| | | List<Map<String, Object>> list1 = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, null, null); |
| | | BigDecimal money = new BigDecimal("0");//提现金额 |
| | | BigDecimal poundage = new BigDecimal("0");//手续费 |
| | | BigDecimal balance = new BigDecimal("0");//未提现金额 |
| | | BigDecimal realGetMoney = new BigDecimal("0");//司机实际到账金额 |
| | | BigDecimal oldBalance = new BigDecimal("0");//司机实际到账金额 |
| | | for (Map<String, Object> map1 : list1) { |
| | | money = money.add(new BigDecimal(null != map1.get("money") ? map1.get("money").toString() : "0")); |
| | | poundage = poundage.add(new BigDecimal(null != map1.get("poundage") ? map1.get("poundage").toString() : "0")); |
| | | balance = balance.add(new BigDecimal(null != map1.get("balance") ? map1.get("balance").toString() : "0")); |
| | | realGetMoney = realGetMoney.add(new BigDecimal(null != map1.get("realGetMoney") ? map1.get("realGetMoney").toString() : "0")); |
| | | oldBalance = oldBalance.add(new BigDecimal(null != map1.get("oldBalance") ? map1.get("oldBalance").toString() : "0")); |
| | | } |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("insertTime", "合计"); |
| | | map1.put("money", money.doubleValue()); |
| | | map1.put("poundage", poundage.doubleValue()); |
| | | map1.put("balance", balance.doubleValue()); |
| | | map1.put("realGetMoney", realGetMoney.doubleValue()); |
| | | map1.put("oldBalance", oldBalance.doubleValue()); |
| | | list.add(map1); |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(shiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, offset, limit); |
| | | int count = this.baseMapper.orderWithdrawalDetailsListCount(shiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime); |
| | | List<Map<String, Object>> list1 = this.baseMapper.orderWithdrawalDetailsList(shiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, null, null); |
| | | BigDecimal money = new BigDecimal("0");//提现金额 |
| | | BigDecimal poundage = new BigDecimal("0");//手续费 |
| | | BigDecimal balance = new BigDecimal("0");//未提现金额 |
| | | BigDecimal realGetMoney = new BigDecimal("0");//司机实际到账金额 |
| | | BigDecimal oldBalance = new BigDecimal("0");//司机实际到账金额 |
| | | for (Map<String, Object> map1 : list1) { |
| | | money = money.add(new BigDecimal(null != map1.get("money") ? map1.get("money").toString() : "0")); |
| | | poundage = poundage.add(new BigDecimal(null != map1.get("poundage") ? map1.get("poundage").toString() : "0")); |
| | | balance = balance.add(new BigDecimal(null != map1.get("balance") ? map1.get("balance").toString() : "0")); |
| | | realGetMoney = realGetMoney.add(new BigDecimal(null != map1.get("realGetMoney") ? map1.get("realGetMoney").toString() : "0")); |
| | | oldBalance = oldBalance.add(new BigDecimal(null != map1.get("oldBalance") ? map1.get("oldBalance").toString() : "0")); |
| | | } |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("insertTime", "合计"); |
| | | map1.put("money", money.doubleValue()); |
| | | map1.put("poundage", poundage.doubleValue()); |
| | | map1.put("balance", balance.doubleValue()); |
| | | map1.put("realGetMoney", realGetMoney.doubleValue()); |
| | | map1.put("oldBalance", oldBalance.doubleValue()); |
| | | list.add(map1); |
| | | |
| | | map.put("rows", list); |
| | | map.put("total", count); |
| | |
| | | |
| | | @Override |
| | | public HSSFWorkbook exportOrderWithdrawalDetails(String driverName, String driverPhone, String createTime) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, null, null); |
| | | String[] title = new String[]{"时间", "司机名称", "司机手机号", "司机可提现金额", "申请提现金额", "司机实际到账金额", "提现手续费", "司机未提现金额", "提现成功时间"}; |
| | | String[][] values = new String[list.size()][9]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> map = list.get(i); |
| | | values[i][0] = null != map.get("insertTime") ? map.get("insertTime").toString() : ""; |
| | | values[i][1] = null != map.get("name") ? map.get("name").toString() : ""; |
| | | values[i][2] = null != map.get("phone") ? map.get("phone").toString() : ""; |
| | | values[i][3] = null != map.get("oldBalance") ? map.get("oldBalance").toString() : ""; |
| | | values[i][4] = null != map.get("money") ? map.get("money").toString() : ""; |
| | | values[i][5] = null != map.get("realGetMoney") ? map.get("realGetMoney").toString() : ""; |
| | | values[i][6] = null != map.get("poundage") ? map.get("poundage").toString() : ""; |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(shiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, null, null); |
| | | String[] title = new String[]{"时间", "司机名称", "司机手机号", "司机可提现金额", "申请提现金额", "司机实际到账金额", "提现手续费", "司机未提现金额", "提现成功时间"}; |
| | | String[][] values = new String[list.size()][9]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> map = list.get(i); |
| | | values[i][0] = null != map.get("insertTime") ? map.get("insertTime").toString() : ""; |
| | | values[i][1] = null != map.get("name") ? map.get("name").toString() : ""; |
| | | values[i][2] = null != map.get("phone") ? map.get("phone").toString() : ""; |
| | | values[i][3] = null != map.get("oldBalance") ? map.get("oldBalance").toString() : ""; |
| | | values[i][4] = null != map.get("money") ? map.get("money").toString() : ""; |
| | | values[i][5] = null != map.get("realGetMoney") ? map.get("realGetMoney").toString() : ""; |
| | | values[i][6] = null != map.get("poundage") ? map.get("poundage").toString() : ""; |
| | | values[i][7] = null != map.get("balance") ? map.get("balance").toString() : ""; |
| | | values[i][8] = null != map.get("successTime") ? map.get("successTime").toString() : ""; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> rewardWithdrawalDetailsList(String driverName, String driverPhone, String createTime, Integer offset, Integer limit) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, offset, limit); |
| | | int count = this.baseMapper.orderWithdrawalDetailsListCount(ShiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime); |
| | | List<Map<String, Object>> list1 = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, null, null); |
| | | BigDecimal money = new BigDecimal("0");//提现金额 |
| | | BigDecimal poundage = new BigDecimal("0");//手续费 |
| | | BigDecimal balance = new BigDecimal("0");//未提现金额 |
| | | BigDecimal actualCredit = new BigDecimal("0");//实际到账 |
| | | BigDecimal oldBalance = new BigDecimal("0");//可提现 |
| | | for (Map<String, Object> map1 : list1) { |
| | | money = money.add(new BigDecimal(null != map1.get("money") ? map1.get("money").toString() : "0")); |
| | | poundage = poundage.add(new BigDecimal(null != map1.get("poundage") ? map1.get("poundage").toString() : "0")); |
| | | balance = balance.add(new BigDecimal(null != map1.get("balance") ? map1.get("balance").toString() : "0")); |
| | | actualCredit = actualCredit.add(new BigDecimal(null != map1.get("realGetMoney") ? map1.get("realGetMoney").toString() : "0")); |
| | | oldBalance = oldBalance.add(new BigDecimal(null != map1.get("oldBalance") ? map1.get("oldBalance").toString() : "0")); |
| | | } |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("insertTime", "合计"); |
| | | map1.put("money", money.doubleValue()); |
| | | map1.put("poundage", poundage.doubleValue()); |
| | | map1.put("balance", balance.doubleValue()); |
| | | map1.put("realGetMoney", actualCredit.doubleValue()); |
| | | map1.put("realGetMoney", actualCredit.doubleValue()); |
| | | map1.put("oldBalance", oldBalance.doubleValue()); |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(shiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, offset, limit); |
| | | int count = this.baseMapper.orderWithdrawalDetailsListCount(shiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime); |
| | | List<Map<String, Object>> list1 = this.baseMapper.orderWithdrawalDetailsList(shiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, null, null); |
| | | BigDecimal money = new BigDecimal("0");//提现金额 |
| | | BigDecimal poundage = new BigDecimal("0");//手续费 |
| | | BigDecimal balance = new BigDecimal("0");//未提现金额 |
| | | BigDecimal actualCredit = new BigDecimal("0");//实际到账 |
| | | BigDecimal oldBalance = new BigDecimal("0");//可提现 |
| | | for (Map<String, Object> map1 : list1) { |
| | | money = money.add(new BigDecimal(null != map1.get("money") ? map1.get("money").toString() : "0")); |
| | | poundage = poundage.add(new BigDecimal(null != map1.get("poundage") ? map1.get("poundage").toString() : "0")); |
| | | balance = balance.add(new BigDecimal(null != map1.get("balance") ? map1.get("balance").toString() : "0")); |
| | | actualCredit = actualCredit.add(new BigDecimal(null != map1.get("realGetMoney") ? map1.get("realGetMoney").toString() : "0")); |
| | | oldBalance = oldBalance.add(new BigDecimal(null != map1.get("oldBalance") ? map1.get("oldBalance").toString() : "0")); |
| | | } |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("insertTime", "合计"); |
| | | map1.put("money", money.doubleValue()); |
| | | map1.put("poundage", poundage.doubleValue()); |
| | | map1.put("balance", balance.doubleValue()); |
| | | map1.put("realGetMoney", actualCredit.doubleValue()); |
| | | map1.put("realGetMoney", actualCredit.doubleValue()); |
| | | map1.put("oldBalance", oldBalance.doubleValue()); |
| | | list.add(map1); |
| | | |
| | | map.put("rows", list); |
| | |
| | | |
| | | @Override |
| | | public HSSFWorkbook exportRewardWithdrawalDetails(String driverName, String driverPhone, String createTime) throws Exception { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, null, null); |
| | | String[] title = new String[]{"时间", "司机名称", "司机手机号", "司机可提现金额", "申请提现金额", "提现手续费", "司机实际到账金额", "奖励未提现金额"}; |
| | | String[][] values = new String[list.size()][8]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> map = list.get(i); |
| | | values[i][0] = null != map.get("insertTime") ? map.get("insertTime").toString() : ""; |
| | | values[i][1] = null != map.get("name") ? map.get("name").toString() : ""; |
| | | values[i][2] = null != map.get("phone") ? map.get("phone").toString() : ""; |
| | | values[i][3] = null != map.get("oldBalance") ? map.get("oldBalance").toString() : ""; |
| | | values[i][4] = null != map.get("money") ? map.get("money").toString() : ""; |
| | | values[i][5] = null != map.get("poundage") ? map.get("poundage").toString() : ""; |
| | | values[i][6] = null != map.get("realGetMoney") ? map.get("realGetMoney").toString() : ""; |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (ToolUtil.isNotEmpty(createTime)) { |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(shiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, null, null); |
| | | String[] title = new String[]{"时间", "司机名称", "司机手机号", "司机可提现金额", "申请提现金额", "提现手续费", "司机实际到账金额", "奖励未提现金额"}; |
| | | String[][] values = new String[list.size()][8]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Map<String, Object> map = list.get(i); |
| | | values[i][0] = null != map.get("insertTime") ? map.get("insertTime").toString() : ""; |
| | | values[i][1] = null != map.get("name") ? map.get("name").toString() : ""; |
| | | values[i][2] = null != map.get("phone") ? map.get("phone").toString() : ""; |
| | | values[i][3] = null != map.get("oldBalance") ? map.get("oldBalance").toString() : ""; |
| | | values[i][4] = null != map.get("money") ? map.get("money").toString() : ""; |
| | | values[i][5] = null != map.get("poundage") ? map.get("poundage").toString() : ""; |
| | | values[i][6] = null != map.get("realGetMoney") ? map.get("realGetMoney").toString() : ""; |
| | | values[i][7] = null != map.get("balance") ? map.get("balance").toString() : ""; |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.dao.UserActivityMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private IUserActivityInviteService userActivityInviteService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserActivityRedenvelopeService userActivityRedenvelopeService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserActivityRegisteredService userActivityRegisteredService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Override |
| | | public void insertOrUpdate(Integer id, String name, String startTime, Integer registCouponId, Integer registEnable, Integer registNumber, Integer registEffective, |
| | | Integer inviteCouponId, Integer inviteEnable, Integer inviteNumber, Integer inviteEffective, Integer balanceEnable, String balanceInfo, |
| | | Integer discountEnable, Double discountSpecial, Double discountTaxi, Double discountLogistics, Integer redenvelopeId, Integer redenvelopeEnable, |
| | | Double registerPrice, Double invitationPrice, Double redPrice) { |
| | | if(id==null) { |
| | | if (id == null) { |
| | | String[] timeArray = startTime.split(" - "); |
| | | Date startTimes = DateUtil.getDate_str3(timeArray[0]); |
| | | Date endTimes = DateUtil.getDate_str3(timeArray[1]); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Date nowDay = new Date(); |
| | | UserActivity userActivity = new UserActivity(); |
| | | userActivity.setInsertTime(nowDay); |
| | | userActivity.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | userActivity.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | userActivity.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | userActivity.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | userActivity.setStatus(userActivity.getCompanyType() == 1 ? 3 : 1); |
| | | userActivity.setName(name); |
| | | userActivity.setStartTime(startTimes); |
| | |
| | | String[] timeArray = startTime.split(" - "); |
| | | Date startTimes = DateUtil.getDate_str3(timeArray[0]); |
| | | Date endTimes = DateUtil.getDate_str3(timeArray[1]); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Date nowDay = new Date(); |
| | | UserActivity userActivity = new UserActivity(); |
| | | userActivity.setId(id); |
| | | userActivity.setInsertTime(nowDay); |
| | | userActivity.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | userActivity.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | userActivity.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | userActivity.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | userActivity.setStatus(userActivity.getCompanyType() == 1 ? 3 : 1); |
| | | userActivity.setName(name); |
| | | userActivity.setStartTime(startTimes); |
| | |
| | | userActivityRedenvelopeService.delete(new EntityWrapper<UserActivityRedenvelope>().eq("userActivityId", id)); |
| | | userActivityRegisteredService.delete(new EntityWrapper<UserActivityRegistered>().eq("userActivityId", id)); |
| | | //添加注册奖励 |
| | | if(registCouponId!=null){ |
| | | if (registCouponId != null) { |
| | | UserActivityRegistered userActivityRegistered = new UserActivityRegistered(); |
| | | userActivityRegistered.setCouponId(registCouponId); |
| | | userActivityRegistered.setEnable(registEnable); |
| | |
| | | public class EmployeeUtil { |
| | | |
| | | |
| | | /** |
| | | * 企业增加员工 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static SaveStaffNode saveStaffNode(SaveStaffNodeRequest request){ |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/saveStaffNode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | | Date nowdate = new Date(); |
| | | SimpleDateFormat date = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | |
| | | String timeStamp = date.format(nowdate); |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【企业增加员工】请求地址:" + url); |
| | | log.info("【企业增加员工】请求参数:" + JSON.toJSONString(contentMap)); |
| | | String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, contentMap); |
| | | log.info("【企业增加员工】请求结果:" + result); |
| | | JSONObject jsonObject = JSON.parseObject(result); |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【企业增加员工】请求失败:" + result); |
| | | throw new RuntimeException("【企业增加员工】请求失败:" + result); |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【企业增加员工】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【企业增加员工】失败:" + object.toJSONString()); |
| | | } |
| | | SaveStaffNode saveStaffNode = jsonObject.getObject("data", SaveStaffNode.class); |
| | | return saveStaffNode; |
| | | public static void main(String[] args) { |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile("18798410042"); |
| | | request.setEntercode("9811000039358999"); |
| | | request.setEmpName("莫萍"); |
| | | request.setEmpNickname("莫萍"); |
| | | request.setLoginNo("15180824124"); |
| | | request.setEmpSex("女"); |
| | | request.setMphone("15180824124"); |
| | | request.setEmail("15180824124" + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | | request.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request); |
| | | System.out.println(saveStaffNode); |
| | | } |
| | | |
| | | |
| | |
| | | StaffNodeInfo staffNodeInfo = object.getObject("data", StaffNodeInfo.class); |
| | | return staffNodeInfo; |
| | | } |
| | | |
| | | /** |
| | | * 企业增加员工 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static SaveStaffNode saveStaffNode(SaveStaffNodeRequest request){ |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/saveStaffNode"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> contentMap = new HashMap<String, Object>(); |
| | | Date nowdate = new Date(); |
| | | SimpleDateFormat date = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | |
| | | String timeStamp = date.format(nowdate); |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | contentMap.put(SystemParameterNames.getAppKey(), appKey); |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put("content", new Gson().toJson(request)); |
| | | log.info("【企业增加员工】请求地址:" + url); |
| | | log.info("【企业增加员工】请求参数:" + JSON.toJSONString(contentMap)); |
| | | String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, contentMap); |
| | | log.info("【企业增加员工】请求结果:" + result); |
| | | JSONObject jsonObject = JSON.parseObject(result); |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【企业增加员工】请求失败:" + result); |
| | | throw new RuntimeException("【企业增加员工】请求失败:" + result); |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【企业增加员工】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【企业增加员工】失败:" + object.toJSONString()); |
| | | } |
| | | SaveStaffNode saveStaffNode = object.getObject("data", SaveStaffNode.class); |
| | | return saveStaffNode; |
| | | } |
| | | } |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | // CreateEnterpriseRequest request = new CreateEnterpriseRequest(); |
| | | // request.setName("黔南云码通数字产业运营有限公司"); |
| | | // request.setNickName("黔南云码通"); |
| | | // request.setIndustry_code("123456789"); |
| | | // request.setMobile("15180824124"); |
| | | // request.setMobileFlag("1"); |
| | | // CreateEnterprise enterprise = EnterpriseUtil.createEnterprise(request); |
| | | // System.out.println(enterprise); |
| | | // |
| | | |
| | | CheckEnterExist checkEnterExist = EnterpriseUtil.checkEnterNameExist("黔南云码通数字产业运营有限公司"); |
| | | System.out.println(checkEnterExist); |
| | | } |
| | | } |
| | |
| | | * @Date 2025/6/6 15:03 |
| | | */ |
| | | public interface QianYunTongProperties { |
| | | /** |
| | | * 小程序appId |
| | | */ |
| | | String appId = "wxcc3c9058e2b294db"; |
| | | /************************************开发/测试start***********************************/ |
| | | |
| | | // /** |
| | | // * appkey |
| | | // */ |
| | | // String appkey = "10001104"; |
| | | // /** |
| | | // * 私钥地址 |
| | | // */ |
| | | // String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | // /** |
| | | // * 私钥地址 |
| | | // */ |
| | | // String privateKeyPath = "/root/server/app/key/private_key_test.pem"; |
| | | // /** |
| | | // * 消费者账号 |
| | | // */ |
| | | // String userName = "xiaofei"; |
| | | // /** |
| | | // * 状态 |
| | | // * 1:生产环境 |
| | | // * 2:测试环境 |
| | | // */ |
| | | // String status = "1"; |
| | | // /** |
| | | // * API地址 |
| | | // */ |
| | | // String apiUrl = "https://test-zhongtai.stqcloud.com:10070"; |
| | | // /** |
| | | // * 桶名 |
| | | // */ |
| | | // String bucketName = "bucuTest0625"; |
| | | |
| | | /************************************开发/测试end***********************************/ |
| | | |
| | | /************************************生产start***********************************/ |
| | | |
| | | /** |
| | | * appkey |
| | | */ |
| | |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | | String privateKeyPath = "/root/server/app/key/private_key_test.pem"; |
| | | // String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key.pem"; |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | | String privateKeyPath = "/root/server/app/key/private_key.pem"; |
| | | /** |
| | | * 消费者账号 |
| | | */ |
| | | String userName = "xiaofei"; |
| | | String userName = "xiwang"; |
| | | /** |
| | | * 状态 |
| | | * 1:生产环境 |
| | |
| | | /** |
| | | * API地址 |
| | | */ |
| | | String apiUrl = "https://test-zhongtai.stqcloud.com:10070"; |
| | | String apiUrl = "http://jjzhongtai.stqcloud.com:10010"; |
| | | /** |
| | | * 桶名 |
| | | */ |
| | | String bucketName = "bucuTest0625"; |
| | | String bucketName = "qyt20250702"; |
| | | |
| | | /************************************生产end***********************************/ |
| | | |
| | | |
| | | |
| | | /** |
| | | * 小程序appId |
| | | */ |
| | | String appId = "wxcc3c9058e2b294db"; |
| | | /** |
| | | * HOS的基础路径(公共前缀) |
| | | */ |
| | |
| | | package com.stylefeng.guns.modular.system.util.qianyuntong; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.gson.Gson; |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 微信小程序登录 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static LoginWeChatXiao loginWeChatXiao(String code) { |
| | | HttpRequest post = HttpUtil.createPost("https://casme.teamshub.com/webapp-backstage/ajax/loginWeChatXiao/v1.0"); |
| | | post.header("Content-Type", "text/plain;charset=UTF-8"); |
| | | post.header("Accept-encodeing", "UTF-8"); |
| | | JSONObject body = new JSONObject(); |
| | | body.put("version", "1.0"); |
| | | try { |
| | | body.put("id", UUIDUtil.getRandomCode(6)); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | body.put("type", "loginWeChatXiao"); |
| | | body.put("action", "request"); |
| | | body.put("code", code); |
| | | body.put("appId", QianYunTongProperties.appId); |
| | | post.body(body.toJSONString()); |
| | | HttpResponse execute = post.execute(); |
| | | if (200 != execute.getStatus()) { |
| | | log.error("微信登录失败"); |
| | | return null; |
| | | } |
| | | JSONObject jsonObject = JSON.parseObject(execute.body()); |
| | | Integer status = jsonObject.getInteger("status"); |
| | | if (0 != status) { |
| | | log.error("微信登录失败:" + jsonObject.getString("desc")); |
| | | return null; |
| | | } |
| | | LoginWeChatXiao loginWeChatXiao = jsonObject.getObject("data", LoginWeChatXiao.class); |
| | | return loginWeChatXiao; |
| | | public static void main(String[] args) { |
| | | List<QYTUserInfo> userInfoByPhone = getUserInfoByPhone("18798410042", "9811000039358999"); |
| | | System.out.println(userInfoByPhone); |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 员工编号 |
| | | */ |
| | | private String empId; |
| | | private Long empId; |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | |
| | | /** |
| | | * 部门ID |
| | | */ |
| | | private String deptId; |
| | | private Long deptId; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.model.TNotices; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.util.JpushUtil; |
| | | import com.stylefeng.guns.modular.system.util.task.base.AbstractJob; |
| | | import org.quartz.JobDataMap; |
| | | import org.quartz.JobExecutionContext; |
| | | import org.quartz.JobExecutionException; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 添加公告记录 |
| | |
| | | TNotices tNotices = tNoticesService.selectById(noticeId); |
| | | if (SinataUtil.isNotEmpty(tNotices)){ |
| | | if (tNotices.getIsUser() == 2){ |
| | | List<TUser> tUsers = tUserService.selectList(new EntityWrapper<TUser>().eq("state",1)); |
| | | List<TUser> tUsers = tUserService.selectList(new EntityWrapper<TUser>().eq("state", 1).ne("flag", 3)); |
| | | //发送公告给用户 |
| | | for (TUser user : tUsers){ |
| | | TSystemNotice notice = new TSystemNotice(); |
| | |
| | | } |
| | | } |
| | | if (tNotices.getIsDriver() == 2){ |
| | | List<TDriver> tDrivers = tDriverService.selectList(new EntityWrapper<TDriver>().eq("authState",2)); |
| | | List<TDriver> tDrivers = tDriverService.selectList(new EntityWrapper<TDriver>().eq("authState", 2).ne("flag", 3)); |
| | | //发送公告给用户 |
| | | for (TDriver driver : tDrivers){ |
| | | TSystemNotice notice = new TSystemNotice(); |
| | |
| | | map.put("id", record.getId()); //对象ID |
| | | JpushUtil.SendPushWithCustomForTransmission(String.valueOf(userInfo.getId()),"【超级过客】提醒您,您有一条新的公告消息。","通知消息",map);*/ |
| | | |
| | | if (tNotices.getIsBroadcast() == 1){ |
| | | //增加极光推送 |
| | | JpushUtil.SendPushWithCustomForSh("DRIVER"+driver.getId().toString(),tNotices.getTitle(),"通知消息",null); |
| | | } |
| | | |
| | | // if (tNotices.getIsBroadcast() == 1){ |
| | | // //增加极光推送 |
| | | // JpushUtil.SendPushWithCustomForSh("DRIVER"+driver.getId().toString(),tNotices.getTitle(),"通知消息",null); |
| | | // } |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | server: |
| | | port: 8010 |
| | | |
| | | guns: |
| | | swagger-open: true #是否开启swagger (true/false) |
| | | kaptcha-open: false #是否开启登录时验证码 (true/false) |
| | | spring-session-open: true #是否开启spring session,如果是多机环境需要开启(true/false) |
| | | session-invalidate-time: 1800 #session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒 |
| | | session-validation-interval: 900 #多久检测一次失效的session(只在单机环境下生效) 单位:秒 |
| | | file-upload-path: C:\Users\hi\Desktop\ #文件上传目录(不配置的话为java.io.tmpdir目录) |
| | | picture-server-address: http://192.168.0.43/resources/ #图片服务器地址 |
| | | rest-url: http://139.9.249.67:8080/rest/ #前端接口调用基础路径 |
| | | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | # active: prod |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | | prefix: /WEB-INF/view |
| | | devtools: |
| | | restart: |
| | | enabled: false |
| | | additional-paths: src/main/java |
| | | exclude: static/**,WEB-INF/view/** |
| | | servlet: |
| | | multipart: |
| | | max-request-size: 500MB |
| | | max-file-size: 500MB |
| | | redis: |
| | | host: 172.21.35.151 |
| | | port: 6514 |
| | | password: Test_cache@20#25 |
| | | database: 0 |
| | | timeout: 1000 |
| | | cluster: |
| | | nodes: 172.21.35.151:6514,172.21.35.152:6514,172.21.35.153:6514,172.21.35.151:6515,172.21.35.152:6515,172.21.35.153:6515 |
| | | |
| | | mybatis-plus: |
| | | type-aliases-package: com.stylefeng.guns.modular.system.model |
| | | global-config: |
| | | id-type: 0 #0:数据库ID自增 1:用户输入id 2:全局唯一id(IdWorker) 3:全局唯一ID(uuid) |
| | | db-column-underline: false |
| | | configuration: |
| | | configuration.map-underscore-to-camel-case: true #是否开启自动驼峰命名规则(camel case)映射 |
| | | log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl #输出Sql,如需打印Sql注释该配置 |
| | | |
| | | --- |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: traffic_testusr |
| | | password: QYT_test@20#25 |
| | | db-name: traffic_scdb #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | |
| | | --- |
| | | spring: |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.197:27017/traveling_track |
| | | |
| | | |
| | | --- |
| | | wx: |
| | | grantType: authorization_code #填authorization_code |
| | | appid: 1111 #应用唯一标识,在微信开放平台提交应用审核通过后获得 |
| | | appSecret: 1111 #应用密钥AppSecret,在微信开放平台提交应用审核通过后获得 |
| | | appletsAppid: wxcc3c9058e2b294db #小程序APPid |
| | | appletsAppSecret: 5610fc6126255ca5f7bd9fa4330338b6 # |
| | | mchId: 1111 #微信支付分配的商户号 |
| | | key: 1111 #key为商户平台设置的密钥key: |
| | | |
| | | --- |
| | | |
| | | alipay: |
| | | appid: 1111 #应用程序唯一标识 |
| | | appPrivateKey: 1111 #开发者应用私钥 |
| | | alipayPublicKey: 1111 #应用公钥 |
| | | alipay_public_key: 1111 #支付宝公钥 |
| | | |
| | | |
| | | |
| | | --- |
| | | |
| | | #支付回调地址 |
| | | #正式环境 |
| | | callbackPath: https://traffic.qytzt.cn |
| | | |
| | | #交通部推送数据功能开关 |
| | | pushMinistryOfTransport: false |
| | | |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | # active: prod |
| | | # active: dev |
| | | active: prod |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <a href="logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a> |
| | | <a href="https://passport.teamshub.com/logout?logouturl=https%3A%2F%2Fsso.teamshub.com%2Flogout%3F%0Alogoutat%3Dhttps%253A%252F%252Ftraffic.qytzt.cn%253A443%252F" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a> |
| | | </div> |
| | | <div class="row J_mainContent" id="content-main"> |
| | | <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctxPath}/blackboard?type=${type}" frameborder="0" data-id="${ctxPath}/blackboard" seamless></iframe> |
| | |
| | | <li><a class="J_menuItem" href="${ctxPath}/mgr/user_info">个人资料</a></li> |
| | | <li><a class="J_menuItem" href="${ctxPath}/mgr/user_chpwd">修改密码</a></li> |
| | | <li class="divider"></li> |
| | | <li><a href="${ctxPath}/logout">安全退出</a> |
| | | <li><a href="https://passport.teamshub.com/logout?logouturl=https%3A%2F%2Fsso.teamshub.com%2Flogout%3F%0Alogoutat%3Dhttps%253A%252F%252Ftraffic.qytzt.cn%253A443%252F">安全退出</a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | |
| | | <#SelectCon id="payType" name="支付方式" > |
| | | <option value="">全部</option> |
| | | <option value="1">微信</option> |
| | | <option value="2">支付宝</option> |
| | | <!-- <option value="2">支付宝</option>--> |
| | | <option value="3">余额支付</option> |
| | | <option value="4">线下支付</option> |
| | | </#SelectCon> |
| | |
| | | <option value="4">改派订单收入</option> |
| | | <option value="5">购买出行卡</option> |
| | | <option value="6">感谢费</option> |
| | | <option value="7">超时扣款</option> |
| | | <!-- <option value="7">超时扣款</option>--> |
| | | <option value="8">投诉扣款</option> |
| | | </#SelectCon> |
| | | </div> |
| | |
| | | <option value="1">活动收入</option> |
| | | <option value="2">跑单收入</option> |
| | | <option value="6">感谢费</option> |
| | | <option value="9">小件物流超时退款</option> |
| | | <!-- <option value="9">小件物流超时退款</option>--> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">物流优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">物流优惠包</option>--> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <option value="">全部</option> |
| | | <option value="快车司机">快车司机</option> |
| | | <option value="出租车司机">出租车司机</option> |
| | | <option value="商务车司机">商务车司机</option> |
| | | <option value="货运司机">货运司机</option> |
| | | <option value="小件物流司机">小件物流司机</option> |
| | | <option value="快车司机">快车司机</option> |
| | | <option value="专职司机">专职司机</option> |
| | | <!-- <option value="商务车司机">商务车司机</option>--> |
| | | <!-- <option value="货运司机">货运司机</option>--> |
| | | <!-- <option value="小件物流司机">小件物流司机</option>--> |
| | | <option value="快车司机">快车司机</option> |
| | | <!-- <option value="专职司机">专职司机</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <select id="driverType" name="selectpicker" class="selectpicker show-tick form-control" multiple data-live-search="true" data-style="btn-primary" data-none-selected-text="请选择"> |
| | | <option value="快车司机">快车司机</option> |
| | | <option value="出租车司机">出租车司机</option> |
| | | <option value="商务车司机">商务车司机</option> |
| | | <option value="货运司机">货运司机</option> |
| | | <option value="小件物流司机">小件物流司机</option> |
| | | <option value="专职司机">专职司机</option> |
| | | <!-- <option value="商务车司机">商务车司机</option>--> |
| | | <!-- <option value="货运司机">货运司机</option>--> |
| | | <!-- <option value="小件物流司机">小件物流司机</option>--> |
| | | <!-- <option value="专职司机">专职司机</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <select id="driverType" name="selectpicker" class="selectpicker show-tick form-control" multiple data-live-search="true" data-style="btn-primary" data-none-selected-text="请选择"> |
| | | <option value="快车司机">快车司机</option> |
| | | <option value="出租车司机">出租车司机</option> |
| | | <option value="商务车司机">商务车司机</option> |
| | | <option value="货运司机">货运司机</option> |
| | | <option value="小件物流司机">小件物流司机</option> |
| | | <option value="专职司机">专职司机</option> |
| | | <!-- <option value="商务车司机">商务车司机</option>--> |
| | | <!-- <option value="货运司机">货运司机</option>--> |
| | | <!-- <option value="小件物流司机">小件物流司机</option>--> |
| | | <!-- <option value="专职司机">专职司机</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <#SelectCon id="payType" name="支付方式" > |
| | | <option value="">全部</option> |
| | | <option value="1">微信</option> |
| | | <option value="2">支付宝</option> |
| | | <!-- <option value="2">支付宝</option>--> |
| | | <option value="3">其他</option> |
| | | </#SelectCon> |
| | | </div> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">物流优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">物流优惠包</option>--> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <option value="">选择广告类型</option> |
| | | <option value="1">弹窗广告</option> |
| | | <option value="2">首页底部广告</option> |
| | | <option value="3">订单结束页广告</option> |
| | | <!-- <option value="3">订单结束页广告</option>--> |
| | | </#select> |
| | | <#select id="provinceId" name="所属省:"> |
| | | <option value="">选择所属省</option> |
| | |
| | | <option value="">选择广告类型</option> |
| | | <option value="1" ${1 == item.type ? 'selected=selected' : ''}>弹窗广告</option> |
| | | <option value="2" ${2 == item.type ? 'selected=selected' : ''}>首页底部广告</option> |
| | | <option value="3" ${3 == item.type ? 'selected=selected' : ''}>订单结束页广告</option> |
| | | <!-- <option value="3" ${3 == item.type ? 'selected=selected' : ''}>订单结束页广告</option>--> |
| | | </#select> |
| | | <#select id="provinceId" name="所属省:"> |
| | | <option value="">选择所属省</option> |
| | |
| | | <div class="form-horizontal"> |
| | | <div class="hr-line-dashed"></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">课程日期</label> |
| | | <label class="col-sm-2 control-label">处罚日期</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" class="layui-input form-control" id="punishTime"> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">已添加的培训记录</label> |
| | | <label class="col-sm-2 control-label">已添加的处罚记录</label> |
| | | <div class="col-sm-9"> |
| | | <div style="height: 150px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | |
| | | </div> |
| | | <#avatar id="imgUrl" name="封面:" /> |
| | | <#input id="title" name="标题"/> |
| | | <!-- |
| | | <#select id="isBroadcast" name="是否播报:" > |
| | | <option value="">选择是否播报</option> |
| | | <option value="1">是</option> |
| | | <option value="2">否</option> |
| | | </#select> |
| | | --> |
| | | <div class="form-group" id="contentDiv"> |
| | | <label class="col-sm-3 control-label">公告内容:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <div class="col-sm-11"> |
| | | <#avatar id="imgUrl" name="封面:" avatarImg="${item.imgUrl}"/> |
| | | <#input id="title" name="标题" value="${item.title}"/> |
| | | <!-- |
| | | <#select id="isBroadcast" name="是否播报:" > |
| | | <option value="">选择是否播报</option> |
| | | <option value="1" ${1 == item.isBroadcast ? 'selected=selected' : ''}>是</option> |
| | | <option value="2" ${2 == item.isBroadcast ? 'selected=selected' : ''}>否</option> |
| | | </#select> |
| | | --> |
| | | <div class="form-group" id="contentDiv"> |
| | | <label class="col-sm-3 control-label">公告内容:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="orderSource" name="订单来源" > |
| | | <option value="">全部</option> |
| | | <option value="1">APP下单</option> |
| | | <!-- <option value="1">APP下单</option>--> |
| | | <option value="2">扫码下单</option> |
| | | <option value="3">小程序下单</option> |
| | | <option value="4">司机下单</option> |
| | | <!-- <option value="4">司机下单</option>--> |
| | | <option value="5">调度下单</option> |
| | | <option value="6">道行龙城下单</option> |
| | | <!-- <option value="6">道行龙城下单</option>--> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="insertTimeStr" name="下单时间" value="${item.insertTimeStr}"/> |
| | | <#label id="orderSourceStr" name="订单来源" value="${item.orderSourceStr}"/> |
| | | <#label id="userName" name="下单用户昵称" value="${item.userName}"/> |
| | | <#label id="passengers" name="乘车用户昵称" value="${item.passengers}"/> |
| | | <#label id="placementAddress" name="起点" value="${item.startAddress}"/> |
| | | <#label id="driver" name="接单司机" value="${item.driver}"/> |
| | | <#label id="car" name="接单车辆" value="${item.car}"/> |
| | | <#label id="boardingAddress" name="上车地点" value="${item.boardingAddress}"/> |
| | | <#label id="getoffAddress" name="下车地点" value="${item.getoffAddress}"/> |
| | | <#label id="insertTimeStr" name="下单时间" value="${item.insertTimeStr}"/> |
| | | <#label id="orderSourceStr" name="订单来源" value="${item.orderSourceStr}"/> |
| | | <#label id="userName" name="下单用户昵称" value="${null != item.contactPersonPhone ? '' : item.userName}"/> |
| | | <#label id="passengers" name="乘车用户昵称" value="${item.passengers}"/> |
| | | <#label id="placementAddress" name="起点" value="${item.startAddress}"/> |
| | | <#label id="driver" name="接单司机" value="${item.driver}"/> |
| | | <#label id="car" name="接单车辆" value="${item.car}"/> |
| | | <#label id="boardingAddress" name="上车地点" value="${item.boardingAddress}"/> |
| | | <#label id="getoffAddress" name="下车地点" value="${item.getoffAddress}"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#label id="orderNum" name="订单编号" value="${item.orderNum}"/> |
| | | <#label id="travelTimeStr" name="乘车时间" value="${item.travelTimeStr}"/> |
| | | <#label id="userPhone" name="下单用户手机号" value="${item.userPhone}"/> |
| | | <#label id="passengersPhone" name="乘车用户手机号" value="${item.passengersPhone}"/> |
| | | <#label id="endAddress" name="终点" value="${item.endAddress}"/> |
| | | <#label id="companyName" name="车辆所属机构" value="${item.companyName}"/> |
| | | <#label id="boardingTimeStr" name="上车时间" value="${item.boardingTimeStr}"/> |
| | | <#label id="getoffTimeStr" name="下车时间" value="${item.getoffTimeStr}"/> |
| | | <#label id="orderNum" name="订单编号" value="${item.orderNum}"/> |
| | | <#label id="travelTimeStr" name="乘车时间" value="${item.travelTimeStr}"/> |
| | | <#label id="userPhone" name="下单用户手机号" value="${null != item.contactPersonPhone ? item.contactPersonPhone : item.userPhone}"/> |
| | | <#label id="passengersPhone" name="乘车用户手机号" value="${item.passengersPhone}"/> |
| | | <#label id="endAddress" name="终点" value="${item.endAddress}"/> |
| | | <#label id="companyName" name="车辆所属机构" value="${item.companyName}"/> |
| | | <#label id="boardingTimeStr" name="上车时间" value="${item.boardingTimeStr}"/> |
| | | <#label id="getoffTimeStr" name="下车时间" value="${item.getoffTimeStr}"/> |
| | | </div> |
| | | </div> |
| | | <div class="row" style="margin-top: 30px;"> |
| | |
| | | <div> |
| | | <div style="float: left;"> |
| | | <label class="lab checked" onclick="checkedLable(this)" tag="pushOrderSettings">推单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="driverPayDays">司机分账账期设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="driverPayDays">司机分账账期设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="cancelOrderSettings">取消订单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="cancelTheReservationOrderSetting">预约单取消设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="spellOrderSetting">拼单派单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="timeoutDeductionSettings">超时扣款设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="spellOrderSetting">拼单派单设置</label>--> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="timeoutDeductionSettings">超时扣款设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="reassigningSet">改派设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="faceRecognitionSettings">人脸识别设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="faceRecognitionSettings">人脸识别设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="integralSet">积分设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="withdrawalFeeSetting">提现手续费设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="withdrawalFeeSetting">提现手续费设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="phoneSettings">电话设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="holidayServiceFeeSetting">节假日服务费设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="95128TheOnCall">95128电召</label>--> |
| | |
| | | 起步价为 |
| | | <input type="text" onblur="checkIsYuan(this)" value='${json.num1!}' name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 元,起步包含<input type="text" onblur="checkIsGongLi(this)" name="num2" id="num2" value='${json.num2!}' class="form-control newWidth" placeholder="最多3位数"/> |
| | | 公里,不足基价公里按基价公里收费</br></br> |
| | | 公里,不足起步公里按起步公里收费</br></br> |
| | | 超过起步里程后每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num3" id="num3" value='${json.num3!}' class="form-control newWidth" placeholder="最多3位数"/>元 |
| | | <!-- <span id="min">,<input type="text" onblur="checkIsMinute(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/>--> |
| | | <!-- 分钟</span>--> |
| | |
| | | <input type="text" name="num6" id="num6" class="form-control newWidth" value='${json.num6!}' placeholder="选择时间"/> 点为夜间行驶时间, |
| | | 起步价变为<input type="text" onblur="checkIsYuan(this)" value='${json.num7!}' name="num7" id="num7" class="form-control newWidth" placeholder="最多3位数"/>元, |
| | | 起步包含<input type="text" onblur="checkIsGongLi(this)" name="num8" value='${json.num8!}' id="num8" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 公里,不足基价公里按基价公里收费 |
| | | 公里,不足起步公里按起步公里收费 |
| | | ,超过起步里程后每公里加收<input type="text" onblur="checkIsYuan(this)" name="num9" value='${json.num9!}' id="num9" class="form-control newWidth" placeholder="最多3位数"/>元 |
| | | |
| | | </div> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">物流优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">物流优惠包</option>--> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">物流优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">物流优惠包</option>--> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">优惠包</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">优惠包</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <option value="2">优惠卡</option> |
| | | <option value="3">次数卡</option> |
| | | <option value="4">打折天数卡</option> |
| | | <option value="5">物流打折卡</option> |
| | | <option value="6">优惠包</option> |
| | | <!-- <option value="5">物流打折卡</option>--> |
| | | <!-- <option value="6">优惠包</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="insertTimeStr" name="注册时间" value="${item.insertTimeStr}"/> |
| | | <#label id="registIp" name="注册地IP" value="${item.registIp}"/> |
| | | <#label id="phone" name="手机号" value="${item.phone}"/> |
| | | <#label id="emergencyContact" name="紧急联系人姓名" value="${item.emergencyContact}"/> |
| | | <#label id="isAuthStr" name="是否实名认证" value="${item.isAuthStr}"/> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">端口类型:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="type1" value="1" name="type" checked="" > |
| | | <label for="type1"> 用户端 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <!-- <div class="radio radio-info radio-inline">--> |
| | | <!-- <input type="radio" id="type1" value="1" name="type" checked="" >--> |
| | | <!-- <label for="type1"> 用户端 </label>--> |
| | | <!-- </div>--> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="type2" value="2" name="type" > |
| | | <label for="type2"> 司机端 </label> |
| | | </div> |
| | | <div class="radio radio-primary radio-inline"> |
| | | <input type="radio" id="type3" value="3" name="type" > |
| | | <label for="type3"> 车载端 </label> |
| | | </div> |
| | | <div class="radio radio-primary radio-inline"> |
| | | <!-- <div class="radio radio-primary radio-inline">--> |
| | | <!-- <input type="radio" id="type3" value="3" name="type" >--> |
| | | <!-- <label for="type3"> 车载端 </label>--> |
| | | <!-- </div>--> |
| | | <div class="radio radio-primary radio-inline"> |
| | | <input type="radio" id="type4" value="4" name="type" > |
| | | <label for="type4"> 调度端 </label> |
| | | </div> |
| | |
| | | |
| | | <input type="text" name="zc1" id="content5Num2" class="form-control newWidth" /> 折 |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 小件物流活动打折: |
| | | <input type="text" name="zc1" id="content5Num3" class="form-control newWidth" /> 折 |
| | | --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | @} |
| | | name="zc1" id="content5Num2" class="form-control newWidth" readonly/> |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 小件物流活动打折: |
| | | <input type="text" |
| | |
| | | value="" |
| | | @} |
| | | name="zc1" id="content5Num3" class="form-control newWidth" readonly /> |
| | | --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | @} |
| | | name="zc1" id="content5Num2" class="form-control newWidth" /> |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 小件物流活动打折: |
| | | <input type="text" |
| | |
| | | value="" |
| | | @} |
| | | name="zc1" id="content5Num3" class="form-control newWidth" /> |
| | | --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | var map = new AMap.Map('container',{ |
| | | resizeEnable: true, |
| | | zoom:10 |
| | | center: [107.561768, 26.188572], |
| | | zoom: 10 |
| | | }); |
| | | |
| | | |
| | | var map_ = new AMap.Map('container_',{ |
| | | var map_ = new AMap.Map('container_', { |
| | | resizeEnable: true, |
| | | center: [107.561768, 26.188572], |
| | | mapStyle: 'amap://styles/1de318cbb8d12c02303a22c550b9ccc9', |
| | | zoom:10 |
| | | zoom: 10 |
| | | }); |
| | | |
| | | var mouseTool = new AMap.MouseTool(map); |
| | |
| | | formData.append('file', $('#file')[0].files[0]) //把file添加进去 name命名为img |
| | | layer.load(); //上传loading |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/upload/image1', |
| | | url: Feng.ctxPath + '/upload/image', |
| | | data: formData, |
| | | type: "POST", |
| | | async: true, |
| | | cache: false, |
| | | contentType: false, |
| | | processData: false, |
| | | success: function(res) { |
| | | success: function (res) { |
| | | layer.closeAll('loading'); //关闭loading |
| | | $('#file').val(''); |
| | | if(fileId == 'imgUrl'){ |
| | | $('#' + fileId).append('<div><img src="' + res + '" width="100px" class="imgUrl"><i class="fa fa-close" onclick="delImg(this, \'imgUrl\', 1)" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | if (fileId == 'imgUrl') { |
| | | $('#' + fileId).append('<div><img src="' + res.data + '" width="100px" class="imgUrl"><i class="fa fa-close" onclick="delImg(this, \'imgUrl\', 1)" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | let files = $('#' + fileId).find('img'); |
| | | $($('#' + fileId).parent('div')).siblings('label').text('*车辆照片(' + files.length + '/15):'); |
| | | } |
| | | if(fileId == 'videoUrl'){ |
| | | $('#' + fileId).append('<div><video src="' + res + '" controls style="width: 200px !important;" class="videoUrl"></video><i class="fa fa-close" onclick="delImg(this, \'videoUrl\', 2)" style="color: red;color: red;font-size: 18px;position: absolute;left: 208px;top: -8px;"></i></div> '); |
| | | if (fileId == 'videoUrl') { |
| | | $('#' + fileId).append('<div><video src="' + res.data + '" controls style="width: 200px !important;" class="videoUrl"></video><i class="fa fa-close" onclick="delImg(this, \'videoUrl\', 2)" style="color: red;color: red;font-size: 18px;position: absolute;left: 208px;top: -8px;"></i></div> '); |
| | | let files = $('#' + fileId).find('video'); |
| | | $($('#' + fileId).parent('div')).siblings('label').text('*车辆视频(' + files.length + '/1):'); |
| | | } |
| | | if(fileId == 'describeImgUrl'){ |
| | | $('#' + fileId).append('<div><img src="' + res + '" width="100px" class="describeImgUrl"/><i class="fa fa-close" onclick="delImg(this, \'describeImgUrl\')" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | if (fileId == 'describeImgUrl') { |
| | | $('#' + fileId).append('<div><img src="' + res.data + '" width="100px" class="describeImgUrl"/><i class="fa fa-close" onclick="delImg(this, \'describeImgUrl\')" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | } |
| | | } |
| | | }) |
| | |
| | | return orderRevenue; |
| | | } |
| | | }, |
| | | {title: '购买打车卡收益', field: 'realGetMoney', visible: true, align: 'center', valign: 'middle', |
| | | { |
| | | title: '购买打车卡收益', field: 'realGetMoney', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | let taxiCardRevenue = typeof row.taxiCardRevenue == "undefined" ? "-" : row.taxiCardRevenue; |
| | | return taxiCardRevenue; |
| | | } |
| | | }, |
| | | {title: '超时扣款收益', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | let overtimeDeduction = typeof row.overtimeDeduction == "undefined" ? "-" : row.overtimeDeduction; |
| | | return overtimeDeduction; |
| | | } |
| | | }, |
| | | {title: '司机投诉扣款平台收益', field: 'userPhone', visible: true, align: 'center', valign: 'middle', |
| | | // {title: '超时扣款收益', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | // formatter: function (value, row) { |
| | | // let overtimeDeduction = typeof row.overtimeDeduction == "undefined" ? "-" : row.overtimeDeduction; |
| | | // return overtimeDeduction; |
| | | // } |
| | | // }, |
| | | { |
| | | title: '司机投诉扣款平台收益', field: 'userPhone', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | let complaintDeductionProceeds = typeof row.complaintDeductionProceeds == "undefined" ? "-" : row.complaintDeductionProceeds; |
| | | return complaintDeductionProceeds; |
| | | } |
| | | }, |
| | | {title: '其他收入', field: 'remark', visible: true, align: 'center', valign: 'middle', |
| | | { |
| | | title: '其他收入', field: 'remark', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | let other = typeof row.other == "undefined" ? "-" : row.other; |
| | | return other; |
| | |
| | | {title: '节假日服务费', field: 'holidayFee', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '取消费', field: 'cancleMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '改派费', field: 'reassignMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '超时罚款', field: 'timeOutMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '超时罚款', field: 'timeOutMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '感谢费', field: 'thankYouFee', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '小件物流差价费', field: 'spreadMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '小件物流差价费', field: 'spreadMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | /*{title: '司机收入', field: 'orderNum', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value,row) { |
| | | return row.driverMoney - row.additionalMoney - row.holidayFee - row.tipMoney - row.thankYouFee - row.spreadMoney; |
| | |
| | | formData.append('file', $('#file')[0].files[0]) //把file添加进去 name命名为img |
| | | layer.load(); //上传loading |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/upload/image1', |
| | | url: Feng.ctxPath + '/upload/image', |
| | | data: formData, |
| | | type: "POST", |
| | | async: true, |
| | | cache: false, |
| | | contentType: false, |
| | | processData: false, |
| | | success: function(res) { |
| | | success: function (res) { |
| | | layer.closeAll('loading'); //关闭loading |
| | | $('#file').val(''); |
| | | if(fileId == 'imgUrl'){ |
| | | $('#' + fileId).append('<div><img src="' + res + '" width="100px" class="imgUrl"><i class="fa fa-close" onclick="delImg(this, \'imgUrl\', 1)" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | if (fileId == 'imgUrl') { |
| | | $('#' + fileId).append('<div><img src="' + res.data + '" width="100px" class="imgUrl"><i class="fa fa-close" onclick="delImg(this, \'imgUrl\', 1)" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | let files = $('#' + fileId).find('img'); |
| | | $($('#' + fileId).parent('div')).siblings('label').text('*车辆图片(' + files.length + '/15):'); |
| | | } |
| | | if(fileId == 'videoUrl'){ |
| | | $('#' + fileId).append('<div><video src="' + res + '" controls style="width: 200px !important;" class="videoUrl"></video><i class="fa fa-close" onclick="delImg(this, \'videoUrl\', 2)" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | if (fileId == 'videoUrl') { |
| | | $('#' + fileId).append('<div><video src="' + res.data + '" controls style="width: 200px !important;" class="videoUrl"></video><i class="fa fa-close" onclick="delImg(this, \'videoUrl\', 2)" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | let files = $('#' + fileId).find('video'); |
| | | $($('#' + fileId).parent('div')).siblings('label').text('*车辆视频(' + files.length + '/1):'); |
| | | } |
| | | if(fileId == 'describeImgUrl'){ |
| | | $('#' + fileId).append('<div><img src="' + res + '" width="100px" class="describeImgUrl"/><i class="fa fa-close" onclick="delImg(this, \'describeImgUrl\')" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | if (fileId == 'describeImgUrl') { |
| | | $('#' + fileId).append('<div><img src="' + res.data + '" width="100px" class="describeImgUrl"/><i class="fa fa-close" onclick="delImg(this, \'describeImgUrl\')" style="color: red;color: red;font-size: 18px;position: absolute;left: 108px;top: -8px;"></i></div> '); |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | }, |
| | | {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '注册地IP', field: 'registIp', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.registIp != '' && row.registIp != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.registIp + '" onfocus="TUser.tooltip()">' + row.registIp + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '注册地所属分公司ID', field: 'companyId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '注册地所属分公司', field: 'companyName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | |
| | | }; |
| | | |
| | | function deleteSub(e) { |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + '/tCompany/searchArea', function (data) { |
| | | if (data === "该区域正被打车卡使用,不允许移除"){ |
| | | Feng.error(data); |
| | | return false; |
| | | }else { |
| | | $(e).parent().parent().remove(); |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除该区域?", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + '/tCompany/searchArea', function (data) { |
| | | if (data === "该区域正被打车卡使用,不允许移除") { |
| | | Feng.error(data); |
| | | return false; |
| | | } else { |
| | | $(e).parent().parent().remove(); |
| | | } |
| | | }); |
| | | ajax.set("companyId", $("#id").val()); /// 适用地区id |
| | | ajax.set("id", $($(e).parent('td').prev('td').find('input')[0]).val()); /// 适用地区id |
| | | ajax.start(); |
| | | }); |
| | | ajax.set("companyId",$("#id").val()); /// 适用地区id |
| | | ajax.set("id",$($(e).parent('td').prev('td').find('input')[0]).val()); /// 适用地区id |
| | | ajax.start(); |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | isBroadcast: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '选择是否播报' |
| | | } |
| | | } |
| | | }, |
| | | // isBroadcast: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '选择是否播报' |
| | | // } |
| | | // } |
| | | // }, |
| | | isShow: { |
| | | validators: { |
| | | notEmpty: { |
| | |
| | | .set('title') |
| | | .set('sort') |
| | | .set('isShow') |
| | | .set('isBroadcast') |
| | | // .set('isBroadcast') |
| | | .set('type') |
| | | .set('imgUrl') |
| | | .set('flag') |
| | |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tUser/updateBalance", function(data){ |
| | | if(data=="5000"){ |
| | | Feng.info("请先设置企业提现账户!"); |
| | | }else |
| | | if(data=="5001"){ |
| | | Feng.info("该用户未设置进件信息!"); |
| | | }else |
| | | // if(data=="5000"){ |
| | | // Feng.info("请先设置企业提现账户!"); |
| | | // }else |
| | | // if(data=="5001"){ |
| | | // Feng.info("该用户未设置进件信息!"); |
| | | // }else |
| | | if(data.code==200){ |
| | | Feng.success("修改成功!"); |
| | | }else{ |
| | |
| | | } |
| | | } |
| | | var content5Num2 = $("#content5Num2").val(); |
| | | if($.trim(content5Num2)!=""){ |
| | | if(isNaN(content5Num2) || content5Num2<=0 || content5Num2>10){ |
| | | if ($.trim(content5Num2) != "") { |
| | | if (isNaN(content5Num2) || content5Num2 <= 0 || content5Num2 > 10) { |
| | | Feng.error("请输入正确折扣数!"); |
| | | getContent(5); |
| | | return; |
| | | } |
| | | } |
| | | var content5Num3 = $("#content5Num3").val(); |
| | | if($.trim(content5Num3)!=""){ |
| | | if(isNaN(content5Num3) || content5Num3<=0 || content5Num3>10){ |
| | | Feng.error("请输入正确折扣数!"); |
| | | getContent(5); |
| | | return; |
| | | } |
| | | } |
| | | // var content5Num3 = $("#content5Num3").val(); |
| | | // if($.trim(content5Num3)!=""){ |
| | | // if(isNaN(content5Num3) || content5Num3<=0 || content5Num3>10){ |
| | | // Feng.error("请输入正确折扣数!"); |
| | | // getContent(5); |
| | | // return; |
| | | // } |
| | | // } |
| | | var content6RedId = $("#content6RedId").val(); |
| | | var elem1 = document.querySelector('.js-switch'); |
| | | var elem2 = document.querySelector('.js-switch1'); |
| | |
| | | var elem3 = document.querySelector('.js-switch4'); |
| | | console.log(JSON.stringify(subArr)) |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/userActivity/add", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/userActivity/add", function (data) { |
| | | Feng.success("添加成功!"); |
| | | window.parent.UserActivity.table.refresh(); |
| | | UserActivityInfoDlg.close(); |
| | |
| | | ajax.set("balanceInfo",JSON.stringify(subArr)); |
| | | ajax.set("discountEnable",elem4.checked==true?2:1); |
| | | ajax.set("discountSpecial",content5Num1); |
| | | ajax.set("discountTaxi",content5Num2); |
| | | ajax.set("discountLogistics",content5Num3); |
| | | ajax.set("redenvelopeId",$("#content6RedId").val()); |
| | | ajax.set("discountTaxi", content5Num2); |
| | | ajax.set("discountLogistics", 0); |
| | | ajax.set("redenvelopeId", $("#content6RedId").val()); |
| | | ajax.set("redenvelopeEnable",elem5.checked==true?2:1); |
| | | ajax.set('redPrice', $('#content6Num5').val()); |
| | | ajax.start(); |
| | |
| | | } |
| | | } |
| | | var content5Num2 = $("#content5Num2").val(); |
| | | if($.trim(content5Num2)!=""){ |
| | | if(isNaN(content5Num2) || content5Num2<=0 || content5Num2>10){ |
| | | if ($.trim(content5Num2) != "") { |
| | | if (isNaN(content5Num2) || content5Num2 <= 0 || content5Num2 > 10) { |
| | | Feng.error("请输入正确折扣数!"); |
| | | getContent(5); |
| | | return; |
| | | } |
| | | } |
| | | var content5Num3 = $("#content5Num3").val(); |
| | | if($.trim(content5Num3)!=""){ |
| | | if(isNaN(content5Num3) || content5Num3<=0 || content5Num3>10){ |
| | | Feng.error("请输入正确折扣数!"); |
| | | getContent(5); |
| | | return; |
| | | } |
| | | } |
| | | // var content5Num3 = $("#content5Num3").val(); |
| | | // if($.trim(content5Num3)!=""){ |
| | | // if(isNaN(content5Num3) || content5Num3<=0 || content5Num3>10){ |
| | | // Feng.error("请输入正确折扣数!"); |
| | | // getContent(5); |
| | | // return; |
| | | // } |
| | | // } |
| | | var content6RedId = $("#content6RedId").val(); |
| | | var elem1 = document.querySelector('.js-switch'); |
| | | var elem2 = document.querySelector('.js-switch1'); |
| | |
| | | var elem3 = document.querySelector('.js-switch4'); |
| | | console.log(JSON.stringify(subArr)) |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/userActivity/update", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/userActivity/update", function (data) { |
| | | Feng.success("修改成功!"); |
| | | window.parent.UserActivity.table.refresh(); |
| | | UserActivityInfoDlg.close(); |
| | |
| | | ajax.set("balanceInfo",JSON.stringify(subArr)); |
| | | ajax.set("discountEnable",elem4.checked==true?2:1); |
| | | ajax.set("discountSpecial",parseFloat(content5Num1)); |
| | | ajax.set("discountTaxi",parseFloat(content5Num2)); |
| | | ajax.set("discountLogistics",parseFloat(content5Num3)); |
| | | ajax.set("redenvelopeId",$("#content6RedId").val()); |
| | | ajax.set("discountTaxi", parseFloat(content5Num2)); |
| | | ajax.set("discountLogistics", parseFloat(0)); |
| | | ajax.set("redenvelopeId", $("#content6RedId").val()); |
| | | ajax.set("redenvelopeEnable",elem5.checked==true?2:1); |
| | | ajax.set('redPrice', $('#content6Num5').val()); |
| | | ajax.start(); |