update
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
|
||||
@Override
|
||||
public void configure(WebSecurity web) {
|
||||
SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL);
|
||||
web.ignoring().antMatchers("/", "/static/**", "/static/dist/**", "/hello**", "/favicon.ico**", "/login", "/login-callback", "/v2/**", "/papp/v2/**", "/papp/entrustment/common/**","/reagent/v2/**");
|
||||
web.ignoring().antMatchers("/", "/static/**", "/static/dist/**", "/hello**", "/favicon.ico**", "/login", "/login-callback", "/v2/**", "/papp/v2/**", "/papp/entrustment/common/**","/reagent/v2/**","/standard_material_application/weighing/**","/reagent_consumable_inventory/getByNo/**");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
@@ -32,6 +32,7 @@ import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -213,6 +214,10 @@ public class InstructionBookController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -11,6 +11,7 @@ import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.common.security.annotation.Inner;
|
||||
import digital.laboratory.platform.reagent.dto.BalanceWeighingDTO;
|
||||
import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO;
|
||||
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
|
||||
@@ -18,7 +19,6 @@ import digital.laboratory.platform.reagent.entity.StandardMaterialApplication;
|
||||
import digital.laboratory.platform.reagent.service.StandardMaterialApplicationService;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
|
||||
import digital.laboratory.platform.sys.feign.RemoteReagentConsumableService;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -262,7 +262,7 @@ public class StandardMaterialApplicationController {
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "天平称量后记录标准物质使用数量", notes = "天平称量后记录标准物质使用数量")
|
||||
@SysLog("天平称量后记录标准物质使用数量")
|
||||
// @SysLog("天平称量后记录标准物质使用数量")
|
||||
@PutMapping("/weighing")
|
||||
public R<String> getWeighingMass(@RequestBody List<BalanceWeighingDTO> balanceWeighingDTOList) {
|
||||
boolean weighingMass = standardMaterialApplicationService.getWeighingMass(balanceWeighingDTOList);
|
||||
|
||||
-20
@@ -69,10 +69,6 @@ public class WarehousingRecordFormController {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')")
|
||||
public R<WarehousingRecordFormVO> getById(String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.getWarehousingRecordFormVO(warehousingRecordFormId);
|
||||
|
||||
return R.ok(warehousingRecordFormVO);
|
||||
@@ -88,10 +84,6 @@ public class WarehousingRecordFormController {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
public R<IPage<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, String status, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOPage(page, Wrappers.<WarehousingRecordForm>query()
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.eq(StrUtil.isNotBlank(status), "status", status)
|
||||
@@ -102,7 +94,6 @@ public class WarehousingRecordFormController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@@ -113,10 +104,6 @@ public class WarehousingRecordFormController {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
public R<IPage<WarehousingContentVO>> getWarehousingContentVOPage(Page page, String name, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<WarehousingContentVO> warehousingContentVOPage = warehousingContentService.getWarehousingContentVOPage(page, Wrappers.<WarehousingContent>query()
|
||||
.like(StrUtil.isNotBlank(name), "reagent_consumable_name", name)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
@@ -139,16 +126,9 @@ public class WarehousingRecordFormController {
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
|
||||
public R<String> postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser);
|
||||
|
||||
return R.ok("签收成功");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+13
-6
@@ -14,21 +14,28 @@ public class ReagentConsumableInventoryDTO extends ReagentConsumableInventory {
|
||||
@ApiModelProperty(value = "(位置信息)")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value="(供应商ID)")
|
||||
@ApiModelProperty(value = "(供应商ID)")
|
||||
private String supplierId;
|
||||
|
||||
@ApiModelProperty(value="(有效日期)")
|
||||
@ApiModelProperty(value = "(有效日期)")
|
||||
private LocalDate expirationDate;
|
||||
|
||||
@ApiModelProperty(value="(生产日期)")
|
||||
@ApiModelProperty(value = "(生产日期)")
|
||||
private LocalDate dateOfProduction;
|
||||
|
||||
@ApiModelProperty(value="(房间号)")
|
||||
@ApiModelProperty(value = "(房间号)")
|
||||
private String roomNo;
|
||||
|
||||
private String articleNumber;
|
||||
@ApiModelProperty(value = "标准物质质量")
|
||||
private Double mass;
|
||||
|
||||
@ApiModelProperty(value = "标准物质单位")
|
||||
private String referenceMaterialUnit;
|
||||
|
||||
@ApiModelProperty(value = "(供应商名称)")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty(value = "(规格)")
|
||||
private String packages;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -67,5 +67,8 @@ public class WarehousingRecordFormDTO {
|
||||
private String boxId;
|
||||
|
||||
@ApiModelProperty(value="标准物质质量")
|
||||
private Double referenceMaterialMass;
|
||||
private Double mass;
|
||||
|
||||
@ApiModelProperty(value="标准物质单位")
|
||||
private String referenceMaterialUnit;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,6 @@ public class ReagentConsumables extends BaseEntity {
|
||||
@ApiModelProperty(value="存储条件")
|
||||
private String storageCondition;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -124,7 +123,6 @@ public class ReagentConsumables extends BaseEntity {
|
||||
@ApiModelProperty(value="溶液浓度")
|
||||
private double configurationConcentration;
|
||||
|
||||
|
||||
/**
|
||||
* reagentConsumablesId
|
||||
*/
|
||||
|
||||
@@ -68,4 +68,8 @@ public class ReferenceMaterial extends BaseEntity {
|
||||
@ApiModelProperty(value = "质量(有可能为重量、有可能为体积)")
|
||||
private Double mass;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String referenceMaterialUnit;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class StandardReserveSolution extends BaseEntity {
|
||||
* (配置浓度(mg/mL))
|
||||
*/
|
||||
@ApiModelProperty(value="(配置浓度(mg/mL))")
|
||||
private double configurationConcentration;
|
||||
private Double configurationConcentration;
|
||||
|
||||
/**
|
||||
* (预警信息)
|
||||
|
||||
@@ -46,7 +46,7 @@ public class StandardSolutionCurve extends BaseEntity {
|
||||
* (标准储备溶液浓度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准储备溶液浓度)")
|
||||
private double solutionConcentration;
|
||||
private Double solutionConcentration;
|
||||
|
||||
/**
|
||||
* (标准储备溶液浓度编号)
|
||||
|
||||
+51
-28
@@ -18,6 +18,7 @@ import digital.laboratory.platform.common.feign.RemoteTemplate2htmlService;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO;
|
||||
import digital.laboratory.platform.reagent.utils.IntegerUtils;
|
||||
import digital.laboratory.platform.reagent.utils.PageUtils;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
@@ -82,6 +83,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Autowired
|
||||
private ReagentConsumableStashService reagentConsumableStashService;
|
||||
|
||||
@Autowired
|
||||
private StandardMaterialApplicationService standardMaterialApplicationService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
@@ -320,6 +324,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod());
|
||||
}
|
||||
|
||||
|
||||
return reagentConsumableInventoryFullVO;
|
||||
}
|
||||
|
||||
@@ -539,7 +544,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
standardReserveSolutionVOById.setConfigurationDatePrint(String.format("%.4",standardReserveSolutionVOById.getConfigurationDatePrint()));
|
||||
data.put("standardReserveSolution", standardReserveSolutionVOById);
|
||||
String templateFileName = "标准储备溶液标签模板.vm";
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName, data);
|
||||
@@ -554,7 +558,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Override
|
||||
@Transactional//盘点导入,需提供柜子系统数据
|
||||
public void inventoryEntry(List<ReagentConsumableInventoryDTO> reagentConsumableInventoryDTOList) {
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
|
||||
IntegerUtils integerUtils = new IntegerUtils();
|
||||
for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) {
|
||||
Integer copies = integerUtils.getInteger(reagentConsumableInventoryDTO.getPackagedCopies());
|
||||
Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * copies;
|
||||
SupplierInformation supplier = supplierInformationService.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName()));
|
||||
|
||||
|
||||
String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO
|
||||
.getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation();
|
||||
@@ -574,15 +587,21 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty()), "deviation_or_uncertainty", reagentConsumableInventoryDTO.getDeviationOrUncertainty())
|
||||
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getMinimumUnit()), "minimum_unit", reagentConsumableInventoryDTO.getMinimumUnit())
|
||||
);
|
||||
|
||||
|
||||
BatchDetails batchDetails = new BatchDetails();
|
||||
|
||||
batchDetails.setServiceStatus(1);
|
||||
batchDetails.setQuantity(reagentConsumableInventoryDTO.getTotalQuantity());
|
||||
batchDetails.setBatch("2023-1");
|
||||
batchDetails.setQuantity(quantity);
|
||||
batchDetails.setBatch(year + "-1");
|
||||
if (supplier == null) {
|
||||
SupplierInformation supplierInformation = new SupplierInformation();
|
||||
supplierInformation.setSupplierName(reagentConsumableInventoryDTO.getSupplierName());
|
||||
supplierInformation.setAcceptableCondition("合格");
|
||||
supplierInformation.setId(IdWorker.get32UUID());
|
||||
supplierInformationService.save(supplierInformation);
|
||||
batchDetails.setSupplierId(supplierInformation.getId());
|
||||
|
||||
batchDetails.setSupplierId(reagentConsumableInventoryDTO.getSupplierId());
|
||||
} else {
|
||||
batchDetails.setSupplierId(supplier.getId());
|
||||
}
|
||||
//如果没有生产日期/到期时间,就自动生成
|
||||
if (reagentConsumableInventoryDTO.getDateOfProduction() != null) {
|
||||
batchDetails.setDateOfProduction(reagentConsumableInventoryDTO.getDateOfProduction());
|
||||
@@ -594,7 +613,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
} else {
|
||||
batchDetails.setExpirationDate(LocalDate.now().plusYears(99));
|
||||
}
|
||||
|
||||
R<CabinetCell> cabinetCellR = remoteCabinetService.queryCellByRoomNoAndLocation(reagentConsumableInventoryDTO.getRoomNo(), reagentConsumableInventoryDTO.getLocation());
|
||||
CabinetCell cabinetCell = cabinetCellR.getData();
|
||||
batchDetails.setLatticeId(cabinetCell.getId());
|
||||
@@ -609,33 +627,29 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
if (batchDetailsList != null & batchDetailsList.size() > 0) {
|
||||
int x = batchDetailsList.size() + 1;
|
||||
batchDetails.setBatch("2023-" + x);
|
||||
one.setTotalQuantity(one.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity());
|
||||
one.setTotalQuantity(one.getTotalQuantity() + quantity);
|
||||
this.updateById(one);
|
||||
}
|
||||
|
||||
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(one.getReagentConsumableId());
|
||||
|
||||
if (!one.getCategory().equals("标准物质")) {
|
||||
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query()
|
||||
.eq("room_no", reagentConsumableInventoryDTO.getRoomNo())
|
||||
.eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId()));
|
||||
|
||||
if (reagentConsumableStash != null) {
|
||||
reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity());
|
||||
reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity);
|
||||
batchDetails.setReagentConsumableStashId(reagentConsumableStash.getId());
|
||||
reagentConsumableStashService.updateById(reagentConsumableStash);
|
||||
} else {
|
||||
ReagentConsumableStash consumableStash = new ReagentConsumableStash();
|
||||
BeanUtils.copyProperties(reagentConsumableInventoryDTO, consumableStash);
|
||||
consumableStash.setId(IdWorker.get32UUID().toUpperCase());
|
||||
consumableStash.setTotalQuantity(reagentConsumableInventoryDTO.getTotalQuantity());
|
||||
consumableStash.setTotalQuantity(quantity);
|
||||
consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
batchDetails.setReagentConsumableStashId(consumableStash.getId());
|
||||
reagentConsumableStashService.save(consumableStash);
|
||||
}
|
||||
}
|
||||
|
||||
if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) {
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
@@ -644,14 +658,14 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
referenceMaterial.setStatus(0);
|
||||
referenceMaterial.setLatticeId(cabinetCell.getId());
|
||||
referenceMaterial.setBoxId(cabinetCell.getCabinetId());
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
String roomNo = reagentConsumableInventoryDTO.getRoomNo();
|
||||
referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-1");//自动生成编号
|
||||
referenceMaterial.setCode(referenceMaterial.getNumber());
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName());
|
||||
referenceMaterial.setMass(reagentConsumableInventoryDTO.getMass());
|
||||
referenceMaterial.setReferenceMaterialUnit(reagentConsumableInventoryDTO.getReferenceMaterialUnit());
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
||||
}
|
||||
@@ -663,12 +677,21 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumableInventory.setWarningValue(1);
|
||||
if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) {
|
||||
reagentConsumableInventory.setSpecificationAndModel("");
|
||||
if (reagentConsumableInventoryDTO.getPackages() != null) {
|
||||
reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getPackages());
|
||||
}
|
||||
} else {
|
||||
if (reagentConsumableInventoryDTO.getPackages() != null) {
|
||||
reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages());
|
||||
}
|
||||
}
|
||||
if (reagentConsumableInventoryDTO.getPackages() != null) {
|
||||
reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventory.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages());
|
||||
}
|
||||
|
||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(reagentConsumableInventory);
|
||||
reagentConsumableInventory.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
reagentConsumableInventory.setTotalQuantity(quantity);
|
||||
this.save(reagentConsumableInventory);
|
||||
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1);
|
||||
|
||||
@@ -676,16 +699,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query()
|
||||
.eq("room_no", reagentConsumableInventoryDTO.getRoomNo())
|
||||
.eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId()));
|
||||
|
||||
if (reagentConsumableStash != null) {
|
||||
reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity());
|
||||
reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity);
|
||||
batchDetails.setReagentConsumableStashId(reagentConsumableStash.getId());
|
||||
reagentConsumableStashService.updateById(reagentConsumableStash);
|
||||
} else {
|
||||
ReagentConsumableStash consumableStash = new ReagentConsumableStash();
|
||||
BeanUtils.copyProperties(reagentConsumableInventoryDTO, consumableStash);
|
||||
consumableStash.setId(IdWorker.get32UUID().toUpperCase());
|
||||
consumableStash.setTotalQuantity(reagentConsumableInventoryDTO.getTotalQuantity());
|
||||
consumableStash.setTotalQuantity(quantity);
|
||||
consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
batchDetails.setReagentConsumableStashId(consumableStash.getId());
|
||||
reagentConsumableStashService.save(consumableStash);
|
||||
@@ -700,13 +722,13 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
referenceMaterial.setLatticeId(cabinetCell.getId());
|
||||
referenceMaterial.setBoxId(cabinetCell.getCabinetId());
|
||||
referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName());
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
String roomNo = reagentConsumableInventoryDTO.getRoomNo();
|
||||
referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-1");//自动生成编号
|
||||
referenceMaterial.setCode(referenceMaterial.getNumber());
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setMass(reagentConsumableInventoryDTO.getMass());
|
||||
referenceMaterial.setReferenceMaterialUnit(reagentConsumableInventoryDTO.getReferenceMaterialUnit());
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
||||
}
|
||||
@@ -719,7 +741,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Override
|
||||
//更新柜子系统方法,柜子ID、物品ID、入库OR出库 (opCode 1 or -1)
|
||||
public void updateCabinet(String latticeId, String itemId, int opCode) {
|
||||
|
||||
ArrayList<CellAndStoreSupplyData> cellAndStoreSupplyDataArrayList = new ArrayList<>();//柜子数组
|
||||
CellAndStoreSupplyData cellAndStoreSupplyData = new CellAndStoreSupplyData();
|
||||
cellAndStoreSupplyData.setCellStatus("1");
|
||||
@@ -738,17 +759,19 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
List<OrgVO> orgList = baseMapper.getOrgList();
|
||||
ArrayList<OrgFullVO> orgFullVOS = new ArrayList<>();
|
||||
for (OrgVO orgVO : orgList) {
|
||||
if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("county")) {
|
||||
if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("province") && !(orgVO.getAddress().substring(0, 2).equals("陕西"))) {
|
||||
OrgFullVO orgFullVO = new OrgFullVO();
|
||||
orgFullVO.setUsername("X" + orgVO.getAreaCode());
|
||||
String[] roles = {"10010","10015", "10020","10130","23020","23030"};
|
||||
orgFullVO.setUsername("P" + orgVO.getAreaCode());
|
||||
String[] roles = {"10010", "10015", "10020", "10130", "23020", "23030"};
|
||||
orgFullVO.setRoleIds(roles);
|
||||
orgFullVO.setPassword("123456");
|
||||
orgFullVO.setOrgId(orgVO.getOrgId());
|
||||
orgFullVO.setGender(1);
|
||||
orgFullVOS.add(orgFullVO);
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println("总个数" + orgFullVOS.size());
|
||||
return orgFullVOS;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-7
@@ -2,10 +2,7 @@ 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.ApplicationForUse;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumablesSet;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumablesSetMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
@@ -80,10 +77,12 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
reagentConsumablesSetVO.setReagentConsumables(byId);
|
||||
|
||||
if (reagentConsumablesSetVO.getReferenceMaterialId() != null) {
|
||||
reagentConsumablesSetVO.setReferenceMaterialNumber(referenceMaterialService.getById(reagentConsumablesSetVO.getReferenceMaterialId()).getNumber()
|
||||
);
|
||||
}
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(reagentConsumablesSetVO.getReferenceMaterialId());
|
||||
reagentConsumablesSetVO.setReferenceMaterialNumber(referenceMaterial.getNumber());
|
||||
reagentConsumablesSetVO.setMass(referenceMaterial.getMass());
|
||||
reagentConsumablesSetVO.setReferenceMaterialUnit(referenceMaterial.getReferenceMaterialUnit());
|
||||
|
||||
}
|
||||
reagentConsumablesSetVOS.add(reagentConsumablesSetVO);
|
||||
}
|
||||
}
|
||||
|
||||
+8
-5
@@ -95,7 +95,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
|
||||
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
|
||||
referenceMaterial.setBoxId(standardMaterialApplicationDTO.getBoxId());
|
||||
referenceMaterial.setMass(referenceMaterial.getMass() - standardMaterialApplicationDTO.getPurposeAndQuantity());
|
||||
if (referenceMaterial.getMass()!=null){ referenceMaterial.setMass(referenceMaterial.getMass() - standardMaterialApplicationDTO.getPurposeAndQuantity());}
|
||||
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
||||
if (standardMaterialApplicationDTO.getOutOfUse()) {
|
||||
|
||||
@@ -130,7 +130,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
reagentConsumableInventoryService.updateById(byId1);
|
||||
remoteCabinetService.updateCabinet(standardMaterialApplicationDTO.getLatticeId(), referenceMaterial.getId(), "1");
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), 1);
|
||||
|
||||
}
|
||||
referenceMaterialService.updateById(referenceMaterial);
|
||||
|
||||
@@ -288,6 +287,8 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
standardMaterialApplicationVO.setLocation(byId.getLocation());
|
||||
standardMaterialApplicationVO.setBoxId(byId.getBoxId());
|
||||
standardMaterialApplicationVO.setLatticeId(byId.getLatticeId());
|
||||
standardMaterialApplicationVO.setMass(byId.getMass());
|
||||
standardMaterialApplicationVO.setReferenceMaterialUnit(byId.getReferenceMaterialUnit());
|
||||
|
||||
return standardMaterialApplicationVO;
|
||||
}
|
||||
@@ -301,13 +302,15 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
List<StandardMaterialApplication> standardMaterialApplications = this.list(Wrappers.<StandardMaterialApplication>query().eq("reference_material_id", referenceMaterialId).orderByDesc("create_time"));
|
||||
|
||||
if (standardMaterialApplications == null && standardMaterialApplications.size() == 0) {
|
||||
throw new RuntimeException(String.format("未查询到该标准物质的领用登记表!"));
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId);
|
||||
|
||||
if (referenceMaterial.getStatus() != -3) {
|
||||
throw new RuntimeException(String.format("当前标准物质未出库!"));
|
||||
}
|
||||
StandardMaterialApplication standardMaterialApplication = standardMaterialApplications.get(0);
|
||||
//依次记录称量结果
|
||||
for (BalanceWeighingDTO balanceWeighingDTO : balanceWeighingDTOList) {
|
||||
if (standardMaterialApplication.getPurposeAndQuantity() == 0) {
|
||||
if (standardMaterialApplication.getPurposeAndQuantity() == null) {
|
||||
standardMaterialApplication.setPurposeAndQuantity(balanceWeighingDTO.getWeighingMass().doubleValue());
|
||||
} else {
|
||||
standardMaterialApplication.setPurposeAndQuantity(standardMaterialApplication.getPurposeAndQuantity() + balanceWeighingDTO.getWeighingMass().doubleValue());
|
||||
|
||||
+14
-13
@@ -84,10 +84,10 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = baseMapper.getStandardReserveSolutionVOById(id);
|
||||
|
||||
standardReserveSolutionVOById.setPrintName(reagentConsumablesService.getById(referenceMaterialService.getById(standardReserveSolutionVOById.getReferenceMaterialId()).getReagentConsumableId()).getReagentConsumableName()+"[储]"
|
||||
);
|
||||
standardReserveSolutionVOById.setPrintName(standardReserveSolutionVOById.getSolutionName());
|
||||
|
||||
standardReserveSolutionVOById.setConfigurationDatePrint(standardReserveSolutionVOById.getDispenserName() + "-" + LocalDateTimeUtil.format(standardReserveSolutionVOById.getConfigurationDate(), "yyyy-MM-dd") +"-"+ standardReserveSolutionVOById.getConfigurationConcentration());
|
||||
String format = String.format("%.4f", standardReserveSolutionVOById.getConfigurationConcentration());
|
||||
standardReserveSolutionVOById.setConfigurationDatePrint(standardReserveSolutionVOById.getDispenserName() + "-" + LocalDateTimeUtil.format(standardReserveSolutionVOById.getConfigurationDate(), "yyyy-MM-dd") +"-"+ format);
|
||||
//查出该标准储备溶液对应的所有使用记录
|
||||
List<SolutionUseFormVO> solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId());
|
||||
|
||||
@@ -167,7 +167,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
|
||||
String prefix = referenceMaterialServiceById.getNumber() + "--";
|
||||
String prefix = referenceMaterialServiceById.getNumber() + "-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -187,12 +187,14 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
}
|
||||
}
|
||||
//创建标准溶液对象,并生成编号
|
||||
referenceMaterial.setStatus(-4);
|
||||
referenceMaterial.setStatus(-5);
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setNumber(prefix + newNo);
|
||||
referenceMaterial.setReagentConsumableName(reagentConsumableInventory.getReagentConsumableName());
|
||||
referenceMaterial.setReferenceMaterialUnit("ml");
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
@@ -230,17 +232,19 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
String format = date.format(formatter);
|
||||
|
||||
//创建标准溶液对象,并生成编号
|
||||
referenceMaterial.setStatus(-4);
|
||||
referenceMaterial.setStatus(-5);
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setReferenceMaterialUnit("ml");
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService. getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
|
||||
String prefix = referenceMaterialServiceById.getNumber() + "--";
|
||||
String prefix = referenceMaterialServiceById.getNumber() + "-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -297,6 +301,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
if (byId != null) {
|
||||
record.setLocation(byId.getLocation());
|
||||
record.setLatticeId(byId.getLatticeId());
|
||||
record.setMass(byId.getMass());
|
||||
record.setReferenceMaterialUnit(byId.getReferenceMaterialUnit());
|
||||
}
|
||||
}
|
||||
return standardReserveSolutionVOPage;
|
||||
@@ -393,9 +399,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
// }
|
||||
// }
|
||||
|
||||
HashMap<String, String > solutionUseFormVOMap = new HashMap<>();
|
||||
|
||||
List<HashMap> solutionUseFormVOMapList = new ArrayList<>();
|
||||
|
||||
String applyFileName = "标准储备溶液配制及使用记录表-" + id;
|
||||
//-----------------------------
|
||||
@@ -462,8 +465,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
ossFile.fileSave("document" + "/" + "standardReserveSolution" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
@@ -125,9 +126,7 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
|
||||
Integer x = 1;
|
||||
for (StandardSolutionCurveVO standardSolutionCurveVO : voList) {
|
||||
|
||||
standardSolutionCurveVO.setSerialnNumber(x.toString());
|
||||
|
||||
standardSolutionCurveVO.setConfigurationDatePrint(LocalDateTimeUtil.format(standardSolutionCurveVO.getConfigurationDate(), "yyyy年MM月dd日"));
|
||||
|
||||
x++;
|
||||
@@ -202,6 +201,8 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
public StandardSolutionCurveVO getStandardSolutionCurveVO(String id) {
|
||||
|
||||
StandardSolutionCurveVO standardSolutionCurveVO = baseMapper.getStandardSolutionCurveVO(id);
|
||||
BigDecimal bigDecimal = new BigDecimal(standardSolutionCurveVO.getSolutionConcentration());
|
||||
standardSolutionCurveVO.setSolutionConcentrationPrint(String.format("%.4f",standardSolutionCurveVO.getSolutionConcentration())+"mg/ml");
|
||||
|
||||
return standardSolutionCurveVO;
|
||||
}
|
||||
|
||||
+4
-2
@@ -247,7 +247,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
referenceMaterial.setLatticeId(latticeId);
|
||||
referenceMaterial.setBoxId(boxId);
|
||||
referenceMaterial.setReagentConsumableName(reagentConsumables.getReagentConsumableName());
|
||||
referenceMaterial.setMass(warehousingRecordFormDTO.getReferenceMaterialMass());
|
||||
referenceMaterial.setMass(warehousingRecordFormDTO.getMass());
|
||||
referenceMaterial.setReferenceMaterialUnit(warehousingRecordFormDTO.getReferenceMaterialUnit());
|
||||
//更新格子信息(标准物质传入对象ID)
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), 1);
|
||||
//生成编号
|
||||
@@ -355,7 +356,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId());
|
||||
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName());
|
||||
referenceMaterial.setReagentConsumableName(reagentConsumables.getReagentConsumableName());
|
||||
referenceMaterial.setMass(warehousingRecordFormDTO.getReferenceMaterialMass());
|
||||
referenceMaterial.setMass(warehousingRecordFormDTO.getMass());
|
||||
referenceMaterial.setReferenceMaterialUnit(warehousingRecordFormDTO.getReferenceMaterialUnit());
|
||||
//更新格子信息(试剂耗材传入类ID)
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), 1);
|
||||
//生成编号
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package digital.laboratory.platform.reagent.utils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class IntegerUtils {
|
||||
|
||||
public Integer getInteger(String str) {
|
||||
String regEx = "[^0-9]";
|
||||
Pattern p = Pattern.compile(regEx);
|
||||
Matcher matcher = p.matcher(str);
|
||||
String trim = matcher.replaceAll("").trim();
|
||||
return Integer.valueOf(trim);
|
||||
}
|
||||
}
|
||||
@@ -12,4 +12,5 @@ public class OrgVO {
|
||||
private String username;
|
||||
private String password;
|
||||
private String[] roleIds;
|
||||
private String address;
|
||||
}
|
||||
|
||||
@@ -13,9 +13,13 @@ public class ReagentConsumablesSetVO extends ReagentConsumablesSet {
|
||||
public ReagentConsumables reagentConsumables;
|
||||
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
public Integer totalQuantity;
|
||||
|
||||
public String claimCode;
|
||||
|
||||
private Double mass;
|
||||
|
||||
private String referenceMaterialUnit;
|
||||
}
|
||||
|
||||
+6
@@ -51,4 +51,10 @@ public class StandardMaterialApplicationVO extends StandardMaterialApplication {
|
||||
|
||||
@ApiModelProperty(value="打印使用数量与用途")
|
||||
private String printPurposeAndQuantity;
|
||||
|
||||
@ApiModelProperty(value = "质量(有可能为重量、有可能为体积)")
|
||||
private Double mass;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String referenceMaterialUnit;
|
||||
}
|
||||
|
||||
@@ -28,4 +28,10 @@ public class StandardReserveSolutionVO extends StandardReserveSolution {
|
||||
|
||||
@ApiModelProperty(value="(打印储备溶液名称)")
|
||||
private String printName;
|
||||
|
||||
@ApiModelProperty(value = "质量(有可能为重量、有可能为体积)")
|
||||
private Double mass;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String referenceMaterialUnit;
|
||||
}
|
||||
|
||||
@@ -14,4 +14,6 @@ public class StandardSolutionCurveVO extends StandardSolutionCurve {
|
||||
@ApiModelProperty(value="(工作曲线溶液配置日期)")
|
||||
private String configurationDatePrint;
|
||||
|
||||
private String solutionConcentrationPrint;
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<result property="serviceStatus" column="service_status"/>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"/>
|
||||
<result property="mass" column="mass"/>
|
||||
<result property="referenceMaterialUnit" column="reference_material_unit"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user