zhangfeng
2022-12-23 f7d2f20365467a834188edd35c464d9fb9349214
equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/SafeMaterialDetailController.java
@@ -1,6 +1,7 @@
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.vo.ResultVO;
@@ -46,15 +47,7 @@
    public ResultVO update(Authentication authentication,@Validated @RequestBody SafeMaterialDetailReq req){
        return safeMaterialDetailService.update(req);
    }
    /**
     * 单独出入库
     * @param authentication
     * @return
     */
    @PostMapping(value = "/single/delivery0rReceipt")
    public ResultVO singleDdelivery0rReceipt(Authentication authentication, @Validated @RequestBody SafeMaterialDetailReq req){
        return safeMaterialDetailService.singleDdelivery0rReceipt(req);
    }
    /**
     * 单独出库
@@ -63,7 +56,9 @@
     */
    @PostMapping(value = "/single/delivery")
    public ResultVO singleDelivery(Authentication authentication, @Validated @RequestBody SafeMaterialDetailReq req){
        return safeMaterialDetailService.singleDelivery(req);
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        safeMaterialDetailService.singleDelivery(currentUser,req);
        return new ResultVO(ResultCodes.OK);
    }
    /**
@@ -73,8 +68,10 @@
     */
    @PostMapping(value = "/single/receipt")
    public ResultVO singleReceipt(Authentication authentication,@RequestBody JSONObject jsonObject){
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        Long id = jsonObject.getLong("id");
        return safeMaterialDetailService.singleReceipt(id);
        safeMaterialDetailService.singleReceipt(id,currentUser);
        return new ResultVO(ResultCodes.OK);
    }
    /**
     * 批量出库 - 根据ids
@@ -83,8 +80,9 @@
     */
    @PostMapping(value = "/batch/delivery/ids")
    public ResultVO deliveryBatchByIds(Authentication authentication, @Validated @RequestBody MterialDeliveryReq req){
        return safeMaterialDetailService.deliveryBatchByIds(req);
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        safeMaterialDetailService.deliveryBatchByIds(req,currentUser);
        return new ResultVO(ResultCodes.OK);
    }
    /**
     * 批量出库
@@ -93,7 +91,9 @@
     */
    @PostMapping(value = "/batch/delivery/random")
    public ResultVO deliveryBatchRandom(Authentication authentication,@Validated @RequestBody MterialRandomDeliveryReq req){
        return safeMaterialDetailService.deliveryBatchRandom(req);
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        safeMaterialDetailService.deliveryBatchBySmId(req,currentUser);
        return new ResultVO(ResultCodes.OK);
    }
    /**
@@ -101,6 +101,7 @@
     */
    @PostMapping(value = "/batch/receipt")
    public ResultVO receiptBatch(Authentication authentication ,@Validated @RequestBody ParamForm paramForm){
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        return safeMaterialDetailService.receiptBatch(paramForm);
    }
    /**
@@ -121,7 +122,8 @@
     */
    @PostMapping(value = "/deleteBatch")
    public ResultVO deleteBatch(Authentication authentication,@Validated @RequestBody ParamForm paramForm){
        return safeMaterialDetailService.deleteBatch(paramForm);
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        return safeMaterialDetailService.deleteBatch(currentUser,paramForm);
    }
@@ -132,7 +134,8 @@
     */
    @PostMapping(value = "/page/list")
    public SearchResultVO<List<SafeMaterialDetailDto>> listByPage(Authentication authentication, @RequestBody PageQuery<SafeMatetrialDetailQuery> pageQuery){
        return safeMaterialDetailService.listByPage(pageQuery);
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        return safeMaterialDetailService.listByPage(currentUser,pageQuery);
    }
    /**
@@ -155,7 +158,7 @@
        safeMaterialDetailService.deliveryBatchSpw(req);
        return new ResultVO<>(ResultCodes.OK);
    }
 /*   *//**
 /**
     * 根据rfid获去数据
     * @param authentication
     * @return