Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b95f9feac8
@ -10,4 +10,5 @@ public interface CommonErrorCodeConstants extends ErrorCodeConstants {
|
||||
ErrorCode STAFF_CHANGE_CREATE_REPEAT = new ErrorCode(2_002_000_001, "该员工工作已交接");
|
||||
ErrorCode STAFF_NOT_CHANGE = new ErrorCode(2_002_000_003, "该员工还有工作未交接,不可删除");
|
||||
ErrorCode LOGIN_ACCOUNT_EXIST = new ErrorCode(2_002_000_004, "登录账号已存在");
|
||||
ErrorCode LOGIN_ACCOUNT_NOT_EXIST = new ErrorCode(2_002_000_005, "登录账号不存在");
|
||||
}
|
||||
|
@ -11,16 +11,21 @@
|
||||
|
||||
<artifactId>dl-module-rescue</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>dl-module-base</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>dl-module-company</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>dl-module-base</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>dl-module-company</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-system-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.appBase.controller;
|
||||
package cn.iocoder.yudao.module.appBase.controller.admin;
|
||||
|
||||
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.framework.common.pojo.CommonResult;
|
||||
@ -117,7 +118,7 @@ public class SysAnnouncementController extends BaseController
|
||||
public CommonResult getOwnNoRead()
|
||||
{
|
||||
//当前登录用户
|
||||
LoginUser loginUser = getLoginUser();
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
SysAnnouncement sysAnnouncement =new SysAnnouncement();
|
||||
sysAnnouncement.setToUserId(loginUser.getId());
|
||||
LambdaQueryWrapper<SysAnnouncement> queryWrapper =new LambdaQueryWrapper<>();
|
||||
@ -132,7 +133,8 @@ public class SysAnnouncementController extends BaseController
|
||||
public CommonResult setAllRead()
|
||||
{
|
||||
//当前登录用户
|
||||
LoginUser loginUser = getLoginUser();
|
||||
// LoginUser loginUser = getLoginUser();
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
SysAnnouncement sysAnnouncement =new SysAnnouncement();
|
||||
sysAnnouncement.setToUserId(loginUser.getId());
|
||||
LambdaUpdateWrapper<SysAnnouncement> queryWrapper =new LambdaUpdateWrapper<>();
|
@ -7,8 +7,8 @@ import cn.hutool.http.HttpRequest;
|
||||
import cn.iocoder.yudao.module.appBase.domain.SysAnnouncement;
|
||||
import cn.iocoder.yudao.module.appBase.mapper.SysAnnouncementMapper;
|
||||
import cn.iocoder.yudao.module.appBase.service.ISysAnnouncementService;
|
||||
import cn.iocoder.yudao.module.rescue.controller.app.AnnouncementSocket;
|
||||
import cn.iocoder.yudao.module.rescue.controller.app.UserAnnouncementSocket;
|
||||
import cn.iocoder.yudao.module.rescue.app.controller.admin.AnnouncementSocket;
|
||||
import cn.iocoder.yudao.module.rescue.app.controller.admin.UserAnnouncementSocket;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.rescue.controller.app;
|
||||
package cn.iocoder.yudao.module.rescue.app.controller.admin;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
@ -0,0 +1,253 @@
|
||||
package cn.iocoder.yudao.module.rescue.app.controller.admin;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
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.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueInfoService;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
||||
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 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 javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/rescueInfo")
|
||||
public class RescueInfoController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private AdminUserApi userService;
|
||||
|
||||
@Resource
|
||||
private RoleApi roleApi;
|
||||
|
||||
@Resource
|
||||
private PermissionApi permissionApi;
|
||||
@Resource
|
||||
private IRescueInfoService rescueInfoService;
|
||||
|
||||
// @Autowired
|
||||
// private ISysUserService userService;
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
/**
|
||||
* 获取救援订单
|
||||
*/
|
||||
@GetMapping("/getRescueList")
|
||||
public CommonResult getRescueList(RescueInfo rescueInfo,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueInfo> page = new Page<>(pageNum, pageSize);
|
||||
//获取当前登录用户
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
AdminUserRespDTO user = userService.getUser(loginUser.getId());
|
||||
List<Long> roleIds = permissionApi.getRoleIdsByUserId(user.getId());
|
||||
List<RoleReqDTO> roleList = roleApi.getRoleList();
|
||||
List<RoleReqDTO> roles = roleList.stream().filter(item -> roleIds.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")) {
|
||||
IPage<RescueInfo> rescueInfos = rescueInfoService.selectRescueInfoListByAdmin(rescueInfo, page);
|
||||
return success(rescueInfos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增【道路救援发起】
|
||||
// */
|
||||
// @Log(title = "【道路救援发起】", businessType = BusinessType.INSERT)
|
||||
// @PostMapping("/add")
|
||||
// public AjaxResult 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();
|
||||
// }
|
||||
// /**
|
||||
// * 取消【道路救援】
|
||||
// */
|
||||
// @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));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除道路救援
|
||||
// */
|
||||
// @Log(title = "删除道路救援", businessType = BusinessType.DELETE)
|
||||
// @PostMapping("/delRescueInfo")
|
||||
// public AjaxResult 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("/driverInMap")
|
||||
// public AjaxResult driverInMap(DriverInfoDto driverInfoDto)
|
||||
// {
|
||||
// List<DriverInfo2Dto> driverList = rescueInfoService.driverInMap(driverInfoDto);
|
||||
// return success(driverList);
|
||||
// }
|
||||
// /**
|
||||
// * 查询【请填写功能名称】列表
|
||||
// */
|
||||
// @GetMapping("/driverInMap2")
|
||||
// public AjaxResult 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("/statisticsInfo")
|
||||
// public AjaxResult statisticsInfo(String type)
|
||||
// {
|
||||
// return success( rescueInfoService.statisticsInfo(type));
|
||||
// }
|
||||
}
|
@ -0,0 +1,618 @@
|
||||
package cn.iocoder.yudao.module.rescue.app.controller.admin;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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.domain.LoginBody;
|
||||
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.RoleApi;
|
||||
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.dal.dataobject.permission.MenuDO;
|
||||
import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.MenuService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/rescue")
|
||||
public class SysLoginController {
|
||||
@Resource
|
||||
private AdminAuthService loginService;
|
||||
|
||||
@Resource
|
||||
private MenuService menuService;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysPermissionService permissionService;
|
||||
@Resource
|
||||
private AdminUserApi userService;
|
||||
|
||||
@Resource
|
||||
private PermissionApi permissionApi;
|
||||
|
||||
|
||||
@Resource
|
||||
private RoleApi roleApi;
|
||||
|
||||
@Resource
|
||||
private DictDataApi dataApi;
|
||||
|
||||
// @Resource
|
||||
// @Autowired
|
||||
// private RedisCache redisCache;
|
||||
//
|
||||
// @Autowired
|
||||
// private RestTemplate restTemplate;
|
||||
//
|
||||
// @Resource
|
||||
// private WechatPayConfig wxConfig;
|
||||
// @Autowired
|
||||
// private IUserBalanceService balanceService;
|
||||
// @Autowired
|
||||
// private IShopMallPartnersService partnersService;
|
||||
// @Autowired
|
||||
// private IPartnerWorkerService jcWorkerService;
|
||||
// @Autowired
|
||||
// private IShopConfigService configService;
|
||||
// @Autowired
|
||||
// private IDriverInfoService driverInfoService;
|
||||
// @Autowired
|
||||
// private IDriveSchoolInfoService driveSchoolInfoService;
|
||||
//
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public CommonResult login(@RequestBody LoginBody loginBody) {
|
||||
return null;
|
||||
// ajax = success();
|
||||
// // 生成令牌
|
||||
// String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||
// loginBody.getUuid());
|
||||
// ajax.put(Constants.TOKEN, token);
|
||||
// return ajax;
|
||||
}
|
||||
|
||||
@GetMapping("/dict/data/type/{type}")
|
||||
public CommonResult getDictDataByType(@PathVariable("type") String type){
|
||||
return success(dataApi.getDictDataList(type));
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/loginApp")
|
||||
public CommonResult loginApp(@RequestBody LoginBody loginBody) throws Exception {
|
||||
String userName = loginBody.getUsername();
|
||||
AdminUserRespDTO user = userService.getUserByUsername(userName);
|
||||
if (ObjectUtil.isEmpty(user)) {
|
||||
return error(CommonErrorCodeConstants.LOGIN_ACCOUNT_NOT_EXIST);
|
||||
}
|
||||
// 获取登录用户的角色信息
|
||||
List<Long> roleIdsByUserId = permissionApi.getRoleIdsByUserId(user.getId());
|
||||
if (ObjectUtil.isEmpty(roleIdsByUserId) || roleIdsByUserId.size() == 0) {
|
||||
return error(CommonErrorCodeConstants.LOGIN_ACCOUNT_NOT_EXIST);
|
||||
}
|
||||
List<RoleReqDTO> roleList = roleApi.getRoleList();
|
||||
List<String> roleNames = roleList.stream().filter(item -> roleIdsByUserId.contains(item.getId())).map(item -> item.getName()).collect(Collectors.toList());
|
||||
Boolean flag = (loginBody.getType().equals("0") && roleNames.contains("救援业务管理员")) || (loginBody.getType().equals("1") && roleNames.contains("交警"));
|
||||
// 角色认证登录
|
||||
if (!flag) {
|
||||
return error(CommonErrorCodeConstants.LOGIN_ACCOUNT_NOT_EXIST);
|
||||
}
|
||||
AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO();
|
||||
authLoginReqVO.setUsername(loginBody.getUsername());
|
||||
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;
|
||||
// }
|
||||
// /**
|
||||
// * 登录获取验证码
|
||||
// *
|
||||
// * @return 结果
|
||||
// */
|
||||
// @PostMapping("/loginSmsCode")
|
||||
// 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;
|
||||
// }
|
||||
// @PostMapping("/loginSmsCodeJx")
|
||||
// public AjaxResult loginSmsCodeJx(String phone) {
|
||||
// return loginService.loginSmsCodeJx(phone);
|
||||
// }
|
||||
// /**
|
||||
// * 忘记密码获取验证码
|
||||
// *
|
||||
// * @return 结果
|
||||
// */
|
||||
// @PostMapping("/pwdSmsCode")
|
||||
// public AjaxResult pwdSmsCode(String phone) {
|
||||
// return loginService.pwdSmsCode(phone);
|
||||
// }
|
||||
// /**
|
||||
// * 更新密码
|
||||
// *
|
||||
// * @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("验证码错误");
|
||||
// }
|
||||
// SysUser sysUser = userService.selectUserByPhone(phone);
|
||||
// if (userService.resetUserPwd(sysUser.getUserName(), SecurityUtils.encryptPassword(password)) > 0)
|
||||
// {
|
||||
// // 更新缓存用户密码
|
||||
// sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||
// userService.updateUser(sysUser);
|
||||
// return success();
|
||||
// }
|
||||
// return error("修改密码异常,请联系管理员");
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@GetMapping("/getInfo")
|
||||
public CommonResult getInfo() {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
map.put("user", loginUser);
|
||||
// 角色集合
|
||||
List<Long> roleIdsByUserId = permissionApi.getRoleIdsByUserId(loginUser.getId());
|
||||
List<RoleReqDTO> roleList = roleApi.getRoleList();
|
||||
List<String> roleNames = roleList.stream().filter(item -> roleIdsByUserId.contains(item.getId())).map(item -> item.getName()).collect(Collectors.toList());
|
||||
map.put("roles", roleNames);
|
||||
// 权限集合
|
||||
List<MenuDO> menuList = menuService.getMenuList();
|
||||
// Set<String> permissions = permissionService.getMenuPermission(user);
|
||||
// ajax.put("permissions", permissions);
|
||||
return success(map);
|
||||
}
|
||||
//
|
||||
//
|
||||
// @Resource
|
||||
// private DriveSchoolCoachMapper driveSchoolCoachMapper;
|
||||
//
|
||||
// @Resource
|
||||
// private SysUserMapper sysUserMapper;
|
||||
//
|
||||
// /**
|
||||
// * 获取
|
||||
// *
|
||||
// * @return 用户信息
|
||||
// */
|
||||
// @GetMapping("getJxInfo")
|
||||
// public AjaxResult getJxInfo()
|
||||
// {
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// // 角色集合
|
||||
// Set<String> roles = permissionService.getRolePermission(user);
|
||||
// //获取驾校的
|
||||
//
|
||||
// Long userId = SecurityUtils.getUserId();
|
||||
// SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
// String phonenumber = sysUser.getPhonenumber();
|
||||
// DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);
|
||||
//
|
||||
// if (ObjectUtils.isNotEmpty(driveSchoolCoach)){
|
||||
// user.setAvatar(driveSchoolCoach.getImage());
|
||||
// }
|
||||
// DriveSchoolInfo driveSchoolInfo = driveSchoolInfoService.getSchoolInfoByDeptId();
|
||||
//
|
||||
// AjaxResult ajax = success();
|
||||
// ajax.put("user", user);
|
||||
// ajax.put("roles", roles);
|
||||
// ajax.put("schoolInfo", driveSchoolInfo);
|
||||
// return ajax;
|
||||
// }
|
||||
// /**
|
||||
// * 获取App用户信息
|
||||
// *
|
||||
// * @return 用户信息
|
||||
// */
|
||||
// @GetMapping("/getAppInfo")
|
||||
// public AjaxResult getAppInfo()
|
||||
// {
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
||||
// // 角色集合
|
||||
// Set<String> roles = permissionService.getRolePermission(user);
|
||||
// UserBalance userBalance = balanceService.selectShopUserBalanceByUserId(user.getUserId());
|
||||
// if (ObjectUtil.isNotEmpty(userBalance)) {
|
||||
// sysUser.setBalance(userBalance.getBalance());
|
||||
// } else {
|
||||
// //新增用户积分表信息
|
||||
// userBalance=new UserBalance();
|
||||
// userBalance.setUserId(user.getUserId());
|
||||
// userBalance.setAllBalance(0L);
|
||||
// userBalance.setBalance(0L);
|
||||
// userBalance.setFrozenBalance(0L);
|
||||
// balanceService.insertShopUserBalance(userBalance);
|
||||
// sysUser.setBalance(0L);
|
||||
// }
|
||||
// AjaxResult ajax = success();
|
||||
// ajax.put("user", sysUser);
|
||||
// ajax.put("role", roles);
|
||||
// ShopConfig shopConfig = configService.selectShopConfigById(1L);
|
||||
// if (StringUtils.isEmpty(shopConfig.getOpenRz())||shopConfig.getOpenRz().equals("0")){
|
||||
// ajax.put("openRz", "0");
|
||||
// }else {
|
||||
// ajax.put("openRz", "1");
|
||||
// }
|
||||
// return ajax;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取App用户信息
|
||||
// *
|
||||
// * @return 用户信息
|
||||
// */
|
||||
// @GetMapping("/getJcgfInfo")
|
||||
// public AjaxResult getJcgfInfo() throws Exception {
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
||||
// // 角色集合
|
||||
// Set<String> roles = permissionService.getRolePermission(user);
|
||||
// AjaxResult ajax = success();
|
||||
// ajax.put("user", sysUser);
|
||||
// ajax.put("role", roles);
|
||||
// if (CollectionUtil.isNotEmpty(roles)){
|
||||
// AtomicBoolean flag = new AtomicBoolean(false);
|
||||
// roles.forEach(it->{
|
||||
// if (it.equals("jcgf")){
|
||||
// flag.set(true);
|
||||
// }
|
||||
// });
|
||||
// if (!flag.get()){
|
||||
// throw new Exception("身份有误");
|
||||
// }
|
||||
// }else {
|
||||
// throw new Exception("身份有误");
|
||||
// }
|
||||
//
|
||||
// return ajax;
|
||||
// }
|
||||
// //获取交警的信息
|
||||
// @GetMapping("/getJjInfo")
|
||||
// public AjaxResult getJjInfo() throws Exception {
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
||||
// // 角色集合
|
||||
// Set<String> roles = permissionService.getRolePermission(user);
|
||||
// AjaxResult ajax = success();
|
||||
// ajax.put("user", sysUser);
|
||||
// ajax.put("role", roles);
|
||||
// if (CollectionUtil.isNotEmpty(roles)){
|
||||
// AtomicBoolean flag = new AtomicBoolean(false);
|
||||
// roles.forEach(it->{
|
||||
// if (it.equals("jjdd")){
|
||||
// flag.set(true);
|
||||
// }
|
||||
// });
|
||||
// if (!flag.get()){
|
||||
// throw new Exception("身份有误");
|
||||
// }
|
||||
// }else {
|
||||
// throw new Exception("身份有误");
|
||||
// }
|
||||
//
|
||||
// return ajax;
|
||||
// }
|
||||
// /**
|
||||
// * 获取App用户信息
|
||||
// *
|
||||
// * @return 用户信息
|
||||
// */
|
||||
// @GetMapping("/getJcPartnerInfo")
|
||||
// public AjaxResult getJcPartnerInfo()
|
||||
// {
|
||||
// LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// queryWrapper.eq(ShopMallPartners::getUserId,user.getUserId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
||||
// ShopMallPartners partner = partnersService.getOne(queryWrapper);
|
||||
// if (ObjectUtil.isEmpty(partner)){
|
||||
// return error("信息有误");
|
||||
// }
|
||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
||||
// AjaxResult ajax = success();
|
||||
// ajax.put("user", sysUser);
|
||||
// return ajax;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取救援司机用户信息
|
||||
// *
|
||||
// * @return 用户信息
|
||||
// */
|
||||
// @GetMapping("/getRescueDriverInfo")
|
||||
// public AjaxResult getRescueDriverInfo()
|
||||
// {
|
||||
// LambdaQueryWrapper<DriverInfo> queryWrapper =new LambdaQueryWrapper<>();
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// queryWrapper.eq(DriverInfo::getUserId, user.getUserId());
|
||||
// DriverInfo driverInfo = driverInfoService.getOne(queryWrapper);
|
||||
// if (ObjectUtil.isEmpty(driverInfo)){
|
||||
// return error("信息有误");
|
||||
// }
|
||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
||||
// AjaxResult ajax = success();
|
||||
// ajax.put("user", sysUser);
|
||||
// ajax.put("driverInfo", driverInfo);
|
||||
// return ajax;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取检测工用户信息
|
||||
// *
|
||||
// * @return 用户信息
|
||||
// */
|
||||
// @GetMapping("/getJcWorkerInfo")
|
||||
// public AjaxResult getJcWorkerInfo()
|
||||
// {
|
||||
// AjaxResult ajax = success();
|
||||
// LambdaQueryWrapper<PartnerWorker> queryWrapper =new LambdaQueryWrapper<>();
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// queryWrapper.eq(PartnerWorker::getUserId,user.getUserId());
|
||||
// PartnerWorker worker = jcWorkerService.getOne(queryWrapper);
|
||||
// if (ObjectUtil.isNotEmpty(worker)){
|
||||
// LambdaQueryWrapper<ShopMallPartners> queryWrapper1 =new LambdaQueryWrapper<>();
|
||||
// queryWrapper1.eq(ShopMallPartners::getPartnerId,worker.getPartnerId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
||||
// ShopMallPartners partner = partnersService.getOne(queryWrapper1);
|
||||
// if (ObjectUtil.isEmpty(partner)){
|
||||
// return error("信息有误");
|
||||
// }
|
||||
// ajax.put("partnerInfo", partner);
|
||||
// }else {
|
||||
// return error("信息有误");
|
||||
// }
|
||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
||||
//
|
||||
// ajax.put("user", sysUser);
|
||||
//
|
||||
// return ajax;
|
||||
// }
|
||||
// /**
|
||||
// * 获取路由信息
|
||||
// *
|
||||
// * @return 路由信息
|
||||
// */
|
||||
// @GetMapping("getRouters")
|
||||
// public AjaxResult getRouters()
|
||||
// {
|
||||
// Long userId = SecurityUtils.getUserId();
|
||||
// List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||
// return AjaxResult.success(menuService.buildMenus(menus));
|
||||
// }
|
||||
// @ApiOperation("微信登录")
|
||||
//
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "WxLoginBody",dataType = "WxLoginBody", value = "jscode", required = true, paramType = "body")
|
||||
// })
|
||||
// @PostMapping("/wxLogin")
|
||||
// public AjaxResult wxLogin(@RequestBody WxLoginBody wxLoginBody) {
|
||||
// String code = wxLoginBody.getCode();
|
||||
// //秘钥
|
||||
// String encryptedIv = wxLoginBody.getEncryptedIv();
|
||||
// //加密数据
|
||||
// String encryptedData = wxLoginBody.getEncryptedData();
|
||||
//
|
||||
//
|
||||
// //想微信服务器发送请求获取用户信息
|
||||
// String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxConfig.getAppId() + "&secret=" + wxConfig.getAppSecret() + "&js_code=" + code + "&grant_type=authorization_code";
|
||||
// System.out.println(url);
|
||||
// String res = restTemplate.getForObject(url, String.class);
|
||||
// JSONObject jsonObject = JSONObject.parseObject(res);
|
||||
//
|
||||
// //获取session_key和openid
|
||||
// String sessionKey = jsonObject.getString("session_key");
|
||||
// String openId = jsonObject.getString("openid");
|
||||
//
|
||||
// System.out.println(sessionKey);
|
||||
// System.out.println(openId);
|
||||
// //解密
|
||||
// String decryptResult = "";
|
||||
// try {
|
||||
// //如果没有绑定微信开放平台,解析结果是没有unionid的。
|
||||
// decryptResult = decrypt(sessionKey, encryptedIv, encryptedData);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return AjaxResult.error("微信登录失败!");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.hasText(decryptResult)) {
|
||||
// //如果解析成功,获取token
|
||||
// String token = loginService.wxLogin(decryptResult,openId,wxLoginBody.getInviteId());
|
||||
// AjaxResult ajax = AjaxResult.success();
|
||||
// ajax.put(Constants.TOKEN, token);
|
||||
// return ajax;
|
||||
// } else {
|
||||
// return AjaxResult.error("微信登录失败!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/wxLoginJc")
|
||||
// public AjaxResult wxLoginJc(@RequestBody WxLoginBody wxLoginBody) {
|
||||
// String code = wxLoginBody.getCode();
|
||||
// //秘钥
|
||||
// String encryptedIv = wxLoginBody.getEncryptedIv();
|
||||
// //加密数据
|
||||
// String encryptedData = wxLoginBody.getEncryptedData();
|
||||
//
|
||||
// //想微信服务器发送请求获取用户信息
|
||||
// String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxConfig.getAppId() + "&secret=" + wxConfig.getAppSecret() + "&js_code=" + code + "&grant_type=authorization_code";
|
||||
// System.out.println(url);
|
||||
// String res = restTemplate.getForObject(url, String.class);
|
||||
// JSONObject jsonObject = JSONObject.parseObject(res);
|
||||
//
|
||||
// //获取session_key和openid
|
||||
// String sessionKey = jsonObject.getString("session_key");
|
||||
// String openId = jsonObject.getString("openid");
|
||||
//
|
||||
// System.out.println(sessionKey);
|
||||
// System.out.println(openId);
|
||||
// //解密
|
||||
// String decryptResult = "";
|
||||
// try {
|
||||
// //如果没有绑定微信开放平台,解析结果是没有unionid的。
|
||||
// decryptResult = decrypt(sessionKey, encryptedIv, encryptedData);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return AjaxResult.error("微信登录失败!");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.hasText(decryptResult)) {
|
||||
// //如果解析成功,获取token
|
||||
// String token = loginService.wxLoginJc(decryptResult,openId,wxLoginBody.getInviteId());
|
||||
// AjaxResult ajax = AjaxResult.success();
|
||||
// ajax.put(Constants.TOKEN, token);
|
||||
// return ajax;
|
||||
// } else {
|
||||
// return AjaxResult.error("微信登录失败!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/wxLoginRescue")
|
||||
// public AjaxResult wxLoginRescue(@RequestBody WxLoginBody wxLoginBody) {
|
||||
// String code = wxLoginBody.getCode();
|
||||
// //秘钥
|
||||
// String encryptedIv = wxLoginBody.getEncryptedIv();
|
||||
// //加密数据
|
||||
// String encryptedData = wxLoginBody.getEncryptedData();
|
||||
//
|
||||
//
|
||||
// //想微信服务器发送请求获取用户信息
|
||||
// String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxConfig.getAppId() + "&secret=" + wxConfig.getAppSecret() + "&js_code=" + code + "&grant_type=authorization_code";
|
||||
// System.out.println(url);
|
||||
// String res = restTemplate.getForObject(url, String.class);
|
||||
// JSONObject jsonObject = JSONObject.parseObject(res);
|
||||
//
|
||||
// //获取session_key和openid
|
||||
// String sessionKey = jsonObject.getString("session_key");
|
||||
// String openId = jsonObject.getString("openid");
|
||||
//
|
||||
// System.out.println(sessionKey);
|
||||
// System.out.println(openId);
|
||||
// //解密
|
||||
// String decryptResult = "";
|
||||
// try {
|
||||
// //如果没有绑定微信开放平台,解析结果是没有unionid的。
|
||||
// decryptResult = decrypt(sessionKey, encryptedIv, encryptedData);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return AjaxResult.error("微信登录失败!");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.hasText(decryptResult)) {
|
||||
// //如果解析成功,获取token
|
||||
// String token = loginService.wxLoginRescue(decryptResult,openId,wxLoginBody.getInviteId());
|
||||
// AjaxResult ajax = AjaxResult.success();
|
||||
// ajax.put(Constants.TOKEN, token);
|
||||
// return ajax;
|
||||
// } else {
|
||||
// return AjaxResult.error("微信登录失败!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * AES解密
|
||||
// */
|
||||
// private String decrypt(String sessionKey,String encryptedIv,String encryptedData) throws Exception{
|
||||
// // 转化为字节数组
|
||||
// byte[] key = Base64.decode(sessionKey);
|
||||
// byte[] iv = Base64.decode(encryptedIv);
|
||||
// byte[] encData = Base64.decode(encryptedData);
|
||||
// // 如果密钥不足16位,那么就补足
|
||||
// int base =16;
|
||||
// if (key.length % base !=0) {
|
||||
// int groups = key.length / base +(key.length % base != 0 ? 1 : 0);
|
||||
// byte[] temp = new byte[groups * base];
|
||||
// Arrays.fill(temp,(byte) 0);
|
||||
// System.arraycopy(key,0,temp,0,key.length);
|
||||
// key = temp;
|
||||
// }
|
||||
// // 如果初始向量不足16位,也补足
|
||||
// if (iv.length % base !=0) {
|
||||
// int groups = iv.length / base +(iv.length % base != 0 ? 1 : 0);
|
||||
// byte[] temp = new byte[groups * base];
|
||||
// Arrays.fill(temp,(byte) 0);
|
||||
// System.arraycopy(iv,0,temp,0,iv.length);
|
||||
// iv = temp;
|
||||
// }
|
||||
//
|
||||
// AlgorithmParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||
// String resultStr = null;
|
||||
//
|
||||
// try {
|
||||
// Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
||||
// SecretKeySpec keySpec = new SecretKeySpec(key,"AES");
|
||||
// cipher.init(Cipher.DECRYPT_MODE,keySpec,ivSpec);
|
||||
// resultStr = new String(cipher.doFinal(encData),"UTF-8");
|
||||
// } catch (Exception e){
|
||||
//// logger.info("解析错误");
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// // 解析加密后的字符串
|
||||
// return resultStr;
|
||||
// }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.rescue.controller.app;
|
||||
package cn.iocoder.yudao.module.rescue.app.controller.admin;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueCarSpend;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueCarSpendService;
|
||||
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -28,22 +30,24 @@ public class RescueCarSpendController extends BaseController {
|
||||
/**
|
||||
* 查询车辆消费管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:list')")
|
||||
@PreAuthorize("@ss.hasPermission('rescue:rescueCarSpend:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RescueCarSpend rescueCarSpend) {
|
||||
startPage();
|
||||
List<RescueCarSpend> list = rescueCarSpendService.selectRescueCarSpendList(rescueCarSpend);
|
||||
return getDataTable(list);
|
||||
public CommonResult list(RescueCarSpend rescueCarSpend,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueCarSpend> page = new Page<>(pageNo, pageSize);
|
||||
IPage<RescueCarSpend> list = rescueCarSpendService.selectRescueCarSpendList(rescueCarSpend, page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车辆消费管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:export')")
|
||||
@PreAuthorize("@ss.hasPermission('rescue:rescueCarSpend:export')")
|
||||
// @Log(title = "车辆消费管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RescueCarSpend rescueCarSpend) {
|
||||
List<RescueCarSpend> list = rescueCarSpendService.selectRescueCarSpendList(rescueCarSpend);
|
||||
List<RescueCarSpend> list = rescueCarSpendService.list();
|
||||
ExcelUtil<RescueCarSpend> util = new ExcelUtil<RescueCarSpend>(RescueCarSpend.class);
|
||||
util.exportExcel(response, list, "车辆消费管理数据");
|
||||
}
|
||||
@ -51,7 +55,7 @@ public class RescueCarSpendController extends BaseController {
|
||||
/**
|
||||
* 获取车辆消费管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:query')")
|
||||
@PreAuthorize("@ss.hasPermission('rescue:rescueCarSpend:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(rescueCarSpendService.selectRescueCarSpendById(id));
|
||||
@ -60,7 +64,7 @@ public class RescueCarSpendController extends BaseController {
|
||||
/**
|
||||
* 新增车辆消费管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:add')")
|
||||
@PreAuthorize("@ss.hasPermission('rescue:rescueCarSpend:add')")
|
||||
// @Log(title = "车辆消费管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public CommonResult add(@RequestBody RescueCarSpend rescueCarSpend) {
|
||||
@ -70,7 +74,7 @@ public class RescueCarSpendController extends BaseController {
|
||||
/**
|
||||
* 修改车辆消费管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:edit')")
|
||||
@PreAuthorize("@ss.hasPermission('rescue:rescueCarSpend:edit')")
|
||||
// @Log(title = "车辆消费管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public CommonResult edit(@RequestBody RescueCarSpend rescueCarSpend) {
|
||||
@ -80,7 +84,7 @@ public class RescueCarSpendController extends BaseController {
|
||||
/**
|
||||
* 删除车辆消费管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:remove')")
|
||||
@PreAuthorize("@ss.hasPermission('rescue:rescueCarSpend:remove')")
|
||||
// @Log(title = "车辆消费管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public CommonResult remove(@PathVariable Long[] ids) {
|
||||
|
@ -2,10 +2,11 @@ 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.RescueDeptDriver;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueDeptDriverService;
|
||||
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -30,10 +31,12 @@ public class RescueDeptDriverController extends BaseController {
|
||||
* 查询救援客户司机分配列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RescueDeptDriver rescueDeptDriver) {
|
||||
startPage();
|
||||
List<RescueDeptDriver> list = rescueDeptDriverService.selectRescueDeptDriverList(rescueDeptDriver);
|
||||
return getDataTable(list);
|
||||
public CommonResult<IPage<?>> list(RescueDeptDriver rescueDeptDriver,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueDeptDriver> page = new Page<>(pageNo, pageSize);
|
||||
IPage<RescueDeptDriver> list = rescueDeptDriverService.selectRescueDeptDriverPage(rescueDeptDriver, page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -42,7 +45,7 @@ public class RescueDeptDriverController extends BaseController {
|
||||
// @Log(title = "救援客户司机分配", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RescueDeptDriver rescueDeptDriver) {
|
||||
List<RescueDeptDriver> list = rescueDeptDriverService.selectRescueDeptDriverList(rescueDeptDriver);
|
||||
List<RescueDeptDriver> list = rescueDeptDriverService.list();
|
||||
ExcelUtil<RescueDeptDriver> util = new ExcelUtil<RescueDeptDriver>(RescueDeptDriver.class);
|
||||
util.exportExcel(response, list, "救援客户司机分配数据");
|
||||
}
|
||||
@ -76,7 +79,7 @@ public class RescueDeptDriverController extends BaseController {
|
||||
/**
|
||||
* 删除救援客户司机分配
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('dept_driver:dept_driver:remove')")
|
||||
// @PreAuthorize("@ss.hasPermission('dept_driver:dept_driver:remove')")
|
||||
// @Log(title = "救援客户司机分配", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public CommonResult remove(@PathVariable Long[] ids) {
|
||||
|
@ -0,0 +1,113 @@
|
||||
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.domain.RescueDriverPosition;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueDriverPositionService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* 救援司机位置记录Controller
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2023-09-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rescue/rescue_driver_position")
|
||||
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')")
|
||||
// @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')")
|
||||
// @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')")
|
||||
// @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')")
|
||||
// @Log(title = "救援司机位置记录", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable Long[] ids)
|
||||
// {
|
||||
// return toAjax(rescueDriverPositionService.deleteRescueDriverPositionByIds(ids));
|
||||
// }
|
||||
//
|
||||
|
||||
/**
|
||||
* 查询救援司机位置记录列表
|
||||
*/
|
||||
@GetMapping("/listByInfoId")
|
||||
public CommonResult listByInfoId(RescueDriverPosition rescueDriverPosition) {
|
||||
List<RescueDriverPosition> list = rescueDriverPositionService.listByInfoId(rescueDriverPosition);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询救援司机位置记录列表
|
||||
*/
|
||||
@GetMapping("/routeInfo")
|
||||
public CommonResult routeInfo(RescueDriverPosition rescueDriverPosition) {
|
||||
List<JSONObject> res = rescueDriverPositionService.routeInfo(rescueDriverPosition);
|
||||
return success(res);
|
||||
}
|
||||
}
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
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;
|
||||
@ -13,6 +15,7 @@ import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||
import cn.iocoder.yudao.module.rescue.dto.SysDictData;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.module.staff.entity.CompanyStaff;
|
||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueInfoDetailService;
|
||||
@ -22,6 +25,8 @@ import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||
import cn.iocoder.yudao.module.rescue.utils.StringUtils;
|
||||
import cn.iocoder.yudao.module.rescue.vo.MoneyManagement;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -29,9 +34,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -102,10 +105,12 @@ public class RescueInfoSystem extends BaseController {
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@GetMapping("/list2")
|
||||
public TableDataInfo list2(RescueInfo rescueInfo) {
|
||||
startPage();
|
||||
List<RescueInfo> list = rescueInfoService.selectRescueListSystem2(rescueInfo);
|
||||
return getDataTable(list);
|
||||
public CommonResult<IPage<?>> list2(RescueInfo rescueInfo,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueInfo> page = new Page<>(pageNo, pageSize);
|
||||
IPage<RescueInfo> list = rescueInfoService.selectRescueListSystem2(rescueInfo, page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/watchImg")
|
||||
@ -131,16 +136,32 @@ public class RescueInfoSystem extends BaseController {
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RescueInfo rescueInfo) {
|
||||
List<RescueInfo> list = rescueInfoService.selectRescueListSystem2(rescueInfo);
|
||||
for (RescueInfo info : list) {
|
||||
info.setSetMoneyYuan(Double.valueOf(Optional.ofNullable(info.getSetMoney()).orElse(0L)) / 100);
|
||||
info.setPayMoneyYuan(Double.valueOf(Optional.ofNullable(info.getPayMoney()).orElse(0L)) / 100);
|
||||
// @PreAuthorize("@ss.hasPermission('system:info:export')")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response, RescueInfo rescueInfo,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
|
||||
List<RescueInfo> list = new ArrayList<>();
|
||||
while (true){
|
||||
Page<RescueInfo> page = new Page<>(pageNo, pageSize);
|
||||
IPage<RescueInfo> rescueInfoIPage = rescueInfoService.selectRescueListSystem2(rescueInfo, page);
|
||||
if (ObjectUtil.isNotEmpty(rescueInfoIPage) && !rescueInfoIPage.getRecords().isEmpty()){
|
||||
rescueInfoIPage.getRecords().forEach(item -> {
|
||||
item.setSetMoneyYuan(Double.valueOf(Optional.ofNullable(item.getSetMoney()).orElse(0L)) / 100);
|
||||
item.setPayMoneyYuan(Double.valueOf(Optional.ofNullable(item.getPayMoney()).orElse(0L)) / 100);
|
||||
});
|
||||
list.addAll(rescueInfoIPage.getRecords());
|
||||
pageNo++;
|
||||
}else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
ExcelUtil<RescueInfo> util = new ExcelUtil<RescueInfo>(RescueInfo.class);
|
||||
util.exportExcel(response, list, "救援订单数据");
|
||||
// 导出 Excel
|
||||
Map<Integer, Integer> columnWidthMap = new HashMap<>();
|
||||
// 第一列的索引是0,宽度设置为20个字符宽
|
||||
columnWidthMap.put(9, 20);
|
||||
columnWidthMap.put(10, 20);
|
||||
ExcelUtils.write(response, "救援订单.xls", "数据", RescueInfo.class, list, columnWidthMap);
|
||||
}
|
||||
|
||||
//指派司机
|
||||
@ -154,10 +175,12 @@ public class RescueInfoSystem extends BaseController {
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@GetMapping("/driverList")
|
||||
public TableDataInfo driverList(DriverInfoDto driverInfoDto) {
|
||||
startPage();
|
||||
List<DriverInfo> list = rescueInfoService.driverList(driverInfoDto);
|
||||
return getDataTable(list);
|
||||
public CommonResult<IPage<?>> driverList(DriverInfoDto driverInfoDto,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<DriverInfo> page = new Page<>(pageNo, pageSize);
|
||||
IPage<DriverInfo> list = rescueInfoService.driverList(driverInfoDto, page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/getDriverById")
|
||||
|
@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueRefuelRecordService;
|
||||
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -21,8 +23,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rescue/refuelRecord")
|
||||
public class RescueRefuelRecordController extends BaseController
|
||||
{
|
||||
public class RescueRefuelRecordController extends BaseController {
|
||||
@Autowired
|
||||
private IRescueRefuelRecordService rescueRefuelRecordService;
|
||||
|
||||
@ -31,33 +32,31 @@ public class RescueRefuelRecordController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RescueRefuelRecord rescueRefuelRecord)
|
||||
{
|
||||
startPage();
|
||||
List<RescueRefuelRecord> list = rescueRefuelRecordService.selectRescueRefuelRecordList(rescueRefuelRecord);
|
||||
return getDataTable(list);
|
||||
public CommonResult list(RescueRefuelRecord rescueRefuelRecord,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueRefuelRecord> page = new Page<>(pageNo, pageSize);
|
||||
return success(rescueRefuelRecordService.selectRescueRefuelRecordList(rescueRefuelRecord, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出加油记录列表
|
||||
*/
|
||||
@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.selectRescueRefuelRecordList(rescueRefuelRecord);
|
||||
// ExcelUtil<RescueRefuelRecord> util = new ExcelUtil<RescueRefuelRecord>(RescueRefuelRecord.class);
|
||||
// util.exportExcel(response, list, "加油记录数据");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取加油记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public CommonResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(rescueRefuelRecordService.selectRescueRefuelRecordById(id));
|
||||
}
|
||||
|
||||
@ -67,8 +66,7 @@ public class RescueRefuelRecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:add')")
|
||||
// @Log(title = "加油记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public CommonResult add(@RequestBody RescueRefuelRecord rescueRefuelRecord)
|
||||
{
|
||||
public CommonResult add(@RequestBody RescueRefuelRecord rescueRefuelRecord) {
|
||||
return toAjax(rescueRefuelRecordService.insertRescueRefuelRecord(rescueRefuelRecord));
|
||||
}
|
||||
|
||||
@ -78,8 +76,7 @@ public class RescueRefuelRecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:edit')")
|
||||
// @Log(title = "加油记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public CommonResult edit(@RequestBody RescueRefuelRecord rescueRefuelRecord)
|
||||
{
|
||||
public CommonResult edit(@RequestBody RescueRefuelRecord rescueRefuelRecord) {
|
||||
return toAjax(rescueRefuelRecordService.updateRescueRefuelRecord(rescueRefuelRecord));
|
||||
}
|
||||
|
||||
@ -89,8 +86,7 @@ public class RescueRefuelRecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:remove')")
|
||||
// @Log(title = "加油记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public CommonResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public CommonResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(rescueRefuelRecordService.deleteRescueRefuelRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ public class DriverInfo extends TenantBaseDO
|
||||
/** 用户账号 */
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
private Integer age;
|
||||
|
||||
/** 用户昵称 */
|
||||
@TableField(exist = false)
|
||||
|
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.rescue.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class LoginBody
|
||||
{
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
*/
|
||||
private String uuid;
|
||||
//0账号密码登录,1手机号登录 2:管理 3:教练
|
||||
private String type;
|
||||
private String types;
|
||||
private String phone;
|
||||
private String realName;
|
||||
}
|
@ -109,6 +109,7 @@ public class RescueCarInfo extends TenantBaseDO {
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Long deptId;
|
||||
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ public class RescueCustomerInfo extends TenantBaseDO
|
||||
private String defaultRescueType;
|
||||
|
||||
/** 部门主键 */
|
||||
@TableField
|
||||
private Long deptId;
|
||||
@TableField(exist = false)
|
||||
private String deptName;
|
||||
|
@ -3,7 +3,11 @@ package cn.iocoder.yudao.module.rescue.mapper;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueCarSpend;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -14,7 +18,7 @@ import java.util.List;
|
||||
* @date 2023-11-30
|
||||
*/
|
||||
@Mapper
|
||||
public interface RescueCarSpendMapper
|
||||
public interface RescueCarSpendMapper extends BaseMapper<RescueCarSpend>
|
||||
{
|
||||
/**
|
||||
* 查询车辆消费管理
|
||||
@ -30,7 +34,7 @@ public interface RescueCarSpendMapper
|
||||
* @param rescueCarSpend 车辆消费管理
|
||||
* @return 车辆消费管理集合
|
||||
*/
|
||||
public List<RescueCarSpend> selectRescueCarSpendList(RescueCarSpend rescueCarSpend);
|
||||
IPage<RescueCarSpend> selectRescueCarSpendList(@Param("map") RescueCarSpend rescueCarSpend, Page<RescueCarSpend> page);
|
||||
|
||||
/**
|
||||
* 新增车辆消费管理
|
||||
|
@ -2,7 +2,10 @@ package cn.iocoder.yudao.module.rescue.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueDeptDriver;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
@ -30,7 +33,16 @@ public interface RescueDeptDriverMapper extends BaseMapper<RescueDeptDriver>
|
||||
* @param rescueDeptDriver 救援客户司机分配
|
||||
* @return 救援客户司机分配集合
|
||||
*/
|
||||
public List<RescueDeptDriver> selectRescueDeptDriverList(RescueDeptDriver rescueDeptDriver);
|
||||
List<RescueDeptDriver> selectRescueDeptDriverList(@Param("map") RescueDeptDriver rescueDeptDriver);
|
||||
|
||||
/**
|
||||
* 分页查
|
||||
* @author 小李
|
||||
* @date 9:02 2024/8/20
|
||||
* @param rescueDeptDriver
|
||||
* @param page
|
||||
**/
|
||||
IPage<RescueDeptDriver> selectRescueDeptDriverList(@Param("map") RescueDeptDriver rescueDeptDriver, Page<RescueDeptDriver> page);
|
||||
|
||||
/**
|
||||
* 删除救援客户司机分配
|
||||
|
@ -8,6 +8,8 @@ import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -30,9 +32,9 @@ public interface RescueInfoMapper extends BaseMapper<RescueInfo>
|
||||
* @param rescueInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<RescueInfo> selectRescueInfoList(RescueInfo rescueInfo);
|
||||
public List<RescueInfo> selectRescueListSystem2(RescueInfo rescueInfo);
|
||||
IPage<RescueInfo> selectRescueInfoList(@Param("map") RescueInfo rescueInfo, Page<RescueInfo> page);
|
||||
|
||||
IPage<RescueInfo> selectRescueListSystem2(@Param("map") RescueInfo rescueInfo, Page<RescueInfo> page);
|
||||
|
||||
JSONObject listData(RescueInfo rescueInfo);
|
||||
/**
|
||||
@ -41,12 +43,12 @@ public interface RescueInfoMapper extends BaseMapper<RescueInfo>
|
||||
* @param rescueInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<RescueInfo> selectRescueInfoListApp(RescueInfo rescueInfo);
|
||||
IPage<RescueInfo> selectRescueInfoListApp(@Param("map") RescueInfo rescueInfo, Page<RescueInfo> page);
|
||||
List<RescueInfo> getKcList(RescueInfo rescueInfo);
|
||||
|
||||
|
||||
|
||||
List<DriverInfo> driverList(DriverInfoDto user);
|
||||
IPage<DriverInfo> driverList(@Param("map") DriverInfoDto user, Page<DriverInfo> page);
|
||||
List<DriverInfo2Dto> driverListApp(DriverInfoDto user);
|
||||
Map<String,Integer> driverInMap2();
|
||||
void dealOverTimeRescue();
|
||||
|
@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -32,7 +34,7 @@ public interface RescueRefuelRecordMapper extends BaseMapper<RescueRefuelRecord>
|
||||
* @param rescueRefuelRecord 加油记录
|
||||
* @return 加油记录集合
|
||||
*/
|
||||
public List<RescueRefuelRecord> selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord);
|
||||
IPage<RescueRefuelRecord> selectRescueRefuelRecordList(@Param("map") RescueRefuelRecord rescueRefuelRecord, Page<RescueRefuelRecord> page);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,22 +1,23 @@
|
||||
package cn.iocoder.yudao.module.rescue.service;
|
||||
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueCarSpend;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆消费管理Service接口
|
||||
*
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2023-11-30
|
||||
*/
|
||||
public interface IRescueCarSpendService
|
||||
{
|
||||
public interface IRescueCarSpendService extends IService<RescueCarSpend> {
|
||||
/**
|
||||
* 查询车辆消费管理
|
||||
*
|
||||
*
|
||||
* @param id 车辆消费管理主键
|
||||
* @return 车辆消费管理
|
||||
*/
|
||||
@ -24,15 +25,15 @@ public interface IRescueCarSpendService
|
||||
|
||||
/**
|
||||
* 查询车辆消费管理列表
|
||||
*
|
||||
*
|
||||
* @param rescueCarSpend 车辆消费管理
|
||||
* @return 车辆消费管理集合
|
||||
*/
|
||||
public List<RescueCarSpend> selectRescueCarSpendList(RescueCarSpend rescueCarSpend);
|
||||
IPage<RescueCarSpend> selectRescueCarSpendList(RescueCarSpend rescueCarSpend, Page<RescueCarSpend> page);
|
||||
|
||||
/**
|
||||
* 新增车辆消费管理
|
||||
*
|
||||
*
|
||||
* @param rescueCarSpend 车辆消费管理
|
||||
* @return 结果
|
||||
*/
|
||||
@ -40,7 +41,7 @@ public interface IRescueCarSpendService
|
||||
|
||||
/**
|
||||
* 修改车辆消费管理
|
||||
*
|
||||
*
|
||||
* @param rescueCarSpend 车辆消费管理
|
||||
* @return 结果
|
||||
*/
|
||||
@ -48,7 +49,7 @@ public interface IRescueCarSpendService
|
||||
|
||||
/**
|
||||
* 批量删除车辆消费管理
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的车辆消费管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@ -56,7 +57,7 @@ public interface IRescueCarSpendService
|
||||
|
||||
/**
|
||||
* 删除车辆消费管理信息
|
||||
*
|
||||
*
|
||||
* @param id 车辆消费管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -1,6 +1,8 @@
|
||||
package cn.iocoder.yudao.module.rescue.service;
|
||||
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueDeptDriver;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
||||
@ -28,7 +30,15 @@ public interface IRescueDeptDriverService extends IService<RescueDeptDriver>
|
||||
* @param rescueDeptDriver 救援客户司机分配
|
||||
* @return 救援客户司机分配集合
|
||||
*/
|
||||
public List<RescueDeptDriver> selectRescueDeptDriverList(RescueDeptDriver rescueDeptDriver);
|
||||
List<RescueDeptDriver> selectRescueDeptDriverList(RescueDeptDriver rescueDeptDriver);
|
||||
|
||||
/**
|
||||
* 分页查
|
||||
* @author 小李
|
||||
* @date 8:59 2024/8/20
|
||||
* @param rescueDeptDriver
|
||||
**/
|
||||
IPage<RescueDeptDriver> selectRescueDeptDriverPage(RescueDeptDriver rescueDeptDriver, Page<RescueDeptDriver> page);
|
||||
|
||||
/**
|
||||
* 新增救援客户司机分配
|
||||
|
@ -8,6 +8,8 @@ import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||
import cn.iocoder.yudao.module.rescue.vo.MoneyManagement;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
||||
@ -36,16 +38,16 @@ public interface IRescueInfoService extends IService<RescueInfo>
|
||||
* @param rescueInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<RescueInfo> selectRescueInfoList(RescueInfo rescueInfo);
|
||||
IPage<RescueInfo> selectRescueInfoList(RescueInfo rescueInfo, Page<RescueInfo> page);
|
||||
List<RescueInfo> getKcList(RescueInfo rescueInfo);
|
||||
List<RescueInfo> getHcList(RescueInfo rescueInfo);
|
||||
|
||||
void openKc(Long rescueId) throws Exception;
|
||||
|
||||
public List<RescueInfo> selectRescueInfoListByAdmin(RescueInfo rescueInfo);
|
||||
IPage<RescueInfo> selectRescueInfoListByAdmin(RescueInfo rescueInfo, Page<RescueInfo> page);
|
||||
JSONObject rescueInfoDetail(Long rescueId);
|
||||
List<RescueInfo> selectRescueListSystem(RescueInfo rescueInfo);
|
||||
List<RescueInfo> selectRescueListSystem2(RescueInfo rescueInfo);
|
||||
IPage<RescueInfo> selectRescueListSystem2(RescueInfo rescueInfo, Page<RescueInfo> page);
|
||||
JSONObject listData(RescueInfo rescueInfo);
|
||||
|
||||
void designateDriver(Long rescueId,Long driverId) throws Exception;
|
||||
@ -81,7 +83,7 @@ public interface IRescueInfoService extends IService<RescueInfo>
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteRescueInfoById(Long id);
|
||||
List<DriverInfo> driverList(DriverInfoDto user);
|
||||
IPage<DriverInfo> driverList(DriverInfoDto user, Page<DriverInfo> page);
|
||||
DriverInfo getDriverById(Long driverId);
|
||||
void addDriver(DriverInfo driverInfo) throws Exception;
|
||||
void updateDriver(DriverInfo user);
|
||||
|
@ -4,6 +4,8 @@ package cn.iocoder.yudao.module.rescue.service;
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@ -30,7 +32,7 @@ public interface IRescueRefuelRecordService extends IService<RescueRefuelRecord
|
||||
* @param rescueRefuelRecord 加油记录
|
||||
* @return 加油记录集合
|
||||
*/
|
||||
public List<RescueRefuelRecord> selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord);
|
||||
IPage<RescueRefuelRecord> selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord, Page<RescueRefuelRecord> page);
|
||||
|
||||
/**
|
||||
* 新增加油记录
|
||||
|
@ -5,6 +5,9 @@ import cn.iocoder.yudao.module.rescue.domain.RescueCarSpend;
|
||||
import cn.iocoder.yudao.module.rescue.mapper.RescueCarSpendMapper;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueCarInfoService;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueCarSpendService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -18,8 +21,7 @@ import java.util.List;
|
||||
* @date 2023-11-30
|
||||
*/
|
||||
@Service
|
||||
public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
{
|
||||
public class RescueCarSpendServiceImpl extends ServiceImpl<RescueCarSpendMapper, RescueCarSpend> implements IRescueCarSpendService {
|
||||
@Autowired
|
||||
private RescueCarSpendMapper rescueCarSpendMapper;
|
||||
@Autowired
|
||||
@ -32,8 +34,7 @@ public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
* @return 车辆消费管理
|
||||
*/
|
||||
@Override
|
||||
public RescueCarSpend selectRescueCarSpendById(Long id)
|
||||
{
|
||||
public RescueCarSpend selectRescueCarSpendById(Long id) {
|
||||
return rescueCarSpendMapper.selectRescueCarSpendById(id);
|
||||
}
|
||||
|
||||
@ -44,9 +45,8 @@ public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
* @return 车辆消费管理
|
||||
*/
|
||||
@Override
|
||||
public List<RescueCarSpend> selectRescueCarSpendList(RescueCarSpend rescueCarSpend)
|
||||
{
|
||||
return rescueCarSpendMapper.selectRescueCarSpendList(rescueCarSpend);
|
||||
public IPage<RescueCarSpend> selectRescueCarSpendList(RescueCarSpend rescueCarSpend, Page<RescueCarSpend> page) {
|
||||
return rescueCarSpendMapper.selectRescueCarSpendList(rescueCarSpend, page);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,8 +56,7 @@ public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRescueCarSpend(@Valid RescueCarSpend rescueCarSpend)
|
||||
{
|
||||
public int insertRescueCarSpend(@Valid RescueCarSpend rescueCarSpend) {
|
||||
RescueCarInfo rescueCarInfo = carInfoService.selectRescueCarInfoById(rescueCarSpend.getRescueCarId());
|
||||
rescueCarSpend.setCarNum(rescueCarInfo.getRescueCarNum());
|
||||
return rescueCarSpendMapper.insertRescueCarSpend(rescueCarSpend);
|
||||
@ -70,8 +69,7 @@ public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRescueCarSpend(@Valid RescueCarSpend rescueCarSpend)
|
||||
{
|
||||
public int updateRescueCarSpend(@Valid RescueCarSpend rescueCarSpend) {
|
||||
RescueCarInfo rescueCarInfo = carInfoService.selectRescueCarInfoById(rescueCarSpend.getRescueCarId());
|
||||
rescueCarSpend.setCarNum(rescueCarInfo.getRescueCarNum());
|
||||
return rescueCarSpendMapper.updateRescueCarSpend(rescueCarSpend);
|
||||
@ -84,8 +82,7 @@ public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRescueCarSpendByIds(Long[] ids)
|
||||
{
|
||||
public int deleteRescueCarSpendByIds(Long[] ids) {
|
||||
return rescueCarSpendMapper.deleteRescueCarSpendByIds(ids);
|
||||
}
|
||||
|
||||
@ -96,8 +93,7 @@ public class RescueCarSpendServiceImpl implements IRescueCarSpendService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRescueCarSpendById(Long id)
|
||||
{
|
||||
public int deleteRescueCarSpendById(Long id) {
|
||||
return rescueCarSpendMapper.deleteRescueCarSpendById(id);
|
||||
}
|
||||
}
|
||||
|
@ -80,8 +80,7 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
||||
*/
|
||||
@Override
|
||||
public int deleteRescueCustomerInfoByIds(Long[] ids) {
|
||||
List<Long> longs = Arrays.asList(ids);
|
||||
return baseMapper.deleteByIds(longs);
|
||||
return baseMapper.deleteByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,12 +9,17 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import cn.iocoder.yudao.module.rescue.service.IDriverInfoService;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueDeptDriverService;
|
||||
import cn.iocoder.yudao.module.rescue.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.iocoder.yudao.module.rescue.mapper.RescueDeptDriverMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* 救援客户司机分配Service业务层处理
|
||||
@ -23,8 +28,7 @@ import java.util.List;
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@Service
|
||||
public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMapper, RescueDeptDriver> implements IRescueDeptDriverService
|
||||
{
|
||||
public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMapper, RescueDeptDriver> implements IRescueDeptDriverService {
|
||||
@Autowired
|
||||
private DeptApi deptService;
|
||||
@Autowired
|
||||
@ -41,8 +45,7 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @return 救援客户司机分配
|
||||
*/
|
||||
@Override
|
||||
public RescueDeptDriver selectRescueDeptDriverById(Long id)
|
||||
{
|
||||
public RescueDeptDriver selectRescueDeptDriverById(Long id) {
|
||||
return baseMapper.selectRescueDeptDriverById(id);
|
||||
}
|
||||
|
||||
@ -53,46 +56,45 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @return 救援客户司机分配
|
||||
*/
|
||||
@Override
|
||||
public List<RescueDeptDriver> selectRescueDeptDriverList(RescueDeptDriver rescueDeptDriver)
|
||||
{
|
||||
public List<RescueDeptDriver> selectRescueDeptDriverList(RescueDeptDriver rescueDeptDriver) {
|
||||
List<RescueDeptDriver> rescueDeptDrivers = baseMapper.selectRescueDeptDriverList(rescueDeptDriver);
|
||||
for (RescueDeptDriver deptDriver : rescueDeptDrivers) {
|
||||
DeptRespDTO dept = deptService.getDept(deptDriver.getDeptId());
|
||||
deptDriver.setDeptName(dept.getName());
|
||||
String firstDriverIds = deptDriver.getFirstDriverIds();
|
||||
if (StringUtils.isNotEmpty(firstDriverIds)){
|
||||
if (StringUtils.isNotEmpty(firstDriverIds)) {
|
||||
String[] driverIds = firstDriverIds.split(",");
|
||||
String firstDriverName ="";
|
||||
String firstDriverName = "";
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
firstDriverName=firstDriverName+sysUser.getNickname()+"|";
|
||||
firstDriverName = firstDriverName + sysUser.getNickname() + "|";
|
||||
}
|
||||
deptDriver.setFirstDriverName(firstDriverName);
|
||||
|
||||
|
||||
}
|
||||
String secondDriverIds = deptDriver.getSecondDriverIds();
|
||||
if (StringUtils.isNotEmpty(secondDriverIds)){
|
||||
if (StringUtils.isNotEmpty(secondDriverIds)) {
|
||||
String[] driverIds = secondDriverIds.split(",");
|
||||
String name ="";
|
||||
String name = "";
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
name=name+sysUser.getNickname()+"|";
|
||||
name = name + sysUser.getNickname() + "|";
|
||||
}
|
||||
deptDriver.setSecondDriverName(name);
|
||||
|
||||
|
||||
}
|
||||
String thirdDriverIds = deptDriver.getThirdDriverIds();
|
||||
if (StringUtils.isNotEmpty(thirdDriverIds)){
|
||||
if (StringUtils.isNotEmpty(thirdDriverIds)) {
|
||||
String[] driverIds = thirdDriverIds.split(",");
|
||||
String name ="";
|
||||
String name = "";
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
name=name+sysUser.getNickname()+"|";
|
||||
name = name + sysUser.getNickname() + "|";
|
||||
}
|
||||
deptDriver.setThirdDriverIds(name);
|
||||
|
||||
@ -102,6 +104,55 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
return rescueDeptDrivers;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查
|
||||
* @author 小李
|
||||
* @date 8:59 2024/8/20
|
||||
* @param rescueDeptDriver
|
||||
**/
|
||||
@Override
|
||||
public IPage<RescueDeptDriver> selectRescueDeptDriverPage(RescueDeptDriver rescueDeptDriver, Page<RescueDeptDriver> page){
|
||||
IPage<RescueDeptDriver> driverIPage = baseMapper.selectRescueDeptDriverList(rescueDeptDriver, page);
|
||||
for (RescueDeptDriver deptDriver : driverIPage.getRecords()) {
|
||||
DeptRespDTO dept = deptService.getDept(deptDriver.getDeptId());
|
||||
deptDriver.setDeptName(dept.getName());
|
||||
String firstDriverIds = deptDriver.getFirstDriverIds();
|
||||
if (StringUtils.isNotEmpty(firstDriverIds)) {
|
||||
StringJoiner tempStr = new StringJoiner("|");
|
||||
String[] driverIds = firstDriverIds.split(",");
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
tempStr.add(sysUser.getNickname());
|
||||
}
|
||||
deptDriver.setFirstDriverName(tempStr.toString());
|
||||
}
|
||||
String secondDriverIds = deptDriver.getSecondDriverIds();
|
||||
if (StringUtils.isNotEmpty(secondDriverIds)) {
|
||||
String[] driverIds = secondDriverIds.split(",");
|
||||
StringJoiner tempStr = new StringJoiner("|");
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
tempStr.add(sysUser.getNickname());
|
||||
}
|
||||
deptDriver.setSecondDriverName(tempStr.toString());
|
||||
}
|
||||
String thirdDriverIds = deptDriver.getThirdDriverIds();
|
||||
if (StringUtils.isNotEmpty(thirdDriverIds)) {
|
||||
String[] driverIds = thirdDriverIds.split(",");
|
||||
StringJoiner tempStr = new StringJoiner("|");
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
tempStr.add(sysUser.getNickname());
|
||||
}
|
||||
deptDriver.setThirdDriverName(tempStr.toString());
|
||||
}
|
||||
}
|
||||
return driverIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增救援客户司机分配
|
||||
*
|
||||
@ -109,8 +160,7 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRescueDeptDriver(RescueDeptDriver rescueDeptDriver)
|
||||
{
|
||||
public int insertRescueDeptDriver(RescueDeptDriver rescueDeptDriver) {
|
||||
return baseMapper.insert(rescueDeptDriver);
|
||||
}
|
||||
|
||||
@ -121,8 +171,7 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRescueDeptDriver(RescueDeptDriver rescueDeptDriver)
|
||||
{
|
||||
public int updateRescueDeptDriver(RescueDeptDriver rescueDeptDriver) {
|
||||
return baseMapper.updateById(rescueDeptDriver);
|
||||
}
|
||||
|
||||
@ -133,9 +182,8 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRescueDeptDriverByIds(Long[] ids)
|
||||
{
|
||||
return baseMapper.deleteRescueDeptDriverByIds(ids);
|
||||
public int deleteRescueDeptDriverByIds(Long[] ids) {
|
||||
return baseMapper.deleteByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -145,8 +193,7 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRescueDeptDriverById(Long id)
|
||||
{
|
||||
public int deleteRescueDeptDriverById(Long id) {
|
||||
return baseMapper.deleteRescueDeptDriverById(id);
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueRefuelRecordService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.iocoder.yudao.module.rescue.mapper.RescueRefuelRecordMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -39,9 +41,9 @@ public class RescueRefuelRecordServiceImpl extends ServiceImpl<RescueRefuelRecor
|
||||
* @return 加油记录
|
||||
*/
|
||||
@Override
|
||||
public List<RescueRefuelRecord> selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord)
|
||||
public IPage<RescueRefuelRecord> selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord, Page<RescueRefuelRecord> page)
|
||||
{
|
||||
return baseMapper.selectRescueRefuelRecordList(rescueRefuelRecord);
|
||||
return baseMapper.selectRescueRefuelRecordList(rescueRefuelRecord, page);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
<sql id="selectDriverInfoVo">
|
||||
select id, user_id, phonenumber, license_image, id_card_right, id_card_back, auth_status, reject_info, driver_status, driver_longitude, driver_latitude, driver_position_info, driver_offline_time, create_time, creator, update_time, updater from driver_info
|
||||
select id, user_id, phonenumber, license_image, id_card_right, id_card_back, auth_status, reject_info, driver_status, driver_longitude, driver_latitude, driver_position_info, driver_offline_time from driver_info
|
||||
</sql>
|
||||
|
||||
<select id="selectDriverInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.DriverInfo" resultType="cn.iocoder.yudao.module.rescue.domain.DriverInfo">
|
||||
@ -49,10 +49,6 @@
|
||||
<if test="driverLatitude != null">driver_latitude,</if>
|
||||
<if test="driverPositionInfo != null">driver_position_info,</if>
|
||||
<if test="driverOfflineTime != null">driver_offline_time,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">creator,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">updater,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@ -68,10 +64,6 @@
|
||||
<if test="driverLatitude != null">#{driverLatitude},</if>
|
||||
<if test="driverPositionInfo != null">#{driverPositionInfo},</if>
|
||||
<if test="driverOfflineTime != null">#{driverOfflineTime},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -90,10 +82,7 @@
|
||||
<if test="driverLatitude != null">driver_latitude = #{driverLatitude},</if>
|
||||
<if test="driverPositionInfo != null">driver_position_info = #{driverPositionInfo},</if>
|
||||
<if test="driverOfflineTime != null">driver_offline_time = #{driverOfflineTime},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">creator = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">updater = #{updateBy},</if>
|
||||
<if test="age != null">age = #{age},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -20,11 +20,6 @@
|
||||
<result property="carInsuranceTime" column="car_insurance_time"/>
|
||||
<result property="carCheckTime" column="car_check_time"/>
|
||||
<result property="possessorId" column="possessor_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="creator" column="creator"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updater" column="updater"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRescueCarInfoVo">
|
||||
@ -98,7 +93,6 @@
|
||||
<if test="carInsuranceTime != null">car_insurance_time,</if>
|
||||
<if test="carCheckTime != null">car_check_time,</if>
|
||||
<if test="possessorId != null">possessor_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rescueCarType != null">#{rescueCarType},</if>
|
||||
@ -115,7 +109,6 @@
|
||||
<if test="carInsuranceTime != null">#{carInsuranceTime},</if>
|
||||
<if test="carCheckTime != null">#{carCheckTime},</if>
|
||||
<if test="possessorId != null">#{possessorId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -136,7 +129,6 @@
|
||||
<if test="carInsuranceTime != null">car_insurance_time = #{carInsuranceTime},</if>
|
||||
<if test="carCheckTime != null">car_check_time = #{carCheckTime},</if>
|
||||
<if test="possessorId != null">possessor_id = #{possessorId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -165,14 +157,10 @@
|
||||
SELECT *
|
||||
FROM `rescue_car_info`
|
||||
where car_insurance_time <![CDATA[<]]> #{warnTime}
|
||||
and dept_id = #{deptId}
|
||||
|
||||
</select>
|
||||
<select id="warnListNj" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
||||
SELECT *
|
||||
FROM `rescue_car_info`
|
||||
where car_check_time <![CDATA[<]]> #{warnTime}
|
||||
and dept_id = #{deptId}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -10,17 +10,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectRescueCarSpendList" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarSpend">
|
||||
<include refid="selectRescueCarSpendVo"/>
|
||||
<where>
|
||||
<if test="rescueCarId != null "> and rescue_car_id = #{rescueCarId}</if>
|
||||
<if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
|
||||
<if test="maintenanceStart != null and maintenanceEnd != null"> and maintenance_time between concat(#{maintenanceStart},' 00:00:00') and concat(#{maintenanceEnd},' 23:59:59') </if>
|
||||
<if test="maintenanceContent != null and maintenanceContent != ''"> and maintenance_content = #{maintenanceContent}</if>
|
||||
<if test="maintenanceMoney != null "> and maintenance_money = #{maintenanceMoney}</if>
|
||||
<if test="insuranceContent != null and insuranceContent != ''"> and insurance_content = #{insuranceContent}</if>
|
||||
<if test="insuranceBuyStart != null and insuranceBuyEnd !=null "> and insurance_buy_time between concat(#{insuranceBuyStart},' 00:00:00') and concat(#{insuranceBuyEnd},' 23:59:59')</if>
|
||||
<if test="insuranceMoney != null "> and insurance_money = #{insuranceMoney}</if>
|
||||
<if test="annualAuditTime != null "> and annual_audit_time between concat(#{annualAuditStart},' 00:00:00') and concat(#{annualAuditEnd},' 23:59:59')</if>
|
||||
<if test="annualAuditMoney != null "> and annual_audit_money = #{annualAuditMoney}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="map.rescueCarId != null "> and rescue_car_id = #{map.rescueCarId}</if>
|
||||
<if test="map.carNum != null and map.carNum != ''"> and car_num = #{map.carNum}</if>
|
||||
<if test="map.maintenanceStart != null and map.maintenanceEnd != null"> and maintenance_time between concat(#{map.maintenanceStart},' 00:00:00') and concat(#{map.maintenanceEnd},' 23:59:59') </if>
|
||||
<if test="map.maintenanceContent != null and map.maintenanceContent != ''"> and maintenance_content = #{map.maintenanceContent}</if>
|
||||
<if test="map.maintenanceMoney != null "> and maintenance_money = #{map.maintenanceMoney}</if>
|
||||
<if test="map.insuranceContent != null and map.insuranceContent != ''"> and insurance_content = #{map.insuranceContent}</if>
|
||||
<if test="map.insuranceBuyStart != null and map.insuranceBuyEnd !=null "> and insurance_buy_time between concat(#{map.insuranceBuyStart},' 00:00:00') and concat(#{map.insuranceBuyEnd},' 23:59:59')</if>
|
||||
<if test="map.insuranceMoney != null "> and insurance_money = #{map.insuranceMoney}</if>
|
||||
<if test="map.annualAuditTime != null "> and annual_audit_time between concat(#{map.annualAuditStart},' 00:00:00') and concat(#{map.annualAuditEnd},' 23:59:59')</if>
|
||||
<if test="map.annualAuditMoney != null "> and annual_audit_money = #{map.annualAuditMoney}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
@ -10,12 +10,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectRescueDeptDriverList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueDeptDriver" resultType="cn.iocoder.yudao.module.rescue.domain.RescueDeptDriver">
|
||||
select * from rescue_dept_driver
|
||||
<where>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="firstDriverIds != null and firstDriverIds != ''"> and first_driver_ids = #{firstDriverIds}</if>
|
||||
<if test="secondDriverIds != null and secondDriverIds != ''"> and second_driver_ids = #{secondDriverIds}</if>
|
||||
<if test="thirdDriverIds != null and thirdDriverIds != ''"> and third_driver_ids = #{thirdDriverIds}</if>
|
||||
select * from rescue_dept_driver where deleted = '0'
|
||||
<where>
|
||||
<if test="map.deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="map.firstDriverIds != null and map.firstDriverIds != ''"> and first_driver_ids = #{map.firstDriverIds}</if>
|
||||
<if test="map.secondDriverIds != null and map.secondDriverIds != ''"> and second_driver_ids = #{map.secondDriverIds}</if>
|
||||
<if test="map.thirdDriverIds != null and map.thirdDriverIds != ''"> and third_driver_ids = #{map.thirdDriverIds}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -1,105 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.rescue.mapper.RescueInfoMapper">
|
||||
|
||||
<select id="selectRescueInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
<select id="selectRescueInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo"
|
||||
resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
SELECT
|
||||
ri.*,roi.order_status,roi.set_money
|
||||
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
|
||||
<if test="rescueStatus != null ">
|
||||
1=1
|
||||
<if test="map.rescueStatus != null ">
|
||||
<choose>
|
||||
<when test="rescueStatus == '1'.toString()">
|
||||
<when test="map.rescueStatus == '1'.toString()">
|
||||
<!-- 救援中 -->
|
||||
and (ri.rescue_status = '1' or ri.rescue_status = '2' or ri.rescue_status = '3')
|
||||
</when>
|
||||
<when test="rescueStatus == '2'.toString()">
|
||||
<when test="map.rescueStatus == '2'.toString()">
|
||||
<!--待支付 -->
|
||||
and roi.order_status ='1'
|
||||
</when>
|
||||
<when test="rescueStatus == '3'.toString()">
|
||||
<when test="map.rescueStatus == '3'.toString()">
|
||||
<!-- 待取车 -->
|
||||
and ri.rescue_status ='6'
|
||||
</when>
|
||||
<when test="rescueStatus == '4'.toString()">
|
||||
<when test="map.rescueStatus == '4'.toString()">
|
||||
<!-- 评价 -->
|
||||
and roi.order_status ='2'
|
||||
</when>
|
||||
<when test="rescueStatus == '5'.toString()">
|
||||
<when test="map.rescueStatus == '5'.toString()">
|
||||
<!-- 评价 -->
|
||||
and roi.order_status ='3'
|
||||
</when>
|
||||
<when test="rescueStatus == '8'.toString()">
|
||||
<when test="map.rescueStatus == '8'.toString()">
|
||||
<!-- 已还车 -->
|
||||
and ri.rescue_status ='8'
|
||||
</when>
|
||||
<when test="rescueStatus == '9'.toString()">
|
||||
<when test="map.rescueStatus == '9'.toString()">
|
||||
<!-- 扣车中未解扣 -->
|
||||
and (ri.rescue_type ='5' and ri.rescue_status <![CDATA[<]]> '6')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{licenseNum},'%')
|
||||
<if test="map.licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{map.licenseNum},'%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by ri.create_time desc
|
||||
</select>
|
||||
<select id="selectRescueListSystem2" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
|
||||
<select id="selectRescueListSystem2" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
SELECT
|
||||
ri.*,roi.order_status,roi.set_money,roi.id as rescueOrderId,roi.pay_money,roi.pay_time
|
||||
FROM
|
||||
rescue_info ri
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
<where>
|
||||
<if test="orderStatus != null and orderStatus != ''">
|
||||
and roi.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="rescueStatus != null and rescueStatus != ''">
|
||||
and ri.rescue_status = #{rescueStatus}
|
||||
</if>
|
||||
<if test="licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{licenseNum},'%')
|
||||
</if>
|
||||
<if test="connectionName != null ">
|
||||
and ri.connection_name like concat('%',#{connectionName},'%')
|
||||
</if>
|
||||
<if test="driverName != null ">
|
||||
and ri.driver_name like concat('%',#{driverName},'%')
|
||||
</if>
|
||||
<if test="driverCarNum != null ">
|
||||
and ri.driver_car_num like concat('%',#{driverCarNum},'%')
|
||||
</if>
|
||||
<if test="rescueType != null ">
|
||||
and ri.rescue_type = #{rescueType}
|
||||
</if>
|
||||
<if test="feeType != null ">
|
||||
and ri.fee_type = #{feeType}
|
||||
</if>
|
||||
<if test="flag != null ">
|
||||
and ri.driver_id is not null
|
||||
</if>
|
||||
<if test="rescueStart != null and rescueEnd != null"> and rescue_time between concat(#{rescueStart},' 00:00:00') and concat(#{rescueEnd},' 23:59:59') </if>
|
||||
|
||||
</where>
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
where ri.deleted = '0'
|
||||
<if test="map.orderStatus != null and map.orderStatus != ''">
|
||||
and roi.order_status = #{map.orderStatus}
|
||||
</if>
|
||||
<if test="map.rescueStatus != null and map.rescueStatus != ''">
|
||||
and ri.rescue_status = #{map.rescueStatus}
|
||||
</if>
|
||||
<if test="map.licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{map.licenseNum},'%')
|
||||
</if>
|
||||
<if test="map.connectionName != null ">
|
||||
and ri.connection_name like concat('%',#{map.connectionName},'%')
|
||||
</if>
|
||||
<if test="map.driverName != null ">
|
||||
and ri.driver_name like concat('%',#{map.driverName},'%')
|
||||
</if>
|
||||
<if test="map.driverCarNum != null ">
|
||||
and ri.driver_car_num like concat('%',#{map.driverCarNum},'%')
|
||||
</if>
|
||||
<if test="map.rescueType != null ">
|
||||
and ri.rescue_type = #{map.rescueType}
|
||||
</if>
|
||||
<if test="map.feeType != null ">
|
||||
and ri.fee_type = #{map.feeType}
|
||||
</if>
|
||||
<if test="map.flag != null ">
|
||||
and ri.driver_id is not null
|
||||
</if>
|
||||
<if test="map.rescueStart != null and map.rescueEnd != null">and rescue_time between
|
||||
concat(#{map.rescueStart},' 00:00:00') and concat(#{map.rescueEnd},' 23:59:59')
|
||||
</if>
|
||||
order by ri.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="listData" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
sum(set_money/100) as allMoney,count(1) as allNum,sum(case when ri.car_type ='1' then (set_money/100)* ${rescueTcBig}
|
||||
when ri.car_type ='2' then (set_money/100)* ${rescueTcMid}
|
||||
when ri.car_type ='3' then (set_money/100)* ${rescueTcSmall} else 0 end) as tcAll
|
||||
sum(set_money/100) as allMoney,count(1) as allNum,sum(case when ri.car_type ='1' then (set_money/100)*
|
||||
${rescueTcBig}
|
||||
when ri.car_type ='2' then (set_money/100)* ${rescueTcMid}
|
||||
when ri.car_type ='3' then (set_money/100)* ${rescueTcSmall} else 0 end) as tcAll
|
||||
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>
|
||||
<if test="driverName != null ">
|
||||
and ri.driver_name like concat('%',#{driverName},'%')
|
||||
@ -110,254 +112,253 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="flag != null ">
|
||||
and ri.driver_id is not null
|
||||
</if>
|
||||
<if test="rescueStart != null "> and rescue_time like concat(#{rescueStart},'%') </if>
|
||||
<if test="rescueStart != null ">and rescue_time like concat(#{rescueStart},'%')</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectRescueInfoListApp" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
|
||||
<select id="selectRescueInfoListApp" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo"
|
||||
resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
SELECT
|
||||
ri.*,roi.order_status,roi.set_money
|
||||
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>
|
||||
(ri.user_id = #{userId} or connection_phone =#{connectionPhone})
|
||||
<if test="rescueStatus != null ">
|
||||
<choose>
|
||||
<when test="rescueStatus == '1'.toString()">
|
||||
<!-- 救援中 -->
|
||||
and (ri.rescue_status = '1' or ri.rescue_status = '2' or ri.rescue_status = '3')
|
||||
</when>
|
||||
<when test="rescueStatus == '2'.toString()">
|
||||
<!--待支付 -->
|
||||
and roi.order_status ='1'
|
||||
</when>
|
||||
<when test="rescueStatus == '3'.toString()">
|
||||
<!-- 待取车 -->
|
||||
and ri.rescue_status ='6'
|
||||
</when>
|
||||
<when test="rescueStatus == '4'.toString()">
|
||||
<!-- 评价 -->
|
||||
and roi.order_status ='2'
|
||||
</when>
|
||||
<when test="rescueStatus == '5'.toString()">
|
||||
<!-- 评价 -->
|
||||
and roi.order_status ='3'
|
||||
</when>
|
||||
<when test="rescueStatus == '8'.toString()">
|
||||
<!-- 已还车 -->
|
||||
and ri.rescue_status ='8'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{licenseNum},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by ri.create_time desc
|
||||
(ri.user_id = #{map.userId} or connection_phone =#{map.connectionPhone})
|
||||
<if test="map.rescueStatus != null ">
|
||||
<choose>
|
||||
<when test="map.rescueStatus == '1'.toString()">
|
||||
<!-- 救援中 -->
|
||||
and (ri.rescue_status = '1' or ri.rescue_status = '2' or ri.rescue_status = '3')
|
||||
</when>
|
||||
<when test="map.rescueStatus == '2'.toString()">
|
||||
<!--待支付 -->
|
||||
and roi.order_status ='1'
|
||||
</when>
|
||||
<when test="map.rescueStatus == '3'.toString()">
|
||||
<!-- 待取车 -->
|
||||
and ri.rescue_status ='6'
|
||||
</when>
|
||||
<when test="map.rescueStatus == '4'.toString()">
|
||||
<!-- 评价 -->
|
||||
and roi.order_status ='2'
|
||||
</when>
|
||||
<when test="map.rescueStatus == '5'.toString()">
|
||||
<!-- 评价 -->
|
||||
and roi.order_status ='3'
|
||||
</when>
|
||||
<when test="map.rescueStatus == '8'.toString()">
|
||||
<!-- 已还车 -->
|
||||
and ri.rescue_status ='8'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="map.licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{map.licenseNum},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by ri.create_time desc
|
||||
|
||||
</select>
|
||||
<select id="getKcList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
select * from rescue_info ri
|
||||
</select>
|
||||
<select id="getKcList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfo"
|
||||
resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
select * from rescue_info ri
|
||||
<where>
|
||||
dept_id = #{deptId} and rescue_type = '5'
|
||||
dept_id = #{deptId} and rescue_type = '5'
|
||||
<if test="connectionName != null and connectionName != ''">
|
||||
and (connection_name like concat('%', #{connectionName}, '%') or connection_phone like concat('%', #{connectionPhone}, '%') or license_num like concat('%',#{licenseNum}, '%'))
|
||||
</if>
|
||||
and (connection_name like concat('%', #{connectionName}, '%') or connection_phone like concat('%',
|
||||
#{connectionPhone}, '%') or license_num like concat('%',#{licenseNum}, '%'))
|
||||
</if>
|
||||
<if test="rescueStatus != null ">
|
||||
<choose>
|
||||
<when test="rescueStatus == '1'.toString()">
|
||||
<choose>
|
||||
<when test="rescueStatus == '1'.toString()">
|
||||
<!-- 扣车中 -->
|
||||
and rescue_status <![CDATA[<]]> '6'
|
||||
</when>
|
||||
<when test="rescueStatus == '2'.toString()">
|
||||
<!-- 已解 -->
|
||||
and rescue_status <![CDATA[>=]]> '6'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
and rescue_status <![CDATA[<]]> '6'
|
||||
</when>
|
||||
<when test="rescueStatus == '2'.toString()">
|
||||
<!-- 已解 -->
|
||||
and rescue_status <![CDATA[>=]]> '6'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="driverList" resultType="cn.iocoder.yudao.module.rescue.domain.DriverInfo">
|
||||
SELECT
|
||||
su.user_id AS userId,
|
||||
su.nick_name AS nickName,
|
||||
su.phonenumber AS phonenumber,
|
||||
su.user_age as userAge,
|
||||
su.sex as sex,
|
||||
su.avatar as avatar,
|
||||
su.real_name as realName,
|
||||
di.*
|
||||
FROM
|
||||
driver_info di
|
||||
INNER JOIN sys_user su ON di.user_id = su.user_id
|
||||
AND su.del_flag = '0'
|
||||
WHERE 1=1
|
||||
<if test="realName!=null and realName!=''">
|
||||
and su.real_name like concat('%',#{realName},'%')
|
||||
</if>
|
||||
<if test="phonenumber!=null and phonenumber!=''">
|
||||
and su.phonenumber = #{phonenumber}
|
||||
</if>
|
||||
<if test="driveStatus!=null and driveStatus!=''">
|
||||
and di.driver_status = #{driveStatus}
|
||||
</if>
|
||||
<if test="authStatus!=null and authStatus!=''">
|
||||
and di.auth_status = #{authStatus}
|
||||
</if>
|
||||
<if test="carType!=null and carType!=''">
|
||||
and di.car_type = #{carType}
|
||||
</if>
|
||||
<if test="carLicenseNum!=null and carLicenseNum!=''">
|
||||
and di.car_license_num like concat('%',#{carLicenseNum},'%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
order by di.create_time desc
|
||||
</select>
|
||||
<select id="driverListApp" resultType="cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto">
|
||||
SELECT
|
||||
di.*,su.real_name,rci.rescue_car_num
|
||||
FROM
|
||||
driver_info di
|
||||
INNER JOIN sys_user su ON di.user_id = su.user_id AND su.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = di.dept_id
|
||||
inner join rescue_car_info rci on rci.possessor_id = di.id
|
||||
WHERE di.auth_status='2'
|
||||
<if test="searchValue!=null and searchValue!=''">
|
||||
and (su.real_name like concat('%',#{searchValue},'%') or di.phonenumber like concat('%',#{searchValue},'%') or rci.rescue_car_num like concat('%',#{searchValue},'%'))
|
||||
</if>
|
||||
order by di.create_time desc
|
||||
</select>
|
||||
<select id="driverInMap2" resultType="java.util.Map">
|
||||
SELECT
|
||||
IFNULL(sum(di.driver_status='1'),0) as kxNum,IFNULL(sum(di.driver_status='2'),0) as ztNum,IFNULL(sum(di.driver_status='3'),0) as mlNum,IFNULL(sum(di.driver_status='4'),0) as lxNum
|
||||
FROM
|
||||
<select id="driverList" resultType="cn.iocoder.yudao.module.rescue.domain.DriverInfo">
|
||||
SELECT
|
||||
su.id AS userId,
|
||||
su.nickname AS nickName,
|
||||
su.mobile AS phonenumber,
|
||||
su.sex as sex,
|
||||
su.avatar as avatar,
|
||||
di.*
|
||||
FROM
|
||||
driver_info di
|
||||
INNER JOIN sys_user su ON di.user_id = su.user_id
|
||||
AND su.del_flag = '0'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = di.dept_id
|
||||
INNER JOIN rescue_car_info rci ON rci.possessor_id = di.id
|
||||
WHERE
|
||||
di.auth_status = '2'
|
||||
INNER JOIN system_users su ON di.user_id = su.id
|
||||
AND su.deleted = '0'
|
||||
WHERE 1=1
|
||||
<if test="map.nickName !=null and map.nickName !=''">
|
||||
and su.nickname like concat('%',#{map.nickName},'%')
|
||||
</if>
|
||||
<if test="map.phonenumber!=null and map.phonenumber!=''">
|
||||
and su.mobile like concat('%', #{map.phonenumber}, '%')
|
||||
</if>
|
||||
<if test="map.driveStatus!=null and map.driveStatus!=''">
|
||||
and di.driver_status = #{map.driveStatus}
|
||||
</if>
|
||||
<if test="map.authStatus!=null and map.authStatus!=''">
|
||||
and di.auth_status = #{map.authStatus}
|
||||
</if>
|
||||
<if test="map.carType!=null and map.carType!=''">
|
||||
and di.car_type = #{map.carType}
|
||||
</if>
|
||||
<if test="map.carLicenseNum!=null and map.carLicenseNum!=''">
|
||||
and di.car_license_num like concat('%',#{map.carLicenseNum},'%')
|
||||
</if>
|
||||
order by di.create_time desc
|
||||
</select>
|
||||
<update id="dealOverTimeRescue" >
|
||||
UPDATE rescue_info
|
||||
SET need_system = '1'
|
||||
WHERE
|
||||
need_system = '0'
|
||||
AND driver_id IS NULL
|
||||
AND TIMESTAMPDIFF(
|
||||
MINUTE,
|
||||
rescue_time,
|
||||
NOW()) > 5
|
||||
AND rescue_status = '2'
|
||||
</update>
|
||||
|
||||
<select id="driverListApp" resultType="cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto">
|
||||
SELECT
|
||||
di.*,su.real_name,rci.rescue_car_num
|
||||
FROM
|
||||
driver_info di
|
||||
INNER JOIN sys_user su ON di.user_id = su.user_id AND su.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = di.dept_id
|
||||
inner join rescue_car_info rci on rci.possessor_id = di.id
|
||||
WHERE di.auth_status='2'
|
||||
<if test="searchValue!=null and searchValue!=''">
|
||||
and (su.real_name like concat('%',#{searchValue},'%') or di.phonenumber like concat('%',#{searchValue},'%')
|
||||
or rci.rescue_car_num like concat('%',#{searchValue},'%'))
|
||||
</if>
|
||||
order by di.create_time desc
|
||||
</select>
|
||||
<select id="driverInMap2" resultType="java.util.Map">
|
||||
SELECT IFNULL(sum(di.driver_status = '1'), 0) as kxNum,
|
||||
IFNULL(sum(di.driver_status = '2'), 0) as ztNum,
|
||||
IFNULL(sum(di.driver_status = '3'), 0) as mlNum,
|
||||
IFNULL(sum(di.driver_status = '4'), 0) as lxNum
|
||||
FROM driver_info di
|
||||
INNER JOIN sys_user su ON di.user_id = su.user_id
|
||||
AND su.del_flag = '0'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = di.dept_id
|
||||
INNER JOIN rescue_car_info rci ON rci.possessor_id = di.id
|
||||
WHERE di.auth_status = '2'
|
||||
</select>
|
||||
<update id="dealOverTimeRescue">
|
||||
UPDATE rescue_info
|
||||
SET need_system = '1'
|
||||
WHERE need_system = '0'
|
||||
AND driver_id IS NULL
|
||||
AND TIMESTAMPDIFF(
|
||||
MINUTE, rescue_time,
|
||||
NOW()) > 5
|
||||
AND rescue_status = '2'
|
||||
</update>
|
||||
<select id="getOverTimeRescue" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
SELECT
|
||||
ri.*, MAX(rdi.driver_level) as driverLevel
|
||||
FROM
|
||||
rescue_info ri
|
||||
INNER JOIN rescue_driver_info rdi ON ri.id = rdi.rescue_id
|
||||
WHERE
|
||||
ri.driver_id IS NULL
|
||||
AND ri.rescue_status = '2'
|
||||
SELECT ri.*,
|
||||
MAX(rdi.driver_level) as driverLevel
|
||||
FROM rescue_info ri
|
||||
INNER JOIN rescue_driver_info rdi ON ri.id = rdi.rescue_id
|
||||
WHERE ri.driver_id IS NULL
|
||||
AND ri.rescue_status = '2'
|
||||
GROUP BY ri.id
|
||||
HAVING
|
||||
TIMESTAMPDIFF(
|
||||
MINUTE,
|
||||
MAX(rdi.create_time),
|
||||
NOW()) <![CDATA[>]]> 3
|
||||
HAVING TIMESTAMPDIFF(
|
||||
MINUTE, MAX(rdi.create_time),
|
||||
NOW()) <![CDATA[>]]> 3
|
||||
</select>
|
||||
<select id="getRescueStatistics" resultType="java.util.Map">
|
||||
SELECT
|
||||
IFNULL(sum(ri.rescue_status = '2' or ri.rescue_status = '3'),0) as jyzNum,
|
||||
IFNULL(sum(roi.order_status ='1'),0) as dzfNum,
|
||||
IFNULL(sum(ri.rescue_status ='6'),0) as dqcNum,
|
||||
IFNULL(sum(ri.rescue_status <![CDATA[>=]]> '5' ),0) as ywcNum
|
||||
FROM
|
||||
rescue_info ri
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
where ri.user_id = #{userId} or connection_phone =#{connectionPhone}
|
||||
SELECT IFNULL(sum(ri.rescue_status = '2' or ri.rescue_status = '3'), 0) as jyzNum,
|
||||
IFNULL(sum(roi.order_status = '1'), 0) as dzfNum,
|
||||
IFNULL(sum(ri.rescue_status = '6'), 0) as dqcNum,
|
||||
IFNULL(sum(ri.rescue_status <![CDATA[>=]]> '5'), 0) as ywcNum
|
||||
FROM rescue_info ri
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
where ri.user_id = #{userId}
|
||||
or connection_phone = #{connectionPhone}
|
||||
</select>
|
||||
<select id="getRescueStatisticsByAdmin" resultType="java.util.Map">
|
||||
SELECT
|
||||
IFNULL(sum(ri.rescue_status = '2' or ri.rescue_status = '3'),0) as jyzNum,
|
||||
IFNULL(sum(roi.order_status ='1'),0) as dzfNum,
|
||||
IFNULL(sum(ri.rescue_status ='6'),0) as dqcNum,
|
||||
IFNULL(sum(ri.rescue_status <![CDATA[>=]]> '5' ),0) as ywcNum
|
||||
FROM
|
||||
rescue_info ri
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
where 1=1
|
||||
${params.dataScope}
|
||||
SELECT IFNULL(sum(ri.rescue_status = '2' or ri.rescue_status = '3'), 0) as jyzNum,
|
||||
IFNULL(sum(roi.order_status = '1'), 0) as dzfNum,
|
||||
IFNULL(sum(ri.rescue_status = '6'), 0) as dqcNum,
|
||||
IFNULL(sum(ri.rescue_status <![CDATA[>=]]> '5'), 0) as ywcNum
|
||||
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
|
||||
FROM
|
||||
rescue_info_detail
|
||||
WHERE
|
||||
rescue_info_id = #{rescueId};
|
||||
FROM rescue_info_detail
|
||||
WHERE rescue_info_id = #{rescueId};
|
||||
|
||||
|
||||
</delete>
|
||||
<delete id="deleteOtherInfo2">
|
||||
DELETE
|
||||
FROM
|
||||
rescue_driver_info
|
||||
WHERE
|
||||
rescue_id = #{rescueId};
|
||||
FROM rescue_driver_info
|
||||
WHERE rescue_id = #{rescueId};
|
||||
</delete>
|
||||
|
||||
<select id="getDriverCarNum" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
count( 1 ) as allNum,ifnull(sum(case when start_scale is null then 0 when end_scale is null then 0 else end_scale - start_scale end ),0) as allDistance
|
||||
FROM
|
||||
rescue_info
|
||||
where driver_id = #{driverId} and driver_car_num = #{carNum} and rescue_time like concat(#{time},'%')
|
||||
<select id="getDriverCarNum" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT count(1) as allNum,
|
||||
ifnull(sum(case
|
||||
when start_scale is null then 0
|
||||
when end_scale is null then 0
|
||||
else end_scale - start_scale end), 0) as allDistance
|
||||
FROM rescue_info
|
||||
where driver_id = #{driverId}
|
||||
and driver_car_num = #{carNum}
|
||||
and rescue_time like concat(#{time}, '%')
|
||||
</select>
|
||||
<select id="getRescueInfoByDriver" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo">
|
||||
SELECT
|
||||
ri.*,roi.order_status,roi.set_money,roi.id as rescueOrderId,roi.pay_money,roi.pay_time
|
||||
FROM
|
||||
rescue_info ri
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
where
|
||||
driver_id is not null
|
||||
<if test="rescueStart != null and rescueEnd != null"> and rescue_time between concat(#{rescueStart},' 00:00:00') and concat(#{rescueEnd},' 23:59:59') </if>
|
||||
<if test="licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{licenseNum},'%')
|
||||
</if>
|
||||
<if test="feeType != null ">
|
||||
and ri.fee_type = #{feeType}
|
||||
</if>
|
||||
<if test="flag != null ">
|
||||
and ri.driver_id is not null
|
||||
</if>
|
||||
<if test="rescueStart != null and rescueEnd != null"> and rescue_time between concat(#{rescueStart},' 00:00:00') and concat(#{rescueEnd},' 23:59:59') </if>
|
||||
left join rescue_order_info roi on roi.rescue_info_id = ri.id
|
||||
where
|
||||
driver_id is not null
|
||||
<if test="rescueStart != null and rescueEnd != null">and rescue_time between concat(#{rescueStart},' 00:00:00')
|
||||
and concat(#{rescueEnd},' 23:59:59')
|
||||
</if>
|
||||
<if test="licenseNum != null ">
|
||||
and ri.license_num like concat('%',#{licenseNum},'%')
|
||||
</if>
|
||||
<if test="feeType != null ">
|
||||
and ri.fee_type = #{feeType}
|
||||
</if>
|
||||
<if test="flag != null ">
|
||||
and ri.driver_id is not null
|
||||
</if>
|
||||
<if test="rescueStart != null and rescueEnd != null">and rescue_time between concat(#{rescueStart},' 00:00:00')
|
||||
and concat(#{rescueEnd},' 23:59:59')
|
||||
</if>
|
||||
|
||||
<if test="driverName != null ">
|
||||
and ri.driver_name like concat('%',#{driverName},'%')
|
||||
</if>
|
||||
<if test="driverCarNum != null ">
|
||||
and ri.driver_car_num like concat('%',#{driverCarNum},'%')
|
||||
</if>
|
||||
<if test="rescueStartMonth != null">
|
||||
<if test="driverName != null ">
|
||||
and ri.driver_name like concat('%',#{driverName},'%')
|
||||
</if>
|
||||
<if test="driverCarNum != null ">
|
||||
and ri.driver_car_num like concat('%',#{driverCarNum},'%')
|
||||
</if>
|
||||
<if test="rescueStartMonth != null">
|
||||
and rescue_time like concat(#{rescueStartMonth},'%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
|
||||
order by ri.driver_name desc
|
||||
</select>
|
||||
<select id="statisticsInfo" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
IFNULL(sum(roi.set_money),0)/100 as money,count(ri.id) as rescueNum,su.real_name as driverName
|
||||
FROM
|
||||
driver_info di
|
||||
LEFT JOIN rescue_info ri on ri.driver_id = di.id and ri.rescue_time <![CDATA[>=]]> #{startTime} and ri.rescue_time <![CDATA[<=]]> #{endTime}
|
||||
LEFT JOIN rescue_order_info roi on ri.id = roi.rescue_info_id
|
||||
INNER JOIN sys_user su on di.user_id = su.user_id
|
||||
SELECT IFNULL(sum(roi.set_money), 0) / 100 as money,
|
||||
count(ri.id) as rescueNum,
|
||||
su.real_name as driverName
|
||||
FROM driver_info di
|
||||
LEFT JOIN rescue_info ri on ri.driver_id = di.id and ri.rescue_time <![CDATA[>=]]> #{startTime} and
|
||||
ri.rescue_time <![CDATA[<=]]> #{endTime}
|
||||
LEFT JOIN rescue_order_info roi on ri.id = roi.rescue_info_id
|
||||
INNER JOIN sys_user su on di.user_id = su.user_id
|
||||
GROUP BY di.id
|
||||
ORDER BY rescueNum desc
|
||||
</select>
|
||||
|
@ -1,46 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.rescue.mapper.RescueRefuelRecordMapper">
|
||||
|
||||
<resultMap type="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord" id="RescueRefuelRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="driverId" column="driver_id" />
|
||||
<result property="carId" column="car_id" />
|
||||
<result property="refuelNum" column="refuel_num" />
|
||||
<result property="refuelMoney" column="refuel_money" />
|
||||
<result property="recordTime" column="record_time" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="driverId" column="driver_id"/>
|
||||
<result property="carId" column="car_id"/>
|
||||
<result property="refuelNum" column="refuel_num"/>
|
||||
<result property="refuelMoney" column="refuel_money"/>
|
||||
<result property="recordTime" column="record_time"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="creator" column="creator"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updater" column="updater"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectRescueRefuelRecordList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord" resultType="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord">
|
||||
<select id="selectRescueRefuelRecordList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord"
|
||||
resultType="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord">
|
||||
SELECT
|
||||
rrc.*,su.real_name,su.phonenumber,rci.rescue_car_num
|
||||
rrc.*,su.nickname as real_name,su.mobile as phonenumber,rci.rescue_car_num
|
||||
FROM
|
||||
rescue_refuel_record rrc
|
||||
inner join driver_info di ON rrc.driver_id = di.id
|
||||
INNER JOIN sys_user su ON su.user_id = di.user_id
|
||||
INNER JOIN system_users su ON su.id = di.user_id
|
||||
left join rescue_car_info rci on di.id = rci.possessor_id
|
||||
<where>
|
||||
<if test="realName != null "> and su.real_name like concat('%',#{realName},'%')</if>
|
||||
<if test="rescueCarNum != null "> and rci.rescue_car_num like concat('%',#{rescueCarNum},'%') </if>
|
||||
</where>
|
||||
order by rrc.record_time desc
|
||||
where rrc.deleted = '0'
|
||||
<if test="map.realName != null ">and su.real_name like concat('%',#{map.realName},'%')</if>
|
||||
<if test="map.rescueCarNum != null ">and rci.rescue_car_num like concat('%',#{map.rescueCarNum},'%')</if>
|
||||
order by rrc.record_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectRescueRefuelRecordById" parameterType="java.lang.Long" resultType="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord">
|
||||
select * from rescue_refuel_record
|
||||
<select id="selectRescueRefuelRecordById" parameterType="java.lang.Long"
|
||||
resultType="cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord">
|
||||
select *
|
||||
from rescue_refuel_record
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteRescueRefuelRecordById" parameterType="java.lang.Long">
|
||||
delete from rescue_refuel_record where id = #{id}
|
||||
delete
|
||||
from rescue_refuel_record
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRescueRefuelRecordByIds" parameterType="java.lang.String">
|
||||
@ -50,29 +54,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getMonthRescueRefuelRecord" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
ifnull(sum(refuel_money),0) as refuelMoney, ifnull(sum(refuel_num),0) as refuelNum
|
||||
FROM
|
||||
rescue_refuel_record
|
||||
where driver_id = #{driverId} and car_id = #{carId} and record_time like CONCAT(#{time},'%')
|
||||
SELECT ifnull(sum(refuel_money), 0) as refuelMoney,
|
||||
ifnull(sum(refuel_num), 0) as refuelNum
|
||||
FROM rescue_refuel_record
|
||||
where driver_id = #{driverId}
|
||||
and car_id = #{carId}
|
||||
and record_time like CONCAT(#{time}, '%')
|
||||
</select>
|
||||
<select id="listData" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
ifnull(sum(refuel_money),0) as refuelMoney
|
||||
ifnull(sum(refuel_money),0) as refuelMoney
|
||||
FROM
|
||||
rescue_refuel_record rrr
|
||||
rescue_refuel_record rrr
|
||||
left join rescue_car_info rci on rci.id = rrr.car_id
|
||||
left join driver_info di on di.id = rrr.driver_id
|
||||
left join sys_user su on di.user_id = su.user_id
|
||||
<where>
|
||||
<if test="driverName != null ">
|
||||
and su.real_name like concat('%',#{driverName},'%')
|
||||
</if>
|
||||
<if test="driverCarNum != null ">
|
||||
and rci.rescue_car_num like concat('%',#{driverCarNum},'%')
|
||||
</if>
|
||||
<if test="rescueStart"> and rrr.record_time like concat(#{rescueStart},'%') </if>
|
||||
${params.dataScope}
|
||||
<if test="driverName != null ">
|
||||
and su.real_name like concat('%',#{driverName},'%')
|
||||
</if>
|
||||
<if test="driverCarNum != null ">
|
||||
and rci.rescue_car_num like concat('%',#{driverCarNum},'%')
|
||||
</if>
|
||||
<if test="rescueStart">and rrr.record_time like concat(#{rescueStart},'%')</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
@ -129,6 +129,7 @@ public class YudaoWebSecurityConfigurerAdapter {
|
||||
.authorizeRequests()
|
||||
// 1.1 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
|
||||
.antMatchers(HttpMethod.POST, "/admin-api/rescue/login", "/admin-api/rescue/loginApp").anonymous()
|
||||
// 1.2 设置 @PermitAll 无需认证
|
||||
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
|
||||
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()
|
||||
|
@ -257,6 +257,8 @@ yudao:
|
||||
- /admin-api/pay/notify/** # 支付回调通知,不携带租户编号
|
||||
- /jmreport/* # 积木报表,无法携带租户编号
|
||||
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
|
||||
# - /admin-api/rescue/login
|
||||
- /admin-api/rescue/loginApp
|
||||
ignore-tables:
|
||||
- system_tenant
|
||||
- system_tenant_package
|
||||
|
Loading…
Reference in New Issue
Block a user