main
杨海航 1 year ago
parent 0419f0370f
commit 6241b22077
  1. 19
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  2. 2
      src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java
  3. 6
      src/main/java/digital/laboratory/platform/reagent/entity/Blacklist.java
  4. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java
  5. 1
      src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationPlanService.java
  6. 4
      src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java
  7. 11
      src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java
  8. 35
      src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java
  9. 6
      src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java
  10. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationImplementationServiceImpl.java
  11. 13
      src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationPlanServiceImpl.java
  12. 4
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java
  13. 6
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java
  14. 58
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  15. 3
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java
  16. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java
  17. 28
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java
  18. 4
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java
  19. 1
      src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationPlanVO.java
  20. 8
      src/main/resources/mapper/RequisitionRecordMapper.xml

@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.controller;
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;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@ -11,6 +12,7 @@ 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.reagent.dto.ReagentConsumableInventoryDTO;
import digital.laboratory.platform.reagent.entity.BatchDetails;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
@ -109,11 +111,11 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
@GetMapping("/standardList")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
public R<IPage<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page<ReagentConsumableInventory> page, Integer warning, String remark, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
public R<IPage<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page<ReagentConsumableInventory> page, Integer warning, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.<ReagentConsumableInventory>query()
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page,
Wrappers.<ReagentConsumableInventory>query()
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
.like(warning != null && warning == 1, "warning_information", "库存不足")
.eq("category", "标准物质").or()
@ -401,5 +403,16 @@ public class ReagentConsumableInventoryController {
}
@PutMapping("/update/location")
@ApiOperation(value = "修改试剂/耗材位置信息",
notes = "需要将四个参数传入包装体:" +"\n"+
"1. 对应试剂耗材批次ID:batchDetailsId" +"\n"+
"2. 格子ID:latticeId" +"\n"+
"3. 柜子ID :boxId" +"\n"+
"4. 位置信息:location")
public R<String> updateLocation(@RequestBody BatchDetails batchDetails) {
return reagentConsumableInventoryService.updateLocation(batchDetails) ? R.ok("修改成功!") : R.failed("修改失败");
}
}

