This commit is contained in:
2023-05-09 21:45:27 +08:00
parent 1cbbd4a8a3
commit fed8bedd32
29 changed files with 306 additions and 162 deletions
@@ -56,7 +56,7 @@ public class DeliveryRegistrationFormController {
* @param deliveryRegistrationFormId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@ApiOperation(value = "通过ID查询", notes = "通过ID查询")
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
public R<DeliveryRegistrationFormVO> getById(String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) {
@@ -68,6 +68,23 @@ public class DeliveryRegistrationFormController {
//return R.ok(deliveryRegistrationFormService.getById(deliveryRegistrationFormId));
}
/**
* 通过领取码(试剂耗材出库登记表)
* @param claimCode id
* @return R
*/
@ApiOperation(value = "通过领取码查询", notes = "通过领取码查询")
@GetMapping("/code")
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
public R<DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOByCode(String claimCode, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DeliveryRegistrationFormVO deliveryRegistrationForm = deliveryRegistrationFormService.getDeliveryRegistrationFormVOByCode(claimCode);
return R.ok(deliveryRegistrationForm);
//return R.ok(deliveryRegistrationFormService.getById(deliveryRegistrationFormId));
}
/**
* 分页查询
* @param page 分页对象
@@ -76,11 +76,11 @@ public class PurchaseListController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_page')" )
public R<IPage<PurchaseList>> getPurchaseListPage(Page<PurchaseList> page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
public R<IPage<PurchaseListPageVO>> getPurchaseListPage(Page<PurchaseList> page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<PurchaseList> purchaseListSList = purchaseListService.page(page, Wrappers.<PurchaseList>query()
IPage<PurchaseListPageVO> purchaseListSList = purchaseListService.getPurchaseListVOPage(page, Wrappers.<PurchaseList>query()
.orderByDesc("create_time")
);
return R.ok(purchaseListSList);
@@ -1,5 +1,6 @@
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;
@@ -100,10 +101,10 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
@GetMapping("/standardList")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
public R<Page<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page page, String name, HttpServletRequest theHttpServletRequest) {
public R<Page<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, name);
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, reagentConsumableName);
return R.ok(reagentConsumableInventoryRMVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
@@ -111,10 +112,10 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
@GetMapping("/List")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
public R<Page<ReagentConsumableInventoryVO>> getList(Page page, String name, HttpServletRequest theHttpServletRequest) {
public R<Page<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page, name);
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page, reagentConsumableName);
return R.ok(reagentConsumableInventoryVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
@@ -148,16 +149,9 @@ public class ReagentConsumableInventoryController {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
if (category!=null){
reagentConsumableInventoryQueryWrapper.eq("category",category);
}
if (name!=null){
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name",name);
}
List<ReagentConsumableInventory> reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(reagentConsumableInventoryQueryWrapper);
List<ReagentConsumableInventory> reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(Wrappers.<ReagentConsumableInventory>query()
.eq((StrUtil.isNotBlank(category)),"category",category)
.like((StrUtil.isNotBlank(name)),"reagent_consumable_name",name));
return R.ok(reagentConsumableInventoryFull);
}
@@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -47,13 +48,13 @@ public class ReagentConsumablesController {
* 分页查询
*
* @param page 分页对象
* @param reagentConsumables (试剂耗材类)
* @param name (试剂耗材类)
* @return
*/
@ApiOperation(value = "分页查询试剂耗材类(包括标准物质)", notes = "分页查询试剂耗材类(包括标准物质)")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
public R<IPage<ReagentConsumables>> getReagentConsumablesPage(Page<ReagentConsumables> page, ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
public R<IPage<ReagentConsumables>> getReagentConsumablesPage(Page<ReagentConsumables> page, String name, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@@ -61,6 +62,7 @@ public class ReagentConsumablesController {
.eq("category", "试剂").or()
.eq("category", "耗材").or()
.eq("category", "标准物质")
.eq(StrUtil.isNotBlank(name),"reagent_consumable_name",name)
.orderByDesc("create_time")
);
return R.ok(reagentConsumablesSList);
@@ -18,38 +18,41 @@ import java.time.LocalDateTime;
@NoArgsConstructor
public class WarehousingRecordFormDTO {
@ApiModelProperty(value="批号")
@ApiModelProperty(value = "批号")
private String batchNumber;
@JsonFormat(pattern = "yyyy-MM-dd")
@JSONField(format = "yyyy-MM-dd")
@ApiModelProperty(value="(生产日期)")
@ApiModelProperty(value = "(生产日期)")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate dateOfProduction;
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value="(有效日期)")
@ApiModelProperty(value = "(有效日期)")
private LocalDate expirationDate;
@ApiModelProperty(value="(数量)")
@ApiModelProperty(value = "(数量)")
private Integer quantity;
@ApiModelProperty(value="(入库批次明细ID)")
@ApiModelProperty(value = "(入库批次明细ID)")
private String warehousingBatchListId;
@ApiModelProperty(value="(入库内容ID)")
@ApiModelProperty(value = "(入库内容ID)")
private String warehousingContentId;
@ApiModelProperty(value="(格子ID)")
@ApiModelProperty(value = "(格子ID)")
private String latticeId;
@ApiModelProperty(value="(备注)")
@ApiModelProperty(value = "(备注)")
private String remark;
@ApiModelProperty(value="(存储期限)")
private String limitDate;
@ApiModelProperty(value = "(存储期限)")
private String limitDate;
@ApiModelProperty(value = "(预警值)")
private Integer warning_value;
}
@@ -7,6 +7,7 @@ import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -52,7 +53,7 @@ public class BatchDetails extends BaseEntity {
* (生产日期)
*/
@ApiModelProperty(value="(生产日期)")
private LocalDateTime dateOfProduction;
private LocalDate dateOfProduction;
/**
* (偏差/不确定度)
@@ -50,8 +50,6 @@ public class DeliveryRegistrationForm extends BaseEntity {
/**
* deliveryRegistrationFormId
*/
@@ -1,7 +1,13 @@
package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import digital.laboratory.platform.reagent.entity.PurchaseList;
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -14,4 +20,6 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface PurchaseListMapper extends BaseMapper<PurchaseList> {
IPage<PurchaseListPageVO> getPurchaseListVOPage (IPage<PurchaseList> page, @Param(Constants.WRAPPER)QueryWrapper<PurchaseList> qw);
}
@@ -30,5 +30,7 @@ public interface DeliveryRegistrationFormService extends IService<DeliveryRegist
DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId);
ReagentConsumablesVO scanById(String reagentConsumableId, String referenceMaterialId);
//通过ID查询出库内容
DeliveryRegistrationFormVO getDeliveryRegistrationFormVOByCode(String claimCode);
}
@@ -1,5 +1,8 @@
package digital.laboratory.platform.reagent.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
import digital.laboratory.platform.reagent.entity.PurchaseList;
@@ -7,6 +10,7 @@ import digital.laboratory.platform.reagent.entity.PurchaseListDetails;
import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO;
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -26,4 +30,5 @@ public interface PurchaseListService extends IService<PurchaseList> {
PurchaseListDetailsVO addDetails(PurchaseListDTO purchaseListDTO);
IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw);
}
@@ -32,7 +32,7 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
//分页查询试剂耗材
Page<ReagentConsumableInventoryFullVO> getAllRM(Integer current, Integer size,String reagentConsumableName);
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(Page page,String name);
Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(Page page,String reagentConsumableName);
List<ReagentConsumableInventory> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw);
}
@@ -133,6 +133,10 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
AcceptanceRecordFormVO acceptanceRecordFormVO = baseMapper.getAcceptanceRecordFormVO(acceptanceRecordFormId);
ReagentConsumables byId = reagentConsumablesService.getById(acceptanceRecordFormVO.getReagentConsumableId());
acceptanceRecordFormVO.setReagentConsumables(byId);
return acceptanceRecordFormVO;
}
@@ -64,6 +64,12 @@ public class BatchDetailsServiceImpl extends ServiceImpl<BatchDetailsMapper, Bat
batchDetailsVO.setSupplierName(byId1.getSupplierName());
if (batchDetailsVO.getDateOfProduction()!=null){
batchDetailsVO.setMaturityTime(batchDetailsVO.getDateOfProduction().plusMonths(batchDetailsVO.getExpirationDate()));
}
batchDetailsVOS.add(batchDetailsVO);
}
return batchDetailsVOS;
@@ -49,7 +49,6 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
centralizedRequest.setId(IdWorker.get32UUID().toUpperCase());
//获取申请时间
centralizedRequest.setDateOfApplication(LocalDateTime.now());
//未提交
centralizedRequest.setStatus(0);
@@ -82,6 +81,8 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
CentralizedRequest centralizedRequest = centralizedRequestService.addRequest(centralizedRequestDTOList, dlpUser);
centralizedRequest.setDateOfApplication(LocalDateTime.now());
centralizedRequest.setStatus(1);
if (centralizedRequestService.updateById(centralizedRequest)){
@@ -91,6 +92,8 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
CentralizedRequest byId = centralizedRequestService.getById(centralizedRequestDTOList.get(0).getCentralizedRequestId());
byId.setDateOfApplication(LocalDateTime.now());
byId.setStatus(1);
if (centralizedRequestService.updateById(byId)){
@@ -118,11 +118,13 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
byId.setCommitTime(LocalDateTime.now());
if (byId == null) {
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
checkSchedule.setStatus(1);
checkSchedule.setCommitTime(LocalDateTime.now());
checkScheduleService.updateById(checkSchedule);
return checkSchedule;
@@ -132,6 +134,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
CheckSchedule checkSchedule = checkScheduleService.editPlan(periodVerificationPlanDTOS);
checkSchedule.setStatus(1);
checkSchedule.setCommitTime(LocalDateTime.now());
checkScheduleService.updateById(checkSchedule);
@@ -1,8 +1,10 @@
package digital.laboratory.platform.reagent.service.impl;
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.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
@@ -13,7 +15,6 @@ import digital.laboratory.platform.reagent.mapper.DeliveryRegistrationFormMapper
import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO;
import digital.laboratory.platform.reagent.vo.OutgoingContentsVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -369,34 +370,50 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
return deliveryRegistrationFormVOById;
}
@Override//通过ID查询出库内容
public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOByCode(String claimCode) {
@Override
public ReagentConsumablesVO scanById(String reagentConsumableId, String referenceMaterialId) {
if (!StrUtil.isNotBlank(claimCode)){
if (!(referenceMaterialId.equals("0"))) {
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId);
ReferenceMaterial byId1 = referenceMaterialService.getById(referenceMaterialId);
ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO();
BeanUtils.copyProperties(byId, reagentConsumablesVO);
reagentConsumablesVO.setNumber(byId1.getNumber());
reagentConsumablesVO.setReferenceMaterialId(referenceMaterialId);
return reagentConsumablesVO;
} else {
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId);
ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO();
BeanUtils.copyProperties(byId, reagentConsumablesVO);
return reagentConsumablesVO;
return null;
}
ApplicationForUse applicationForUse = applicationForUseService.getOne(Wrappers.<ApplicationForUse>query()
.eq("claim_code", claimCode));
DeliveryRegistrationFormVO deliveryRegistrationFormVOById = baseMapper.getDeliveryRegistrationFormVOById(applicationForUse.getDeliveryRegistrationFormId());
LambdaQueryWrapper<OutgoingContents> outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId, deliveryRegistrationFormVOById.getId());
List<OutgoingContents> list = outgoingContentsService.list(outgoingContentsLambdaQueryWrapper);
List<OutgoingContentsVO> outgoingContentsVOS = new ArrayList<>();
if (list.size() != 0) {
for (OutgoingContents outgoingContents : list) {
OutgoingContentsVO outgoingContentsVO = new OutgoingContentsVO();
BeanUtils.copyProperties(outgoingContents, outgoingContentsVO);
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, outgoingContents.getReagentConsumableId());
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
outgoingContentsVO.setReagentConsumableInventory(one);
outgoingContentsVOS.add(outgoingContentsVO);
}
deliveryRegistrationFormVOById.setOutgoingContentsList(outgoingContentsVOS);
}
return deliveryRegistrationFormVOById;
}
}
@@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
@@ -41,7 +42,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
private PurchaseListDetailsService purchaseListDetailsService;
@Override//通过供应商ID查询评价表列表
public List <EvaluationFormVO > getEvaluationFormVOList(String supplierInformationId) {
public List<EvaluationFormVO> getEvaluationFormVOList(String supplierInformationId) {
List<EvaluationFormVO> evaluationFormVOList = baseMapper.getEvaluationFormVOList(supplierInformationId);
@@ -54,6 +55,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
return evaluationFormVOList;
}
@Override
public EvaluationFormVO getFormById(String evaluationFormId) {
@@ -65,22 +67,40 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
return evaluationForm;
}
@Override
public EvaluationForm addForm(String supplierInformationId){
public EvaluationForm addForm(String supplierInformationId) {
EvaluationForm evaluationForm = new EvaluationForm();
evaluationForm.setId(IdWorker.get32UUID().toUpperCase());
evaluationForm.setSupplierInformationId(supplierInformationId);
if (evaluationFormService.save(evaluationForm)){
if (evaluationFormService.save(evaluationForm)) {
return evaluationForm;
}else return null;
} else return null;
}
@Override//填写评价表并提交
public EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO,DLPUser dlpUser) {
public EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO, DLPUser dlpUser) {
if (!(StrUtil.isNotBlank(evaluationFormDTO.getContactNumber()) &
StrUtil.isNotBlank(evaluationFormDTO.getContactPerson()) &
StrUtil.isNotBlank(evaluationFormDTO.getSupplierBusinessLicense())&
StrUtil.isNotBlank(evaluationFormDTO.getSupplierPassesQualityAssuranceSystem())&
StrUtil.isNotBlank(evaluationFormDTO.getSupplierProductCertification())&
StrUtil.isNotBlank(evaluationFormDTO.getCheckAndCalibrateEfficiencyOfSupplies())&
StrUtil.isNotBlank(evaluationFormDTO.getOverallSupplierServiceSatisfaction())&
StrUtil.isNotBlank(evaluationFormDTO.getSupplierAttitude())&
StrUtil.isNotBlank(evaluationFormDTO.getSupplierEquipmentAndFacilities())&
StrUtil.isNotBlank(evaluationFormDTO.getSupplierTechnologyAndManagementCapability())&
StrUtil.isNotBlank(evaluationFormDTO.getWhetherTheSupplierDeliversOnTime())&
StrUtil.isNotBlank(evaluationFormDTO.getSupplierInformationId())&
StrUtil.isNotBlank(evaluationFormDTO.getEvaluationFormId()))){
throw new RuntimeException(String.format("请完善评价信息后再提交"));
}
EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId());
@@ -129,7 +149,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
EvaluationForm byId = evaluationFormService.getById(auditAndApproveDTO.getUuId());
byId.setSecondaryUserId(dlpUser.getId());
byId.setThreeLevelUserId(dlpUser.getId());
byId.setCommentsDateFromThreeLevel(LocalDate.now());
@@ -149,13 +169,12 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
}
@Override//通过供应商ID查询评价表列表
public EvaluationFormVO getEvaluationFormVO(String id) {
public EvaluationFormVO getEvaluationFormVO(String id) {
EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(id);
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationForm.getId());
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationForm.getId());
evaluationForm.setProvideServicesOrSuppliesVOList(voList);
@@ -124,6 +124,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
periodVerificationPlan.setImplementationDate(byId.getCheckingTime());
periodVerificationPlan.setInspectorId(dlpUser.getId());
if (periodVerificationImplementationService.updateById(byId) && periodVerificationPlanService
.updateById(periodVerificationPlan)) {
@@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.service.impl;
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;
@@ -284,7 +285,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
queryWrapper.eq("status", 4);
QueryWrapper<PurchaseCatalogue> queryWrapper1 = queryWrapper.orderByDesc("create_time");
List<PurchaseCatalogue> list = purchaseCatalogueService.list(queryWrapper1);
@@ -298,7 +298,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogue.getPurchaseCatalogueId());
if (name != null) {
if (StrUtil.isNotBlank(name)) {
catalogueDetailsLambdaQueryWrapper.like(CatalogueDetails::getReagentConsumableName, name);
}
@@ -1,7 +1,9 @@
package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.date.DateTime;
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.Constants;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
@@ -11,6 +13,7 @@ import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO;
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -166,4 +169,13 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
return purchaseListDetailsVO;
}
@Override
public IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw) {
IPage<PurchaseListPageVO> purchaseListVOPage = baseMapper.getPurchaseListVOPage(page, qw);
return purchaseListVOPage;
}
}
@@ -1,7 +1,9 @@
package digital.laboratory.platform.reagent.service.impl;
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.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.config.PageUtils;
@@ -11,6 +13,7 @@ import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.BatchDetailsVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -25,6 +28,7 @@ import java.util.List;
* @describe 试剂耗材库存 服务实现类
*/
@Service
@SuppressWarnings("all")
public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentConsumableInventoryMapper, ReagentConsumableInventory> implements ReagentConsumableInventoryService {
@Autowired
@@ -53,11 +57,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
reagentConsumableInventoryQueryWrapper.eq("status", 1);
if (name != null) {
if (StrUtil.isNotBlank(name)) {
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
reagentConsumableInventoryQueryWrapper
.eq("category", "试剂").or()
.eq("category", "耗材")
.like("reagentConsumableInventory_name", name);
.like("reagent_consumable_name", name);
} else {
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
@@ -95,20 +100,13 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
}
@Override//标准物质管理列表
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(Page page, String name) {
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(Page page, String reagentConsumableName) {
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list( Wrappers.<ReagentConsumableInventory>query()
.eq("category", "标准物质").or()
.eq("category", "标准储备溶液")
.like(StrUtil.isNotBlank(reagentConsumableName),"reagent_consumable_name",reagentConsumableName));
if (name != null) {
reagentConsumableInventoryQueryWrapper.eq("category", "标准物质").or()
.eq("category", "标准储备溶液")
.like("reagentConsumable_name", name);
} else {
reagentConsumableInventoryQueryWrapper.eq("category", "标准物质").or()
.eq("category", "标准储备溶液");
}
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper);
ArrayList<ReagentConsumableInventoryVO> reagentConsumableInventoryVOS = new ArrayList<>();
@@ -197,7 +195,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
ArrayList<ReferenceMaterial> referenceMaterialList = new ArrayList<>();
//通过仓库类信息,查找对应的该类所有标准物质
for (ReagentConsumableInventory reagentConsumableInventory : list) {
if (reagentConsumableInventory.getTotalQuantity() > 0) {
@@ -220,7 +218,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
}
if (referenceMaterialList.size() != 0) {
//提供多余字段
for (ReferenceMaterial referenceMaterial : referenceMaterialList) {
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
@@ -275,20 +273,18 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
if (reagentConsumableName != null) {
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName);
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper);
//找出对应的仓库信息
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(Wrappers.<ReagentConsumableInventory>query()
.eq("category", "试剂").or()
.eq("category", "耗材")
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName));
//找出对应的仓库信息
for (ReagentConsumableInventory reagentConsumableInventory : list) {
LambdaQueryWrapper<BatchDetails> batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
.or().eq(BatchDetails::getServiceStatus, 1);
batchDetailsLambdaQueryWrapper
.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
.eq(BatchDetails::getServiceStatus, 1);
List<BatchDetails> list1 = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
//将不同批次的物品展示出来
@@ -318,52 +314,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
return pages;
}
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
reagentConsumableInventoryQueryWrapper.eq("category", "试剂")
.or().eq("category", "耗材");
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper);
LambdaQueryWrapper<BatchDetails> batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
for (ReagentConsumableInventory reagentConsumableInventory : list) {
if (reagentConsumableInventory.getTotalQuantity() > 0) {
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
.or().eq(BatchDetails::getServiceStatus, 1);
List<BatchDetails> batchDetailsList = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
for (BatchDetails batchDetails : batchDetailsList) {
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
SupplierInformation byId = supplierInformationService.getById(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setSupplierName(byId.getSupplierName());
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
reagentConsumableInventoryFullVO.setTotalQuantity(batchDetails.getQuantity());
reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId());
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
}
}
}
PageUtils pageUtils = new PageUtils();
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
return pages;
}
@Override
public List<ReagentConsumableInventory> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw){
public List<ReagentConsumableInventory> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw) {
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
@@ -36,4 +36,5 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumable
}
}
@@ -42,7 +42,7 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
warehousingContentVO.setCategory(byId.getCategory());
warehousingContentVO.setBrand(byId.getBrand());
warehousingContentVO.setSpecificationAndModel(byId.getSpecificationAndModel());
warehousingContentVO.setReagentConsumables(byId);
warehousingContentVO.setStandardValueOrPurity(byId.getStandardValueOrPurity());
}
return warehousingContentVOList;
@@ -66,7 +66,7 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
warehousingContentVO.setCategory(byId.getCategory());
warehousingContentVO.setBrand(byId.getBrand());
warehousingContentVO.setSpecificationAndModel(byId.getSpecificationAndModel());
warehousingContentVO.setReagentConsumables(byId);
warehousingContentVO.setStandardValueOrPurity(byId.getStandardValueOrPurity());
}
return warehousingContentVOPage;
@@ -169,10 +169,11 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
reagentConsumableInventory.setStatus(1);
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarning_value());
BatchDetails batchDetails = new BatchDetails();
BeanUtils.copyProperties(warehousingBatchList, batchDetails);
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
@@ -184,8 +185,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
batchDetails.setSupplierId(byId.getSupplierId());
batchDetails.setExpirationDate(Integer.valueOf(warehousingBatchList.getLimitDate()));
if (reagentConsumableInventory.getTotalQuantity() == null) {
reagentConsumableInventory.setTotalQuantity(0);
@@ -269,7 +268,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
BatchDetails batchDetails = new BatchDetails();
BeanUtils.copyProperties(warehousingBatchList, batchDetails);
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
@@ -282,6 +281,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity());
one.setWarningValue(warehousingRecordFormDTO.getWarning_value());
if (one.getCategory().equals("标准物质")) {
@@ -378,6 +378,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
List<SupplierInformation> supplierInformations = new ArrayList<>();
String evaluationFormId = null;
//创建供应商评价表
for (WarehousingContent warehousingContent : list) {
SupplierInformation supplierInformation = supplierInformationService.getById(warehousingContent.getSupplierId());
@@ -386,19 +388,27 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
supplierInformations.add(supplierInformation);
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
evaluationFormId=evaluationForm.getId();
warehousingContent.setEvaluationFormId(evaluationForm.getId());
}else if (!(supplierInformations.contains(supplierInformation))){
supplierInformations.add(supplierInformation);
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
warehousingContent.setEvaluationFormId(evaluationForm.getId());
evaluationFormId=evaluationForm.getId();
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
}else {
provideServicesOrSuppliesService.addById(evaluationFormId,warehousingContent.getReagentConsumableId());
}
}
for (SupplierInformation supplierInformation : supplierInformations) {
evaluationFormService.addForm(supplierInformation.getId());
}
warehousingRecordForm.setStatus(2);
@@ -5,6 +5,8 @@ import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
@Data
@@ -16,4 +18,6 @@ public class BatchDetailsVO extends BatchDetails {
@ApiModelProperty(value="标准物质列表")
List<ReferenceMaterialVO> referenceMaterialVOS;
@ApiModelProperty(value="到期时间")
private LocalDate maturityTime;
}
@@ -1,12 +1,13 @@
package digital.laboratory.platform.reagent.vo;
import digital.laboratory.platform.reagent.entity.DecentralizedRequest;
import digital.laboratory.platform.reagent.entity.PurchaseList;
import digital.laboratory.platform.reagent.entity.PurchasingPlan;
import lombok.Data;
import java.util.List;
@Data
public class PurchaseListPageVO {
public class PurchaseListPageVO extends PurchaseList {
private String applicantName;
private String department;
@@ -28,5 +28,6 @@ public class WarehousingContentVO extends WarehousingContent {
@ApiModelProperty(value = "(规格型号)")
private String specificationAndModel;
private ReagentConsumables reagentConsumables;
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueOrPurity;
}
@@ -16,4 +16,21 @@
<result property="type" column="type"/>
</resultMap>
<resultMap id="purchaseListVO" type="digital.laboratory.platform.reagent.vo.PurchaseListPageVO" extends="purchaseListMap" >
<result property="applicantName" column="applicant_name"></result>
<result property="department" column="department"></result>
</resultMap>
<sql id="getPurchaseListVOSQL">
SELECT pl.*,
(select department from dlp_base.sys_user where user_id = pl.create_by) as department,
(select user.name from dlp_base.sys_user user where user.user_id=pl.create_by ) as applicant_name
FROM purchase_list pl
</sql>
<select id="getPurchaseListVOPage" resultMap="purchaseListVO" resultType="digital.laboratory.platform.reagent.vo.PurchaseListPageVO">
<include refid="getPurchaseListVOSQL"></include>
${ew.customSqlSegment}
</select>
</mapper>