main
杨海航 1 year ago
parent 8f94eef5f3
commit 8ca6996d82
  1. 2
      src/main/java/digital/laboratory/platform/reagent/ReagentManagmentApplication.java
  2. 6
      src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java
  3. 40
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  4. 8
      src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
  5. 11
      src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java
  6. 2
      src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java
  7. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java
  8. 1
      src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java
  9. 2
      src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java
  10. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java
  11. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/InstructionBookServiceImpl.java
  12. 11
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java
  13. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  14. 32
      src/main/java/digital/laboratory/platform/reagent/service/impl/RequisitionRecordServiceImpl.java
  15. 19
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java
  16. 8
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java
  17. 32
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java
  18. 31
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardSolutionCurveServiceImpl.java
  19. 9
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java
  20. 13
      src/main/resources/mapper/ReagentConsumableInventoryMapper.xml

@ -26,8 +26,6 @@ public class ReagentManagmentApplication {
// System.out.println("end of Spring Application main()"); // System.out.println("end of Spring Application main()");
// System.out.println("-----------------------------"); // System.out.println("-----------------------------");
// System.out.println("\n\n\n"); // System.out.println("\n\n\n");
} }
// @Bean // @Bean

@ -127,7 +127,6 @@ public class PurchasingPlanController {
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime,
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) { @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -151,17 +150,16 @@ public class PurchasingPlanController {
/** /**
* 新增(采购计划) * 新增(采购计划)
* *
* @param purchasingPlanDTOList (采购计划)
* @return R * @return R
*/ */
@ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划) 参数DTO:(detailsOfCentralizedId,quantity = ,)") @ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划) 参数DTO:(detailsOfCentralizedId,quantity = ,)")
@SysLog("新增(采购计划)") @SysLog("新增(采购计划)")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')") @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')")
public R<PurchasingPlanVO> postAddObject(@RequestBody List<PurchasingPlanDTO> purchasingPlanDTOList, HttpServletRequest theHttpServletRequest) { public R<PurchasingPlanVO> postAddObject(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTOList, dlpUser); PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTO.getIdList(), dlpUser);
if (purchasingPlanVO != null) { if (purchasingPlanVO != null) {
return R.ok(purchasingPlanVO, "保存成功"); return R.ok(purchasingPlanVO, "保存成功");

@ -192,24 +192,24 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表") @ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表")
@GetMapping("/MList") @GetMapping("/MList")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')") // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R<IPage<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumablePage(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper IPage reagentConsumablePage = reagentConsumableInventoryMapper.getReagentConsumablePage(page, reagentConsumableName);
.eq("category", "试剂")
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() // IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper
.eq("category", "试剂") // .eq("category", "试剂")
.like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or() // .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
.eq("category", "耗材") // .eq("category", "试剂")
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() // .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or()
.eq("category", "耗材") // .eq("category", "耗材")
.like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName)); // .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
// .eq("category", "耗材")
// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName));
return R.ok(allRM); return R.ok(reagentConsumablePage);
} }
/** /**
@ -357,6 +357,20 @@ public class ReagentConsumableInventoryController {
return R.ok(byCode); return R.ok(byCode);
} }
/**
* 天平专用
* 通过扫码获取标准物质所有信息
*/
@ApiOperation(value = "通过编号,获取标准物质所有信", notes = "通过编号,获取标准物质所有信息")
@GetMapping("/getByNo")
public R<ReagentConsumableInventoryFullVO> getByNo(String number) {
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));
if (referenceMaterial != null) {
return R.ok(reagentConsumableInventoryService.getByCode(referenceMaterial.getId()));
} else {
return R.failed("未能查询到该标准物质的详细信息");
}
}
/** /**
* 获取用户列表 * 获取用户列表

@ -184,9 +184,9 @@ public class StandardMaterialApprovalFormController {
ReferenceMaterial byId = referenceMaterialService.getById(id); ReferenceMaterial byId = referenceMaterialService.getById(id);
if (byId.getStatus() == -3) { // if (byId.getStatus() == -3) {
throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用")); // throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用"));
} // }
byId.setStatus(-1); byId.setStatus(-1);
@ -219,8 +219,6 @@ public class StandardMaterialApprovalFormController {
throw new RuntimeException("未查询到相关信息"); throw new RuntimeException("未查询到相关信息");
} }
String applyFileName = "标准物质停用报废销毁恢复降级使用审批表" + id; String applyFileName = "标准物质停用报废销毁恢复降级使用审批表" + id;
;
String pdfFilePath = "document" + "/" + "standardMaterialApprovalForm" + "/" + id + "/" + applyFileName + ".pdf"; String pdfFilePath = "document" + "/" + "standardMaterialApprovalForm" + "/" + id + "/" + applyFileName + ".pdf";
try { try {

@ -138,19 +138,16 @@ public class WarehousingRecordFormController {
@SysLog("新增签收记录表") @SysLog("新增签收记录表")
@PostMapping @PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')") // @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
public R<WarehousingRecordFormVO> postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) { public R<String> postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser); warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser);
return R.ok("签收成功");
if (warehousingRecordFormVO != null) {
return R.ok(warehousingRecordFormVO, "入库成功");
} else {
return R.failed("入库失败");
}
} }

@ -51,4 +51,6 @@ public class PurchasingPlanDTO {
@ApiModelProperty(value = "换货供应商ID") @ApiModelProperty(value = "换货供应商ID")
private String supplierId; private String supplierId;
private String [] idList;
} }

@ -37,7 +37,7 @@ public class ReferenceMaterial extends BaseEntity {
@ApiModelProperty(value="试剂耗材Id") @ApiModelProperty(value="试剂耗材Id")
private String reagentConsumableId; private String reagentConsumableId;
@ApiModelProperty(value="使用状态 0 正常使用、-2降级使用") @ApiModelProperty(value="使用状态 0为可以使用、-2为降级使用、-3 已被领用 主要为备用状态区分被领用时")
private Integer serviceStatus; private Integer serviceStatus;
@ApiModelProperty(value="批次明细Id") @ApiModelProperty(value="批次明细Id")

@ -30,4 +30,5 @@ public interface ReagentConsumableInventoryMapper extends BaseMapper<ReagentCons
IPage<ReferenceMaterialFullVO> getReferenceMaterialPage (IPage<ReagentConsumableInventory>page, @Param (Constants.WRAPPER) QueryWrapper<ReferenceMaterial> qw); IPage<ReferenceMaterialFullVO> getReferenceMaterialPage (IPage<ReagentConsumableInventory>page, @Param (Constants.WRAPPER) QueryWrapper<ReferenceMaterial> qw);
IPage<ReferenceMaterialFullVO> getReagentConsumablePage (IPage<ReagentConsumableInventory>page, @Param("name") String name );
} }

@ -26,6 +26,6 @@ public interface WarehousingRecordFormService extends IService<WarehousingRecord
WarehousingRecordFormVO getWarehousingRecordFormVO (String warehousingFormId); WarehousingRecordFormVO getWarehousingRecordFormVO (String warehousingFormId);
@Transactional @Transactional
WarehousingRecordFormVO addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser); void addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser);
IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm>qw); IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm>qw);
} }

@ -254,6 +254,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
} }
referenceMaterial.setStatus(-3);//改变状态 referenceMaterial.setStatus(-3);//改变状态
referenceMaterial.setServiceStatus(-3);
// reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息 // reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息
referenceMaterialService.updateById(referenceMaterial); referenceMaterialService.updateById(referenceMaterial);
@ -309,6 +310,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
throw new RuntimeException(String.format("该物品已被其他工作人员领用")); throw new RuntimeException(String.format("该物品已被其他工作人员领用"));
} }
referenceMaterial.setStatus(-3); referenceMaterial.setStatus(-3);
referenceMaterial.setServiceStatus(-3);
referenceMaterialService.updateById(referenceMaterial); referenceMaterialService.updateById(referenceMaterial);
// reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息 // reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId()); ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());

@ -66,8 +66,6 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
ReagentConsumables byId = reagentConsumablesService.getById(id); ReagentConsumables byId = reagentConsumablesService.getById(id);
instructionBookVO.setReagentConsumables(byId); instructionBookVO.setReagentConsumables(byId);
return instructionBookVO; return instructionBookVO;
} }

@ -246,9 +246,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
//目录中的试剂耗材是否存在试剂耗材类中,有则不管,无则添加 //目录中的试剂耗材是否存在试剂耗材类中,有则不管,无则添加
for (CatalogueDetails catalogueDetails : list) { for (CatalogueDetails catalogueDetails : list) {
ReagentConsumables one = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query() ReagentConsumables one = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
.eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName()) .eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName())
.eq("brand", catalogueDetails.getBrand()) .eq("brand", catalogueDetails.getBrand())
.eq("category", catalogueDetails.getCategory()) .eq("category", catalogueDetails.getCategory())
@ -263,7 +261,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
.eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty()) .eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty())
.eq(StrUtil.isNotBlank(catalogueDetails.getMinimumUnit()), "minimum_unit", catalogueDetails.getMinimumUnit()) .eq(StrUtil.isNotBlank(catalogueDetails.getMinimumUnit()), "minimum_unit", catalogueDetails.getMinimumUnit())
); );
if (one == null) { if (one == null) {
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails); ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
catalogueDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); catalogueDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
@ -278,13 +275,10 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
} else { } else {
purchaseCatalogue.setStatus(-3); purchaseCatalogue.setStatus(-3);
} }
if (this.updateById(purchaseCatalogue)) { if (this.updateById(purchaseCatalogue)) {
return purchaseCatalogue; return purchaseCatalogue;
} else return null; } else return null;
} }
@Override @Override
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) { public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
@ -322,12 +316,10 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
catalogueDetailsLambdaQueryWrapper.like(CatalogueDetails::getReagentConsumableName, name); catalogueDetailsLambdaQueryWrapper.like(CatalogueDetails::getReagentConsumableName, name);
} }
if (category != null) { if (category != null) {
catalogueDetailsLambdaQueryWrapper.like(category == 1, CatalogueDetails::getCategory, "试剂"); catalogueDetailsLambdaQueryWrapper.like(category == 1, CatalogueDetails::getCategory, "试剂");
catalogueDetailsLambdaQueryWrapper.like(category == 2, CatalogueDetails::getCategory, "耗材"); catalogueDetailsLambdaQueryWrapper.like(category == 2, CatalogueDetails::getCategory, "耗材");
catalogueDetailsLambdaQueryWrapper.like(category == 3, CatalogueDetails::getCategory, "标准物质"); catalogueDetailsLambdaQueryWrapper.like(category == 3, CatalogueDetails::getCategory, "标准物质");
} }
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper); List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
if (list == null & list.size() == 0) { if (list == null & list.size() == 0) {
@ -335,8 +327,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
throw new RuntimeException(String.format("未存在已发布的采购目录")); throw new RuntimeException(String.format("未存在已发布的采购目录"));
} }
Collections.sort(catalogueDetailsList, new Comparator<CatalogueDetails>() { Collections.sort(catalogueDetailsList, new Comparator<CatalogueDetails>() {
@Override @Override
public int compare(CatalogueDetails o1, CatalogueDetails o2) { public int compare(CatalogueDetails o1, CatalogueDetails o2) {
return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5)) - Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5)); return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5)) - Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5));
@ -344,7 +334,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
}); });
return catalogueDetailsList; return catalogueDetailsList;
} }
@Override @Override
//导入方法,验证填写内容是否有误 //导入方法,验证填写内容是否有误
public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) { public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) {

@ -539,6 +539,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id); StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
Map<String, Object> data = new HashMap<>(); Map<String, Object> data = new HashMap<>();
standardReserveSolutionVOById.setConfigurationDatePrint(String.format("%.4",standardReserveSolutionVOById.getConfigurationDatePrint()));
data.put("standardReserveSolution", standardReserveSolutionVOById); data.put("standardReserveSolution", standardReserveSolutionVOById);
String templateFileName = "标准储备溶液标签模板.vm"; String templateFileName = "标准储备溶液标签模板.vm";
return remoteTemplate2htmlService.getHtml(templateFileName, data); return remoteTemplate2htmlService.getHtml(templateFileName, data);

@ -137,22 +137,22 @@ public class RequisitionRecordServiceImpl extends ServiceImpl<RequisitionRecordM
x++; x++;
} }
if (voList.size() < 28) { // if (voList.size() < 28) {
int s = 28 - voList.size(); // int s = 28 - voList.size();
for (int i = 0; i < s; i++) { // for (int i = 0; i < s; i++) {
RequisitionRecordVO requisitionRecordVO = new RequisitionRecordVO(); // RequisitionRecordVO requisitionRecordVO = new RequisitionRecordVO();
requisitionRecordVO.setIndex(""); // requisitionRecordVO.setIndex("");
voList.add(requisitionRecordVO); // voList.add(requisitionRecordVO);
} // }
}else { // }else {
int s = 28-voList.size()%28; // int s = 28-voList.size()%28;
//
for (int i = 0; i < s; i++) { // for (int i = 0; i < s; i++) {
RequisitionRecordVO requisitionRecordVO = new RequisitionRecordVO(); // RequisitionRecordVO requisitionRecordVO = new RequisitionRecordVO();
requisitionRecordVO.setIndex(""); // requisitionRecordVO.setIndex("");
voList.add(requisitionRecordVO); // voList.add(requisitionRecordVO);
} // }
} // }
Configure config = Configure.builder(). Configure config = Configure.builder().
bind("voList", policy).build(); bind("voList", policy).build();

@ -116,7 +116,8 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
if (referenceMaterial.getServiceStatus() == -2) { if (referenceMaterial.getServiceStatus() == -2) {
referenceMaterial.setStatus(-2); referenceMaterial.setStatus(-2);
} }
} else { }
if (referenceMaterial.getStatus() == -3) {
referenceMaterial.setStatus(0); referenceMaterial.setStatus(0);
} }
BatchDetails byId2 = batchDetailsService.getById(referenceMaterial.getBatchDetailsId()); BatchDetails byId2 = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
@ -239,21 +240,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
Calendar instance = Calendar.getInstance(); Calendar instance = Calendar.getInstance();
int year = instance.get(Calendar.YEAR); int year = instance.get(Calendar.YEAR);
if (voList.size()<8){
int s = 8-voList.size();
for (int i = 0; i < s; i++) {
StandardMaterialApplicationVO standardMaterialApplicationVO = new StandardMaterialApplicationVO();
standardMaterialApplicationVO.setIndex("");
voList.add(standardMaterialApplicationVO);
}
}else {
int s = 8-voList.size()%8;
for (int i = 0; i < s; i++) {
StandardMaterialApplicationVO standardMaterialApplicationVO = new StandardMaterialApplicationVO();
standardMaterialApplicationVO.setIndex("");
voList.add(standardMaterialApplicationVO);
}
}
/** /**
* 循环表格 * 循环表格
*/ */
@ -307,6 +293,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
return standardMaterialApplicationVO; return standardMaterialApplicationVO;
} }
} }