@ -99,9 +99,9 @@ public class RequisitionRecordController {
IPage<RequisitionRecordVO> requisitionRecordSList = requisitionRecordService.getRequisitionRecordVOPage(page, Wrappers.<RequisitionRecord>query()
.like(StrUtil.isNotBlank(name), "reagent_consumable_name", name)
.orderByDesc("date_of_claim")
.ge(startTime != null, "create_time", startTime)
.le(endTime != null, "create_time", endTime)
.orderByDesc("date_of_claim")
);
return R.ok(requisitionRecordSList);
// return R.ok(requisitionRecordService.page(page, Wrappers.query(requisitionRecord)));

@ -24,6 +24,12 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "(试剂耗材黑名单)")
public class Blacklist extends BaseEntity {
public static void main(String[] args) {
int a = 5;
int b =2 ;
System.out.println(a/b);
}
/**
* (试剂耗材ID)
*/

@ -70,6 +70,4 @@ public class ReferenceMaterial extends BaseEntity {
@ApiModelProperty(value = "单位")
private String referenceMaterialUnit;
}

@ -20,7 +20,6 @@ import java.util.List;
public interface PeriodVerificationPlanService extends IService<PeriodVerificationPlan> {
List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList ( String checkScheduleId);
IPage<PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage (Page<PeriodVerificationPlan> page, QueryWrapper<PeriodVerificationPlan> qw);
void getPlan();

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO;
import digital.laboratory.platform.reagent.entity.BatchDetails;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.vo.*;
@ -62,5 +63,8 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
List<OrgFullVO> getOrgList();
@Transactional
boolean updateLocation(BatchDetails batchDetails);
// List<OrgFullVO> getOrgList();
}

@ -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;
@ -303,7 +304,6 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());
if (reagentConsumables.getCategory().equals("标准物质")) {
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
purchaseRequestPrintVO.setApplicantName(centralizedRequest.getApplicantName());
purchaseRequestPrintVO.setPurpose(detailsOfCentralized.getPurpose());
@ -354,26 +354,24 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
System.out.println("purchaseRequestTablePDF.................");
int x = 1;
double total = 0;
for (PurchaseRequestPrintVO purchaseRequestPrintVO : voList) {
purchaseRequestPrintVO.setI(x);
if (!StrUtil.isNotBlank(purchaseRequestPrintVO.getRemarks())){
purchaseRequestPrintVO.setRemarks("无");
}
total = total + purchaseRequestPrintVO.getSubtotal();
x++;
}
String firstAuditName = null;
String secondAuditName = null;
String thirdAuditName = null;
String fourthAuditName = null;
String commitTime = null;
//-----------------------------
// 生成 word 版本的 采购目录
if (type.equals("集中采购申请")) {
CentralizedRequestVO centralizedRequestVO = this.getCentralizedRequestVO(id);
if (centralizedRequestVO.getStatus() != 4) {
throw new RuntimeException(String.format("还未被制定为采购清单,无法打印"));
@ -384,7 +382,6 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
thirdAuditName = byId.getPrimaryAuditorName();
fourthAuditName = byId.getApproverName();
commitTime = LocalDateTimeUtil.format(centralizedRequestVO.getDateOfApplication(), "yyyy年MM月dd日");
} else {
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
if (requestById.getStatus() != 6) {

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
@ -148,7 +149,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
} else {
if (byId.getStatus()==-2){
if (byId.getStatus() == -2) {
CheckScheduleVO checkScheduleVO = this.addPlan(periodVerificationPlanDTOS, dlpUser);
@ -156,7 +157,6 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
}
CheckSchedule checkSchedule = this.editPlan(periodVerificationPlanDTOS);
checkSchedule.setStatus(1);
@ -183,7 +183,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
LambdaQueryWrapper<PeriodVerificationPlan> periodVerificationPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId,byId.getId());
periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId, byId.getId());
List<PeriodVerificationPlan> list = periodVerificationPlanService.list(periodVerificationPlanLambdaQueryWrapper);
@ -221,6 +221,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
return checkScheduleVO;
}
@Override
public void checkScheduleTablePDF(CheckScheduleVO checkScheduleVO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
System.out.println("checkScheduleTablePDF.................");
@ -228,16 +229,20 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
String id = checkScheduleVO.getId();
List<PeriodVerificationPlanVO> voList = checkScheduleVO.getPeriodVerificationPlanVOS();
int x= 1;
int x = 1;
for (PeriodVerificationPlanVO periodVerificationPlanVO : voList) {
periodVerificationPlanVO.setI(x);
if (periodVerificationPlanVO.getVerificationResult()!=null&&periodVerificationPlanVO.getVerificationResult().equals("P")){
if (!StringUtils.isNotBlank(periodVerificationPlanVO.getDeviationAndUncertainty())) {
periodVerificationPlanVO.setDeviationAndUncertainty("/");
}
if (!StringUtils.isNotBlank(periodVerificationPlanVO.getStandardValueOrPurity())) {
periodVerificationPlanVO.setStandardValueOrPurity("/");
}
if (periodVerificationPlanVO.getVerificationResult() != null && periodVerificationPlanVO.getVerificationResult().equals("P")) {
periodVerificationPlanVO.setP("√");
}else if (periodVerificationPlanVO.getVerificationResult()!=null&&periodVerificationPlanVO.getVerificationResult().equals("D")){
} else if (periodVerificationPlanVO.getVerificationResult() != null && periodVerificationPlanVO.getVerificationResult().equals("D")) {
periodVerificationPlanVO.setD("√");
}else if (periodVerificationPlanVO.getVerificationResult()!=null&&periodVerificationPlanVO.getVerificationResult().equals("F")){
} else if (periodVerificationPlanVO.getVerificationResult() != null && periodVerificationPlanVO.getVerificationResult().equals("F")) {
periodVerificationPlanVO.setF("√");
}
x++;
@ -261,7 +266,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
builder.bind("voList",policy).build();
builder.bind("voList", policy).build();
Calendar instance = Calendar.getInstance();
int year = instance.get(Calendar.YEAR);
@ -270,11 +275,11 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
*/
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
new HashMap<String, Object>() {{
put("voList",voList);
put("year",year);
put("managerName",checkScheduleVO.getManagerName());
put("technicalDirectorName",checkScheduleVO.getTechnicalDirectorName());
put("auditTimeOfTechnical", LocalDateTimeUtil.format(checkScheduleVO.getAuditTimeOfTechnical(),"yyyy年MM月dd日"));
put("voList", voList);
put("year", year);
put("managerName", checkScheduleVO.getManagerName());
put("technicalDirectorName", checkScheduleVO.getTechnicalDirectorName());
put("auditTimeOfTechnical", LocalDateTimeUtil.format(checkScheduleVO.getAuditTimeOfTechnical(), "yyyy年MM月dd日"));
}}
);

@ -176,7 +176,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
}
@Override//提交出库登记表
@Transactional
@GlobalTransactional
public DeliveryRegistrationForm commitForm(List<OutgoingContentsDTO> outgoingContentsDTOS, DLPUser dlpUser) {
DeliveryRegistrationForm deliveryRegistrationForm = this.getById(outgoingContentsDTOS.get(0).getDeliveryRegistrationFormId());//得到出库登记表
@ -252,7 +252,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
if (referenceMaterial.getStatus() == -3) {
throw new RuntimeException(String.format("该物品已被其他工作人员领用"));
}
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);
referenceMaterial.setStatus(-3);//改变状态
referenceMaterial.setServiceStatus(-3);
// reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息
@ -311,6 +311,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
}
referenceMaterial.setStatus(-3);
referenceMaterial.setServiceStatus(-3);
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);
referenceMaterialService.updateById(referenceMaterial);
// reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
@ -340,6 +341,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
batchDetails.setQuantity(batchDetails.getQuantity() - outgoingContentsDTO.getQuantity());
if (batchDetails.getQuantity() == 0) {
batchDetails.setServiceStatus(-1);
reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(),batchDetails.getReagentConsumableInventoryId(),-1);
// reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), reagentConsumables.getReagentConsumableId(),-1);
}
batchDetailsService.updateById(batchDetails);

