|
|
|
@ -146,7 +146,7 @@ public class ReagentConsumableInventoryController { |
|
|
|
|
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表") |
|
|
|
|
@GetMapping("/List") |
|
|
|
|
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
|
|
|
|
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, Integer warning, String remark, String category,HttpServletRequest theHttpServletRequest) { |
|
|
|
|
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, Integer warning, String remark, String category, HttpServletRequest theHttpServletRequest) { |
|
|
|
|
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
|
|
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
|
|
|
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, Wrappers.<ReagentConsumableInventory>query() |
|
|
|
@ -192,24 +192,24 @@ public class ReagentConsumableInventoryController { |
|
|
|
|
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表") |
|
|
|
|
@GetMapping("/MList") |
|
|
|
|
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
|
|
|
|
public R<IPage<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { |
|
|
|
|
public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumablePage(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { |
|
|
|
|
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
|
|
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
|
|
|
|
|
|
|
|
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper |
|
|
|
|
.eq("category", "试剂") |
|
|
|
|
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() |
|
|
|
|
.eq("category", "试剂") |
|
|
|
|
.like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or() |
|
|
|
|
.eq("category", "耗材") |
|
|
|
|
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() |
|
|
|
|
.eq("category", "耗材") |
|
|
|
|
.like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.ok(allRM); |
|
|
|
|
IPage reagentConsumablePage = reagentConsumableInventoryMapper.getReagentConsumablePage(page, reagentConsumableName); |
|
|
|
|
|
|
|
|
|
// IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper
|
|
|
|
|
// .eq("category", "试剂")
|
|
|
|
|
// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
|
|
|
|
|
// .eq("category", "试剂")
|
|
|
|
|
// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or()
|
|
|
|
|
// .eq("category", "耗材")
|
|
|
|
|
// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
|
|
|
|
|
// .eq("category", "耗材")
|
|
|
|
|
// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName));
|
|
|
|
|
return R.ok(reagentConsumablePage); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -220,11 +220,11 @@ public class ReagentConsumableInventoryController { |
|
|
|
|
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表") |
|
|
|
|
@GetMapping("/full") |
|
|
|
|
// @PreAuthorize("@pms.hasPermission(' ')")
|
|
|
|
|
public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(Page page,String category, String name, HttpServletRequest theHttpServletRequest) { |
|
|
|
|
public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(Page page, String category, String name, HttpServletRequest theHttpServletRequest) { |
|
|
|
|
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
|
|
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
|
|
|
|
|
|
|
|
IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page,name,category); |
|
|
|
|
IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page, name, category); |
|
|
|
|
|
|
|
|
|
return R.ok(fullVOPage); |
|
|
|
|
} |
|
|
|
@ -357,6 +357,20 @@ public class ReagentConsumableInventoryController { |
|
|
|
|
return R.ok(byCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 天平专用 |
|
|
|
|
* 通过扫码,获取标准物质所有信息 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "通过编号,获取标准物质所有信", notes = "通过编号,获取标准物质所有信息") |
|
|
|
|
@GetMapping("/getByNo") |
|
|
|
|
public R<ReagentConsumableInventoryFullVO> getByNo(String number) { |
|
|
|
|
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number)); |
|
|
|
|
if (referenceMaterial != null) { |
|
|
|
|
return R.ok(reagentConsumableInventoryService.getByCode(referenceMaterial.getId())); |
|
|
|
|
} else { |
|
|
|
|
return R.failed("未能查询到该标准物质的详细信息"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取用户列表 |
|
|
|
|