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