@ -258,7 +258,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
put("referenceMaterialName", periodVerificationImplementationVO.getReferenceMaterialName());
put("referenceMaterialNumber", periodVerificationImplementationVO.getReferenceMaterialNumber());
put("standardValueOrPurity", periodVerificationImplementationVO.getStandardValueOrPurity());
put("deviationAndUncertainty", periodVerificationImplementationVO.getDeviationAndUncertainty());
put("deviationAndUncertainty", periodVerificationImplementationVO.getDeviationAndUncertainty()!=null?periodVerificationImplementationVO.getDeviationAndUncertainty():"无");
put("inspectorName", periodVerificationImplementationVO.getInspectorName());
put("verificationMethod", periodVerificationImplementationVO.getVerificationMethod());
put("implementationAndResults", periodVerificationImplementationVO.getImplementationAndResults());

@ -47,15 +47,12 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
List<PeriodVerificationPlanVO> periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOList(checkScheduleId);
for (PeriodVerificationPlanVO periodVerificationPlanVO : periodVerificationPlanVOPage) {
ReferenceMaterial byId = referenceMaterialService.getById(periodVerificationPlanVO.getReferenceMaterialId());
ReagentConsumables byId1 = reagentConsumablesService.getById(byId.getReagentConsumableId());
periodVerificationPlanVO.setReferenceMaterialName(byId1.getReagentConsumableName());
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(periodVerificationPlanVO.getReferenceMaterialId());
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId());
periodVerificationPlanVO.setReferenceMaterialName(reagentConsumables.getReagentConsumableName());
periodVerificationPlanVO.setDeviationAndUncertainty(reagentConsumables.getDeviationOrUncertainty());
periodVerificationPlanVO.setStandardValueOrPurity(reagentConsumables.getStandardValueOrPurity());
}
return periodVerificationPlanVOPage;
}

