diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index 564a4167..c4e307a0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -119,7 +119,8 @@ public class BaseConstants { public static final String REPAIR_RECORD_TYPE_ZJ = "zj"; /**结束工单*/ public static final String REPAIR_RECORD_TYPE_JSGD = "jsgd"; - - - + /** 开始施工 */ + public static final String REPAIR_RECORD_TYPE_KSSG = "kssg"; + /** 施工中 */ + public static final String REPAIR_RECORD_TYPE_SGZ = "sgz"; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTitemController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTitemController.java index b6bbc2fa..072e1a0c 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTitemController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTitemController.java @@ -48,5 +48,18 @@ public class DlRepairTitemController { Page page = new Page<>(pageNo, pageSize); return success(dlRepairTitemService.getTItemPage(repairTitemRespVO, page)); } + + /** + * 获取当前操作人操作的工单中的项目 + * + * @author 小李 + * @date 15:01 2024/10/18 + * @param ticketId 工单ID + **/ + @GetMapping("/listProject") + @Operation(summary = "获取当前操作人操作的工单中的项目") + public CommonResult getProjectList(@RequestParam("ticketId") String ticketId){ + return success(dlRepairTitemService.getProjectList(ticketId)); + } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTitemService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTitemService.java index fea0013d..82bd2045 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTitemService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTitemService.java @@ -6,6 +6,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_repair_titem(维修工单子表)】的数据库操作Service * @@ -22,4 +24,14 @@ public interface DlRepairTitemService extends IService { * @param repairTitemRespVO 查询对象 **/ IPage getTItemPage(DlRepairTitemRespVO repairTitemRespVO, Page page); + + /** + * 获取当前操作人操作的工单中的项目 + * + * @param ticketId 工单ID + * @author 小李 + * @date 15:01 2024/10/18 + **/ + List getProjectList(String ticketId); + } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java index b972b1d2..c2f0a9b5 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java @@ -4,11 +4,14 @@ import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem; import cn.iocoder.yudao.module.tickets.mapper.DlRepairTitemMapper; import cn.iocoder.yudao.module.tickets.service.DlRepairTitemService; import cn.iocoder.yudao.module.tickets.vo.DlRepairTitemRespVO; +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.stereotype.Service; +import java.util.List; + /** * 针对表【dl_repair_titem(维修工单子表)】的数据库操作Service实现 * @@ -30,6 +33,21 @@ public class DlRepairTitemServiceImpl extends ServiceImpl getTItemPage(DlRepairTitemRespVO repairTitemRespVO, Page page){ return baseMapper.getTItemPage(repairTitemRespVO, page); } + + /** + * 获取当前操作人操作的工单中的项目 + * + * @param ticketId 工单ID + * @author 小李 + * @date 15:01 2024/10/18 + **/ + @Override + public List getProjectList(String ticketId){ + return baseMapper.selectList(new LambdaQueryWrapper().and(item -> { + item.eq(DlRepairTitem::getItemType, "01") + .eq(DlRepairTitem::getTicketId, ticketId); + })); + } }