5.23修改了一些bug

main
杨海航 2 years ago
parent d4651461e0
commit cc3d35b8ed
  1. 4
      src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java
  2. 59
      src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java
  3. 2
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  4. 60
      src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java
  5. 42
      src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java
  6. 1
      src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java
  7. 39
      src/main/java/digital/laboratory/platform/reagent/entity/PurchaseCatalogue.java
  8. 3
      src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java
  9. 9
      src/main/java/digital/laboratory/platform/reagent/mapper/AngleMarkMapper.java
  10. 7
      src/main/java/digital/laboratory/platform/reagent/service/AngleMarkService.java
  11. 1
      src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java
  12. 15
      src/main/java/digital/laboratory/platform/reagent/service/impl/AcceptanceRecordFormServiceImpl.java
  13. 34
      src/main/java/digital/laboratory/platform/reagent/service/impl/AngleMarkServiceImpl.java
  14. 73
      src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java
  15. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java
  16. 9
      src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java
  17. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/DetailsOfCentralizedServiceImpl.java
  18. 5
      src/main/java/digital/laboratory/platform/reagent/service/impl/InstructionBookServiceImpl.java
  19. 80
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java
  20. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java
  21. 4
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  22. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesServiceImpl.java
  23. 10
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReviewAndApproveServiceImpl.java
  24. 12
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java
  25. 5
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java
  26. 4
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardSolutionCurveServiceImpl.java
  27. 4
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java
  28. 27
      src/main/java/digital/laboratory/platform/reagent/utils/MinioProp.java
  29. 64
      src/main/java/digital/laboratory/platform/reagent/utils/MinioUtils.java
  30. 14
      src/main/java/digital/laboratory/platform/reagent/utils/getTime.java
  31. 1
      src/main/java/digital/laboratory/platform/reagent/vo/CatalogueDetailsVO.java
  32. 3
      src/main/java/digital/laboratory/platform/reagent/vo/OutgoingContentsVO.java
  33. 7
      src/main/java/digital/laboratory/platform/reagent/vo/PurchaseCatalogueVO.java
  34. 29
      src/main/resources/mapper/PurchaseCatalogueMapper.xml
  35. 1
      src/main/resources/mapper/ReferenceMaterialMapper.xml

@ -93,6 +93,8 @@ public class FixedValueReportController {
fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase());
fixedValueReport.setFixedResult(fixedResult);
fixedValueReport.setReferenceSubstanceId(id);
byId.setFixedResult(fixedResult);
referenceMaterialService.updateById(byId);
String fileNames = path + "/" + fileName;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
@ -106,6 +108,8 @@ public class FixedValueReportController {
fixedValueReport1.setFixedValueReport(fileName);
fixedValueReport1.setFixedResult(fixedResult);
String fileNames = path + "/" + fileName;
byId.setFixedResult(fixedResult);
referenceMaterialService.updateById(byId);
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());

