提供位置修改接口,获取房间号以及展示所有试剂耗材位置信息
This commit is contained in:
+10
-5
@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 试剂耗材库存
|
||||
@@ -405,14 +406,18 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
@PutMapping("/update/location")
|
||||
@ApiOperation(value = "修改试剂/耗材位置信息",
|
||||
notes = "需要将四个参数传入包装体:" +"\n"+
|
||||
"1. 对应试剂耗材批次ID:batchDetailsId" +"\n"+
|
||||
"2. 格子ID:latticeId" +"\n"+
|
||||
"3. 柜子ID :boxId" +"\n"+
|
||||
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("修改失败");
|
||||
}
|
||||
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,4 +37,5 @@ public interface PurchaseListService extends IService<PurchaseList> {
|
||||
|
||||
IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw);
|
||||
|
||||
List<PurchaseListDetails> addList(String id, Integer type);
|
||||
}
|
||||
|
||||
+3
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 试剂耗材库存服务类
|
||||
@@ -66,5 +67,7 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
@Transactional
|
||||
boolean updateLocation(BatchDetails batchDetails);
|
||||
|
||||
Map<String, Object> getBatchVO(String id);
|
||||
|
||||
// List<OrgFullVO> getOrgList();
|
||||
}
|
||||
|
||||
+6
-63
@@ -3,6 +3,8 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
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.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -292,81 +294,23 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
@Override//审批
|
||||
@Transactional
|
||||
public DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||
|
||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus() != 4) {
|
||||
throw new RuntimeException(String.format("当前状态不能审批"));
|
||||
}
|
||||
byId.setApproverId(dlpUser.getId());
|
||||
|
||||
byId.setResultOfApproval(auditAndApproveDto.getApproveResult());
|
||||
|
||||
byId.setOpinionOfApproval(auditAndApproveDto.getApproveOpinion());
|
||||
|
||||
byId.setApprovalOfTime(LocalDateTime.now());
|
||||
|
||||
if (auditAndApproveDto.getApproveResult() == true) {
|
||||
|
||||
//如果未购入过该物品,则将该物品信息更新至试剂耗材类
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(new LambdaQueryWrapper<DecentralizeDetails>().eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId()));
|
||||
//创建采购清单
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
|
||||
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);
|
||||
List<PurchaseListDetails> purchaseListDetailsList = purchaseListService.addList(byId.getId(), 0);
|
||||
|
||||
if (purchaseListDetailsList == null) {
|
||||
throw new RuntimeException(String.format("出错了,请及时联系工作人员"));
|
||||
}
|
||||
|
||||
|
||||
byId.setStatus(5);
|
||||
} else {
|
||||
byId.setStatus(-5);
|
||||
@@ -374,7 +318,6 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+67
-16
@@ -1,6 +1,7 @@
|
||||
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.QueryWrapper;
|
||||
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.Wrappers;
|
||||
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.oss.service.OssFile;
|
||||
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.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
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.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -180,7 +169,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
warehousingContent.setWarehousingRecordFormId(warehousingRecordForm.getId());//关联入库表
|
||||
warehousingContent.setSupplierId(purchaseListDetails.getSupplierId());//供应商ID
|
||||
warehousingContent.setWarehousingQuantity(0);//初始状态
|
||||
if (reagentConsumables.getCode()!=null){
|
||||
if (reagentConsumables.getCode() != null) {
|
||||
warehousingContent.setCode(reagentConsumables.getCode());//物品编码
|
||||
}
|
||||
warehousingContent.setPurchaseListDetailsId(purchaseListDetails.getId());//关联采购清单明细
|
||||
@@ -220,10 +209,72 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
@Override//分页查询采购清单列表
|
||||
public IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw) {
|
||||
|
||||
IPage<PurchaseListPageVO> purchaseListVOPage = baseMapper.getPurchaseListVOPage(page, qw);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-24
@@ -498,30 +498,10 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
purchasingPlan.setApproverId(dlpUser.getId());//审批人ID
|
||||
//审批通过则创建采购清单
|
||||
if (auditAndApproveDto.getApproveResult() == true) {
|
||||
|
||||
purchasingPlan.setStatus(5);//审批通过
|
||||
LambdaQueryWrapper<ProcurementContent> procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
procurementContentLambdaQueryWrapper.eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId());
|
||||
List<ProcurementContent> list = procurementContentService.list(procurementContentLambdaQueryWrapper);//采购计划明细
|
||||
|
||||
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);
|
||||
List<PurchaseListDetails> purchaseListDetailsList = purchaseListService.addList(purchasingPlan.getPurchasingPlanId(), 1);
|
||||
if (purchaseListDetailsList == null) {
|
||||
throw new RuntimeException(String.format("出错了,请及时联系工作人员"));
|
||||
}
|
||||
} else {
|
||||
purchasingPlan.setStatus(-5);//审核不通过
|
||||
@@ -578,7 +558,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
return replacementVO;
|
||||
}
|
||||
|
||||
public void print (List<PurchaseRequestPrintVO> voList, HttpServletResponse response){
|
||||
public void print(List<PurchaseRequestPrintVO> voList, HttpServletResponse response) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+23
-1
@@ -804,7 +804,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
oldBatchDetails.setLocation(batchDetails.getLocation());
|
||||
oldBatchDetails.setBoxId(batchDetails.getBoxId());
|
||||
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)) {
|
||||
this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), 1);
|
||||
@@ -812,4 +814,24 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-8
@@ -20,19 +20,12 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumable
|
||||
|
||||
@Override
|
||||
public ReagentConsumables addReagentConsumables(Object object){
|
||||
|
||||
ReagentConsumables reagentConsumables = new ReagentConsumables();
|
||||
|
||||
BeanUtils.copyProperties(object,reagentConsumables);
|
||||
|
||||
reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
if (!(this.save(reagentConsumables))){
|
||||
|
||||
throw new RuntimeException(String.format("系统错误,试剂耗材目录更新失败"));
|
||||
throw new RuntimeException(String.format("系统错误"));
|
||||
}
|
||||
|
||||
return reagentConsumables;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-9
@@ -2,9 +2,11 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
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.QueryWrapper;
|
||||
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.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
@@ -178,23 +180,17 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
record.setCategory(byId.getCategory());
|
||||
//将位置信息传入VO对象
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(record.getReferenceMaterialId());
|
||||
|
||||
record.setLocation(byId1.getLocation());
|
||||
record.setLatticeId(byId1.getLatticeId());
|
||||
record.setBoxId(byId1.getBoxId());
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, record.getReferenceMaterialId());
|
||||
|
||||
StandardReserveSolution one = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
record.setReagentConsumables(byId);
|
||||
|
||||
if (one != null) {
|
||||
double configurationConcentration = one.getConfigurationConcentration();
|
||||
record.setConfigurationConcentration(configurationConcentration);
|
||||
|
||||
Double configurationConcentration = one.getConfigurationConcentration();
|
||||
record.setConfigurationConcentration(String.format("%.4f",configurationConcentration)+" mg/ml");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -208,13 +204,18 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
Integer x = 1;
|
||||
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.setDateOfReturns(LocalDateTimeUtil.format(standardMaterialApplicationVO.getDateOfReturn(), "yyyy年MM月dd日"));
|
||||
standardMaterialApplicationVO.setIndex(x.toString());
|
||||
if (standardMaterialApplicationVO.getPurpose() == 0) {
|
||||
standardMaterialApplicationVO.setPrintPurposeAndQuantity("案件," + standardMaterialApplicationVO.getPurposeAndQuantity());
|
||||
|
||||
} else {
|
||||
standardMaterialApplicationVO.setPrintPurposeAndQuantity("其他," + standardMaterialApplicationVO.getPurposeAndQuantity());
|
||||
}
|
||||
|
||||
+3
@@ -172,6 +172,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);//拷贝信息
|
||||
|
||||
if (!StrUtil.isNotBlank(warehousingRecordFormDTO.getBatchNumber())){
|
||||
|
||||
}
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumableInventory.setStatus(1);//状态 1为正常
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public class StandardMaterialApplicationVO extends StandardMaterialApplication {
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value="(配置浓度(mg/mL))")
|
||||
private double configurationConcentration;
|
||||
private String configurationConcentration;
|
||||
|
||||
private ReagentConsumables reagentConsumables;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user