Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
b1ed247602
@ -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.page.*;
|
||||||
import cn.iocoder.yudao.module.core.text.HttpStatus;
|
import cn.iocoder.yudao.module.core.text.HttpStatus;
|
||||||
import cn.iocoder.yudao.util.StringUtils;
|
import cn.iocoder.yudao.util.StringUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.http.client.utils.DateUtils;
|
import org.apache.http.client.utils.DateUtils;
|
||||||
@ -51,7 +52,11 @@ public class BaseController
|
|||||||
*/
|
*/
|
||||||
protected void startPage()
|
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 {
|
public TableDataInfo list(InspectionFile inspectionFile) throws Exception {
|
||||||
ShopMallPartners partners = partnerService.shopInfoByUserId();
|
ShopMallPartners partners = partnerService.shopInfoByUserId();
|
||||||
inspectionFile.setPartnerId(partners.getPartnerId());
|
inspectionFile.setPartnerId(partners.getPartnerId());
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
|
|
||||||
|
// 使用MyBatis-Plus的分页查询,将结果转换为Page对象
|
||||||
List<InspectionFile> list = inspectionFileService.selectInspectionFileList(inspectionFile);
|
List<InspectionFile> list = inspectionFileService.selectInspectionFileList(inspectionFile);
|
||||||
|
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.inspection.service;
|
|||||||
|
|
||||||
import java.util.List;
|
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 com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import cn.iocoder.yudao.module.inspection.entity.InspectionFile;
|
import cn.iocoder.yudao.module.inspection.entity.InspectionFile;
|
||||||
|
|
||||||
@ -60,4 +62,14 @@ public interface IInspectionFileService extends IService<InspectionFile>
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteInspectionFileById(Long id);
|
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 cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import cn.iocoder.yudao.util.DateUtils;
|
import cn.iocoder.yudao.util.DateUtils;
|
||||||
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
||||||
@ -165,4 +168,13 @@ public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper,
|
|||||||
|
|
||||||
return 1;
|
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); // 返回符合条件的分页查询结果
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,77 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||||
|
import cn.iocoder.yudao.module.tickets.service.DlTicketWaresService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresReqVO;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresRespVO;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回表(DlTicketWares)表控制层
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:58 2024/10/15
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/repair/tw")
|
||||||
|
public class DlTicketWaresController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private DlTicketWaresService dlTicketWaresService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:01 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 条数
|
||||||
|
**/
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "分页查询")
|
||||||
|
public CommonResult<?> getPage(DlTicketWaresReqVO reqVO,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||||
|
Page<DlTicketWares> page = new Page<>(pageNo, pageSize);
|
||||||
|
return success(dlTicketWaresService.getPage(reqVO, page));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增、修改
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:14 2024/10/15
|
||||||
|
* @param respVO 请求对象
|
||||||
|
**/
|
||||||
|
@PostMapping("/update")
|
||||||
|
@Operation(summary = "新增、修改")
|
||||||
|
public CommonResult<?> updateTicketWares(@RequestBody DlTicketWaresRespVO respVO){
|
||||||
|
dlTicketWaresService.updateTicketWares(respVO);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:21 2024/10/15
|
||||||
|
* @param id id
|
||||||
|
**/
|
||||||
|
@DeleteMapping("/remove")
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
public CommonResult<?> removeTicketWares(@RequestParam("id") String id){
|
||||||
|
dlTicketWaresService.removeTicketWares(id);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import cn.iocoder.yudao.module.tickets.service.DlTwItemService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTwItemReqVO;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回子表(DlTwItem)表控制层
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:58 2024/10/15
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/repair/twi")
|
||||||
|
public class DlTwItemController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private DlTwItemService dlTwItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主表查看全部
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:25 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
@GetMapping("/list")
|
||||||
|
@Operation(summary = "根据主表查看全部")
|
||||||
|
public CommonResult<?> listTwItem(DlTwItemReqVO reqVO){
|
||||||
|
return success(dlTwItemService.listTwItem(reqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件客户是否可见
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 17:55 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
@GetMapping("/isShow")
|
||||||
|
@Operation(summary = "配件客户是否可见")
|
||||||
|
public CommonResult<?> updateIsShow(DlTwItemReqVO reqVO){
|
||||||
|
DlTwItem dlTwItem = new DlTwItem();
|
||||||
|
dlTwItem.setIsShow(reqVO.getIsShow());
|
||||||
|
dlTwItem.setId(reqVO.getId());
|
||||||
|
dlTwItemService.updateById(dlTwItem);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.entity;
|
||||||
|
|
||||||
|
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;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回表
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:48 2024/10/15
|
||||||
|
**/
|
||||||
|
@TableName(value ="dl_ticket_wares")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class DlTicketWares extends TenantBaseDO {
|
||||||
|
/**
|
||||||
|
* 主键标识
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据号(自动生成)
|
||||||
|
*/
|
||||||
|
private String no;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单ID(dl_repair_tickets表的ID)
|
||||||
|
*/
|
||||||
|
private String ticketId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(01:领料,02:退料,ticket_wares_type)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(01:待审核,02已通过,03:全部完成,04:部分完成,05:已驳回,ticket_wares_status)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 发起人ID(dl_repair_worker的user_id) */
|
||||||
|
private Long repairId;
|
||||||
|
|
||||||
|
/** 发起人name(dl_repair_worker的user_name) */
|
||||||
|
private String repairName;
|
||||||
|
|
||||||
|
/** 维修顾问ID(system_users的ID) */
|
||||||
|
private Long adviserId;
|
||||||
|
|
||||||
|
/** 维修顾问name(system_user的nickname) */
|
||||||
|
private String adviserName;
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.entity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回子表
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/10/15
|
||||||
|
**/
|
||||||
|
@TableName(value ="dl_tw_item")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class DlTwItem extends TenantBaseDO {
|
||||||
|
/**
|
||||||
|
* 主键标识
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主表ID(dl_ticket_wares表的ID)
|
||||||
|
*/
|
||||||
|
private String twId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件ID
|
||||||
|
*/
|
||||||
|
private String waresId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件名称
|
||||||
|
*/
|
||||||
|
private String waresName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件数量
|
||||||
|
*/
|
||||||
|
private Integer waresCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件状态(01:已领料,02:未领料,03:已退料 tw_item_status)
|
||||||
|
*/
|
||||||
|
private String waresStatus;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 客户是否可见(字典yes_no);已存在于系统中(是:1,否:0) */
|
||||||
|
private String isShow;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresReqVO;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对表【dl_ticket_wares(工单配件申请/退回表)】的数据库操作Mapper
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:53 2024/10/15
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface DlTicketWaresMapper extends BaseMapper<DlTicketWares> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:01 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
IPage<DlTicketWares> getPage(@Param("map") DlTicketWaresReqVO reqVO, Page<DlTicketWares> page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTwItemReqVO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对表【dl_tw_item(工单配件申请/退回子表)】的数据库操作Mapper
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:53 2024/10/15
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface DlTwItemMapper extends BaseMapper<DlTwItem> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主表查看全部
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:25 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
List<DlTwItem> listTwItem(@Param("map") DlTwItemReqVO reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.service;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresReqVO;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresRespVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对表【dl_ticket_wares(工单配件申请/退回表)】的数据库操作Service
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:56 2024/10/15
|
||||||
|
**/
|
||||||
|
public interface DlTicketWaresService extends IService<DlTicketWares> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:01 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
IPage<DlTicketWares> getPage(DlTicketWaresReqVO reqVO, Page<DlTicketWares> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增、修改
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:14 2024/10/15
|
||||||
|
* @param respVO 请求对象
|
||||||
|
**/
|
||||||
|
void updateTicketWares(DlTicketWaresRespVO respVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:21 2024/10/15
|
||||||
|
* @param id id
|
||||||
|
**/
|
||||||
|
void removeTicketWares(String id);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.service;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTwItemReqVO;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTwItemRespVO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对表【dl_tw_item(工单配件申请/退回子表)】的数据库操作Service
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:56 2024/10/15
|
||||||
|
**/
|
||||||
|
public interface DlTwItemService extends IService<DlTwItem> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主表查看全部
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:25 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
List<DlTwItemRespVO> listTwItem(DlTwItemReqVO reqVO);
|
||||||
|
}
|
@ -0,0 +1,133 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import cn.iocoder.yudao.module.base.entity.RepairWorker;
|
||||||
|
import cn.iocoder.yudao.module.base.service.RepairWorkerService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import cn.iocoder.yudao.module.tickets.mapper.DlTicketWaresMapper;
|
||||||
|
import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.service.DlTicketWaresService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.service.DlTwItemService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresReqVO;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTicketWaresRespVO;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
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.context.annotation.Lazy;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对表【dl_ticket_wares(工单配件申请/退回表)】的数据库操作Service实现
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:56 2024/10/15
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, DlTicketWares>
|
||||||
|
implements DlTicketWaresService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DlTwItemService twItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private DlRepairTicketsService repairTicketsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private RepairWorkerService repairWorkerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:01 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public IPage<DlTicketWares> getPage(DlTicketWaresReqVO reqVO, Page<DlTicketWares> page){
|
||||||
|
// 确认查看者身份
|
||||||
|
Integer userRole = repairTicketsService.getUserRole();
|
||||||
|
// 啥也不是
|
||||||
|
if (userRole == -1){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
switch (userRole){
|
||||||
|
// 服务顾问
|
||||||
|
case 2:
|
||||||
|
reqVO.setAdviserId(SecurityFrameworkUtils.getLoginUserId());
|
||||||
|
break;
|
||||||
|
// 班组长
|
||||||
|
case 3:
|
||||||
|
// 查自己是什么班组的组长
|
||||||
|
RepairWorker one = repairWorkerService.getOne(new LambdaQueryWrapper<RepairWorker>().eq(RepairWorker::getUserId, SecurityFrameworkUtils.getLoginUserId()));
|
||||||
|
// 查自己班组的员工信息
|
||||||
|
List<RepairWorker> list = repairWorkerService.list(new LambdaQueryWrapper<RepairWorker>().eq(RepairWorker::getWorkType, one.getWorkType()));
|
||||||
|
// 所有的员工信息
|
||||||
|
List<Long> userIds = list.stream().map(RepairWorker::getUserId).collect(Collectors.toList());
|
||||||
|
reqVO.setUserIds(userIds);
|
||||||
|
break;
|
||||||
|
// 维修工
|
||||||
|
case 4:
|
||||||
|
reqVO.setUserIds(Collections.singletonList(SecurityFrameworkUtils.getLoginUserId()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return baseMapper.getPage(reqVO, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增、修改
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:14 2024/10/15
|
||||||
|
* @param respVO 请求对象
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
@DSTransactional
|
||||||
|
public void updateTicketWares(DlTicketWaresRespVO respVO){
|
||||||
|
// 新增、修改主表
|
||||||
|
// 查询操作人的工人信息
|
||||||
|
RepairWorker one = repairWorkerService.getOne(new LambdaQueryWrapper<RepairWorker>().eq(RepairWorker::getUserId, SecurityFrameworkUtils.getLoginUserId()));
|
||||||
|
respVO.setRepairId(one.getUserId());
|
||||||
|
respVO.setRepairName(one.getUserName());
|
||||||
|
baseMapper.insertOrUpdate(respVO);
|
||||||
|
// 新增、修改子表
|
||||||
|
List<DlTwItem> list = respVO.getItems().stream().map(item -> item.setTwId(respVO.getId())).collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isEmpty(list)){
|
||||||
|
throw exception0(500, "配件列表为空");
|
||||||
|
}
|
||||||
|
twItemService.saveOrUpdateBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:21 2024/10/15
|
||||||
|
* @param id id
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
@DSTransactional
|
||||||
|
public void removeTicketWares(String id){
|
||||||
|
// 删除主表
|
||||||
|
baseMapper.deleteById(id);
|
||||||
|
// 删除子表
|
||||||
|
twItemService.remove(new LambdaQueryWrapper<DlTwItem>().eq(DlTwItem::getTwId, id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,63 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.iocoder.yudao.module.project.entity.RepairWares;
|
||||||
|
import cn.iocoder.yudao.module.project.service.RepairWaresService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import cn.iocoder.yudao.module.tickets.mapper.DlTwItemMapper;
|
||||||
|
import cn.iocoder.yudao.module.tickets.service.DlTwItemService;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTwItemReqVO;
|
||||||
|
import cn.iocoder.yudao.module.tickets.vo.DlTwItemRespVO;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对表【dl_tw_item(工单配件申请/退回子表)】的数据库操作Service实现
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:57 2024/10/15
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class DlTwItemServiceImpl extends ServiceImpl<DlTwItemMapper, DlTwItem>
|
||||||
|
implements DlTwItemService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RepairWaresService repairWaresService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主表查看全部
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:25 2024/10/15
|
||||||
|
* @param reqVO 请求对象
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public List<DlTwItemRespVO> listTwItem(DlTwItemReqVO reqVO){
|
||||||
|
// 查记录
|
||||||
|
List<DlTwItem> dlTwItems = baseMapper.listTwItem(reqVO);
|
||||||
|
// 查配件详情
|
||||||
|
List<String> ids = dlTwItems.stream().map(DlTwItem::getWaresId).collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isNotEmpty(ids)){
|
||||||
|
List<RepairWares> repairWares = repairWaresService.listByIds(ids);
|
||||||
|
return dlTwItems.stream().map(item -> {
|
||||||
|
DlTwItemRespVO bean = BeanUtil.toBean(item, DlTwItemRespVO.class);
|
||||||
|
repairWares.stream()
|
||||||
|
.filter(i -> i.getId().equals(bean.getWaresId()))
|
||||||
|
.findFirst()
|
||||||
|
.ifPresent(bean::setWares);
|
||||||
|
return bean;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回表请求VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:51 2024/10/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DlTicketWaresReqVO extends DlTicketWares {
|
||||||
|
|
||||||
|
/** 查询条件 */
|
||||||
|
private String query;
|
||||||
|
|
||||||
|
/** 查询的时候用,班组长和维修工 */
|
||||||
|
private List<Long> userIds;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回表响应VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:51 2024/10/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DlTicketWaresRespVO extends DlTicketWares {
|
||||||
|
|
||||||
|
/** 子表list */
|
||||||
|
private List<DlTwItem> items;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回子表请求VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:52 2024/10/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DlTwItemReqVO extends DlTwItem {
|
||||||
|
|
||||||
|
/** 查询条件 */
|
||||||
|
private String query;
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package cn.iocoder.yudao.module.tickets.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.project.entity.RepairWares;
|
||||||
|
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单配件申请/退回子表响应VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:52 2024/10/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DlTwItemRespVO extends DlTwItem {
|
||||||
|
|
||||||
|
/** 配件详情 */
|
||||||
|
private RepairWares wares;
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
<?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">
|
||||||
|
<mapper namespace="cn.iocoder.yudao.module.tickets.mapper.DlTicketWaresMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.tickets.entity.DlTicketWares">
|
||||||
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="no" column="no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketId" column="ticket_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="repairId" column="repair_id" />
|
||||||
|
<result property="repairName" column="repair_name" />
|
||||||
|
<result property="adviserId" column="adviser_id" />
|
||||||
|
<result property="adviserName" column="adviser_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_SQL">
|
||||||
|
select
|
||||||
|
dtw.id as id,no,ticket_id,
|
||||||
|
type,status,dtw.remark as remark,
|
||||||
|
dtw.repair_id as repair_id,
|
||||||
|
dtw.repair_name as repair_name,
|
||||||
|
dtw.adviser_id as adviser_id,
|
||||||
|
dtw.adviser_name as adviser_name
|
||||||
|
from dl_ticket_wares dtw
|
||||||
|
left join dl_repair_tickets drt
|
||||||
|
on dtw.ticket_id = drt.id
|
||||||
|
where dtw.deleted = '0'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getPage" resultMap="BaseResultMap">
|
||||||
|
<include refid="Base_SQL" />
|
||||||
|
<if test="map.query != null and map.query != ''">
|
||||||
|
and (
|
||||||
|
dtw.no like concat('%', #{map.query}, '%')
|
||||||
|
or
|
||||||
|
drt.ticket_no like concat('%', #{map.query}, '%')
|
||||||
|
or
|
||||||
|
drt.car_no like concat('%', #{map.query}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="map.type != null and map.type != ''">
|
||||||
|
and (dtw.type = #{map.type})
|
||||||
|
</if>
|
||||||
|
<if test="map.status != null and map.status != ''">
|
||||||
|
and (dtw.status = #{map.status})
|
||||||
|
</if>
|
||||||
|
<if test="map.userIds != null and map.userIds.size > 0">
|
||||||
|
and (
|
||||||
|
dtw.repair_id in
|
||||||
|
<foreach collection="map.userIds" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="map.adviserId != null and map.adviserId != ''">
|
||||||
|
and (dtw.adviser_id = #{map.adviserId})
|
||||||
|
</if>
|
||||||
|
order by dtw.create_time desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,41 @@
|
|||||||
|
<?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">
|
||||||
|
<mapper namespace="cn.iocoder.yudao.module.tickets.mapper.DlTwItemMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.tickets.entity.DlTwItem">
|
||||||
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="twId" column="tw_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="waresId" column="wares_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="waresName" column="wares_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="waresCount" column="wares_count" jdbcType="INTEGER"/>
|
||||||
|
<result property="waresStatus" column="wares_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="isShow" column="is_show" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_SQL">
|
||||||
|
select
|
||||||
|
id,tw_id,wares_id,
|
||||||
|
wares_name,wares_count,wares_status,remark,
|
||||||
|
is_show
|
||||||
|
from dl_tw_item dti
|
||||||
|
where dti.deleted = '0'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="listTwItem" resultMap="BaseResultMap">
|
||||||
|
<include refid="Base_SQL" />
|
||||||
|
<if test="map.twId != null and map.twId != ''">
|
||||||
|
and dti.tw_id = #{map.twId}
|
||||||
|
</if>
|
||||||
|
<if test="map.query != null and map.query != ''">
|
||||||
|
and (
|
||||||
|
dti.wares_name like concat('%', #{map.query}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="map.waresStatus != null and map.waresStatus != ''">
|
||||||
|
and dti.wares_status = #{map.waresStatus}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -111,41 +111,64 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
|||||||
* @param rescueDeptDriver
|
* @param rescueDeptDriver
|
||||||
**/
|
**/
|
||||||
@Override
|
@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);
|
IPage<RescueDeptDriver> driverIPage = baseMapper.selectRescueDeptDriverList(rescueDeptDriver, page);
|
||||||
for (RescueDeptDriver deptDriver : driverIPage.getRecords()) {
|
for (RescueDeptDriver deptDriver : driverIPage.getRecords()) {
|
||||||
DeptRespDTO dept = deptService.getDept(deptDriver.getDeptId());
|
DeptRespDTO dept = deptService.getDept(deptDriver.getDeptId());
|
||||||
deptDriver.setDeptName(dept.getName());
|
deptDriver.setDeptName(dept.getName());
|
||||||
|
|
||||||
String firstDriverIds = deptDriver.getFirstDriverIds();
|
String firstDriverIds = deptDriver.getFirstDriverIds();
|
||||||
if (StringUtils.isNotEmpty(firstDriverIds)) {
|
if (StringUtils.isNotEmpty(firstDriverIds)) {
|
||||||
StringJoiner tempStr = new StringJoiner("|");
|
StringJoiner tempStr = new StringJoiner("|");
|
||||||
String[] driverIds = firstDriverIds.split(",");
|
String[] driverIds = firstDriverIds.split(",");
|
||||||
for (String driverId : driverIds) {
|
for (String driverId : driverIds) {
|
||||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
if (driverInfo != null) {
|
||||||
tempStr.add(sysUser.getNickname());
|
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||||
|
if (sysUser != null) {
|
||||||
|
tempStr.add(sysUser.getNickname());
|
||||||
|
} else {
|
||||||
|
tempStr.add("未知用户");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
deptDriver.setFirstDriverName(tempStr.toString());
|
deptDriver.setFirstDriverName(tempStr.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 对 secondDriverIds 和 thirdDriverIds 进行类似的处理
|
||||||
String secondDriverIds = deptDriver.getSecondDriverIds();
|
String secondDriverIds = deptDriver.getSecondDriverIds();
|
||||||
if (StringUtils.isNotEmpty(secondDriverIds)) {
|
if (StringUtils.isNotEmpty(secondDriverIds)) {
|
||||||
String[] driverIds = secondDriverIds.split(",");
|
|
||||||
StringJoiner tempStr = new StringJoiner("|");
|
StringJoiner tempStr = new StringJoiner("|");
|
||||||
|
String[] driverIds = secondDriverIds.split(",");
|
||||||
for (String driverId : driverIds) {
|
for (String driverId : driverIds) {
|
||||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
if (driverInfo != null) {
|
||||||
tempStr.add(sysUser.getNickname());
|
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||||
|
if (sysUser != null) {
|
||||||
|
tempStr.add(sysUser.getNickname());
|
||||||
|
} else {
|
||||||
|
tempStr.add("未知用户");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
deptDriver.setSecondDriverName(tempStr.toString());
|
deptDriver.setSecondDriverName(tempStr.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 对 thirdDriverIds 进行类似的处理
|
||||||
String thirdDriverIds = deptDriver.getThirdDriverIds();
|
String thirdDriverIds = deptDriver.getThirdDriverIds();
|
||||||
if (StringUtils.isNotEmpty(thirdDriverIds)) {
|
if (StringUtils.isNotEmpty(thirdDriverIds)) {
|
||||||
String[] driverIds = thirdDriverIds.split(",");
|
|
||||||
StringJoiner tempStr = new StringJoiner("|");
|
StringJoiner tempStr = new StringJoiner("|");
|
||||||
|
String[] driverIds = thirdDriverIds.split(",");
|
||||||
for (String driverId : driverIds) {
|
for (String driverId : driverIds) {
|
||||||
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
DriverInfo driverInfo = driverInfoService.getById(driverId);
|
||||||
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
if (driverInfo != null) {
|
||||||
tempStr.add(sysUser.getNickname());
|
AdminUserRespDTO sysUser = userService.getUser(driverInfo.getUserId());
|
||||||
|
if (sysUser != null) {
|
||||||
|
tempStr.add(sysUser.getNickname());
|
||||||
|
} else {
|
||||||
|
tempStr.add("未知用户");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
deptDriver.setThirdDriverName(tempStr.toString());
|
deptDriver.setThirdDriverName(tempStr.toString());
|
||||||
}
|
}
|
||||||
@ -153,6 +176,7 @@ public class RescueDeptDriverServiceImpl extends ServiceImpl<RescueDeptDriverMap
|
|||||||
return driverIPage;
|
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": "",
|
"avatar": "",
|
||||||
"version": "4.9.2",
|
"version": "4.9.2",
|
||||||
"createdTime": "2024-10-9 10:34:15",
|
"createdTime": "2024-10-9 10:34:15",
|
||||||
"updatedTime": "2024-10-12 13:40:15",
|
"updatedTime": "2024-10-14 10:36:09",
|
||||||
"dbConns": [],
|
"dbConns": [],
|
||||||
"profile": {
|
"profile": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -683,7 +683,7 @@
|
|||||||
"optionsFetcher": ""
|
"optionsFetcher": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"menuWidth": "273px"
|
"menuWidth": "286px"
|
||||||
},
|
},
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user