@ -70,10 +70,10 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId()); ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
if (referenceMaterialServiceById.getStatus()==-3){ // if (referenceMaterialServiceById.getStatus()==-3){
//
throw new RuntimeException(String.format("该标准物质/溶液已被领用,请归还后,再进行操作")); // throw new RuntimeException(String.format("该标准物质/溶液已被领用,请归还后,再进行操作"));
} // }
standardMaterialApprovalForm.setApplicantId(dlpUser.getId()); standardMaterialApprovalForm.setApplicantId(dlpUser.getId());
standardMaterialApprovalForm.setApplicantName(dlpUser.getName()); standardMaterialApprovalForm.setApplicantName(dlpUser.getName());

@ -94,7 +94,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
if (solutionUseFormVOList != null) { if (solutionUseFormVOList != null) {
standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList); standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList);
} }
return standardReserveSolutionVOById; return standardReserveSolutionVOById;
} }
@ -107,6 +106,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
throw new RuntimeException(String.format("请先领用标准物质后,再进行操作")); throw new RuntimeException(String.format("请先领用标准物质后,再进行操作"));
} }
StandardReserveSolution standardReserveSolution = new StandardReserveSolution(); StandardReserveSolution standardReserveSolution = new StandardReserveSolution();
BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution); BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution);
@ -376,20 +376,20 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
solutionUseFormVO.setFormat(format); solutionUseFormVO.setFormat(format);
} }
if (voList.size()<7){ // if (voList.size()<7){
int s = 7-voList.size(); // int s = 7-voList.size();
for (int i = 0; i < s; i++) { // for (int i = 0; i < s; i++) {
SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO(); // SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO();
solutionUseFormVO.setOrderOfUse(voList.size()+1); // solutionUseFormVO.setOrderOfUse(voList.size()+1);
voList.add(solutionUseFormVO); // voList.add(solutionUseFormVO);
} // }
}else { // }else {
int s = 7-voList.size()%7; // int s = 7-voList.size()%7;
for (int i = 0; i < s; i++) { // for (int i = 0; i < s; i++) {
SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO(); // SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO();
voList.add(solutionUseFormVO); // voList.add(solutionUseFormVO);
} // }
} // }
HashMap<String, String > solutionUseFormVOMap = new HashMap<>(); HashMap<String, String > solutionUseFormVOMap = new HashMap<>();
@ -430,7 +430,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
put("referenceMaterialScale", standardReserveSolutionVO.getReferenceMaterialScale()); put("referenceMaterialScale", standardReserveSolutionVO.getReferenceMaterialScale());
put("useOfSolvent", standardReserveSolutionVO.getUseOfSolvent()); put("useOfSolvent", standardReserveSolutionVO.getUseOfSolvent());
put("constantVolume", standardReserveSolutionVO.getConstantVolume()); put("constantVolume", standardReserveSolutionVO.getConstantVolume());
put("configurationConcentration", standardReserveSolutionVO.getConfigurationConcentration()); put("configurationConcentration", String.format("%.4f",standardReserveSolutionVO.getConfigurationConcentration()));
put("dispenserName", standardReserveSolutionVO.getDispenserName()); put("dispenserName", standardReserveSolutionVO.getDispenserName());
put("validityPeriod", standardReserveSolutionVO.getValidityPeriod()); put("validityPeriod", standardReserveSolutionVO.getValidityPeriod());
put("remarks", standardReserveSolutionVO.getRemarks()); put("remarks", standardReserveSolutionVO.getRemarks());

