修改了一些BUG

main
杨海航 1 year ago
parent 7dc13d1e0d
commit 425ad68bca
  1. 14
      pom.xml
  2. 1
      src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java
  3. 5
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  4. 22
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  5. 2
      src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumableInventoryFullVO.java

@ -184,6 +184,12 @@
<version>2022.10.11-snapshots</version> <version>2022.10.11-snapshots</version>
</dependency> </dependency>
<dependency>
<groupId>com.deepoove</groupId>
<artifactId>poi-tl</artifactId>
<version>1.12.0</version>
</dependency>
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>digital.laboratory.platform</groupId>--> <!-- <groupId>digital.laboratory.platform</groupId>-->
<!-- <artifactId>dlp-common-seata</artifactId>--> <!-- <artifactId>dlp-common-seata</artifactId>-->
@ -198,14 +204,6 @@
</dependency> </dependency>
<!-- poi-tl word 模板处理器 http://deepoove.com/poi-tl -->
<dependency>
<groupId>com.deepoove</groupId>
<artifactId>poi-tl</artifactId>
<version>1.12.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -476,7 +476,6 @@ public class PurchaseCatalogueController {
ossFile.fileSave("document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf", isPDF); ossFile.fileSave("document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
isPDF.close(); isPDF.close();
System.out.println(String.format("转换为 PDF 结束")); System.out.println(String.format("转换为 PDF 结束"));
} }

@ -71,8 +71,7 @@ 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) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId); ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
return R.ok(reagentConsumableInventory); return R.ok(reagentConsumableInventory);
@ -344,7 +343,7 @@ public class ReagentConsumableInventoryController {
* 天平专用 * 天平专用
* 通过扫码获取标准物质所有信息 * 通过扫码获取标准物质所有信息
*/ */
@ApiOperation(value = "通过编号,获取标准物质所有信", notes = "通过编号,获取标准物质所有信息") @ApiOperation(value = "通过编号,获取标准物质所有信", notes = "通过编号,获取标准物质所有信息")
@GetMapping("/getByNo") @GetMapping("/getByNo")
public R<ReagentConsumableInventoryFullVO> getByNo(String number) { public R<ReagentConsumableInventoryFullVO> getByNo(String number) {
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number)); ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));

@ -26,7 +26,9 @@ import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.*; import digital.laboratory.platform.reagent.vo.*;
import digital.laboratory.platform.sys.entity.CabinetCell; import digital.laboratory.platform.sys.entity.CabinetCell;
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData;
import digital.laboratory.platform.sys.entity.SysUser;
import digital.laboratory.platform.sys.feign.RemoteCabinetService; import digital.laboratory.platform.sys.feign.RemoteCabinetService;
import digital.laboratory.platform.sys.feign.RemoteUserService;
import feign.Response; import feign.Response;
import io.seata.spring.annotation.GlobalTransactional; import io.seata.spring.annotation.GlobalTransactional;
import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItem;
@ -102,6 +104,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
@Autowired @Autowired
private LocationInfoService locationInfoService; private LocationInfoService locationInfoService;
@Autowired
private RemoteUserService remoteUserService;
@Autowired @Autowired
private OssFile ossFile; private OssFile ossFile;
@ -269,19 +274,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId()); ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId());
BeanUtils.copyProperties(byId, reagentConsumableInventoryFullVO); BeanUtils.copyProperties(byId, reagentConsumableInventoryFullVO);
reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber()); reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber());
reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId()); reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId());
BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId()); BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId()); SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId()); standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId());
StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper); StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
@ -292,14 +290,18 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId()); reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus()); reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult()); reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult());
List<StandardMaterialApplication> list = standardMaterialApplicationService.list(new LambdaQueryWrapper<StandardMaterialApplication>().eq(StandardMaterialApplication::getReferenceMaterialId, id).orderByDesc(StandardMaterialApplication::getDateOfClaim));
R<SysUser> userR = remoteUserService.innerGetById(list.get(0).getRecipientId());
reagentConsumableInventoryFullVO.setHolderName(userR.getData().getName());
if (one1 != null) { if (one1 != null) {
reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration()); reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration());
reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate()); reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate());
reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber()); reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber());
reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod()); reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod());
} }
return reagentConsumableInventoryFullVO; return reagentConsumableInventoryFullVO;
} }
@ -799,7 +801,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
HSSFCellStyle cellStyle1 = workbook.createCellStyle(); HSSFCellStyle cellStyle1 = workbook.createCellStyle();
cellStyle1.setAlignment(HorizontalAlignment.CENTER); cellStyle1.setAlignment(HorizontalAlignment.CENTER);
HSSFFont font1 = workbook.createFont(); HSSFFont font1 = workbook.createFont();
font1.setFontHeightInPoints((short) 15); font1.setFontHeightInPoints((short) 10);
cellStyle1.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); cellStyle1.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
cellStyle1.setFillPattern(FillPatternType.SOLID_FOREGROUND); cellStyle1.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cellStyle1.setFont(font1); cellStyle1.setFont(font1);

@ -82,7 +82,9 @@ public class ReagentConsumableInventoryFullVO extends ReagentConsumableInventory
@ApiModelProperty(value = "实际数量") @ApiModelProperty(value = "实际数量")
private Integer practicalQuantity; private Integer practicalQuantity;
@ApiModelProperty(value = "领用人")
private String holderName;
} }

Loading…
Cancel
Save