diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java index c3536e16..be4b75ce 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java @@ -130,7 +130,7 @@ public class RepairWaresController { * @date 10:51 2024/10/22 **/ @GetMapping("/getAllTypeList") - @Operation(summary = "查询所有有配件的分配") + @Operation(summary = "查询所有有配件的分类") public CommonResult getAllTypeList() { return success(waresService.getAllTypeList()); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java index 424d0480..03e57c03 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java @@ -436,7 +436,8 @@ public class DlTicketWaresServiceImpl extends ServiceImpl getWorkerTodo() { LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() - .eq(DlTicketWares::getRepairId,loginUser.getId()); + .eq(DlTicketWares::getRepairId,loginUser.getId()) + .eq(DlTicketWares::getType,"01"); List list = this.list(queryWrapper); Map rtnMap = new HashMap<>(); //所有提交的 diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTwItemServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTwItemServiceImpl.java index 49f9c3c8..8975a29f 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTwItemServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTwItemServiceImpl.java @@ -10,13 +10,14 @@ import cn.iocoder.yudao.module.tickets.service.DlTicketWaresService; 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.context.annotation.Lazy; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -35,6 +36,9 @@ public class DlTwItemServiceImpl extends ServiceImpl @Resource @Lazy private DlTicketWaresService ticketWaresService; + @Resource + @Lazy + private RepairWaresService waresService; /** * 根据主表查看全部 @@ -47,6 +51,12 @@ public class DlTwItemServiceImpl extends ServiceImpl public List listTwItem(DlTwItemReqVO reqVO){ // 查记录 List dlTwItems = baseMapper.listTwItem(reqVO); + //所有有配件的分类 + List> typeMapList = waresService.getAllTypeList(); + Map typeMap = new HashMap<>(); + for(Map map:typeMapList){ + typeMap.put(map.get("id"),map.get("name")); + } // 查配件详情 List ids = dlTwItems.stream().map(DlTwItem::getWaresId).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(ids)){ @@ -57,6 +67,7 @@ public class DlTwItemServiceImpl extends ServiceImpl .filter(i -> i.getId().equals(bean.getWaresId())) .findFirst() .ifPresent(bean::setWares); + bean.setTypeName(typeMap.get(bean.getWares().getType())); return bean; }).collect(Collectors.toList()); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlTwItemRespVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlTwItemRespVO.java index 154bf7b3..64a623cb 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlTwItemRespVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlTwItemRespVO.java @@ -15,4 +15,6 @@ public class DlTwItemRespVO extends DlTwItem { /** 配件详情 */ private RepairWares wares; + /** 配件分类名称 */ + private String typeName; } diff --git a/dl-module-repair/src/main/resources/mapper/stockOperate/DlRepairSoMapper.xml b/dl-module-repair/src/main/resources/mapper/stockOperate/DlRepairSoMapper.xml index 4219b29f..beb00091 100644 --- a/dl-module-repair/src/main/resources/mapper/stockOperate/DlRepairSoMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/stockOperate/DlRepairSoMapper.xml @@ -72,9 +72,6 @@ and so.supplier_id = #{map.supplierId} - - and so.so_status = #{map.soStatus} - and so.corp_id = #{map.corpId} diff --git a/dl-module-repair/src/main/resources/mapper/tickets/DlTicketWaresMapper.xml b/dl-module-repair/src/main/resources/mapper/tickets/DlTicketWaresMapper.xml index 414979a8..9dcf92d0 100644 --- a/dl-module-repair/src/main/resources/mapper/tickets/DlTicketWaresMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/tickets/DlTicketWaresMapper.xml @@ -16,6 +16,7 @@ + @@ -26,7 +27,8 @@ dtw.repair_name as repair_name, dtw.adviser_id as adviser_id, dtw.adviser_name as adviser_name, - dtw.license_number + dtw.license_number as license_number, + dtw.create_time as create_time from dl_ticket_wares dtw left join dl_repair_tickets drt on dtw.ticket_id = drt.id