救援APP
This commit is contained in:
parent
8e28f2ccec
commit
c6233b6eb0
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||||
import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||||
@ -16,13 +17,13 @@ import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
|||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,12 +47,6 @@ public class RescueInfoController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IRescueInfoService rescueInfoService;
|
private IRescueInfoService rescueInfoService;
|
||||||
|
|
||||||
// @Autowired
|
|
||||||
// private ISysUserService userService;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取救援订单
|
* 获取救援订单
|
||||||
*/
|
*/
|
||||||
@ -79,177 +74,178 @@ public class RescueInfoController extends BaseController {
|
|||||||
IPage<RescueInfo> rescueInfos = rescueInfoService.selectRescueInfoList(rescueInfo, page);
|
IPage<RescueInfo> rescueInfos = rescueInfoService.selectRescueInfoList(rescueInfo, page);
|
||||||
return success(rescueInfos);
|
return success(rescueInfos);
|
||||||
}
|
}
|
||||||
// @GetMapping("/getRescueStatistics")
|
|
||||||
// public AjaxResult getRescueStatistics(RescueInfo rescueInfo)
|
@GetMapping("/getRescueStatistics")
|
||||||
// {
|
public CommonResult getRescueStatistics(RescueInfo rescueInfo) {
|
||||||
//
|
|
||||||
// //获取当前登录用户
|
//获取当前登录用户
|
||||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
// SysUser user = userService.selectUserById(loginUser.getUserId());
|
AdminUserRespDTO user = userService.getUser(loginUser.getId());
|
||||||
// List<SysRole> roles = user.getRoles();
|
List<RoleReqDTO> roleList = roleApi.getRoleList();
|
||||||
// if (CollectionUtil.isNotEmpty(roles)){
|
List<Long> roleIdsByUserId = permissionApi.getRoleIdsByUserId(user.getId());
|
||||||
// for (SysRole role : roles) {
|
if (CollectionUtil.isNotEmpty(roleIdsByUserId)) {
|
||||||
// //如果是调度中心
|
List<RoleReqDTO> roles = roleList.stream().filter(item -> roleIdsByUserId.contains(item.getId())).collect(Collectors.toList());
|
||||||
// if (role.getRoleKey().equals("admin")||role.getRoleKey().equals("ddzx")||role.getRoleKey().equals("qt")||role.getRoleKey().equals("kj")||role.getRoleKey().equals("cn")){
|
if (CollectionUtil.isNotEmpty(roles)) {
|
||||||
// Map<String,Object> res = rescueInfoService.getRescueStatisticsByAdmin(rescueInfo);
|
for (RoleReqDTO role : roles) {
|
||||||
// return success(res);
|
//如果是调度中心
|
||||||
// }
|
if (role.getCode().equals("admin") || role.getCode().equals("ddzx") || role.getCode().equals("qt") || role.getCode().equals("kj") || role.getCode().equals("cn")) {
|
||||||
// }
|
Map<String, Object> res = rescueInfoService.getRescueStatisticsByAdmin(rescueInfo);
|
||||||
// }
|
return success(res);
|
||||||
//
|
}
|
||||||
// Map<String,Object> res = rescueInfoService.getRescueStatistics(rescueInfo);
|
}
|
||||||
// return success(res);
|
}
|
||||||
// }
|
}
|
||||||
// /**
|
Map<String, Object> res = rescueInfoService.getRescueStatistics(rescueInfo);
|
||||||
// * 获取救援订单
|
return success(res);
|
||||||
// */
|
}
|
||||||
// @GetMapping("/rescueInfoDetail")
|
|
||||||
// public AjaxResult rescueInfoDetail(Long rescueId)
|
/**
|
||||||
// {
|
* 获取救援订单
|
||||||
// return success(rescueInfoService.rescueInfoDetail(rescueId));
|
*/
|
||||||
// }
|
@GetMapping("/rescueInfoDetail")
|
||||||
//
|
public CommonResult rescueInfoDetail(Long rescueId) {
|
||||||
// /**
|
return success(rescueInfoService.rescueInfoDetail(rescueId));
|
||||||
// * 新增【道路救援发起】
|
}
|
||||||
// */
|
|
||||||
|
/**
|
||||||
|
* 新增【道路救援发起】
|
||||||
|
*/
|
||||||
// @Log(title = "【道路救援发起】", businessType = BusinessType.INSERT)
|
// @Log(title = "【道路救援发起】", businessType = BusinessType.INSERT)
|
||||||
// @PostMapping("/add")
|
@PostMapping("/add")
|
||||||
// public AjaxResult add(@RequestBody @Valid RescueInfo rescueInfo)
|
public CommonResult add(@RequestBody @Valid RescueInfo rescueInfo) {
|
||||||
// {
|
rescueInfoService.insertRescueInfo(rescueInfo);
|
||||||
// rescueInfoService.insertRescueInfo(rescueInfo);
|
return success();
|
||||||
// return success();
|
}
|
||||||
// }
|
|
||||||
//
|
/**
|
||||||
// /**
|
* 新增【道路救援发起】
|
||||||
// * 新增【道路救援发起】
|
*/
|
||||||
// */
|
|
||||||
// @Log(title = "【道路救援编辑】", businessType = BusinessType.UPDATE)
|
// @Log(title = "【道路救援编辑】", businessType = BusinessType.UPDATE)
|
||||||
// @PostMapping("/edit")
|
@PostMapping("/edit")
|
||||||
// public AjaxResult edit(@RequestBody @Valid RescueInfo rescueInfo)
|
public CommonResult edit(@RequestBody @Valid RescueInfo rescueInfo) {
|
||||||
// {
|
rescueInfoService.updateRescueInfo(rescueInfo);
|
||||||
// rescueInfoService.updateRescueInfo(rescueInfo);
|
return success();
|
||||||
// return success();
|
}
|
||||||
// }
|
|
||||||
// /**
|
/**
|
||||||
// * 取消【道路救援】
|
* 取消【道路救援】
|
||||||
// */
|
*/
|
||||||
// @Log(title = "取消【道路救援】", businessType = BusinessType.CLEAN)
|
// @Log(title = "取消【道路救援】", businessType = BusinessType.CLEAN)
|
||||||
// @PostMapping("/cancel")
|
@PostMapping("/cancel")
|
||||||
// public AjaxResult cancel(Long id)
|
public CommonResult cancel(Long id) {
|
||||||
// {
|
RescueInfo rescueInfo = new RescueInfo();
|
||||||
// RescueInfo rescueInfo =new RescueInfo();
|
rescueInfo.setId(id);
|
||||||
// rescueInfo.setId(id);
|
rescueInfo.setRescueStatus("0");
|
||||||
// rescueInfo.setRescueStatus("0");
|
return toAjax(rescueInfoService.updateRescueInfo(rescueInfo));
|
||||||
// return toAjax(rescueInfoService.updateRescueInfo(rescueInfo));
|
}
|
||||||
// }
|
|
||||||
//
|
/**
|
||||||
// /**
|
* 删除道路救援
|
||||||
// * 删除道路救援
|
*/
|
||||||
// */
|
|
||||||
// @Log(title = "删除道路救援", businessType = BusinessType.DELETE)
|
// @Log(title = "删除道路救援", businessType = BusinessType.DELETE)
|
||||||
// @PostMapping("/delRescueInfo")
|
@PostMapping("/delRescueInfo")
|
||||||
// public AjaxResult delRescueInfo(Long id)
|
public CommonResult delRescueInfo(Long id) {
|
||||||
// {
|
rescueInfoService.deleteRescueInfoById(id);
|
||||||
// rescueInfoService.deleteRescueInfoById(id);
|
return success();
|
||||||
// return success();
|
}
|
||||||
// }
|
|
||||||
//
|
//
|
||||||
// /**
|
|
||||||
// * 查询【请填写功能名称】列表
|
/**
|
||||||
// */
|
* 查询【请填写功能名称】列表
|
||||||
// @GetMapping("/driverList")
|
*/
|
||||||
// public TableDataInfo driverList(DriverInfoDto driverInfoDto)
|
@GetMapping("/driverList")
|
||||||
// {
|
public TableDataInfo driverList(DriverInfoDto driverInfoDto) {
|
||||||
// startPage();
|
startPage();
|
||||||
// List<DriverInfo2Dto> list = rescueInfoService.driverListApp(driverInfoDto);
|
List<DriverInfo2Dto> list = rescueInfoService.driverListApp(driverInfoDto);
|
||||||
// return getDataTable(list);
|
return getDataTable(list);
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询【请填写功能名称】列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/driverInMap")
|
@GetMapping("/driverInMap")
|
||||||
public CommonResult driverInMap(DriverInfoDto driverInfoDto)
|
public CommonResult driverInMap(DriverInfoDto driverInfoDto) {
|
||||||
{
|
|
||||||
List<DriverInfo2Dto> driverList = rescueInfoService.driverInMap(driverInfoDto);
|
List<DriverInfo2Dto> driverList = rescueInfoService.driverInMap(driverInfoDto);
|
||||||
return success(driverList);
|
return success(driverList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询【请填写功能名称】列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/driverInMap2")
|
@GetMapping("/driverInMap2")
|
||||||
public CommonResult driverInMap2()
|
public CommonResult driverInMap2() {
|
||||||
{
|
|
||||||
return success(rescueInfoService.driverInMap2());
|
return success(rescueInfoService.driverInMap2());
|
||||||
}
|
}
|
||||||
// /**
|
|
||||||
// * 获取扣车订单
|
/**
|
||||||
// */
|
* 获取扣车订单
|
||||||
// @GetMapping("/getKcList")
|
*/
|
||||||
// public TableDataInfo getKcList(RescueInfo rescueInfo)
|
@GetMapping("/getKcList")
|
||||||
// {
|
public TableDataInfo getKcList(RescueInfo rescueInfo) {
|
||||||
//
|
|
||||||
// startPage();
|
startPage();
|
||||||
// List<RescueInfo> rescueInfos = rescueInfoService.getKcList(rescueInfo);
|
List<RescueInfo> rescueInfos = rescueInfoService.getKcList(rescueInfo);
|
||||||
// return getDataTable(rescueInfos);
|
return getDataTable(rescueInfos);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 获取扣车订单
|
* 获取扣车订单
|
||||||
// */
|
*/
|
||||||
// @PostMapping("/openKc")
|
@PostMapping("/openKc")
|
||||||
// public AjaxResult openKc(Long rescueId) throws Exception {
|
public CommonResult openKc(Long rescueId) throws Exception {
|
||||||
// //获取当前登录用户
|
//获取当前登录用户
|
||||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
// SysUser user = userService.selectUserById(loginUser.getUserId());
|
AdminUserRespDTO user = userService.getUser(loginUser.getId());
|
||||||
// List<SysRole> roles = user.getRoles();
|
List<RoleReqDTO> roleList = roleApi.getRoleList();
|
||||||
// if (CollectionUtil.isNotEmpty(roles)){
|
List<Long> roleIdsByUserId = permissionApi.getRoleIdsByUserId(user.getId());
|
||||||
// for (SysRole role : roles) {
|
if (CollectionUtil.isNotEmpty(roleIdsByUserId)) {
|
||||||
// //如果是交警大队
|
List<RoleReqDTO> roles = roleList.stream().filter(item -> roleIdsByUserId.contains(item.getId())).collect(Collectors.toList());
|
||||||
// if (role.getRoleKey().equals("jjdd")){
|
if (CollectionUtil.isNotEmpty(roles)) {
|
||||||
// rescueInfoService.openKc(rescueId);
|
for (RoleReqDTO role : roles) {
|
||||||
// }
|
//如果是交警大队
|
||||||
// }
|
if (role.getCode().equals("jjdd")) {
|
||||||
// }
|
rescueInfoService.openKc(rescueId);
|
||||||
//
|
}
|
||||||
// return success();
|
}
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// /**
|
return success();
|
||||||
// * 进行还车
|
}
|
||||||
// */
|
|
||||||
// @PostMapping("/hcOpen")
|
/**
|
||||||
// public AjaxResult hcOpen(Long rescueId)
|
* 进行还车
|
||||||
// {
|
*/
|
||||||
// //获取当前登录用户
|
@PostMapping("/hcOpen")
|
||||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
public CommonResult hcOpen(Long rescueId) {
|
||||||
// SysUser user = userService.selectUserById(loginUser.getUserId());
|
//获取当前登录用户
|
||||||
// RescueInfo rescueInfo = rescueInfoService.getById(rescueId);
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
// rescueInfo.setHcTime(new Date());
|
AdminUserRespDTO user = userService.getUser(loginUser.getId());
|
||||||
// rescueInfo.setHcUserId(user.getUserId());
|
RescueInfo rescueInfo = rescueInfoService.getById(rescueId);
|
||||||
// rescueInfo.setHcUserName(user.getRealName());
|
rescueInfo.setHcTime(new Date());
|
||||||
// rescueInfo.setHcUserPhone(user.getPhonenumber());
|
rescueInfo.setHcUserId(user.getId());
|
||||||
// rescueInfo.setRescueStatus("8");
|
rescueInfo.setHcUserName(user.getNickname());
|
||||||
// rescueInfoService.updateById(rescueInfo);
|
rescueInfo.setHcUserPhone(user.getMobile());
|
||||||
// return success();
|
rescueInfo.setRescueStatus("8");
|
||||||
// }
|
rescueInfoService.updateById(rescueInfo);
|
||||||
//
|
return success();
|
||||||
// /**
|
}
|
||||||
// * 获取扣车订单
|
|
||||||
// */
|
/**
|
||||||
// @GetMapping("/getHcList")
|
* 获取扣车订单
|
||||||
// public TableDataInfo getHcList(RescueInfo rescueInfo)
|
*/
|
||||||
// {
|
@GetMapping("/getHcList")
|
||||||
//
|
public TableDataInfo getHcList(RescueInfo rescueInfo) {
|
||||||
// startPage();
|
|
||||||
// List<RescueInfo> rescueInfos = rescueInfoService.getHcList(rescueInfo);
|
startPage();
|
||||||
// return getDataTable(rescueInfos);
|
List<RescueInfo> rescueInfos = rescueInfoService.getHcList(rescueInfo);
|
||||||
// }
|
return getDataTable(rescueInfos);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取扣车订单
|
* 获取扣车订单
|
||||||
*/
|
*/
|
||||||
@GetMapping("/statisticsInfo")
|
@GetMapping("/statisticsInfo")
|
||||||
public CommonResult statisticsInfo(String type)
|
public CommonResult statisticsInfo(String type) {
|
||||||
{
|
return success(rescueInfoService.statisticsInfo(type));
|
||||||
return success( rescueInfoService.statisticsInfo(type));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import cn.iocoder.yudao.common.CommonErrorCodeConstants;
|
|||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.redis.RedisCache;
|
||||||
import cn.iocoder.yudao.module.rescue.domain.LoginBody;
|
import cn.iocoder.yudao.module.rescue.domain.LoginBody;
|
||||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||||
@ -13,6 +14,7 @@ import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
|
|||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginRespVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
|
||||||
import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
|
import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
|
||||||
import cn.iocoder.yudao.module.system.service.permission.MenuService;
|
import cn.iocoder.yudao.module.system.service.permission.MenuService;
|
||||||
@ -57,9 +59,8 @@ public class SysLoginController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DictDataApi dataApi;
|
private DictDataApi dataApi;
|
||||||
|
|
||||||
// @Resource
|
@Resource
|
||||||
// @Autowired
|
private RedisCache redisCache2;
|
||||||
// private RedisCache redisCache;
|
|
||||||
//
|
//
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// private RestTemplate restTemplate;
|
// private RestTemplate restTemplate;
|
||||||
@ -132,20 +133,21 @@ public class SysLoginController {
|
|||||||
authLoginReqVO.setPassword(loginBody.getPassword());
|
authLoginReqVO.setPassword(loginBody.getPassword());
|
||||||
return success(loginService.login(authLoginReqVO));
|
return success(loginService.login(authLoginReqVO));
|
||||||
}
|
}
|
||||||
// /**
|
/**
|
||||||
// * 司机登录方法
|
* 司机登录方法
|
||||||
// *
|
*
|
||||||
// * @param loginBody 司机登录方法
|
* @param loginBody 司机登录方法
|
||||||
// * @return 结果
|
* @return 结果
|
||||||
// */
|
*/
|
||||||
// @PostMapping("/driverLogin")
|
@PostMapping("/driverLogin")
|
||||||
// public AjaxResult driverLogin(@RequestBody LoginBody loginBody) throws Exception {
|
public CommonResult driverLogin(@RequestBody LoginBody loginBody) throws Exception {
|
||||||
// AjaxResult ajax = success();
|
// 生成令牌
|
||||||
// // 生成令牌
|
AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO();
|
||||||
// String token = loginService.driverLogin(loginBody);
|
authLoginReqVO.setUsername(loginBody.getUsername());
|
||||||
// ajax.put(Constants.TOKEN, token);
|
authLoginReqVO.setPassword(loginBody.getPassword());
|
||||||
// return ajax;
|
AuthLoginRespVO login = loginService.login(authLoginReqVO);
|
||||||
// }
|
return success(login);
|
||||||
|
}
|
||||||
// /**
|
// /**
|
||||||
// * 登录获取验证码
|
// * 登录获取验证码
|
||||||
// *
|
// *
|
||||||
@ -155,20 +157,21 @@ public class SysLoginController {
|
|||||||
// public AjaxResult loginSmsCode(String phone) {
|
// public AjaxResult loginSmsCode(String phone) {
|
||||||
// return loginService.loginSmsCode(phone);
|
// return loginService.loginSmsCode(phone);
|
||||||
// }
|
// }
|
||||||
// /**
|
/**
|
||||||
// * 登录方法
|
* 登录方法
|
||||||
// *
|
*
|
||||||
// * @param loginBody 登录信息
|
* @param loginBody 登录信息
|
||||||
// * @return 结果
|
* @return 结果
|
||||||
// */
|
*/
|
||||||
// @PostMapping("/loginJx")
|
@PostMapping("/loginJx")
|
||||||
// public AjaxResult loginJx(@RequestBody LoginBody loginBody) throws Exception {
|
public CommonResult loginJx(@RequestBody LoginBody loginBody) throws Exception {
|
||||||
// AjaxResult ajax = success();
|
// 生成令牌
|
||||||
// // 生成令牌
|
AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO();
|
||||||
// String token = loginService.loginJx(loginBody);
|
authLoginReqVO.setUsername(loginBody.getUsername());
|
||||||
// ajax.put(Constants.TOKEN, token);
|
authLoginReqVO.setPassword(loginBody.getPassword());
|
||||||
// return ajax;
|
AuthLoginRespVO login = loginService.login(authLoginReqVO);
|
||||||
// }
|
return success(login);
|
||||||
|
}
|
||||||
// @PostMapping("/loginSmsCodeJx")
|
// @PostMapping("/loginSmsCodeJx")
|
||||||
// public AjaxResult loginSmsCodeJx(String phone) {
|
// public AjaxResult loginSmsCodeJx(String phone) {
|
||||||
// return loginService.loginSmsCodeJx(phone);
|
// return loginService.loginSmsCodeJx(phone);
|
||||||
@ -179,7 +182,7 @@ public class SysLoginController {
|
|||||||
// * @return 结果
|
// * @return 结果
|
||||||
// */
|
// */
|
||||||
// @PostMapping("/pwdSmsCode")
|
// @PostMapping("/pwdSmsCode")
|
||||||
// public AjaxResult pwdSmsCode(String phone) {
|
// public CommonResult pwdSmsCode(String phone) {
|
||||||
// return loginService.pwdSmsCode(phone);
|
// return loginService.pwdSmsCode(phone);
|
||||||
// }
|
// }
|
||||||
// /**
|
// /**
|
||||||
@ -188,12 +191,12 @@ public class SysLoginController {
|
|||||||
// * @return 结果
|
// * @return 结果
|
||||||
// */
|
// */
|
||||||
// @PostMapping("/updatePwd")
|
// @PostMapping("/updatePwd")
|
||||||
// public AjaxResult updatePwd(String phone, String msgCode,String password) {
|
// public CommonResult<Object> updatePwd(String phone, String msgCode, String password) {
|
||||||
// if (!redisCache.hasKey(phone+"-pwdCode")||!redisCache.getCacheObject(phone+"-pwdCode").equals(msgCode)){
|
// if (!redisCache2.hasKey(phone+"-pwdCode")||!redisCache2.getCacheObject(phone+"-pwdCode").equals(msgCode)){
|
||||||
// return error("验证码错误");
|
// return error(500, "验证码错误");
|
||||||
// }
|
// }
|
||||||
// SysUser sysUser = userService.selectUserByPhone(phone);
|
// AdminUserRespDTO sysUser = userService.getUserByUsername(phone);
|
||||||
// if (userService.resetUserPwd(sysUser.getUserName(), SecurityUtils.encryptPassword(password)) > 0)
|
// if (userService.resetPassword(sysUser.getId(), SecurityFrameworkUtils.encryptPassword(password)); > 0)
|
||||||
// {
|
// {
|
||||||
// // 更新缓存用户密码
|
// // 更新缓存用户密码
|
||||||
// sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
// sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
@ -202,9 +205,9 @@ public class SysLoginController {
|
|||||||
// }
|
// }
|
||||||
// return error("修改密码异常,请联系管理员");
|
// return error("修改密码异常,请联系管理员");
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
@ -227,23 +230,23 @@ public class SysLoginController {
|
|||||||
// ajax.put("permissions", permissions);
|
// ajax.put("permissions", permissions);
|
||||||
return success(map);
|
return success(map);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//
|
//
|
||||||
// @Resource
|
// @Resource
|
||||||
// private DriveSchoolCoachMapper driveSchoolCoachMapper;
|
// private DriveSchoolCoachMapper driveSchoolCoachMapper;
|
||||||
//
|
|
||||||
// @Resource
|
// @Resource
|
||||||
// private SysUserMapper sysUserMapper;
|
// private SysUserMapper sysUserMapper;
|
||||||
//
|
|
||||||
// /**
|
// /**
|
||||||
// * 获取
|
// * 获取
|
||||||
// *
|
// *
|
||||||
// * @return 用户信息
|
// * @return 用户信息
|
||||||
// */
|
// */
|
||||||
// @GetMapping("getJxInfo")
|
// @GetMapping("getJxInfo")
|
||||||
// public AjaxResult getJxInfo()
|
// public CommonResult getJxInfo()
|
||||||
// {
|
// {
|
||||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
// AdminUserRespDTO user = SecurityFrameworkUtils.getLoginUser()
|
||||||
// // 角色集合
|
// // 角色集合
|
||||||
// Set<String> roles = permissionService.getRolePermission(user);
|
// Set<String> roles = permissionService.getRolePermission(user);
|
||||||
// //获取驾校的
|
// //获取驾校的
|
||||||
|
@ -2,14 +2,17 @@ package cn.iocoder.yudao.module.rescue.controller.admin;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||||
import cn.iocoder.yudao.module.rescue.domain.RescueDriverPosition;
|
import cn.iocoder.yudao.module.rescue.domain.RescueDriverPosition;
|
||||||
import cn.iocoder.yudao.module.rescue.service.IRescueDriverPositionService;
|
import cn.iocoder.yudao.module.rescue.service.IRescueDriverPositionService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.java.Log;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,74 +27,74 @@ public class RescueDriverPositionController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRescueDriverPositionService rescueDriverPositionService;
|
private IRescueDriverPositionService rescueDriverPositionService;
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 查询救援司机位置记录列表
|
* 查询救援司机位置记录列表
|
||||||
// */
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rescue:rescue_driver_position:list')")
|
@PreAuthorize("@ss.hasPermission('rescue:rescue_driver_position:list')")
|
||||||
// @GetMapping("/list")
|
@GetMapping("/list")
|
||||||
// public TableDataInfo list(RescueDriverPosition rescueDriverPosition)
|
public TableDataInfo list(RescueDriverPosition rescueDriverPosition)
|
||||||
// {
|
{
|
||||||
// startPage();
|
startPage();
|
||||||
// List<RescueDriverPosition> list = rescueDriverPositionService.selectRescueDriverPositionList(rescueDriverPosition);
|
List<RescueDriverPosition> list = rescueDriverPositionService.selectRescueDriverPositionList(rescueDriverPosition);
|
||||||
// return getDataTable(list);
|
return getDataTable(list);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 导出救援司机位置记录列表
|
* 导出救援司机位置记录列表
|
||||||
// */
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rescue:rescue_driver_position:export')")
|
@PreAuthorize("@ss.hasPermission('rescue:rescue_driver_position:export')")
|
||||||
// @Log(title = "救援司机位置记录", businessType = BusinessType.EXPORT)
|
// @Log(title = "救援司机位置记录", businessType = BusinessType.EXPORT)
|
||||||
// @PostMapping("/export")
|
@PostMapping("/export")
|
||||||
// public void export(HttpServletResponse response, RescueDriverPosition rescueDriverPosition)
|
public void export(HttpServletResponse response, RescueDriverPosition rescueDriverPosition)
|
||||||
// {
|
{
|
||||||
// List<RescueDriverPosition> list = rescueDriverPositionService.selectRescueDriverPositionList(rescueDriverPosition);
|
List<RescueDriverPosition> list = rescueDriverPositionService.selectRescueDriverPositionList(rescueDriverPosition);
|
||||||
// ExcelUtil<RescueDriverPosition> util = new ExcelUtil<RescueDriverPosition>(RescueDriverPosition.class);
|
ExcelUtil<RescueDriverPosition> util = new ExcelUtil<RescueDriverPosition>(RescueDriverPosition.class);
|
||||||
// util.exportExcel(response, list, "救援司机位置记录数据");
|
util.exportExcel(response, list, "救援司机位置记录数据");
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 获取救援司机位置记录详细信息
|
* 获取救援司机位置记录详细信息
|
||||||
// */
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rescue:rescue_driver_position:query')")
|
@PreAuthorize("@ss.hasPermission('rescue:rescue_driver_position:query')")
|
||||||
// @GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
// public AjaxResult getInfo(@PathVariable("id") Long id)
|
public CommonResult getInfo(@PathVariable("id") Long id)
|
||||||
// {
|
{
|
||||||
// return success(rescueDriverPositionService.selectRescueDriverPositionById(id));
|
return success(rescueDriverPositionService.selectRescueDriverPositionById(id));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 新增救援司机位置记录
|
* 新增救援司机位置记录
|
||||||
// */
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rescue:rescue_driver_position:add')")
|
@PreAuthorize("@ss.hasPermission('rescue:rescue_driver_position:add')")
|
||||||
// @Log(title = "救援司机位置记录", businessType = BusinessType.INSERT)
|
// @Log(title = "救援司机位置记录", businessType = BusinessType.INSERT)
|
||||||
// @PostMapping
|
@PostMapping
|
||||||
// public AjaxResult add(@RequestBody RescueDriverPosition rescueDriverPosition)
|
public CommonResult add(@RequestBody RescueDriverPosition rescueDriverPosition)
|
||||||
// {
|
{
|
||||||
// return toAjax(rescueDriverPositionService.insertRescueDriverPosition(rescueDriverPosition));
|
return toAjax(rescueDriverPositionService.insertRescueDriverPosition(rescueDriverPosition));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 修改救援司机位置记录
|
* 修改救援司机位置记录
|
||||||
// */
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rescue:rescue_driver_position:edit')")
|
@PreAuthorize("@ss.hasPermission('rescue:rescue_driver_position:edit')")
|
||||||
// @Log(title = "救援司机位置记录", businessType = BusinessType.UPDATE)
|
// @Log(title = "救援司机位置记录", businessType = BusinessType.UPDATE)
|
||||||
// @PutMapping
|
@PutMapping
|
||||||
// public AjaxResult edit(@RequestBody RescueDriverPosition rescueDriverPosition)
|
public CommonResult edit(@RequestBody RescueDriverPosition rescueDriverPosition)
|
||||||
// {
|
{
|
||||||
// return toAjax(rescueDriverPositionService.updateRescueDriverPosition(rescueDriverPosition));
|
return toAjax(rescueDriverPositionService.updateRescueDriverPosition(rescueDriverPosition));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 删除救援司机位置记录
|
* 删除救援司机位置记录
|
||||||
// */
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rescue:rescue_driver_position:remove')")
|
@PreAuthorize("@ss.hasPermission('rescue:rescue_driver_position:remove')")
|
||||||
// @Log(title = "救援司机位置记录", businessType = BusinessType.DELETE)
|
// @Log(title = "救援司机位置记录", businessType = BusinessType.DELETE)
|
||||||
// @DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
// public AjaxResult remove(@PathVariable Long[] ids)
|
public CommonResult remove(@PathVariable Long[] ids)
|
||||||
// {
|
{
|
||||||
// return toAjax(rescueDriverPositionService.deleteRescueDriverPositionByIds(ids));
|
return toAjax(rescueDriverPositionService.deleteRescueDriverPositionByIds(ids));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询救援司机位置记录列表
|
* 查询救援司机位置记录列表
|
||||||
|
@ -42,14 +42,14 @@ public class RescueRefuelRecordController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导出加油记录列表
|
* 导出加油记录列表
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermission('rescue:refuelRecord:export')")
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:export')")
|
||||||
//// @Log(title = "加油记录", businessType = BusinessType.EXPORT)
|
// @Log(title = "加油记录", businessType = BusinessType.EXPORT)
|
||||||
// @PostMapping("/export")
|
@PostMapping("/export")
|
||||||
// public void export(HttpServletResponse response, RescueRefuelRecord rescueRefuelRecord) {
|
public void export(HttpServletResponse response, RescueRefuelRecord rescueRefuelRecord) {
|
||||||
// List<RescueRefuelRecord> list = rescueRefuelRecordService.selectRescueRefuelRecordList(rescueRefuelRecord);
|
List<RescueRefuelRecord> list = rescueRefuelRecordService.list();
|
||||||
// ExcelUtil<RescueRefuelRecord> util = new ExcelUtil<RescueRefuelRecord>(RescueRefuelRecord.class);
|
ExcelUtil<RescueRefuelRecord> util = new ExcelUtil<RescueRefuelRecord>(RescueRefuelRecord.class);
|
||||||
// util.exportExcel(response, list, "加油记录数据");
|
util.exportExcel(response, list, "加油记录数据");
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取加油记录详细信息
|
* 获取加油记录详细信息
|
||||||
|
@ -286,7 +286,6 @@
|
|||||||
FROM rescue_info ri
|
FROM rescue_info ri
|
||||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||||
where 1 = 1
|
where 1 = 1
|
||||||
${params.dataScope}
|
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteOtherInfo1">
|
<delete id="deleteOtherInfo1">
|
||||||
DELETE
|
DELETE
|
||||||
|
Loading…
Reference in New Issue
Block a user