@ -296,11 +296,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
public List<CatalogueDetails> getList(String name, Integer category) {
QueryWrapper<PurchaseCatalogue> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("status", 4);
QueryWrapper<PurchaseCatalogue> queryWrapper1 = queryWrapper.orderByDesc("update_time");
List<PurchaseCatalogue> list = this.list(queryWrapper1);
if (list.size() == 0) {
@ -324,7 +321,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
if (list == null & list.size() == 0) {
throw new RuntimeException(String.format("未存在已发布的采购目录"));
}
Collections.sort(catalogueDetailsList, new Comparator<CatalogueDetails>() {

@ -14,6 +14,7 @@ import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.mapper.PurchasingPlanMapper;
import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
import digital.laboratory.platform.reagent.vo.PurchaseRequestPrintVO;
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
import digital.laboratory.platform.reagent.vo.ReplacementVO;
import org.springframework.beans.BeanUtils;
@ -21,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@ -574,6 +576,10 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
replacementVO.setReagentConsumables(reagentConsumables);//换货试剂耗材信息
}
return replacementVO;
}
public void print (List<PurchaseRequestPrintVO> voList, HttpServletResponse response){
}
}

@ -18,7 +18,6 @@ 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;
@ -28,6 +27,7 @@ import digital.laboratory.platform.sys.entity.CabinetCell;
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData;
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
import feign.Response;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -562,7 +562,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
Calendar instance = Calendar.getInstance();
int year = instance.get(Calendar.YEAR);
IntegerUtils integerUtils = new IntegerUtils();
for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) {
Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * reagentConsumableInventoryDTO.getPackagedCopies();
SupplierInformation supplier = supplierInformationService.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName()));
@ -570,6 +569,32 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO
.getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation();
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity())) {
reagentConsumableInventoryDTO.setStandardValueOrPurity("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty())) {
reagentConsumableInventoryDTO.setDeviationOrUncertainty("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getEnglishName())) {
reagentConsumableInventoryDTO.setEnglishName("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber())) {
reagentConsumableInventoryDTO.setCasNumber("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCode())) {
reagentConsumableInventoryDTO.setCode("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPurityGrade())) {
reagentConsumableInventoryDTO.setPurityGrade("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getRemark())) {
reagentConsumableInventoryDTO.setRemark("");
}
if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getAlias())) {
reagentConsumableInventoryDTO.setAlias("");
}
ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query()
.eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand())
@ -579,7 +604,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getEnglishName()), "english_name", reagentConsumableInventoryDTO.getEnglishName())
.eq(reagentConsumableInventoryDTO.getPackagedCopies()!=null, "packaged_copies", reagentConsumableInventoryDTO.getPackagedCopies())
.eq(reagentConsumableInventoryDTO.getPackagedCopies() != null, "packaged_copies", reagentConsumableInventoryDTO.getPackagedCopies())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getAlias()), "alias", reagentConsumableInventoryDTO.getAlias())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPurityGrade()), "purity_grade", reagentConsumableInventoryDTO.getPurityGrade())
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty()), "deviation_or_uncertainty", reagentConsumableInventoryDTO.getDeviationOrUncertainty())
@ -674,18 +699,13 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumableInventory);
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
reagentConsumableInventory.setWarningValue(1);
if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) {
if (reagentConsumableInventoryDTO.getPackages() != null) {
if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) {
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());
@ -772,4 +792,24 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
System.out.println("总个数" + orgFullVOS.size());
return orgFullVOS;
}
@Override
@GlobalTransactional
public boolean updateLocation(BatchDetails batchDetails) {
BatchDetails oldBatchDetails = batchDetailsService.getById(batchDetails.getBatchDetailsId());
this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), -1);//清除原来位置信息ID
oldBatchDetails.setLocation(batchDetails.getLocation());
oldBatchDetails.setBoxId(batchDetails.getBoxId());
oldBatchDetails.setLocation(batchDetails.getLocation());
oldBatchDetails.setRoomNo(batchDetails.getLocation().substring(3, 6));
if (batchDetailsService.updateById(oldBatchDetails)) {
this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), 1);
return true;
} else return false;
}
}

