救援检测bug修复
This commit is contained in:
parent
0a87e55cbe
commit
35a2ce8406
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.core.page.*;
|
||||
import cn.iocoder.yudao.module.core.text.HttpStatus;
|
||||
import cn.iocoder.yudao.util.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.http.client.utils.DateUtils;
|
||||
@ -51,7 +52,11 @@ public class BaseController
|
||||
*/
|
||||
protected void startPage()
|
||||
{
|
||||
PageUtils.startPage();
|
||||
// 这里直接调用 MyBatis-Plus 的分页插件
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
// 开始分页
|
||||
Page<Object> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,8 +41,12 @@ public class InspectionFileController extends BaseController
|
||||
public TableDataInfo list(InspectionFile inspectionFile) throws Exception {
|
||||
ShopMallPartners partners = partnerService.shopInfoByUserId();
|
||||
inspectionFile.setPartnerId(partners.getPartnerId());
|
||||
|
||||
startPage();
|
||||
|
||||
// 使用MyBatis-Plus的分页查询,将结果转换为Page对象
|
||||
List<InspectionFile> list = inspectionFileService.selectInspectionFileList(inspectionFile);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.inspection.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionFile;
|
||||
|
||||
@ -60,4 +62,14 @@ public interface IInspectionFileService extends IService<InspectionFile>
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInspectionFileById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询 InspectionFile 列表
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param inspectionFile 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
IPage<InspectionFile> selectInspectionFileList(Page<InspectionFile> page, InspectionFile inspectionFile);
|
||||
}
|
||||
|
@ -5,6 +5,9 @@ import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.util.DateUtils;
|
||||
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
||||
@ -165,4 +168,13 @@ public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper,
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<InspectionFile> selectInspectionFileList(Page<InspectionFile> page, InspectionFile inspectionFile) {
|
||||
// 创建一个空的 QueryWrapper
|
||||
QueryWrapper<InspectionFile> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
// 直接调用 MyBatis-Plus 的 page 方法进行分页查询
|
||||
return this.page(page, queryWrapper); // 返回符合条件的分页查询结果
|
||||
}
|
||||
}
|
||||
|
@ -111,41 +111,64 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
* @param rescueDeptDriver
|
||||
**/
|
||||
@Override
|
||||
public IPage<RescueDeptDriver> selectRescueDeptDriverPage(RescueDeptDriver rescueDeptDriver, Page<RescueDeptDriver> page){
|
||||
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());
|
||||
if (driverInfo != null) {
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
if (sysUser != null) {
|
||||
tempStr.add(sysUser.getNickname());
|
||||
} else {
|
||||
tempStr.add("未知用户");
|
||||
}
|
||||
}
|
||||
}
|
||||
deptDriver.setFirstDriverName(tempStr.toString());
|
||||
}
|
||||
|
||||
// 对 secondDriverIds 和 thirdDriverIds 进行类似的处理
|
||||
String secondDriverIds = deptDriver.getSecondDriverIds();
|
||||
if (StringUtils.isNotEmpty(secondDriverIds)) {
|
||||
String[] driverIds = secondDriverIds.split(",");
|
||||
StringJoiner tempStr = new StringJoiner("|");
|
||||
String[] driverIds = secondDriverIds.split(",");
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
tempStr.add(sysUser.getNickname());
|
||||
if (driverInfo != null) {
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
if (sysUser != null) {
|
||||
tempStr.add(sysUser.getNickname());
|
||||
} else {
|
||||
tempStr.add("未知用户");
|
||||
}
|
||||
}
|
||||
}
|
||||
deptDriver.setSecondDriverName(tempStr.toString());
|
||||
}
|
||||
|
||||
// 对 thirdDriverIds 进行类似的处理
|
||||
String thirdDriverIds = deptDriver.getThirdDriverIds();
|
||||
if (StringUtils.isNotEmpty(thirdDriverIds)) {
|
||||
String[] driverIds = thirdDriverIds.split(",");
|
||||
StringJoiner tempStr = new StringJoiner("|");
|
||||
String[] driverIds = thirdDriverIds.split(",");
|
||||
for (String driverId : driverIds) {
|
||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
tempStr.add(sysUser.getNickname());
|
||||
if (driverInfo != null) {
|
||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||
if (sysUser != null) {
|
||||
tempStr.add(sysUser.getNickname());
|
||||
} else {
|
||||
tempStr.add("未知用户");
|
||||
}
|
||||
}
|
||||
}
|
||||
deptDriver.setThirdDriverName(tempStr.toString());
|
||||
}
|
||||
@ -153,6 +176,7 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
||||
return driverIPage;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增救援客户司机分配
|
||||
*
|
||||
|
1
数据库设计/.back_蓝安集团一体化平台/T20241014103609.pdma.json
Normal file
1
数据库设计/.back_蓝安集团一体化平台/T20241014103609.pdma.json
Normal file
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
"avatar": "",
|
||||
"version": "4.9.2",
|
||||
"createdTime": "2024-10-9 10:34:15",
|
||||
"updatedTime": "2024-10-12 13:40:15",
|
||||
"updatedTime": "2024-10-14 10:36:09",
|
||||
"dbConns": [],
|
||||
"profile": {
|
||||
"default": {
|
||||
@ -683,7 +683,7 @@
|
||||
"optionsFetcher": ""
|
||||
}
|
||||
},
|
||||
"menuWidth": "273px"
|
||||
"menuWidth": "286px"
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user