main
杨海航 2 years ago
parent 97cad447eb
commit 0419f0370f
  1. 4634
      db/dlp_reagent_managment.sql
  2. 2
      src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java
  3. 2
      src/main/java/digital/laboratory/platform/reagent/dto/PurchaseCatalogueDTO.java
  4. 2
      src/main/java/digital/laboratory/platform/reagent/entity/CatalogueDetails.java
  5. 2
      src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java
  6. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java
  7. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableStash.java
  8. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java
  9. 6
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java
  10. 6
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  11. 16
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java
  12. 2
      src/main/java/digital/laboratory/platform/reagent/vo/DetailsOfCentralizedVO.java
  13. 2
      src/main/java/digital/laboratory/platform/reagent/vo/ReferenceMaterialFullVO.java

File diff suppressed because it is too large Load Diff

@ -22,7 +22,7 @@ public class DecentralizedRequestDTO {
@ApiModelProperty(value = "包装份数") @ApiModelProperty(value = "包装份数")
private String packagedCopies; private Integer packagedCopies;
@ApiModelProperty(value = "(数量)") @ApiModelProperty(value = "(数量)")

@ -28,7 +28,7 @@ public class PurchaseCatalogueDTO {
@ApiModelProperty(value = "包装份数") @ApiModelProperty(value = "包装份数")
private String packagedCopies; private Integer packagedCopies;
@ApiModelProperty(value = "采购目录ID") @ApiModelProperty(value = "采购目录ID")
private String purchaseCatalogueId; private String purchaseCatalogueId;

@ -61,7 +61,7 @@ public class CatalogueDetails extends BaseEntity {
* 包装份数 * 包装份数
*/ */
@ApiModelProperty(value = "包装份数") @ApiModelProperty(value = "包装份数")
private String packagedCopies; private Integer packagedCopies;
/** /**
* 采购目录ID * 采购目录ID

@ -69,7 +69,7 @@ public class DecentralizeDetails extends BaseEntity {
* 包装份数 * 包装份数
*/ */
@ApiModelProperty(value="包装份数") @ApiModelProperty(value="包装份数")
private String packagedCopies; private Integer packagedCopies;
/** /**
* (数量) * (数量)

@ -104,7 +104,7 @@ public class ReagentConsumableInventory extends BaseEntity {
* (包装份数) * (包装份数)
*/ */
@ApiModelProperty(value = "(包装份数)") @ApiModelProperty(value = "(包装份数)")
private String packagedCopies; private Integer packagedCopies;
/** /**
* reagentConsumableInventoryId * reagentConsumableInventoryId

@ -55,7 +55,7 @@ public class ReagentConsumableStash extends BaseEntity {
private Integer totalQuantity; private Integer totalQuantity;
@ApiModelProperty(value = "(包装份数)") @ApiModelProperty(value = "(包装份数)")
private String packagedCopies; private Integer packagedCopies;
@TableId(value = "id", type = IdType.ASSIGN_UUID) @TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "Reagent_consumable_stash") @ApiModelProperty(value = "Reagent_consumable_stash")

@ -76,7 +76,7 @@ public class ReagentConsumables extends BaseEntity {
* 包装份数 * 包装份数
*/ */
@ApiModelProperty(value="包装份数") @ApiModelProperty(value="包装份数")
private String packagedCopies; private Integer packagedCopies;
/** /**
* (标准值/纯度) * (标准值/纯度)
*/ */

@ -255,7 +255,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
.eq(StrUtil.isNotBlank(catalogueDetails.getCasNumber()), "cas_number", catalogueDetails.getCasNumber()) .eq(StrUtil.isNotBlank(catalogueDetails.getCasNumber()), "cas_number", catalogueDetails.getCasNumber())
.eq(StrUtil.isNotBlank(catalogueDetails.getSpecies()), "species", catalogueDetails.getSpecies()) .eq(StrUtil.isNotBlank(catalogueDetails.getSpecies()), "species", catalogueDetails.getSpecies())
.eq(StrUtil.isNotBlank(catalogueDetails.getEnglishName()), "english_name", catalogueDetails.getEnglishName()) .eq(StrUtil.isNotBlank(catalogueDetails.getEnglishName()), "english_name", catalogueDetails.getEnglishName())
.eq(StrUtil.isNotBlank(catalogueDetails.getPackagedCopies()), "packaged_copies", catalogueDetails.getPackagedCopies()) .eq(catalogueDetails.getPackagedCopies() != null, "packaged_copies", catalogueDetails.getPackagedCopies())
.eq(StrUtil.isNotBlank(catalogueDetails.getAlias()), "alias", catalogueDetails.getAlias()) .eq(StrUtil.isNotBlank(catalogueDetails.getAlias()), "alias", catalogueDetails.getAlias())
.eq(StrUtil.isNotBlank(catalogueDetails.getPurityGrade()), "purity_grade", catalogueDetails.getPurityGrade()) .eq(StrUtil.isNotBlank(catalogueDetails.getPurityGrade()), "purity_grade", catalogueDetails.getPurityGrade())
.eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty()) .eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty())
@ -279,6 +279,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
return purchaseCatalogue; return purchaseCatalogue;
} else return null; } else return null;
} }
@Override @Override
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) { public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
@ -334,6 +335,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
}); });
return catalogueDetailsList; return catalogueDetailsList;
} }
@Override @Override
//导入方法,验证填写内容是否有误 //导入方法,验证填写内容是否有误
public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) { public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) {
@ -346,7 +348,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
if (StrUtil.isNotBlank(purchaseCatalogueDTO.getBrand()) & if (StrUtil.isNotBlank(purchaseCatalogueDTO.getBrand()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getCategory()) & StrUtil.isNotBlank(purchaseCatalogueDTO.getCategory()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getPackagedCopies()) & (purchaseCatalogueDTO.getPackagedCopies()) != null &
StrUtil.isNotBlank(purchaseCatalogueDTO.getReagentConsumableName()) & StrUtil.isNotBlank(purchaseCatalogueDTO.getReagentConsumableName()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecies()) & StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecies()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecificationAndModel()) & StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecificationAndModel()) &

@ -564,11 +564,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
IntegerUtils integerUtils = new IntegerUtils(); IntegerUtils integerUtils = new IntegerUtils();
for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) { for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) {
Integer copies = integerUtils.getInteger(reagentConsumableInventoryDTO.getPackagedCopies()); Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * reagentConsumableInventoryDTO.getPackagedCopies();
Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * copies;
SupplierInformation supplier = supplierInformationService.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName())); SupplierInformation supplier = supplierInformationService.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName()));
String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO
.getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation(); .getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation();
@ -581,7 +579,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getEnglishName()), "english_name", reagentConsumableInventoryDTO.getEnglishName()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getEnglishName()), "english_name", reagentConsumableInventoryDTO.getEnglishName())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPackagedCopies()), "packaged_copies", reagentConsumableInventoryDTO.getPackagedCopies()) .eq(reagentConsumableInventoryDTO.getPackagedCopies()!=null, "packaged_copies", reagentConsumableInventoryDTO.getPackagedCopies())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getAlias()), "alias", reagentConsumableInventoryDTO.getAlias()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getAlias()), "alias", reagentConsumableInventoryDTO.getAlias())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPurityGrade()), "purity_grade", reagentConsumableInventoryDTO.getPurityGrade()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPurityGrade()), "purity_grade", reagentConsumableInventoryDTO.getPurityGrade())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty()), "deviation_or_uncertainty", reagentConsumableInventoryDTO.getDeviationOrUncertainty()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty()), "deviation_or_uncertainty", reagentConsumableInventoryDTO.getDeviationOrUncertainty())

