update
This commit is contained in:
@@ -48,6 +48,12 @@
|
|||||||
<version>3.5.0</version>
|
<version>3.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zhuozhengsoft</groupId>
|
||||||
|
<artifactId>pageoffice</artifactId>
|
||||||
|
<version>6.3.1.1-javax</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- AOP依赖 -->
|
<!-- AOP依赖 -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package digital.laboratory.platform.reagent.constans;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum ReagentStatusConstants {
|
||||||
|
/**
|
||||||
|
* 采购目录的状态
|
||||||
|
*/
|
||||||
|
CATALOGUE_STATUS_NOT_COMMIT(0, "未提交"),
|
||||||
|
CATALOGUE_STATUS_COMMIT(1, "已提交"),
|
||||||
|
CATALOGUE_STATUS_FIRST_AUDIT(2, "一级审核通过"),
|
||||||
|
CATALOGUE_STATUS_SECOND_AUDIT(3, "二级审核通过"),
|
||||||
|
CATALOGUE_STATUS_NOT_AUDIT(-1, "审核不通过"),
|
||||||
|
CATALOGUE_STATUS_RELEASED(4, "已发布"),
|
||||||
|
/**
|
||||||
|
* 集中采购申请的状态
|
||||||
|
*/
|
||||||
|
CENTRALIZED_PURCHASING_NOT_COMMIT(0, "未提交"),
|
||||||
|
CENTRALIZED_PURCHASING_COMMIT(1, "已提交"),
|
||||||
|
CENTRALIZED_PURCHASING_AUDIT(6, "审核通过"),
|
||||||
|
CENTRALIZED_PURCHASING_NOT_AUDIT(-2, "审核不通过"),
|
||||||
|
CENTRALIZED_PURCHASING_TO_PLAN(3, "已被制定为采购计划"),
|
||||||
|
CENTRALIZED_PURCHASING_TO_LIST(4, "已被制定为采购清单"),
|
||||||
|
/**
|
||||||
|
* 采购计划的状态
|
||||||
|
*/
|
||||||
|
PURCHASING_PLAN_NOT_COMMIT(0, "未提交"),
|
||||||
|
PURCHASING_PLAN_COMMIT(1, "已提交"),
|
||||||
|
PURCHASING_PLAN_AUDIT(2, "审核通过"),
|
||||||
|
PURCHASING_PLAN_APPROVE(3, "审批通过"),
|
||||||
|
PURCHASING_PLAN_NOT_AUDIT(-1, "审核/审批不通过"),
|
||||||
|
PURCHASING_PLAN_TO_LIST(4, "已被制定为采购清单"),
|
||||||
|
/**
|
||||||
|
* 采购清单的状态
|
||||||
|
*/
|
||||||
|
PURCHASING_LIST_NOT_COMMIT(0, "未提交"),
|
||||||
|
PURCHASING_LIST_COMMIT(1, "已提交"),
|
||||||
|
/**
|
||||||
|
* 入库签收单的状态
|
||||||
|
*/
|
||||||
|
WAREHOUSING_NOT_STARTED(0, "未开始"),
|
||||||
|
WAREHOUSING_STARTED(1, "已开始"),
|
||||||
|
WAREHOUSING_COMPLETE(2, "已完成"),
|
||||||
|
/**
|
||||||
|
* 入库明细的状态
|
||||||
|
*/
|
||||||
|
WAREHOUSING_COUNT_NOT_COMPLETE(0, "未完成"),
|
||||||
|
WAREHOUSING_COUNT_COMPLETE(1, "已开始"),
|
||||||
|
/**
|
||||||
|
* 验收单的状态
|
||||||
|
*/
|
||||||
|
ACCEPTANCE_NOT_COMMIT(0, "未提交"),
|
||||||
|
ACCEPTANCE_COMMIT(1, "已提交"),
|
||||||
|
ACCEPTANCE_FIRST_AUDIT(2, "一级审核通过"),
|
||||||
|
ACCEPTANCE_SECOND_AUDIT(3, "二级审核通过"),
|
||||||
|
ACCEPTANCE_THIRD_AUDIT(6, "三级审核通过"),
|
||||||
|
ACCEPTANCE_NOT_FIRST_AUDIT(-2, "一级审核不通过"),
|
||||||
|
ACCEPTANCE_NOT_SECOND_AUDIT(-3, "二级审核不通过"),
|
||||||
|
ACCEPTANCE_NOT_THIRD_AUDIT(-4, "三级审核不通过");
|
||||||
|
|
||||||
|
private final Integer status;
|
||||||
|
private final String statusName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+7
-3
@@ -14,6 +14,8 @@ import com.deepoove.poi.XWPFTemplate;
|
|||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.zhuozhengsoft.pageoffice.FileSaver;
|
||||||
|
import com.zhuozhengsoft.pageoffice.PageOfficeCtrl;
|
||||||
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.feign.RemoteWord2PDFService;
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||||
@@ -46,6 +48,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -460,6 +463,7 @@ public class PurchaseCatalogueController {
|
|||||||
|
|
||||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||||
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||||
|
PageOfficeCtrl pageOfficeCtrl = new PageOfficeCtrl(theHttpServletRequest);
|
||||||
|
|
||||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||||
|
|
||||||
@@ -470,10 +474,10 @@ public class PurchaseCatalogueController {
|
|||||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||||
outPDF.close();
|
outPDF.close();
|
||||||
|
|
||||||
|
FileSaver fs = new FileSaver(theHttpServletRequest, httpServletResponse);
|
||||||
ossFile.fileSave("document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
FileInputStream fileStream = fs.getFileStream();
|
||||||
|
ossFile.fileSave("document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf", fileStream);
|
||||||
isPDF.close();
|
isPDF.close();
|
||||||
|
|
||||||
System.out.println(String.format("转换为 PDF 结束"));
|
System.out.println(String.format("转换为 PDF 结束"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -65,13 +65,9 @@ public class PurchaseListController {
|
|||||||
@GetMapping()
|
@GetMapping()
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')")
|
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')")
|
||||||
public R<PurchaseList> getById(String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
public R<PurchaseList> getById(String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||||
|
|
||||||
PurchaseListVO purchaseList = purchaseListService.getPurchaseList(purchaseListId);
|
PurchaseListVO purchaseList = purchaseListService.getPurchaseList(purchaseListId);
|
||||||
|
|
||||||
return R.ok(purchaseList);
|
return R.ok(purchaseList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,7 +83,6 @@ public class PurchaseListController {
|
|||||||
public R<IPage<PurchaseListPageVO>> getPurchaseListPage(Page<PurchaseList> page, Integer status, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
public R<IPage<PurchaseListPageVO>> getPurchaseListPage(Page<PurchaseList> page, Integer status, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||||
|
|
||||||
IPage<PurchaseListPageVO> purchaseListSList = purchaseListService.getPurchaseListVOPage(page, Wrappers.<PurchaseList>query()
|
IPage<PurchaseListPageVO> purchaseListSList = purchaseListService.getPurchaseListVOPage(page, Wrappers.<PurchaseList>query()
|
||||||
.eq(status != null, "status", status)
|
.eq(status != null, "status", status)
|
||||||
.ge(startTime != null, "create_time", startTime)
|
.ge(startTime != null, "create_time", startTime)
|
||||||
|
|||||||
+4
-4
@@ -92,15 +92,15 @@ public class ReagentConsumableInventoryController {
|
|||||||
|
|
||||||
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
|
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
|
||||||
@GetMapping("/standardList")
|
@GetMapping("/standardList")
|
||||||
public R<IPage<ReagentConsumableInventoryVO>> getStandardList(Page page, Integer warning, String keywords) {
|
public R<IPage<ReagentConsumableInventoryVO>> getStandardList(Page page, Integer warning, String reagentConsumableName) {
|
||||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, warning, keywords);
|
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, warning, reagentConsumableName);
|
||||||
return R.ok(reagentConsumableInventoryRMVOList);
|
return R.ok(reagentConsumableInventoryRMVOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
||||||
@GetMapping("/List")
|
@GetMapping("/List")
|
||||||
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, Integer warning, String keywords) {
|
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, Integer warning, String reagentConsumableName) {
|
||||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, warning, keywords);
|
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, warning, reagentConsumableName);
|
||||||
return R.ok(reagentConsumableInventoryRMVOList);
|
return R.ok(reagentConsumableInventoryRMVOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,24 +111,26 @@ public class AcceptanceRecordForm extends BaseEntity {
|
|||||||
private String deliveryCycle;
|
private String deliveryCycle;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(供货周期备注)")
|
@ApiModelProperty(value = "(供货周期备注)")
|
||||||
private String dc_remarks;
|
private String dc_remarks;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(验收结论)")
|
@ApiModelProperty(value = "(验收结论)")
|
||||||
private String acceptanceConclusion;
|
private String acceptanceConclusion;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(不合格项目)")
|
@ApiModelProperty(value = "(不合格项目)")
|
||||||
private String nonconformingItem;
|
private String nonconformingItem;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态(0:未提交,1:一级待审核,2:二级待审核,3:三级待审核,6:审核通过,-2 一级审核不不通过,-3:二级审核不通过,-4 三级审核不通过)")
|
@ApiModelProperty(value = "状态(0:未提交,1:一级待审核,2:二级待审核,3:三级待审核,6:审核通过,-2 一级审核不不通过,-3:二级审核不通过,-4 三级审核不通过)")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(签收物品明细Id)")
|
@ApiModelProperty(value = "(签收物品明细Id)")
|
||||||
private String warehousingContentId;
|
private String warehousingContentId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(验收人名称)")
|
@ApiModelProperty(value = "(验收人名称)")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "(验收中间表ID)")
|
@ApiModelProperty(value = "(验收中间表ID)")
|
||||||
private String acceptanceSignForId;
|
private String acceptanceSignForId;
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,4 +27,7 @@ public class AcceptanceSignFor extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "状态 0 未开始签收 1 进行中 2 已完成 ")
|
@ApiModelProperty(value = "状态 0 未开始签收 1 进行中 2 已完成 ")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ public class ApplicationForUse extends BaseEntity {
|
|||||||
private String recipientId;
|
private String recipientId;
|
||||||
|
|
||||||
@ApiModelProperty(value="(状态)")
|
@ApiModelProperty(value="(状态)")
|
||||||
private Integer status;
|
private Integer status;//0-待提交 1-待领用 2-已领用
|
||||||
|
|
||||||
|
@ApiModelProperty(value="(备注)")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
@ApiModelProperty(value="id")
|
@ApiModelProperty(value="id")
|
||||||
@@ -49,5 +52,6 @@ public class ApplicationForUse extends BaseEntity {
|
|||||||
@ApiModelProperty(value="检验鉴定实验ID")
|
@ApiModelProperty(value="检验鉴定实验ID")
|
||||||
private String experimentId;
|
private String experimentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,4 +103,7 @@ public class BatchDetails extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String supplierName;
|
private String supplierName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
@ApiModel(value = "(试剂耗材黑名单)")
|
@ApiModel(value = "(试剂耗材黑名单)")
|
||||||
public class Blacklist extends BaseEntity {
|
public class Blacklist extends BaseEntity {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
int a = 5;
|
|
||||||
int b =2 ;
|
|
||||||
System.out.println(a/b);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (试剂耗材ID)
|
* (试剂耗材ID)
|
||||||
@@ -61,7 +56,8 @@ public class Blacklist extends BaseEntity {
|
|||||||
@ApiModelProperty(value="complianceCheckId")
|
@ApiModelProperty(value="complianceCheckId")
|
||||||
private String complianceCheckId;
|
private String complianceCheckId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -149,5 +149,7 @@ public class CatalogueDetails extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "catalogueDetailsId")
|
@ApiModelProperty(value = "catalogueDetailsId")
|
||||||
private String catalogueDetailsId;
|
private String catalogueDetailsId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,5 +43,7 @@ public class CategoryTable extends BaseEntity {
|
|||||||
@ApiModelProperty(value="种类")
|
@ApiModelProperty(value="种类")
|
||||||
private String species;
|
private String species;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,5 +81,7 @@ public class CentralizedRequest extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "集中采购申请ID")
|
@ApiModelProperty(value = "集中采购申请ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ public class CheckSchedule extends BaseEntity {
|
|||||||
@ApiModelProperty(value="(提交时间)")
|
@ApiModelProperty(value="(提交时间)")
|
||||||
private LocalDateTime commitTime;
|
private LocalDateTime commitTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,4 +157,7 @@ public class ComplianceCheck extends BaseEntity {
|
|||||||
@ApiModelProperty(value="(标准物质Id,若选择的物质为标准物质,则需传输Id)")
|
@ApiModelProperty(value="(标准物质Id,若选择的物质为标准物质,则需传输Id)")
|
||||||
private String referenceMaterialId;
|
private String referenceMaterialId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ public class DecentralizeDetails extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "物品编码")
|
@ApiModelProperty(value = "物品编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,8 @@ public class DecentralizedRequest extends BaseEntity {
|
|||||||
@ApiModelProperty(value="(状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过,5:审批通过,6:已被制定为采购清单))")
|
@ApiModelProperty(value="(状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过,5:审批通过,6:已被制定为采购清单))")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,5 +57,8 @@ public class DeliveryRegistrationForm extends BaseEntity {
|
|||||||
@ApiModelProperty(value="id")
|
@ApiModelProperty(value="id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public class DetailsOfCentralized extends BaseEntity {
|
|||||||
@ApiModelProperty(value="采购计划换货备注")
|
@ApiModelProperty(value="采购计划换货备注")
|
||||||
private String replacementRemark;
|
private String replacementRemark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,5 +188,6 @@ public class EvaluationForm extends BaseEntity {
|
|||||||
@ApiModelProperty(value="状态:(0:未评价,1:已评价,2:二级审核通过,3:三级审核通过, -1 :审核未通过)")
|
@ApiModelProperty(value="状态:(0:未评价,1:已评价,2:二级审核通过,3:三级审核通过, -1 :审核未通过)")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public class FixedValueReport extends BaseEntity {
|
|||||||
@ApiModelProperty(value="定值结果")
|
@ApiModelProperty(value="定值结果")
|
||||||
private String fixedResult;
|
private String fixedResult;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -88,5 +88,6 @@ public class InstructionBook extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,4 +25,7 @@ public class LocationInfo extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "新的存放位置")
|
@ApiModelProperty(value = "新的存放位置")
|
||||||
private String newLocation;
|
private String newLocation;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,5 +93,6 @@ public class OutgoingContents extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "(领用物品仓库ID)")
|
@ApiModelProperty(value = "(领用物品仓库ID)")
|
||||||
private String reagentConsumableStashId;
|
private String reagentConsumableStashId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -160,4 +160,7 @@ public class PeriodVerificationImplementation extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value="提交时间")
|
@ApiModelProperty(value="提交时间")
|
||||||
private LocalDateTime commitTime;
|
private LocalDateTime commitTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -117,6 +117,7 @@ public class PeriodVerificationPlan extends BaseEntity {
|
|||||||
@ApiModelProperty(value="id")
|
@ApiModelProperty(value="id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,5 +104,6 @@ public class ProcurementContent extends BaseEntity {
|
|||||||
@ApiModelProperty(value="procurementContentId")
|
@ApiModelProperty(value="procurementContentId")
|
||||||
private String procurementContentId;
|
private String procurementContentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -43,5 +43,6 @@ public class ProvideServicesOrSupplies extends BaseEntity {
|
|||||||
@ApiModelProperty(value="提供服务或供应品表ID")
|
@ApiModelProperty(value="提供服务或供应品表ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,5 +80,7 @@ public class PurchaseCatalogue extends BaseEntity {
|
|||||||
@ApiModelProperty(value="purchaseCatalogueId")
|
@ApiModelProperty(value="purchaseCatalogueId")
|
||||||
private String purchaseCatalogueId;
|
private String purchaseCatalogueId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,12 @@ public class PurchaseList extends BaseEntity {
|
|||||||
@ApiModelProperty(value="采购清单ID")
|
@ApiModelProperty(value="采购清单ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (编号)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="区分是分散采购申请还是采购计划")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,13 @@ public class PurchaseListDetails extends BaseEntity {
|
|||||||
@ApiModelProperty(value="采购清单明细ID")
|
@ApiModelProperty(value="采购清单明细ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购计划明细ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="采购计划明细ID")
|
||||||
private String procurementContentId;
|
private String procurementContentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,5 +127,7 @@ public class PurchasingPlan extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "采购计划ID")
|
@ApiModelProperty(value = "采购计划ID")
|
||||||
private String purchasingPlanId;
|
private String purchasingPlanId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-5
@@ -51,11 +51,11 @@ public class ReagentConsumableInventory extends BaseEntity {
|
|||||||
@TableId(value = "reagent_consumable_inventory_id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "reagent_consumable_inventory_id", type = IdType.ASSIGN_UUID)
|
||||||
@ApiModelProperty(value = "reagentConsumableInventoryId")
|
@ApiModelProperty(value = "reagentConsumableInventoryId")
|
||||||
private String reagentConsumableInventoryId;
|
private String reagentConsumableInventoryId;
|
||||||
/**
|
// /**
|
||||||
* 备注
|
// * 备注
|
||||||
*/
|
// */
|
||||||
@ApiModelProperty(value = "备注")
|
// @ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
// private String remark;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -76,4 +76,6 @@ public class ReagentConsumableInventory extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "(预警信息)")
|
@ApiModelProperty(value = "(预警信息)")
|
||||||
private String warningInformation;
|
private String warningInformation;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -81,5 +81,6 @@ public class ReagentConsumableStash extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "房间号")
|
@ApiModelProperty(value = "房间号")
|
||||||
private String roomNo;
|
private String roomNo;
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,5 +132,6 @@ public class ReagentConsumables extends BaseEntity {
|
|||||||
|
|
||||||
// @ApiModelProperty(value = "存储期限")
|
// @ApiModelProperty(value = "存储期限")
|
||||||
// private Integer storageLife;
|
// private Integer storageLife;
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,4 +87,6 @@ public class ReagentConsumablesSet extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "(领用物品仓库ID)")
|
@ApiModelProperty(value = "(领用物品仓库ID)")
|
||||||
private String reagentConsumableStashId;
|
private String reagentConsumableStashId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,4 +70,6 @@ public class ReferenceMaterial extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "单位")
|
@ApiModelProperty(value = "单位")
|
||||||
private String referenceMaterialUnit;
|
private String referenceMaterialUnit;
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,57 +29,63 @@ public class RequisitionRecord extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* (领用日期)
|
* (领用日期)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(领用日期)")
|
@ApiModelProperty(value = "(领用日期)")
|
||||||
private LocalDateTime dateOfClaim;
|
private LocalDateTime dateOfClaim;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (领用人)
|
* (领用人)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(领用人)")
|
@ApiModelProperty(value = "(领用人)")
|
||||||
private String recipientId;
|
private String recipientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (备注)
|
* (备注)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(备注)")
|
@ApiModelProperty(value = "(备注)")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (耗材ID)
|
* (耗材ID)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="(耗材ID)")
|
@ApiModelProperty(value = "(耗材ID)")
|
||||||
private String reagentConsumableId;
|
private String reagentConsumableId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格型号
|
* 规格型号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="规格型号")
|
@ApiModelProperty(value = "规格型号")
|
||||||
private String specificationAndModel;
|
private String specificationAndModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领用数量
|
* 领用数量
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="领用数量")
|
@ApiModelProperty(value = "领用数量")
|
||||||
private Integer drawingAmount;
|
private Integer drawingAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编号
|
* 编号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="编号")
|
@ApiModelProperty(value = "编号")
|
||||||
private String number;
|
private String number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库记录表ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "出库记录表ID")
|
||||||
private String deliveryRegistrationFormId;
|
private String deliveryRegistrationFormId;
|
||||||
|
/**
|
||||||
|
* 试剂耗材名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "试剂耗材名称")
|
||||||
private String reagentConsumableName;
|
private String reagentConsumableName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* requisitionRecordId
|
* requisitionRecordId
|
||||||
*/
|
*/
|
||||||
@TableId(value = "requisition_record_id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "requisition_record_id", type = IdType.ASSIGN_UUID)
|
||||||
@ApiModelProperty(value="requisitionRecordId")
|
@ApiModelProperty(value = "requisitionRecordId")
|
||||||
private String requisitionRecordId;
|
private String requisitionRecordId;
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,4 +33,7 @@ public class SolutionUseForm extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value="(标准物质领用/归还登记表ID)")
|
@ApiModelProperty(value="(标准物质领用/归还登记表ID)")
|
||||||
private String standardMaterialApplicationId;
|
private String standardMaterialApplicationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -151,4 +151,9 @@ public class StandardMaterialApplication extends BaseEntity {
|
|||||||
@ApiModelProperty(value="领取码")
|
@ApiModelProperty(value="领取码")
|
||||||
private String claimCode;
|
private String claimCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -197,6 +197,10 @@ public class StandardMaterialApprovalForm extends BaseEntity {
|
|||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
@ApiModelProperty(value="id")
|
@ApiModelProperty(value="id")
|
||||||
private String id;
|
private String id;
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -123,5 +123,9 @@ public class StandardReserveSolution extends BaseEntity {
|
|||||||
@ApiModelProperty(value="标准储备溶液及使用记录表ID")
|
@ApiModelProperty(value="标准储备溶液及使用记录表ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,10 @@ public class StandardSolutionCurve extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value="(标准储备溶液ID)")
|
@ApiModelProperty(value="(标准储备溶液ID)")
|
||||||
private String referenceMaterialId;
|
private String referenceMaterialId;
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,11 @@ public class SupplierInformation extends BaseEntity {
|
|||||||
@ApiModelProperty(value="(编号)")
|
@ApiModelProperty(value="(编号)")
|
||||||
private String number;
|
private String number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
/**
|
/**
|
||||||
* supplierInformationId
|
* supplierInformationId
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ public class WarehousingContent extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value="柜子ID")
|
@ApiModelProperty(value="柜子ID")
|
||||||
private String boxId;
|
private String boxId;
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-6
@@ -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,27 +29,31 @@ public class WarehousingRecordForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 采购清单ID
|
* 采购清单ID
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="采购清单ID")
|
@ApiModelProperty(value = "采购清单ID")
|
||||||
private String purchaseListId;
|
private String purchaseListId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="状态 0:未入库 1:未完成入库 2:已完成入库")
|
@ApiModelProperty(value = "状态 0:未入库 1:未完成入库 2:已完成入库")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购编号
|
* 采购编号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="采购编号")
|
@ApiModelProperty(value = "采购编号")
|
||||||
private String purchaseNumber;
|
private String purchaseNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* signingRecordFormId
|
* signingRecordFormId
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
@ApiModelProperty(value="id")
|
@ApiModelProperty(value = "id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "系统ID")
|
||||||
|
private String sId;
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-95
@@ -104,26 +104,17 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
public DecentralizedRequest addRequest(List<DecentralizedRequestDTO> decentralizedRequestDTOList, DLPUser dlpUser) {
|
public DecentralizedRequest addRequest(List<DecentralizedRequestDTO> decentralizedRequestDTOList, DLPUser dlpUser) {
|
||||||
|
|
||||||
DecentralizedRequest decentralizedRequest = new DecentralizedRequest();
|
DecentralizedRequest decentralizedRequest = new DecentralizedRequest();
|
||||||
|
|
||||||
decentralizedRequest.setId(IdWorker.get32UUID().toUpperCase());
|
decentralizedRequest.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
|
||||||
decentralizedRequest.setApplicantId(dlpUser.getId());
|
decentralizedRequest.setApplicantId(dlpUser.getId());
|
||||||
|
|
||||||
decentralizedRequest.setStatus(0);
|
decentralizedRequest.setStatus(0);
|
||||||
|
|
||||||
List<DecentralizeDetails> list = new ArrayList<>();
|
List<DecentralizeDetails> list = new ArrayList<>();
|
||||||
//接收分散采购DTO,将其赋值给分散采购明细
|
//接收分散采购DTO,将其赋值给分散采购明细
|
||||||
for (DecentralizedRequestDTO decentralizedRequestDTO : decentralizedRequestDTOList) {
|
for (DecentralizedRequestDTO decentralizedRequestDTO : decentralizedRequestDTOList) {
|
||||||
//新添加试剂耗材
|
//新添加试剂耗材
|
||||||
|
|
||||||
DecentralizeDetails decentralizedDetails = new DecentralizeDetails();
|
DecentralizeDetails decentralizedDetails = new DecentralizeDetails();
|
||||||
|
|
||||||
BeanUtils.copyProperties(decentralizedRequestDTO, decentralizedDetails);
|
BeanUtils.copyProperties(decentralizedRequestDTO, decentralizedDetails);
|
||||||
|
|
||||||
decentralizedDetails.setId(IdWorker.get32UUID().toUpperCase());
|
decentralizedDetails.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
|
||||||
decentralizedDetails.setDecentralizedRequestId(decentralizedRequest.getId());
|
decentralizedDetails.setDecentralizedRequestId(decentralizedRequest.getId());
|
||||||
|
|
||||||
list.add(decentralizedDetails);
|
list.add(decentralizedDetails);
|
||||||
}
|
}
|
||||||
if (this.save(decentralizedRequest) & decentralizeDetailsService.saveBatch(list)) {
|
if (this.save(decentralizedRequest) & decentralizeDetailsService.saveBatch(list)) {
|
||||||
@@ -133,11 +124,8 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DecentralizeDetails addDetails(DecentralizedRequestDTO decentralizedRequestDTO) {
|
public DecentralizeDetails addDetails(DecentralizedRequestDTO decentralizedRequestDTO) {
|
||||||
|
|
||||||
DecentralizeDetails decentralizeDetails = new DecentralizeDetails();
|
DecentralizeDetails decentralizeDetails = new DecentralizeDetails();
|
||||||
|
|
||||||
BeanUtils.copyProperties(decentralizedRequestDTO, decentralizeDetails);
|
BeanUtils.copyProperties(decentralizedRequestDTO, decentralizeDetails);
|
||||||
|
|
||||||
if (decentralizeDetailsService.save(decentralizeDetails)) {
|
if (decentralizeDetailsService.save(decentralizeDetails)) {
|
||||||
return decentralizeDetails;
|
return decentralizeDetails;
|
||||||
} else throw new RuntimeException(String.format("保存失败"));
|
} else throw new RuntimeException(String.format("保存失败"));
|
||||||
@@ -145,11 +133,8 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
|
|
||||||
@Override//修改分散采购申请明细
|
@Override//修改分散采购申请明细
|
||||||
public DecentralizeDetails editRequest(DecentralizedRequestDTO decentralizedRequestDTO) {
|
public DecentralizeDetails editRequest(DecentralizedRequestDTO decentralizedRequestDTO) {
|
||||||
|
|
||||||
DecentralizeDetails decentralizeDetails = decentralizeDetailsService.getById(decentralizedRequestDTO.getDecentralizeDetailsId());
|
DecentralizeDetails decentralizeDetails = decentralizeDetailsService.getById(decentralizedRequestDTO.getDecentralizeDetailsId());
|
||||||
|
|
||||||
BeanUtils.copyProperties(decentralizedRequestDTO, decentralizeDetails);
|
BeanUtils.copyProperties(decentralizedRequestDTO, decentralizeDetails);
|
||||||
|
|
||||||
if (decentralizeDetailsService.updateById(decentralizeDetails)) {
|
if (decentralizeDetailsService.updateById(decentralizeDetails)) {
|
||||||
return decentralizeDetails;
|
return decentralizeDetails;
|
||||||
} else return null;
|
} else return null;
|
||||||
@@ -158,17 +143,12 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
|
|
||||||
@Override//删除分散采购申请
|
@Override//删除分散采购申请
|
||||||
public Boolean delRequestById(String decentralizedRequestId) {
|
public Boolean delRequestById(String decentralizedRequestId) {
|
||||||
|
|
||||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, decentralizedRequestId);
|
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, decentralizedRequestId);
|
||||||
|
|
||||||
List<DecentralizeDetails> list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
List<DecentralizeDetails> list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
if (list != null) {
|
|
||||||
decentralizeDetailsService.removeBatchByIds(list);
|
decentralizeDetailsService.removeBatchByIds(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.removeById(this.getById(decentralizedRequestId));
|
return this.removeById(this.getById(decentralizedRequestId));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -176,27 +156,20 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
@Override//提交分散采购申请
|
@Override//提交分散采购申请
|
||||||
public DecentralizedRequest commitRequest(List<DecentralizedRequestDTO> decentralizedRequestDTOList, DLPUser dlpUser) {
|
public DecentralizedRequest commitRequest(List<DecentralizedRequestDTO> decentralizedRequestDTOList, DLPUser dlpUser) {
|
||||||
String decentralizedRequestId = decentralizedRequestDTOList.get(0).getDecentralizedRequestId();
|
String decentralizedRequestId = decentralizedRequestDTOList.get(0).getDecentralizedRequestId();
|
||||||
|
//直接提交,此时还未保存
|
||||||
if (decentralizedRequestId == null) {
|
if (decentralizedRequestId == null) {
|
||||||
|
|
||||||
DecentralizedRequest decentralizedRequest = this.addRequest(decentralizedRequestDTOList, dlpUser);
|
DecentralizedRequest decentralizedRequest = this.addRequest(decentralizedRequestDTOList, dlpUser);
|
||||||
|
|
||||||
decentralizedRequest.setStatus(1);
|
decentralizedRequest.setStatus(1);
|
||||||
|
|
||||||
decentralizedRequest.setCommitTime(LocalDateTime.now());
|
decentralizedRequest.setCommitTime(LocalDateTime.now());
|
||||||
decentralizedRequest.setDateOfApplication(LocalDateTime.now());
|
decentralizedRequest.setDateOfApplication(LocalDateTime.now());
|
||||||
|
|
||||||
if (this.updateById(decentralizedRequest)) {
|
if (this.updateById(decentralizedRequest)) {
|
||||||
return decentralizedRequest;
|
return decentralizedRequest;
|
||||||
} else throw new RuntimeException(String.format("提交失败"));
|
} else throw new RuntimeException(String.format("提交失败"));
|
||||||
|
//保存以后再提交,已经存在ID了
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
DecentralizedRequest byId = this.getById(decentralizedRequestId);
|
DecentralizedRequest byId = this.getById(decentralizedRequestId);
|
||||||
|
|
||||||
byId.setStatus(1);
|
byId.setStatus(1);
|
||||||
|
|
||||||
byId.setCommitTime(LocalDateTime.now());
|
byId.setCommitTime(LocalDateTime.now());
|
||||||
|
|
||||||
if (this.updateById(byId)) {
|
if (this.updateById(byId)) {
|
||||||
return byId;
|
return byId;
|
||||||
} else throw new RuntimeException(String.format("提交失败"));
|
} else throw new RuntimeException(String.format("提交失败"));
|
||||||
@@ -207,58 +180,43 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
@Override//一级审核
|
@Override//一级审核
|
||||||
public DecentralizedRequest primaryAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
public DecentralizedRequest primaryAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||||
|
|
||||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
DecentralizedRequest request = this.getById(auditAndApproveDto.getUuId());
|
||||||
|
|
||||||
if (byId.getStatus() != 1) {
|
if (request.getStatus() != 1) {
|
||||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||||
}
|
}
|
||||||
|
request.setPrimaryAuditorId(dlpUser.getId());
|
||||||
byId.setPrimaryAuditorId(dlpUser.getId());
|
request.setAuditResultOfPrimary(auditAndApproveDto.getAuditResult());
|
||||||
|
request.setAuditOpinionOfPrimary(auditAndApproveDto.getAuditOpinion());
|
||||||
byId.setAuditResultOfPrimary(auditAndApproveDto.getAuditResult());
|
request.setAuditTimeOfPrimary(LocalDateTime.now());
|
||||||
|
|
||||||
byId.setAuditOpinionOfPrimary(auditAndApproveDto.getAuditOpinion());
|
|
||||||
|
|
||||||
byId.setAuditTimeOfPrimary(LocalDateTime.now());
|
|
||||||
|
|
||||||
if (auditAndApproveDto.getAuditResult() == true) {
|
if (auditAndApproveDto.getAuditResult() == true) {
|
||||||
byId.setStatus(2);
|
request.setStatus(2);
|
||||||
} else {
|
} else {
|
||||||
byId.setStatus(-2);
|
request.setStatus(-2);
|
||||||
}
|
}
|
||||||
|
if (this.updateById(request)) {
|
||||||
if (this.updateById(byId)) {
|
return request;
|
||||||
return byId;
|
|
||||||
} else return null;
|
} else return null;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override//二级审核
|
@Override//二级审核
|
||||||
public DecentralizedRequest secondaryAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
public DecentralizedRequest secondaryAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||||
|
|
||||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
DecentralizedRequest request = this.getById(auditAndApproveDto.getUuId());
|
||||||
|
if (request.getStatus() != 2) {
|
||||||
if (byId.getStatus() != 2) {
|
|
||||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||||
}
|
}
|
||||||
|
request.setSecondaryAuditorId(dlpUser.getId());
|
||||||
byId.setSecondaryAuditorId(dlpUser.getId());
|
request.setAuditResultOfSecondary(auditAndApproveDto.getAuditResult());
|
||||||
|
request.setAuditOpinionOfSecondary(auditAndApproveDto.getAuditOpinion());
|
||||||
byId.setAuditResultOfSecondary(auditAndApproveDto.getAuditResult());
|
request.setAuditTimeOfSecondary(LocalDateTime.now());
|
||||||
|
|
||||||
byId.setAuditOpinionOfSecondary(auditAndApproveDto.getAuditOpinion());
|
|
||||||
|
|
||||||
byId.setAuditTimeOfSecondary(LocalDateTime.now());
|
|
||||||
|
|
||||||
if (auditAndApproveDto.getAuditResult() == true) {
|
if (auditAndApproveDto.getAuditResult() == true) {
|
||||||
byId.setStatus(3);
|
request.setStatus(3);
|
||||||
} else {
|
} else {
|
||||||
byId.setStatus(-3);
|
request.setStatus(-3);
|
||||||
}
|
}
|
||||||
|
if (this.updateById(request)) {
|
||||||
if (this.updateById(byId)) {
|
return request;
|
||||||
return byId;
|
|
||||||
} else return null;
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,57 +224,48 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
|||||||
@Override//三级审核
|
@Override//三级审核
|
||||||
public DecentralizedRequest threeLevelAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDTO) {
|
public DecentralizedRequest threeLevelAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDTO) {
|
||||||
|
|
||||||
DecentralizedRequest byId = this.getById(auditAndApproveDTO.getUuId());
|
DecentralizedRequest request = this.getById(auditAndApproveDTO.getUuId());
|
||||||
|
if (request.getStatus() != 3) {
|
||||||
if (byId.getStatus() != 3) {
|
|
||||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||||
}
|
}
|
||||||
|
request.setThreeLevelAuditId(dlpUser.getId());
|
||||||
byId.setThreeLevelAuditId(dlpUser.getId());
|
request.setAuditResultOfThreeLevel(auditAndApproveDTO.getAuditResult());
|
||||||
|
request.setAuditOpinionOfThreeLevel(auditAndApproveDTO.getAuditOpinion());
|
||||||
byId.setAuditResultOfThreeLevel(auditAndApproveDTO.getAuditResult());
|
request.setAuditTimeOfThreeLevel(LocalDateTime.now());
|
||||||
|
|
||||||
byId.setAuditOpinionOfThreeLevel(auditAndApproveDTO.getAuditOpinion());
|
|
||||||
|
|
||||||
byId.setAuditTimeOfThreeLevel(LocalDateTime.now());
|
|
||||||
|
|
||||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||||
byId.setStatus(4);
|
request.setStatus(4);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
byId.setStatus(-4);
|
request.setStatus(-4);
|
||||||
}
|
}
|
||||||
if (this.updateById(byId)) {
|
if (this.updateById(request)) {
|
||||||
return byId;
|
return request;
|
||||||
} else return null;
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override//审批
|
@Override//审批
|
||||||
@Transactional
|
@Transactional
|
||||||
public DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
public DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
DecentralizedRequest request = this.getById(auditAndApproveDto.getUuId());
|
||||||
if (byId.getStatus() != 4) {
|
if (request.getStatus() != 4) {
|
||||||
throw new RuntimeException(String.format("当前状态不能审批"));
|
throw new RuntimeException(String.format("当前状态不能审批"));
|
||||||
}
|
}
|
||||||
byId.setApproverId(dlpUser.getId());
|
request.setApproverId(dlpUser.getId());
|
||||||
byId.setResultOfApproval(auditAndApproveDto.getApproveResult());
|
request.setResultOfApproval(auditAndApproveDto.getApproveResult());
|
||||||
byId.setOpinionOfApproval(auditAndApproveDto.getApproveOpinion());
|
request.setOpinionOfApproval(auditAndApproveDto.getApproveOpinion());
|
||||||
byId.setApprovalOfTime(LocalDateTime.now());
|
request.setApprovalOfTime(LocalDateTime.now());
|
||||||
if (auditAndApproveDto.getApproveResult() == true) {
|
if (auditAndApproveDto.getApproveResult() == true) {
|
||||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(new LambdaQueryWrapper<DecentralizeDetails>().eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId()));
|
|
||||||
//创建采购清单
|
//创建采购清单
|
||||||
List<PurchaseListDetails> purchaseListDetailsList = purchaseListService.addList(byId.getId(), 0);
|
List<PurchaseListDetails> purchaseListDetailsList = purchaseListService.addList(request.getId(), 0);
|
||||||
|
|
||||||
if (purchaseListDetailsList == null) {
|
if (purchaseListDetailsList == null) {
|
||||||
throw new RuntimeException(String.format("出错了,请及时联系工作人员"));
|
throw new RuntimeException(String.format("出错了,请及时联系工作人员"));
|
||||||
}
|
}
|
||||||
|
request.setStatus(5);
|
||||||
byId.setStatus(5);
|
|
||||||
} else {
|
} else {
|
||||||
byId.setStatus(-5);
|
request.setStatus(-5);
|
||||||
}
|
}
|
||||||
if (this.updateById(byId)) {
|
if (this.updateById(request)) {
|
||||||
return byId;
|
return request;
|
||||||
} else return null;
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -84,9 +84,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
|||||||
@Override//填写评价表并提交
|
@Override//填写评价表并提交
|
||||||
public EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO, DLPUser dlpUser) {
|
public EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO, DLPUser dlpUser) {
|
||||||
|
|
||||||
if (!(StrUtil.isNotBlank(evaluationFormDTO.getContactNumber()) &
|
if (!(StrUtil.isNotBlank(evaluationFormDTO.getSupplierBusinessLicense()) &
|
||||||
StrUtil.isNotBlank(evaluationFormDTO.getContactPerson()) &
|
|
||||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierBusinessLicense()) &
|
|
||||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierPassesQualityAssuranceSystem()) &
|
StrUtil.isNotBlank(evaluationFormDTO.getSupplierPassesQualityAssuranceSystem()) &
|
||||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierProductCertification()) &
|
StrUtil.isNotBlank(evaluationFormDTO.getSupplierProductCertification()) &
|
||||||
StrUtil.isNotBlank(evaluationFormDTO.getCheckAndCalibrateEfficiencyOfSupplies()) &
|
StrUtil.isNotBlank(evaluationFormDTO.getCheckAndCalibrateEfficiencyOfSupplies()) &
|
||||||
@@ -217,12 +215,10 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
|||||||
|
|
||||||
EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(id);
|
EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(id);
|
||||||
|
|
||||||
|
|
||||||
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationForm.getId());
|
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationForm.getId());
|
||||||
|
|
||||||
evaluationForm.setProvideServicesOrSuppliesVOList(voList);
|
evaluationForm.setProvideServicesOrSuppliesVOList(voList);
|
||||||
|
|
||||||
|
|
||||||
return evaluationForm;
|
return evaluationForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+30
-25
@@ -167,6 +167,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
|||||||
purchaseCatalogue.setAuditResult(auditAndApproveDto.getAuditResult());
|
purchaseCatalogue.setAuditResult(auditAndApproveDto.getAuditResult());
|
||||||
purchaseCatalogue.setAuditorId(dlpUser.getId());
|
purchaseCatalogue.setAuditorId(dlpUser.getId());
|
||||||
purchaseCatalogue.setAuditTime(LocalDateTime.now());
|
purchaseCatalogue.setAuditTime(LocalDateTime.now());
|
||||||
|
ArrayList<CatalogueDetails> details = new ArrayList<>();
|
||||||
if (purchaseCatalogue.getAuditResult() == true) {
|
if (purchaseCatalogue.getAuditResult() == true) {
|
||||||
//审核通过后,将采购目录添加的试剂耗材,录入至试剂耗材类
|
//审核通过后,将采购目录添加的试剂耗材,录入至试剂耗材类
|
||||||
List<CatalogueDetails> list = catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery()
|
List<CatalogueDetails> list = catalogueDetailsService.list(Wrappers.<CatalogueDetails>lambdaQuery()
|
||||||
@@ -174,44 +175,48 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
|||||||
|
|
||||||
//目录中的试剂耗材是否存在试剂耗材类中,有则不管,无则添加
|
//目录中的试剂耗材是否存在试剂耗材类中,有则不管,无则添加
|
||||||
for (CatalogueDetails catalogueDetails : list) {
|
for (CatalogueDetails catalogueDetails : list) {
|
||||||
ReagentConsumables reagentConsumable = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
|
ReagentConsumables reagentConsumable = this.checkIsExist(catalogueDetails);
|
||||||
.eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName())
|
|
||||||
.eq("brand", catalogueDetails.getBrand())
|
|
||||||
.eq("category", catalogueDetails.getCategory())
|
|
||||||
.eq("specification_and_model", catalogueDetails.getSpecificationAndModel())
|
|
||||||
.eq("unit_price", catalogueDetails.getUnitPrice())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getStandardValueOrPurity()), "standard_value_or_purity", catalogueDetails.getStandardValueOrPurity())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getCasNumber()), "cas_number", catalogueDetails.getCasNumber())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getSpecies()), "species", catalogueDetails.getSpecies())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getEnglishName()), "english_name", catalogueDetails.getEnglishName())
|
|
||||||
.eq(catalogueDetails.getPackagedCopies() != null, "packaged_copies", catalogueDetails.getPackagedCopies())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getAlias()), "alias", catalogueDetails.getAlias())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getPurityGrade()), "purity_grade", catalogueDetails.getPurityGrade())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getMinimumUnit()), "minimum_unit", catalogueDetails.getMinimumUnit())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getStorageCondition()), "storage_condition", catalogueDetails.getStorageCondition())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getRemark()), "remark", catalogueDetails.getRemark())
|
|
||||||
.eq(StrUtil.isNotBlank(catalogueDetails.getCode()), "code", catalogueDetails.getCode())
|
|
||||||
);
|
|
||||||
|
|
||||||
if (reagentConsumable == null) {
|
if (reagentConsumable == null) {
|
||||||
ReagentConsumables addReagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
ReagentConsumables addReagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||||
catalogueDetails.setReagentConsumableId(addReagentConsumables.getReagentConsumableId());
|
catalogueDetails.setReagentConsumableId(addReagentConsumables.getReagentConsumableId());
|
||||||
catalogueDetailsService.updateById(catalogueDetails);
|
|
||||||
} else {
|
} else {
|
||||||
catalogueDetails.setReagentConsumableId(reagentConsumable.getReagentConsumableId());
|
catalogueDetails.setReagentConsumableId(reagentConsumable.getReagentConsumableId());
|
||||||
catalogueDetailsService.updateById(catalogueDetails);
|
|
||||||
}
|
}
|
||||||
|
details.add(catalogueDetails);
|
||||||
}
|
}
|
||||||
purchaseCatalogue.setStatus(6);
|
catalogueDetailsService.updateBatchById(details);
|
||||||
|
purchaseCatalogue.setStatus(6);//审核通过
|
||||||
} else {
|
} else {
|
||||||
purchaseCatalogue.setStatus(-3);
|
purchaseCatalogue.setStatus(-3);//审核不通过
|
||||||
}
|
}
|
||||||
if (this.updateById(purchaseCatalogue)) {
|
if (this.updateById(purchaseCatalogue)) {
|
||||||
return purchaseCatalogue;
|
return purchaseCatalogue;
|
||||||
} else return null;
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//检查采购目录中的内容是否已经在存在
|
||||||
|
public ReagentConsumables checkIsExist(CatalogueDetails catalogueDetails) {
|
||||||
|
ReagentConsumables reagentConsumable = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
|
||||||
|
.eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName())
|
||||||
|
.eq("brand", catalogueDetails.getBrand())
|
||||||
|
.eq("category", catalogueDetails.getCategory())
|
||||||
|
.eq("specification_and_model", catalogueDetails.getSpecificationAndModel())
|
||||||
|
.eq("unit_price", catalogueDetails.getUnitPrice())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getStandardValueOrPurity()), "standard_value_or_purity", catalogueDetails.getStandardValueOrPurity())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getCasNumber()), "cas_number", catalogueDetails.getCasNumber())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getSpecies()), "species", catalogueDetails.getSpecies())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getEnglishName()), "english_name", catalogueDetails.getEnglishName())
|
||||||
|
.eq(catalogueDetails.getPackagedCopies() != null, "packaged_copies", catalogueDetails.getPackagedCopies())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getAlias()), "alias", catalogueDetails.getAlias())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getPurityGrade()), "purity_grade", catalogueDetails.getPurityGrade())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getMinimumUnit()), "minimum_unit", catalogueDetails.getMinimumUnit())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getStorageCondition()), "storage_condition", catalogueDetails.getStorageCondition())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getRemark()), "remark", catalogueDetails.getRemark())
|
||||||
|
.eq(StrUtil.isNotBlank(catalogueDetails.getCode()), "code", catalogueDetails.getCode()));
|
||||||
|
return reagentConsumable;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
|
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
|
||||||
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueId);
|
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueId);
|
||||||
@@ -225,7 +230,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
|||||||
public List<CatalogueDetails> getList(String name, Integer category) {
|
public List<CatalogueDetails> getList(String name, Integer category) {
|
||||||
List<PurchaseCatalogue> list = this.list(Wrappers.<PurchaseCatalogue>lambdaQuery().eq(PurchaseCatalogue::getStatus, 4)
|
List<PurchaseCatalogue> list = this.list(Wrappers.<PurchaseCatalogue>lambdaQuery().eq(PurchaseCatalogue::getStatus, 4)
|
||||||
.orderByDesc(PurchaseCatalogue::getUpdateTime));
|
.orderByDesc(PurchaseCatalogue::getUpdateTime));
|
||||||
if (list == null & list.size() == 0) {
|
if (list == null ||list.size() == 0) {
|
||||||
throw new RuntimeException(String.format("未存在已发布的采购目录"));
|
throw new RuntimeException(String.format("未存在已发布的采购目录"));
|
||||||
}
|
}
|
||||||
PurchaseCatalogue purchaseCatalogue = list.get(0);
|
PurchaseCatalogue purchaseCatalogue = list.get(0);
|
||||||
|
|||||||
-4
@@ -82,9 +82,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
|||||||
|
|
||||||
@Override//通过ID查找清单
|
@Override//通过ID查找清单
|
||||||
public PurchaseListVO getPurchaseList(String purchaseListId) {
|
public PurchaseListVO getPurchaseList(String purchaseListId) {
|
||||||
|
|
||||||
PurchaseListVO purchaseListVO = new PurchaseListVO();//采购清单VO
|
PurchaseListVO purchaseListVO = new PurchaseListVO();//采购清单VO
|
||||||
|
|
||||||
PurchaseList purchaseList = this.getById(purchaseListId);
|
PurchaseList purchaseList = this.getById(purchaseListId);
|
||||||
List<PurchaseListDetailsVO> purchaseListDetailsVOList = purchaseListDetailsService.getPurchaseListDetailsVOList(purchaseListId);//采购清单明细
|
List<PurchaseListDetailsVO> purchaseListDetailsVOList = purchaseListDetailsService.getPurchaseListDetailsVOList(purchaseListId);//采购清单明细
|
||||||
BeanUtils.copyProperties(purchaseList, purchaseListVO);//拷贝
|
BeanUtils.copyProperties(purchaseList, purchaseListVO);//拷贝
|
||||||
@@ -224,7 +222,6 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
|||||||
purchaseList.setType("分散采购申请");
|
purchaseList.setType("分散采购申请");
|
||||||
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
|
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
decentralizedRequest.setPurchaseListId(purchaseList.getId());
|
decentralizedRequest.setPurchaseListId(purchaseList.getId());
|
||||||
|
|
||||||
ArrayList<PurchaseListDetails> purchaseListDetailsArrayList = new ArrayList<>();
|
ArrayList<PurchaseListDetails> purchaseListDetailsArrayList = new ArrayList<>();
|
||||||
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
||||||
if (StrUtil.isNotBlank(decentralizeDetails.getReagentConsumableId())) {
|
if (StrUtil.isNotBlank(decentralizeDetails.getReagentConsumableId())) {
|
||||||
@@ -255,7 +252,6 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
|||||||
purchaseList.setStatus(0);//状态
|
purchaseList.setStatus(0);//状态
|
||||||
purchaseList.setType("采购计划");//清单类型,区分分散采购申请和采购计划
|
purchaseList.setType("采购计划");//清单类型,区分分散采购申请和采购计划
|
||||||
purchaseList.setCreateBy(purchasingPlan.getCreateBy());//清单创建人
|
purchaseList.setCreateBy(purchasingPlan.getCreateBy());//清单创建人
|
||||||
|
|
||||||
purchasingPlan.setPurchaseListId(purchaseList.getId());//关联采购清单
|
purchasingPlan.setPurchaseListId(purchaseList.getId());//关联采购清单
|
||||||
ArrayList<PurchaseListDetails> purchaseListDetailsArrayList = new ArrayList<>();
|
ArrayList<PurchaseListDetails> purchaseListDetailsArrayList = new ArrayList<>();
|
||||||
|
|
||||||
|
|||||||
+134
-115
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||||
|
import digital.laboratory.platform.reagent.constans.ReagentStatusConstants;
|
||||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||||
import digital.laboratory.platform.reagent.dto.PurchasingPlanDTO;
|
import digital.laboratory.platform.reagent.dto.PurchasingPlanDTO;
|
||||||
import digital.laboratory.platform.reagent.entity.*;
|
import digital.laboratory.platform.reagent.entity.*;
|
||||||
@@ -26,6 +27,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (采购计划)服务实现类
|
* (采购计划)服务实现类
|
||||||
@@ -89,93 +92,131 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
|
|
||||||
List<CentralizedRequest> centralizedRequestList = requestService.list(Wrappers.<CentralizedRequest>query().in("id", idList));
|
List<CentralizedRequest> centralizedRequestList = requestService.list(Wrappers.<CentralizedRequest>query().in("id", idList));
|
||||||
|
|
||||||
List<DetailsOfCentralized> detailsOfCentralizedAllList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (CentralizedRequest centralizedRequest : centralizedRequestList) {
|
|
||||||
List<DetailsOfCentralized> detailsOfCentralizedList = detailsOfCentralizedService.list(Wrappers.<DetailsOfCentralized>query().eq("centralized_request_id", centralizedRequest.getId()));
|
|
||||||
detailsOfCentralizedAllList.addAll(detailsOfCentralizedList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PurchasingPlan purchasingPlan = new PurchasingPlan();//创建采购计划
|
PurchasingPlan purchasingPlan = new PurchasingPlan();//创建采购计划
|
||||||
purchasingPlan.setPurchasingPlanId(IdWorker.get32UUID().toUpperCase());
|
purchasingPlan.setPurchasingPlanId(IdWorker.get32UUID().toUpperCase());
|
||||||
purchasingPlan.setCreateId(user.getId());//创建人ID
|
purchasingPlan.setCreateId(user.getId());//创建人ID
|
||||||
purchasingPlan.setStatus(0);//状态
|
purchasingPlan.setStatus(0);//状态
|
||||||
purchasingPlan.setCreateName(user.getName());//创建人名称
|
purchasingPlan.setCreateName(user.getName());//创建人名称
|
||||||
List<ProcurementContent> list = new ArrayList<>();//需要整合的集合
|
List<ProcurementContent> list = new ArrayList<>();//需要整合的集合
|
||||||
boolean flag = true;
|
List<String> requestIdList = new ArrayList<>();
|
||||||
|
List<DetailsOfCentralized> updateList = new ArrayList<>();
|
||||||
|
//更新采购申请信息
|
||||||
for (DetailsOfCentralized detailsOfCentralized1 : detailsOfCentralizedAllList) {
|
centralizedRequestList.forEach(centralizedRequest -> {
|
||||||
|
requestIdList.add(centralizedRequest.getId());
|
||||||
PurchasingPlanDTO purchasingPlanDTO = new PurchasingPlanDTO();
|
centralizedRequest.setStatus(ReagentStatusConstants.CENTRALIZED_PURCHASING_TO_PLAN.getStatus());
|
||||||
BeanUtils.copyProperties(detailsOfCentralized1, purchasingPlanDTO);
|
|
||||||
purchasingPlanDTO.setDetailsOfCentralizedId(detailsOfCentralized1.getId());
|
|
||||||
//将列入计划的集中采购申请状态变为3
|
|
||||||
CentralizedRequest centralizedRequest = requestService.getById(detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId()).getCentralizedRequestId());
|
|
||||||
centralizedRequest.setStatus(3);
|
|
||||||
centralizedRequest.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());
|
centralizedRequest.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());
|
||||||
requestService.updateById(centralizedRequest);
|
});
|
||||||
|
requestService.updateBatchById(centralizedRequestList);
|
||||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());//集中采购申请明细
|
List<DetailsOfCentralized> detailsOfCentralizeds = detailsOfCentralizedService.list(Wrappers.<DetailsOfCentralized>lambdaQuery().in(DetailsOfCentralized::getCentralizedRequestId, requestIdList));
|
||||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());//试剂耗材信息
|
// boolean flag = true;
|
||||||
|
Map<String, List<DetailsOfCentralized>> map = detailsOfCentralizeds.stream().collect(Collectors.groupingBy(item -> item.getReagentConsumableId()));
|
||||||
flag = true;
|
map.forEach((key, value) -> {
|
||||||
//合并相同的采购内容,若存在相同的采购物品,则无需创建计划明细,将采购申请明细与该计划明细关联即可
|
//证明有重复购买的物品,需要合并
|
||||||
if (list.size() != 0) {
|
if (value.size() > 1) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
ProcurementContent procurementContent = new ProcurementContent();//新建计划明细
|
||||||
if (list.get(i).getReagentConsumableId().equals(purchasingPlanDTO.getReagentConsumableId())) {
|
fillData(procurementContent, value.get(0));
|
||||||
list.get(i).setUnitPrice(reagentConsumables.getUnitPrice());//获取单价
|
|
||||||
//Set采购数量
|
|
||||||
list.get(i).setQuantityPurchased(list.get(i).getQuantityPurchased() + purchasingPlanDTO.getNumberOfApplications());//合并之前的数量加上被合并对象的数量
|
|
||||||
list.get(i).setSubtotal(list.get(i).getQuantityPurchased() * list.get(i).getUnitPrice());//计算小计
|
|
||||||
//添加采购申请明细的采购数量
|
|
||||||
detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());
|
|
||||||
detailsOfCentralized.setProcurementContentId(list.get(i).getProcurementContentId());
|
|
||||||
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
|
||||||
//被合并后,改变flag,进入下一个循环
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//无需合并的采购计划明细
|
|
||||||
if (flag) {
|
|
||||||
ProcurementContent procurementContent = new ProcurementContent();//新建计划明细
|
|
||||||
BeanUtils.copyProperties(purchasingPlanDTO, procurementContent);//拷贝
|
|
||||||
procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
|
||||||
procurementContent.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());//关联计划ID
|
|
||||||
procurementContent.setQuantityPurchased(purchasingPlanDTO.getNumberOfApplications());//赋值采购数量
|
|
||||||
detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());//赋值采购数量
|
|
||||||
procurementContent.setUnitPrice(reagentConsumables.getUnitPrice());//单价
|
|
||||||
procurementContent.setSubtotal(procurementContent.getUnitPrice() * procurementContent.getQuantityPurchased());//小计
|
|
||||||
detailsOfCentralized.setProcurementContentId(procurementContent.getProcurementContentId());//采购申请明细关联采购计划明细
|
|
||||||
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
|
||||||
list.add(procurementContent);//将计划明细添加至集合
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {//对于首次循环,List一定为空,故执行下列语句,且只会执行一次
|
|
||||||
ProcurementContent procurementContent = new ProcurementContent();
|
|
||||||
BeanUtils.copyProperties(purchasingPlanDTO, procurementContent);
|
|
||||||
DetailsOfCentralized byId = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());
|
|
||||||
byId.setQuantityPurchased(byId.getNumberOfApplications());
|
|
||||||
procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
||||||
procurementContent.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());
|
procurementContent.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());//关联计划ID
|
||||||
|
procurementContent.setQuantityPurchased(0);
|
||||||
|
procurementContent.setNumberOfApplications(0);
|
||||||
|
value.forEach(detailsOfCentralized -> {
|
||||||
|
detailsOfCentralized.setProcurementContentId(procurementContent.getProcurementContentId());
|
||||||
|
detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());
|
||||||
|
updateList.add(detailsOfCentralized);
|
||||||
|
procurementContent.setQuantityPurchased(procurementContent.getQuantityPurchased() + detailsOfCentralized.getQuantityPurchased());
|
||||||
|
});
|
||||||
|
procurementContent.setNumberOfApplications(procurementContent.getQuantityPurchased());
|
||||||
|
procurementContent.setSubtotal(procurementContent.getUnitPrice() * procurementContent.getQuantityPurchased());
|
||||||
|
list.add(procurementContent);//将计划明细添加至集合
|
||||||
|
} else {
|
||||||
|
DetailsOfCentralized detailsOfCentralized = value.get(0);
|
||||||
|
ProcurementContent procurementContent = new ProcurementContent();//新建计划明细
|
||||||
|
procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
procurementContent.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());//关联计划ID
|
||||||
|
fillData(procurementContent, detailsOfCentralized);
|
||||||
procurementContent.setQuantityPurchased(procurementContent.getNumberOfApplications());
|
procurementContent.setQuantityPurchased(procurementContent.getNumberOfApplications());
|
||||||
procurementContent.setUnitPrice(reagentConsumables.getUnitPrice());
|
detailsOfCentralized.setProcurementContentId(procurementContent.getProcurementContentId());
|
||||||
procurementContent.setSubtotal(procurementContent.getQuantityPurchased() * procurementContent.getUnitPrice());
|
detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());
|
||||||
byId.setProcurementContentId(procurementContent.getProcurementContentId());
|
procurementContent.setSubtotal(procurementContent.getUnitPrice() * procurementContent.getQuantityPurchased());
|
||||||
detailsOfCentralizedService.updateById(byId);
|
list.add(procurementContent);//将计划明细添加至集合
|
||||||
list.add(procurementContent);
|
updateList.add(detailsOfCentralized);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
// for (DetailsOfCentralized detailsOfCentralized1 : detailsOfCentralizedAllList) {
|
||||||
|
// PurchasingPlanDTO purchasingPlanDTO = new PurchasingPlanDTO();
|
||||||
|
// BeanUtils.copyProperties(detailsOfCentralized1, purchasingPlanDTO);
|
||||||
|
// purchasingPlanDTO.setDetailsOfCentralizedId(detailsOfCentralized1.getId());
|
||||||
|
// //将列入计划的集中采购申请状态变为3
|
||||||
|
// CentralizedRequest centralizedRequest = requestService.getById(detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId()).getCentralizedRequestId());
|
||||||
|
// centralizedRequest.setStatus(3);
|
||||||
|
// centralizedRequest.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());
|
||||||
|
// requestService.updateById(centralizedRequest);
|
||||||
|
//
|
||||||
|
// DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());//集中采购申请明细
|
||||||
|
// ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());//试剂耗材信息
|
||||||
|
//
|
||||||
|
// flag = true;
|
||||||
|
// //合并相同的采购内容,若存在相同的采购物品,则无需创建计划明细,将采购申请明细与该计划明细关联即可
|
||||||
|
// if (list.size() != 0) {
|
||||||
|
// for (int i = 0; i < list.size(); i++) {
|
||||||
|
// if (list.get(i).getReagentConsumableId().equals(purchasingPlanDTO.getReagentConsumableId())) {
|
||||||
|
// list.get(i).setUnitPrice(reagentConsumables.getUnitPrice());//获取单价
|
||||||
|
// //Set采购数量
|
||||||
|
// list.get(i).setQuantityPurchased(list.get(i).getQuantityPurchased() + purchasingPlanDTO.getNumberOfApplications());//合并之前的数量加上被合并对象的数量
|
||||||
|
// list.get(i).setSubtotal(list.get(i).getQuantityPurchased() * list.get(i).getUnitPrice());//计算小计
|
||||||
|
// //添加采购申请明细的采购数量
|
||||||
|
// detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());
|
||||||
|
// detailsOfCentralized.setProcurementContentId(list.get(i).getProcurementContentId());
|
||||||
|
// detailsOfCentralizedService.updateById(detailsOfCentralized);
|
||||||
|
// //被合并后,改变flag,进入下一个循环
|
||||||
|
// flag = false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// //无需合并的采购计划明细
|
||||||
|
// if (flag) {
|
||||||
|
// ProcurementContent procurementContent = new ProcurementContent();//新建计划明细
|
||||||
|
// BeanUtils.copyProperties(purchasingPlanDTO, procurementContent);//拷贝
|
||||||
|
// procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
// procurementContent.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());//关联计划ID
|
||||||
|
// procurementContent.setQuantityPurchased(purchasingPlanDTO.getNumberOfApplications());//赋值采购数量
|
||||||
|
// detailsOfCentralized.setQuantityPurchased(detailsOfCentralized.getNumberOfApplications());//赋值采购数量
|
||||||
|
// procurementContent.setUnitPrice(reagentConsumables.getUnitPrice());//单价
|
||||||
|
// procurementContent.setSubtotal(procurementContent.getUnitPrice() * procurementContent.getQuantityPurchased());//小计
|
||||||
|
// detailsOfCentralized.setProcurementContentId(procurementContent.getProcurementContentId());//采购申请明细关联采购计划明细
|
||||||
|
// detailsOfCentralizedService.updateById(detailsOfCentralized);
|
||||||
|
// list.add(procurementContent);//将计划明细添加至集合
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// } else {//对于首次循环,List一定为空,故执行下列语句,且只会执行一次
|
||||||
|
// ProcurementContent procurementContent = new ProcurementContent();
|
||||||
|
// BeanUtils.copyProperties(purchasingPlanDTO, procurementContent);
|
||||||
|
// DetailsOfCentralized byId = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());
|
||||||
|
// byId.setQuantityPurchased(byId.getNumberOfApplications());
|
||||||
|
// procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
||||||
|
// procurementContent.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());
|
||||||
|
// procurementContent.setQuantityPurchased(procurementContent.getNumberOfApplications());
|
||||||
|
// procurementContent.setUnitPrice(reagentConsumables.getUnitPrice());
|
||||||
|
// procurementContent.setSubtotal(procurementContent.getQuantityPurchased() * procurementContent.getUnitPrice());
|
||||||
|
// byId.setProcurementContentId(procurementContent.getProcurementContentId());
|
||||||
|
// detailsOfCentralizedService.updateById(byId);
|
||||||
|
// list.add(procurementContent);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (this.save(purchasingPlan) & procurementContentService.saveBatch(list)) {
|
if (this.save(purchasingPlan) & procurementContentService.saveBatch(list) && detailsOfCentralizedService.updateBatchById(updateList)) {
|
||||||
calculatedAmount(purchasingPlan.getPurchasingPlanId());//计算经费预算
|
calculatedAmount(purchasingPlan, list);//计算经费预算
|
||||||
PurchasingPlanVO purchasingPlanVO = this.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());//获取VO
|
PurchasingPlanVO purchasingPlanVO = this.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());//获取VO
|
||||||
return purchasingPlanVO;
|
return purchasingPlanVO;
|
||||||
} else throw new RuntimeException(String.format("保存失败"));
|
} else throw new RuntimeException(String.format("保存失败"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void fillData(ProcurementContent procurementContent, DetailsOfCentralized detailsOfCentralized) {
|
||||||
|
BeanUtils.copyProperties(detailsOfCentralized, procurementContent);
|
||||||
|
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());
|
||||||
|
procurementContent.setUnitPrice(reagentConsumables.getUnitPrice());
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override//创建计划
|
@Override//创建计划
|
||||||
public PurchasingPlanVO addById(List<PurchasingPlanDTO> purchasingPlanDTOList, DLPUser user) {
|
public PurchasingPlanVO addById(List<PurchasingPlanDTO> purchasingPlanDTOList, DLPUser user) {
|
||||||
@@ -254,7 +295,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.save(purchasingPlan) & procurementContentService.saveBatch(list)) {
|
if (this.save(purchasingPlan) & procurementContentService.saveBatch(list)) {
|
||||||
calculatedAmount(purchasingPlan.getPurchasingPlanId());//计算经费预算
|
calculatedAmount(purchasingPlan, list);//计算经费预算
|
||||||
PurchasingPlanVO purchasingPlanVO = this.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());//获取VO
|
PurchasingPlanVO purchasingPlanVO = this.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());//获取VO
|
||||||
return purchasingPlanVO;
|
return purchasingPlanVO;
|
||||||
} else throw new RuntimeException(String.format("保存失败"));
|
} else throw new RuntimeException(String.format("保存失败"));
|
||||||
@@ -277,28 +318,19 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
@Override
|
@Override
|
||||||
@Transactional//修改采购计划明细(已废弃)
|
@Transactional//修改采购计划明细(已废弃)
|
||||||
public ProcurementContent editById(PurchasingPlanDTO purchasingPlanDTO) {
|
public ProcurementContent editById(PurchasingPlanDTO purchasingPlanDTO) {
|
||||||
|
//进行修改
|
||||||
ProcurementContent byId = procurementContentService.getById(purchasingPlanDTO.getProcurementContentId());
|
ProcurementContent procurementContent = procurementContentService.getById(purchasingPlanDTO.getProcurementContentId());
|
||||||
|
PurchasingPlan purchasingPlan = this.getById(procurementContent.getPurchasingPlanId());
|
||||||
BeanUtils.copyProperties(purchasingPlanDTO, byId);
|
BeanUtils.copyProperties(purchasingPlanDTO, procurementContent);
|
||||||
|
procurementContent.setSubtotal(procurementContent.getUnitPrice() * procurementContent.getQuantityPurchased());
|
||||||
byId.setSubtotal(byId.getUnitPrice() * byId.getQuantityPurchased());
|
//需要修改采购申请的实际采购数量
|
||||||
|
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getOne(Wrappers.<DetailsOfCentralized>lambdaQuery().eq(DetailsOfCentralized::getProcurementContentId, procurementContent.getProcurementContentId()));
|
||||||
LambdaQueryWrapper<DetailsOfCentralized> detailsOfCentralizedLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
detailsOfCentralized.setQuantityPurchased(procurementContent.getQuantityPurchased());
|
||||||
|
procurementContentService.updateById(procurementContent);
|
||||||
detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getId, byId.getDetailsOfCentralizedId());
|
|
||||||
|
|
||||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getOne(detailsOfCentralizedLambdaQueryWrapper);
|
|
||||||
|
|
||||||
detailsOfCentralized.setQuantityPurchased(byId.getQuantityPurchased());
|
|
||||||
|
|
||||||
procurementContentService.updateById(byId);
|
|
||||||
|
|
||||||
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
||||||
|
//计算修改后的经费
|
||||||
calculatedAmount(byId.getPurchasingPlanId());
|
calculatedAmount(purchasingPlan,procurementContentService.list(Wrappers.<ProcurementContent>lambdaQuery().eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId())));
|
||||||
|
return procurementContent;
|
||||||
return byId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,17 +340,12 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
public ProcurementContent editDetails(PurchasingPlanDTO purchasingPlanDTO) {
|
public ProcurementContent editDetails(PurchasingPlanDTO purchasingPlanDTO) {
|
||||||
|
|
||||||
ProcurementContent procurementContent = procurementContentService.getById(purchasingPlanDTO.getProcurementContentId());//得到计划明细
|
ProcurementContent procurementContent = procurementContentService.getById(purchasingPlanDTO.getProcurementContentId());//得到计划明细
|
||||||
|
|
||||||
procurementContent.setUnitPrice(purchasingPlanDTO.getUnitPrice());//得到修改的明细单价
|
procurementContent.setUnitPrice(purchasingPlanDTO.getUnitPrice());//得到修改的明细单价
|
||||||
|
|
||||||
PurchasingPlan purchasingPlan = this.getById(procurementContent.getPurchasingPlanId());//查询出采购计划
|
PurchasingPlan purchasingPlan = this.getById(procurementContent.getPurchasingPlanId());//查询出采购计划
|
||||||
|
|
||||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());//获取修改的对应的采购申请明细
|
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());//获取修改的对应的采购申请明细
|
||||||
|
|
||||||
if (detailsOfCentralized.getQuantityPurchased() == null) {
|
if (detailsOfCentralized.getQuantityPurchased() == null) {
|
||||||
//原本合并总数量-采购申请明细数量+采购申请明细修改后的数量
|
//原本合并总数量-采购申请明细数量+采购申请明细修改后的数量
|
||||||
procurementContent.setQuantityPurchased(procurementContent.getQuantityPurchased() - detailsOfCentralized.getNumberOfApplications() + purchasingPlanDTO.getQuantityPurchased());
|
procurementContent.setQuantityPurchased(procurementContent.getQuantityPurchased() - detailsOfCentralized.getNumberOfApplications() + purchasingPlanDTO.getQuantityPurchased());
|
||||||
|
|
||||||
} else {//原本合并总数量-采购申请修改后的采购数量+修改数量
|
} else {//原本合并总数量-采购申请修改后的采购数量+修改数量
|
||||||
procurementContent.setQuantityPurchased(procurementContent.getQuantityPurchased() - detailsOfCentralized.getQuantityPurchased() + purchasingPlanDTO.getQuantityPurchased());
|
procurementContent.setQuantityPurchased(procurementContent.getQuantityPurchased() - detailsOfCentralized.getQuantityPurchased() + purchasingPlanDTO.getQuantityPurchased());
|
||||||
}
|
}
|
||||||
@@ -327,7 +354,8 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
detailsOfCentralized.setDetailsRemark(purchasingPlanDTO.getPlanRemark());//修改备注
|
detailsOfCentralized.setDetailsRemark(purchasingPlanDTO.getPlanRemark());//修改备注
|
||||||
|
|
||||||
if (procurementContentService.updateById(procurementContent) && detailsOfCentralizedService.updateById(detailsOfCentralized)) {
|
if (procurementContentService.updateById(procurementContent) && detailsOfCentralizedService.updateById(detailsOfCentralized)) {
|
||||||
calculatedAmount(procurementContent.getPurchasingPlanId());//计算经费预算
|
//计算经费
|
||||||
|
calculatedAmount(purchasingPlan,procurementContentService.list(Wrappers.<ProcurementContent>lambdaQuery().eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId())));
|
||||||
return procurementContent;
|
return procurementContent;
|
||||||
} else throw new RuntimeException(String.format("修改失败"));
|
} else throw new RuntimeException(String.format("修改失败"));
|
||||||
}
|
}
|
||||||
@@ -347,14 +375,13 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
|
|
||||||
if (this.getById(procurementContent.getPurchasingPlanId()).getStatus() == 0
|
if (this.getById(procurementContent.getPurchasingPlanId()).getStatus() == 0
|
||||||
&& detailsOfCentralizedService.updateBatchById(list) && procurementContentService.removeById(procurementContentId)) {
|
&& detailsOfCentralizedService.updateBatchById(list) && procurementContentService.removeById(procurementContentId)) {
|
||||||
|
|
||||||
List<ProcurementContent> procurementContentList = procurementContentService.list(Wrappers.<ProcurementContent>query().eq("purchasing_plan_id", purchasingPlan.getPurchasingPlanId()));
|
List<ProcurementContent> procurementContentList = procurementContentService.list(Wrappers.<ProcurementContent>query().eq("purchasing_plan_id", purchasingPlan.getPurchasingPlanId()));
|
||||||
//如果采购计划的明细全部被删除,则自动删除这个采购计划
|
//如果采购计划的明细全部被删除,则自动删除这个采购计划
|
||||||
if (procurementContentList.size() == 0) {
|
if (procurementContentList.size() == 0) {
|
||||||
this.removeById(purchasingPlan);
|
this.removeById(purchasingPlan);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
calculatedAmount(procurementContent.getPurchasingPlanId());//计算经费预算
|
calculatedAmount(purchasingPlan,procurementContentService.list(Wrappers.<ProcurementContent>lambdaQuery().eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId())));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
@@ -446,7 +473,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
purchasingPlan.setStatus(1);
|
purchasingPlan.setStatus(1);
|
||||||
purchasingPlan.setCommitTime(LocalDateTime.now());//
|
purchasingPlan.setCommitTime(LocalDateTime.now());//
|
||||||
if (this.updateById(purchasingPlan)) {
|
if (this.updateById(purchasingPlan)) {
|
||||||
calculatedAmount(purchasingPlan.getPurchasingPlanId());
|
calculatedAmount(purchasingPlan,procurementContentService.list(Wrappers.<ProcurementContent>lambdaQuery().eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId())));
|
||||||
return purchasingPlan;
|
return purchasingPlan;
|
||||||
} else throw new RuntimeException(String.format("提交失败"));
|
} else throw new RuntimeException(String.format("提交失败"));
|
||||||
|
|
||||||
@@ -508,21 +535,13 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
//计算经费预算方法
|
//计算经费预算方法
|
||||||
public PurchasingPlan calculatedAmount(String purchasingPlanId) {
|
public PurchasingPlan calculatedAmount(PurchasingPlan purchasingPlan, List<ProcurementContent> procurementContentList) {
|
||||||
|
double appropriationBudget = 0d;
|
||||||
PurchasingPlan purchasingPlan = this.getById(purchasingPlanId);//采购计划
|
|
||||||
|
|
||||||
LambdaQueryWrapper<ProcurementContent> procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
procurementContentLambdaQueryWrapper.eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId());
|
|
||||||
List<ProcurementContent> list = procurementContentService.list(procurementContentLambdaQueryWrapper);//这个采购计划内的所有采购计划明细
|
|
||||||
double x = 0;
|
|
||||||
//计算每个采购计划明细的小计(单价*采购数量)
|
//计算每个采购计划明细的小计(单价*采购数量)
|
||||||
for (
|
for (ProcurementContent procurementContent : procurementContentList) {
|
||||||
ProcurementContent procurementContent : list) {
|
appropriationBudget = appropriationBudget + procurementContent.getQuantityPurchased() * procurementContent.getUnitPrice();
|
||||||
x = x + procurementContent.getQuantityPurchased() * procurementContent.getUnitPrice();
|
|
||||||
}
|
}
|
||||||
purchasingPlan.setAppropriationBudget(x);//经费预算
|
purchasingPlan.setAppropriationBudget(appropriationBudget);//经费预算
|
||||||
|
|
||||||
if (this.updateById(purchasingPlan)) {
|
if (this.updateById(purchasingPlan)) {
|
||||||
return purchasingPlan;
|
return purchasingPlan;
|
||||||
} else throw new RuntimeException(String.format("计算失败"));
|
} else throw new RuntimeException(String.format("计算失败"));
|
||||||
|
|||||||
+45
-34
@@ -558,23 +558,29 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) {
|
if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) {
|
||||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
Integer totalQuantity = reagentConsumableInventoryDTO.getTotalQuantity();
|
||||||
referenceMaterial.setReagentConsumableId(oldReagentConsumables.getReagentConsumableId());
|
if (totalQuantity > 1) {
|
||||||
referenceMaterial.setReagentConsumableInventoryId(inventory.getReagentConsumableInventoryId());
|
for (Integer i = 0; i < totalQuantity; i++) {
|
||||||
referenceMaterial.setLocation(location);
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||||
referenceMaterial.setStatus(0);
|
referenceMaterial.setReagentConsumableId(oldReagentConsumables.getReagentConsumableId());
|
||||||
referenceMaterial.setLatticeId(cabinetCell.getId());
|
referenceMaterial.setReagentConsumableInventoryId(inventory.getReagentConsumableInventoryId());
|
||||||
referenceMaterial.setBoxId(cabinetCell.getCabinetId());
|
referenceMaterial.setLocation(location);
|
||||||
String roomNo = reagentConsumableInventoryDTO.getRoomNo();
|
referenceMaterial.setStatus(0);
|
||||||
referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-1");//自动生成编号
|
referenceMaterial.setLatticeId(cabinetCell.getId());
|
||||||
referenceMaterial.setCode(referenceMaterial.getNumber());
|
referenceMaterial.setBoxId(cabinetCell.getCabinetId());
|
||||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
String roomNo = reagentConsumableInventoryDTO.getRoomNo();
|
||||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + i + 1);//自动生成编号
|
||||||
referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName());
|
referenceMaterial.setCode(referenceMaterial.getNumber());
|
||||||
referenceMaterial.setMass(reagentConsumableInventoryDTO.getMass());
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||||
referenceMaterial.setReferenceMaterialUnit(reagentConsumableInventoryDTO.getReferenceMaterialUnit());
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
referenceMaterialService.save(referenceMaterial);
|
referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName());
|
||||||
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
referenceMaterial.setMass(reagentConsumableInventoryDTO.getMass());
|
||||||
|
referenceMaterial.setReferenceMaterialUnit(reagentConsumableInventoryDTO.getReferenceMaterialUnit());
|
||||||
|
referenceMaterialService.save(referenceMaterial);
|
||||||
|
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.updateCabinet(cabinetCell.getId(), oldReagentConsumables.getReagentConsumableId(), 1);
|
this.updateCabinet(cabinetCell.getId(), oldReagentConsumables.getReagentConsumableId(), 1);
|
||||||
|
|
||||||
@@ -616,23 +622,28 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) {
|
if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) {
|
||||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
Integer totalQuantity = reagentConsumableInventoryDTO.getTotalQuantity();
|
||||||
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
if (totalQuantity >= 1) {
|
||||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
for (Integer i = 0; i < totalQuantity; i++) {
|
||||||
referenceMaterial.setLocation(location);
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||||
referenceMaterial.setStatus(0);
|
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||||
referenceMaterial.setLatticeId(cabinetCell.getId());
|
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||||
referenceMaterial.setBoxId(cabinetCell.getCabinetId());
|
referenceMaterial.setLocation(location);
|
||||||
referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName());
|
referenceMaterial.setStatus(0);
|
||||||
String roomNo = reagentConsumableInventoryDTO.getRoomNo();
|
referenceMaterial.setLatticeId(cabinetCell.getId());
|
||||||
referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-1");//自动生成编号
|
referenceMaterial.setBoxId(cabinetCell.getCabinetId());
|
||||||
referenceMaterial.setCode(referenceMaterial.getNumber());
|
String roomNo = reagentConsumableInventoryDTO.getRoomNo();
|
||||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-" + (i + 1));//自动生成编号
|
||||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
referenceMaterial.setCode(referenceMaterial.getNumber());
|
||||||
referenceMaterial.setMass(reagentConsumableInventoryDTO.getMass());
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||||
referenceMaterial.setReferenceMaterialUnit(reagentConsumableInventoryDTO.getReferenceMaterialUnit());
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||||
referenceMaterialService.save(referenceMaterial);
|
referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName());
|
||||||
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
referenceMaterial.setMass(reagentConsumableInventoryDTO.getMass());
|
||||||
|
referenceMaterial.setReferenceMaterialUnit(reagentConsumableInventoryDTO.getReferenceMaterialUnit());
|
||||||
|
referenceMaterialService.save(referenceMaterial);
|
||||||
|
this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1);
|
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1);
|
||||||
}
|
}
|
||||||
|
|||||||
-2
@@ -95,6 +95,4 @@ public class ReferenceMaterialServiceImpl extends ServiceImpl<ReferenceMaterialM
|
|||||||
}
|
}
|
||||||
return prefix + newNo;
|
return prefix + newNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-6
@@ -106,18 +106,22 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
|||||||
}
|
}
|
||||||
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
||||||
if (standardMaterialApplicationDTO.getOutOfUse()) {
|
if (standardMaterialApplicationDTO.getOutOfUse()) {
|
||||||
|
|
||||||
referenceMaterial.setStatus(-4);
|
referenceMaterial.setStatus(-4);
|
||||||
|
|
||||||
if (reagentConsumables.getCategory().equals("标准储备溶液")) {
|
if (reagentConsumables.getCategory().equals("标准储备溶液")) {
|
||||||
|
|
||||||
StandardReserveSolution solution_numbering = standardReserveSolutionService.getOne(Wrappers.<StandardReserveSolution>query().eq("reference_id", referenceMaterial.getId()));
|
StandardReserveSolution solution_numbering = standardReserveSolutionService.getOne(Wrappers.<StandardReserveSolution>query().eq("reference_id", referenceMaterial.getId()));
|
||||||
|
|
||||||
solution_numbering.setStatus(-1);
|
solution_numbering.setStatus(-1);
|
||||||
|
|
||||||
standardReserveSolutionService.updateById(solution_numbering);
|
standardReserveSolutionService.updateById(solution_numbering);
|
||||||
|
BatchDetails byId2 = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||||
|
byId2.setQuantity(byId2.getQuantity() - 1);
|
||||||
|
ReagentConsumableInventory byId1 = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||||
|
byId1.setTotalQuantity(byId1.getTotalQuantity() - 1);
|
||||||
|
if (byId2.getQuantity() > 0) {
|
||||||
|
byId2.setServiceStatus(1);
|
||||||
|
}
|
||||||
|
batchDetailsService.updateById(byId2);
|
||||||
|
reagentConsumableInventoryService.updateById(byId1);
|
||||||
|
reagentConsumableInventoryService.updateCabinet(referenceMaterial.getLatticeId(), referenceMaterial.getId(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (referenceMaterial.getServiceStatus() != null) {
|
if (referenceMaterial.getServiceStatus() != null) {
|
||||||
if (referenceMaterial.getServiceStatus() == -2) {
|
if (referenceMaterial.getServiceStatus() == -2) {
|
||||||
|
|||||||
@@ -60,9 +60,7 @@ public class MaturityCalculation {
|
|||||||
}
|
}
|
||||||
List<StandardReserveSolution> list = standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
List<StandardReserveSolution> list = standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
||||||
.eq("status", 1));
|
.eq("status", 1));
|
||||||
|
|
||||||
for (StandardReserveSolution standardReserveSolution : list) {
|
for (StandardReserveSolution standardReserveSolution : list) {
|
||||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
|
||||||
standardReserveSolutionService.updateById(standardReserveSolution);
|
standardReserveSolutionService.updateById(standardReserveSolution);
|
||||||
}
|
}
|
||||||
periodVerificationPlanService.getPlan();
|
periodVerificationPlanService.getPlan();
|
||||||
@@ -73,10 +71,10 @@ public class MaturityCalculation {
|
|||||||
@Scheduled(cron = "0 0/1 * * * ? ")
|
@Scheduled(cron = "0 0/1 * * * ? ")
|
||||||
public void inventoryReminder() {
|
public void inventoryReminder() {
|
||||||
System.out.println("~~~~~~~~~~~~~~执行检测系统库存情况~~~~~~~~~~~~~~"+ LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy-MM-dd HH:mm:ss"));
|
System.out.println("~~~~~~~~~~~~~~执行检测系统库存情况~~~~~~~~~~~~~~"+ LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy-MM-dd HH:mm:ss"));
|
||||||
List<StandardReserveSolution> list2 = standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
List<StandardReserveSolution> standardReserveSolutions = standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
||||||
.eq("status", 1));
|
.eq("status", 1));
|
||||||
|
|
||||||
for (StandardReserveSolution standardReserveSolution : list2) {
|
for (StandardReserveSolution standardReserveSolution : standardReserveSolutions) {
|
||||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
||||||
if (referenceMaterialServiceById.getStatus() == -4) {
|
if (referenceMaterialServiceById.getStatus() == -4) {
|
||||||
standardReserveSolution.setWarningInformation("已全部使用完毕或已报废");
|
standardReserveSolution.setWarningInformation("已全部使用完毕或已报废");
|
||||||
@@ -99,12 +97,5 @@ public class MaturityCalculation {
|
|||||||
}
|
}
|
||||||
reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
||||||
}
|
}
|
||||||
// List<String> item1 = new ArrayList<>();
|
|
||||||
// item1.add("标准储备溶液");
|
|
||||||
// List<ReagentConsumableInventoryVO> list1 = reagentConsumableInventoryMapper.getRciListByCategory(item1);
|
|
||||||
// for (ReagentConsumableInventory reagentConsumableInventory : list1) {
|
|
||||||
// reagentConsumableInventory.setWarningInformation("无");
|
|
||||||
// reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: root
|
username: dlp
|
||||||
password: 7990016
|
password: 7990016
|
||||||
url: jdbc:mysql://dlp-mysql:3306/dlp_reagent_managment?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://dlp-mysql:3306/dlp_reagent_managment?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ spring:
|
|||||||
|
|
||||||
# 文件上传相关 支持阿里云、华为云、腾讯、minio
|
# 文件上传相关 支持阿里云、华为云、腾讯、minio
|
||||||
oss:
|
oss:
|
||||||
endpoint: http://127.0.0.1:9000
|
endpoint: http://192.168.9.74:9000
|
||||||
accessKey: dlp
|
accessKey: dlp
|
||||||
secretKey: 87990016
|
secretKey: 87990016
|
||||||
bucket-name: dlpfiles
|
bucket-name: dlpfiles
|
||||||
|
|||||||
@@ -36,6 +36,29 @@
|
|||||||
<result property="createName" column="create_name"></result>
|
<result property="createName" column="create_name"></result>
|
||||||
<result property="department" column="department"></result>
|
<result property="department" column="department"></result>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- <resultMap id="procurmentContenVO" type="digital.laboratory.platform.reagent.vo.ProcurementContentVO">-->
|
||||||
|
<!-- <id property="procurementContentId" column="procurement_content_id"/>-->
|
||||||
|
<!-- <result property="purchasingPlanId" column="purchasing_plan_id"/>-->
|
||||||
|
<!-- <result property="quantityPurchased" column="quantity_purchased"/>-->
|
||||||
|
<!-- <result property="reagentConsumableId" column="reagent_consumable_id"/>-->
|
||||||
|
<!-- <result property="subtotal" column="subtotal"/>-->
|
||||||
|
<!-- <result property="unitPrice" column="unit_price"/>-->
|
||||||
|
<!-- <result property="createTime" column="create_time"/>-->
|
||||||
|
<!-- <result property="updateTime" column="update_time"/>-->
|
||||||
|
<!-- <result property="createBy" column="create_by"/>-->
|
||||||
|
<!-- <result property="updateBy" column="update_by"/>-->
|
||||||
|
<!-- <result property="detailsOfCentralizedId" column="details_of_centralized_id"/>-->
|
||||||
|
<!-- <result property="replacementReagentConsumableId" column="replacement_reagent_consumable_id"/>-->
|
||||||
|
<!-- <result property="replacementQuantity" column="replacement_quantity"/>-->
|
||||||
|
<!-- <result property="replacementPrice" column="replacement_price"/>-->
|
||||||
|
<!-- <result property="numberOfApplications" column="number_of_applications"/>-->
|
||||||
|
<!-- <result property="planRemark" column="plan_remark"/>-->
|
||||||
|
<!-- <result property="replacementRemark" column="replacement_remark"/>-->
|
||||||
|
<!-- <result property="supplierId" column="supplier_id"/>-->
|
||||||
|
<!-- <result property="reagentConsumableName" column="reagent_consumable_name"></result>-->
|
||||||
|
<!-- <result property="replacementReagentConsumableName" column="replacement_reagent_consumable_name"></result>-->
|
||||||
|
<!-- </resultMap>-->
|
||||||
|
|
||||||
<sql id="getPurchasingPlanVOSQL">
|
<sql id="getPurchasingPlanVOSQL">
|
||||||
SELECT pp.*,
|
SELECT pp.*,
|
||||||
|
|||||||
@@ -111,12 +111,12 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
and rm.reagent_consumable_name like concat('%',#{keywords},'%')
|
and rm.reagent_consumable_name like concat('%',#{keywords},'%')
|
||||||
or rm.remark like like concat('%',#{keywords},'%')
|
or rm.remark like concat('%',#{keywords},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserList" resultType="digital.laboratory.platform.reagent.vo.UserVO">
|
<select id="getUserList" resultType="digital.laboratory.platform.reagent.vo.UserVO">
|
||||||
SELECT user.name, user.user_id
|
SELECT user.name, user.user_id11
|
||||||
FROM dlp_base.sys_user user ,dlp_base. b_staff s1
|
FROM dlp_base.sys_user user ,dlp_base. b_staff s1
|
||||||
WHERE s1.user_id = user.user_id
|
WHERE s1.user_id = user.user_id
|
||||||
<if test="name !=null and name !=''">
|
<if test="name !=null and name !=''">
|
||||||
|
|||||||
Reference in New Issue
Block a user