增加了入库时的查询
This commit is contained in:
+11
-3
@@ -309,8 +309,8 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "标准物质采购申请表打印", notes = "标准物质采购申请表打印")
|
||||
@SysLog("标准物质采购申请表打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('purchase_request_print')")
|
||||
public void bizGetPDFInventory(String id, String type,HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
@PreAuthorize("@pms.hasPermission('purchase_request_print')")
|
||||
public void bizGetPDFInventory(String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -325,7 +325,7 @@ public class CentralizedRequestController {
|
||||
String pdfFilePath = "document" + "/" + "purchaseRequest" + "/" + id + "/" + applyFileName + ".pdf";
|
||||
try {
|
||||
//直接调用pdf方法
|
||||
centralizedRequestService.purchaseRequestTablePDF(voList,id,type, theHttpServletRequest, httpServletResponse);
|
||||
centralizedRequestService.purchaseRequestTablePDF(voList, id, type, theHttpServletRequest, httpServletResponse);
|
||||
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||
httpServletResponse.setContentType(applyFileName);
|
||||
} catch (Exception e) {
|
||||
@@ -333,6 +333,14 @@ public class CentralizedRequestController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/lead")
|
||||
public R leadPurchase(@RequestBody List<CentralizedRequestDTO> requestDTOS, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
CentralizedRequest centralizedRequest = centralizedRequestService.leadPurchase(requestDTOS, dlpUser);
|
||||
return R.ok(centralizedRequest);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-11
@@ -85,17 +85,7 @@ public class ReagentConsumableInventoryController {
|
||||
@GetMapping("/RList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<IPage<ReferenceMaterialFullVO>> getReagentConsumableInventoryPage(Page page, String reagentConsumableName, Integer referenceMaterialStatus) {
|
||||
QueryWrapper<ReferenceMaterial> referenceMaterialQueryWrapper = new QueryWrapper<>();
|
||||
String number = reagentConsumableName;
|
||||
referenceMaterialQueryWrapper
|
||||
.and(qw -> qw
|
||||
.ne(referenceMaterialStatus == null, "status", -4)
|
||||
.eq(referenceMaterialStatus != null, "status", referenceMaterialStatus))
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.or()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "number", reagentConsumableName);
|
||||
|
||||
IPage<ReferenceMaterialFullVO> allList = reagentConsumableInventoryService.getStandardAllList(page, referenceMaterialQueryWrapper, referenceMaterialStatus, number);
|
||||
IPage<ReferenceMaterialFullVO> allList = reagentConsumableInventoryService.getStandardAllList(page, reagentConsumableName, referenceMaterialStatus);
|
||||
return R.ok(allList);
|
||||
}
|
||||
|
||||
|
||||
+10
-6
@@ -64,13 +64,11 @@ public class WarehousingRecordFormController {
|
||||
* @param warehousingRecordFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询入库信息", notes = "通过id查询入库信息")
|
||||
@ApiOperation(value = "通过id查询入库信息", notes = "参数:warehousingRecordFormId:入库ID" + "\n" + "opCode:(null:查询所有,1:查询未签收完成,-1:查询已签收完成)" + "\n" + " keywords:试剂耗材名称查询参数" + "\n" + "category:试剂耗材类别查询参数")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')")
|
||||
public R<WarehousingRecordFormVO> getById(String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.getWarehousingRecordFormVO(warehousingRecordFormId);
|
||||
|
||||
public R<WarehousingRecordFormVO> getById(String warehousingRecordFormId, Integer opCode, String keywords, String category) {
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.getWarehousingRecordFormVO(warehousingRecordFormId, opCode, keywords, category);
|
||||
return R.ok(warehousingRecordFormVO);
|
||||
}
|
||||
|
||||
@@ -110,7 +108,6 @@ public class WarehousingRecordFormController {
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.eq("status", 1)
|
||||
.orderByDesc("create_time"));
|
||||
|
||||
return R.ok(warehousingContentVOPage);
|
||||
|
||||
}
|
||||
@@ -131,4 +128,11 @@ public class WarehousingRecordFormController {
|
||||
warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser);
|
||||
return R.ok("签收成功");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询入库单中已签收的物品信息", notes = "查询入库单中已签收的物品信息")
|
||||
@GetMapping("/batch/list")
|
||||
public R getBatchList(String warehousingRecordFormId, String keywords) {
|
||||
return R.ok(warehousingRecordFormService.getBatchList(warehousingRecordFormId, keywords), "数据查询成功!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,25 +14,30 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
public class CentralizedRequestDTO {
|
||||
|
||||
@ApiModelProperty(value="集中采购申请ID")
|
||||
private String centralizedRequestId;
|
||||
@ApiModelProperty(value = "集中采购申请ID")
|
||||
private String centralizedRequestId;
|
||||
|
||||
@ApiModelProperty(value="采购目录编号")
|
||||
private String purchaseCatalogueNumber;
|
||||
@ApiModelProperty(value = "采购目录编号")
|
||||
private String purchaseCatalogueNumber;
|
||||
|
||||
@ApiModelProperty(value="申请数量")
|
||||
private Integer numberOfApplications;
|
||||
@ApiModelProperty(value = "申请数量")
|
||||
private Integer numberOfApplications;
|
||||
|
||||
@ApiModelProperty(value="试剂耗材ID")
|
||||
private String reagentConsumableId;
|
||||
@ApiModelProperty(value = "试剂耗材ID")
|
||||
private String reagentConsumableId;
|
||||
|
||||
@ApiModelProperty(value="备注")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value="集中采购申请明细Id")
|
||||
private String detailsOfCentralizedId;
|
||||
@ApiModelProperty(value = "集中采购申请明细Id")
|
||||
private String detailsOfCentralizedId;
|
||||
|
||||
@ApiModelProperty(value="用途/购买理由")
|
||||
private String purpose;
|
||||
@ApiModelProperty(value = "用途/购买理由")
|
||||
private String purpose;
|
||||
|
||||
private String specificationAndModel;
|
||||
|
||||
private String reagentConsumableName;
|
||||
|
||||
private Double unitPrice;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ public class PurchaseCatalogueDTO {
|
||||
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
@@ -75,7 +74,7 @@ public class PurchaseCatalogueDTO {
|
||||
@ApiModelProperty(value = "CAS 号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "CAS 号")
|
||||
@ApiModelProperty(value = "编码")
|
||||
private String code;
|
||||
|
||||
|
||||
|
||||
+4
-1
@@ -2,13 +2,14 @@ package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import com.amazonaws.services.s3.S3ResourceType;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class ReagentConsumableInventoryDTO extends ReagentConsumableInventory {
|
||||
public class ReagentConsumableInventoryDTO extends ReagentConsumables {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "(位置信息)")
|
||||
@@ -38,4 +39,6 @@ public class ReagentConsumableInventoryDTO extends ReagentConsumableInventory {
|
||||
@ApiModelProperty(value = "(规格)")
|
||||
private String packages;
|
||||
|
||||
private Integer totalQuantity;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,8 +25,6 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购目录明细)")
|
||||
public class CatalogueDetails extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 纯度等级
|
||||
*/
|
||||
|
||||
+8
-103
@@ -26,37 +26,6 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "试剂耗材库存")
|
||||
public class ReagentConsumableInventory extends BaseEntity {
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String reagentConsumableName;
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
@ApiModelProperty(value = "(品牌)")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* (类别)
|
||||
*/
|
||||
@ApiModelProperty(value = "(类别)")
|
||||
private String category;
|
||||
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value = "偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* (指导书ID)
|
||||
@@ -70,93 +39,26 @@ public class ReagentConsumableInventory extends BaseEntity {
|
||||
@ApiModelProperty(value = "(试剂耗材Id)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (规格型号)
|
||||
*/
|
||||
@ApiModelProperty(value = "(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
/**
|
||||
* (种类)
|
||||
*/
|
||||
@ApiModelProperty(value = "(种类)")
|
||||
private String species;
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value = "(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* (技术参数)
|
||||
*/
|
||||
@ApiModelProperty(value = "(技术参数)")
|
||||
private String technicalParameter;
|
||||
|
||||
/**
|
||||
* (总数量)
|
||||
*/
|
||||
@ApiModelProperty(value = "(总数量)")
|
||||
private Integer totalQuantity;
|
||||
|
||||
/**
|
||||
* (包装份数)
|
||||
*/
|
||||
@ApiModelProperty(value = "(包装份数)")
|
||||
private Integer packagedCopies;
|
||||
|
||||
/**
|
||||
* reagentConsumableInventoryId
|
||||
*/
|
||||
@TableId(value = "reagent_consumable_inventory_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value = "reagentConsumableInventoryId")
|
||||
|
||||
private String reagentConsumableInventoryId;
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value = "单价")
|
||||
private Double unitPrice;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
@ApiModelProperty(value = "别名")
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* 存储条件
|
||||
*/
|
||||
@ApiModelProperty(value = "存储条件")
|
||||
private String storageCondition;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 包装单位
|
||||
*/
|
||||
@ApiModelProperty(value = "包装单位")
|
||||
private String minimumUnit;
|
||||
/**
|
||||
* (溶液浓度)
|
||||
*/
|
||||
@ApiModelProperty(value = "(溶液浓度)")
|
||||
private double configurationConcentration;
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@ApiModelProperty(value = "英文名")
|
||||
private String englishName;
|
||||
/**
|
||||
* 存储期限
|
||||
*/
|
||||
@ApiModelProperty(value = "存储期限")
|
||||
private Integer storageLife;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@@ -165,10 +67,13 @@ public class ReagentConsumableInventory extends BaseEntity {
|
||||
/**
|
||||
* (预警值)
|
||||
*/
|
||||
@ApiModelProperty(value="(预警值)")
|
||||
@ApiModelProperty(value = "(预警值)")
|
||||
private Integer warningValue;
|
||||
|
||||
@ApiModelProperty(value="(预警信息)")
|
||||
private String warningInformation;
|
||||
/**
|
||||
* (预警信息)
|
||||
*/
|
||||
@ApiModelProperty(value = "(预警信息)")
|
||||
private String warningInformation;
|
||||
|
||||
}
|
||||
|
||||
@@ -130,5 +130,7 @@ public class ReagentConsumables extends BaseEntity {
|
||||
@ApiModelProperty(value="reagentConsumableId")
|
||||
private String reagentConsumableId;
|
||||
|
||||
@ApiModelProperty(value = "存储期限")
|
||||
private Integer storageLife;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,9 +81,6 @@ public class WarehousingContent extends BaseEntity {
|
||||
@ApiModelProperty(value = "采购清单明细ID")
|
||||
private String purchaseListDetailsId;
|
||||
|
||||
@ApiModelProperty(value = "预警值")
|
||||
private Integer warningValue;
|
||||
|
||||
@ApiModelProperty(value = "上次存放位置")
|
||||
private String lastStorageLocation;
|
||||
|
||||
|
||||
+11
-2
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface ReagentConsumableInventoryMapper extends BaseMapper<ReagentConsumableInventory> {
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOPage(IPage<ReagentConsumableInventory> page, @Param("warning") Integer warning,@Param("keywords") String keywords,@Param("reagentCategory") Integer reagentCategory);
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOPage(IPage<ReagentConsumableInventory> page, @Param("warning") Integer warning, @Param("keywords") String keywords, @Param("reagentCategory") Integer reagentCategory);
|
||||
|
||||
IPage<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFullVOPage(IPage<ReagentConsumableInventory> page, @Param(Constants.WRAPPER) QueryWrapper<ReagentConsumableInventory> qw);
|
||||
|
||||
@@ -33,11 +33,20 @@ public interface ReagentConsumableInventoryMapper extends BaseMapper<ReagentCons
|
||||
List<OrgVO> getOrgList();
|
||||
|
||||
|
||||
IPage<ReferenceMaterialFullVO> getReferenceMaterialPage(IPage<ReagentConsumableInventory> page, @Param(Constants.WRAPPER) QueryWrapper<ReferenceMaterial> qw);
|
||||
IPage<ReferenceMaterialFullVO> getReferenceMaterialPage(IPage<ReagentConsumableInventory> page, @Param("status") Integer status, @Param("reagentConsumableName") String reagentConsumableName);
|
||||
|
||||
|
||||
IPage<ReagentConsumableInventoryFullVO> getReagentConsumablePage(IPage<ReagentConsumableInventory> page, @Param("name") String name);
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> getReagentConsumableList();
|
||||
|
||||
List<ReagentConsumableInventoryVO> getRciListByCategory(List<String> list);
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getRemListById();//标准物质
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getRmListById();//试剂耗材
|
||||
|
||||
String getCellName(String id);
|
||||
|
||||
ReagentConsumableInventoryVO getRciById(@Param("reagentConsumableInventoryId") String reagentConsumableInventoryId, @Param("reagentConsumableId") String reagentConsumableId);
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,9 +1,13 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import digital.laboratory.platform.reagent.entity.WarehousingBatchList;
|
||||
import digital.laboratory.platform.reagent.vo.WarehousingBatchListVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,6 +20,6 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface WarehousingBatchListMapper extends BaseMapper<WarehousingBatchList> {
|
||||
|
||||
List<WarehousingBatchListVO> getWarehousingBatchListVOList(String warehousingContentId);
|
||||
List<WarehousingBatchListVO> getWarehousingBatchListVOList(@Param(value = "warehousingRecordFormId") String warehousingRecordFormId, @Param(value = "keywords") String keywords);
|
||||
|
||||
}
|
||||
|
||||
+4
-2
@@ -9,6 +9,7 @@ import digital.laboratory.platform.reagent.entity.WarehousingContent;
|
||||
import digital.laboratory.platform.reagent.vo.WarehousingContentVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
import org.yaml.snakeyaml.scanner.Constant;
|
||||
|
||||
import java.util.List;
|
||||
@@ -16,6 +17,7 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface WarehousingContentMapper extends BaseMapper<WarehousingContent> {
|
||||
|
||||
List<WarehousingContentVO> getWarehousingContentVOList(String signingRecordFormId);
|
||||
IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, @Param(Constants.WRAPPER)QueryWrapper<WarehousingContent> qw);
|
||||
List<WarehousingContentVO> getWarehousingContentVOList(@Param(value = "warehousingRecordFormId") String warehousingRecordFormId, @Param(value = "opCode") Integer opCode, @Param(value = "keywords") String keywords, @Param(value = "category") String category);
|
||||
|
||||
IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, @Param(Constants.WRAPPER) QueryWrapper<WarehousingContent> qw);
|
||||
}
|
||||
|
||||
+3
-1
@@ -24,7 +24,9 @@ import java.util.List;
|
||||
public interface CentralizedRequestService extends IService<CentralizedRequest> {
|
||||
CentralizedRequest addRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser);
|
||||
|
||||
CentralizedRequest commitRequest(String id,DLPUser dlpUser);
|
||||
CentralizedRequest leadPurchase(List<CentralizedRequestDTO> requestDTOS, DLPUser dlpUser);
|
||||
|
||||
CentralizedRequest commitRequest(String id, DLPUser dlpUser);
|
||||
|
||||
DetailsOfCentralized editDetailsById(CentralizedRequestDTO centralizedRequestDto);
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
|
||||
ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity);
|
||||
|
||||
IPage<ReferenceMaterialFullVO> getStandardAllList(Page page, QueryWrapper<ReferenceMaterial> qw, Integer status, String number);
|
||||
IPage<ReferenceMaterialFullVO> getStandardAllList(Page page, String reagentConsumableName, Integer referenceMaterialStatus);
|
||||
|
||||
ReagentConsumableInventoryFullVO getByCode(String id);
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface WarehousingBatchListService extends IService<WarehousingBatchList> {
|
||||
|
||||
List<WarehousingBatchListVO> getWarehousingBatchListVOList(String warehousingContentId);
|
||||
List<WarehousingBatchListVO> getWarehousingBatchListVOList(String warehousingContentId,String keywords);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
public interface WarehousingContentService extends IService<WarehousingContent> {
|
||||
|
||||
List<WarehousingContentVO> getWarehousingContentVOList(String warehousingRecordFormId);
|
||||
List<WarehousingContentVO> getWarehousingContentVOList(String warehousingRecordFormId, Integer oopCode, String keywords, String category);
|
||||
|
||||
IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, QueryWrapper<WarehousingContent> qw);
|
||||
}
|
||||
|
||||
+5
-1
@@ -8,6 +8,7 @@ import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO;
|
||||
import digital.laboratory.platform.reagent.entity.WarehousingBatchList;
|
||||
import digital.laboratory.platform.reagent.entity.WarehousingRecordForm;
|
||||
import digital.laboratory.platform.reagent.vo.WarehousingBatchListVO;
|
||||
import digital.laboratory.platform.reagent.vo.WarehousingRecordFormVO;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -24,7 +25,10 @@ public interface WarehousingRecordFormService extends IService<WarehousingRecord
|
||||
|
||||
// List<SigningRecordFormVO> getSigningRecordFormVOList (QueryWrapper<SigningRecordForm> qw);
|
||||
|
||||
WarehousingRecordFormVO getWarehousingRecordFormVO (String warehousingFormId);
|
||||
WarehousingRecordFormVO getWarehousingRecordFormVO (String warehousingRecordFormId, Integer opCode, String keywords, String type);
|
||||
|
||||
List<WarehousingBatchListVO> getBatchList(String warehousingRecordFormId,String keywords);
|
||||
|
||||
@Transactional
|
||||
void addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser);
|
||||
IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm>qw);
|
||||
|
||||
-7
@@ -26,20 +26,13 @@ public class CatalogueDetailsServiceImpl extends ServiceImpl<CatalogueDetailsMap
|
||||
|
||||
@Override
|
||||
public List<CatalogueDetails> getCatalogueDetailsList(String purchaseCatalogueId) {
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
List<CatalogueDetails> list = this.list(Wrappers.<CatalogueDetails>query().eq("purchase_catalogue_id",purchaseCatalogueId).orderByDesc("purchase_catalogue_number"));
|
||||
|
||||
Collections.sort(list, new Comparator<CatalogueDetails>() {
|
||||
|
||||
|
||||
@Override
|
||||
public int compare(CatalogueDetails o1, CatalogueDetails o2) {
|
||||
return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5)) - Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+49
-103
@@ -3,7 +3,6 @@ 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;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
@@ -20,7 +19,6 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.CentralizedRequestMapper;
|
||||
import digital.laboratory.platform.reagent.mapper.PurchasingPlanMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import feign.Response;
|
||||
@@ -83,92 +81,91 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
@Transactional
|
||||
@Override//增加集中采购申请
|
||||
public CentralizedRequest addRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
|
||||
|
||||
String centralizedRequestId = centralizedRequestDTOList.get(0).getCentralizedRequestId();
|
||||
|
||||
List<DetailsOfCentralized> detailsOfCentralizedList = new ArrayList<>();
|
||||
|
||||
if (centralizedRequestId == null) {
|
||||
|
||||
CentralizedRequest centralizedRequest = new CentralizedRequest();
|
||||
|
||||
centralizedRequest.setApplicantId(dlpUser.getId());
|
||||
|
||||
centralizedRequest.setId(IdWorker.get32UUID().toUpperCase());
|
||||
//获取申请时间
|
||||
//未提交
|
||||
centralizedRequest.setStatus(0);
|
||||
|
||||
centralizedRequest.setApplicantName(dlpUser.getName());
|
||||
|
||||
for (CentralizedRequestDTO centralizedRequestDTO : centralizedRequestDTOList) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = new DetailsOfCentralized();
|
||||
|
||||
BeanUtils.copyProperties(centralizedRequestDTO, detailsOfCentralized);
|
||||
|
||||
detailsOfCentralized.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
detailsOfCentralized.setCentralizedRequestId(centralizedRequest.getId());
|
||||
|
||||
detailsOfCentralizedList.add(detailsOfCentralized);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (this.save(centralizedRequest) && detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
|
||||
return centralizedRequest;
|
||||
} else return null;
|
||||
|
||||
|
||||
//将DTO赋值给明细表
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
CentralizedRequest centralizedRequest = this.getById(centralizedRequestId);
|
||||
|
||||
|
||||
for (CentralizedRequestDTO centralizedRequestDTO : centralizedRequestDTOList) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = new DetailsOfCentralized();
|
||||
|
||||
BeanUtils.copyProperties(centralizedRequestDTO, detailsOfCentralized);
|
||||
|
||||
detailsOfCentralized.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
detailsOfCentralized.setCentralizedRequestId(centralizedRequest.getId());
|
||||
|
||||
detailsOfCentralizedList.add(detailsOfCentralized);
|
||||
|
||||
}
|
||||
|
||||
if (detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
|
||||
|
||||
return centralizedRequest;
|
||||
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CentralizedRequest leadPurchase(List<CentralizedRequestDTO> requestDTOS, DLPUser dlpUser) {
|
||||
CentralizedRequest centralizedRequest = new CentralizedRequest();
|
||||
centralizedRequest.setId(IdWorker.get32UUID().toUpperCase());
|
||||
centralizedRequest.setApplicantId(dlpUser.getId());
|
||||
centralizedRequest.setStatus(1);
|
||||
centralizedRequest.setApplicantName(dlpUser.getName());
|
||||
centralizedRequest.setDateOfApplication(LocalDateTime.now());
|
||||
List<DetailsOfCentralized> detailsOfCentralizeds = new ArrayList<>();
|
||||
for (CentralizedRequestDTO requestDTO : requestDTOS) {
|
||||
List<ReagentConsumables> list = reagentConsumablesService.list(Wrappers.<ReagentConsumables>lambdaQuery().eq(ReagentConsumables::getReagentConsumableName, requestDTO.getReagentConsumableName()).eq(ReagentConsumables::getSpecificationAndModel, requestDTO.getSpecificationAndModel()).eq(ReagentConsumables::getUnitPrice, requestDTO.getUnitPrice()));
|
||||
if (list.size() > 1) {
|
||||
throw new RuntimeException(String.format("重复的数据" + requestDTO.getReagentConsumableName() + "~~~~~~~~" + requestDTO.getSpecificationAndModel()));
|
||||
}
|
||||
if (list.size() == 0) {
|
||||
throw new RuntimeException(String.format("错误的数据") + requestDTO.getReagentConsumableName() + "~~~~~~~~" + requestDTO.getSpecificationAndModel());
|
||||
}
|
||||
ReagentConsumables reagentConsumables = list.get(0);
|
||||
requestDTO.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
DetailsOfCentralized detailsOfCentralized = new DetailsOfCentralized();
|
||||
BeanUtils.copyProperties(requestDTOS, detailsOfCentralized);
|
||||
detailsOfCentralized.setId(IdWorker.get32UUID().toUpperCase());
|
||||
detailsOfCentralized.setCentralizedRequestId(centralizedRequest.getId());
|
||||
detailsOfCentralized.setPurpose("检验所需");
|
||||
detailsOfCentralized.setReagentConsumableId(requestDTO.getReagentConsumableId());
|
||||
detailsOfCentralized.setNumberOfApplications(requestDTO.getNumberOfApplications());
|
||||
detailsOfCentralizeds.add(detailsOfCentralized);
|
||||
}
|
||||
if (this.save(centralizedRequest) && detailsOfCentralizedService.saveBatch(detailsOfCentralizeds)) {
|
||||
return centralizedRequest;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override//提交申请
|
||||
public CentralizedRequest commitRequest(String id, DLPUser dlpUser) {
|
||||
CentralizedRequest byId = this.getById(id);
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfApplication(LocalDateTime.now());
|
||||
this.updateById(byId);
|
||||
return byId;
|
||||
CentralizedRequest centralizedRequest = this.getById(id);
|
||||
centralizedRequest.setStatus(1);
|
||||
centralizedRequest.setDateOfApplication(LocalDateTime.now());
|
||||
this.updateById(centralizedRequest);
|
||||
return centralizedRequest;
|
||||
}
|
||||
|
||||
|
||||
@Override//修改申请
|
||||
public DetailsOfCentralized editDetailsById(CentralizedRequestDTO centralizedRequestDto) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(centralizedRequestDto.getDetailsOfCentralizedId());
|
||||
|
||||
BeanUtils.copyProperties(centralizedRequestDto, detailsOfCentralized);
|
||||
|
||||
if (detailsOfCentralizedService.updateById(detailsOfCentralized)) {
|
||||
return detailsOfCentralized;
|
||||
} else return null;
|
||||
@@ -177,13 +174,9 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
@Override//增加明细
|
||||
public DetailsOfCentralized addDetailsById(CentralizedRequestDTO centralizedRequestDto) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = new DetailsOfCentralized();
|
||||
|
||||
detailsOfCentralized.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
BeanUtils.copyProperties(centralizedRequestDto, detailsOfCentralized);
|
||||
|
||||
if (detailsOfCentralizedService.save(detailsOfCentralized)) {
|
||||
return detailsOfCentralized;
|
||||
} else return null;
|
||||
@@ -192,75 +185,46 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
@Override//删除申请
|
||||
@Transactional
|
||||
public Boolean delRequestById(String centralizedRequestId) {
|
||||
|
||||
LambdaQueryWrapper<DetailsOfCentralized> detailsOfCentralizedLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getCentralizedRequestId, centralizedRequestId);
|
||||
|
||||
List<DetailsOfCentralized> list = detailsOfCentralizedService.list(detailsOfCentralizedLambdaQueryWrapper);
|
||||
|
||||
if (list.size() != 0) {
|
||||
|
||||
detailsOfCentralizedService.removeBatchByIds(list);
|
||||
|
||||
List<DetailsOfCentralized> list = detailsOfCentralizedService.list(Wrappers.<DetailsOfCentralized>lambdaQuery().eq(DetailsOfCentralized::getCentralizedRequestId, centralizedRequestId));
|
||||
if (list != null && list.size() > 0) {
|
||||
return detailsOfCentralizedService.removeBatchByIds(list) && this.removeById(centralizedRequestId);
|
||||
} else {
|
||||
return this.removeById(centralizedRequestId);
|
||||
}
|
||||
return this.removeById(centralizedRequestId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<CentralizedRequestVO> getCentralizedRequestVOPage(IPage<CentralizedRequest> page, QueryWrapper<CentralizedRequest> qw) {
|
||||
IPage<CentralizedRequestVO> r = baseMapper.getCentralizedRequestVOPage(page, qw);
|
||||
return r;
|
||||
IPage<CentralizedRequestVO> centralizedRequestVOPage = baseMapper.getCentralizedRequestVOPage(page, qw);
|
||||
return centralizedRequestVOPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CentralizedRequestVO> getCentralizedRequestVOList(QueryWrapper<CentralizedRequest> qw) {
|
||||
|
||||
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//查询状态为1的采购申请:已提交
|
||||
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus, 1);
|
||||
|
||||
List<CentralizedRequest> list = this.list(centralizedRequestLambdaQueryWrapper);
|
||||
List<CentralizedRequest> list = this.list(Wrappers.<CentralizedRequest>lambdaQuery().eq(CentralizedRequest::getStatus, 1));
|
||||
|
||||
ArrayList<CentralizedRequestVO> centralizedRequestVOArrayList = new ArrayList<>();
|
||||
|
||||
for (CentralizedRequest centralizedRequest : list) {
|
||||
CentralizedRequestVO centralizedRequestVO = new CentralizedRequestVO();
|
||||
BeanUtils.copyProperties(centralizedRequest, centralizedRequestVO);
|
||||
centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestVO.getId()));
|
||||
centralizedRequestVOArrayList.add(centralizedRequestVO);
|
||||
}
|
||||
|
||||
return centralizedRequestVOArrayList;
|
||||
}
|
||||
|
||||
@Override//
|
||||
public CentralizedRequestVO getCentralizedRequestVO(String centralizedRequestId) {
|
||||
|
||||
CentralizedRequestVO centralizedRequestVO = baseMapper.getCentralizedRequestVO(centralizedRequestId);
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestId);
|
||||
|
||||
centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedVOList);
|
||||
|
||||
return centralizedRequestVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CentralizedRequestVO> getVOList(QueryWrapper<CentralizedRequest> qw) {
|
||||
|
||||
List<CentralizedRequestVO> centralizedRequestVOArrayList = baseMapper.getVOList(qw);
|
||||
|
||||
// for (CentralizedRequestVO centralizedRequestVO : centralizedRequestVOArrayList) {
|
||||
//
|
||||
// List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestVO.getId());
|
||||
//
|
||||
// centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedVOList);
|
||||
// }
|
||||
|
||||
return centralizedRequestVOArrayList;
|
||||
return baseMapper.getVOList(qw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,23 +250,14 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
@Override
|
||||
public List<PurchaseRequestPrintVO> getPurchaseRequestPrintList(String id, String type) {
|
||||
ArrayList<PurchaseRequestPrintVO> purchaseRequestPrintVOList = new ArrayList<>();
|
||||
|
||||
if (type.equals("集中采购申请")) {
|
||||
|
||||
CentralizedRequestVO centralizedRequest = this.getCentralizedRequestVO(id);
|
||||
|
||||
if (centralizedRequest.getStatus() != 4) {
|
||||
|
||||
throw new RuntimeException(String.format("当前采购还未被制定为清单,无法打印"));
|
||||
}
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = centralizedRequest.getDetailsOfCentralizedVOList();
|
||||
|
||||
|
||||
for (DetailsOfCentralizedVO detailsOfCentralized : detailsOfCentralizedVOList) {
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());
|
||||
|
||||
if (reagentConsumables.getCategory().equals("标准物质")) {
|
||||
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
|
||||
purchaseRequestPrintVO.setApplicantName(centralizedRequest.getApplicantName());
|
||||
@@ -319,29 +274,20 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
|
||||
|
||||
if (requestById.getStatus() != 6) {
|
||||
throw new RuntimeException(String.format("当前采购还未被制定为清单,无法打印"));
|
||||
}
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : requestById.getDecentralizeDetailsVOList()) {
|
||||
|
||||
if (decentralizeDetails.getCategory().equals("标准物质")) {
|
||||
|
||||
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
|
||||
|
||||
BeanUtils.copyProperties(decentralizeDetails, purchaseRequestPrintVO);
|
||||
|
||||
purchaseRequestPrintVO.setPurpose(decentralizeDetails.getPurpose());
|
||||
purchaseRequestPrintVO.setApplicantName(requestById.getApplicantName());
|
||||
purchaseRequestPrintVO.setRemarks(decentralizeDetails.getRemarks());
|
||||
|
||||
purchaseRequestPrintVO.setSubtotal(purchaseRequestPrintVO.getUnitPrice() * purchaseRequestPrintVO.getQuantity());
|
||||
//查找出供应商名称
|
||||
purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getById(decentralizeDetails.getPurchaseListDetailsId()).getSupplierId()).getSupplierName());
|
||||
|
||||
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);
|
||||
}
|
||||
}
|
||||
@@ -357,7 +303,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
double total = 0;
|
||||
for (PurchaseRequestPrintVO purchaseRequestPrintVO : voList) {
|
||||
purchaseRequestPrintVO.setI(x);
|
||||
if (!StrUtil.isNotBlank(purchaseRequestPrintVO.getRemarks())){
|
||||
if (!StrUtil.isNotBlank(purchaseRequestPrintVO.getRemarks())) {
|
||||
purchaseRequestPrintVO.setRemarks("无");
|
||||
}
|
||||
total = total + purchaseRequestPrintVO.getSubtotal();
|
||||
|
||||
+11
-7
@@ -12,9 +12,11 @@ import digital.laboratory.platform.reagent.dto.ComplianceCheckDTO;
|
||||
import digital.laboratory.platform.reagent.dto.OutgoingContentsDTO;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.DeliveryRegistrationFormMapper;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
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.ReagentConsumableInventoryVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
@@ -72,6 +74,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
@Autowired
|
||||
private ReagentConsumableStashService reagentConsumableStashService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryMapper reagentConsumableInventoryMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional//创建出库任务
|
||||
@@ -252,7 +257,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
if (referenceMaterial.getStatus() == -3) {
|
||||
throw new RuntimeException(String.format("该物品已被其他工作人员领用"));
|
||||
}
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), -1);
|
||||
referenceMaterial.setStatus(-3);//改变状态
|
||||
referenceMaterial.setServiceStatus(-3);
|
||||
// reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息
|
||||
@@ -311,7 +316,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
}
|
||||
referenceMaterial.setStatus(-3);
|
||||
referenceMaterial.setServiceStatus(-3);
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), -1);
|
||||
referenceMaterialService.updateById(referenceMaterial);
|
||||
// reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(),referenceMaterial.getId(),-1);//清除这个格子上的物品信息
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
@@ -341,7 +346,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(), batchDetails.getReagentConsumableInventoryId(), -1);
|
||||
// reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), reagentConsumables.getReagentConsumableId(),-1);
|
||||
}
|
||||
batchDetailsService.updateById(batchDetails);
|
||||
@@ -405,10 +410,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
OutgoingContentsVO outgoingContentsVO = new OutgoingContentsVO();
|
||||
BeanUtils.copyProperties(outgoingContents, outgoingContentsVO);
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, outgoingContents.getReagentConsumableId());
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
outgoingContentsVO.setReagentConsumableInventory(reagentConsumableInventory);//试剂耗材信息
|
||||
|
||||
ReagentConsumableInventoryVO vo = reagentConsumableInventoryMapper.getRciById(null, outgoingContents.getReagentConsumableId());
|
||||
outgoingContentsVO.setReagentConsumableInventory(vo);//试剂耗材信息
|
||||
BatchDetails batchDetails = batchDetailsService.getById(outgoingContents.getBatchDetailsId());
|
||||
|
||||
if (batchDetails != null) {
|
||||
|
||||
+4
-50
@@ -31,65 +31,19 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentra
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Autowired
|
||||
private CentralizedRequestService centralizedRequestService;
|
||||
|
||||
@Override
|
||||
public List<DetailsOfCentralizedVO> getDetailsOfCentralizedVOList(String centralizedRequestId) {
|
||||
|
||||
List<DetailsOfCentralizedVO> list = baseMapper.getDetailsOfCentralizedVOList(centralizedRequestId);
|
||||
|
||||
|
||||
for (DetailsOfCentralizedVO detailsOfCentralizedVO : list) {
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(detailsOfCentralizedVO.getReagentConsumableId());
|
||||
|
||||
detailsOfCentralizedVO.setBrand(byId.getBrand());
|
||||
detailsOfCentralizedVO.setCategory(byId.getCategory());
|
||||
detailsOfCentralizedVO.setSpecificationAndModel(byId.getSpecificationAndModel());
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralizedVO.getReagentConsumableId());
|
||||
detailsOfCentralizedVO.setBrand(reagentConsumables.getBrand());
|
||||
detailsOfCentralizedVO.setCategory(reagentConsumables.getCategory());
|
||||
detailsOfCentralizedVO.setSpecificationAndModel(reagentConsumables.getSpecificationAndModel());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DetailsOfCentralizedVO> getDetailsOfCentralizedList(String procurementContentId) {
|
||||
|
||||
// LambdaQueryWrapper<DetailsOfCentralized> detailsOfCentralizedLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//
|
||||
// detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getProcurementContentId, purchasingPlanId);
|
||||
//
|
||||
// List<DetailsOfCentralized> list = this.list(detailsOfCentralizedLambdaQueryWrapper);
|
||||
//
|
||||
// List<DetailsOfCentralizedVO> detailsOfCentralizedVOS = new ArrayList<>();
|
||||
//
|
||||
// for (DetailsOfCentralized detailsOfCentralized : list) {
|
||||
//
|
||||
// CentralizedRequestVO centralizedRequestVO = centralizedRequestService.getCentralizedRequestVO(detailsOfCentralized.getCentralizedRequestId());
|
||||
//
|
||||
// LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//
|
||||
// reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, detailsOfCentralized.getReagentConsumableId());
|
||||
//
|
||||
// ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
|
||||
//
|
||||
// DetailsOfCentralizedVO detailsOfCentralizedVO = new DetailsOfCentralizedVO();
|
||||
//
|
||||
// BeanUtils.copyProperties(detailsOfCentralized, detailsOfCentralizedVO);
|
||||
//
|
||||
// detailsOfCentralizedVO.setReplacementReagentConsumableName(one.getReagentConsumableName());
|
||||
//
|
||||
// detailsOfCentralizedVO.setDepartment(centralizedRequestVO.getDepartment());
|
||||
//
|
||||
// detailsOfCentralizedVO.setApplicantName(centralizedRequestVO.getApplicantName());
|
||||
//
|
||||
// detailsOfCentralizedVOS.add(detailsOfCentralizedVO);
|
||||
// detailsOfCentralizedVO.setSpecies(one.getSpecies());
|
||||
// detailsOfCentralizedVO.setDeviationOrUncertainty(one.getDeviationOrUncertainty());
|
||||
// detailsOfCentralizedVO.setMinimumUnit(one.getMinimumUnit());
|
||||
// detailsOfCentralizedVO.setPackagedCopies(one.getPackagedCopies().toString());
|
||||
// detailsOfCentralizedVO.setStandardValueOrPurity(one.getStandardValueOrPurity());
|
||||
// }
|
||||
return baseMapper.getDetailsOfCentralizedVOPlanList(procurementContentId);
|
||||
}
|
||||
}
|
||||
|
||||
+41
-130
@@ -47,26 +47,19 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
private CategoryTableServiceImpl typeTableService;
|
||||
|
||||
@Override//新增采购目录
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public PurchaseCatalogue addCatalogue(DLPUser dlpUser, List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = new PurchaseCatalogue();
|
||||
|
||||
purchaseCatalogue.setPurchaseCatalogueId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
purchaseCatalogue.setStatus(0);
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = new ArrayList<>();
|
||||
|
||||
Integer i = 1;
|
||||
|
||||
for (PurchaseCatalogueDTO purchaseCatalogueDto : purchaseCatalogueDTOList) {
|
||||
CatalogueDetails catalogueDetails = new CatalogueDetails();
|
||||
BeanUtils.copyProperties(purchaseCatalogueDto, catalogueDetails);
|
||||
catalogueDetails.setCatalogueDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
catalogueDetails.setPurchaseCatalogueId(purchaseCatalogue.getPurchaseCatalogueId());
|
||||
String yyyy = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy");
|
||||
catalogueDetails.setPurchaseCatalogueNumber(yyyy + "-" + i.toString());
|
||||
catalogueDetails.setPurchaseCatalogueNumber(LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy") + "-" + i.toString());
|
||||
i++;
|
||||
catalogueDetailsList.add(catalogueDetails);
|
||||
typeTableService.addSpecies(catalogueDetails.getCategory(), catalogueDetails.getSpecies());
|
||||
@@ -80,132 +73,86 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
@Override//修改采购目录
|
||||
public CatalogueDetails editCatalogue(PurchaseCatalogueDTO purchaseCatalogueDTO) {
|
||||
|
||||
CatalogueDetails byId = catalogueDetailsService.getById(purchaseCatalogueDTO.getCatalogueDetailsId());
|
||||
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO, byId);
|
||||
|
||||
if (catalogueDetailsService.updateById(byId)) {
|
||||
return byId;
|
||||
CatalogueDetails catalogueDetails = catalogueDetailsService.getById(purchaseCatalogueDTO.getCatalogueDetailsId());
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO, catalogueDetails);
|
||||
if (catalogueDetailsService.updateById(catalogueDetails)) {
|
||||
return catalogueDetails;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Override//删除采购目录
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delCatalogue(String purchaseCatalogueId) {
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueId);
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
if (list.size() > 0 & list != null) {
|
||||
catalogueDetailsService.removeBatchByIds(list);
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery().eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueId));
|
||||
if (list != null && list.size() > 0) {
|
||||
return catalogueDetailsService.removeBatchByIds(list) && this.removeById(purchaseCatalogueId);
|
||||
} else {
|
||||
return this.removeById(purchaseCatalogueId);
|
||||
}
|
||||
return
|
||||
this.removeById(purchaseCatalogueId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CatalogueDetails addDetails(PurchaseCatalogueDTO purchaseCatalogueDTO) {
|
||||
|
||||
CatalogueDetails catalogueDetails = new CatalogueDetails();
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = this.getPurchaseCatalogueVO(purchaseCatalogueDTO.getPurchaseCatalogueId());
|
||||
|
||||
int size = purchaseCatalogueVO.getCatalogueDetailsListList().size();
|
||||
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO, catalogueDetails);
|
||||
|
||||
String yyyy = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy");
|
||||
|
||||
catalogueDetails.setPurchaseCatalogueNumber(yyyy + "-" + size + 1);
|
||||
|
||||
catalogueDetails.setPurchaseCatalogueNumber(yyyy + "-" + catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery()
|
||||
.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueDTO.getPurchaseCatalogueId())).size() + 1);
|
||||
if (catalogueDetailsService.save(catalogueDetails)) {
|
||||
|
||||
return catalogueDetails;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PurchaseCatalogueVO> getPurchaseCatalogueVOPage(IPage<PurchaseCatalogue> page, QueryWrapper<PurchaseCatalogue> qw) {
|
||||
|
||||
IPage<PurchaseCatalogueVO> purchaseCatalogueVOPage = baseMapper.getPurchaseCatalogueVOPage(page, qw);
|
||||
|
||||
List<PurchaseCatalogueVO> records = purchaseCatalogueVOPage.getRecords();
|
||||
|
||||
for (PurchaseCatalogueVO record : records) {
|
||||
|
||||
PurchaseCatalogue byId = this.getById(record.getPurchaseCatalogueId());
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, byId.getPurchaseCatalogueId());
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery()
|
||||
.eq(CatalogueDetails::getPurchaseCatalogueId, record.getPurchaseCatalogueId()));
|
||||
record.setQuantity(list.size());
|
||||
}
|
||||
|
||||
return purchaseCatalogueVOPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PurchaseCatalogueVO> getPurchaseCatalogueVOList(QueryWrapper<PurchaseCatalogue> qw) {
|
||||
|
||||
List<PurchaseCatalogueVO> purchaseCatalogueVOList = baseMapper.getPurchaseCatalogueVOList(qw);
|
||||
|
||||
return purchaseCatalogueVOList;
|
||||
return baseMapper.getPurchaseCatalogueVOList(qw);
|
||||
}
|
||||
|
||||
@Override//通过ID查询
|
||||
public PurchaseCatalogueVO getPurchaseCatalogueVO(String purchaseCatalogueId) {
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = baseMapper.getPurchaseCatalogueVO(purchaseCatalogueId);
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.getCatalogueDetailsList(purchaseCatalogueId);
|
||||
|
||||
purchaseCatalogueVO.setCatalogueDetailsListList(catalogueDetailsList);
|
||||
|
||||
purchaseCatalogueVO.setQuantity(catalogueDetailsList.size());
|
||||
|
||||
return purchaseCatalogueVO;
|
||||
}
|
||||
|
||||
@Override//提交目录
|
||||
@Transactional
|
||||
public PurchaseCatalogue commitById(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, DLPUser dlpUser) {
|
||||
|
||||
Set<String> permissions = dlpUser.getPermissions();
|
||||
|
||||
if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId().equals("") | purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) {
|
||||
|
||||
if (!StrUtil.isNotBlank(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId())) {
|
||||
PurchaseCatalogue purchaseCatalogue = this.addCatalogue(dlpUser, purchaseCatalogueDTOList);
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
|
||||
purchaseCatalogue.setStatus(2);
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(1);
|
||||
}
|
||||
purchaseCatalogue.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
|
||||
} else {
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId()
|
||||
);
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId());
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
|
||||
purchaseCatalogue.setStatus(2);
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(1);
|
||||
}
|
||||
purchaseCatalogue.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
@@ -215,33 +162,24 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
@Override//审核
|
||||
@Transactional
|
||||
public PurchaseCatalogue primaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
purchaseCatalogue.setAuditOpinion(auditAndApproveDto.getAuditOpinion());
|
||||
|
||||
purchaseCatalogue.setAuditResult(auditAndApproveDto.getAuditResult());
|
||||
|
||||
purchaseCatalogue.setAuditorId(dlpUser.getId());
|
||||
|
||||
purchaseCatalogue.setAuditTime(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogue.getAuditResult() == true) {
|
||||
|
||||
//审核通过后,将采购目录添加的试剂耗材,录入至试剂耗材类
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery()
|
||||
.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogue.getPurchaseCatalogueId()));
|
||||
|
||||
//目录中的试剂耗材是否存在试剂耗材类中,有则不管,无则添加
|
||||
for (CatalogueDetails catalogueDetails : list) {
|
||||
ReagentConsumables one = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
|
||||
ReagentConsumables reagentConsumable = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
|
||||
.eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName())
|
||||
.eq("brand", catalogueDetails.getBrand())
|
||||
.eq("category", catalogueDetails.getCategory())
|
||||
.eq("specification_and_model", catalogueDetails.getSpecificationAndModel())
|
||||
.eq("unit_price", catalogueDetails.getUnitPrice())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getStandardValueOrPurity()), "standard_value_or_purity", catalogueDetails.getStandardValueOrPurity())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getCasNumber()), "cas_number", catalogueDetails.getCasNumber())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getSpecies()), "species", catalogueDetails.getSpecies())
|
||||
@@ -251,17 +189,20 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getPurityGrade()), "purity_grade", catalogueDetails.getPurityGrade())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getMinimumUnit()), "minimum_unit", catalogueDetails.getMinimumUnit())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getStorageCondition()), "storage_condition", catalogueDetails.getStorageCondition())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getRemark()), "remark", catalogueDetails.getRemark())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getCode()), "code", catalogueDetails.getCode())
|
||||
);
|
||||
if (one == null) {
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||
catalogueDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
|
||||
if (reagentConsumable == null) {
|
||||
ReagentConsumables addReagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||
catalogueDetails.setReagentConsumableId(addReagentConsumables.getReagentConsumableId());
|
||||
catalogueDetailsService.updateById(catalogueDetails);
|
||||
} else {
|
||||
catalogueDetails.setReagentConsumableId(one.getReagentConsumableId());
|
||||
catalogueDetails.setReagentConsumableId(reagentConsumable.getReagentConsumableId());
|
||||
catalogueDetailsService.updateById(catalogueDetails);
|
||||
}
|
||||
}
|
||||
|
||||
purchaseCatalogue.setStatus(6);
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(-3);
|
||||
@@ -273,11 +214,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
@Override
|
||||
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueId);
|
||||
|
||||
purchaseCatalogue.setStatus(4);
|
||||
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
@@ -285,35 +223,19 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
@Override//查询已发布的采购目录
|
||||
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) {
|
||||
return null;
|
||||
}
|
||||
PurchaseCatalogue purchaseCatalogue = list.get(0);
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.like(CatalogueDetails::getReagentConsumableName, name);
|
||||
}
|
||||
if (category != null) {
|
||||
catalogueDetailsLambdaQueryWrapper.like(category == 1, CatalogueDetails::getCategory, "试剂");
|
||||
catalogueDetailsLambdaQueryWrapper.like(category == 2, CatalogueDetails::getCategory, "耗材");
|
||||
catalogueDetailsLambdaQueryWrapper.like(category == 3, CatalogueDetails::getCategory, "标准物质");
|
||||
}
|
||||
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
List<PurchaseCatalogue> list = this.list(Wrappers.<PurchaseCatalogue>lambdaQuery().eq(PurchaseCatalogue::getStatus, 4)
|
||||
.orderByDesc(PurchaseCatalogue::getUpdateTime));
|
||||
if (list == null & list.size() == 0) {
|
||||
throw new RuntimeException(String.format("未存在已发布的采购目录"));
|
||||
}
|
||||
PurchaseCatalogue purchaseCatalogue = list.get(0);
|
||||
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery()
|
||||
.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogue.getPurchaseCatalogueId())
|
||||
.like(StrUtil.isNotBlank(name), CatalogueDetails::getReagentConsumableName, name)
|
||||
.eq(category != null && category == 1, CatalogueDetails::getCategory, "试剂")
|
||||
.eq(category != null && category == 2, CatalogueDetails::getCategory, "耗材")
|
||||
.eq(category != null && category == 3, CatalogueDetails::getCategory, "标准物质")
|
||||
);
|
||||
Collections.sort(catalogueDetailsList, new Comparator<CatalogueDetails>() {
|
||||
@Override
|
||||
public int compare(CatalogueDetails o1, CatalogueDetails o2) {
|
||||
@@ -326,11 +248,9 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
@Override
|
||||
//导入方法,验证填写内容是否有误
|
||||
public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) {
|
||||
|
||||
int i = 1;
|
||||
String message = "";
|
||||
try {
|
||||
|
||||
for (PurchaseCatalogueDTO purchaseCatalogueDTO : purchaseCatalogueDTOList) {
|
||||
|
||||
if (StrUtil.isNotBlank(purchaseCatalogueDTO.getBrand()) &
|
||||
@@ -351,29 +271,20 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
}
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
|
||||
throw new RuntimeException(message);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(message)) {
|
||||
throw new RuntimeException(message);
|
||||
}
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = new PurchaseCatalogueVO();
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = new ArrayList<>();
|
||||
|
||||
for (PurchaseCatalogueDTO purchaseCatalogueDto : purchaseCatalogueDTOList) {
|
||||
|
||||
CatalogueDetails catalogueDetails = new CatalogueDetails();
|
||||
|
||||
BeanUtils.copyProperties(purchaseCatalogueDto, catalogueDetails);
|
||||
|
||||
catalogueDetailsList.add(catalogueDetails);
|
||||
}
|
||||
|
||||
purchaseCatalogueVO.setCatalogueDetailsListList(catalogueDetailsList);
|
||||
|
||||
return purchaseCatalogueVO;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -178,7 +178,6 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
//所有批次信息
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.orderByDesc("create_time"));
|
||||
warehousingContent.setWarningValue(reagentConsumableInventory.getWarningValue());
|
||||
//如果存在批次信息,则提供上次位置信息,以便用户存放物品
|
||||
if (batchDetailsList.size() != 0 && batchDetailsList != null) {
|
||||
warehousingContent.setLastStorageLocation(batchDetailsList.get(0).getLocation());//位置信息
|
||||
|
||||
-6
@@ -123,18 +123,13 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
flag = true;
|
||||
//合并相同的采购内容,若存在相同的采购物品,则无需创建计划明细,将采购申请明细与该计划明细关联即可
|
||||
if (list.size() != 0) {
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
||||
if (list.get(i).getReagentConsumableId().equals(purchasingPlanDTO.getReagentConsumableId())) {
|
||||
|
||||
list.get(i).setUnitPrice(reagentConsumables.getUnitPrice());//获取单价
|
||||
//Set采购数量
|
||||
list.get(i).setQuantityPurchased(list.get(i).getQuantityPurchased() + purchasingPlanDTO.getNumberOfApplications());//合并之前的数量加上被合并对象的数量
|
||||
list.get(i).setSubtotal(list.get(i).getQuantityPurchased() * list.get(i).getUnitPrice());//计算小计
|
||||
|
||||
//添加采购申请明细的采购数量
|
||||
|
||||
detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());
|
||||
detailsOfCentralized.setProcurementContentId(list.get(i).getProcurementContentId());
|
||||
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
||||
@@ -153,7 +148,6 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
procurementContent.setUnitPrice(reagentConsumables.getUnitPrice());//单价
|
||||
procurementContent.setSubtotal(procurementContent.getUnitPrice() * procurementContent.getQuantityPurchased());//小计
|
||||
detailsOfCentralized.setProcurementContentId(procurementContent.getProcurementContentId());//采购申请明细关联采购计划明细
|
||||
|
||||
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
||||
list.add(procurementContent);//将计划明细添加至集合
|
||||
|
||||
|
||||
+73
-67
@@ -112,9 +112,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Override//标准物质标准物质管理列表
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page, Integer warning, String keywords) {
|
||||
Integer reagentCategory = 1;
|
||||
if (warning != null && warning == 2) {
|
||||
return this.getReagentConsumableInventoryWarningPage((Page) page, reagentCategory);
|
||||
}
|
||||
// if (warning != null && warning == 2) {
|
||||
// return this.getReagentConsumableInventoryWarningPage((Page) page, reagentCategory);
|
||||
// }
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOPage = baseMapper.getReagentConsumableInventoryVOPage(page, warning, keywords, reagentCategory);
|
||||
return reagentConsumableInventoryVOPage;
|
||||
}
|
||||
@@ -122,36 +122,43 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Override//试剂耗材管理列表
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryREVOList(IPage<ReagentConsumableInventory> page, Integer warning, String keywords) {
|
||||
Integer reagentCategory = 0;
|
||||
if (warning != null && warning == 2) {
|
||||
return this.getReagentConsumableInventoryWarningPage((Page) page, reagentCategory);
|
||||
}
|
||||
// if (warning != null && warning == 2) {
|
||||
// return this.getReagentConsumableInventoryWarningPage((Page) page, reagentCategory);
|
||||
// }
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOPage = baseMapper.getReagentConsumableInventoryVOPage(page, warning, keywords, reagentCategory);
|
||||
return reagentConsumableInventoryVOPage;
|
||||
}
|
||||
|
||||
//查询即将到期的试剂耗材、标准物质:reagentCategory:0代表试剂耗材,1代表标准物质、标准储备溶液
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryWarningPage(Page page, Integer reagentCategory) {
|
||||
List<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = new ArrayList<>();
|
||||
List<BatchDetails> list = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("warning_information", "即将过期").or().eq("warning_information", "已过期").or().eq("warning_information", "即将到达存储期限").or().eq("warning_information", "已超过存储期限"));
|
||||
//查找具有到期批次物品的试剂耗材\标准物质类信息
|
||||
if (list != null && list.size() != 0) {
|
||||
for (BatchDetails batchDetails : list) {
|
||||
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
|
||||
if (reagentCategory == 0) {
|
||||
reagentConsumableInventory = this.getOne(new LambdaQueryWrapper<ReagentConsumableInventory>().eq(ReagentConsumableInventory::getReagentConsumableInventoryId, batchDetails.getReagentConsumableInventoryId()).ne(ReagentConsumableInventory::getCategory, "标准物质").ne(ReagentConsumableInventory::getCategory, "标准储备溶液"));
|
||||
} else {
|
||||
reagentConsumableInventory = this.getOne(new LambdaQueryWrapper<ReagentConsumableInventory>().eq(ReagentConsumableInventory::getReagentConsumableInventoryId, batchDetails.getReagentConsumableInventoryId()).ne(ReagentConsumableInventory::getCategory, "试剂").ne(ReagentConsumableInventory::getCategory, "耗材"));
|
||||
}
|
||||
if (reagentConsumableInventory != null) {
|
||||
ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryVO);
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
|
||||
reagentConsumableInventoryVOList.add(reagentConsumableInventoryVO);
|
||||
}
|
||||
}
|
||||
if (reagentCategory == 0) {
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOIPage = baseMapper.getRmListById();
|
||||
if (reagentConsumableInventoryVOIPage != null) {
|
||||
return reagentConsumableInventoryVOIPage;
|
||||
} else return null;
|
||||
} else {
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOIPage = baseMapper.getRemListById();
|
||||
if (reagentConsumableInventoryVOIPage != null) {
|
||||
return reagentConsumableInventoryVOIPage;
|
||||
} else return null;
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
return pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOList);
|
||||
// List<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = new ArrayList<>();
|
||||
// List<BatchDetails> list = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("warning_information", "即将过期").or().eq("warning_information", "已过期").or().eq("warning_information", "即将到达存储期限").or().eq("warning_information", "已超过存储期限"));
|
||||
// //查找具有到期批次物品的试剂耗材\标准物质类信息
|
||||
// if (list != null && list.size() != 0) {
|
||||
// for (BatchDetails batchDetails : list) {
|
||||
// ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
|
||||
//
|
||||
//// if (reagentConsumableInventory != null) {
|
||||
// ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
// BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryVO);
|
||||
// reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
|
||||
// reagentConsumableInventoryVOList.add(reagentConsumableInventoryVO);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// PageUtils pageUtils = new PageUtils();
|
||||
// return pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOList);
|
||||
}
|
||||
|
||||
@Override//入库增加库存
|
||||
@@ -196,7 +203,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
|
||||
@Override//分页查询标准物质
|
||||
public IPage<ReferenceMaterialFullVO> getStandardAllList(Page page, QueryWrapper<ReferenceMaterial> qw, Integer status, String number) {
|
||||
public IPage<ReferenceMaterialFullVO> getStandardAllList(Page page, String reagentConsumableName, Integer referenceMaterialStatus) {
|
||||
// //如果扫码
|
||||
// if (StrUtil.isNotBlank(number)) {
|
||||
// ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));
|
||||
@@ -210,7 +217,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
//
|
||||
// }
|
||||
// }
|
||||
IPage<ReferenceMaterialFullVO> referenceMaterialPage = baseMapper.getReferenceMaterialPage(page, qw);
|
||||
IPage<ReferenceMaterialFullVO> referenceMaterialPage = baseMapper.getReferenceMaterialPage(page, referenceMaterialStatus, reagentConsumableName);
|
||||
return referenceMaterialPage;
|
||||
}
|
||||
|
||||
@@ -224,10 +231,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
throw new RuntimeException(String.format("未能查询到该ID对应的标准物质"));
|
||||
}
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId());
|
||||
|
||||
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryFullVO);
|
||||
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventoryFullVO);
|
||||
reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber());
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId());
|
||||
BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||
@@ -247,9 +253,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
List<StandardMaterialApplication> list = standardMaterialApplicationService.list(new LambdaQueryWrapper<StandardMaterialApplication>().eq(StandardMaterialApplication::getReferenceMaterialId, id).orderByDesc(StandardMaterialApplication::getDateOfClaim));
|
||||
|
||||
R<SysUser> userR = remoteUserService.innerGetById(list.get(0).getRecipientId());
|
||||
reagentConsumableInventoryFullVO.setHolderName(userR.getData().getName());
|
||||
reagentConsumableInventoryFullVO.setHolderId(userR.getData().getUserId());
|
||||
if (list.size() > 0) {
|
||||
R<SysUser> userR = remoteUserService.innerGetById(list.get(0).getRecipientId());
|
||||
reagentConsumableInventoryFullVO.setHolderName(userR.getData().getName());
|
||||
reagentConsumableInventoryFullVO.setHolderId(userR.getData().getUserId());
|
||||
}
|
||||
|
||||
if (one1 != null) {
|
||||
reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration());
|
||||
@@ -341,7 +349,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
System.out.println("referenceMaterialTablePDF.................");
|
||||
|
||||
for (ReferenceMaterialVO referenceMaterialVO : voList) {
|
||||
referenceMaterialVO.setTime(LocalDateTimeUtil.format(referenceMaterialVO.getCreateTime(),"yyyy-MM-dd"));
|
||||
referenceMaterialVO.setTime(LocalDateTimeUtil.format(referenceMaterialVO.getCreateTime(), "yyyy-MM-dd"));
|
||||
}
|
||||
int x = 1;
|
||||
|
||||
@@ -386,7 +394,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||
|
||||
fosWord.close();
|
||||
ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".docx",fisWord);
|
||||
ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".docx", fisWord);
|
||||
|
||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
// MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
@@ -411,19 +419,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
//试剂/耗材扫描物品编码进行持久化
|
||||
@Override
|
||||
public void setCode(String id, String code) {
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(id);
|
||||
|
||||
ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", id));
|
||||
|
||||
if (byId != null & one != null) {
|
||||
byId.setCode(code);
|
||||
one.setCode(code);
|
||||
|
||||
this.updateById(one);
|
||||
reagentConsumablesService.updateById(byId);
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(id);
|
||||
if (reagentConsumables != null) {
|
||||
reagentConsumables.setCode(code);
|
||||
reagentConsumablesService.updateById(reagentConsumables);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -525,7 +525,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
reagentConsumableInventoryDTO.setAlias("");
|
||||
}
|
||||
|
||||
ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()).eq("category", reagentConsumableInventoryDTO.getCategory()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()), "specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity()), "standard_value_or_purity", reagentConsumableInventoryDTO.getStandardValueOrPurity()).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(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()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getMinimumUnit()), "minimum_unit", reagentConsumableInventoryDTO.getMinimumUnit()));
|
||||
ReagentConsumables oldReagentConsumables = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query().eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()).eq("category", reagentConsumableInventoryDTO.getCategory()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()), "specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity()), "standard_value_or_purity", reagentConsumableInventoryDTO.getStandardValueOrPurity()).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(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()).eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getMinimumUnit()), "minimum_unit", reagentConsumableInventoryDTO.getMinimumUnit()));
|
||||
BatchDetails batchDetails = new BatchDetails();
|
||||
batchDetails.setServiceStatus(1);
|
||||
batchDetails.setQuantity(quantity);
|
||||
@@ -559,18 +559,18 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
batchDetails.setBatchNumber("/");
|
||||
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
batchDetails.setRoomNo(reagentConsumableInventoryDTO.getRoomNo());
|
||||
if (one != null) {
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId()));
|
||||
if (oldReagentConsumables != null) {
|
||||
ReagentConsumableInventory inventory = this.getOne(Wrappers.<ReagentConsumableInventory>lambdaQuery().eq(ReagentConsumableInventory::getReagentConsumableId, oldReagentConsumables.getReagentConsumableId()));
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", inventory.getReagentConsumableInventoryId()));
|
||||
if (batchDetailsList != null & batchDetailsList.size() > 0) {
|
||||
int x = batchDetailsList.size() + 1;
|
||||
batchDetails.setBatch("2023-" + x);
|
||||
one.setTotalQuantity(one.getTotalQuantity() + quantity);
|
||||
this.updateById(one);
|
||||
inventory.setTotalQuantity(inventory.getTotalQuantity() + quantity);
|
||||
this.updateById(inventory);
|
||||
}
|
||||
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(one.getReagentConsumableId());
|
||||
if (!one.getCategory().equals("标准物质")) {
|
||||
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query().eq("room_no", reagentConsumableInventoryDTO.getRoomNo()).eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId()));
|
||||
batchDetails.setReagentConsumableInventoryId(inventory.getReagentConsumableInventoryId());
|
||||
if (!oldReagentConsumables.getCategory().equals("标准物质")) {
|
||||
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query().eq("room_no", reagentConsumableInventoryDTO.getRoomNo()).eq("reagent_consumable_id", oldReagentConsumables.getReagentConsumableId()));
|
||||
if (reagentConsumableStash != null) {
|
||||
reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity);
|
||||
batchDetails.setReagentConsumableStashId(reagentConsumableStash.getId());
|
||||
@@ -580,15 +580,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
BeanUtils.copyProperties(reagentConsumableInventoryDTO, consumableStash);
|
||||
consumableStash.setId(IdWorker.get32UUID().toUpperCase());
|
||||
consumableStash.setTotalQuantity(quantity);
|
||||
consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
consumableStash.setReagentConsumableId(oldReagentConsumables.getReagentConsumableId());
|
||||
batchDetails.setReagentConsumableStashId(consumableStash.getId());
|
||||
reagentConsumableStashService.save(consumableStash);
|
||||
}
|
||||
}
|
||||
if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) {
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setReagentConsumableId(oldReagentConsumables.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(inventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setLocation(location);
|
||||
referenceMaterial.setStatus(0);
|
||||
referenceMaterial.setLatticeId(cabinetCell.getId());
|
||||
@@ -604,28 +604,30 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
||||
}
|
||||
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1);
|
||||
this.updateCabinet(cabinetCell.getId(), oldReagentConsumables.getReagentConsumableId(), 1);
|
||||
|
||||
} else {
|
||||
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
|
||||
BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumableInventory);
|
||||
ReagentConsumables reagentConsumables = new ReagentConsumables();
|
||||
BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumables);
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumableInventory.setWarningValue(1);
|
||||
if (reagentConsumableInventoryDTO.getPackages() != null) {
|
||||
if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) {
|
||||
reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getPackages());
|
||||
reagentConsumables.setSpecificationAndModel(reagentConsumableInventoryDTO.getPackages());
|
||||
} else {
|
||||
reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages());
|
||||
reagentConsumables.setSpecificationAndModel(reagentConsumableInventoryDTO.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages());
|
||||
}
|
||||
}
|
||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(reagentConsumableInventory);
|
||||
reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumablesService.save(reagentConsumables);
|
||||
reagentConsumableInventory.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
reagentConsumableInventory.setTotalQuantity(quantity);
|
||||
this.save(reagentConsumableInventory);
|
||||
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1);
|
||||
|
||||
if (!reagentConsumableInventory.getCategory().equals("标准物质")) {
|
||||
if (!reagentConsumables.getCategory().equals("标准物质")) {
|
||||
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query().eq("room_no", reagentConsumableInventoryDTO.getRoomNo()).eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId()));
|
||||
if (reagentConsumableStash != null) {
|
||||
reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity);
|
||||
@@ -738,11 +740,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
BeanUtils.copyProperties(batchDetails, batchDetailsVO);
|
||||
batchDetailsVO.setSupplierName(supplierInformationService.getById(batchDetails.getSupplierId()).getSupplierName());
|
||||
ReagentConsumableInventory reagentConsumableInventory = this.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(reagentConsumableInventory.getReagentConsumableId());
|
||||
ReagentConsumableInventoryVO vo = new ReagentConsumableInventoryVO();
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, vo);
|
||||
BeanUtils.copyProperties(reagentConsumables, vo);
|
||||
List<LocationInfoVO> locationInfoVOList = locationInfoService.getListById(id);
|
||||
|
||||
HashMap<String, Object> objectObjectHashMap = new HashMap<>();
|
||||
objectObjectHashMap.put("batchDetails", batchDetailsVO);
|
||||
objectObjectHashMap.put("reagentConsumableInventory", reagentConsumableInventory);
|
||||
objectObjectHashMap.put("reagentConsumableInventory", vo);
|
||||
objectObjectHashMap.put("locationInfoVOList", locationInfoVOList);
|
||||
|
||||
return objectObjectHashMap;
|
||||
|
||||
+22
-46
@@ -102,7 +102,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
public StandardReserveSolutionVO addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) {
|
||||
|
||||
if (referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId()).getStatus() != -3) {
|
||||
|
||||
throw new RuntimeException(String.format("请先领用标准物质后,再进行操作"));
|
||||
}
|
||||
|
||||
@@ -110,7 +109,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
StandardReserveSolution standardReserveSolution = new StandardReserveSolution();
|
||||
|
||||
BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution);
|
||||
|
||||
standardReserveSolution.setReferenceMaterialScale(standardReserveSolutionDTO.getReferenceMaterialScale());
|
||||
standardReserveSolution.setConstantVolume(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
@@ -126,37 +124,27 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
standardReserveSolution.setConfigurationConcentration(v);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>lambdaQuery().eq(ReagentConsumables::getReagentConsumableName, standardReserveSolution.getSolutionName()).eq(ReagentConsumables::getConfigurationConcentration, standardReserveSolution.getConfigurationConcentration()));
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableName, standardReserveSolution.getSolutionName());
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getConfigurationConcentration, standardReserveSolution.getConfigurationConcentration());
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
//判断是否存在过该标准储备溶液,若未存在,则将其存入试剂耗材类
|
||||
if (one == null) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
if (reagentConsumables == null) {
|
||||
ReferenceMaterial material = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
//创建一个标准储备溶液的种类对象
|
||||
ReagentConsumables reagentConsumables1 = reagentConsumablesService.getById(byId.getReagentConsumableId());
|
||||
ReagentConsumables reagentConsumablesByRem = reagentConsumablesService.getById(material.getReagentConsumableId());
|
||||
|
||||
reagentConsumables1.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName());
|
||||
reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
|
||||
reagentConsumables1.setCategory("标准储备溶液");
|
||||
reagentConsumables1.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumables1.setUpdateTime(LocalDateTime.now());
|
||||
reagentConsumablesByRem.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumablesByRem.setReagentConsumableName(standardReserveSolution.getSolutionName());
|
||||
reagentConsumablesByRem.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
|
||||
reagentConsumablesByRem.setCategory("标准储备溶液");
|
||||
reagentConsumablesByRem.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumablesByRem.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
reagentConsumablesService.save(reagentConsumables1);
|
||||
reagentConsumablesService.save(reagentConsumablesByRem);
|
||||
//创建标准储备溶液的库存对象
|
||||
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumables1, reagentConsumableInventory);
|
||||
|
||||
reagentConsumableInventory.setReagentConsumableId(reagentConsumablesByRem.getReagentConsumableId());
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
reagentConsumableInventory.setStatus(1);
|
||||
|
||||
reagentConsumableInventory.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setTotalQuantity(0);
|
||||
@@ -165,9 +153,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
|
||||
String prefix = referenceMaterialServiceById.getNumber() + "-";
|
||||
String prefix = material.getNumber() + "-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -192,21 +178,15 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setNumber(prefix + newNo);
|
||||
referenceMaterial.setReagentConsumableName(reagentConsumableInventory.getReagentConsumableName());
|
||||
referenceMaterial.setReagentConsumableName(standardReserveSolution.getSolutionName());
|
||||
referenceMaterial.setReferenceMaterialUnit("ml");
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId.getBatchDetailsId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(material.getBatchDetailsId());
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
|
||||
standardReserveSolution.setReferenceId(referenceMaterial.getId());
|
||||
|
||||
|
||||
standardReserveSolution.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
|
||||
if (reagentConsumableInventoryService.save(reagentConsumableInventory) && this
|
||||
@@ -219,12 +199,10 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
} else {
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId1.getBatchDetailsId());
|
||||
|
||||
ReferenceMaterial material = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
BatchDetails batchDetails = batchDetailsService.getById(material.getBatchDetailsId());
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>lambdaQuery().eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumables.getReagentConsumableId()));
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
|
||||
LocalDate date = LocalDate.now(); // get the current date
|
||||
//获取当前年月日
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
@@ -235,16 +213,13 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
referenceMaterial.setStatus(-5);
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setReferenceMaterialUnit("ml");
|
||||
referenceMaterial.setMass(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
|
||||
String prefix = referenceMaterialServiceById.getNumber() + "-";
|
||||
String prefix = material.getNumber() + "-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -338,6 +313,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterialServiceById.getReagentConsumableInventoryId());
|
||||
reagentConsumableInventoryService.updateCabinet(referenceMaterialServiceById.getLatticeId(), referenceMaterialServiceById.getId(), 1);
|
||||
reagentConsumableInventory.setWarningInformation("/");
|
||||
if (reagentConsumableInventory.getTotalQuantity() != null) {
|
||||
|
||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + 1);
|
||||
|
||||
+19
-25
@@ -9,7 +9,6 @@ import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.WarehousingBatchListService;
|
||||
import digital.laboratory.platform.reagent.service.WarehousingContentService;
|
||||
import digital.laboratory.platform.reagent.vo.RVO;
|
||||
import digital.laboratory.platform.reagent.vo.WarehousingBatchListVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -39,32 +38,27 @@ public class WarehousingBatchListServiceImpl extends ServiceImpl<WarehousingBatc
|
||||
|
||||
|
||||
@Override
|
||||
public List<WarehousingBatchListVO> getWarehousingBatchListVOList(String warehousingContentId) {
|
||||
public List<WarehousingBatchListVO> getWarehousingBatchListVOList(String warehousingRecordFormId,String keywords) {
|
||||
|
||||
List<WarehousingBatchListVO> warehousingBatchListVOList = baseMapper.getWarehousingBatchListVOList(warehousingContentId);
|
||||
List<WarehousingBatchListVO> warehousingBatchListVOList = baseMapper.getWarehousingBatchListVOList(warehousingRecordFormId, keywords);
|
||||
|
||||
ArrayList<RVO> rvos = new ArrayList<>();
|
||||
|
||||
for (WarehousingBatchListVO warehousingBatchListVO : warehousingBatchListVOList) {
|
||||
|
||||
if (warehousingBatchListVO.getBatchId() != null) {
|
||||
|
||||
List<ReferenceMaterial> batch_details_id = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query().eq("batch_details_id", warehousingBatchListVO.getBatchId())
|
||||
);
|
||||
|
||||
for (ReferenceMaterial referenceMaterial : batch_details_id) {
|
||||
|
||||
if (reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId()).getCategory().equals("标准物质")) {
|
||||
|
||||
RVO rvo = new RVO();
|
||||
rvo.setId(referenceMaterial.getId());
|
||||
rvo.setNumber(referenceMaterial.getNumber());
|
||||
rvos.add(rvo);
|
||||
}
|
||||
}
|
||||
}
|
||||
warehousingBatchListVO.setIdList(rvos);
|
||||
}
|
||||
// ArrayList<RVO> rvos = new ArrayList<>();
|
||||
//
|
||||
// for (WarehousingBatchListVO warehousingBatchListVO : warehousingBatchListVOList) {
|
||||
//
|
||||
// if (warehousingBatchListVO.getBatchId() != null) {
|
||||
// List<ReferenceMaterial> batch_details_id = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query().eq("batch_details_id", warehousingBatchListVO.getBatchId()));
|
||||
// for (ReferenceMaterial referenceMaterial : batch_details_id) {
|
||||
// if (reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId()).getCategory().equals("标准物质")) {
|
||||
// RVO rvo = new RVO();
|
||||
// rvo.setId(referenceMaterial.getId());
|
||||
// rvo.setNumber(referenceMaterial.getNumber());
|
||||
// rvos.add(rvo);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// warehousingBatchListVO.setIdList(rvos);
|
||||
// }
|
||||
return warehousingBatchListVOList;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-41
@@ -26,53 +26,18 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
|
||||
@Autowired
|
||||
private WarehousingBatchListService warehousingBatchListService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
@Override
|
||||
public List<WarehousingContentVO> getWarehousingContentVOList(String warehousingRecordFormId) {
|
||||
|
||||
List<WarehousingContentVO> warehousingContentVOList = baseMapper.getWarehousingContentVOList(warehousingRecordFormId);
|
||||
|
||||
for (WarehousingContentVO warehousingContentVO : warehousingContentVOList) {
|
||||
|
||||
List<WarehousingBatchListVO> warehousingBatchListVOList = warehousingBatchListService.getWarehousingBatchListVOList(warehousingContentVO.getId());
|
||||
|
||||
warehousingContentVO.setWarehousingBatchListVOList(warehousingBatchListVOList);
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(warehousingContentVO.getReagentConsumableId());
|
||||
|
||||
warehousingContentVO.setCategory(byId.getCategory());
|
||||
warehousingContentVO.setBrand(byId.getBrand());
|
||||
warehousingContentVO.setSpecificationAndModel(byId.getSpecificationAndModel());
|
||||
warehousingContentVO.setStandardValueOrPurity(byId.getStandardValueOrPurity());
|
||||
warehousingContentVO.setDeviationOrUncertainty(byId.getDeviationOrUncertainty());
|
||||
warehousingContentVO.setUnitPrice(byId.getUnitPrice());
|
||||
if (warehousingContentVO.getWarningValue() == null) {
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId()));
|
||||
if (one != null) {
|
||||
warehousingContentVO.setWarningValue(one.getWarningValue());}
|
||||
}
|
||||
}
|
||||
public List<WarehousingContentVO> getWarehousingContentVOList(String warehousingRecordFormId, Integer oopCode, String keywords, String category) {
|
||||
List<WarehousingContentVO> warehousingContentVOList = baseMapper.getWarehousingContentVOList(warehousingRecordFormId, oopCode, keywords, category);
|
||||
return warehousingContentVOList;
|
||||
}
|
||||
// public List<WarehousingBatchListVO> getBatchList(String warehousingRecordFormId){
|
||||
//
|
||||
// }
|
||||
|
||||
@Override
|
||||
public IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, QueryWrapper<WarehousingContent> qw) {
|
||||
|
||||
IPage<WarehousingContentVO> warehousingContentVOPage = baseMapper.getWarehousingContentVOPage(page, qw);
|
||||
|
||||
List<WarehousingContentVO> records = warehousingContentVOPage.getRecords();
|
||||
|
||||
for (WarehousingContentVO record : records) {
|
||||
|
||||
List<WarehousingBatchListVO> warehousingBatchListVOList = warehousingBatchListService.getWarehousingBatchListVOList(record.getId());
|
||||
|
||||
record.setWarehousingBatchListVOList(warehousingBatchListVOList);
|
||||
}
|
||||
return warehousingContentVOPage;
|
||||
return baseMapper.getWarehousingContentVOPage(page, qw);
|
||||
}
|
||||
}
|
||||
|
||||
+40
-24
@@ -11,18 +11,19 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.WarehousingBatchListMapper;
|
||||
import digital.laboratory.platform.reagent.mapper.WarehousingContentMapper;
|
||||
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
//import io.seata.spring.annotation.GlobalTransactional;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
@@ -98,16 +99,36 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
@Autowired
|
||||
private ReagentConsumableStashService reagentConsumableStashService;
|
||||
|
||||
@Resource
|
||||
private WarehousingContentMapper warehousingContentMapper;
|
||||
@Resource
|
||||
private WarehousingBatchListMapper warehousingBatchListMapper;
|
||||
|
||||
@GlobalTransactional//查看采购入库
|
||||
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) {
|
||||
WarehousingRecordForm byId = this.getById(warehousingFormId);
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO();
|
||||
BeanUtils.copyProperties(byId, warehousingRecordFormVO);
|
||||
@Override
|
||||
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingRecordFormId, Integer opCode, String keywords, String category) {
|
||||
WarehousingRecordForm form = this.getById(warehousingRecordFormId);
|
||||
WarehousingRecordFormVO vo = new WarehousingRecordFormVO();
|
||||
BeanUtils.copyProperties(form, vo);
|
||||
//查询出签收物品明细,将明细添加至签收记录VO
|
||||
warehousingRecordFormVO.setWarehousingContentVOList(warehousingContentService.getWarehousingContentVOList(warehousingFormId));
|
||||
return warehousingRecordFormVO;
|
||||
List<WarehousingContentVO> warehousingContentVOList = warehousingContentMapper.getWarehousingContentVOList(warehousingRecordFormId, opCode, keywords, category);
|
||||
// List<WarehousingBatchListVO> warehousingBatchListVOList = warehousingBatchListMapper.getWarehousingBatchListVOList(warehousingRecordFormId, keywords);
|
||||
// for (int i = 0; i < warehousingContentVOList.size(); i++) {
|
||||
// if (i == 0) {
|
||||
// warehousingContentVOList.get(i).setWarehousingBatchListVOList(warehousingBatchListVOList);
|
||||
// } else {
|
||||
// List<WarehousingBatchListVO> warehousingBatchListVOS = new ArrayList<>();
|
||||
// warehousingContentVOList.get(i).setWarehousingBatchListVOList(warehousingBatchListVOS);
|
||||
// }
|
||||
// }
|
||||
vo.setWarehousingContentVOList(warehousingContentVOList);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WarehousingBatchListVO> getBatchList(String warehousingRecordFormId, String keywords) {
|
||||
return warehousingBatchListMapper.getWarehousingBatchListVOList(warehousingRecordFormId, keywords);
|
||||
}
|
||||
|
||||
@GlobalTransactional
|
||||
@Override//录入入库明细
|
||||
@@ -144,21 +165,18 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
Integer quantity = warehousingRecordFormDTO.getQuantity() * Integer.valueOf(reagentConsumables.getPackagedCopies());//入库数量=购买数量x包装份数
|
||||
|
||||
//判断采购数量与签收数量
|
||||
if (warehousingContent.getWarehousingQuantity() > warehousingContent.getTotalQuantity()) {
|
||||
throw new RuntimeException(String.format("入库数量不能大于采购数量"));
|
||||
}
|
||||
|
||||
warehousingBatchList.setBatch(warehousingBatchListService.list(Wrappers.<WarehousingBatchList>query().eq("warehousing_content_id", warehousingBatchList.getWarehousingContentId())).size() + 1);
|
||||
|
||||
|
||||
warehousingContent.setLastStorageLocation(warehousingRecordFormDTO.getLocation());//记录存放位置信息,以便下次签收同样物品时可以回显位置信息
|
||||
warehousingContent.setBoxId(boxId);//柜子ID
|
||||
warehousingContent.setLatticeId(latticeId);//格子ID
|
||||
|
||||
warehousingContent.setWarehousingQuantity(warehousingContent.getWarehousingQuantity() + warehousingBatchList.getQuantity());//修改签收数量
|
||||
|
||||
if (warehousingRecordFormDTO.getCode() != null) {//如果填入物品编码,则记录,以便下次签收回显
|
||||
//判断采购数量与签收数量
|
||||
if (warehousingContent.getWarehousingQuantity() > warehousingContent.getTotalQuantity()) {
|
||||
throw new RuntimeException(String.format("入库数量不能大于采购数量"));
|
||||
}
|
||||
if (StrUtil.isNotBlank(warehousingRecordFormDTO.getCode())) {//如果填入物品编码,则记录,以便下次签收回显
|
||||
warehousingContent.setCode(warehousingRecordFormDTO.getCode());
|
||||
}
|
||||
|
||||
@@ -171,13 +189,12 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
reagentConsumableInventory.setStatus(1);//状态 1为正常
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarningValue());//预警值
|
||||
//如果供应商未提供物品编码,则需在入库时扫描标签录入编码
|
||||
if (StrUtil.isNotBlank(warehousingRecordFormDTO.getCode())) {
|
||||
reagentConsumableInventory.setCode(warehousingRecordFormDTO.getCode());
|
||||
reagentConsumables.setCode(warehousingRecordFormDTO.getCode());
|
||||
} else {
|
||||
reagentConsumableInventory.setCode("");
|
||||
reagentConsumables.setCode("");
|
||||
}
|
||||
reagentConsumablesService.updateById(reagentConsumables);
|
||||
@@ -208,7 +225,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
if (!reagentConsumables.getCategory().equals("标准物质")) {
|
||||
|
||||
ReagentConsumableStash reagentConsumableStash = new ReagentConsumableStash();
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableStash);
|
||||
BeanUtils.copyProperties(reagentConsumables, reagentConsumableStash);
|
||||
reagentConsumableStash.setId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumableStash.setRoomNo(roomNo);
|
||||
reagentConsumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
@@ -267,7 +284,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
} else {
|
||||
//如果仓库存在该物品
|
||||
if (warehousingRecordFormDTO.getCode() != null) {
|
||||
one.setCode(warehousingRecordFormDTO.getCode());
|
||||
reagentConsumables.setCode(warehousingContent.getCode());
|
||||
reagentConsumablesService.updateById(reagentConsumables);
|
||||
}
|
||||
@@ -299,7 +315,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
.eq("room_no", roomNo));
|
||||
if (reagentConsumableStash == null) {
|
||||
ReagentConsumableStash newReagentConsumableStash = new ReagentConsumableStash();
|
||||
BeanUtils.copyProperties(one, newReagentConsumableStash);
|
||||
BeanUtils.copyProperties(reagentConsumables, newReagentConsumableStash);
|
||||
newReagentConsumableStash.setId(IdWorker.get32UUID().toUpperCase());
|
||||
newReagentConsumableStash.setRoomNo(roomNo);
|
||||
newReagentConsumableStash.setTotalQuantity(quantity);
|
||||
@@ -324,14 +340,14 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
Integer x = batchDetailsList.size() + 1;
|
||||
batchDetails.setBatch(year + "-" + x);
|
||||
}
|
||||
if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) {
|
||||
if (reagentConsumables.getCategory().equals("试剂") | reagentConsumables.getCategory().equals("耗材")) {
|
||||
//更新格子信息(试剂耗材传入类ID)
|
||||
reagentConsumableInventoryService.updateCabinet(batchDetails.getLatticeId(), one.getReagentConsumableInventoryId(), 1);
|
||||
}
|
||||
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity());
|
||||
one.setWarningValue(warehousingRecordFormDTO.getWarningValue());
|
||||
|
||||
if (one.getCategory().equals("标准物质")) {
|
||||
if (reagentConsumables.getCategory().equals("标准物质")) {
|
||||
for (int j = 0; j < batchDetails.getQuantity(); j++) {
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
@@ -412,7 +428,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(warehousingContent.getReagentConsumableId(), warehousingContent.getSupplierId(), acceptanceSignForServiceOne.getId());
|
||||
warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getId());
|
||||
}
|
||||
|
||||
warehousingContentService.updateById(warehousingContent);
|
||||
}
|
||||
|
||||
@@ -449,6 +464,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
}
|
||||
this.updateById(warehousingRecordForm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm> qw) {
|
||||
IPage<WarehousingRecordFormVO> warehousingRecordFormVOPage = baseMapper.getWarehousingRecordFormVOPage(page, qw);//查询签收单列表
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.task;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
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.entity.StandardReserveSolution;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -15,6 +18,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
@@ -32,9 +36,11 @@ public class MaturityCalculation {
|
||||
|
||||
private final ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
private final ReagentConsumableInventoryMapper reagentConsumableInventoryMapper;
|
||||
|
||||
@Scheduled(cron = "1 0 0 * * ? ")
|
||||
public void calculate() {
|
||||
System.out.println("~~~~~~~~~~~~~~执行检测系统有效期情况~~~~~~~~~~~~~~");
|
||||
//查找出有库存量的物品所有批次信息(状态为1)
|
||||
List<BatchDetails> list1 = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("service_status", 1));
|
||||
String warningInformation = null;
|
||||
@@ -56,13 +62,9 @@ public class MaturityCalculation {
|
||||
.eq("status", 1));
|
||||
|
||||
for (StandardReserveSolution standardReserveSolution : list) {
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
||||
|
||||
standardReserveSolutionService.updateById(standardReserveSolution);
|
||||
|
||||
}
|
||||
|
||||
periodVerificationPlanService.getPlan();
|
||||
System.out.println("期间核查计划自动更新");
|
||||
}
|
||||
@@ -70,46 +72,39 @@ public class MaturityCalculation {
|
||||
|
||||
@Scheduled(cron = "0 0/1 * * * ? ")
|
||||
public void inventoryReminder() {
|
||||
|
||||
System.out.println("~~~~~~~~~~~~~~执行检测系统库存情况~~~~~~~~~~~~~~"+ LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy-MM-dd HH:mm:ss"));
|
||||
List<StandardReserveSolution> list2 = standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
||||
.eq("status", 1));
|
||||
|
||||
for (StandardReserveSolution standardReserveSolution : list2) {
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
||||
if (referenceMaterialServiceById.getStatus() == -4) {
|
||||
|
||||
standardReserveSolution.setWarningInformation("已全部使用完毕或已报废");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(Wrappers.<ReagentConsumableInventory>query().ne("category", "标准储备溶液"));
|
||||
List<String> item = new ArrayList<>();
|
||||
item.add("试剂");
|
||||
item.add("耗材");
|
||||
item.add("标准物质");
|
||||
List<ReagentConsumableInventoryVO> list = reagentConsumableInventoryMapper.getRciListByCategory(item);
|
||||
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
|
||||
if (reagentConsumableInventory.getTotalQuantity() == 0) {
|
||||
|
||||
reagentConsumableInventory.setWarningInformation("暂无库存");
|
||||
}
|
||||
|
||||
if (reagentConsumableInventory.getTotalQuantity() <= reagentConsumableInventory.getWarningValue()) {
|
||||
|
||||
reagentConsumableInventory.setWarningInformation("库存不足");
|
||||
|
||||
} else {
|
||||
reagentConsumableInventory.setWarningInformation("库存充足");
|
||||
}
|
||||
reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
||||
}
|
||||
|
||||
List<ReagentConsumableInventory> list1 = reagentConsumableInventoryService.list(Wrappers.<ReagentConsumableInventory>query().eq("category", "标准储备溶液"));
|
||||
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list1) {
|
||||
|
||||
reagentConsumableInventory.setWarningInformation("无");
|
||||
|
||||
reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
||||
}
|
||||
// List<String> item1 = new ArrayList<>();
|
||||
// item1.add("标准储备溶液");
|
||||
// List<ReagentConsumableInventoryVO> list1 = reagentConsumableInventoryMapper.getRciListByCategory(item1);
|
||||
// for (ReagentConsumableInventory reagentConsumableInventory : list1) {
|
||||
// reagentConsumableInventory.setWarningInformation("无");
|
||||
// reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RVO {
|
||||
private String id;
|
||||
private String number;
|
||||
}
|
||||
+99
@@ -1,5 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -90,5 +92,102 @@ public class ReagentConsumableInventoryFullVO extends ReagentConsumableInventory
|
||||
|
||||
private String holderId;
|
||||
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@ApiModelProperty(value="品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
@ApiModelProperty(value="类别")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value="名称")
|
||||
private String reagentConsumableName;
|
||||
|
||||
/**
|
||||
* 种类
|
||||
*/
|
||||
@ApiModelProperty(value="种类")
|
||||
private String species;
|
||||
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@ApiModelProperty(value="英文名")
|
||||
private String englishName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value="规格型号")
|
||||
private String specificationAndModel;
|
||||
/**
|
||||
* 包装份数
|
||||
*/
|
||||
@ApiModelProperty(value="包装份数")
|
||||
private Integer packagedCopies;
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* (技术参数)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术参数)")
|
||||
private String technicalParameter;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value="单价")
|
||||
private Double unitPrice;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
@ApiModelProperty(value="别名")
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* 存储条件
|
||||
*/
|
||||
@ApiModelProperty(value="存储条件")
|
||||
private String storageCondition;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value="备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 包装单位
|
||||
*/
|
||||
@ApiModelProperty(value="包装单位")
|
||||
private String minimumUnit;
|
||||
|
||||
@ApiModelProperty(value = "存储期限")
|
||||
private Integer storageLife;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+104
@@ -1,5 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -24,6 +26,108 @@ public class ReagentConsumableInventoryVO extends ReagentConsumableInventory {
|
||||
@ApiModelProperty(value="房间号")
|
||||
private String roomNo;
|
||||
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@ApiModelProperty(value="品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
@ApiModelProperty(value="类别")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value="名称")
|
||||
private String reagentConsumableName;
|
||||
|
||||
/**
|
||||
* 种类
|
||||
*/
|
||||
@ApiModelProperty(value="种类")
|
||||
private String species;
|
||||
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@ApiModelProperty(value="英文名")
|
||||
private String englishName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value="规格型号")
|
||||
private String specificationAndModel;
|
||||
/**
|
||||
* 包装份数
|
||||
*/
|
||||
@ApiModelProperty(value="包装份数")
|
||||
private Integer packagedCopies;
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* (技术参数)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术参数)")
|
||||
private String technicalParameter;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value="单价")
|
||||
private Double unitPrice;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
@ApiModelProperty(value="别名")
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* 存储条件
|
||||
*/
|
||||
@ApiModelProperty(value="存储条件")
|
||||
private String storageCondition;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value="备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 包装单位
|
||||
*/
|
||||
@ApiModelProperty(value="包装单位")
|
||||
private String minimumUnit;
|
||||
/**
|
||||
* 溶液浓度
|
||||
*/
|
||||
@ApiModelProperty(value="溶液浓度")
|
||||
private double configurationConcentration;
|
||||
|
||||
@ApiModelProperty(value = "存储期限")
|
||||
private Integer storageLife;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.entity.WarehousingBatchList;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -10,9 +11,13 @@ import java.util.List;
|
||||
@Data
|
||||
public class WarehousingBatchListVO extends WarehousingBatchList {
|
||||
|
||||
@ApiModelProperty(value="入库人名称")
|
||||
@ApiModelProperty(value = "入库人名称")
|
||||
private String depositorName;
|
||||
|
||||
private List<RVO> idList;
|
||||
private List<ReferenceMaterial> idList;
|
||||
private String reagentConsumableName;
|
||||
private String reagentConsumableId;
|
||||
private String standardValueOrPurity;
|
||||
private String specificationAndModel;
|
||||
private String category;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@ public class WarehousingContentVO extends WarehousingContent {
|
||||
@ApiModelProperty(value = "(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
@ApiModelProperty(value = "(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
@ApiModelProperty(value="单价")
|
||||
@ApiModelProperty(value = "单价")
|
||||
private Double unitPrice;
|
||||
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
@ApiModelProperty(value = "偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "预警值")
|
||||
private Integer warningValue;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,47 +7,31 @@
|
||||
<resultMap id="reagentConsumableInventoryMap"
|
||||
type="digital.laboratory.platform.reagent.entity.ReagentConsumableInventory">
|
||||
<id property="reagentConsumableInventoryId" column="reagent_consumable_inventory_id"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="deviationOrUncertainty" column="deviation_or_uncertainty"/>
|
||||
<result property="instructionBookId" column="instruction_book_id"/>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"/>
|
||||
<result property="specificationAndModel" column="specification_and_model"/>
|
||||
<result property="totalQuantity" column="total_quantity"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
|
||||
<result property="technicalParameter" column="technical_parameter"/>
|
||||
<result property="totalQuantity" column="total_quantity"/>
|
||||
<result property="species" column="species"/>
|
||||
<result property="packagedCopies" column="packaged_copies"/>
|
||||
<result property="configurationConcentration" column="configuration_concentration"/>
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="storageCondition" column="storage_condition"/>
|
||||
<result property="alias" column="alias"/>
|
||||
<result property="englishName" column="english_name"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"/>
|
||||
<result property="storageLife" column="storage_life"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="warningValue" column="warning_value"/>
|
||||
<result property="warningInformation" column="warning_information"/>
|
||||
<result property="casNumber" column="cas_number"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="purityGrade" column="purity_grade"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="reagentConsumableInventoryVO"
|
||||
type="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO"
|
||||
extends="reagentConsumableInventoryMap">
|
||||
<collection property="batchDetailsVOS" ofType="batchDetailsVOS" select="getBatchDetailsListForReagent" column="reagent_consumable_inventory_id"></collection>
|
||||
<collection property="batchDetailsVOS" ofType="batchDetailsVOS" select="getBatchDetailsListForReagent"
|
||||
column="reagent_consumable_inventory_id"></collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="getBatchDetailsListForReagent" resultMap="batchDetailsVOS" >
|
||||
select b.*,(select s.supplier_name from supplier_information s where s.id = b.supplier_id ) as supplier_name from batch_details b where b.reagent_consumable_inventory_id =#{reagent_consumable_inventory_id}
|
||||
<select id="getBatchDetailsListForReagent" resultMap="batchDetailsVOS">
|
||||
select b.*, (select s.supplier_name from supplier_information s where s.id = b.supplier_id) as supplier_name
|
||||
from batch_details b
|
||||
where b.quantity != 0 and b.reagent_consumable_inventory_id = #{reagent_consumable_inventory_id}
|
||||
order by b.batch asc
|
||||
</select>
|
||||
|
||||
<resultMap id="batchDetailsVOS" type="digital.laboratory.platform.reagent.entity.BatchDetails">
|
||||
@@ -92,34 +76,42 @@
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO">
|
||||
SELECT bd.*,
|
||||
r1.*,
|
||||
(SELECT s1.supplier_name FROM supplier_information s1 WHERE s1.id = bd.supplier_id) as supplier_name
|
||||
FROM batch_details bd,
|
||||
reagent_consumable_inventory r1
|
||||
WHERE bd.reagent_consumable_inventory_id = r1.reagent_consumable_inventory_id
|
||||
s1.supplier_name,
|
||||
rm.*
|
||||
FROM batch_details bd
|
||||
LEFT JOIN reagent_consumable_inventory r1 ON bd.reagent_consumable_inventory_id =
|
||||
r1.reagent_consumable_inventory_id
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = r1.reagent_consumable_id
|
||||
LEFT JOIN supplier_information s1 ON s1.id = bd.supplier_id;
|
||||
<if test="name != null">
|
||||
AND r1.`reagent_consumable_name` = #{name}
|
||||
AND rm.`reagent_consumable_name` = #{name}
|
||||
</if>
|
||||
<if test="category != null">
|
||||
AND r1.`category` = #{category}
|
||||
AND rm.`category` = #{category}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getReagentConsumableInventoryVOPage" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
select r.* from reagent_consumable_inventory r
|
||||
select r.*,rm.* from reagent_consumable_inventory r LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id
|
||||
=
|
||||
r.reagent_consumable_id
|
||||
where
|
||||
<if test="reagentCategory != null and reagentCategory == 0">
|
||||
r.category in ('试剂','耗材')
|
||||
rm.category in ('试剂','耗材')
|
||||
</if>
|
||||
<if test="reagentCategory != null and reagentCategory == 1">
|
||||
r.category in ('标准物质','标准储备溶液')
|
||||
rm.category in ('标准物质','标准储备溶液')
|
||||
</if>
|
||||
<if test="warning != null and warning == 1">
|
||||
and r.warning_information = '库存不足'
|
||||
</if>
|
||||
<if test="warning != null and warning == 2">
|
||||
and r.warning_information in ('即将过期', '已过期', '即将到达存储期限', '已超过存储期限')
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
and r.reagent_consumable_name like concat('%',#{keywords},'%')
|
||||
or r.remark like like concat('%',#{keywords},'%')
|
||||
and rm.reagent_consumable_name like concat('%',#{keywords},'%')
|
||||
or rm.remark like like concat('%',#{keywords},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -138,136 +130,141 @@
|
||||
</select>
|
||||
|
||||
|
||||
<!-- <sql id="getReferenceMaterialPageSQL">-->
|
||||
<!-- SELECT r1.*, r2.*, b1.*-->
|
||||
<!-- FROM reference_material r1,-->
|
||||
<!-- reagent_consumable_inventory r2,-->
|
||||
<!-- batch_details b1-->
|
||||
<!-- WHERE r1.reagent_consumable_inventory_id = r2.reagent_consumable_inventory_id-->
|
||||
<!-- and r1.batch_details_id = b1.batch_details_id-->
|
||||
<!-- </sql> -->
|
||||
|
||||
|
||||
<select id="getReferenceMaterialPage" resultType="digital.laboratory.platform.reagent.vo.ReferenceMaterialFullVO">
|
||||
SELECT rmp.*,
|
||||
(select rci.specification_and_model
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as specification_and_model,
|
||||
(select rci.`code`
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as `code`,
|
||||
(select rci.category
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as category,
|
||||
(select rci.brand
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as brand,
|
||||
(select rci.deviation_or_uncertainty
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as deviation_or_uncertainty,
|
||||
(select rci.instruction_book_id
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as instruction_book_id,
|
||||
(select rci.species
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as species,
|
||||
(select rci.alias
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as alias,
|
||||
(select rci.remark
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as remark,
|
||||
(select rci.configuration_concentration
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as configuration_concentration,
|
||||
(select rci.storage_life
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as storage_life,
|
||||
(select rci.warning_information
|
||||
from reagent_consumable_inventory rci
|
||||
where rci.reagent_consumable_inventory_id =
|
||||
rmp.reagent_consumable_inventory_id) as warning_information,
|
||||
(select r1.`status` from reference_material r1 where r1.id = rmp.id) as reference_material_status,
|
||||
(select r1.`id` from reference_material r1 where r1.id = rmp.id) as reference_material_id,
|
||||
(select bd.batch
|
||||
from batch_details bd
|
||||
where bd.batch_details_id = rmp.batch_details_id) as batch,
|
||||
(select bd.fixed_result
|
||||
from batch_details bd
|
||||
where bd.batch_details_id = rmp.batch_details_id) as fixed_result,
|
||||
(select bd.purchase_time
|
||||
from batch_details bd
|
||||
where bd.batch_details_id = rmp.batch_details_id) as purchase_time,
|
||||
(select bd.batch_number
|
||||
from batch_details bd
|
||||
where bd.batch_details_id = rmp.batch_details_id) as batch_number,
|
||||
(select bd.supplier_id
|
||||
from batch_details bd
|
||||
where bd.batch_details_id = rmp.batch_details_id) as manufacturer_id,
|
||||
(select srs.configuration_concentration
|
||||
from standard_reserve_solution srs
|
||||
where srs.reference_id = rmp.id) as configuration_concentration,
|
||||
(select srs.configuration_date
|
||||
from standard_reserve_solution srs
|
||||
where srs.reference_id = rmp.id) as configuration_date,
|
||||
(select srs.solution_numbering
|
||||
from standard_reserve_solution srs
|
||||
where srs.reference_id = rmp.id) as solution_numbering,
|
||||
(select srs.validity_period
|
||||
from standard_reserve_solution srs
|
||||
where srs.reference_id = rmp.id) as validity_period
|
||||
rci.reagent_consumable_id,
|
||||
rm.specification_and_model,
|
||||
rm.`code`,
|
||||
rm.category,
|
||||
rm.brand,
|
||||
rm.deviation_or_uncertainty,
|
||||
rci.instruction_book_id,
|
||||
rm.species,
|
||||
rm.alias,
|
||||
rm.remark,
|
||||
rm.configuration_concentration,
|
||||
rm.storage_life,
|
||||
rci.warning_information,
|
||||
r1.`status` as reference_material_status,
|
||||
r1.`id` as reference_material_id,
|
||||
bd.batch,
|
||||
bd.fixed_result,
|
||||
bd.purchase_time,
|
||||
bd.batch_number,
|
||||
bd.supplier_id as manufacturer_id,
|
||||
srs.configuration_concentration,
|
||||
srs.configuration_date,
|
||||
srs.solution_numbering,
|
||||
srs.validity_period
|
||||
FROM reference_material rmp
|
||||
${ew.customSqlSegment}
|
||||
LEFT JOIN reagent_consumable_inventory rci
|
||||
ON rci.reagent_consumable_inventory_id = rmp.reagent_consumable_inventory_id
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = rci.reagent_consumable_id
|
||||
LEFT JOIN reference_material r1 ON r1.id = rmp.id
|
||||
LEFT JOIN batch_details bd ON bd.batch_details_id = rmp.batch_details_id
|
||||
LEFT JOIN standard_reserve_solution srs ON srs.reference_id = rmp.id
|
||||
WHERE 1=1
|
||||
<if test="status != null">
|
||||
and rmp.`status` = #{status}
|
||||
</if>
|
||||
<if test="status == null">
|
||||
and rmp.`status` != -4
|
||||
</if>
|
||||
<if test="reagentConsumableName != null and reagentConsumableName != ''">
|
||||
and rmp.`reagent_consumable_name` like concat ('%', #{reagentConsumableName}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getReagentConsumablePage"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO">
|
||||
|
||||
SELECT b1.batch,b1.batch_details_id,b1.quantity,r1.*,(SELECT si.supplier_name FROM supplier_information si WHERE
|
||||
si.id = b1.supplier_id) as supplier_name FROM batch_details b1, reagent_consumable_inventory r1 WHERE
|
||||
(r1.category = '试剂' or r1.category = '耗材') and b1.reagent_consumable_inventory_id =
|
||||
r1.reagent_consumable_inventory_id and b1.service_status = '1'
|
||||
SELECT b1.batch, b1.batch_details_id, b1.quantity, r1.*, si.supplier_name,rm.*
|
||||
FROM batch_details b1
|
||||
LEFT JOIN reagent_consumable_inventory r1 ON b1.reagent_consumable_inventory_id =
|
||||
r1.reagent_consumable_inventory_id
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = r1.reagent_consumable_id
|
||||
LEFT JOIN supplier_information si ON b1.supplier_id = si.id
|
||||
WHERE (rm.category = '试剂' or rm.category = '耗材') and b1.service_status = '1'
|
||||
<if test="name !=null and name !=''">
|
||||
and b1.reagent_consumable_inventory_id in (SELECT reagent_consumable_inventory_id FROM
|
||||
reagent_consumable_inventory WHERE reagent_consumable_name like concat('%',#{name},'%'))
|
||||
and rm.reagent_consumable_name like concat('%',#{name},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getReagentConsumableList"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO">
|
||||
SELECT b1.batch,
|
||||
b1.purchase_time as batch_purchase_time,
|
||||
b1.purchase_time as batch_purchase_time,
|
||||
b1.batch_details_id,
|
||||
b1.quantity,
|
||||
b1.room_no,
|
||||
b1.location,
|
||||
r1.*,
|
||||
(SELECT si.supplier_name
|
||||
FROM supplier_information si
|
||||
WHERE si.id = b1.supplier_id) as supplier_name
|
||||
FROM batch_details b1,
|
||||
reagent_consumable_inventory r1
|
||||
WHERE (r1.category = '试剂' or r1.category = '耗材')
|
||||
and b1.reagent_consumable_inventory_id =
|
||||
r1.reagent_consumable_inventory_id
|
||||
si.supplier_name as supplier_name,
|
||||
rm.*
|
||||
FROM batch_details b1
|
||||
LEFT JOIN reagent_consumable_inventory r1
|
||||
ON r1.reagent_consumable_inventory_id = b1.reagent_consumable_inventory_id
|
||||
LEFT JOIN supplier_information si ON si.id = b1.supplier_id
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = r1.reagent_consumable_id
|
||||
WHERE (rm.category = '试剂' or rm.category = '耗材')
|
||||
and b1.service_status = '1'
|
||||
order by b1.room_no, b1.location asc
|
||||
</select>
|
||||
|
||||
<select id="getRemListById" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
SELECT r1.*, rm.*
|
||||
FROM reagent_consumable_inventory r1
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = r1.reagent_consumable_id
|
||||
WHERE rm.category != '试剂' AND rm.category != '耗材'
|
||||
AND r1.reagent_consumable_inventory_id IN (
|
||||
SELECT reagent_consumable_inventory_id
|
||||
FROM batch_details
|
||||
WHERE warning_information IN ('即将过期', '已过期', '即将到达存储期限', '已超过存储期限')
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="getRmListById" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
SELECT r1.*, rm.*
|
||||
FROM reagent_consumable_inventory r1
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = r1.reagent_consumable_id
|
||||
WHERE rm.category != '标准物质' AND rm.category != '标准储备溶液'
|
||||
AND r1.reagent_consumable_inventory_id IN (
|
||||
SELECT reagent_consumable_inventory_id
|
||||
FROM batch_details
|
||||
WHERE warning_information IN ('即将过期', '已过期', '即将到达存储期限', '已超过存储期限')
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="getCellName" resultType="String">
|
||||
select c.cabinet_name as name
|
||||
from dlp_cabinet.b_cabinet c
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getRciListByCategory" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
SELECT ri.*, rm.*
|
||||
FROM reagent_consumable_inventory ri
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = ri.reagent_consumable_id
|
||||
WHERE rm.category in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getRciById" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
SELECT ri.*, rm.*
|
||||
FROM reagent_consumable_inventory ri
|
||||
LEFT JOIN reagent_consumables rm ON rm.reagent_consumable_id = ri.reagent_consumable_id
|
||||
WHERE 1 = 1
|
||||
<if test="reagentConsumableInventoryId != '' and reagentConsumableInventoryId != null">
|
||||
and ri.reagent_consumable_inventory_id = #{reagentConsumableInventoryId}
|
||||
</if>
|
||||
<if test="reagentConsumableId != '' and reagentConsumableId != null">
|
||||
and rm.reagent_consumable_id = #{reagentConsumableId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -32,13 +32,44 @@
|
||||
<resultMap id="warehousingBatchListVO" type="digital.laboratory.platform.reagent.vo.WarehousingBatchListVO"
|
||||
extends="warehousingBatchListMap">
|
||||
<result property="depositorName" column="depositor_name"></result>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"></result>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"></result>
|
||||
<result property="specificationAndModel" column="specification_and_model"></result>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"></result>
|
||||
<result property="category" column="category"></result>
|
||||
<collection property="idList" ofType="referenceMaterialMap" select="getReferenceMaterialMapByBatchId" column="batch_id"></collection>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="referenceMaterialMap" type="digital.laboratory.platform.reagent.entity.ReferenceMaterial">
|
||||
<id property="id" column="id"></id>
|
||||
<result property="number" column="number"></result>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<select id="getReferenceMaterialMapByBatchId" resultMap="referenceMaterialMap">
|
||||
select rm.id, rm.number,rm.reagent_consumable_name
|
||||
from reference_material rm
|
||||
where rm.batch_details_id = #{batch_id}
|
||||
order by number asc
|
||||
</select>
|
||||
|
||||
<select id="getWarehousingBatchListVOList" resultMap="warehousingBatchListVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.WarehousingBatchListVO">
|
||||
SELECT wbl.*,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id=wbl.create_by ) as depositor_name
|
||||
FROM warehousing_batch_list wbl
|
||||
WHERE wbl.warehousing_content_id = #{warehousingContentId}
|
||||
SELECT wb.*, wc.reagent_consumable_id as reagent_consumable_id,
|
||||
rc.reagent_consumable_name,rc.standard_value_or_purity,rc.specification_and_model,rc.category,u.`name` as
|
||||
depositor_name
|
||||
FROM warehousing_batch_list wb
|
||||
LEFT JOIN warehousing_content wc ON wb.warehousing_content_id = wc.id
|
||||
LEFT JOIN reagent_consumables rc ON wc.reagent_consumable_id = rc.reagent_consumable_id
|
||||
LEFT JOIN dlp_base.sys_user u ON u.user_id=wb.create_by
|
||||
WHERE wb.warehousing_content_id IN (
|
||||
SELECT id
|
||||
FROM warehousing_content
|
||||
WHERE warehousing_record_form_id = #{warehousingRecordFormId}
|
||||
)
|
||||
<if test="keywords != null and keywords != ''">
|
||||
and rc.reagent_consumable_name = #{keywords}
|
||||
</if>
|
||||
ORDER BY create_time DESC;
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -29,32 +29,144 @@
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="warehousingContentVO" type="digital.laboratory.platform.reagent.vo.WarehousingContentVO" extends="warehousingContentMap">
|
||||
<resultMap id="warehousingContentVO" type="digital.laboratory.platform.reagent.vo.WarehousingContentVO"
|
||||
extends="warehousingContentMap">
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="applicantName" column="applicant_name"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="specificationAndModel" column="specification_and_model"/>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
|
||||
|
||||
<collection property="warehousingBatchListVOList" ofType="warehousingBatchListVOMap"
|
||||
select="getWarehousingBatchListVOList"
|
||||
column="id"></collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="getWarehousingContentVOList" resultMap="warehousingContentVO" resultType="digital.laboratory.platform.reagent.vo.WarehousingContentVO">
|
||||
SELECT wc.*,
|
||||
(select si.supplier_name from supplier_information si where si.id = wc.supplier_id) as supplier_name ,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id=wc.update_by ) as applicant_name
|
||||
FROM warehousing_content wc
|
||||
WHERE wc.warehousing_record_form_id = #{warehousingRecordFormId}
|
||||
<resultMap id="warehousingBatchListVOMap" type="digital.laboratory.platform.reagent.vo.WarehousingBatchListVO">
|
||||
<id property="id" column="id"/>
|
||||
<result property="batch" column="batch"/>
|
||||
<result property="batchNumber" column="batch_number"/>
|
||||
<result property="dateOfProduction" column="date_of_production"/>
|
||||
<result property="dateOfPurchase" column="date_of_purchase"/>
|
||||
<result property="dateOfReceipt" column="date_of_receipt"/>
|
||||
<result property="expirationDate" column="expiration_date"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"/>
|
||||
<result property="warehousingContentId" column="warehousing_content_id"/>
|
||||
<result property="warningValue" column="warning_value"/>
|
||||
<result property="depositorId" column="depositor_id"/>
|
||||
<result property="latticeId" column="lattice_id"/>
|
||||
<result property="limitDate" column="limit_date"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="batchId" column="batch_id"/>
|
||||
<result property="depositorName" column="depositor_name"></result>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"></result>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"></result>
|
||||
<result property="specificationAndModel" column="specification_and_model"></result>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"></result>
|
||||
<result property="category" column="category"></result>
|
||||
<collection property="idList" ofType="referenceMaterialMap"
|
||||
select="getReferenceMaterialMapByBatchId" column="batch_id"></collection>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="referenceMaterialMap" type="digital.laboratory.platform.reagent.entity.ReferenceMaterial">
|
||||
<id property="id" column="id"></id>
|
||||
<result property="number" column="number"></result>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<select id="getReferenceMaterialMapByBatchId" resultMap="referenceMaterialMap">
|
||||
select rm.id, rm.number, rm.reagent_consumable_name
|
||||
from reference_material rm
|
||||
where rm.batch_details_id = #{batch_id}
|
||||
order by number asc
|
||||
</select>
|
||||
|
||||
<select id="getWarehousingContentVOPage" resultMap="warehousingContentVO" resultType="digital.laboratory.platform.reagent.vo.WarehousingContentVO">
|
||||
<select id="getWarehousingBatchListVOList" resultMap="warehousingBatchListVOMap"
|
||||
resultType="digital.laboratory.platform.reagent.vo.WarehousingBatchListVO">
|
||||
SELECT wb.*,
|
||||
wc.reagent_consumable_id as reagent_consumable_id,
|
||||
rc.reagent_consumable_name,
|
||||
rc.standard_value_or_purity,
|
||||
rc.specification_and_model,
|
||||
rc.category,
|
||||
u.`name` as
|
||||
depositor_name
|
||||
FROM warehousing_batch_list wb
|
||||
LEFT JOIN warehousing_content wc ON wb.warehousing_content_id = wc.id
|
||||
LEFT JOIN reagent_consumables rc ON wc.reagent_consumable_id = rc.reagent_consumable_id
|
||||
LEFT JOIN dlp_base.sys_user u ON u.user_id = wb.create_by
|
||||
WHERE wb.warehousing_content_id = #{id}
|
||||
ORDER BY create_time DESC;
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getWarehousingContentVOList" resultMap="warehousingContentVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.WarehousingContentVO">
|
||||
SELECT
|
||||
wc.*,
|
||||
ri.warning_value,
|
||||
si.supplier_name,
|
||||
user.name AS applicant_name,
|
||||
rc.category,
|
||||
rc.specification_and_model,
|
||||
rc.brand,
|
||||
rc.standard_value_or_purity,
|
||||
rc.deviation_or_uncertainty,
|
||||
rc.unit_price
|
||||
FROM
|
||||
warehousing_content wc
|
||||
LEFT JOIN
|
||||
supplier_information si ON wc.supplier_id = si.id
|
||||
LEFT JOIN
|
||||
dlp_base.sys_user user ON wc.update_by = user.user_id
|
||||
LEFT JOIN
|
||||
reagent_consumables rc ON wc.reagent_consumable_id = rc.reagent_consumable_id
|
||||
LEFT JOIN
|
||||
reagent_consumable_inventory ri ON wc.reagent_consumable_id = ri.reagent_consumable_id
|
||||
WHERE
|
||||
wc.warehousing_record_form_id = #{warehousingRecordFormId}
|
||||
<if test="opCode != null and opCode == 1">
|
||||
and wc.total_quantity > wc.warehousing_quantity
|
||||
</if>
|
||||
<if test="opCode != null and opCode == -1">
|
||||
and wc.warehousing_quantity = wc.total_quantity
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
and wc.reagent_consumable_name = #{keywords}
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
and rc.category = #{category}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getWarehousingContentVOPage" resultMap="warehousingContentVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.WarehousingContentVO">
|
||||
SELECT wc.*,
|
||||
(select si.supplier_name from supplier_information si where si.id = wc.supplier_id) as supplier_name,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id=wc.update_by ) as applicant_name,
|
||||
(select rc.category from reagent_consumables rc where rc.reagent_consumable_id = wc.reagent_consumable_id) AS category,
|
||||
(select rc.specification_and_model from reagent_consumables rc where rc.reagent_consumable_id = wc.reagent_consumable_id) AS specification_and_model,
|
||||
(select rc.brand from reagent_consumables rc where rc.reagent_consumable_id = wc.reagent_consumable_id) AS brand,
|
||||
(select rc.standard_value_or_purity from reagent_consumables rc where rc.reagent_consumable_id = wc.reagent_consumable_id) AS standard_value_or_purity
|
||||
(select user.name from dlp_base.sys_user user
|
||||
where user.user_id=wc.update_by ) as applicant_name
|
||||
, (
|
||||
select rc.category
|
||||
from reagent_consumables rc
|
||||
where rc.reagent_consumable_id = wc.reagent_consumable_id) AS category
|
||||
, (
|
||||
select rc.specification_and_model
|
||||
from reagent_consumables rc
|
||||
where rc.reagent_consumable_id = wc.reagent_consumable_id) AS specification_and_model
|
||||
, (
|
||||
select rc.brand
|
||||
from reagent_consumables rc
|
||||
where rc.reagent_consumable_id = wc.reagent_consumable_id) AS brand
|
||||
, (
|
||||
select rc.standard_value_or_purity
|
||||
from reagent_consumables rc
|
||||
where rc.reagent_consumable_id = wc.reagent_consumable_id) AS standard_value_or_purity
|
||||
FROM warehousing_content wc
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user