@ -95,7 +95,15 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation()); referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation()); referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
referenceMaterial.setBoxId(standardMaterialApplicationDTO.getBoxId()); referenceMaterial.setBoxId(standardMaterialApplicationDTO.getBoxId());
if (referenceMaterial.getMass()!=null){ referenceMaterial.setMass(referenceMaterial.getMass() - standardMaterialApplicationDTO.getPurposeAndQuantity());} if (referenceMaterial.getMass()!=null){
referenceMaterial.setMass((referenceMaterial.getMass()*10000 - standardMaterialApplicationDTO.getPurposeAndQuantity()*10000)/10000);
if (referenceMaterial.getMass()<0){
throw new RuntimeException(String.format("使用数量不能大于标准物质现有质量"));
}
if (referenceMaterial.getMass()==0&&!standardMaterialApplicationDTO.getOutOfUse()){
throw new RuntimeException(String.format("检测到标准物质质量已为0,若已使用完毕,请勾选使用完毕选项后重新提交"));
}
}
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可 //若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
if (standardMaterialApplicationDTO.getOutOfUse()) { if (standardMaterialApplicationDTO.getOutOfUse()) {
@ -216,10 +224,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
x++; x++;
} }
//-----------------------------
// 生成 word 版本的 采购目录
String applyFileName = "标准物质领用归还登记表-" + ids; String applyFileName = "标准物质领用归还登记表-" + ids;
ByteArrayOutputStream bos = new ByteArrayOutputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream();
@ -313,7 +317,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
if (standardMaterialApplication.getPurposeAndQuantity() == null) { if (standardMaterialApplication.getPurposeAndQuantity() == null) {
standardMaterialApplication.setPurposeAndQuantity(balanceWeighingDTO.getWeighingMass().doubleValue()); standardMaterialApplication.setPurposeAndQuantity(balanceWeighingDTO.getWeighingMass().doubleValue());
} else { } else {
standardMaterialApplication.setPurposeAndQuantity(standardMaterialApplication.getPurposeAndQuantity() + balanceWeighingDTO.getWeighingMass().doubleValue()); standardMaterialApplication.setPurposeAndQuantity((standardMaterialApplication.getPurposeAndQuantity()*10000 + balanceWeighingDTO.getWeighingMass().doubleValue()*10000)/10000);
} }
} }
return this.updateById(standardMaterialApplication); return this.updateById(standardMaterialApplication);

@ -35,7 +35,7 @@ public class DetailsOfCentralizedVO extends DetailsOfCentralized {
private String applicantName; private String applicantName;
@ApiModelProperty(value="包装份数") @ApiModelProperty(value="包装份数")
private String packagedCopies; private Integer packagedCopies;
@ApiModelProperty(value="(标准值/纯度)") @ApiModelProperty(value="(标准值/纯度)")
private String standardValueOrPurity; private String standardValueOrPurity;

@ -117,7 +117,7 @@ public class ReferenceMaterialFullVO extends ReferenceMaterial {
* (包装份数) * (包装份数)
*/ */
@ApiModelProperty(value = "(包装份数)") @ApiModelProperty(value = "(包装份数)")
private String packagedCopies; private Integer packagedCopies;
@ApiModelProperty(value = "单价") @ApiModelProperty(value = "单价")

Loading…
Cancel
Save