xuhy
12 小时以前 206fcf7d6afae27856f63cf0158f53b61fa1b86f
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TErpSupplierWarehousingController.java
@@ -8,7 +8,7 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.InventoryDto;
import com.ruoyi.system.dto.InventoryGoodsDto;
import com.ruoyi.system.dto.OutboundGoodsDto;
import com.ruoyi.system.dto.WarehousingGoodsDto;
import com.ruoyi.system.model.TCrmClinic;
import com.ruoyi.system.model.TCrmSupplier;
@@ -18,15 +18,15 @@
import com.ruoyi.system.service.TErpGoodsService;
import com.ruoyi.system.service.TErpSupplierWarehousingService;
import com.ruoyi.system.vo.*;
import com.ruoyi.web.core.config.LakalaAlipayConfig;
import com.ruoyi.web.core.config.LakalaConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
import java.util.stream.Collectors;
/**
 * <p>
@@ -66,9 +66,9 @@
    @PostMapping(value = "/pageList")
    public R<PageInfo<TErpGoodsVO>> pageList(@RequestBody TErpGoodsQuery query) {
        V3LabsTransPreorderRequest request = new V3LabsTransPreorderRequest();
        request.setLklAppId(LakalaAlipayConfig.appId);
        request.setMerchantNo(LakalaAlipayConfig.MerchantNo);
        request.setTermNo(LakalaAlipayConfig.TermNo);
        request.setLklAppId(LakalaConfig.appId);
        request.setMerchantNo(LakalaConfig.MerchantNo);
        request.setTermNo(LakalaConfig.TermNo);
        SysUser user = tokenService.getLoginUser().getUser();
        Integer roleType = user.getRoleType();
@@ -117,6 +117,14 @@
        return R.ok();
    }
    @ApiOperation(value = "供应商库存出库")
    @PostMapping(value = "/outbountGoods")
    public R<?> outbountGoods(@RequestBody @Valid OutboundGoodsDto dto) {
        SysUser user = tokenService.getLoginUser().getUser();
        erpSupplierWarehousingService.outbountGoods(dto,user);
        return R.ok();
    }
    @ApiOperation(value = "有效期预警")
    @PostMapping(value = "/validityPeriodWarning")
@@ -145,12 +153,22 @@
    }
    @ApiOperation(value = "供应商 盘点 商品选择")
    @ApiOperation(value = "供应商 盘点 出库 商品选择")
    @PostMapping(value = "/pageInventoryGoodsPageList")
    public R<PageInfo<TErpGoodsInventoryVO>> pageInventoryGoodsPageList(@RequestBody @Valid TErpGoodsInventoryQuery query) {
        SysUser user = tokenService.getLoginUser().getUser();
        return R.ok(erpGoodsService.pageInventoryGoodsPageList(query,user));
    }
    @ApiOperation(value = "有效期预警商品选择")
    @GetMapping(value = "/pageInventoryGoodsList")
    public R<List<TErpGoodsInventoryVO>> pageInventoryGoodsList(@RequestParam String warehouseId,@RequestParam(required = false)String batchNumber) {
        SysUser user = tokenService.getLoginUser().getUser();
        List<TErpGoodsInventoryVO> tErpGoodsInventoryVOS = erpGoodsService.pageInventoryGoodsList(warehouseId, user);
        if(batchNumber!=null && !"".equals(batchNumber)){
            tErpGoodsInventoryVOS = tErpGoodsInventoryVOS.stream().filter(e->e.getBatchNumber().equals(batchNumber)).collect(Collectors.toList());
        }
        return R.ok(tErpGoodsInventoryVOS);
    }
    @ApiOperation(value = "供应商 确认盘点")
    @PostMapping(value = "/inventoryGoods")