diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java index 24e0f19..8f8ac4d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java @@ -13,9 +13,9 @@ import digital.laboratory.platform.common.oss.service.OssFile; import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; +import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper; import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService; import digital.laboratory.platform.reagent.service.ReferenceMaterialService; -import digital.laboratory.platform.reagent.utils.QRCodeUtils; import digital.laboratory.platform.reagent.vo.*; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; @@ -24,10 +24,8 @@ import lombok.RequiredArgsConstructor; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.web.bind.annotation.*; -import javax.imageio.ImageIO; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.awt.image.BufferedImage; import java.io.IOException; import java.security.Principal; import java.util.List; @@ -57,6 +55,8 @@ public class ReagentConsumableInventoryController { private final OssFile ossFile; + private final ReagentConsumableInventoryMapper reagentConsumableInventoryMapper; + /** * 通过id查询试剂耗材库存 * @@ -93,10 +93,10 @@ public class ReagentConsumableInventoryController { referenceMaterialQueryWrapper .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) - .ne(referenceMaterialStatus==null,"status",-4) + .ne(referenceMaterialStatus == null, "status", -4) .eq(referenceMaterialStatus != null, "status", referenceMaterialStatus) .or() - .ne(referenceMaterialStatus==null,"status",-4) + .ne(referenceMaterialStatus == null, "status", -4) .like(StrUtil.isNotBlank(reagentConsumableName), "number", reagentConsumableName) .eq(referenceMaterialStatus != null, "status", referenceMaterialStatus); @@ -214,15 +214,13 @@ public class ReagentConsumableInventoryController { @ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表") @GetMapping("/full") // @PreAuthorize("@pms.hasPermission(' ')") - public R> getReagentConsumableInventoryFull(String category, String name, HttpServletRequest theHttpServletRequest) { + public R> getReagentConsumableInventoryFull(Page page,String category, String name, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - List reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(Wrappers.query() - .eq((StrUtil.isNotBlank(category)), "category", category) - .like((StrUtil.isNotBlank(name)), "reagent_consumable_name", name)); + IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page,name,category); - return R.ok(reagentConsumableInventoryFull); + return R.ok(fullVOPage); } @@ -376,5 +374,14 @@ public class ReagentConsumableInventoryController { } +// @PostMapping("org") +// public R> getOrgList(HttpServletResponse httpServletResponse) { +// +// List orgList = reagentConsumableInventoryService.getOrgList(); +// +// return R.ok(orgList); +// +// } + } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java b/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java index 5a415db..2863314 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java @@ -1,6 +1,7 @@ package digital.laboratory.platform.reagent.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import digital.laboratory.platform.common.mybatis.base.BaseEntity; @@ -89,6 +90,7 @@ public class BatchDetails extends BaseEntity { private String roomNo; @ApiModelProperty(value="试剂耗材名称") + @TableField(exist = false) private String reagentConsumableName; @ApiModelProperty(value="试剂耗材仓库ID") diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java index 57a7756..aa2d313 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java @@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; -import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO; -import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO; -import digital.laboratory.platform.reagent.vo.ReferenceMaterialFullVO; -import digital.laboratory.platform.reagent.vo.UserVO; +import digital.laboratory.platform.reagent.vo.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -26,8 +23,10 @@ public interface ReagentConsumableInventoryMapper extends BaseMapper getReagentConsumableInventoryVOPage (IPagepage, @Param(Constants.WRAPPER) QueryWrapper qw); IPage getReagentConsumableInventoryFullVOPage (IPagepage, @Param(Constants.WRAPPER) QueryWrapper qw); + IPage getFullVOPage (IPagepage, @Param("name") String name,@Param("category") String category); List getUserList(); + List getOrgList(); IPage getReferenceMaterialPage (IPagepage, @Param (Constants.WRAPPER) QueryWrapper qw); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java index 9007294..79f4544 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java @@ -59,4 +59,6 @@ public interface ReagentConsumableInventoryService extends IService getOrgList(); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java index 47b487e..e195126 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java @@ -27,7 +27,6 @@ import digital.laboratory.platform.sys.entity.CabinetCell; import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; import digital.laboratory.platform.sys.feign.RemoteCabinetService; import feign.Response; -import io.seata.spring.annotation.GlobalTransactional; import org.apache.commons.io.output.ByteArrayOutputStream; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -283,6 +282,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImplquery() .eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) - .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()),"brand", reagentConsumableInventoryDTO.getBrand()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()) .eq("category", reagentConsumableInventoryDTO.getCategory()) - .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()),"specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()), "specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity()), "standard_value_or_purity", reagentConsumableInventoryDTO.getStandardValueOrPurity()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies()) @@ -669,7 +671,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImplquery() .eq("room_no", reagentConsumableInventoryDTO.getRoomNo()) .eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId())); @@ -712,6 +714,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl getOrgList() { +// +// List orgList = baseMapper.getOrgList(); +// ArrayList orgFullVOS = new ArrayList<>(); +// for (OrgVO orgVO : orgList) { +// if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("county")) { +// OrgFullVO orgFullVO = new OrgFullVO(); +// orgFullVO.setUsername("X" + orgVO.getAreaCode()); +// String[] roles = {"10015", "10020"}; +// orgFullVO.setRoleIds(roles); +// orgFullVO.setPassword("123456"); +// orgFullVO.setOrgId(orgVO.getOrgId()); +// orgFullVOS.add(orgFullVO); +// } +// +// } +// return orgFullVOS; +// } } diff --git a/src/main/resources/bootstrap.yml b/src/main/resources/bootstrap.yml index 4a9a844..9074e01 100644 --- a/src/main/resources/bootstrap.yml +++ b/src/main/resources/bootstrap.yml @@ -58,8 +58,8 @@ spring: # 文件上传相关 支持阿里云、华为云、腾讯、minio oss: - endpoint: http://192.168.9.74:9000 - accessKey: admin + endpoint: http://127.0.0.1:9000 + accessKey: dlp secretKey: 87990016 bucket-name: dlpfiles diff --git a/src/main/resources/mapper/BatchDetailsMapper.xml b/src/main/resources/mapper/BatchDetailsMapper.xml index 98081aa..7f299a0 100644 --- a/src/main/resources/mapper/BatchDetailsMapper.xml +++ b/src/main/resources/mapper/BatchDetailsMapper.xml @@ -32,7 +32,6 @@ - diff --git a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml index 00f12a2..38e3de1 100644 --- a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml +++ b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml @@ -50,11 +50,36 @@ from reagent_consumable_inventory ${ew.customSqlSegment} + + + + + +