| | |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | public CommonResult<SrmSupplierRespVO> getSupplier(@RequestParam("id") Long id) { |
| | | SrmSupplierDO supplier = supplierService.getSupplier(id); |
| | | return success(BeanUtils.toBean(supplier, SrmSupplierRespVO.class)); |
| | | SrmSupplierRespVO respVO = BeanUtils.toBean(supplier, SrmSupplierRespVO.class); |
| | | if (respVO != null) { |
| | | respVO.setContacts(BeanUtils.toBean(supplierService.getSupplierContactList(id), |
| | | SrmSupplierContactRespVO.class)); |
| | | respVO.setBanks(BeanUtils.toBean(supplierService.getSupplierBankList(id), |
| | | SrmSupplierBankRespVO.class)); |
| | | } |
| | | return success(respVO); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | |
| | | } |
| | | |
| | | @GetMapping("/simple-list") |
| | | @Operation(summary = "获取供应商精简列表(仅返回已通过准入审批的供应商)") |
| | | @Operation(summary = "获取供应商精简列表(仅返回启用状态的供应商)") |
| | | public CommonResult<List<SrmSupplierRespVO>> getSupplierSimpleList() { |
| | | List<SrmSupplierDO> list = supplierService.getSupplierSimpleList(); |
| | | return success(BeanUtils.toBean(list, SrmSupplierRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @Operation(summary = "获取供应商档案列表(不过滤准入状态)") |
| | | @Operation(summary = "获取供应商档案列表(排除停用供应商)") |
| | | public CommonResult<List<SrmSupplierRespVO>> getSupplierAllList() { |
| | | List<SrmSupplierDO> list = supplierService.getSupplierAllList(); |
| | | return success(BeanUtils.toBean(list, SrmSupplierRespVO.class)); |