|
|
|
|
@ -124,10 +124,6 @@ public class ErpProductController {
|
|
|
|
|
categorys.add(caDO.getId().intValue());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// categorys.add(ProductTypeEnum.ITEM.getTypeId());
|
|
|
|
|
// categorys.add(ProductTypeEnum.TOOL.getTypeId());
|
|
|
|
|
// categorys.add(ProductTypeEnum.HAOCAI.getTypeId());
|
|
|
|
|
// categorys.add(ProductTypeEnum.GUANJJ.getTypeId());
|
|
|
|
|
List<ErpProductDO> productDOList = productService.selectByCategorys(categorys);
|
|
|
|
|
List<ErpProductRespVO> list = productService.buildProductVOList(productDOList);
|
|
|
|
|
|
|
|
|
|
@ -137,9 +133,18 @@ public class ErpProductController {
|
|
|
|
|
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName())
|
|
|
|
|
.setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice())));
|
|
|
|
|
}
|
|
|
|
|
@GetMapping("/simple-list-component")
|
|
|
|
|
@Operation(summary = "获得备件精简列表", description = "用于前端的下拉选项")
|
|
|
|
|
public CommonResult<List<ErpProductRespVO>> getComponentSimpleList() {
|
|
|
|
|
List<ErpProductRespVO> list = productService.getProductVOListByCategory(ProductTypeEnum.BEIJIAN.getTypeId());
|
|
|
|
|
return success(convertList(list, product -> new ErpProductRespVO().setId(product.getId())
|
|
|
|
|
.setName(product.getName()).setBarCode(product.getBarCode())
|
|
|
|
|
.setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName())
|
|
|
|
|
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName())
|
|
|
|
|
.setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice())));
|
|
|
|
|
}
|
|
|
|
|
@GetMapping("/export-excel")
|
|
|
|
|
@Operation(summary = "导出产品 Excel")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:product:export')")
|
|
|
|
|
@ApiAccessLog(operateType = EXPORT)
|
|
|
|
|
public void exportProductExcel(@Valid ErpProductPageReqVO pageReqVO,
|
|
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
|
|
|