@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -75,24 +76,30 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
@Override @Override
public StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser) { public StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser) {
if (!StrUtil.isNotBlank(standardSolutionCurveDTO.getStepSolutionConcentration())){
throw new RuntimeException(String.format("输入的浓度有误,请检查!"));
}
StandardSolutionCurve standardSolutionCurve = new StandardSolutionCurve(); StandardSolutionCurve standardSolutionCurve = new StandardSolutionCurve();
StandardReserveSolution byId = standardReserveSolutionService.getById(standardSolutionCurveDTO.getSolutionId()); StandardReserveSolution byId = standardReserveSolutionService.getById(standardSolutionCurveDTO.getSolutionId());
if (byId.getStatus() != 1) { // if (byId.getStatus() != 1) {
throw new RuntimeException(String.format("当前标准储备溶液还未入库,请先入库后再使用")); // throw new RuntimeException(String.format("当前标准储备溶液还未入库,请先入库后再使用"));
// }
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
if (byId == null) {
referenceMaterial = referenceMaterialService.getById(standardSolutionCurveDTO.getSolutionId());
} else {
referenceMaterial = referenceMaterialService.getById(byId.getReferenceId());
} }
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceId()); // if (referenceMaterial.getStatus() != -3) {
// throw new RuntimeException(String.format("请先领用该标准储备溶液后,再进行操作"));
if (referenceMaterial.getStatus() != -3) { //
throw new RuntimeException(String.format("请先领用该标准储备溶液后,再进行操作")); // } else
// if (!(referenceMaterial.getStatus() == 0 || referenceMaterial.getStatus() == -2||referenceMaterial.getStatus()==-3)) {
} else if (!(referenceMaterial.getStatus() == 0 || referenceMaterial.getStatus() == -2||referenceMaterial.getStatus()==-3)) { // throw new RuntimeException(String.format("该标准储备溶液已使用完毕或已停止使用/报废使用,不能进行操作"));
// }
throw new RuntimeException(String.format("该标准储备溶液已使用完毕或已停止使用/报废使用,不能进行操作"));
}
standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase()); standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase());

