提供位置修改接口,获取房间号以及展示所有试剂耗材位置信息

main
杨海航 1 year ago
parent 6241b22077
commit 6f7a8de1ea
  1. 7
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  2. 1
      src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java
  3. 1
      src/main/java/digital/laboratory/platform/reagent/service/PurchaseListService.java
  4. 3
      src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java
  5. 69
      src/main/java/digital/laboratory/platform/reagent/service/impl/DecentralizedRequestServiceImpl.java
  6. 81
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListServiceImpl.java
  7. 26
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java
  8. 24
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  9. 9
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesServiceImpl.java
  10. 19
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java
  11. 3
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java
  12. 2
      src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApplicationVO.java

@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.security.Principal; import java.security.Principal;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 试剂耗材库存 * 试剂耗材库存
@ -414,5 +415,9 @@ public class ReagentConsumableInventoryController {
return reagentConsumableInventoryService.updateLocation(batchDetails) ? R.ok("修改成功!") : R.failed("修改失败"); return reagentConsumableInventoryService.updateLocation(batchDetails) ? R.ok("修改成功!") : R.failed("修改失败");
} }
@GetMapping("/get/batch/{batchDetailsId}")
@ApiOperation(value = "通过对应批次ID查找批次物品详情信息")
public R<Map> getBatch(@PathVariable String batchDetailsId) {
return R.ok(reagentConsumableInventoryService.getBatchVO(batchDetailsId));
}
} }

@ -101,4 +101,5 @@ public class BatchDetails extends BaseEntity {
private String batchDetailsId; private String batchDetailsId;
} }

@ -37,4 +37,5 @@ public interface PurchaseListService extends IService<PurchaseList> {
IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw); IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw);
List<PurchaseListDetails> addList(String id, Integer type);
} }

@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 试剂耗材库存服务类 * 试剂耗材库存服务类
@ -66,5 +67,7 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
@Transactional @Transactional
boolean updateLocation(BatchDetails batchDetails); boolean updateLocation(BatchDetails batchDetails);
Map<String, Object> getBatchVO(String id);
// List<OrgFullVO> getOrgList(); // List<OrgFullVO> getOrgList();
} }

@ -3,6 +3,8 @@ package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
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.ObjectUtil;
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;
@ -292,81 +294,23 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
@Override//审批 @Override//审批
@Transactional @Transactional
public DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) { public DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId()); DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
if (byId.getStatus() != 4) { if (byId.getStatus() != 4) {
throw new RuntimeException(String.format("当前状态不能审批")); throw new RuntimeException(String.format("当前状态不能审批"));
} }
byId.setApproverId(dlpUser.getId()); byId.setApproverId(dlpUser.getId());
byId.setResultOfApproval(auditAndApproveDto.getApproveResult()); byId.setResultOfApproval(auditAndApproveDto.getApproveResult());
byId.setOpinionOfApproval(auditAndApproveDto.getApproveOpinion()); byId.setOpinionOfApproval(auditAndApproveDto.getApproveOpinion());
byId.setApprovalOfTime(LocalDateTime.now()); byId.setApprovalOfTime(LocalDateTime.now());
if (auditAndApproveDto.getApproveResult() == true) { if (auditAndApproveDto.getApproveResult() == true) {
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(new LambdaQueryWrapper<DecentralizeDetails>().eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId()));
//如果未购入过该物品,则将该物品信息更新至试剂耗材类
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId());
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
if (decentralizeDetails.getReagentConsumableId() == null) {
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails);
decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
decentralizeDetailsService.updateById(decentralizeDetails);
} else {
ReagentConsumables byId1 = reagentConsumablesService.getById(decentralizeDetails.getReagentConsumableId());
byId1.setTechnicalParameter(decentralizeDetails.getTechnicalParameter());
reagentConsumablesService.updateById(byId1);
}
}
//创建采购清单 //创建采购清单
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper1 = new LambdaQueryWrapper<>(); List<PurchaseListDetails> purchaseListDetailsList = purchaseListService.addList(byId.getId(), 0);
decentralizeDetailsLambdaQueryWrapper1.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId());
List<DecentralizeDetails> list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper1);
PurchaseList purchaseList = new PurchaseList();
purchaseList.setName(DateTime.now() + "采购清单");
purchaseList.setStatus(0);
purchaseList.setCreateBy(byId.getCreateBy());
purchaseList.setType("分散采购申请");
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
byId.setPurchaseListId(purchaseList.getId());
this.updateById(byId);
purchaseListService.save(purchaseList);
for (DecentralizeDetails decentralizeDetails : list) {
PurchaseListDetails purchaseListDetails = new PurchaseListDetails();
purchaseListDetails.setId(IdWorker.get32UUID().toUpperCase());
purchaseListDetails.setReagentConsumableId(decentralizeDetails.getReagentConsumableId());
purchaseListDetails.setPurchaseListId(purchaseList.getId());
purchaseListDetails.setPurchaseQuantity(decentralizeDetails.getQuantity());
purchaseListDetailsService.save(purchaseListDetails);
decentralizeDetails.setPurchaseListDetailsId(purchaseListDetails.getId());
decentralizeDetailsService.updateById(decentralizeDetails);
if (purchaseListDetailsList == null) {
throw new RuntimeException(String.format("出错了,请及时联系工作人员"));
} }
byId.setStatus(5); byId.setStatus(5);
} else { } else {
byId.setStatus(-5); byId.setStatus(-5);
@ -374,7 +318,6 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
if (this.updateById(byId)) { if (this.updateById(byId)) {
return byId; return byId;
} else return null; } else return null;
} }
@Override @Override

