@ -16,6 +16,7 @@ import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO;
import digital.laboratory.platform.reagent.entity.BatchDetails ;
import digital.laboratory.platform.reagent.entity.BatchDetails ;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory ;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory ;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial ;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial ;
import digital.laboratory.platform.reagent.entity.StatisticalCornerMark ;
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper ;
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper ;
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService ;
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService ;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService ;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService ;
@ -71,11 +72,8 @@ public class ReagentConsumableInventoryController {
@GetMapping ( "/{reagentConsumableInventoryId}" )
@GetMapping ( "/{reagentConsumableInventoryId}" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R < ReagentConsumableInventory > getById ( @PathVariable ( "reagentConsumableInventoryId" ) String reagentConsumableInventoryId , HttpServletRequest theHttpServletRequest ) {
public R < ReagentConsumableInventory > getById ( @PathVariable ( "reagentConsumableInventoryId" ) String reagentConsumableInventoryId , HttpServletRequest theHttpServletRequest ) {
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService . getById ( reagentConsumableInventoryId ) ;
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService . getById ( reagentConsumableInventoryId ) ;
return R . ok ( reagentConsumableInventory ) ;
return R . ok ( reagentConsumableInventory ) ;
//return R.ok(reagentConsumableInventoryService.getById(reagentConsumableInventoryId));
}
}
@ -86,111 +84,35 @@ public class ReagentConsumableInventoryController {
@ApiOperation ( value = "标准物质列表" , notes = "标准物质列表" )
@ApiOperation ( value = "标准物质列表" , notes = "标准物质列表" )
@GetMapping ( "/RList" )
@GetMapping ( "/RList" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R < IPage < ReferenceMaterialFullVO > > getReagentConsumableInventoryPage ( Page page , String reagentConsumableName , Integer referenceMaterialStatus , HttpServletRequest theHttpServletRequest ) {
public R < IPage < ReferenceMaterialFullVO > > getReagentConsumableInventoryPage ( Page page , String reagentConsumableName , Integer referenceMaterialStatus ) {
Principal principal = theHttpServletRequest . getUserPrincipal ( ) ;
DLPUser dlpUser = ( DLPUser ) ( ( OAuth2Authentication ) principal ) . getUserAuthentication ( ) . getPrincipal ( ) ;
QueryWrapper < ReferenceMaterial > referenceMaterialQueryWrapper = new QueryWrapper < > ( ) ;
QueryWrapper < ReferenceMaterial > referenceMaterialQueryWrapper = new QueryWrapper < > ( ) ;
String number = reagentConsumableName ;
String number = reagentConsumableName ;
referenceMaterialQueryWrapper
referenceMaterialQueryWrapper
. and ( qw - > qw
. ne ( referenceMaterialStatus = = null , "status" , - 4 )
. eq ( referenceMaterialStatus ! = null , "status" , referenceMaterialStatus ) )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. ne ( referenceMaterialStatus = = null , "status" , - 4 )
. eq ( referenceMaterialStatus ! = null , "status" , referenceMaterialStatus )
. or ( )
. or ( )
. ne ( referenceMaterialStatus = = null , "status" , - 4 )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "number" , reagentConsumableName ) ;
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "number" , reagentConsumableName )
. eq ( referenceMaterialStatus ! = null , "status" , referenceMaterialStatus ) ;
IPage < ReferenceMaterialFullVO > allList = reagentConsumableInventoryService . getAllList ( page , referenceMaterialQueryWrapper , referenceMaterialStatus , number ) ;
IPage < ReferenceMaterialFullVO > allList = reagentConsumableInventoryService . getStandardAllList ( page , referenceMaterialQueryWrapper , referenceMaterialStatus , number ) ;
return R . ok ( allList ) ;
return R . ok ( allList ) ;
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
}
@ApiOperation ( value = "标准物质管理列表" , notes = "标准物质管理列表" )
@ApiOperation ( value = "标准物质管理列表" , notes = "标准物质管理列表" )
@GetMapping ( "/standardList" )
@GetMapping ( "/standardList" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R < IPage < ReagentConsumableInventoryVO > > getStandardList ( Page page , Integer warning , String keywords ) {
public R < IPage < ReagentConsumableInventoryVO > > getReagentConsumableInventoryList ( Page < ReagentConsumableInventory > page , Integer warning , String reagentConsumableName , HttpServletRequest theHttpServletRequest ) {
IPage < ReagentConsumableInventoryVO > reagentConsumableInventoryRMVOList = reagentConsumableInventoryService . getReagentConsumableInventoryRMVOList ( page , warning , keywords ) ;
Principal principal = theHttpServletRequest . getUserPrincipal ( ) ;
DLPUser dlpUser = ( DLPUser ) ( ( OAuth2Authentication ) principal ) . getUserAuthentication ( ) . getPrincipal ( ) ;
IPage < ReagentConsumableInventoryVO > reagentConsumableInventoryRMVOList = reagentConsumableInventoryService . getReagentConsumableInventoryRMVOList ( page ,
Wrappers . < ReagentConsumableInventory > query ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "标准物质" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "remark" , reagentConsumableName )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "标准物质" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "标准储备溶液" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "remark" , reagentConsumableName )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "标准储备溶液" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "species" , reagentConsumableName )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "标准物质" ) . or ( ) .
like ( StrUtil . isNotBlank ( reagentConsumableName ) , "species" , reagentConsumableName )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "标准储备溶液" ) . or ( ) , warning ) ;
return R . ok ( reagentConsumableInventoryRMVOList ) ;
return R . ok ( reagentConsumableInventoryRMVOList ) ;
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
}
@ApiOperation ( value = "试剂耗材管理列表" , notes = "试剂耗材管理列表" )
@ApiOperation ( value = "试剂耗材管理列表" , notes = "试剂耗材管理列表" )
@GetMapping ( "/List" )
@GetMapping ( "/List" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R < IPage < ReagentConsumableInventoryVO > > getList ( Page page , Integer warning , String keywords ) {
public R < IPage < ReagentConsumableInventoryVO > > getList ( Page page , String reagentConsumableName , Integer warning , String remark , String category , HttpServletRequest theHttpServletRequest ) {
IPage < ReagentConsumableInventoryVO > reagentConsumableInventoryRMVOList = reagentConsumableInventoryService . getReagentConsumableInventoryREVOList ( page , warning , keywords ) ;
Principal principal = theHttpServletRequest . getUserPrincipal ( ) ;
DLPUser dlpUser = ( DLPUser ) ( ( OAuth2Authentication ) principal ) . getUserAuthentication ( ) . getPrincipal ( ) ;
IPage < ReagentConsumableInventoryVO > reagentConsumableInventoryRMVOList = reagentConsumableInventoryService . getReagentConsumableInventoryREVOList ( page , Wrappers . < ReagentConsumableInventory > query ( )
// .like(StrUtil.isNotBlank(category), "category", category)
// .ne("category", "标准物质")
// .ne("category", "标准储备溶液")
// .and(qw -> qw.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
// .or().like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName))
// .like(warning != null && warning == 1, "warning_information", "库存不足"), warning);
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( category ) , "category" , category )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "试剂" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "remark" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( category ) , "category" , category )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "试剂" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( category ) , "category" , category )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "耗材" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "remark" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( category ) , "category" , category )
. like ( warning ! = null & & warning = = 1 , "warning_information" , "库存不足" )
. eq ( "category" , "耗材" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "reagent_consumable_name" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( category ) , "category" , category )
. like ( warning ! = null & & warning = = 1 , "species" , "库存不足" )
. eq ( "category" , "试剂" ) . or ( )
. like ( StrUtil . isNotBlank ( reagentConsumableName ) , "remark" , reagentConsumableName )
. like ( StrUtil . isNotBlank ( category ) , "category" , category )
. like ( warning ! = null & & warning = = 1 , "species" , "库存不足" )
. eq ( "category" , "耗材" ) . or ( ) , warning ) ;
return R . ok ( reagentConsumableInventoryRMVOList ) ;
return R . ok ( reagentConsumableInventoryRMVOList ) ;
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
}
/ * *
/ * *
@ -323,7 +245,7 @@ public class ReagentConsumableInventoryController {
*
*
* @param id id
* @param id id
* /
* /
@ApiOperation ( value = "" , notes = "通过id,获取标准物质所有信息" )
@ApiOperation ( value = "" , notes = "通过id或者code(也就是标准物质编号) ,获取标准物质所有信息" )
@GetMapping ( "/getByCode" )
@GetMapping ( "/getByCode" )
@PreAuthorize ( "@pms.hasPermission('reagent_reagent_consumable_inventory_get_by_code')" )
@PreAuthorize ( "@pms.hasPermission('reagent_reagent_consumable_inventory_get_by_code')" )
public R < ReagentConsumableInventoryFullVO > getByCode ( String id , String number , HttpServletResponse httpServletResponse ) {
public R < ReagentConsumableInventoryFullVO > getByCode ( String id , String number , HttpServletResponse httpServletResponse ) {
@ -424,4 +346,10 @@ public class ReagentConsumableInventoryController {
return R . failed ( "导出失败" ) ;
return R . failed ( "导出失败" ) ;
}
}
}
}
@GetMapping ( "/get/statistical/mark" )
public R < List < StatisticalCornerMark > > getStatisticalCornerMarkList ( ) {
return R . ok ( reagentConsumableInventoryService . getStatisticalCornerMarkList ( ) ) ;
}
}
}