| | |
| | | * @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; |
| | |
| | | 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; |
| | | |
| | |
| | | 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() { |
| | |
| | | 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; |
| | |
| | | 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<>(); |
| | | @Resource |
| | | private RedisTemplate<String, String> redisTemplate; |
| | | |
| | | /** |
| | | * 获取当前 Subject |
| | | * 验证当前用户是否属于以下任意一个角色。 |
| | | * |
| | | * @return Subject |
| | | * @param roleNames 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | protected static Subject getSubject() { |
| | | return SecurityUtils.getSubject(); |
| | | public boolean hasAnyRoles(String roleNames) { |
| | | boolean hasAnyRole = false; |
| | | ShiroUser user = getUser(); |
| | | if (user != null && roleNames != null && roleNames.length() > 0) { |
| | | List<Integer> roleList = user.getRoleList(); |
| | | for (String role : roleNames.split(NAMES_DELIMETER)) { |
| | | if (roleList.contains(role.trim())) { |
| | | hasAnyRole = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return hasAnyRole; |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return ShiroUser |
| | | */ |
| | | public static ShiroUser getUser() { |
| | | String sessionId = RequestContextHolder.currentRequestAttributes().getSessionId(); |
| | | ShiroUser shiroUser = map.get(sessionId); |
| | | if(null == 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); |
| | | } |
| | | return shiroUser; |
| | | |
| | | /** |
| | | * 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 不属于该角色:true,否则false |
| | | */ |
| | | public boolean lacksRole(String roleName) { |
| | | return !hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。 |
| | | * 获取当前 Subject |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 不属于该角色:true,否则false |
| | | * @return Subject |
| | | */ |
| | | public boolean lacksRole(String roleName) { |
| | | return !hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下任意一个角色。 |
| | | * |
| | | * @param roleNames 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | public static boolean hasAnyRoles(String roleNames) { |
| | | boolean hasAnyRole = false; |
| | | ShiroUser user = getUser(); |
| | | if (user != null && roleNames != null && roleNames.length() > 0) { |
| | | List<Integer> roleList = user.getRoleList(); |
| | | for (String role : roleNames.split(NAMES_DELIMETER)) { |
| | | if (roleList.contains(role.trim())) { |
| | | hasAnyRole = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return hasAnyRole; |
| | | protected Subject getSubject() { |
| | | return SecurityUtils.getSubject(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param permission 权限名 |
| | | * @return 拥有权限:true,否则false |
| | | */ |
| | | public static boolean hasPermission(String permission) { |
| | | public boolean hasPermission(String permission) { |
| | | ShiroUser user = getUser(); |
| | | if(null == user){ |
| | | return false; |
| | |
| | | } |
| | | 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 ITCompanyService companyService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showCarRental") |
| | | 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 IDriverActivityHistoryService driverActivityHistoryService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | @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)){ |
| | |
| | | @Autowired |
| | | private IDriverOnlineService driverOnlineService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("/openNetCarInfo") |
| | | public Object openNetCarInfo(Integer id, Model model){ |
| | | model.addAttribute("id", id); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSumData") |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end){ |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(companyId == null && user.getRoleType() != 1){ |
| | | companyId = user.getObjectId(); |
| | |
| | | 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){ |
| | |
| | | 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(); |
| | | 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(); |
| | | Integer id = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | companys = new ArrayList<>(); |
| | | List<TCompany> ids = 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.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 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<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); |
| | | 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"); |
| | |
| | | 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++) { |
| | |
| | | page.setRecords(null); |
| | | }else{*/ |
| | | |
| | | List<Map<String, Object>> list = taxiCardPaymentService.getList(page, beginTime, endTime, null, type, phone, name, id, cardName, ShiroExtUtil.getUser().getObjectId()); |
| | | 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())); |
| | | map.put("payMoney", taxiCardPaymentService.getSumMoney(beginTime, endTime, null, type, phone, name, id, cardName, shiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | } |
| | | |
| | |
| | | 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++) { |
| | |
| | | } |
| | | 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()); |
| | | 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())); |
| | | map.put("money", complaintDeductmoneyService.getSumMoney(beginTime, endTime, null, userPhone, userName, id, shiroExtUtil.getUser().getObjectId())); |
| | | list.add(map); |
| | | } |
| | | page.setRecords(list); |
| | |
| | | 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 IUserService userService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("/index") |
| | | public String index() { |
| | | return PREFIX + "merchantActivity.html"; |
| | |
| | | @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(); |
| | |
| | | |
| | | MerchantActivity activity = merchantActivityService.selectById(id); |
| | | |
| | | Integer userId = ShiroExtUtil.getUser().getId(); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | |
| | | if (ToolUtil.isNotEmpty(activity)) { |
| | |
| | | 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; |
| | | |
| | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("/index") |
| | | public String index() { |
| | | return PREFIX + "merchantActivityGive.html"; |
| | |
| | | @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); |
| | |
| | | @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.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private IRecruitService recruitService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showRecruit") |
| | |
| | | @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 ITOrderTaxiService orderTaxiService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | |
| | | /*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); |
| | | /* }*/ |
| | |
| | | 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++) { |
| | |
| | | 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<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); |
| | | 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++) { |
| | |
| | | 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++) { |
| | |
| | | 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 ITCompanyService companyService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showSellingCarList") |
| | | 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"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/sellingCar_add") |
| | | public String sellingCar_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("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 ITReassignService reassignService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @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); |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService couponRecordService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | } |
| | | 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; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | if (SinataUtil.isNotEmpty(couponType)) { |
| | | wrapper.eq("couponType", couponType); |
| | | } |
| | | 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(sysCouponRecordService.selectPage(page, wrapper)); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object add(SysCouponRecord sysCouponRecord) { |
| | | sysCouponRecord.setInsertTime(new Date()); |
| | | sysCouponRecord.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | sysCouponRecord.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | 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; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | 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.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Controller |
| | |
| | | |
| | | @Autowired |
| | | private ITAdditionalFeeService additionalFeeService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("") |
| | | public String index(){ |
| | |
| | | @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; |
| | |
| | | |
| | | @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; |
| | | } |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 用户端协议管理控制器 |
| | |
| | | |
| | | @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; |
| | | } |
| | |
| | | public Object addOrUpdateIntimateAgreement(TAgreement tAgreement) { |
| | | 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(); |
| | |
| | | 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"); |
| | | |
| | |
| | | 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; |
| | |
| | | |
| | | @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 ISpellOrderRuleService spellOrderRuleService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @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; |
| | |
| | | |
| | | @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 { |
| | |
| | | @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; |
| | | |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | TComplaint tComplaint = tComplaintService.selectById(id); |
| | | 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); |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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()); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | |
| | | 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()); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | |
| | | 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()); |
| | | if (null != driver.getEmpId()) { |
| | | //中台先删除司机 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(driver.getEmpId()); |
| | | request.setMobile(user1.getPhone()); |
| | | 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(user1.getPhone()); |
| | | deleteStafNodeRequest.setMobile(tCompany.getPrincipalPhone()); |
| | | EmployeeUtil.ecrmDeleteStafNode(deleteStafNodeRequest); |
| | | } |
| | | } |
| | | tDriverService.updateById(driver); |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER_" + driver.getPhone()); |
| | | 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()); |
| | | 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()); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request = new SaveStaffNodeRequest(); |
| | | request.setMobile(user1.getPhone()); |
| | | request.setMobile(tCompany.getPrincipalPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | request.setEmpName(tDriver.getName()); |
| | | request.setEmpNickname(tDriver.getName()); |
| | |
| | | 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()); |
| | | 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())){ |
| | | tDriver.setPassword(obj.getPassword()); |
| | |
| | | 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); |
| | | |
| | | //删除业务 |
| | |
| | | |
| | | // 首行【封装】 |
| | | 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++) { |
| | |
| | | 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()); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(driver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest saveStaffNodeRequest = new SaveStaffNodeRequest(); |
| | | saveStaffNodeRequest.setMobile(user1.getPhone()); |
| | | saveStaffNodeRequest.setMobile(tCompany.getPrincipalPhone()); |
| | | saveStaffNodeRequest.setEntercode(tCompany.getEnterCode()); |
| | | saveStaffNodeRequest.setEmpName(driver.getName()); |
| | | saveStaffNodeRequest.setEmpNickname(driver.getName()); |
| | |
| | | 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())); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } 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++) { |
| | |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | Integer franchiseeId = 0; |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | |
| | | 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()); |
| | | driver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(six)){ |
| | | driver.setDriverAddress(six); |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | } 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++) { |
| | |
| | | //查找平台公司 |
| | | Integer companyId = 0; |
| | | Integer franchiseeId = 0; |
| | | TCompany franchisee = itCompanyService.selectById(ShiroExtUtil.getUser().getObjectId()); |
| | | TCompany franchisee = itCompanyService.selectById(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | companyId = franchisee.getSuperiorId(); |
| | | franchiseeId = franchisee.getId(); |
| | |
| | | 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()); |
| | | driver.setAddObjectId(shiroExtUtil.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(five)){ |
| | | driver.setDriverAddress(five); |
| | | } |
| | |
| | | */ |
| | | @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; |
| | |
| | | @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.setIsAudit(1); |
| | | tEnterpriseWithdrawal.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tEnterpriseWithdrawal.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tEnterpriseWithdrawal.setAccountType(accountType); |
| | | String randomString = ToolUtil.getRandomString(32); |
| | | tEnterpriseWithdrawal.setOutRequestNo(randomString); |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到司机反馈管理首页 |
| | |
| | | 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)); |
| | |
| | | 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)); |
| | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITInvoiceService tInvoiceService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到开发票列表首页 |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private ITNoticesService tNoticesService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到滚动消息设置首页 |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private ITOpenCityBusinessService tOpenCityBusinessService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到城市管理首页 |
| | |
| | | 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); |
| | | |
| | | //添加经营业务 |
| | |
| | | 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{ |
| | | 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"); |
| | |
| | | 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); |
| | | |
| | | //删除经营业务 |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderEvaluateService tOrderEvaluateService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到评价列表首页 |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService itSystemNoticeService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户留言管理首页 |
| | |
| | | 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)); |
| | |
| | | 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); |
| | | |
| | |
| | | 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.*; |
| | |
| | | @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.setState(state); //调用接口修改状态 |
| | | |
| | | |
| | | |
| | | |
| | | Integer stateObj = 1; |
| | | if (2 == state){ //同意提现 |
| | | stateObj = 1; |
| | |
| | | stateObj = 2; |
| | | } |
| | | |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | // 获取手续费 |
| | | Double poundage = tPubWithdrawalService.getPoundage(objectId); |
| | | if(poundage!=null && poundage>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.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; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITSmsrecordService tSmsrecordService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到短信记录首页 |
| | |
| | | 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 ) { |
| | |
| | | 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(); |
| | | 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) { |
| | |
| | | @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); |
| | |
| | | tSysReformistService.updateById(reformist); |
| | | }else{ |
| | | reformist = new TSysReformist(); |
| | | reformist.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | reformist.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | reformist.setMoney(one); |
| | | reformist.setIsSpecialCar(isSpecialCar); |
| | | reformist.setIsTaxiCar(isTaxiCar); |
| | |
| | | } |
| | | } |
| | | 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.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.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); |
| | |
| | | faceDistinguish = new TSysFaceDistinguish(); |
| | | faceDistinguish.setIsOpen(three); |
| | | faceDistinguish.setMinuteNum(openValue); |
| | | faceDistinguish.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setPushDistance(zc1); |
| | | zcOne.setPushTime(zc2); |
| | | zcOne.setDriverProportion(zc3); |
| | | zcOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setPushDistance(zc4); |
| | | zcTwo.setPushTime(zc5); |
| | | zcTwo.setDriverProportion(zc6); |
| | | zcTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setPushDistance(zc7); |
| | | zcThree.setPushTime(zc8); |
| | | zcThree.setDriverProportion(zc9); |
| | | zcThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setPushDistance(czc1); |
| | | czcOne.setPushTime(czc2); |
| | | czcOne.setDriverProportion(czc3); |
| | | czcOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setPushDistance(czc4); |
| | | czcTwo.setPushTime(czc5); |
| | | czcTwo.setDriverProportion(czc6); |
| | | czcTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setPushDistance(czc7); |
| | | czcThree.setPushTime(czc8); |
| | | czcThree.setDriverProportion(czc9); |
| | | czcThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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); |
| | |
| | | ptCancelOne = new TSysCancleOrder(); |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | ptCancelOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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); |
| | |
| | | ptCancelTwo = new TSysCancleOrder(); |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | ptCancelTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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); |
| | |
| | | ptCancelThree = new TSysCancleOrder(); |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | ptCancelThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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); |
| | |
| | | yyCancelOne = new TSysCancleOrder(); |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | yyCancelOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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); |
| | |
| | | yyCancelTwo = new TSysCancleOrder(); |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | yyCancelTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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())); |
| | | SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("num1", pdpd1); |
| | | jsonObject.put("num2", pdpd2); |
| | |
| | | spellOrderRuleService.updateById(spellOrderRule); |
| | | }else{ |
| | | spellOrderRule = new SpellOrderRule(); |
| | | spellOrderRule.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneOne.setType(1); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 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.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneTwo.setType(2); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneTwo.setPlatform(1); |
| | | } else { |
| | | phoneTwo.setPlatform(2); |
| | |
| | | } |
| | | |
| | | //客服电话 |
| | | 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.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phone.setType(3); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phone.setPlatform(1); |
| | | } else { |
| | | phone.setPlatform(2); |
| | |
| | | } |
| | | |
| | | //招聘电话 |
| | | 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.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneFive.setType(5); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneFive.setPlatform(1); |
| | | } else { |
| | | phoneFive.setPlatform(2); |
| | |
| | | //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.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | phoneFour.setType(4); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | phoneFour.setPlatform(1); |
| | | } else { |
| | | phoneFour.setPlatform(2); |
| | |
| | | |
| | | /// 节假日服务费 |
| | | if("holidayServiceFeeSetting".equals(type)){ |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITSysSensitiveWordsService tSysSensitiveWordsService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到敏感词管理首页 |
| | |
| | | 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(tSysSensitiveWordsService.getSensitiveWordList(page, beginTime, endTime, content)); |
| | |
| | | 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 ITTaxiCardPaymentService taxiCardPaymentService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("") |
| | | public String index(){ |
| | |
| | | |
| | | @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; |
| | |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | @RequestParam Integer updateType, |
| | | @RequestParam BigDecimal money) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | 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"; |
| | | } |
| | | // 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.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | |
| | | |
| | |
| | | |
| | | Random random = new Random(); |
| | | String result=""; |
| | | for (int i=0;i<8;i++) |
| | | { |
| | | for (int i = 0; i < 8; i++) { |
| | | result+=random.nextInt(10); |
| | | } |
| | | tBalanceModifyRecord.setRecordID(result); |
| | |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | tUser.setPassWord(ShiroKit.md5(password, "&a.s")); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | tUser.setRemark(remark); |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | user.setState(1); |
| | | user.setFlag("1"); |
| | | user.setInsertTime(new Date()); |
| | | user.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | user.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.insert(user); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到实名认证列表首页 |
| | |
| | | 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; |
| | |
| | | |
| | | @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(); |
| | | 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 ITUserRedPacketRecordService redPacketRecordService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转领取统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/receiveRecord") |
| | |
| | | @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)){ |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到调度管理首页 |
| | |
| | | */ |
| | | @RequestMapping("/tDispatch_add") |
| | | public String tDispatchAdd(Model model) { |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | 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()) { |
| | | if (2 == shiroExtUtil.getUser().getRoleType()) { |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId", ShiroExtUtil.getUser().getObjectId())); |
| | | .eq("superiorId", shiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList", franchiseeList); |
| | | } else { |
| | | model.addAttribute("franchiseeList", null); |
| | |
| | | model.addAttribute("item",tDispatch); |
| | | LogObjectHolder.me().set(tDispatch); |
| | | |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 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); |
| | | } |
| | | |
| | |
| | | if (count > 0) { |
| | | return new ErrorTip(500, "账号已存在,请重新输入"); |
| | | } |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | if (2 == roleType) { |
| | | tDispatch.setCompanyId(objectId); |
| | | } else if (3 == roleType) { |
| | |
| | | tDispatch.setFranchiseeId(objectId); |
| | | } |
| | | tDispatch.setInsertTime(new Date()); |
| | | tDispatch.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tDispatch.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | tDispatch.setInsertUserRole(roleType); |
| | | tDispatch.setState(1); |
| | | if(tDispatch.getCompanyId() == null){ |
| | | Integer objectId1 = userService.selectById(ShiroExtUtil.getUser().getId()).getObjectId(); |
| | | Integer objectId1 = userService.selectById(shiroExtUtil.getUser().getId()).getObjectId(); |
| | | tDispatch.setCompanyId(objectId1); |
| | | } |
| | | tDispatch.setPassword(ShiroKit.md5(tDispatch.getPassword(), "WL:x9#")); |
| | |
| | | return new ErrorTip(500, "账号已存在,请重新输入"); |
| | | } |
| | | } |
| | | Integer roleType = ShiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer roleType = shiroExtUtil.getUser().getRoleType(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | if (2 == roleType) { |
| | | tDispatch.setCompanyId(objectId); |
| | | } else if (3 == roleType) { |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITIntegralGoodsService tIntegralGoodsService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到商品管理首页 |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITIntegralOrderService tIntegralOrderService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到积分兑换订单首页 |
| | |
| | | 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 ITLineCompanyService itLineCompanyService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到跨城站点管理首页 |
| | |
| | | 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); |
| | | |
| | | //添加线路站点起点+终点 |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderCharterService tOrderCharterService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到旅游包车订单首页 |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderCharteredCarService tOrderCharteredCarService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到旅游包车订单首页 |
| | |
| | | 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; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * |
| | | * @param orderDetailId |
| | | * @return |
| | | */ |
| | | @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() |
| | |
| | | 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){ |
| | |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到小件物流订单首页 |
| | | */ |
| | |
| | | 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); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderLogisticsId) { |
| | | try{ |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(tOrderLogisticsId); |
| | | tOrderLogistics.setState(10); |
| | | |
| | |
| | | @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); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * |
| | | * @param orderDetailId |
| | | * @return |
| | | */ |
| | | @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() |
| | |
| | | |
| | | @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); |
| | | 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++) { |
| | |
| | | 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); |
| | | 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); |
| | | 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){ |
| | | Integer originalDriverId = tReassign.getOriginalDriverId(); |
| | |
| | | public Object optCross(@RequestParam Integer tReassignId,@RequestParam Integer optType) { |
| | | try { |
| | | TReassign tReassign = tReassignService.selectById(tReassignId); |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | if (1 == optType){ |
| | | |
| | | |
| | |
| | | @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){ |
| | | Integer originalDriverId = tReassign.getOriginalDriverId(); |
| | |
| | | @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){ |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService tServerCarmodelService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到快车车型设置首页 |
| | |
| | | @ResponseBody |
| | | public Object list(String name,Integer state) { |
| | | 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(tServerCarmodelService.getServerCarModelList(page, 1, name, state)); |
| | |
| | | @ResponseBody |
| | | public Object listAcrossCity(String name,Integer state) { |
| | | 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(tServerCarmodelService.getServerCarModelList(page, 2, name, state)); |
| | |
| | | @ResponseBody |
| | | public Object listCharter(String name,Integer state) { |
| | | 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(tServerCarmodelService.getServerCarModelList(page, 3, name, state)); |
| | |
| | | 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 GDMapElectricFenceUtil gdMapElectricFenceUtil; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | 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); |
| | | |
| | |
| | | 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 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)){ |
| | | JSONObject json1 = JSONObject.fromObject(one.getContent()); |
| | |
| | | @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){ |
| | |
| | | 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<>(); |
| | |
| | | @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){ |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | | 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); |
| | |
| | | @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) { |
| | | TSystemPrice tSystemPrice = new TSystemPrice(); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到黑板 |
| | | */ |
| | | @RequestMapping("") |
| | | public String blackboard(Model model,Integer type) { |
| | | //查询当前用户是否有"首页"菜单的权限 |
| | | Integer id = ShiroExtUtil.getUser().getId(); |
| | | 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())); |
| | | int count = loginLogService.selectCount(new EntityWrapper<LoginLog>().eq("userid", shiroExtUtil.getUser().getId())); |
| | | model.addAttribute("loginNum", count); |
| | | |
| | | Role role = roleService.selectById(user.getRoleid()); |
| | |
| | | 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(); |
| | | Integer userId = shiroExtUtil.getUser().getId(); |
| | | User user = userService.selectById(userId); |
| | | String oldMd5 = ShiroKit.md5(oldPwd, user.getSalt()); |
| | | if (user.getPassword().equals(oldMd5)) { |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | if (ShiroExtUtil.getUser().isAdmin()) { |
| | | 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); |
| | |
| | | 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()); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(user.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request1 = new SaveStaffNodeRequest(); |
| | | request1.setMobile(user2.getPhone()); |
| | | request1.setMobile(tCompany.getPrincipalPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEmpName(user.getName()); |
| | | request1.setEmpNickname(user.getName()); |
| | |
| | | request1.setSuperLevel(0); |
| | | request1.setHideMobile(0); |
| | | SaveStaffNode saveStaffNode = EmployeeUtil.saveStaffNode(request1); |
| | | Long empId = saveStaffNode.getEmpId(); |
| | | 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())) { |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(user.getPhone(), tCompany.getEnterCode()); |
| | | if(null == userInfoByPhone || userInfoByPhone.size() == 0){ |
| | | SaveStaffNodeRequest request1 = new SaveStaffNodeRequest(); |
| | | request1.setMobile(user2.getPhone()); |
| | | request1.setMobile(tCompany.getPrincipalPhone()); |
| | | request1.setEntercode(tCompany.getEnterCode()); |
| | | request1.setEmpName(user.getName()); |
| | | request1.setEmpNickname(user.getName()); |
| | |
| | | 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()); |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | */ |
| | | @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 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(); |
| | | Integer companyId = shiroExtUtil.getUser().getRoleType() == 1 ? null : shiroExtUtil.getUser().getObjectId(); |
| | | String start = ""; |
| | | String end = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | |
| | | @Override |
| | | public ResultUtil addCarRental(CarRental carRental) throws Exception { |
| | | carRental.setUserType(3); |
| | | carRental.setUserId(ShiroExtUtil.getUser().getObjectId()); |
| | | 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.setCityName(region.getName()); |
| | | carRental.setCreateTime(new Date()); |
| | | carRental.setFirstPageShow(2); |
| | | carRental.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1 && carRental.getStatus() == 1) { |
| | | carRental.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | if (shiroExtUtil.getUser().getRoleType() == 1 && carRental.getStatus() == 1) { |
| | | carRental.setStatus(4); |
| | | } |
| | | this.insert(carRental); |
| | |
| | | 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 { |
| | | |
| | | @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); |
| | |
| | | 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); |
| | | 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); |
| | |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.rewardDetailsList(ShiroExtUtil.getUser().getObjectId(), driverName, driverPhone, startTime, endTime, null, null); |
| | | 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++) { |
| | |
| | | |
| | | 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; |
| | |
| | | @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, |
| | |
| | | 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 ITDriverService driverService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | 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()); |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | 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"); |
| | |
| | | maps.put("rows", 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; |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | 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)){ |
| | |
| | | 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 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)){ |
| | |
| | | @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) { |
| | |
| | | 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"); |
| | |
| | | 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]; |
| | |
| | | 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 IIncomeService incomeService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | @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[][] values = new String[mapList.size()][]; |
| | |
| | | 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> |
| | |
| | | |
| | | @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>> 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(); |
| | | if (shiroExtUtil.getUser().getObjectId() != 1) { |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | System.out.println(objectId); |
| | | |
| | | for (Map<String, Object> map : withdrawalList) { |
| | |
| | | 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); |
| | | 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");//未提现金额 |
| | |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 2, driverName, driverPhone, startTime, endTime, null, null); |
| | | 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++) { |
| | |
| | | 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); |
| | | 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");//未提现金额 |
| | |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.orderWithdrawalDetailsList(ShiroExtUtil.getUser().getObjectId(), 1, driverName, driverPhone, startTime, endTime, null, null); |
| | | 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++) { |
| | |
| | | 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 IUserService userService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Override |
| | | public void insertOrUpdate(Integer id, String name, String startTime, Integer registCouponId, Integer registEnable, Integer registNumber, Integer registEffective, |
| | |
| | | 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); |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 微信小程序登录 |
| | | * |
| | | * @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>--> |
| | | </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 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="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}"/> |
| | |
| | | <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="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}"/> |
| | |
| | | <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-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">--> |
| | | <!-- <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> |
| | |
| | | |
| | | <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, |
| | | center: [107.561768, 26.188572], |
| | | zoom:10 |
| | | }); |
| | | |
| | | |
| | | var map_ = new AMap.Map('container_',{ |
| | | resizeEnable: true, |
| | | center: [107.561768, 26.188572], |
| | | mapStyle: 'amap://styles/1de318cbb8d12c02303a22c550b9ccc9', |
| | | zoom:10 |
| | | }); |
| | |
| | | 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, |
| | |
| | | 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> '); |
| | | $('#' + 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> '); |
| | | $('#' + 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> '); |
| | | $('#' + 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, |
| | |
| | | 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> '); |
| | | $('#' + 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> '); |
| | | $('#' + 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> '); |
| | | $('#' + 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) { |
| | | |
| | | 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); |
| | |
| | | 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{ |
| | |
| | | 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'); |
| | |
| | | ajax.set("discountEnable",elem4.checked==true?2:1); |
| | | ajax.set("discountSpecial",content5Num1); |
| | | ajax.set("discountTaxi",content5Num2); |
| | | ajax.set("discountLogistics",content5Num3); |
| | | ajax.set("discountLogistics", 0); |
| | | ajax.set("redenvelopeId",$("#content6RedId").val()); |
| | | ajax.set("redenvelopeEnable",elem5.checked==true?2:1); |
| | | ajax.set('redPrice', $('#content6Num5').val()); |
| | |
| | | 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'); |
| | |
| | | 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("discountLogistics", parseFloat(0)); |
| | | ajax.set("redenvelopeId",$("#content6RedId").val()); |
| | | ajax.set("redenvelopeEnable",elem5.checked==true?2:1); |
| | | ajax.set('redPrice', $('#content6Num5').val()); |