@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.service.impl; package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.date.DateTime;
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;
@ -8,10 +9,6 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.config.ConfigureBuilder;
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import digital.laboratory.platform.common.feign.RemoteWord2PDFService; import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
import digital.laboratory.platform.common.oss.service.OssFile; import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.dto.PurchaseListDTO; import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
@ -19,22 +16,14 @@ import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.mapper.PurchaseListMapper; import digital.laboratory.platform.reagent.mapper.PurchaseListMapper;
import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.*; import digital.laboratory.platform.reagent.vo.*;
import feign.Response;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
@ -220,10 +209,72 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
@Override//分页查询采购清单列表 @Override//分页查询采购清单列表
public IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw) { public IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw) {
IPage<PurchaseListPageVO> purchaseListVOPage = baseMapper.getPurchaseListVOPage(page, qw); IPage<PurchaseListPageVO> purchaseListVOPage = baseMapper.getPurchaseListVOPage(page, qw);
return purchaseListVOPage; return purchaseListVOPage;
} }
@Override
public List<PurchaseListDetails> addList(String id, Integer type) {
if (type == 0) {
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(new LambdaQueryWrapper<DecentralizeDetails>().eq(DecentralizeDetails::getDecentralizedRequestId, id));
DecentralizedRequest decentralizedRequest = decentralizedRequestService.getById(id);
PurchaseList purchaseList = new PurchaseList();
purchaseList.setName(DateTime.now() + "采购清单");
purchaseList.setStatus(0);
purchaseList.setCreateBy(decentralizedRequest.getCreateBy());
purchaseList.setType("分散采购申请");
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
decentralizedRequest.setPurchaseListId(purchaseList.getId());
ArrayList<PurchaseListDetails> purchaseListDetailsArrayList = new ArrayList<>();
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
if (StrUtil.isNotBlank(decentralizeDetails.getReagentConsumableId())) {
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails);
decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
}
PurchaseListDetails purchaseListDetails = new PurchaseListDetails();
purchaseListDetails.setId(IdWorker.get32UUID().toUpperCase());
purchaseListDetails.setReagentConsumableId(decentralizeDetails.getReagentConsumableId());
purchaseListDetails.setPurchaseListId(purchaseList.getId());
purchaseListDetails.setPurchaseQuantity(decentralizeDetails.getQuantity());
decentralizeDetails.setPurchaseListDetailsId(purchaseListDetails.getId());
purchaseListDetailsArrayList.add(purchaseListDetails);
}
if (this.save(purchaseList) &&
decentralizedRequestService.updateById(decentralizedRequest) &&
decentralizeDetailsService.updateBatchById(decentralizeDetailsList) &&
purchaseListDetailsService.saveBatch(purchaseListDetailsArrayList)) {
return purchaseListDetailsArrayList;
} else return null;
} else {
PurchasingPlan purchasingPlan = purchasingPlanService.getById(id);
List<ProcurementContent> procurementContentList = procurementContentService.list(new LambdaQueryWrapper<ProcurementContent>().eq(ProcurementContent::getPurchasingPlanId, id));
PurchaseList purchaseList = new PurchaseList();//创建采购清单
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
purchaseList.setName(DateTime.now() + "采购清单");//清单名称
purchaseList.setStatus(0);//状态
purchaseList.setType("采购计划");//清单类型,区分分散采购申请和采购计划
purchaseList.setCreateBy(purchasingPlan.getCreateBy());//清单创建人
purchasingPlan.setPurchaseListId(purchaseList.getId());//关联采购清单
ArrayList<PurchaseListDetails> purchaseListDetailsArrayList = new ArrayList<>();
for (ProcurementContent procurementContent : procurementContentList) {
PurchaseListDetails purchaseListDetails = new PurchaseListDetails();//采购清单明细
purchaseListDetails.setPurchaseListId(purchaseList.getId());//关联采购清单
purchaseListDetails.setPurchaseQuantity(procurementContent.getQuantityPurchased());//采购数量
purchaseListDetails.setReagentConsumableId(procurementContent.getReagentConsumableId());//采购试剂耗材ID
purchaseListDetails.setId(IdWorker.get32UUID().toUpperCase());
purchaseListDetails.setProcurementContentId(procurementContent.getProcurementContentId());//关联采购计划明细
purchaseListDetailsArrayList.add(purchaseListDetails);
}
if (this.save(purchaseList) &&
purchasingPlanService.updateById(purchasingPlan) &&
procurementContentService.updateBatchById(procurementContentList) &&
purchaseListDetailsService.saveBatch(purchaseListDetailsArrayList)) {
return purchaseListDetailsArrayList;
} else return null;
}
}
} }

