Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
70995ffe73
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.notice.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.notice.entity.DlBaseNotice;
|
||||
import cn.iocoder.yudao.module.notice.service.DlBaseNoticeService;
|
||||
import cn.iocoder.yudao.module.notice.vo.DlBaseNoticeReqVO;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 平台通用信息公告(DlBaseNotice)表控制层
|
||||
*
|
||||
* @author 小李
|
||||
* @date 9:48 2024/10/9
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/base/notice")
|
||||
public class ApiBaseNoticeController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private DlBaseNoticeService dlBaseNoticeService;
|
||||
|
||||
/**
|
||||
* 小程序查询公告通用方法
|
||||
* @param reqVO 请求参数
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 数量
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
* @author vinjor-M
|
||||
* @date 13:58 2024/10/15
|
||||
**/
|
||||
@GetMapping("/pageList")
|
||||
@Operation(summary = "小程序查询公告通用方法")
|
||||
public CommonResult<?> pageNotice(DlBaseNoticeReqVO reqVO,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
//只差开启的
|
||||
reqVO.setStatus(0);
|
||||
Page<DlBaseNotice> page = new Page<>(pageNo, pageSize);
|
||||
return success(dlBaseNoticeService.pageNotice(reqVO, page));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.notice.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@ -35,7 +34,7 @@ public class DlBaseNotice extends BaseDO {
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 公告类型(1通知 2公告)
|
||||
* 公告类型(1通知 2公告 3操作指南)
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
|
@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.order.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.order.entity.RepairOrderInfo;
|
||||
import cn.iocoder.yudao.module.order.service.RepairOrderInfoService;
|
||||
import cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 维修模块 订单")
|
||||
@RestController
|
||||
@RequestMapping("/repair/order-info")
|
||||
@Validated
|
||||
public class ApiOrderInfoController {
|
||||
|
||||
@Resource
|
||||
private RepairOrderInfoService repairOrderInfoService;
|
||||
|
||||
/**
|
||||
* 小程序端查询客户个人所有订单
|
||||
* @author vinjor-M
|
||||
* @date 14:58 2024/10/15
|
||||
* @param respVO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "订单分页查询")
|
||||
@TenantIgnore
|
||||
public CommonResult<?> getOrderPage(RepairOrderInfoRespVO respVO,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||
// 当前登录用户的id
|
||||
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
||||
respVO.setUserId(loginUserId);
|
||||
Page<RepairOrderInfo> page = new Page<>(pageNo, pageSize);
|
||||
return success(repairOrderInfoService.getOrderPageByStatus(respVO, page));
|
||||
}
|
||||
}
|
@ -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); // 返回符合条件的分页查询结果
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "用户端 - 维修模块 订单模块")
|
||||
@ -27,18 +26,6 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
public class ClientOrderApi {
|
||||
@Resource
|
||||
private RepairOrderInfoService repairOrderInfoService;
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "订单分页查询")
|
||||
@TenantIgnore
|
||||
public CommonResult<?> getOrderPage(RepairOrderInfoRespVO respVO,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||
// 当前登录用户的id
|
||||
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
||||
respVO.setUserId(loginUserId);
|
||||
Page<RepairOrderInfo> page = new Page<>(pageNo, pageSize);
|
||||
return success(repairOrderInfoService.getOrderPageByStatus(respVO, page));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/pageCreator")
|
||||
|
@ -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