zhangfeng
2023-01-06 c128ed33c2447e8daea89d70795098748bd5b2af
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);
    }
}