@ -88,8 +88,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceMaterialId());
remoteCabinetService.updateCabinet(standardMaterialApplicationDTO.getLatticeId(), referenceMaterial.getId(), "1");
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId());
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
@ -136,7 +134,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
}
batchDetailsService.updateById(byId2);
reagentConsumableInventoryService.updateById(byId1);
remoteCabinetService.updateCabinet(standardMaterialApplicationDTO.getLatticeId(), referenceMaterial.getId(), "1");
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), 1);
}
referenceMaterialService.updateById(referenceMaterial);

@ -257,7 +257,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
put("auditTimeOfSecondary", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getAuditTimeOfSecondary(),"yyyy年MM月dd日"));
put("approvalOfTime", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getApprovalOfTime(),"yyyy年MM月dd日"));
put("quantity", standardMaterialApprovalFormVO.getQuantity());
put("fixedResult", standardMaterialApprovalFormVO.getFixedResult());
put("fixedResult", standardMaterialApprovalFormVO.getFixedResult()!=null?standardMaterialApprovalFormVO.getFixedResult():"未上传定值报告");
put("createName", standardMaterialApprovalFormVO.getCreateName());
put("applicationContent", standardMaterialApprovalFormVO.getApplicationContent());
put("agentName", standardMaterialApprovalFormVO.getAgentName());