@ -92,7 +92,7 @@ public class PurchaseCatalogueController {
@ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细")
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')")
public R<List<CatalogueDetails>> getPurchaseCataloguePage(String name,HttpServletRequest theHttpServletRequest) {
public R<List<CatalogueDetails>> getPurchaseCataloguePage(String name, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -113,7 +113,7 @@ public class PurchaseCatalogueController {
@ApiOperation(value = "分页查询制定编辑的采购目录", notes = "分页查询制定编辑的采购目录")
@GetMapping("/pages")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')")
public R<IPage<PurchaseCatalogueVO>> getPurchaseCatalogueVOPage(Page<PurchaseCatalogue> page,@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
public R<IPage<PurchaseCatalogueVO>> getPurchaseCatalogueVOPage(Page<PurchaseCatalogue> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
IPage<PurchaseCatalogueVO> purchaseCatalogueVOPage = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.<PurchaseCatalogue>query().orderByDesc("create_time"));
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -314,10 +314,10 @@ public class PurchaseCatalogueController {
* @param auditAndApproveDto
* @return R
*/
@ApiOperation(value = "一级审核采购目录", notes = "一级审核采购目录")
@SysLog("一级审核采购目录")
@PutMapping("/primary/audit")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_primary')")
@ApiOperation(value = "审核采购目录", notes = "审核采购目录")
@SysLog("审核采购目录")
@PutMapping("/audit")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_audit')")
public R<PurchaseCatalogue> primaryAuditCatalogue(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -333,30 +333,6 @@ public class PurchaseCatalogueController {
}
}
/**
* 审核采购目录
*
* @param auditAndApproveDto
* @return R
*/
@ApiOperation(value = "二级审核采购目录", notes = "二级审核采购目录")
@SysLog("二级审核采购目录")
@PutMapping("/secondary/audit")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_secondary')")
public R<PurchaseCatalogue> secondaryAuditCatalogue(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.secondaryAuditCatalogue(auditAndApproveDto, dlpUser);
if (purchaseCatalogue != null) {
return R.ok(purchaseCatalogue, "审核成功");
} else {
return R.failed("审核失败");
}
}
/**
* 发布采购目录
@ -368,7 +344,7 @@ public class PurchaseCatalogueController {
@SysLog("发布采购目录")
@PutMapping("/release")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')")
public R<PurchaseCatalogue> releaseById( String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
public R<PurchaseCatalogue> releaseById(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.releaseCatalogue(purchaseCatalogueId);
@ -390,7 +366,7 @@ public class PurchaseCatalogueController {
@SysLog("导入采购目录")
@PostMapping("/import")
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_import')")
public R<PurchaseCatalogue> getImport( @RequestBody List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) {
public R<PurchaseCatalogue> getImport(@RequestBody List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) {
PurchaseCatalogueVO anImport = purchaseCatalogueService.getImport(purchaseCatalogueDTOList);
@ -402,7 +378,6 @@ public class PurchaseCatalogueController {
* 采购目录打印
*
* @param purchaseCatalogueId
*
* @return
*/
@ApiOperation(value = "采购目录打印", notes = "采购目录打印")
@ -424,12 +399,12 @@ public class PurchaseCatalogueController {
String id = IdWorker.get32UUID().toUpperCase();
String applyFileName = "采购目录-"+id;
String applyFileName = "采购目录-" + id;
String pdfFilePath = "document" + "/"+"purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf";
String pdfFilePath = "document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf";
try {
//直接调用pdf方法
purchaseCatalogueTablePDF(purchaseCatalogueVO,id,theHttpServletRequest,httpServletResponse);
purchaseCatalogueTablePDF(purchaseCatalogueVO, id, theHttpServletRequest, httpServletResponse);
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
httpServletResponse.setContentType(applyFileName);
} catch (Exception e) {
@ -447,7 +422,7 @@ public class PurchaseCatalogueController {
//-----------------------------
// 生成 word 版本的 采购目录
String applyFileName = "采购目录-"+id;
String applyFileName = "采购目录-" + id;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ossFile.fileGet("template" + "/" + "试剂耗材集中采购目录模板.docx", bos);
@ -467,11 +442,11 @@ public class PurchaseCatalogueController {
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
new HashMap<String, Object>() {{
put("voList", voList);
put("id",purchaseCatalogueVO.getPurchaseCatalogueId());
put("size",1);
put("secondaryAuditorName",purchaseCatalogueVO.getSecondaryAuditorName());
put("auditTimeOfSecondary", LocalDateTimeUtil.format(purchaseCatalogueVO.getAuditTimeOfSecondary(), "yyyy年MM月dd日 "));
put("name",LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy年")+"~"+LocalDateTimeUtil.format(LocalDateTime.now().plusYears(1),"yyyy年"));
put("id", purchaseCatalogueVO.getPurchaseCatalogueId());
put("size", 1);
put("secondaryAuditorName", purchaseCatalogueVO.getAuditorName());
put("auditTimeOfSecondary", LocalDateTimeUtil.format(purchaseCatalogueVO.getAuditTime(), "yyyy年MM月dd日 "));
put("name", LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy年") + "~" + LocalDateTimeUtil.format(LocalDateTime.now().plusYears(1), "yyyy年"));
}}
);
bis.close();

@ -105,6 +105,7 @@ public class ReagentConsumableInventoryController {
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
@GetMapping("/standardList")
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
@ -159,7 +160,6 @@ public class ReagentConsumableInventoryController {
return R.ok(allRM);
}
/**
* 分页查询
*

@ -42,7 +42,7 @@ import java.util.List;
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (标准储备溶液配制及使用记录表) 前端控制器
*
* <p>
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
@ -52,7 +52,7 @@ import java.util.List;
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/standard_reserve_solution" )
@RequestMapping("/standard_reserve_solution")
@Api(value = "standard_reserve_solution", tags = "(标准储备溶液配制及使用记录表)管理")
public class StandardReserveSolutionController {
@ -62,12 +62,13 @@ public class StandardReserveSolutionController {
/**
* 通过id查询(标准储备溶液配制及使用记录表)
*
* @param id id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping( )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
@GetMapping()
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')")
public R<StandardReserveSolutionVO> getById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -79,21 +80,22 @@ public class StandardReserveSolutionController {
/**
* 分页查询
*
* @param page 分页对象
* @param solutionName (标准储备溶液配制及使用记录表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_page')" )
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, String solutionName, @DateTimeFormat(pattern = "yyyy-MM-dd")@JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd")@JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime , HttpServletRequest theHttpServletRequest) throws ParseException {
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_page')")
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, String solutionName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) throws ParseException {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StandardReserveSolutionVO> standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page,Wrappers.<StandardReserveSolution>query()
.like(StrUtil.isNotBlank(solutionName),"solution_name",solutionName)
.ge(startTime!=null,"create_time",startTime)
.le(endTime!=null,"create_time",endTime)
IPage<StandardReserveSolutionVO> standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page, Wrappers.<StandardReserveSolution>query()
.like(StrUtil.isNotBlank(solutionName), "solution_name", solutionName)
.ge(startTime != null, "create_time", startTime)
.le(endTime != null, "create_time", endTime)
.orderByDesc("create_time"));
return R.ok(standardReserveSolutionSList);
// return R.ok(standardReserveSolutionService.page(page, Wrappers.query(standardReserveSolution)));
@ -102,51 +104,54 @@ public class StandardReserveSolutionController {
/**
* 新增(标准储备溶液配制及使用记录表)
*
* @param standardReserveSolutionDTO (标准储备溶液配制及使用记录表)
* @return R
*/
@ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)")
@SysLog("新增(标准储备溶液配制及使用记录表)" )
@SysLog("新增(标准储备溶液配制及使用记录表)")
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')")
public R<StandardReserveSolutionVO> postAddObject(@RequestBody StandardReserveSolutionDTO standardReserveSolutionDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardReserveSolutionVO standardReserveSolutionVO = standardReserveSolutionService.addById(standardReserveSolutionDTO, dlpUser);
if (standardReserveSolutionVO!=null){
return R.ok(standardReserveSolutionVO,"配置成功");
}else return R.failed("配置失败");
if (standardReserveSolutionVO != null) {
return R.ok(standardReserveSolutionVO, "配置成功");
} else return R.failed("配置失败");
}
/**
* 新增(标准储备溶液配制及使用记录表)
*
* @return R
*/
@ApiOperation(value = "入库(标准储备溶液配制及使用记录表)", notes = "入库(标准储备溶液配制及使用记录表)")
@SysLog("入库(标准储备溶液配制及使用记录表)" )
@SysLog("入库(标准储备溶液配制及使用记录表)")
@PostMapping("warehousing")
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_warehousing')" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_warehousing')")
public R<StandardReserveSolutionFullVO> warehousingById(@RequestBody StandardReserveSolutionFullDTO standardReserveSolutionFullDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardReserveSolutionFullVO standardReserveSolutionFullVO = standardReserveSolutionService.warehousingById(standardReserveSolutionFullDTO);
if (standardReserveSolutionFullVO!=null){
return R.ok(standardReserveSolutionFullVO,"入库成功");
}else return R.failed("入库失败");
if (standardReserveSolutionFullVO != null) {
return R.ok(standardReserveSolutionFullVO, "入库成功");
} else return R.failed("入库失败");
}
/**
* 通过id查询(标准储备溶液配制及使用记录表)
*
* @param id id
* @return R
*/
@ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录")
@GetMapping( "/full")
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')" )
@GetMapping("/full")
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')")
public R<StandardReserveSolutionVO> getFullVOById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -162,7 +167,6 @@ public class StandardReserveSolutionController {
* 标准储备溶液配制及使用记录表打印
*
* @param id
*
* @return
*/
@ApiOperation(value = "标准储备溶液配制及使用记录表打印", notes = "标准储备溶液配制及使用记录表打印")
@ -178,17 +182,17 @@ public class StandardReserveSolutionController {
List<SolutionUseFormVO> voList = standardReserveSolutionVOById.getSolutionUseFormVOList();
if (voList.isEmpty()){
if (voList.isEmpty()) {
throw new RuntimeException(String.format("未查询到使用记录,无法打印"));
}
String applyFileName = "标准储备溶液配制及使用记录表-"+id;
String applyFileName = "标准储备溶液配制及使用记录表-" + id;
String pdfFilePath = "document" + "/"+"standardReserveSolution" + "/" + id + "/" + applyFileName + ".pdf";
String pdfFilePath = "document" + "/" + "standardReserveSolution" + "/" + id + "/" + applyFileName + ".pdf";
try {
//直接调用pdf方法
standardReserveSolutionService.standardReserveSolutionTablePDF(standardReserveSolutionVOById,theHttpServletRequest,httpServletResponse);
standardReserveSolutionService.standardReserveSolutionTablePDF(standardReserveSolutionVOById, theHttpServletRequest, httpServletResponse);
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
httpServletResponse.setContentType(applyFileName);
} catch (Exception e) {

@ -0,0 +1,42 @@
package digital.laboratory.platform.reagent.entity;
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AngleMark {
@ApiModelProperty(value="审核审批角标")
private Integer reviewAndApproveMark;
@ApiModelProperty(value="采购清单角标")
private Integer purchaseListMark;
@ApiModelProperty(value="入库角标")
private Integer warehousingMark;
@ApiModelProperty(value="标准储备溶液入库角标")
private Integer storageOfSolutionMark;
@ApiModelProperty(value="采购入库角标")
private Integer purchaseWarehousingMark;
@ApiModelProperty(value="归还任务角标")
private Integer returnMark;
@ApiModelProperty(value="符合性检查角标")
private Integer complianceCheckMark;
@ApiModelProperty(value="验收任务角标")
private Integer acceptanceMark;
@ApiModelProperty(value="期间核查记录角标")
private Integer periodVerificationMark;
@ApiModelProperty(value="出库任务角标")
private Integer deliveryMark;
@ApiModelProperty(value="采购目录角标")
private Integer purchaseCatalogueMark;
}

@ -68,7 +68,6 @@ public class CentralizedRequest extends BaseEntity {
private LocalDateTime auditTime;
/**
* centralizedRequestId
*/

@ -27,38 +27,23 @@ public class PurchaseCatalogue extends BaseEntity {
/**
* (一级审核意见)
*/
@ApiModelProperty(value="一级审核意见")
private String auditOpinionOfPrimary;
@ApiModelProperty(value="审核意见")
private String auditOpinion;
/**
* (二级审核意见)
*/
@ApiModelProperty(value="二级审核意见")
private String auditOpinionOfSecondary;
/**
* (一级审核结果)
*/
@ApiModelProperty(value="一级审核结果")
private Boolean auditResultOfPrimary;
/**
* (技术负责人审核结果)
*/
@ApiModelProperty(value="二级审核结果")
private Boolean auditResultOfSecondary;
@ApiModelProperty(value="审核结果")
private Boolean auditResult;
/**
* (一级审核时间)
*/
@ApiModelProperty(value="一级审核时间")
private LocalDateTime auditTimeOfPrimary;
@ApiModelProperty(value="审核时间")
private LocalDateTime auditTime;
/**
* (二级审核时间)
*/
@ApiModelProperty(value="二级审核时间")
private LocalDateTime auditTimeOfSecondary;
@ApiModelProperty(value="提交时间")
private LocalDateTime commitTime;
@ -66,8 +51,8 @@ public class PurchaseCatalogue extends BaseEntity {
/**
* (一级审核人ID)
*/
@ApiModelProperty(value="一级审核人ID")
private String primaryAuditorId;
@ApiModelProperty(value="审核人ID")
private String auditorId;
/**
* 发布日期
@ -82,12 +67,6 @@ public class PurchaseCatalogue extends BaseEntity {
private Integer status;
/**
* (二级审核人ID)
*/
@ApiModelProperty(value="二级审核人ID")
private String secondaryAuditorId;
/**
* (编号)
*/

@ -28,6 +28,9 @@ public class ReferenceMaterial extends BaseEntity {
@ApiModelProperty(value="标准物质编号")
private String number;
@ApiModelProperty(value="定值结果")
private String fixedResult;
@ApiModelProperty(value="打印序列号")
private String code;
/**

@ -0,0 +1,9 @@
package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import digital.laboratory.platform.reagent.entity.AngleMark;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AngleMarkMapper extends BaseMapper<AngleMark> {
}

@ -0,0 +1,7 @@
package digital.laboratory.platform.reagent.service;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.reagent.entity.AngleMark;
public interface AngleMarkService extends IService<AngleMark> {
}

@ -39,7 +39,6 @@ public interface PurchaseCatalogueService extends IService<PurchaseCatalogue> {
PurchaseCatalogue primaryAuditCatalogue (AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser);
PurchaseCatalogue secondaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser);
PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId);

@ -73,6 +73,21 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
if (byId.getStatus() != 0) {
throw new RuntimeException(String.format("当前状态不能提交"));
}
if (byId.getStatus() == -3|byId.getStatus()==-4) {
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(byId.getReagentConsumableId(), byId.getSupplierId());
BeanUtils.copyProperties(acceptanceRecordFormDTO,acceptanceRecordForm);
acceptanceRecordForm.setUserName(dlpUser.getName());
acceptanceRecordForm.setCommitTime(LocalDateTime.now());
acceptanceRecordForm.setStatus(1);
acceptanceRecordForm.setDateOfAcceptance(LocalDateTime.now());
if (acceptanceRecordFormService.updateById(acceptanceRecordForm)) {
return acceptanceRecordForm;
} else {
throw new RuntimeException(String.format("重新提交失败"));
}
}
BeanUtils.copyProperties(acceptanceRecordFormDTO, byId);
byId.setUserName(dlpUser.getName());

@ -0,0 +1,34 @@
package digital.laboratory.platform.reagent.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.entity.AngleMark;
import digital.laboratory.platform.reagent.mapper.AngleMarkMapper;
import digital.laboratory.platform.reagent.service.*;
import org.springframework.stereotype.Service;
@Service
public class AngleMarkServiceImpl extends ServiceImpl<AngleMarkMapper, AngleMark> implements AngleMarkService {
private ReviewAndApproveService reviewAndApproveService;
private PurchaseListService purchaseListService;
private WarehousingContentService warehousingContentService;
private AcceptanceRecordFormService acceptanceRecordFormService;
private ComplianceCheckService complianceCheckService;
private PeriodVerificationImplementationService periodVerificationImplementationService;
private DeliveryRegistrationFormService deliveryRegistrationFormService;
private PurchaseCatalogueService purchaseCatalogueService;
public AngleMark getMark() {
return null;
}
}

@ -79,9 +79,10 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
@Autowired
private RemoteWord2PDFService remoteWord2PDFService;
@Transactional
@Override//增加集中采购申请
public CentralizedRequest addRequest( List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
public CentralizedRequest addRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
CentralizedRequest centralizedRequest = new CentralizedRequest();
@ -108,16 +109,16 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
detailsOfCentralizedList.add(detailsOfCentralized);
}
if (centralizedRequestService.save(centralizedRequest)&&detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)){
if (centralizedRequestService.save(centralizedRequest) && detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
return centralizedRequest;
}else return null;
} else return null;
}
@Override//提交申请
public CentralizedRequest commitRequest(List<CentralizedRequestDTO> centralizedRequestDTOList,DLPUser dlpUser) {
public CentralizedRequest commitRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
if (centralizedRequestDTOList.get(0).getCentralizedRequestId()==null){
if (centralizedRequestDTOList.get(0).getCentralizedRequestId() == null) {
CentralizedRequest centralizedRequest = centralizedRequestService.addRequest(centralizedRequestDTOList, dlpUser);
@ -125,10 +126,10 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
centralizedRequest.setStatus(1);
if (centralizedRequestService.updateById(centralizedRequest)){
if (centralizedRequestService.updateById(centralizedRequest)) {
return centralizedRequest;
}else return null;
}else {
} else return null;
} else {
CentralizedRequest byId = centralizedRequestService.getById(centralizedRequestDTOList.get(0).getCentralizedRequestId());
@ -136,14 +137,13 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
byId.setStatus(1);
if (centralizedRequestService.updateById(byId)){
if (centralizedRequestService.updateById(byId)) {
return byId;
}else return null;
} else return null;
}
}
@Override//修改申请
public DetailsOfCentralized editDetailsById(CentralizedRequestDTO centralizedRequestDto) {
@ -151,9 +151,9 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
BeanUtils.copyProperties(centralizedRequestDto, detailsOfCentralized);
if (detailsOfCentralizedService.updateById(detailsOfCentralized)){
if (detailsOfCentralizedService.updateById(detailsOfCentralized)) {
return detailsOfCentralized;
}else return null;
} else return null;
}
@ -166,9 +166,9 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
BeanUtils.copyProperties(centralizedRequestDto, detailsOfCentralized);
if (detailsOfCentralizedService.save(detailsOfCentralized)){
if (detailsOfCentralizedService.save(detailsOfCentralized)) {
return detailsOfCentralized;
}else return null;
} else return null;
}
@Override//删除申请
@ -181,7 +181,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
List<DetailsOfCentralized> list = detailsOfCentralizedService.list(detailsOfCentralizedLambdaQueryWrapper);
if (list.size()!=0){
if (list.size() != 0) {
detailsOfCentralizedService.removeBatchByIds(list);
@ -202,7 +202,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
//查询状态为1的采购申请:已提交
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,1);
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus, 1);
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
@ -210,7 +210,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
for (CentralizedRequest centralizedRequest : list) {
CentralizedRequestVO centralizedRequestVO = new CentralizedRequestVO();
BeanUtils.copyProperties(centralizedRequest,centralizedRequestVO);
BeanUtils.copyProperties(centralizedRequest, centralizedRequestVO);
centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestVO.getId()));
centralizedRequestVOArrayList.add(centralizedRequestVO);
}
@ -246,7 +246,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
}
@Override
public CentralizedRequest auditById(AuditAndApproveDTO auditAndApproveDTO,DLPUser dlpUser){
public CentralizedRequest auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
CentralizedRequest byId = centralizedRequestService.getById(auditAndApproveDTO.getUuId());
@ -255,20 +255,21 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
byId.setAuditOpinion(auditAndApproveDTO.getAuditOpinion());
byId.setAuditResult(auditAndApproveDTO.getAuditResult());
if (auditAndApproveDTO.getAuditResult()==true){
if (auditAndApproveDTO.getAuditResult() == true) {
byId.setStatus(2);
} else {
byId.setStatus(-2);
}
else {byId.setStatus(-2);}
if (centralizedRequestService.updateById(byId)){
if (centralizedRequestService.updateById(byId)) {
return byId;
}else throw new RuntimeException(String.format("审核失败"));
} else throw new RuntimeException(String.format("审核失败"));
}
@Override
public List<PurchaseRequestPrintVO> getPurchaseRequestPrintList(String id, String type) {
ArrayList<PurchaseRequestPrintVO> purchaseRequestPrintVOList = new ArrayList<>();
if(type.equals("集中采购申请")){
if (type.equals("集中采购申请")) {
CentralizedRequestVO centralizedRequest = centralizedRequestService.getCentralizedRequestVO(id);
@ -279,7 +280,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());
if (reagentConsumables.getCategory().equals("标准物质")){
if (reagentConsumables.getCategory().equals("标准物质")) {
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
purchaseRequestPrintVO.setApplicantName(centralizedRequest.getApplicantName());
@ -291,17 +292,18 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
purchaseRequestPrintVO.setUnitPrice(procurementContentService.getById(detailsOfCentralized.getProcurementContentId()).getUnitPrice());
purchaseRequestPrintVO.setSubtotal(procurementContentService.getById(detailsOfCentralized.getProcurementContentId()).getSubtotal());
purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getOne(Wrappers.<PurchaseListDetails>query().eq("procurement_content_id", detailsOfCentralized.getProcurementContentId())).getSupplierId()).getSupplierName());
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);}
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);
}
}
}else {
} else {
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
for (DecentralizeDetails decentralizeDetails : requestById.getDecentralizeDetailsVOList()) {
if (decentralizeDetails.getCategory().equals("标准物质")){
if (decentralizeDetails.getCategory().equals("标准物质")) {
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
@ -315,11 +317,13 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
//查找出供应商名称
purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getById(decentralizeDetails.getPurchaseListDetailsId()).getSupplierId()).getSupplierName());
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);}
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);
}
}
}
return purchaseRequestPrintVOList;
}
@Override
public void purchaseRequestTablePDF(List<PurchaseRequestPrintVO> voList, String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
System.out.println("purchaseRequestTablePDF.................");
@ -334,7 +338,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
x++;
}
String firstAuditName =null;
String firstAuditName = null;
String secondAuditName = null;
String thirdAuditName = null;
String fourthAuditName = null;
@ -343,7 +347,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
//-----------------------------
// 生成 word 版本的 采购目录
if (type.equals("集中采购申请")){
if (type.equals("集中采购申请")) {
CentralizedRequestVO centralizedRequestVO = centralizedRequestService.getCentralizedRequestVO(id);
PurchasingPlanVO byId = purchasingPlanService.getPurchasingPlanVO(centralizedRequestVO.getPurchasingPlanId());
@ -351,16 +355,15 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
secondAuditName = byId.getCreateName();
thirdAuditName = byId.getPrimaryAuditorName();
fourthAuditName = byId.getApproverName();
commitTime = LocalDateTimeUtil.format(centralizedRequestVO.getDateOfApplication(),"yyyy年MM月dd日");
commitTime = LocalDateTimeUtil.format(centralizedRequestVO.getDateOfApplication(), "yyyy年MM月dd日");
}
else {
} else {
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
firstAuditName = requestById.getPrimaryAuditorName();
secondAuditName = requestById.getSecondaryAuditorName();
thirdAuditName = requestById.getThreeLevelAuditName();
fourthAuditName = requestById.getApproverName();
commitTime = LocalDateTimeUtil.format(requestById.getCommitTime(),"yyyy年MM月dd日");
commitTime = LocalDateTimeUtil.format(requestById.getCommitTime(), "yyyy年MM月dd日");
}
String applyFileName = "标准物质采购申请表-" + id;

@ -141,7 +141,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
if (byId == null) {
if (byId == null|byId.getStatus()==-2) {
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
checkSchedule.setStatus(1);

@ -74,6 +74,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
@Autowired
private StandardReserveSolutionService standardReserveSolutionService;
@Autowired
private SupplierInformationService supplierInformationService;
@Override
@Transactional//创建出库任务
public DeliveryRegistrationForm addFrom(String applicationForUseId) {
@ -416,6 +419,12 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
outgoingContentsVO.setReagentConsumableInventory(one);
BatchDetails byId = batchDetailsService.getById(outgoingContents.getBatchDetailsId());
outgoingContentsVO.setBatch(byId.getBatch());
outgoingContentsVO.setSupplierName(supplierInformationService.getById(byId.getSupplierId()).getSupplierName());
outgoingContentsVOS.add(outgoingContentsVO);
}

@ -48,7 +48,6 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentra
ReagentConsumables byId = reagentConsumablesService.getById(detailsOfCentralizedVO.getReagentConsumableId());
detailsOfCentralizedVO.setBrand(byId.getBrand());
detailsOfCentralizedVO.setCategory(byId.getCategory());
detailsOfCentralizedVO.setSpecificationAndModel(byId.getSpecificationAndModel());

@ -62,8 +62,13 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
public InstructionBookVO getVO(String id){
InstructionBookVO instructionBookVO = baseMapper.getInstructionBookVO(id);
if (instructionBookVO==null){
return null;
}
ReagentConsumables byId = reagentConsumablesService.getById(id);
instructionBookVO.setReagentConsumables(byId);
return instructionBookVO;
}

@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* (采购目录)服务实现类
@ -184,11 +185,18 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
@Transactional
public PurchaseCatalogue commitById(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, DLPUser dlpUser) {
if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) {
Set<String> permissions = dlpUser.getPermissions();
if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId().equals("") | purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) {
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.addCatalogue(dlpUser, purchaseCatalogueDTOList);
if (permissions.contains("reagent_purchase_catalogue_primary")) {
purchaseCatalogue.setStatus(2);
} else {
purchaseCatalogue.setStatus(1);
}
purchaseCatalogue.setCommitTime(LocalDateTime.now());
@ -200,56 +208,35 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId()
);
purchaseCatalogue.setStatus(1);
purchaseCatalogue.setCommitTime(LocalDateTime.now());
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
return purchaseCatalogue;
} else return null;
}
}
@Override//一级审核
public PurchaseCatalogue primaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(auditAndApproveDto.getUuId());
purchaseCatalogue.setAuditOpinionOfPrimary(auditAndApproveDto.getAuditOpinion());
purchaseCatalogue.setAuditResultOfPrimary(auditAndApproveDto.getAuditResult());
if (permissions.contains("reagent_purchase_catalogue_primary")) {
purchaseCatalogue.setPrimaryAuditorId(dlpUser.getId());
purchaseCatalogue.setAuditTimeOfPrimary(LocalDateTime.now());
if (purchaseCatalogue.getAuditResultOfPrimary() == true) {
purchaseCatalogue.setStatus(2);
} else {
purchaseCatalogue.setStatus(-2);
purchaseCatalogue.setStatus(1);
}
purchaseCatalogue.setCommitTime(LocalDateTime.now());
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
return purchaseCatalogue;
} else return null;
}
}
@Override//审核
@Transactional
@Override//二级审核
public PurchaseCatalogue secondaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
public PurchaseCatalogue primaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(auditAndApproveDto.getUuId());
purchaseCatalogue.setAuditOpinionOfSecondary(auditAndApproveDto.getAuditOpinion());
purchaseCatalogue.setAuditResultOfSecondary(auditAndApproveDto.getAuditResult());
purchaseCatalogue.setAuditOpinion(auditAndApproveDto.getAuditOpinion());
purchaseCatalogue.setSecondaryAuditorId(dlpUser.getId());
purchaseCatalogue.setAuditResult(auditAndApproveDto.getAuditResult());
purchaseCatalogue.setAuditTimeOfSecondary(LocalDateTime.now());
purchaseCatalogue.setAuditorId(dlpUser.getId());
if (purchaseCatalogue.getAuditResultOfSecondary() == true) {
purchaseCatalogue.setAuditTime(LocalDateTime.now());
purchaseCatalogue.setStatus(3);
if (purchaseCatalogue.getAuditResult() == true) {
//审核通过后,将采购目录添加的试剂耗材,录入至试剂耗材类
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
@ -261,24 +248,25 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
//目录中的试剂耗材是否存在试剂耗材类中,有则不管,无则添加
for (CatalogueDetails catalogueDetails : list) {
if (catalogueDetails.getReagentConsumableId() == null) {
catalogueDetails.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
catalogueDetailsService.updateById(catalogueDetails);
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
} else {
ReagentConsumables byId = reagentConsumablesService.getById(catalogueDetails.getReagentConsumableId());
if (byId == null) {
ReagentConsumables one = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
.eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName())
.eq("cas_number", catalogueDetails.getCasNumber())
.eq("brand", catalogueDetails.getBrand())
.eq("category", catalogueDetails.getCategory())
.eq("specification_and_model", catalogueDetails.getSpecificationAndModel())
.eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity()));
.eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity())
.eq("cas_number", catalogueDetails.getCasNumber()));
if (one == null) {
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
catalogueDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
catalogueDetailsService.updateById(catalogueDetails);
}else {
catalogueDetails.setReagentConsumableId(one.getReagentConsumableId());
catalogueDetailsService.updateById(catalogueDetails);
}
}
}
}
purchaseCatalogue.setStatus(3);
} else {
purchaseCatalogue.setStatus(-3);
}
@ -288,6 +276,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
} else return null;
}
@Override
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
@ -307,7 +296,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
queryWrapper.eq("status", 4);
QueryWrapper<PurchaseCatalogue> queryWrapper1 = queryWrapper.orderByDesc("create_time");
QueryWrapper<PurchaseCatalogue> queryWrapper1 = queryWrapper.orderByDesc("update_time");
List<PurchaseCatalogue> list = purchaseCatalogueService.list(queryWrapper1);
@ -352,7 +341,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
StrUtil.isNotBlank(purchaseCatalogueDTO.getReagentConsumableName()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecies()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getSpecificationAndModel()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getStandardValueOrPurity()) &
purchaseCatalogueDTO.getUnitPrice() != 0 &
StrUtil.isNotBlank(purchaseCatalogueDTO.getAlias()) &
StrUtil.isNotBlank(purchaseCatalogueDTO.getStorageCondition()) &

@ -509,6 +509,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
purchaseList.setName(DateTime.now() + "采购清单");
purchaseList.setStatus(0);
purchaseList.setType("采购计划");
purchaseList.setCreateBy(purchasingPlan.getCreateBy());
purchaseListService.save(purchaseList);

@ -190,6 +190,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
reagentConsumableInventoryFullVO.setStorageLife(Integer.valueOf(batchDetails.getLimitDate()));
reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult());
if (one1 != null) {
reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration());
@ -249,7 +250,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
}
@Override
public List<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw) {
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
@ -394,7 +394,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
String reagentConsumableName = byId.getReagentConsumableName();
ReferenceMaterialVO referenceMaterial = new ReferenceMaterialVO();
BeanUtils.copyProperties(referenceMaterialServiceById,referenceMaterial);
referenceMaterial.setCodeName(reagentConsumableName+":"+referenceMaterialServiceById.getCode());
referenceMaterial.setCodeName(referenceMaterial.getNumber()+"-"+referenceMaterialServiceById.getCode());
data.put("referenceMaterial", referenceMaterial);
String templateFileName = AppStartupRunner.getCfg( "labelTemplate_standardSubstance");

@ -27,6 +27,8 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumable
BeanUtils.copyProperties(object,reagentConsumables);
reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
if (!(reagentConsumablesService.save(reagentConsumables))){
throw new RuntimeException(String.format("系统错误,试剂耗材目录更新失败"));

@ -441,7 +441,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,3);
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4);
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
@ -554,14 +554,14 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
List<PeriodVerificationImplementationVO> periodVerificationImplementationVOS = new ArrayList<>();
//供应商评价已审核列表
List<EvaluationFormVO> evaluationFormVOS = new ArrayList<>();
List<CentralizedRequestVO> centralizedRequestVOList = new ArrayList<>();
//集中采购申请已审核列表
List<CentralizedRequestVO> centralizedRequestVOList = new ArrayList<>();
if (permissions.contains("reagent_centralized_request_audit")){
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2);
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2).or().eq(CentralizedRequest::getStatus, -2);
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
@ -916,7 +916,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4).or().eq(StandardMaterialApprovalForm::getCommitStatus, -4);
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,5).or().eq(StandardMaterialApprovalForm::getCommitStatus, -5);
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);

@ -78,7 +78,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
standardMaterialApprovalForm.setCommitTime(LocalDateTime.now());
if (standardMaterialApprovalFormDTO.getApplicationContent() == 1 | standardMaterialApprovalFormDTO.getApplicationContent() == 2) {
if (standardMaterialApprovalFormDTO.getApplicationContent() == 1 ) {
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
@ -95,7 +95,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
referenceMaterialService.updateById(byId);
}else if (standardMaterialApprovalFormDTO.getApplicationContent()==5){
}else if (standardMaterialApprovalFormDTO.getApplicationContent()==2){
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
byId.setStatus(-4);
@ -171,9 +171,9 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setSecondaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfSecondary(LocalDateTime.now());
if (auditAndApproveDTO.getAuditResult() == true) {
byId.setCommitStatus(3);
byId.setCommitStatus(4);
} else {
byId.setCommitStatus(-3);
byId.setCommitStatus(-4);
}
if (standardMaterialApprovalFormService.updateById(byId)) {
return byId;
@ -190,9 +190,9 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setApproverId(dlpUser.getId());
byId.setApprovalOfTime(LocalDateTime.now());
if (auditAndApproveDTO.getApproveResult() == true) {
byId.setCommitStatus(4);
byId.setCommitStatus(5);
} else {
byId.setCommitStatus(-4);
byId.setCommitStatus(-5);
}
if (standardMaterialApprovalFormService.updateById(byId)) {
return byId;

@ -23,7 +23,7 @@ import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.*;
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
import feign.Response;
import io.seata.spring.annotation.GlobalTransactional;
//import io.seata.spring.annotation.GlobalTransactional;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -141,7 +141,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
}
@Override//标准储备溶液入库任务
@GlobalTransactional
@Transactional
public IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw) {
IPage<StandardReserveSolutionVO> standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw);
@ -225,6 +225,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date));
referenceMaterial.setLatticeId(latticeId);
referenceMaterial.setLocation(standardReserveSolutionFullDTO.getLocation());
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
referenceMaterial.setBoxId(boxId);
byId.setReferenceId(referenceMaterial.getId());

@ -81,6 +81,10 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
StandardReserveSolution byId = standardReserveSolutionService.getById(standardSolutionCurveDTO.getSolutionId());
if (byId.getStatus()!=1){
throw new RuntimeException(String.format("当前标准储备溶液还未入库,请先入库后再使用"));
}
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceId());
standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase());

@ -23,7 +23,7 @@ import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.*;
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
import feign.Response;
import io.seata.spring.annotation.GlobalTransactional;
//import io.seata.spring.annotation.GlobalTransactional;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -128,7 +128,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
}
@GlobalTransactional
@Transactional
@Override//录入入库明细
public WarehousingRecordFormVO addFormById(List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, DLPUser dlpUser) {

@ -1,27 +0,0 @@
package digital.laboratory.platform.reagent.utils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* minio 属性值
*/
@Data
@Component
@ConfigurationProperties(prefix = "minio")
public class MinioProp {
/**
* 连接url
*/
private String endpoint;
/**
* 用户名
*/
private String accesskey;
/**
* 密码
*/
private String secretKey;
}

@ -1,64 +0,0 @@
//package digital.laboratory.platform.reagent.utils;
//import com.alibaba.fastjson.JSONObject;
//import io.minio.MinioClient;
//import lombok.SneakyThrows;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.web.multipart.MultipartFile;
//
//@Slf4j
//@Component
//public class MinioUtils {
//
// @Autowired
// private MinioClient client;
// @Autowired
// private MinioProp minioProp;
//
// /**
// * 创建bucket
// *
// * @param bucketName bucket名称
// */
// @SneakyThrows
// public void createBucket(String bucketName) {
// if (!client.bucketExists(bucketName)) {
// client.makeBucket(bucketName);
// }
// }
//
// /**
// * 上传文件
// *
// * @param file 文件
// * @param bucketName 存储桶
// * @return
// */
// public JSONObject uploadFile(MultipartFile file, String bucketName) throws Exception {
// JSONObject res = new JSONObject();
// res.put("code", 0);
// // 判断上传文件是否为空
// if (null == file || 0 == file.getSize()) {
// res.put("msg", "上传文件不能为空");
// return res;
// }
// try {
// // 判断存储桶是否存在
// createBucket(bucketName);
// // 文件名
// String originalFilename = file.getOriginalFilename();
// // 新的文件名 = 存储桶名称_时间戳.后缀名
// String fileName = bucketName + "_" + System.currentTimeMillis() + originalFilename.substring(originalFilename.lastIndexOf("."));
// // 开始上传
// client.putObject(bucketName, fileName, file.getInputStream(), file.getContentType());
// res.put("code", 1);
// res.put("msg", minioProp.getEndpoint() + "/" + bucketName + "/" + fileName);
// return res;
// } catch (Exception e) {
// log.error("上传文件失败:{}", e.getMessage());
// }
// res.put("msg", "上传失败");
// return res;
// }
//}

@ -1,14 +0,0 @@
package digital.laboratory.platform.reagent.utils;
import java.text.SimpleDateFormat;
import java.time.LocalTime;
import java.util.Date;
public class getTime {
public static LocalTime getTime(){
LocalTime now = LocalTime.now();
return now;
}}

@ -12,4 +12,5 @@ import lombok.NoArgsConstructor;
public class CatalogueDetailsVO extends CatalogueDetails {
private String reagentConsumableName;
}

@ -14,5 +14,8 @@ public class OutgoingContentsVO extends OutgoingContents {
private ReagentConsumableInventory reagentConsumableInventory;
private Integer batch;
private String supplierName;
}

@ -17,11 +17,8 @@ import java.util.List;
@ApiModel(value = "采购目录VO")
public class PurchaseCatalogueVO extends PurchaseCatalogue {
@ApiModelProperty(value="一级审核人名称")
private String primaryAuditorName;
@ApiModelProperty(value="二级审核人名称")
private String secondaryAuditorName;
@ApiModelProperty(value="审核人名称")
private String auditorName;
private List<CatalogueDetails> catalogueDetailsListList;

@ -6,16 +6,12 @@
<resultMap id="purchaseCatalogueMap" type="digital.laboratory.platform.reagent.entity.PurchaseCatalogue">
<id property="purchaseCatalogueId" column="purchase_catalogue_id"/>
<result property="auditOpinionOfPrimary" column="audit_opinion_of_primary"/>
<result property="auditOpinionOfSecondary" column="audit_opinion_of_secondary"/>
<result property="auditResultOfPrimary" column="auditResult_of_primary"/>
<result property="auditResultOfSecondary" column="audit_result_of_secondary"/>
<result property="auditTimeOfPrimary" column="audit_time_of_primary"/>
<result property="auditTimeOfSecondary" column="audit_time_of_secondary"/>
<result property="primaryAuditorId" column="primary_auditor_id"/>
<result property="auditOpinion" column="audit_opinion"/>
<result property="auditResult" column="audit_result"/>
<result property="auditTime" column="audit_time"/>
<result property="auditorId" column="auditor_id"/>
<result property="releaseDate" column="release_date"/>
<result property="status" column="status"/>
<result property="secondaryAuditorId" column="secondary_auditor_id"/>
<result property="number" column="number"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
@ -28,8 +24,7 @@
<resultMap id="purchaseCatalogueVO" type="digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO"
extends="purchaseCatalogueMap">
<result property="primaryAuditorName" column="primary_auditor_name"/>
<result property="secondaryAuditorName" column="secondary_auditor_name"/>
<result property="auditorName" column="auditor_name"/>
<result property="createName" column="create_name"/>
<result property="department" column="department"/>
</resultMap>
@ -38,12 +33,7 @@
SELECT pc.*,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id = pc.primary_auditor_id) AS primary_auditor_name
, (
SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pc.secondary_auditor_id
) AS secondary_auditor_name
WHERE user.user_id = pc.auditor_id) AS auditor_name
, (
SELECT user.name
FROM dlp_base.sys_user user
@ -62,12 +52,7 @@
SELECT pc.*,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id = pc.primary_auditor_id) AS primary_auditor_name
, (
SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pc.secondary_auditor_id
) AS secondary_auditor_name
WHERE user.user_id = pc.auditor_id) AS auditor_name
, (
SELECT org.name
FROM dlp_base.sys_org org

@ -20,6 +20,7 @@
<result property="custodianName" column="custodian_name"/>
<result property="boxId" column="box_id"/>
<result property="code" column="code"/>
<result property="fixedResult" column="fixed_result"/>
</resultMap>

Loading…
Cancel
Save