From 24fa7cc98e04dd04d0a3ca1af6f40a2c05025279 Mon Sep 17 00:00:00 2001
From: SZH <szh_hello@163.com>
Date: 星期五, 24 二月 2023 10:48:14 +0800
Subject: [PATCH] 事故管理 事故快报修改 bugfix

---
 equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/SafeMaterialReceiveRecordsController.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/SafeMaterialReceiveRecordsController.java b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/SafeMaterialReceiveRecordsController.java
index 43f4b22..bbb30a9 100644
--- a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/SafeMaterialReceiveRecordsController.java
+++ b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/SafeMaterialReceiveRecordsController.java
@@ -1,13 +1,13 @@
 package com.gkhy.safePlatform.equipment.controller;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.gkhy.safePlatform.commons.co.ContextCacheUser;
 import com.gkhy.safePlatform.commons.enums.ResultCodes;
 import com.gkhy.safePlatform.commons.query.PageQuery;
 import com.gkhy.safePlatform.commons.utils.PageUtils;
 import com.gkhy.safePlatform.commons.vo.ResultVO;
 import com.gkhy.safePlatform.commons.vo.SearchResultVO;
-import com.gkhy.safePlatform.equipment.entity.MaterialReceiveRecordsBaseDO;
 import com.gkhy.safePlatform.equipment.model.dto.req.MaterialReceiveRecordsBaseReq;
 import com.gkhy.safePlatform.equipment.model.dto.req.MaterialReceiveRecordsQuery;
 import com.gkhy.safePlatform.equipment.model.dto.resp.MaterialReceiveRecordsBaseDto;
@@ -43,4 +43,14 @@
         materialReceiveRecordsService.revertMaterial(currentUser,req);
         return new ResultVO(ResultCodes.OK);
     }
+    /**
+     * 获取单条记录
+     */
+    @RequestMapping("queryById")
+    public ResultVO queryById(Authentication authentication, @RequestBody JSONObject jsonObject){
+        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
+        Long id = jsonObject.getLong("id");
+        MaterialReceiveRecordsBaseDto materialReceiveRecordsBaseDto = materialReceiveRecordsService.queryById(currentUser,id);
+        return new ResultVO(ResultCodes.OK,materialReceiveRecordsBaseDto);
+    }
 }

--
Gitblit v1.9.2