@ -87,7 +87,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
standardReserveSolutionVOById.setPrintName(standardReserveSolutionVOById.getSolutionName());
String format = String.format("%.4f", standardReserveSolutionVOById.getConfigurationConcentration());
standardReserveSolutionVOById.setConfigurationDatePrint(standardReserveSolutionVOById.getDispenserName() + "-" + LocalDateTimeUtil.format(standardReserveSolutionVOById.getConfigurationDate(), "yyyy-MM-dd") +"-"+ format);
standardReserveSolutionVOById.setConfigurationDatePrint(standardReserveSolutionVOById.getDispenserName() + "-" + LocalDateTimeUtil.format(standardReserveSolutionVOById.getConfigurationDate(), "yyyy-MM-dd") + "-" + format);
//查出该标准储备溶液对应的所有使用记录
List<SolutionUseFormVO> solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId());
@ -242,7 +242,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
Calendar calendar = Calendar.getInstance();
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService. getById(standardReserveSolutionDTO.getReferenceMaterialId());
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
String prefix = referenceMaterialServiceById.getNumber() + "-";
@ -337,7 +337,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
referenceMaterialService.updateById(referenceMaterialServiceById);
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterialServiceById.getReagentConsumableInventoryId());
reagentConsumableInventoryService.updateCabinet(referenceMaterialServiceById.getLatticeId(),referenceMaterialServiceById.getId(),1);
reagentConsumableInventoryService.updateCabinet(referenceMaterialServiceById.getLatticeId(), referenceMaterialServiceById.getId(), 1);
if (reagentConsumableInventory.getTotalQuantity() != null) {
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + 1);
@ -375,14 +375,19 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
List<SolutionUseFormVO> voList = standardReserveSolutionVO.getSolutionUseFormVOList();
for (SolutionUseFormVO solutionUseFormVO : voList) {
LocalDateTime createTime = solutionUseFormVO.getCreateTime();
voList.sort((a, b) -> a.getCreateTime().compareTo(b.getCreateTime()));
String format = LocalDateTimeUtil.format(createTime, "yyyy年MM月dd日");
HashMap solutionUseFormVOHashMap = new HashMap<String, Object>();
List<Map<String, Object>> maps = new ArrayList<>();
solutionUseFormVO.setFormat(format);
for (int i = 0; i < voList.size(); i++) {
voList.get(i).setFormat(LocalDateTimeUtil.format(voList.get(i).getCreateTime(), "yyyy年MM月dd日"));
solutionUseFormVOHashMap.put("userName" + (i + 1), voList.get(i).getUserName());
solutionUseFormVOHashMap.put("format" + (i + 1), voList.get(i).getFormat());
solutionUseFormVOHashMap.put("quantityUsed" + (i + 1), voList.get(i).getQuantityUsed());
}
maps.add(solutionUseFormVOHashMap);
// if (voList.size()<7){
// int s = 7-voList.size();
@ -418,7 +423,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
builder.bind("voList", policy).build();
builder.bind("maps", policy).build();
Calendar instance = Calendar.getInstance();
int year = instance.get(Calendar.YEAR);
@ -427,7 +432,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
*/
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
new HashMap<String, Object>() {{
put("voList", voList);
put("maps", maps);
put("year", year);
put("solutionName", standardReserveSolutionVO.getSolutionName());
put("solutionNumbering", standardReserveSolutionVO.getSolutionNumbering());
@ -435,11 +440,12 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
put("referenceMaterialScale", standardReserveSolutionVO.getReferenceMaterialScale());
put("useOfSolvent", standardReserveSolutionVO.getUseOfSolvent());
put("constantVolume", standardReserveSolutionVO.getConstantVolume());
put("configurationConcentration", String.format("%.4f",standardReserveSolutionVO.getConfigurationConcentration()));
put("configurationConcentration", String.format("%.4f", standardReserveSolutionVO.getConfigurationConcentration()));
put("dispenserName", standardReserveSolutionVO.getDispenserName());
put("validityPeriod", standardReserveSolutionVO.getValidityPeriod());
put("remarks", standardReserveSolutionVO.getRemarks());
put("configurationDate", LocalDateTimeUtil.format(standardReserveSolutionVO.getConfigurationDate(), "yyyy年MM月dd日"));
put("referenceMaterialUnit", referenceMaterialService.getById(standardReserveSolutionVO.getReferenceMaterialId()).getReferenceMaterialUnit());
}}
);
bis.close();

@ -229,7 +229,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
if (reagentConsumables.getCategory().equals("试剂") | reagentConsumables.getCategory().equals("耗材")) {
//更新格子信息(试剂耗材传入类ID)
reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), reagentConsumables.getReagentConsumableId(), 1);
reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), reagentConsumableInventory.getReagentConsumableInventoryId(), 1);
}
reagentConsumableInventory.setTotalQuantity(quantity);//数量
@ -338,7 +338,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
}
if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) {
//更新格子信息(试剂耗材传入类ID)
reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), reagentConsumables.getReagentConsumableId(), 1);
reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), one.getReagentConsumableInventoryId(), 1);
}
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity());
one.setWarningValue(warehousingRecordFormDTO.getWarningValue());

@ -17,6 +17,7 @@ public class PeriodVerificationPlanVO extends PeriodVerificationPlan {
private String department;
private String standardValueOrPurity;
@ApiModelProperty(value = "(打印标签)")
private String P;
private String D;

@ -42,12 +42,12 @@
</select>
<select id="getRequisitionRecordVO" resultMap="requisitionRecordVO" resultType="digital.laboratory.platform.reagent.vo.RequisitionRecordVO">
SELECT rr.*,
SELECT rrs.*,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=rr.recipient_id
WHERE user.user_id=rrs.recipient_id
) AS recipient_name
FROM requisition_record rr
WHERE rr.requisition_record_id = #{id}
FROM requisition_record rrs
WHERE rrs.requisition_record_id = #{id}
</select>
</mapper>

Loading…
Cancel
Save