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. 46
      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. 15
      src/main/resources/mapper/ReagentConsumableInventoryMapper.xml

@ -26,8 +26,6 @@ public class ReagentManagmentApplication {
// System.out.println("end of Spring Application main()");
// System.out.println("-----------------------------");
// System.out.println("\n\n\n");
}
// @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,
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -151,17 +150,16 @@ public class PurchasingPlanController {
/**
* 新增(采购计划)
*
* @param purchasingPlanDTOList (采购计划)
* @return R
*/
@ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划) 参数DTO:(detailsOfCentralizedId,quantity = ,)")
@SysLog("新增(采购计划)")
@PostMapping
@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();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTOList, dlpUser);
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTO.getIdList(), dlpUser);
if (purchasingPlanVO != null) {
return R.ok(purchasingPlanVO, "保存成功");

@ -146,7 +146,7 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
@GetMapping("/List")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, Integer warning, String remark, String category,HttpServletRequest theHttpServletRequest) {
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, Integer warning, String remark, String category, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, Wrappers.<ReagentConsumableInventory>query()
@ -192,24 +192,24 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表")
@GetMapping("/MList")
// @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();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper
.eq("category", "试剂")
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
.eq("category", "试剂")
.like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or()
.eq("category", "耗材")
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
.eq("category", "耗材")
.like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName));
return R.ok(allRM);
IPage reagentConsumablePage = reagentConsumableInventoryMapper.getReagentConsumablePage(page, reagentConsumableName);
// IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper
// .eq("category", "试剂")
// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
// .eq("category", "试剂")
// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or()
// .eq("category", "耗材")
// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
// .eq("category", "耗材")
// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName));
return R.ok(reagentConsumablePage);
}
/**
@ -220,11 +220,11 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表")
@GetMapping("/full")
// @PreAuthorize("@pms.hasPermission(' ')")
public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(Page page,String category, String name, HttpServletRequest theHttpServletRequest) {
public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(Page page, String category, String name, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page,name,category);
IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page, name, category);
return R.ok(fullVOPage);
}
@ -357,6 +357,20 @@ public class ReagentConsumableInventoryController {
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);
if (byId.getStatus() == -3) {
throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用"));
}
// if (byId.getStatus() == -3) {
// throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用"));
// }
byId.setStatus(-1);
@ -219,8 +219,6 @@ public class StandardMaterialApprovalFormController {
throw new RuntimeException("未查询到相关信息");
}
String applyFileName = "标准物质停用报废销毁恢复降级使用审批表" + id;
;
String pdfFilePath = "document" + "/" + "standardMaterialApprovalForm" + "/" + id + "/" + applyFileName + ".pdf";
try {

@ -138,19 +138,16 @@ public class WarehousingRecordFormController {
@SysLog("新增签收记录表")
@PostMapping
// @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();
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")
private String supplierId;
private String [] idList;
}

@ -37,7 +37,7 @@ public class ReferenceMaterial extends BaseEntity {
@ApiModelProperty(value="试剂耗材Id")
private String reagentConsumableId;
@ApiModelProperty(value="使用状态 0 正常使用、-2降级使用")
@ApiModelProperty(value="使用状态 0为可以使用、-2为降级使用、-3 已被领用 主要为备用状态区分被领用时")
private Integer serviceStatus;
@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> getReagentConsumablePage (IPage<ReagentConsumableInventory>page, @Param("name") String name );
}

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

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

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

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

@ -539,6 +539,7 @@ 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);

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

@ -116,7 +116,8 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
if (referenceMaterial.getServiceStatus() == -2) {
referenceMaterial.setStatus(-2);
}
} else {
}
if (referenceMaterial.getStatus() == -3) {
referenceMaterial.setStatus(0);
}
BatchDetails byId2 = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
@ -239,21 +240,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
Calendar instance = Calendar.getInstance();
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;
}
}

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

@ -94,7 +94,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
if (solutionUseFormVOList != null) {
standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList);
}
return standardReserveSolutionVOById;
}
@ -107,6 +106,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
throw new RuntimeException(String.format("请先领用标准物质后,再进行操作"));
}
StandardReserveSolution standardReserveSolution = new StandardReserveSolution();
BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution);
@ -376,20 +376,20 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
solutionUseFormVO.setFormat(format);
}
if (voList.size()<7){
int s = 7-voList.size();
for (int i = 0; i < s; i++) {
SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO();
solutionUseFormVO.setOrderOfUse(voList.size()+1);
voList.add(solutionUseFormVO);
}
}else {
int s = 7-voList.size()%7;
for (int i = 0; i < s; i++) {
SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO();
voList.add(solutionUseFormVO);
}
}
// if (voList.size()<7){
// int s = 7-voList.size();
// for (int i = 0; i < s; i++) {
// SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO();
// solutionUseFormVO.setOrderOfUse(voList.size()+1);
// voList.add(solutionUseFormVO);
// }
// }else {
// int s = 7-voList.size()%7;
// for (int i = 0; i < s; i++) {
// SolutionUseFormVO solutionUseFormVO = new SolutionUseFormVO();
// voList.add(solutionUseFormVO);
// }
// }
HashMap<String, String > solutionUseFormVOMap = new HashMap<>();
@ -430,7 +430,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
put("referenceMaterialScale", standardReserveSolutionVO.getReferenceMaterialScale());
put("useOfSolvent", standardReserveSolutionVO.getUseOfSolvent());
put("constantVolume", standardReserveSolutionVO.getConstantVolume());
put("configurationConcentration", standardReserveSolutionVO.getConfigurationConcentration());
put("configurationConcentration", String.format("%.4f",standardReserveSolutionVO.getConfigurationConcentration()));
put("dispenserName", standardReserveSolutionVO.getDispenserName());
put("validityPeriod", standardReserveSolutionVO.getValidityPeriod());
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.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -75,24 +76,30 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
@Override
public StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser) {
if (!StrUtil.isNotBlank(standardSolutionCurveDTO.getStepSolutionConcentration())){
throw new RuntimeException(String.format("输入的浓度有误,请检查!"));
}
StandardSolutionCurve standardSolutionCurve = new StandardSolutionCurve();
StandardReserveSolution byId = standardReserveSolutionService.getById(standardSolutionCurveDTO.getSolutionId());
if (byId.getStatus() != 1) {
throw new RuntimeException(String.format("当前标准储备溶液还未入库,请先入库后再使用"));
// if (byId.getStatus() != 1) {
// 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("请先领用该标准储备溶液后,再进行操作"));
} else if (!(referenceMaterial.getStatus() == 0 || referenceMaterial.getStatus() == -2||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)) {
// throw new RuntimeException(String.format("该标准储备溶液已使用完毕或已停止使用/报废使用,不能进行操作"));
// }
standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase());

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

@ -77,7 +77,7 @@
FROM dlp_base.sys_user user ,dlp_base. b_staff s1
WHERE s1.user_id = user.user_id
<if test="name !=null and name !=''">
and user.name like concat('%',#{name},'%')
and user.name like concat('%',#{name},'%')
</if>
</select>
@ -179,4 +179,17 @@
FROM reference_material rmp
${ew.customSqlSegment}
</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>

Loading…
Cancel
Save