From 461ca6f4ce0315f4b826af120b7596eaad3ad297 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Fri, 5 Jan 2024 10:04:52 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E7=AC=AC=E4=B8=80=E7=A7=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=A5=A8=E7=BA=BF=E4=B8=8B=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/ticket/repair/fegin/IWorkTaskClient.java | 4 ++-- .../controller/WorkTicketFinishController.java | 19 +++++++++++++++++++ .../ticket/twoTicket/entity/WorkTicketFinish.java | 8 ++++---- .../service/impl/FirstWorkTicketServiceImpl.java | 17 ++++++++++++++--- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/fegin/IWorkTaskClient.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/fegin/IWorkTaskClient.java index f36fab3..995a64b 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/fegin/IWorkTaskClient.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/fegin/IWorkTaskClient.java @@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestBody; * @author ysj */ @FeignClient( - value = TicketConstants.APP_NAME, - fallback = RepairClientFallback.class + value = TicketConstants.APP_NAME//, + //fallback = RepairClientFallback.class ) public interface IWorkTaskClient { diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java index 80ce24f..366c825 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java @@ -1,9 +1,19 @@ package com.hnac.hzims.ticket.twoTicket.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.hnac.hzims.common.utils.Condition; +import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish; +import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService; +import lombok.AllArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.BeanUtil; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** *

* 工作结束 前端控制器 @@ -14,7 +24,16 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("/p/work-ticket-finish") +@AllArgsConstructor public class WorkTicketFinishController { + private final IWorkTicketFinishService finishService; + + @GetMapping("/list") + public R> list (WorkTicketFinish req) { + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(WorkTicketFinish.class, req); + return R.data(finishService.list(queryWrapper)); + } + } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java index f0819e9..8254d15 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java @@ -1,14 +1,13 @@ package com.hnac.hzims.ticket.twoTicket.entity; -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 com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import org.springblade.core.mp.support.QueryField; +import org.springblade.core.mp.support.SqlCondition; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; @@ -40,6 +39,7 @@ public class WorkTicketFinish implements Serializable { * 工作票编号 */ @ApiModelProperty("工作票编号") + @QueryField(condition = SqlCondition.EQUAL) @TableField("ticket_id") private Long ticketId; diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java index 97f7589..6d2ea88 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java @@ -371,12 +371,23 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl