diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableStashController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableStashController.java new file mode 100644 index 0000000..df9d4ea --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableStashController.java @@ -0,0 +1,37 @@ +package digital.laboratory.platform.reagent.controller; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import digital.laboratory.platform.common.core.util.R; +import digital.laboratory.platform.reagent.entity.ReagentConsumableStash; +import digital.laboratory.platform.reagent.service.ReagentConsumableStashService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("reagent_consumable_stash") +@Api(value = "reagent_consumable_stash", tags = "试剂耗材仓库管理") +public class ReagentConsumableStashController { + + @Autowired + private ReagentConsumableStashService reagentConsumableStashService; + + @ApiOperation(value = "分页查询", notes = "分页查询") + @GetMapping + public R> getReagentConsumableStash(Page page, String argument) { + IPage reagentConsumableStashIPage = reagentConsumableStashService.getReagentConsumableStashPage(page, Wrappers.query() + .like(StrUtil.isNotBlank(argument), "reagent_consumable_name", argument) + .ne("total_quantity", 0) + .or() + .like(StrUtil.isNotBlank(argument), "room_no", argument) + .ne("total_quantity", 0)); + return R.ok(reagentConsumableStashIPage); + + } +} diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java new file mode 100644 index 0000000..f175c14 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java @@ -0,0 +1,34 @@ +package digital.laboratory.platform.reagent.dto; + +import com.amazonaws.services.s3.S3ResourceType; +import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDate; + +@Data +public class ReagentConsumableInventoryDTO extends ReagentConsumableInventory { + + + @ApiModelProperty(value = "(位置信息)") + private String location; + + @ApiModelProperty(value="(供应商ID)") + private String supplierId; + + @ApiModelProperty(value="(有效日期)") + private LocalDate expirationDate; + + @ApiModelProperty(value="(生产日期)") + private LocalDate dateOfProduction; + + @ApiModelProperty(value="(房间号)") + private String roomNo; + + private String articleNumber; + + private String packages; + + +} diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableStash.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableStash.java new file mode 100644 index 0000000..7c396f2 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableStash.java @@ -0,0 +1,85 @@ +package digital.laboratory.platform.reagent.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import digital.laboratory.platform.common.mybatis.base.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@TableName(value = "reagent_consumable_stash", autoResultMap = true) +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "试剂耗材仓库") +public class ReagentConsumableStash extends BaseEntity { + + @ApiModelProperty(value="纯度等级") + private String purityGrade; + + @ApiModelProperty(value = "CAS-号") + private String casNumber; + + @ApiModelProperty(value = "物品编码") + private String code; + + @ApiModelProperty(value = "名称") + private String reagentConsumableName; + + @ApiModelProperty(value = "(品牌)") + private String brand; + + @ApiModelProperty(value = "(类别)") + private String category; + + @ApiModelProperty(value = "偏差/不确定度") + private String deviationOrUncertainty; + + @ApiModelProperty(value = "(试剂耗材Id)") + private String reagentConsumableId; + + @ApiModelProperty(value = "(规格型号)") + private String specificationAndModel; + + @ApiModelProperty(value = "(种类)") + private String species; + + @ApiModelProperty(value = "(标准值/纯度)") + private String standardValueOrPurity; + + @ApiModelProperty(value = "(技术参数)") + private String technicalParameter; + + @ApiModelProperty(value = "(总数量)") + private Integer totalQuantity; + + @ApiModelProperty(value = "(包装份数)") + private String packagedCopies; + + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value = "Reagent_consumable_stash") + private String id; + + @ApiModelProperty(value = "单价") + private Double unitPrice; + + @ApiModelProperty(value = "别名") + private String alias; + + @ApiModelProperty(value = "存储条件") + private String storageCondition; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "包装单位") + private String minimumUnit; + + @ApiModelProperty(value = "英文名") + private String englishName; + + @ApiModelProperty(value = "房间号") + private String roomNo; + +} diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableStashMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableStashMapper.java new file mode 100644 index 0000000..9218d2f --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableStashMapper.java @@ -0,0 +1,15 @@ +package digital.laboratory.platform.reagent.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import digital.laboratory.platform.reagent.entity.ReagentConsumableStash; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface ReagentConsumableStashMapper extends BaseMapper { + + IPage getReagentConsumableStashPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableStashService.java b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableStashService.java new file mode 100644 index 0000000..a5b5cc4 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableStashService.java @@ -0,0 +1,13 @@ +package digital.laboratory.platform.reagent.service; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import digital.laboratory.platform.reagent.entity.ReagentConsumableStash; +import org.springframework.stereotype.Service; + + +public interface ReagentConsumableStashService extends IService { + IPage getReagentConsumableStashPage(Page page, QueryWrapper qw); +} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java index 0eff8ac..4932311 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java @@ -2,15 +2,9 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import digital.laboratory.platform.reagent.entity.BatchDetails; -import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; -import digital.laboratory.platform.reagent.entity.ReferenceMaterial; -import digital.laboratory.platform.reagent.entity.SupplierInformation; +import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.BatchDetailsMapper; -import digital.laboratory.platform.reagent.service.BatchDetailsService; -import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService; -import digital.laboratory.platform.reagent.service.ReferenceMaterialService; -import digital.laboratory.platform.reagent.service.SupplierInformationService; +import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.BatchDetailsVO; import digital.laboratory.platform.reagent.vo.ReferenceMaterialVO; import org.springframework.beans.BeanUtils; @@ -38,14 +32,15 @@ public class BatchDetailsServiceImpl extends ServiceImpl getBatchDetailsList(String reagentConsumableInventoryId) { LambdaQueryWrapper batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); - batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId,reagentConsumableInventoryId) - .eq(BatchDetails::getServiceStatus,1); + batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventoryId) + .eq(BatchDetails::getServiceStatus, 1); List list = this.list(batchDetailsLambdaQueryWrapper); @@ -59,7 +54,7 @@ public class BatchDetailsServiceImpl extends ServiceImpl implements ReagentConsumableStashService { + + @Override + public IPage getReagentConsumableStashPage(Page page, QueryWrapper qw) { + + return baseMapper.getReagentConsumableStashPage(page, qw); + } +} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java index 87d0f5c..db37fc6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java @@ -207,7 +207,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file