|
|
|
|
@ -12,6 +12,7 @@ import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProduc
|
|
|
|
|
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInPageReqVO;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInRespVO;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInSaveReqVO;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.StockInTypeEnum;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpSupplierDO;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockDO;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInDO;
|
|
|
|
|
@ -25,6 +26,7 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@ -34,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@ -118,6 +121,14 @@ public class ErpStockInController {
|
|
|
|
|
@Operation(summary = "获得其它入库单分页")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-in:query')")
|
|
|
|
|
public CommonResult<PageResult<ErpStockInRespVO>> getStockInPage(@Valid ErpStockInPageReqVO pageReqVO) {
|
|
|
|
|
if(StringUtils.isEmpty(pageReqVO.getInType())){
|
|
|
|
|
List<String> list = new ArrayList<>();
|
|
|
|
|
list.add(StockInTypeEnum.产品入库.getValue());
|
|
|
|
|
list.add(StockInTypeEnum.其他入库.getValue());
|
|
|
|
|
list.add(StockInTypeEnum.原料入库.getValue());
|
|
|
|
|
list.add(StockInTypeEnum.关键件入库.getValue());
|
|
|
|
|
pageReqVO.setInTypeList(list);
|
|
|
|
|
}
|
|
|
|
|
PageResult<ErpStockInDO> pageResult = stockInService.getStockInPage(pageReqVO);
|
|
|
|
|
return success(buildStockInVOPageResult(pageResult));
|
|
|
|
|
}
|
|
|
|
|
@ -162,4 +173,17 @@ public class ErpStockInController {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/createMesStockIn")
|
|
|
|
|
@Operation(summary = "创建其它入库单")
|
|
|
|
|
public CommonResult<Long> createMesStockIn(@Valid @RequestBody ErpStockInSaveReqVO createReqVO) {
|
|
|
|
|
createReqVO.setInType(StockInTypeEnum.生产入库.getValue());
|
|
|
|
|
return success(stockInService.createStockIn(createReqVO));
|
|
|
|
|
}
|
|
|
|
|
@GetMapping("/pageMesStockIn")
|
|
|
|
|
@Operation(summary = "获得其它入库单分页")
|
|
|
|
|
public CommonResult<PageResult<ErpStockInRespVO>> pageMesStockIn(@Valid ErpStockInPageReqVO pageReqVO) {
|
|
|
|
|
pageReqVO.setInType(StockInTypeEnum.生产入库.getValue());
|
|
|
|
|
PageResult<ErpStockInDO> pageResult = stockInService.getStockInPage(pageReqVO);
|
|
|
|
|
return success(buildStockInVOPageResult(pageResult));
|
|
|
|
|
}
|
|
|
|
|
}
|