1111
This commit is contained in:
parent
4ad6d6835b
commit
a76a198161
@ -46,6 +46,19 @@ public class DlTicketWaresController {
|
||||
return success(dlTicketWaresService.getPage(reqVO, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前工单下的配件申请单
|
||||
* @author PQZ
|
||||
* @date 13:43 2024/10/19
|
||||
* @param reqVO DlTicketWaresReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
**/
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "不分页查询待审批的配件申请单")
|
||||
public CommonResult<?> list(DlTicketWaresReqVO reqVO){
|
||||
return success(dlTicketWaresService.listByTicket(reqVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增、修改
|
||||
*
|
||||
|
@ -7,6 +7,8 @@ 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;
|
||||
|
||||
/**
|
||||
* 针对表【dl_ticket_wares(工单配件申请/退回表)】的数据库操作Service
|
||||
*
|
||||
@ -24,6 +26,15 @@ public interface DlTicketWaresService extends IService<DlTicketWares> {
|
||||
**/
|
||||
IPage<DlTicketWares> getPage(DlTicketWaresReqVO reqVO, Page<DlTicketWares> page);
|
||||
|
||||
/**
|
||||
* 查询当前工单下的配件申请单
|
||||
* @author PQZ
|
||||
* @date 13:44 2024/10/19
|
||||
* @param reqVO DlTicketWaresReqVO
|
||||
* @return java.util.List<cn.iocoder.yudao.module.tickets.entity.DlTicketWares>
|
||||
**/
|
||||
List<DlTicketWares> listByTicket(DlTicketWaresReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 新增、修改
|
||||
*
|
||||
|
@ -33,6 +33,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@ -120,6 +121,31 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
return baseMapper.getPage(reqVO, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前工单下的配件申请单
|
||||
*
|
||||
* @param reqVO DlTicketWaresReqVO
|
||||
* @return java.util.List<cn.iocoder.yudao.module.tickets.entity.DlTicketWares>
|
||||
* @author PQZ
|
||||
* @date 13:44 2024/10/19
|
||||
**/
|
||||
@Override
|
||||
public List<DlTicketWares> listByTicket(DlTicketWaresReqVO reqVO) {
|
||||
// 确认查看者身份
|
||||
String userRoleCode = repairTicketsService.getUserRole();
|
||||
List<DlTicketWares> result = new ArrayList<>();
|
||||
//维修业务管理员、总检、服务顾问均可以进行审批
|
||||
if (userRoleCode.equals(RepairRoleEnum.ADMIN.getCode())|| userRoleCode.equals(RepairRoleEnum.INSPECTION.getCode())||userRoleCode.equals(RepairRoleEnum.ADVISOR.getCode())){
|
||||
LambdaQueryWrapper<DlTicketWares> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(DlTicketWares::getTicketId,reqVO.getTicketId());
|
||||
if (null != reqVO.getStatus()){
|
||||
lambdaQueryWrapper.eq(DlTicketWares::getStatus,reqVO.getStatus());
|
||||
}
|
||||
result = list(lambdaQueryWrapper);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增、修改
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user