@ -498,30 +498,10 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
purchasingPlan.setApproverId(dlpUser.getId());//审批人ID purchasingPlan.setApproverId(dlpUser.getId());//审批人ID
//审批通过则创建采购清单 //审批通过则创建采购清单
if (auditAndApproveDto.getApproveResult() == true) { if (auditAndApproveDto.getApproveResult() == true) {
purchasingPlan.setStatus(5);//审批通过 purchasingPlan.setStatus(5);//审批通过
LambdaQueryWrapper<ProcurementContent> procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); List<PurchaseListDetails> purchaseListDetailsList = purchaseListService.addList(purchasingPlan.getPurchasingPlanId(), 1);
procurementContentLambdaQueryWrapper.eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId()); if (purchaseListDetailsList == null) {
List<ProcurementContent> list = procurementContentService.list(procurementContentLambdaQueryWrapper);//采购计划明细 throw new RuntimeException(String.format("出错了,请及时联系工作人员"));
PurchaseList purchaseList = new PurchaseList();//创建采购清单
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
purchaseList.setName(DateTime.now() + "采购清单");//清单名称
purchaseList.setStatus(0);//状态
purchaseList.setType("采购计划");//清单类型,区分分散采购申请和采购计划
purchaseList.setCreateBy(purchasingPlan.getCreateBy());//清单创建人
purchaseListService.save(purchaseList);
purchasingPlan.setPurchaseListId(purchaseList.getId());//关联采购清单
for (ProcurementContent procurementContent : list) {
PurchaseListDetails purchaseListDetails = new PurchaseListDetails();//采购清单明细
purchaseListDetails.setPurchaseListId(purchaseList.getId());//关联采购清单
purchaseListDetails.setPurchaseQuantity(procurementContent.getQuantityPurchased());//采购数量
purchaseListDetails.setReagentConsumableId(procurementContent.getReagentConsumableId());//采购试剂耗材ID
purchaseListDetails.setId(IdWorker.get32UUID().toUpperCase());
purchaseListDetails.setProcurementContentId(procurementContent.getProcurementContentId());//关联采购计划明细
purchaseListDetailsService.save(purchaseListDetails);
} }
} else { } else {
purchasingPlan.setStatus(-5);//审核不通过 purchasingPlan.setStatus(-5);//审核不通过

@ -804,7 +804,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
oldBatchDetails.setLocation(batchDetails.getLocation()); oldBatchDetails.setLocation(batchDetails.getLocation());
oldBatchDetails.setBoxId(batchDetails.getBoxId()); oldBatchDetails.setBoxId(batchDetails.getBoxId());
oldBatchDetails.setLocation(batchDetails.getLocation()); oldBatchDetails.setLocation(batchDetails.getLocation());
oldBatchDetails.setRoomNo(batchDetails.getLocation().substring(3, 6)); String[] split = batchDetails.getLocation().split("_");
String roomNo = split[1];
oldBatchDetails.setRoomNo(roomNo);
if (batchDetailsService.updateById(oldBatchDetails)) { if (batchDetailsService.updateById(oldBatchDetails)) {
this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), 1); this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), 1);
@ -812,4 +814,24 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
} else return false; } else return false;
} }
@Override
public Map<String, Object> getBatchVO(String id) {
BatchDetails batchDetails = batchDetailsService.getById(id);
if (batchDetails == null) {
throw new RuntimeException(String.format("没有找到对应的物品信息"));
}
BatchDetailsVO batchDetailsVO = new BatchDetailsVO();
BeanUtils.copyProperties(batchDetails, batchDetailsVO);
batchDetailsVO.setSupplierName(supplierInformationService.getById(batchDetails.getSupplierId()).getSupplierName());
ReagentConsumableInventory reagentConsumableInventory = this.getById(batchDetails.getReagentConsumableInventoryId());
HashMap<String, Object> objectObjectHashMap = new HashMap<>();
objectObjectHashMap.put("batchDetails", batchDetailsVO);
objectObjectHashMap.put("reagentConsumableInventory", reagentConsumableInventory);
return objectObjectHashMap;
}
} }