@ -112,7 +112,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
@GlobalTransactional @GlobalTransactional
@Override//录入入库明细 @Override//录入入库明细
public WarehousingRecordFormVO addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser) { public void addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser) {
if (warehousingRecordFormDTO.getDateOfProduction() == null) {//如果没有生产日期,默认当前时间为生产日期 if (warehousingRecordFormDTO.getDateOfProduction() == null) {//如果没有生产日期,默认当前时间为生产日期
warehousingRecordFormDTO.setDateOfProduction(LocalDate.now()); warehousingRecordFormDTO.setDateOfProduction(LocalDate.now());
@ -266,7 +266,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
newNo = 1; newNo = 1;
} }
} }
referenceMaterial.setNumber(prefix + String.format("%03d", newNo)); referenceMaterial.setNumber(prefix + newNo);
referenceMaterialService.save(referenceMaterial); referenceMaterialService.save(referenceMaterial);
} }
} }
@ -373,7 +373,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
newNo = 1; newNo = 1;
} }
} }
referenceMaterial.setNumber(prefix + String.format("%03d", newNo)); referenceMaterial.setNumber(prefix + newNo);
referenceMaterialService.save(referenceMaterial); referenceMaterialService.save(referenceMaterial);
} }
@ -456,8 +456,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
warehousingRecordForm.setStatus(1); warehousingRecordForm.setStatus(1);
} }
this.updateById(warehousingRecordForm); this.updateById(warehousingRecordForm);
WarehousingRecordFormVO warehousingRecordFormVO = this.getWarehousingRecordFormVO(warehousingRecordFormId);//签收单VO
return warehousingRecordFormVO;
} }
@Override @Override
public IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm> qw) { public IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm> qw) {

@ -179,4 +179,17 @@
FROM reference_material rmp FROM reference_material rmp
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="getReagentConsumablePage"
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO">
SELECT b1.batch,b1.batch_details_id,b1.quantity,r1.*,(SELECT si.supplier_name FROM supplier_information si WHERE
si.id = b1.supplier_id) as supplier_name FROM batch_details b1, reagent_consumable_inventory r1 WHERE
(r1.category = '试剂' or r1.category = '耗材') and b1.reagent_consumable_inventory_id =
r1.reagent_consumable_inventory_id and b1.service_status = '1'
<if test="name !=null and name !=''">
and b1.reagent_consumable_inventory_id in (SELECT reagent_consumable_inventory_id FROM
reagent_consumable_inventory WHERE reagent_consumable_name like concat('%',#{name},'%'))
</if>
</select>
</mapper> </mapper>

Loading…
Cancel
Save