5.10
This commit is contained in:
@@ -111,6 +111,27 @@
|
|||||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- poi-tl word 模板处理器 http://deepoove.com/poi-tl -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.deepoove</groupId>
|
||||||
|
<artifactId>poi-tl</artifactId>
|
||||||
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- for MockMultipartFile-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>digital.laboratory.platform</groupId>
|
||||||
|
<artifactId>dlp-common-remote-word2pdf</artifactId>
|
||||||
|
<version>2022.10.11-snapshots</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- log -->
|
<!-- log -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>digital.laboratory.platform</groupId>
|
<groupId>digital.laboratory.platform</groupId>
|
||||||
@@ -130,6 +151,11 @@
|
|||||||
<version>RELEASE</version>
|
<version>RELEASE</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.deepoove</groupId>
|
||||||
|
<artifactId>poi-tl</artifactId>
|
||||||
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
+25
@@ -231,6 +231,31 @@ public class CentralizedRequestController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改(集中采购申请)
|
||||||
|
*
|
||||||
|
* @param auditAndApproveDTO (集中采购申请)
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "审核集中采购申请", notes = "审核集中采购申请")
|
||||||
|
@SysLog("审核集中采购申请)")
|
||||||
|
@PutMapping("/audit")
|
||||||
|
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_audit')")
|
||||||
|
public R<CentralizedRequest> auditById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||||
|
|
||||||
|
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||||
|
|
||||||
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||||
|
|
||||||
|
CentralizedRequest centralizedRequest = centralizedRequestService.auditById(auditAndApproveDTO, dlpUser);
|
||||||
|
|
||||||
|
if (centralizedRequest != null) {
|
||||||
|
return R.ok(centralizedRequest, "审核成功");
|
||||||
|
} else {
|
||||||
|
return R.failed("审核失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除(集中采购申请)
|
* 通过id删除(集中采购申请)
|
||||||
*
|
*
|
||||||
|
|||||||
+148
@@ -1,15 +1,24 @@
|
|||||||
package digital.laboratory.platform.reagent.controller;
|
package digital.laboratory.platform.reagent.controller;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
|
import cn.hutool.core.io.IoUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
|
import com.deepoove.poi.config.Configure;
|
||||||
|
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import digital.laboratory.platform.common.core.util.R;
|
import digital.laboratory.platform.common.core.util.R;
|
||||||
|
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||||
|
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||||
import digital.laboratory.platform.reagent.dto.PurchaseCatalogueDTO;
|
import digital.laboratory.platform.reagent.dto.PurchaseCatalogueDTO;
|
||||||
import digital.laboratory.platform.reagent.dto.PurchaseCatalogueGetDTO;
|
import digital.laboratory.platform.reagent.dto.PurchaseCatalogueGetDTO;
|
||||||
@@ -17,10 +26,15 @@ import digital.laboratory.platform.reagent.entity.CatalogueDetails;
|
|||||||
import digital.laboratory.platform.reagent.entity.PurchaseCatalogue;
|
import digital.laboratory.platform.reagent.entity.PurchaseCatalogue;
|
||||||
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
|
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
|
||||||
import digital.laboratory.platform.reagent.service.PurchaseCatalogueService;
|
import digital.laboratory.platform.reagent.service.PurchaseCatalogueService;
|
||||||
|
import digital.laboratory.platform.reagent.vo.CatalogueDetailsPrintVO;
|
||||||
import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO;
|
import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO;
|
||||||
|
import digital.laboratory.platform.reagent.vo.PurchaseCataloguePrintVO;
|
||||||
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
|
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
|
||||||
|
import feign.Response;
|
||||||
|
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.mock.web.MockMultipartFile;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -30,11 +44,14 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,12 +71,18 @@ import java.util.List;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RequestMapping("/purchase_catalogue")
|
@RequestMapping("/purchase_catalogue")
|
||||||
@Api(value = "purchase_catalogue", tags = "采购目录管理")
|
@Api(value = "purchase_catalogue", tags = "采购目录管理")
|
||||||
|
@SuppressWarnings("all")
|
||||||
public class PurchaseCatalogueController {
|
public class PurchaseCatalogueController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private final PurchaseCatalogueService purchaseCatalogueService;
|
private final PurchaseCatalogueService purchaseCatalogueService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private final CatalogueDetailsService catalogueDetailsService;
|
private final CatalogueDetailsService catalogueDetailsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private final RemoteWord2PDFService remoteWord2PDFService;
|
||||||
|
@Autowired
|
||||||
|
private final OssFile ossFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*
|
*
|
||||||
@@ -355,6 +378,131 @@ public class PurchaseCatalogueController {
|
|||||||
return R.failed("发布失败");
|
return R.failed("发布失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布采购目录
|
||||||
|
*
|
||||||
|
* @param purchaseCatalogueDTOList
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "导入采购目录", notes = "导入采购目录")
|
||||||
|
@SysLog("导入采购目录")
|
||||||
|
@PostMapping("/import")
|
||||||
|
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')")
|
||||||
|
public R<PurchaseCatalogue> getImport( @RequestBody List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) {
|
||||||
|
|
||||||
|
PurchaseCatalogueVO anImport = purchaseCatalogueService.getImport(purchaseCatalogueDTOList);
|
||||||
|
|
||||||
|
return R.ok(anImport);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**-------出库清单*/
|
||||||
|
/**
|
||||||
|
* 出库清单
|
||||||
|
*
|
||||||
|
* @param purchaseCatalogueId
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "采购目录打印", notes = "采购目录打印")
|
||||||
|
@SysLog("采购目录打印")
|
||||||
|
@PostMapping("/print")
|
||||||
|
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||||
|
public void bizGetPDFInventory(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||||
|
System.out.println("bizApplyWord.................");
|
||||||
|
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||||
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||||
|
|
||||||
|
PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogueId);
|
||||||
|
|
||||||
|
List<CatalogueDetails> voList = purchaseCatalogueVO.getCatalogueDetailsListList();
|
||||||
|
|
||||||
|
if (voList.isEmpty()) {
|
||||||
|
throw new RuntimeException("未查询到相关信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
String id = IdWorker.get32UUID().toUpperCase();
|
||||||
|
|
||||||
|
String applyFileName = "采购目录-"+id;
|
||||||
|
|
||||||
|
String pdfFilePath = "document" + "/"+"purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf";
|
||||||
|
try {
|
||||||
|
//直接调用pdf方法
|
||||||
|
purchaseCatalogueTablePDF(purchaseCatalogueVO,id,theHttpServletRequest,httpServletResponse);
|
||||||
|
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||||
|
httpServletResponse.setContentType(applyFileName);
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void purchaseCatalogueTablePDF(PurchaseCatalogueVO purchaseCatalogueVO, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||||
|
System.out.println("PurchaseCatalogueTablePDF.................");
|
||||||
|
|
||||||
|
List<CatalogueDetails> voList = purchaseCatalogueVO.getCatalogueDetailsListList();
|
||||||
|
|
||||||
|
//-----------------------------
|
||||||
|
// 生成 word 版本的 采购目录
|
||||||
|
|
||||||
|
String applyFileName = "采购目录-"+id;
|
||||||
|
|
||||||
|
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
|
ossFile.fileGet("template" + "/" + "试剂耗材集中采购目录模板.docx", bos);
|
||||||
|
|
||||||
|
byte[] templateArray = bos.toByteArray();
|
||||||
|
|
||||||
|
ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
|
||||||
|
bos.close();
|
||||||
|
|
||||||
|
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||||
|
|
||||||
|
Configure config = Configure.builder().
|
||||||
|
bind("voList", policy).build();
|
||||||
|
/**
|
||||||
|
* 循环表格
|
||||||
|
*/
|
||||||
|
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||||
|
new HashMap<String, Object>() {{
|
||||||
|
put("voList", voList);
|
||||||
|
put("id",purchaseCatalogueVO.getPurchaseCatalogueId());
|
||||||
|
put("size",1);
|
||||||
|
put("secondaryAuditorName",purchaseCatalogueVO.getSecondaryAuditorName());
|
||||||
|
put("auditTimeOfSecondary", LocalDateTimeUtil.format(purchaseCatalogueVO.getAuditTimeOfSecondary(), "yyyy年MM月dd日 "));
|
||||||
|
put("name",LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy年")+"~"+LocalDateTimeUtil.format(LocalDateTime.now().plusYears(1),"yyyy年"));
|
||||||
|
}}
|
||||||
|
);
|
||||||
|
bis.close();
|
||||||
|
|
||||||
|
ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
|
||||||
|
template.write(fosWord);
|
||||||
|
template.close();
|
||||||
|
|
||||||
|
//------------
|
||||||
|
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||||
|
fosWord.close();
|
||||||
|
|
||||||
|
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||||
|
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||||
|
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||||
|
fisWord.close();
|
||||||
|
|
||||||
|
|
||||||
|
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||||
|
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||||
|
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||||
|
outPDF.close();
|
||||||
|
|
||||||
|
|
||||||
|
ossFile.fileSave("document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||||
|
isPDF.close();
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println(String.format("转换为 PDF 结束"));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+8
-12
@@ -94,39 +94,35 @@ public class PurchaseListController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改采购清单明细", notes = "修改采购清单明细")
|
@ApiOperation(value = "修改采购清单明细", notes = "修改采购清单明细")
|
||||||
@SysLog("修改采购清单明细" )
|
@SysLog("修改采购清单明细" )
|
||||||
@PostMapping
|
@PutMapping
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" )
|
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" )
|
||||||
public R<PurchaseListDetailsVO> postAddObject(@RequestBody PurchaseListDTO purchaseListDTO, HttpServletRequest theHttpServletRequest) {
|
public R<String > postAddObject(@RequestBody List <PurchaseListDTO> purchaseListDTO, HttpServletRequest theHttpServletRequest) {
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||||
|
|
||||||
PurchaseListDetailsVO purchaseListDetailsVO = purchaseListService.addDetails(purchaseListDTO);
|
purchaseListService.editById(purchaseListDTO);
|
||||||
|
|
||||||
|
return R.ok("添加成功");
|
||||||
|
|
||||||
if (purchaseListDetailsVO!=null) {
|
|
||||||
return R.ok(purchaseListDetailsVO, "保存成功");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return R.failed(purchaseListDetailsVO, "保存失败");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 新增(采购清单)
|
* 新增(采购清单)
|
||||||
* @param id (采购清单)
|
* @param purchaseListDTOList (采购清单)
|
||||||
* @return R
|
* @return R
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细")
|
@ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细")
|
||||||
@SysLog("提交采购清单明细" )
|
@SysLog("提交采购清单明细" )
|
||||||
@PutMapping("/commit")
|
@PutMapping("/commit")
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit)" )
|
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit)" )
|
||||||
public R<PurchaseList> commitById( String id, HttpServletRequest theHttpServletRequest) {
|
public R<PurchaseList> commitById(List<PurchaseListDTO> purchaseListDTOList, HttpServletRequest theHttpServletRequest) {
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||||
|
|
||||||
PurchaseList purchaseList = purchaseListService.commitById(id);
|
PurchaseList purchaseList = purchaseListService.commitById(purchaseListDTOList);
|
||||||
|
|
||||||
if (purchaseList!=null) {
|
if (purchaseList!=null) {
|
||||||
return R.ok(purchaseList, "提交成功");
|
return R.ok(purchaseList, "提交成功");
|
||||||
|
|||||||
+6
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.controller;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.file.FileNameUtil;
|
import cn.hutool.core.io.file.FileNameUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -277,6 +278,11 @@ public class SupplierInformationController {
|
|||||||
|
|
||||||
String photograph = supplierInformation.getPhotograph();
|
String photograph = supplierInformation.getPhotograph();
|
||||||
|
|
||||||
|
if (!StrUtil.isNotBlank(photograph)){
|
||||||
|
|
||||||
|
return R.failed(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (photograph != null) {
|
if (photograph != null) {
|
||||||
|
|
||||||
String path = "reagen_managment" + "/" + "supplierInformation/" + supplierInformation.getId();
|
String path = "reagen_managment" + "/" + "supplierInformation/" + supplierInformation.getId();
|
||||||
|
|||||||
-1
@@ -49,7 +49,6 @@ import java.util.List;
|
|||||||
public class WarehousingRecordFormController {
|
public class WarehousingRecordFormController {
|
||||||
|
|
||||||
private final WarehousingRecordFormService warehousingRecordFormService;
|
private final WarehousingRecordFormService warehousingRecordFormService;
|
||||||
|
|
||||||
private final WarehousingContentService warehousingContentService;
|
private final WarehousingContentService warehousingContentService;
|
||||||
|
|
||||||
private final ReagentConsumablesService reagentConsumablesService;
|
private final ReagentConsumablesService reagentConsumablesService;
|
||||||
|
|||||||
@@ -1,18 +1,39 @@
|
|||||||
package digital.laboratory.platform.reagent.dto;
|
package digital.laboratory.platform.reagent.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class OutgoingContentsDTO {
|
public class OutgoingContentsDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(出库用途)")
|
||||||
private Integer outboundUse;
|
private Integer outboundUse;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(出库数量)")
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(出库试剂耗材类ID)")
|
||||||
private String reagentConsumableId;
|
private String reagentConsumableId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(备注)")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(出库单ID)")
|
||||||
private String deliveryRegistrationFormId;
|
private String deliveryRegistrationFormId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(出库标准物质ID)")
|
||||||
private String referenceMaterialId;
|
private String referenceMaterialId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(标准物质编号)")
|
||||||
private String number;
|
private String number;
|
||||||
private boolean returnOrNot;
|
|
||||||
|
@ApiModelProperty(value = "(批次ID)")
|
||||||
private String batchDetailsId;
|
private String batchDetailsId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(格子Id)")
|
||||||
|
private String latticeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(位置信息)")
|
||||||
|
private String location;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -37,4 +37,7 @@ public class PeriodVerificationImplementationDTO {
|
|||||||
|
|
||||||
@ApiModelProperty(value="(偏差/不确定度)")
|
@ApiModelProperty(value="(偏差/不确定度)")
|
||||||
private String deviationAndUncertainty;
|
private String deviationAndUncertainty;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="(不满足应用要求原因分析结果)")
|
||||||
|
private boolean causeOfDissatisfactionResult;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,59 +15,61 @@ public class PurchaseCatalogueDTO {
|
|||||||
/**
|
/**
|
||||||
* (品牌)
|
* (品牌)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="品牌")
|
@ApiModelProperty(value = "品牌")
|
||||||
private String brand;
|
private String brand;
|
||||||
@ApiModelProperty(value="类别")
|
@ApiModelProperty(value = "类别")
|
||||||
private String category;
|
private String category;
|
||||||
@ApiModelProperty(value="偏差/不确定度")
|
@ApiModelProperty(value = "偏差/不确定度")
|
||||||
private String deviationOrUncertainty;
|
private String deviationOrUncertainty;
|
||||||
@ApiModelProperty(value="编号")
|
|
||||||
private String number;
|
@ApiModelProperty(value = "包装份数")
|
||||||
@ApiModelProperty(value="包装份数")
|
|
||||||
|
|
||||||
private String packagedCopies;
|
private String packagedCopies;
|
||||||
@ApiModelProperty(value="采购目录ID")
|
@ApiModelProperty(value = "采购目录ID")
|
||||||
|
|
||||||
private String purchaseCatalogueId;
|
private String purchaseCatalogueId;
|
||||||
@ApiModelProperty(value="采购目录编号")
|
@ApiModelProperty(value = "采购目录编号")
|
||||||
|
|
||||||
private String purchaseCatalogueNumber;
|
private String purchaseCatalogueNumber;
|
||||||
@ApiModelProperty(value="试剂耗材名称")
|
@ApiModelProperty(value = "试剂耗材名称")
|
||||||
|
|
||||||
private String reagentConsumableName;
|
private String reagentConsumableName;
|
||||||
@ApiModelProperty(value="种类)")
|
@ApiModelProperty(value = "种类)")
|
||||||
|
|
||||||
private String species;
|
private String species;
|
||||||
@ApiModelProperty(value="规格型号")
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
|
||||||
private String specificationAndModel;
|
private String specificationAndModel;
|
||||||
@ApiModelProperty(value="标准值/纯度")
|
@ApiModelProperty(value = "标准值/纯度")
|
||||||
|
|
||||||
private String standardValueOrPurity;
|
private String standardValueOrPurity;
|
||||||
@ApiModelProperty(value="单价")
|
@ApiModelProperty(value = "单价")
|
||||||
|
|
||||||
private Double unitPrice;
|
private Double unitPrice;
|
||||||
@ApiModelProperty(value="采购目录明细ID")
|
@ApiModelProperty(value = "采购目录明细ID")
|
||||||
|
|
||||||
private String catalogueDetailsId;
|
private String catalogueDetailsId;
|
||||||
@ApiModelProperty(value="试剂耗材Id")
|
@ApiModelProperty(value = "试剂耗材Id")
|
||||||
|
|
||||||
private String reagentConsumableId;
|
private String reagentConsumableId;
|
||||||
@ApiModelProperty(value="存储条件")
|
@ApiModelProperty(value = "存储条件")
|
||||||
|
|
||||||
private String storageCondition;
|
private String storageCondition;
|
||||||
@ApiModelProperty(value="别名")
|
@ApiModelProperty(value = "别名")
|
||||||
|
|
||||||
private String alias;
|
private String alias;
|
||||||
@ApiModelProperty(value="备注")
|
@ApiModelProperty(value = "备注")
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
@ApiModelProperty(value="包装单位")
|
@ApiModelProperty(value = "包装单位")
|
||||||
|
|
||||||
private String minimumUnit;
|
private String minimumUnit;
|
||||||
|
|
||||||
@ApiModelProperty(value="英文名")
|
@ApiModelProperty(value = "英文名")
|
||||||
private String englishName;
|
private String englishName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "CAS 号")
|
||||||
|
private String casNumber;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -8,4 +8,5 @@ public class StandardReserveSolutionFullDTO {
|
|||||||
private String id;
|
private String id;
|
||||||
private String latticeId;
|
private String latticeId;
|
||||||
private String warehousingRemarks;
|
private String warehousingRemarks;
|
||||||
|
private String location;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,10 @@ public class WarehousingRecordFormDTO {
|
|||||||
private String limitDate;
|
private String limitDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(预警值)")
|
@ApiModelProperty(value = "(预警值)")
|
||||||
private Integer warning_value;
|
private Integer warningValue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(位置信息)")
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,130 @@
|
|||||||
|
package digital.laboratory.platform.reagent.entity;
|
||||||
|
|
||||||
|
import digital.laboratory.platform.common.core.constant.CommonConstants;
|
||||||
|
import digital.laboratory.platform.common.core.util.R;
|
||||||
|
import digital.laboratory.platform.sys.entity.Dictionary;
|
||||||
|
import digital.laboratory.platform.sys.feign.RemoteDictionaryService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.boot.ApplicationArguments;
|
||||||
|
import org.springframework.boot.ApplicationRunner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App 启动类
|
||||||
|
* 当 Spring Application 启动完成后, 会调用这个类的 run() 方法进行一些最后的初始化。
|
||||||
|
* 我们在这个方法中从数据库加载一些全局的配置
|
||||||
|
*
|
||||||
|
* @author Zhang Xiaolong
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppStartupRunner implements ApplicationRunner {
|
||||||
|
|
||||||
|
// @Value("${dlp.entrustment.processDefinitionId}")
|
||||||
|
// public static String processDefinitionId;
|
||||||
|
|
||||||
|
//public static boolean clientChoiceCheckers;
|
||||||
|
//public static boolean checkerChoiceApprovers;
|
||||||
|
//public static boolean singleOperateUser;
|
||||||
|
|
||||||
|
// @Value("${dlp.entrustment.temporaryPath}")
|
||||||
|
//public static String temporaryPath;
|
||||||
|
|
||||||
|
@Value("${dlp.entrustment.entrustmentLetterTemplate}")
|
||||||
|
public static String entrustmentLetterTemplate;
|
||||||
|
|
||||||
|
private final RemoteDictionaryService remoteDictionaryService;
|
||||||
|
|
||||||
|
public static Map<String, String> entrustmentConfig = new HashMap<>();
|
||||||
|
|
||||||
|
public static String getCfg(String code) {
|
||||||
|
return entrustmentConfig.get(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param args 参数
|
||||||
|
* @throws Exception 异常
|
||||||
|
*
|
||||||
|
* // @SysLog("委托受理模块初始化") 这里不能使用 @SysLog(), 因为 SysLog 还没有初始化
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
|
// BusinessCodeUtils.removeSymbols("x-*/)——0*&……%¥#@xasdf!*&^&%^ 中文、/+)(()\n\\xx\rx");
|
||||||
|
|
||||||
|
{
|
||||||
|
// 加载 entrustment 在字典中的配置
|
||||||
|
R<List<Dictionary>> r = remoteDictionaryService.getDictionaryByType(CommonConstants.DLP_TYPE_ENTRUSTMENT);
|
||||||
|
if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
List<Dictionary> itemList = r.getData();
|
||||||
|
for (Dictionary item : itemList) {
|
||||||
|
entrustmentConfig.put(item.getCode(), item.getLabel());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String key : entrustmentConfig.keySet()) {
|
||||||
|
System.out.println(String.format("entrustmentConfig[%s]=%s", key, entrustmentConfig.get(key)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// {
|
||||||
|
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_PROCESS_DEFINITION_ID);
|
||||||
|
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
// processDefinitionId = r.getData().get("label");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_CLIENT_CHOICE_CHECKERS);
|
||||||
|
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
// clientChoiceCheckers = "1".equals(r.getData().get("label"));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_CHECKER_CHOICE_APPROVERS);
|
||||||
|
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
// checkerChoiceApprovers = "1".equals(r.getData().get("label"));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_CLIENT_SINGLE_OPERATE_USER);
|
||||||
|
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
// singleOperateUser = "1".equals(r.getData().get("label"));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_TEMPORARY_PATH);
|
||||||
|
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
// temporaryPath = r.getData().get("label");
|
||||||
|
// }
|
||||||
|
// if (StrUtil.isEmpty(temporaryPath)) {
|
||||||
|
// temporaryPath =new File(System.getProperty("user.dir")+"/temp").getCanonicalPath();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// System.out.printf("临时目录是 %s%n", temporaryPath);
|
||||||
|
// File tempPathFile = new File(temporaryPath);
|
||||||
|
// if (! tempPathFile.exists()) {
|
||||||
|
// System.out.printf("临时目录 %s 不存在, 创建之...%n", tempPathFile.getCanonicalPath());
|
||||||
|
// if (!tempPathFile.mkdirs()) {
|
||||||
|
// System.out.printf("创建临时目录 %s 失败!%n", tempPathFile.getCanonicalPath());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// {
|
||||||
|
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_LETTER_TEMPLATE_PATH);
|
||||||
|
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||||
|
// entrustmentLetterTemplate = r.getData().get("label");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -65,7 +65,10 @@ public class BatchDetails extends BaseEntity {
|
|||||||
* (有效日期)
|
* (有效日期)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(有效日期)")
|
@ApiModelProperty(value="(有效日期)")
|
||||||
private Integer expirationDate;
|
private LocalDate expirationDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(存储期限)")
|
||||||
|
private String limitDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (定值结果)
|
* (定值结果)
|
||||||
@@ -109,7 +112,10 @@ public class BatchDetails extends BaseEntity {
|
|||||||
@ApiModelProperty(value="(供应商ID)")
|
@ApiModelProperty(value="(供应商ID)")
|
||||||
private String supplierId;
|
private String supplierId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(格子Id)")
|
||||||
|
private String latticeId;
|
||||||
|
@ApiModelProperty(value = "(位置信息)")
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -27,110 +29,115 @@ public class CatalogueDetails extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* (品牌)
|
* (品牌)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="品牌)")
|
@ApiModelProperty(value = "品牌)")
|
||||||
private String brand;
|
private String brand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (英文名)
|
* (英文名)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="英文名)")
|
@ApiModelProperty(value = "英文名)")
|
||||||
private String englishName;
|
private String englishName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (类别)
|
* (类别)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="类别)")
|
@ApiModelProperty(value = "类别)")
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 偏差/不确定度
|
* 偏差/不确定度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="偏差/不确定度")
|
@ApiModelProperty(value = "偏差/不确定度")
|
||||||
private String deviationOrUncertainty;
|
private String deviationOrUncertainty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 包装份数
|
* 包装份数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="包装份数")
|
@ApiModelProperty(value = "包装份数")
|
||||||
private String packagedCopies;
|
private String packagedCopies;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购目录ID
|
* 采购目录ID
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="采购目录ID")
|
@ApiModelProperty(value = "采购目录ID")
|
||||||
private String purchaseCatalogueId;
|
private String purchaseCatalogueId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (采购目录编号)
|
* (采购目录编号)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="采购目录编号)")
|
@ApiModelProperty(value = "采购目录编号)")
|
||||||
private String purchaseCatalogueNumber;
|
private String purchaseCatalogueNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 试剂耗材名称
|
* 试剂耗材名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="试剂耗材名称")
|
@ApiModelProperty(value = "试剂耗材名称")
|
||||||
private String reagentConsumableName;
|
private String reagentConsumableName;
|
||||||
/**
|
/**
|
||||||
* 试剂耗材Id
|
* 试剂耗材Id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="试剂耗材Id")
|
@ApiModelProperty(value = "试剂耗材Id")
|
||||||
private String reagentConsumableId;
|
private String reagentConsumableId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (种类)
|
* (种类)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(种类)")
|
@ApiModelProperty(value = "(种类)")
|
||||||
private String species;
|
private String species;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (规格型号)
|
* (规格型号)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="规格型号)")
|
@ApiModelProperty(value = "规格型号)")
|
||||||
private String specificationAndModel;
|
private String specificationAndModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (标准值/纯度)
|
* (标准值/纯度)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="标准值/纯度)")
|
@ApiModelProperty(value = "标准值/纯度)")
|
||||||
private String standardValueOrPurity;
|
private String standardValueOrPurity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价
|
* 单价
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="单价")
|
@ApiModelProperty(value = "单价")
|
||||||
private Double unitPrice;
|
private Double unitPrice;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 别名
|
* 别名
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="别名")
|
@ApiModelProperty(value = "别名")
|
||||||
private String alias;
|
private String alias;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储条件
|
* 存储条件
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="存储条件")
|
@ApiModelProperty(value = "存储条件")
|
||||||
private String storageCondition;
|
private String storageCondition;
|
||||||
|
/**
|
||||||
|
* CAS号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "CAS-号")
|
||||||
|
private String casNumber;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
/**
|
/**
|
||||||
* 包装单位
|
* 包装单位
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="包装单位")
|
@ApiModelProperty(value = "包装单位")
|
||||||
private String minimumUnit;
|
private String minimumUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* catalogueDetailsId
|
* catalogueDetailsId
|
||||||
*/
|
*/
|
||||||
@TableId(value = "catalogue_details_id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "catalogue_details_id", type = IdType.ASSIGN_UUID)
|
||||||
@ApiModelProperty(value="catalogueDetailsId")
|
@ApiModelProperty(value = "catalogueDetailsId")
|
||||||
private String catalogueDetailsId;
|
private String catalogueDetailsId;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,14 @@ public class CentralizedRequest extends BaseEntity {
|
|||||||
@ApiModelProperty(value="申请人名称")
|
@ApiModelProperty(value="申请人名称")
|
||||||
private String applicantName;
|
private String applicantName;
|
||||||
|
|
||||||
|
private boolean auditResult;
|
||||||
|
|
||||||
|
private String auditOpinion;
|
||||||
|
|
||||||
|
private String auditId;
|
||||||
|
|
||||||
|
private LocalDateTime auditTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -66,6 +66,12 @@ public class OutgoingContents extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "(批次ID)")
|
@ApiModelProperty(value = "(批次ID)")
|
||||||
private String batchDetailsId;
|
private String batchDetailsId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "(格子Id)")
|
||||||
|
private String latticeId;
|
||||||
|
@ApiModelProperty(value = "(位置信息)")
|
||||||
|
private String location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* outgoingContentsId
|
* outgoingContentsId
|
||||||
*/
|
*/
|
||||||
|
|||||||
+5
@@ -48,6 +48,11 @@ public class PeriodVerificationImplementation extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(不满足应用要求原因分析)")
|
@ApiModelProperty(value="(不满足应用要求原因分析)")
|
||||||
private String causeOfDissatisfaction;
|
private String causeOfDissatisfaction;
|
||||||
|
/**
|
||||||
|
* (不满足应用要求原因分析)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="(不满足应用要求原因分析结果)")
|
||||||
|
private boolean causeOfDissatisfactionResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (核查时间)
|
* (核查时间)
|
||||||
|
|||||||
+2
-3
@@ -47,8 +47,7 @@ public class ReagentConsumableInventory extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* (类别)
|
* (类别)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "(格子Id)")
|
|
||||||
private String latticeId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 偏差/不确定度
|
* 偏差/不确定度
|
||||||
@@ -102,7 +101,7 @@ public class ReagentConsumableInventory extends BaseEntity {
|
|||||||
* (包装份数)
|
* (包装份数)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "(包装份数)")
|
@ApiModelProperty(value = "(包装份数)")
|
||||||
private String packagedCopies;
|
private Integer packagedCopies;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reagentConsumableInventoryId
|
* reagentConsumableInventoryId
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class ReagentConsumables extends BaseEntity {
|
|||||||
* 包装份数
|
* 包装份数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="包装份数")
|
@ApiModelProperty(value="包装份数")
|
||||||
private String packagedCopies;
|
private Integer packagedCopies;
|
||||||
/**
|
/**
|
||||||
* (标准值/纯度)
|
* (标准值/纯度)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -44,6 +44,14 @@ public class ReferenceMaterial extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="批次明细Id")
|
@ApiModelProperty(value="批次明细Id")
|
||||||
private String batchDetailsId;
|
private String batchDetailsId;
|
||||||
|
/**
|
||||||
|
* batchDetailsId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="格子ID")
|
||||||
|
private String latticeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="位置信息")
|
||||||
|
private String location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
|
|||||||
@@ -38,4 +38,5 @@ public class ReviewAndApprove {
|
|||||||
@ApiModelProperty(value="指导书数组")
|
@ApiModelProperty(value="指导书数组")
|
||||||
List<InstructionBookVO> instructionBookList;
|
List<InstructionBookVO> instructionBookList;
|
||||||
|
|
||||||
|
List<CentralizedRequestVO> centralizedRequestVOList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -117,4 +119,16 @@ public class SupplierInformation extends BaseEntity {
|
|||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
SupplierInformation that = (SupplierInformation) o;
|
||||||
|
return Objects.equals(acceptableCondition, that.acceptableCondition) && Objects.equals(contactNumber, that.contactNumber) && Objects.equals(contactPersonName, that.contactPersonName) && Objects.equals(nameOfSupplier, that.nameOfSupplier) && Objects.equals(photographOfSupplier, that.photographOfSupplier) && Objects.equals(photograph, that.photograph) && Objects.equals(qualificationDocument, that.qualificationDocument) && Objects.equals(qualificationDocumentName, that.qualificationDocumentName) && Objects.equals(scopeOfSupply, that.scopeOfSupply) && Objects.equals(supplierCoding, that.supplierCoding) && Objects.equals(supplierIdNumber, that.supplierIdNumber) && Objects.equals(supplierName, that.supplierName) && Objects.equals(supplierTelephone, that.supplierTelephone) && Objects.equals(number, that.number) && Objects.equals(id, that.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(acceptableCondition, contactNumber, contactPersonName, nameOfSupplier, photographOfSupplier, photograph, qualificationDocument, qualificationDocumentName, scopeOfSupply, supplierCoding, supplierIdNumber, supplierName, supplierTelephone, number, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -36,4 +36,6 @@ public interface CentralizedRequestService extends IService<CentralizedRequest>
|
|||||||
CentralizedRequestVO getCentralizedRequestVO(String centralizedRequestId);
|
CentralizedRequestVO getCentralizedRequestVO(String centralizedRequestId);
|
||||||
|
|
||||||
List<CentralizedRequestVO> getVOList(QueryWrapper<CentralizedRequest> qw);
|
List<CentralizedRequestVO> getVOList(QueryWrapper<CentralizedRequest> qw);
|
||||||
|
|
||||||
|
CentralizedRequest auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -44,4 +44,6 @@ public interface PurchaseCatalogueService extends IService<PurchaseCatalogue> {
|
|||||||
PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId);
|
PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId);
|
||||||
|
|
||||||
Page getVOpage(String name);
|
Page getVOpage(String name);
|
||||||
|
|
||||||
|
PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,10 @@ public interface PurchaseListService extends IService<PurchaseList> {
|
|||||||
//
|
//
|
||||||
PurchaseListVO getPurchaseList(String purchaseListId);
|
PurchaseListVO getPurchaseList(String purchaseListId);
|
||||||
|
|
||||||
|
void editById(List<PurchaseListDTO> purchaseListDTOList);
|
||||||
|
|
||||||
//
|
//
|
||||||
PurchaseList commitById(String id);
|
PurchaseList commitById(List<PurchaseListDTO> purchaseListDTOList);
|
||||||
|
|
||||||
PurchaseListDetailsVO addDetails(PurchaseListDTO purchaseListDTO);
|
PurchaseListDetailsVO addDetails(PurchaseListDTO purchaseListDTO);
|
||||||
|
|
||||||
|
|||||||
-6
@@ -64,12 +64,6 @@ public class BatchDetailsServiceImpl extends ServiceImpl<BatchDetailsMapper, Bat
|
|||||||
|
|
||||||
batchDetailsVO.setSupplierName(byId1.getSupplierName());
|
batchDetailsVO.setSupplierName(byId1.getSupplierName());
|
||||||
|
|
||||||
if (batchDetailsVO.getDateOfProduction()!=null){
|
|
||||||
|
|
||||||
batchDetailsVO.setMaturityTime(batchDetailsVO.getDateOfProduction().plusMonths(batchDetailsVO.getExpirationDate()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
batchDetailsVOS.add(batchDetailsVO);
|
batchDetailsVOS.add(batchDetailsVO);
|
||||||
}
|
}
|
||||||
return batchDetailsVOS;
|
return batchDetailsVOS;
|
||||||
|
|||||||
+20
-1
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||||
|
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||||
import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO;
|
import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO;
|
||||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||||
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||||
@@ -195,7 +196,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
|||||||
|
|
||||||
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
//查询状态为1的采购申请:已提交
|
//查询状态为1的采购申请:已提交
|
||||||
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,1);
|
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2);
|
||||||
|
|
||||||
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
|
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
|
||||||
|
|
||||||
@@ -209,6 +210,24 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
|||||||
}
|
}
|
||||||
return centralizedRequestVOArrayList;
|
return centralizedRequestVOArrayList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CentralizedRequest auditById(AuditAndApproveDTO auditAndApproveDTO,DLPUser dlpUser){
|
||||||
|
|
||||||
|
CentralizedRequest byId = centralizedRequestService.getById(auditAndApproveDTO.getUuId());
|
||||||
|
|
||||||
|
byId.setAuditId(dlpUser.getId());
|
||||||
|
byId.setAuditTime(LocalDateTime.now());
|
||||||
|
byId.setAuditOpinion(auditAndApproveDTO.getAuditOpinion());
|
||||||
|
byId.setAuditResult(auditAndApproveDTO.getAuditResult());
|
||||||
|
|
||||||
|
if (auditAndApproveDTO.getApproveResult()==true){
|
||||||
|
byId.setStatus(2);
|
||||||
|
}byId.setStatus(-2);
|
||||||
|
if (centralizedRequestService.updateById(byId)){
|
||||||
|
return byId;
|
||||||
|
}else throw new RuntimeException(String.format("审核失败"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+19
-3
@@ -106,7 +106,6 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
|||||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
|
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
|
||||||
|
|
||||||
outgoingContents.setReferenceMaterialId(referenceMaterial.getId());
|
outgoingContents.setReferenceMaterialId(referenceMaterial.getId());
|
||||||
}
|
|
||||||
|
|
||||||
outgoingContents.setId(IdWorker.get32UUID().toUpperCase());
|
outgoingContents.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getId());
|
outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getId());
|
||||||
@@ -117,9 +116,26 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
|||||||
outgoingContents.setReagentConsumableType(one.getCategory());
|
outgoingContents.setReagentConsumableType(one.getCategory());
|
||||||
outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber());
|
outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber());
|
||||||
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
||||||
|
outgoingContents.setLocation(referenceMaterial.getLocation());
|
||||||
|
outgoingContents.setLatticeId(referenceMaterial.getLatticeId());
|
||||||
outgoingContentsList.add(outgoingContents);
|
outgoingContentsList.add(outgoingContents);
|
||||||
|
}else {
|
||||||
|
|
||||||
|
BatchDetails byId1 = batchDetailsService.getById(reagentConsumablesSet.getBatchDetailsId());
|
||||||
|
|
||||||
|
outgoingContents.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getId());
|
||||||
|
outgoingContents.setQuantity(reagentConsumablesSet.getQuantity());
|
||||||
|
outgoingContents.setRemarks(reagentConsumablesSet.getRemarks());
|
||||||
|
outgoingContents.setOutboundUse(reagentConsumablesSet.getPurpose());
|
||||||
|
outgoingContents.setReagentConsumableId(reagentConsumablesSet.getReagentConsumableId());
|
||||||
|
outgoingContents.setReagentConsumableType(one.getCategory());
|
||||||
|
outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber());
|
||||||
|
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
||||||
|
outgoingContents.setLocation(byId1.getLocation());
|
||||||
|
outgoingContents.setLatticeId(byId1.getLatticeId());
|
||||||
|
outgoingContentsList.add(outgoingContents);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (deliveryRegistrationFormService.save(deliveryRegistrationForm) && outgoingContentsService.saveBatch(outgoingContentsList) &
|
if (deliveryRegistrationFormService.save(deliveryRegistrationForm) && outgoingContentsService.saveBatch(outgoingContentsList) &
|
||||||
|
|||||||
+2
-1
@@ -48,6 +48,7 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentra
|
|||||||
|
|
||||||
ReagentConsumables byId = reagentConsumablesService.getById(detailsOfCentralizedVO.getReagentConsumableId());
|
ReagentConsumables byId = reagentConsumablesService.getById(detailsOfCentralizedVO.getReagentConsumableId());
|
||||||
|
|
||||||
|
|
||||||
detailsOfCentralizedVO.setBrand(byId.getBrand());
|
detailsOfCentralizedVO.setBrand(byId.getBrand());
|
||||||
detailsOfCentralizedVO.setCategory(byId.getCategory());
|
detailsOfCentralizedVO.setCategory(byId.getCategory());
|
||||||
detailsOfCentralizedVO.setSpecificationAndModel(byId.getSpecificationAndModel());
|
detailsOfCentralizedVO.setSpecificationAndModel(byId.getSpecificationAndModel());
|
||||||
@@ -91,7 +92,7 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentra
|
|||||||
detailsOfCentralizedVO.setSpecies(one.getSpecies());
|
detailsOfCentralizedVO.setSpecies(one.getSpecies());
|
||||||
detailsOfCentralizedVO.setDeviationOrUncertainty(one.getDeviationOrUncertainty());
|
detailsOfCentralizedVO.setDeviationOrUncertainty(one.getDeviationOrUncertainty());
|
||||||
detailsOfCentralizedVO.setMinimumUnit(one.getMinimumUnit());
|
detailsOfCentralizedVO.setMinimumUnit(one.getMinimumUnit());
|
||||||
detailsOfCentralizedVO.setPackagedCopies(one.getPackagedCopies());
|
detailsOfCentralizedVO.setPackagedCopies(one.getPackagedCopies().toString());
|
||||||
detailsOfCentralizedVO.setStandardValueOrPurity(one.getStandardValueOrPurity());
|
detailsOfCentralizedVO.setStandardValueOrPurity(one.getStandardValueOrPurity());
|
||||||
}
|
}
|
||||||
return detailsOfCentralizedVOS;
|
return detailsOfCentralizedVOS;
|
||||||
|
|||||||
+1
-3
@@ -76,9 +76,7 @@ public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideSer
|
|||||||
|
|
||||||
BeanUtils.copyProperties(provideServicesOrSupplies,provideServicesOrSuppliesVO);
|
BeanUtils.copyProperties(provideServicesOrSupplies,provideServicesOrSuppliesVO);
|
||||||
|
|
||||||
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,provideServicesOrSuppliesVO.getReagentConsumableId());
|
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(provideServicesOrSuppliesVO.getReagentConsumableId());
|
||||||
|
|
||||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
|
|
||||||
//赋值服务品VO信息
|
//赋值服务品VO信息
|
||||||
provideServicesOrSuppliesVO.setCategory(reagentConsumables.getCategory());
|
provideServicesOrSuppliesVO.setCategory(reagentConsumables.getCategory());
|
||||||
provideServicesOrSuppliesVO.setBrand(reagentConsumables.getBrand());
|
provideServicesOrSuppliesVO.setBrand(reagentConsumables.getBrand());
|
||||||
|
|||||||
+57
-1
@@ -18,7 +18,6 @@ import digital.laboratory.platform.reagent.mapper.PurchaseCatalogueMapper;
|
|||||||
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
|
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
|
||||||
import digital.laboratory.platform.reagent.service.PurchaseCatalogueService;
|
import digital.laboratory.platform.reagent.service.PurchaseCatalogueService;
|
||||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||||
import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO;
|
|
||||||
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
|
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -316,4 +315,61 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
|||||||
return pages;
|
return pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) {
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
|
String message = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
for (PurchaseCatalogueDTO purchaseCatalogueDTO : purchaseCatalogueDTOList) {
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(purchaseCatalogueDTO.getBrand()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getEnglishName()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getCategory()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getEnglishName()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getPackagedCopies()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getReagentConsumableName()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecies()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecificationAndModel()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getStandardValueOrPurity()) &
|
||||||
|
purchaseCatalogueDTO.getUnitPrice() != 0 &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getAlias()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getStorageCondition()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getRemark()) &
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getMinimumUnit())&
|
||||||
|
StrUtil.isNotBlank(purchaseCatalogueDTO.getCasNumber())
|
||||||
|
|
||||||
|
) {
|
||||||
|
i++;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
message = message + "\n" + "第" + i + "条数据有误,请改正后重新导入";
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-2
@@ -85,11 +85,34 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
|||||||
return purchaseListVO;
|
return purchaseListVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void editById (List<PurchaseListDTO> purchaseListDTOList){
|
||||||
|
|
||||||
|
for (PurchaseListDTO purchaseListDTO : purchaseListDTOList) {
|
||||||
|
|
||||||
|
PurchaseListDetails byId = purchaseListDetailsService.getById(purchaseListDTO.getId());
|
||||||
|
|
||||||
|
byId.setSupplierId(purchaseListDTO.getSupplierId());
|
||||||
|
|
||||||
|
purchaseListDetailsService.updateById(byId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override//提交采购清单
|
@Override//提交采购清单
|
||||||
public PurchaseList commitById(String id) {
|
public PurchaseList commitById(List<PurchaseListDTO> purchaseListDTOList) {
|
||||||
|
|
||||||
PurchaseList purchaseList = purchaseListService.getById(id);
|
for (PurchaseListDTO purchaseListDTO : purchaseListDTOList) {
|
||||||
|
|
||||||
|
PurchaseListDetails byId = purchaseListDetailsService.getById(purchaseListDTO.getId());
|
||||||
|
|
||||||
|
byId.setSupplierId(purchaseListDTO.getSupplierId());
|
||||||
|
|
||||||
|
purchaseListDetailsService.updateById(byId);
|
||||||
|
}
|
||||||
|
|
||||||
|
PurchaseList purchaseList = purchaseListService.getById(purchaseListDTOList.get(0).getPurchaseListId());
|
||||||
|
|
||||||
purchaseList.setStatus(1);
|
purchaseList.setStatus(1);
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -107,19 +107,18 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
|
|
||||||
for (PurchasingPlanDTO purchasingPlanDTO : purchasingPlanDTOList) {
|
for (PurchasingPlanDTO purchasingPlanDTO : purchasingPlanDTOList) {
|
||||||
//将列入计划的集中采购申请状态变为2
|
//将列入计划的集中采购申请状态变为3
|
||||||
String detailsOfCentralizedId = purchasingPlanDTO.getDetailsOfCentralizedId();
|
String detailsOfCentralizedId = purchasingPlanDTO.getDetailsOfCentralizedId();
|
||||||
|
|
||||||
DetailsOfCentralized byId2 = detailsOfCentralizedService.getById(detailsOfCentralizedId);
|
DetailsOfCentralized byId2 = detailsOfCentralizedService.getById(detailsOfCentralizedId);
|
||||||
|
|
||||||
CentralizedRequest byId3 = requestService.getById(byId2.getCentralizedRequestId());
|
CentralizedRequest byId3 = requestService.getById(byId2.getCentralizedRequestId());
|
||||||
|
|
||||||
byId3.setStatus(2);
|
byId3.setStatus(3);
|
||||||
|
|
||||||
requestService.updateById(byId3);
|
requestService.updateById(byId3);
|
||||||
|
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
//合并相同的采购内容
|
//合并相同的采购内容
|
||||||
if (list.size() != 0) {
|
if (list.size() != 0) {
|
||||||
|
|||||||
+5
-7
@@ -136,7 +136,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override//领用减少库存
|
@Override//入库增加库存
|
||||||
public ReagentConsumableInventory addById(String reagentConsumableId, Integer quantity) {
|
public ReagentConsumableInventory addById(String reagentConsumableId, Integer quantity) {
|
||||||
|
|
||||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -147,10 +147,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
|||||||
|
|
||||||
one.setTotalQuantity(one.getTotalQuantity() + quantity);
|
one.setTotalQuantity(one.getTotalQuantity() + quantity);
|
||||||
|
|
||||||
if (one.getTotalQuantity() == 0) {
|
|
||||||
|
|
||||||
one.setStatus(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reagentConsumableInventoryService.updateById(one)) {
|
if (reagentConsumableInventoryService.updateById(one)) {
|
||||||
|
|
||||||
@@ -158,7 +154,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
|||||||
} else throw new RuntimeException(String.format("库存添加失败"));
|
} else throw new RuntimeException(String.format("库存添加失败"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override//归还/入库增加库存
|
@Override//领用减少库存
|
||||||
public ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity) {
|
public ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity) {
|
||||||
|
|
||||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -168,8 +164,10 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
|||||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||||
|
|
||||||
one.setTotalQuantity(one.getTotalQuantity() - quantity);
|
one.setTotalQuantity(one.getTotalQuantity() - quantity);
|
||||||
|
if (one.getTotalQuantity() == 0) {
|
||||||
|
|
||||||
|
one.setStatus(-1);
|
||||||
|
}
|
||||||
if (reagentConsumableInventoryService.updateById(one)) {
|
if (reagentConsumableInventoryService.updateById(one)) {
|
||||||
|
|
||||||
return one;
|
return one;
|
||||||
|
|||||||
+42
@@ -48,6 +48,9 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
private InstructionBookService instructionBookService;
|
private InstructionBookService instructionBookService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CentralizedRequestService centralizedRequestService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// 进行审核的列表
|
// 进行审核的列表
|
||||||
public ReviewAndApprove getReviewAndApproveList(DLPUser dlpUser) {
|
public ReviewAndApprove getReviewAndApproveList(DLPUser dlpUser) {
|
||||||
@@ -75,6 +78,25 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
|||||||
List<PeriodVerificationImplementationVO> periodVerificationImplementationVOS = new ArrayList<>();
|
List<PeriodVerificationImplementationVO> periodVerificationImplementationVOS = new ArrayList<>();
|
||||||
//供应商评价待审核列表
|
//供应商评价待审核列表
|
||||||
List<EvaluationFormVO> evaluationFormVOS = new ArrayList<>();
|
List<EvaluationFormVO> evaluationFormVOS = new ArrayList<>();
|
||||||
|
//集中采购申请待审核列表
|
||||||
|
List<CentralizedRequestVO> centralizedRequestVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
if (permissions.contains("reagent_centralized_request_audit")){
|
||||||
|
|
||||||
|
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,1);
|
||||||
|
|
||||||
|
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
|
||||||
|
|
||||||
|
for (CentralizedRequest centralizedRequest : list) {
|
||||||
|
|
||||||
|
CentralizedRequestVO centralizedRequestVO = centralizedRequestService.getCentralizedRequestVO(centralizedRequest.getId());
|
||||||
|
|
||||||
|
centralizedRequestVOList.add(centralizedRequestVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (permissions.contains("reagent_decentralized_request_primary")) {
|
if (permissions.contains("reagent_decentralized_request_primary")) {
|
||||||
@@ -501,6 +523,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
|||||||
reviewAndApprove.setPurchaseCatalogueVOList(purchaseCatalogueVOList);
|
reviewAndApprove.setPurchaseCatalogueVOList(purchaseCatalogueVOList);
|
||||||
reviewAndApprove.setStandardMaterialApprovalFormList(standardMaterialApprovalFormVOS);
|
reviewAndApprove.setStandardMaterialApprovalFormList(standardMaterialApprovalFormVOS);
|
||||||
reviewAndApprove.setInstructionBookList(instructionBookVOS);
|
reviewAndApprove.setInstructionBookList(instructionBookVOS);
|
||||||
|
reviewAndApprove.setCentralizedRequestVOList(centralizedRequestVOList);
|
||||||
|
|
||||||
return reviewAndApprove;
|
return reviewAndApprove;
|
||||||
}
|
}
|
||||||
@@ -532,6 +555,24 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
|||||||
//供应商评价待审核列表
|
//供应商评价待审核列表
|
||||||
List<EvaluationFormVO> evaluationFormVOS = new ArrayList<>();
|
List<EvaluationFormVO> evaluationFormVOS = new ArrayList<>();
|
||||||
|
|
||||||
|
List<CentralizedRequestVO> centralizedRequestVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
if (permissions.contains("reagent_centralized_request_audit")){
|
||||||
|
|
||||||
|
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2);
|
||||||
|
|
||||||
|
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
|
||||||
|
|
||||||
|
for (CentralizedRequest centralizedRequest : list) {
|
||||||
|
|
||||||
|
CentralizedRequestVO centralizedRequestVO = centralizedRequestService.getCentralizedRequestVO(centralizedRequest.getId());
|
||||||
|
|
||||||
|
centralizedRequestVOList.add(centralizedRequestVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (permissions.contains("reagent_decentralized_request_primary")) {
|
if (permissions.contains("reagent_decentralized_request_primary")) {
|
||||||
|
|
||||||
@@ -958,6 +999,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
|||||||
reviewAndApprove.setPurchaseCatalogueVOList(purchaseCatalogueVOList);
|
reviewAndApprove.setPurchaseCatalogueVOList(purchaseCatalogueVOList);
|
||||||
reviewAndApprove.setStandardMaterialApprovalFormList(standardMaterialApprovalFormVOS);
|
reviewAndApprove.setStandardMaterialApprovalFormList(standardMaterialApprovalFormVOS);
|
||||||
reviewAndApprove.setInstructionBookList(instructionBookVOS);
|
reviewAndApprove.setInstructionBookList(instructionBookVOS);
|
||||||
|
reviewAndApprove.setCentralizedRequestVOList(centralizedRequestVOList);
|
||||||
|
|
||||||
return reviewAndApprove;
|
return reviewAndApprove;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-1
@@ -40,6 +40,9 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ReferenceMaterialService referenceMaterialService;
|
private ReferenceMaterialService referenceMaterialService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BatchDetailsService batchDetailsService;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StandardReserveSolutionService standardReserveSolutionService;
|
private StandardReserveSolutionService standardReserveSolutionService;
|
||||||
@@ -53,10 +56,17 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
|||||||
byId.setPurposeAndQuantity(standardMaterialApplicationDTO.getPurposeAndQuantity());
|
byId.setPurposeAndQuantity(standardMaterialApplicationDTO.getPurposeAndQuantity());
|
||||||
byId.setDateOfReturn(LocalDateTime.now());
|
byId.setDateOfReturn(LocalDateTime.now());
|
||||||
byId.setStatus(1);
|
byId.setStatus(1);
|
||||||
|
|
||||||
|
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceMaterialId());
|
||||||
|
|
||||||
|
BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||||
|
|
||||||
|
batchDetails.setLatticeId(standardMaterialApplicationDTO.getLatticeId());
|
||||||
|
|
||||||
|
batchDetailsService.updateById(batchDetails);
|
||||||
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
||||||
if (!standardMaterialApplicationDTO.getOutOfUse()){
|
if (!standardMaterialApplicationDTO.getOutOfUse()){
|
||||||
|
|
||||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceMaterialId());
|
|
||||||
|
|
||||||
referenceMaterial.setStatus(-4);
|
referenceMaterial.setStatus(-4);
|
||||||
referenceMaterialService.updateById(referenceMaterial);
|
referenceMaterialService.updateById(referenceMaterial);
|
||||||
|
|||||||
+6
-13
@@ -191,14 +191,16 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
|||||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||||
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date));
|
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date));
|
||||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||||
|
referenceMaterial.setLatticeId(latticeId);
|
||||||
|
referenceMaterial.setLocation(standardReserveSolutionFullDTO.getLocation());
|
||||||
|
|
||||||
referenceMaterialService.save(referenceMaterial);
|
referenceMaterialService.save(referenceMaterial);
|
||||||
|
|
||||||
reagentConsumableInventory.setLatticeId(latticeId);
|
|
||||||
reagentConsumableInventory.setTotalQuantity(1);
|
reagentConsumableInventory.setTotalQuantity(1);
|
||||||
reagentConsumableInventory.setStorageLife(byId.getValidityPeriod());
|
reagentConsumableInventory.setStorageLife(byId.getValidityPeriod());
|
||||||
|
|
||||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||||
|
batchDetails.setLatticeId(latticeId);
|
||||||
|
|
||||||
byId.setSolutionNumbering(referenceMaterial.getNumber());
|
byId.setSolutionNumbering(referenceMaterial.getNumber());
|
||||||
|
|
||||||
@@ -230,10 +232,12 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
|||||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||||
referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date));
|
referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date));
|
||||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||||
|
referenceMaterial.setLatticeId(latticeId);
|
||||||
|
referenceMaterial.setLocation(standardReserveSolutionFullDTO.getLocation());
|
||||||
|
|
||||||
referenceMaterialService.save(referenceMaterial);
|
referenceMaterialService.save(referenceMaterial);
|
||||||
//将存储信息录入仓库表
|
//将存储信息录入仓库表
|
||||||
one.setLatticeId(latticeId);
|
|
||||||
one.setTotalQuantity(one.getTotalQuantity() + 1);
|
one.setTotalQuantity(one.getTotalQuantity() + 1);
|
||||||
one.setStorageLife(byId.getValidityPeriod());
|
one.setStorageLife(byId.getValidityPeriod());
|
||||||
}
|
}
|
||||||
@@ -268,17 +272,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
|||||||
|
|
||||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||||
|
|
||||||
String latticeId = one.getLatticeId();
|
|
||||||
|
|
||||||
LocationVO locationById = latticeFormService.getLocationById(latticeId);
|
|
||||||
//赋值FullVO对象
|
|
||||||
BeanUtils.copyProperties(standardReserveSolutionVOById,standardReserveSolutionFullVO);
|
|
||||||
standardReserveSolutionFullVO.setStorageRoomFormName(locationById.getStorageRoomFormName());
|
|
||||||
standardReserveSolutionFullVO.setCabinetFormNumber(locationById.getCabinetFormNumber());
|
|
||||||
standardReserveSolutionFullVO.setLatticeFormNumber(locationById.getLatticeFormNumber());
|
|
||||||
standardReserveSolutionFullVO.setCabinetFormType(locationById.getCabinetFormType());
|
|
||||||
standardReserveSolutionFullVO.setStorageLife(one.getStorageLife());
|
|
||||||
|
|
||||||
return standardReserveSolutionFullVO;
|
return standardReserveSolutionFullVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+43
-49
@@ -169,37 +169,32 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
|||||||
reagentConsumableInventory.setStatus(1);
|
reagentConsumableInventory.setStatus(1);
|
||||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||||
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarning_value());
|
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarningValue());
|
||||||
|
|
||||||
BatchDetails batchDetails = new BatchDetails();
|
BatchDetails batchDetails = new BatchDetails();
|
||||||
|
|
||||||
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
|
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
|
||||||
|
|
||||||
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
|
||||||
batchDetails.setServiceStatus(1);
|
batchDetails.setServiceStatus(1);
|
||||||
|
|
||||||
batchDetails.setPurchaseTime(LocalDateTime.now());
|
batchDetails.setPurchaseTime(LocalDateTime.now());
|
||||||
|
|
||||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||||
|
|
||||||
batchDetails.setSupplierId(byId.getSupplierId());
|
batchDetails.setSupplierId(byId.getSupplierId());
|
||||||
|
batchDetails.setBatch(1);
|
||||||
|
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate());
|
||||||
|
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity()*reagentConsumables.getPackagedCopies());
|
||||||
|
|
||||||
|
|
||||||
|
if (reagentConsumables.getCategory().equals("试剂")|reagentConsumables.getCategory().equals("耗材")){
|
||||||
|
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||||
|
batchDetails.setLocation(warehousingRecordFormDTO.getLocation());
|
||||||
|
}
|
||||||
|
|
||||||
if (reagentConsumableInventory.getTotalQuantity() == null) {
|
if (reagentConsumableInventory.getTotalQuantity() == null) {
|
||||||
|
|
||||||
reagentConsumableInventory.setTotalQuantity(0);
|
reagentConsumableInventory.setTotalQuantity(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reagentConsumableInventory.getCategory().equals("试剂") & reagentConsumableInventory.getCategory().equals("标准物质")) {
|
|
||||||
|
|
||||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity() * Integer.valueOf(reagentConsumableInventory.getPackagedCopies()));
|
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity() * Integer.valueOf(reagentConsumableInventory.getPackagedCopies()));
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity());
|
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity());
|
||||||
//如果是标准物质,则赋值编号
|
//如果是标准物质,则赋值编号
|
||||||
if (reagentConsumables.getCategory().equals("标准物质")) {
|
if (reagentConsumables.getCategory().equals("标准物质")) {
|
||||||
@@ -207,16 +202,13 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
|||||||
for (int j = 0; j < batchDetails.getQuantity(); j++) {
|
for (int j = 0; j < batchDetails.getQuantity(); j++) {
|
||||||
|
|
||||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||||
|
|
||||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
|
||||||
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||||
|
|
||||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||||
|
|
||||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||||
|
|
||||||
referenceMaterial.setStatus(0);
|
referenceMaterial.setStatus(0);
|
||||||
|
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation());
|
||||||
|
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||||
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
|
||||||
@@ -271,33 +263,41 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
|||||||
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
|
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
|
||||||
|
|
||||||
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
|
||||||
batchDetails.setServiceStatus(1);
|
batchDetails.setServiceStatus(1);
|
||||||
|
|
||||||
batchDetails.setPurchaseTime(LocalDateTime.now());
|
batchDetails.setPurchaseTime(LocalDateTime.now());
|
||||||
|
|
||||||
batchDetails.setSupplierId(byId.getSupplierId());
|
batchDetails.setSupplierId(byId.getSupplierId());
|
||||||
|
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate());
|
||||||
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||||
|
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity()*one.getPackagedCopies());
|
||||||
|
|
||||||
|
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId())
|
||||||
|
.eq("supplier_id",byId.getSupplierId()));
|
||||||
|
|
||||||
|
if (batchDetailsList.size()==0){
|
||||||
|
batchDetails.setBatch(1);
|
||||||
|
}else {
|
||||||
|
batchDetails.setBatch(batchDetailsList.size()+1);
|
||||||
|
}
|
||||||
|
if (one.getCategory().equals("试剂")|one.getCategory().equals("耗材")){
|
||||||
|
batchDetails.setLocation(warehousingRecordFormDTO.getLocation());
|
||||||
|
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||||
|
}
|
||||||
|
|
||||||
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity());
|
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity());
|
||||||
one.setWarningValue(warehousingRecordFormDTO.getWarning_value());
|
one.setWarningValue(warehousingRecordFormDTO.getWarningValue());
|
||||||
|
|
||||||
if (one.getCategory().equals("标准物质")) {
|
if (one.getCategory().equals("标准物质")) {
|
||||||
|
|
||||||
for (int j = 0; j < batchDetails.getQuantity(); j++) {
|
for (int j = 0; j < batchDetails.getQuantity(); j++) {
|
||||||
|
|
||||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||||
|
|
||||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
|
||||||
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
|
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
|
||||||
|
|
||||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||||
|
|
||||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||||
|
|
||||||
referenceMaterial.setStatus(0);
|
referenceMaterial.setStatus(0);
|
||||||
|
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation());
|
||||||
|
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||||
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
|
||||||
@@ -378,38 +378,32 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
|||||||
|
|
||||||
List<SupplierInformation> supplierInformations = new ArrayList<>();
|
List<SupplierInformation> supplierInformations = new ArrayList<>();
|
||||||
|
|
||||||
String evaluationFormId = null;
|
|
||||||
//创建供应商评价表
|
//创建供应商评价表
|
||||||
|
/*
|
||||||
|
通过循环签收内容,获得所有的供应商列表
|
||||||
|
为每一个供应商创建一个评价表
|
||||||
|
*/
|
||||||
for (WarehousingContent warehousingContent : list) {
|
for (WarehousingContent warehousingContent : list) {
|
||||||
|
|
||||||
SupplierInformation supplierInformation = supplierInformationService.getById(warehousingContent.getSupplierId());
|
SupplierInformation supplierInformation = supplierInformationService.getById(warehousingContent.getSupplierId());
|
||||||
|
|
||||||
if (supplierInformations.size()==0){
|
if (!supplierInformations.contains(supplierInformation)){
|
||||||
supplierInformations.add(supplierInformation);
|
|
||||||
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
|
|
||||||
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
|
|
||||||
evaluationFormId=evaluationForm.getId();
|
|
||||||
warehousingContent.setEvaluationFormId(evaluationForm.getId());
|
|
||||||
|
|
||||||
}else if (!(supplierInformations.contains(supplierInformation))){
|
|
||||||
supplierInformations.add(supplierInformation);
|
supplierInformations.add(supplierInformation);
|
||||||
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
|
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
|
||||||
warehousingContent.setEvaluationFormId(evaluationForm.getId());
|
warehousingContent.setEvaluationFormId(evaluationForm.getId());
|
||||||
evaluationFormId=evaluationForm.getId();
|
|
||||||
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
|
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
|
||||||
}else {
|
}else {
|
||||||
provideServicesOrSuppliesService.addById(evaluationFormId,warehousingContent.getReagentConsumableId());
|
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId,supplierInformation.getId())
|
||||||
|
.orderByDesc(EvaluationForm::getCreateTime);
|
||||||
|
|
||||||
|
List<EvaluationForm> list1 = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||||
|
|
||||||
|
provideServicesOrSuppliesService.addById(list1.get(0).getId(),warehousingContent.getReagentConsumableId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (SupplierInformation supplierInformation : supplierInformations) {
|
|
||||||
|
|
||||||
evaluationFormService.addForm(supplierInformation.getId());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
warehousingRecordForm.setStatus(2);
|
warehousingRecordForm.setStatus(2);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,4 @@ public class BatchDetailsVO extends BatchDetails {
|
|||||||
@ApiModelProperty(value="标准物质列表")
|
@ApiModelProperty(value="标准物质列表")
|
||||||
List<ReferenceMaterialVO> referenceMaterialVOS;
|
List<ReferenceMaterialVO> referenceMaterialVOS;
|
||||||
|
|
||||||
@ApiModelProperty(value="到期时间")
|
|
||||||
private LocalDate maturityTime;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package digital.laboratory.platform.reagent.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CatalogueDetailsPrintVO {
|
||||||
|
|
||||||
|
private Integer number;
|
||||||
|
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
private String reagentConsumableName;
|
||||||
|
|
||||||
|
private String brand;
|
||||||
|
|
||||||
|
private String specificationAndModel;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package digital.laboratory.platform.reagent.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PurchaseCataloguePrintVO {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String size;
|
||||||
|
|
||||||
|
private String secondaryAuditorName;
|
||||||
|
|
||||||
|
private LocalDate auditTimeOfSecondary;
|
||||||
|
|
||||||
|
private List<CatalogueDetailsPrintVO> voList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,7 +58,7 @@ spring:
|
|||||||
|
|
||||||
# 文件上传相关 支持阿里云、华为云、腾讯、minio
|
# 文件上传相关 支持阿里云、华为云、腾讯、minio
|
||||||
oss:
|
oss:
|
||||||
endpoint: http://192.168.9.73:9000
|
endpoint: http://192.168.9.74:9000
|
||||||
accessKey: dlp
|
accessKey: dlp
|
||||||
secretKey: 87990016
|
secretKey: 87990016
|
||||||
bucket-name: dlpfiles
|
bucket-name: dlpfiles
|
||||||
|
|||||||
@@ -25,6 +25,9 @@
|
|||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="batchDetailsId" column="batch_details_id"/>
|
<result property="batchDetailsId" column="batch_details_id"/>
|
||||||
|
<result property="latticeId" column="lattice_id"/>
|
||||||
|
<result property="location" column="location"/>
|
||||||
|
<result property="limitDate" column="limit_date"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<result property="storageCondition" column="storage_condition"/>
|
<result property="storageCondition" column="storage_condition"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
<result property="minimumUnit" column="minimum_unit"/>
|
<result property="minimumUnit" column="minimum_unit"/>
|
||||||
|
<result property="casNumber" column="cas_number"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
<result property="referenceMaterialNumber" column="reference_material_number"/>
|
<result property="referenceMaterialNumber" column="reference_material_number"/>
|
||||||
<result property="referenceMaterialId" column="reference_material_id"/>
|
<result property="referenceMaterialId" column="reference_material_id"/>
|
||||||
<result property="batchDetailsId" column="batch_details_id"/>
|
<result property="batchDetailsId" column="batch_details_id"/>
|
||||||
|
<result property="latticeId" column="lattice_Id"/>
|
||||||
|
<result property="location" column="location"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<result property="verificationBasis" column="verification_basis"/>
|
<result property="verificationBasis" column="verification_basis"/>
|
||||||
<result property="result" column="result"/>
|
<result property="result" column="result"/>
|
||||||
<result property="commitTime" column="commit_time"/>
|
<result property="commitTime" column="commit_time"/>
|
||||||
|
<result property="cause_of_dissatisfaction_result" column="cause_of_dissatisfaction_result"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,10 @@
|
|||||||
WHERE user.user_id=pc.create_by
|
WHERE user.user_id=pc.create_by
|
||||||
) AS create_name
|
) AS create_name
|
||||||
, (
|
, (
|
||||||
SELECT org.name
|
select department
|
||||||
FROM dlp_base.sys_org org
|
from dlp_base.sys_user
|
||||||
WHERE org.org_id in (select org_id from dlp_base.sys_user where user_id = pc.create_by)) AS org_name
|
where user_id = pc.create_by) as department
|
||||||
|
|
||||||
FROM purchase_catalogue pc
|
FROM purchase_catalogue pc
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@
|
|||||||
(select user.name
|
(select user.name
|
||||||
from dlp_base.sys_user user
|
from dlp_base.sys_user user
|
||||||
where user.user_id = pp.primary_auditor_id) as primary_auditor_name
|
where user.user_id = pp.primary_auditor_id) as primary_auditor_name
|
||||||
,
|
, (
|
||||||
(SELECT org.name
|
select department
|
||||||
FROM dlp_base.sys_org org
|
from dlp_base.sys_user
|
||||||
WHERE org.org_id in (select org_id from dlp_base.sys_user where user_id = pp.create_id)) AS org_name,
|
where user_id = pp.create_by) as org_name
|
||||||
(
|
, (
|
||||||
select user.name
|
select user.name
|
||||||
from dlp_base.sys_user user
|
from dlp_base.sys_user user
|
||||||
where user.user_id = pp.approver_id) as approver_name
|
where user.user_id = pp.approver_id) as approver_name
|
||||||
@@ -58,18 +58,20 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getPurchasingPlanVOList" resultMap="purchasingPlanVO"
|
||||||
<select id="getPurchasingPlanVOList" resultMap="purchasingPlanVO" resultType="digital.laboratory.platform.reagent.vo.PurchasingPlanVO">
|
resultType="digital.laboratory.platform.reagent.vo.PurchasingPlanVO">
|
||||||
<include refid="getPurchasingPlanVOSQL"></include>
|
<include refid="getPurchasingPlanVOSQL"></include>
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPurchasingPlanVOPage" resultMap="purchasingPlanVO" resultType="digital.laboratory.platform.reagent.vo.PurchasingPlanVO">
|
<select id="getPurchasingPlanVOPage" resultMap="purchasingPlanVO"
|
||||||
|
resultType="digital.laboratory.platform.reagent.vo.PurchasingPlanVO">
|
||||||
<include refid="getPurchasingPlanVOSQL"></include>
|
<include refid="getPurchasingPlanVOSQL"></include>
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPurchasingPlanVO" resultMap="purchasingPlanVO" resultType="digital.laboratory.platform.reagent.vo.PurchasingPlanVO">
|
<select id="getPurchasingPlanVO" resultMap="purchasingPlanVO"
|
||||||
|
resultType="digital.laboratory.platform.reagent.vo.PurchasingPlanVO">
|
||||||
SELECT pp.*,
|
SELECT pp.*,
|
||||||
(select user.name
|
(select user.name
|
||||||
from dlp_base.sys_user user
|
from dlp_base.sys_user user
|
||||||
|
|||||||
@@ -15,5 +15,7 @@
|
|||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<result property="reagentConsumableInventoryId" column="reagent_consumable_inventory_id"/>
|
<result property="reagentConsumableInventoryId" column="reagent_consumable_inventory_id"/>
|
||||||
|
<result property="latticeId" column="lattice_id"/>
|
||||||
|
<result property="location" column="location"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user