@ -20,19 +20,12 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumable
@Override @Override
public ReagentConsumables addReagentConsumables(Object object){ public ReagentConsumables addReagentConsumables(Object object){
ReagentConsumables reagentConsumables = new ReagentConsumables(); ReagentConsumables reagentConsumables = new ReagentConsumables();
BeanUtils.copyProperties(object,reagentConsumables); BeanUtils.copyProperties(object,reagentConsumables);
reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase()); reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
if (!(this.save(reagentConsumables))){ if (!(this.save(reagentConsumables))){
throw new RuntimeException(String.format("系统错误"));
throw new RuntimeException(String.format("系统错误,试剂耗材目录更新失败"));
} }
return reagentConsumables; return reagentConsumables;
} }
} }

@ -2,9 +2,11 @@ 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.ObjectUtil;
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;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.deepoove.poi.XWPFTemplate; import com.deepoove.poi.XWPFTemplate;
@ -178,23 +180,17 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
record.setCategory(byId.getCategory()); record.setCategory(byId.getCategory());
//将位置信息传入VO对象 //将位置信息传入VO对象
ReferenceMaterial byId1 = referenceMaterialService.getById(record.getReferenceMaterialId()); ReferenceMaterial byId1 = referenceMaterialService.getById(record.getReferenceMaterialId());
record.setLocation(byId1.getLocation()); record.setLocation(byId1.getLocation());
record.setLatticeId(byId1.getLatticeId()); record.setLatticeId(byId1.getLatticeId());
record.setBoxId(byId1.getBoxId()); record.setBoxId(byId1.getBoxId());
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, record.getReferenceMaterialId()); standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, record.getReferenceMaterialId());
StandardReserveSolution one = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper); StandardReserveSolution one = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
record.setReagentConsumables(byId); record.setReagentConsumables(byId);
if (one != null) { if (one != null) {
double configurationConcentration = one.getConfigurationConcentration(); Double configurationConcentration = one.getConfigurationConcentration();
record.setConfigurationConcentration(configurationConcentration); record.setConfigurationConcentration(String.format("%.4f",configurationConcentration)+" mg/ml");
} }
} }
@ -208,13 +204,18 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
Integer x = 1; Integer x = 1;
for (StandardMaterialApplicationVO standardMaterialApplicationVO : voList) { for (StandardMaterialApplicationVO standardMaterialApplicationVO : voList) {
StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getOne(new LambdaQueryWrapper<StandardReserveSolution>()
.eq(StandardReserveSolution::getReferenceId, standardMaterialApplicationVO.getReferenceMaterialId()));
if (!ObjectUtil.isNull(standardReserveSolution)){
standardMaterialApplicationVO.setSpecification(String.format("%.4f",standardReserveSolution.getConfigurationConcentration())+" mg/ml");
}
standardMaterialApplicationVO.setDateOfClaims(LocalDateTimeUtil.format(standardMaterialApplicationVO.getDateOfClaim(), "yyyy年MM月dd日")); standardMaterialApplicationVO.setDateOfClaims(LocalDateTimeUtil.format(standardMaterialApplicationVO.getDateOfClaim(), "yyyy年MM月dd日"));
standardMaterialApplicationVO.setDateOfReturns(LocalDateTimeUtil.format(standardMaterialApplicationVO.getDateOfReturn(), "yyyy年MM月dd日")); standardMaterialApplicationVO.setDateOfReturns(LocalDateTimeUtil.format(standardMaterialApplicationVO.getDateOfReturn(), "yyyy年MM月dd日"));
standardMaterialApplicationVO.setIndex(x.toString()); standardMaterialApplicationVO.setIndex(x.toString());
if (standardMaterialApplicationVO.getPurpose() == 0) { if (standardMaterialApplicationVO.getPurpose() == 0) {
standardMaterialApplicationVO.setPrintPurposeAndQuantity("案件," + standardMaterialApplicationVO.getPurposeAndQuantity()); standardMaterialApplicationVO.setPrintPurposeAndQuantity("案件," + standardMaterialApplicationVO.getPurposeAndQuantity());
} else { } else {
standardMaterialApplicationVO.setPrintPurposeAndQuantity("其他," + standardMaterialApplicationVO.getPurposeAndQuantity()); standardMaterialApplicationVO.setPrintPurposeAndQuantity("其他," + standardMaterialApplicationVO.getPurposeAndQuantity());
} }

@ -172,6 +172,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);//拷贝信息 BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);//拷贝信息
if (!StrUtil.isNotBlank(warehousingRecordFormDTO.getBatchNumber())){
}
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
reagentConsumableInventory.setStatus(1);//状态 1为正常 reagentConsumableInventory.setStatus(1);//状态 1为正常
reagentConsumableInventory.setCreateTime(LocalDateTime.now()); reagentConsumableInventory.setCreateTime(LocalDateTime.now());

@ -25,7 +25,7 @@ public class StandardMaterialApplicationVO extends StandardMaterialApplication {
private String category; private String category;
@ApiModelProperty(value="(配置浓度(mg/mL))") @ApiModelProperty(value="(配置浓度(mg/mL))")
private double configurationConcentration; private String configurationConcentration;
private ReagentConsumables reagentConsumables; private ReagentConsumables reagentConsumables;

Loading…
Cancel
Save