增加了批量验收、按批次出库等功能
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
package digital.laboratory.platform.reagent.config;
|
||||
package digital.laboratory.platform.reagent.Interceptor;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
@@ -1,32 +0,0 @@
|
||||
//package digital.laboratory.platform.reagent.config;
|
||||
//
|
||||
//import digital.laboratory.platform.reagent.utils.MinioProp;
|
||||
//import io.minio.MinioClient;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//
|
||||
///**
|
||||
// * minio 核心配置类
|
||||
// */
|
||||
//@Configuration
|
||||
//@EnableConfigurationProperties(MinioProp.class)
|
||||
//public class MinioConfig {
|
||||
//
|
||||
// @Autowired
|
||||
// private MinioProp minioProp;
|
||||
//
|
||||
// /**
|
||||
// * 获取 MinioClient
|
||||
// *
|
||||
// * @return
|
||||
// * @throws InvalidPortException
|
||||
// * @throws InvalidEndpointException
|
||||
// */
|
||||
// @Bean
|
||||
// public MinioClient minioClient() throws InvalidPortException, InvalidEndpointException {
|
||||
// return new MinioClient(minioProp.getEndpoint(), minioProp.getAccesskey(), minioProp.getSecretKey());
|
||||
// }
|
||||
//}
|
||||
//
|
||||
@@ -1,122 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.config;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.MultiFormatWriter;
|
||||
import com.google.zxing.client.j2se.MatrixToImageWriter;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.oned.Code128Writer;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import org.springframework.util.StringUtils;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class QRCodeUtils {
|
||||
|
||||
|
||||
|
||||
|
||||
//二维码
|
||||
public static BufferedImage genQRCode(String content, int width, int height) {
|
||||
if (!StringUtils.isEmpty(content)) {
|
||||
|
||||
HashMap<EncodeHintType, Comparable> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
try {
|
||||
QRCodeWriter writer = new QRCodeWriter();
|
||||
BitMatrix bitMatrix = writer.encode(content, BarcodeFormat.QR_CODE, width, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
return bufferedImage;
|
||||
} catch (Exception e) {
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//打印条形码
|
||||
public static String getBarCode128ImageBase64(String content, int width, int height) {
|
||||
try {
|
||||
Map<EncodeHintType, Object> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
int realWidth = getBarCode128NoPaddingWidth(width, content, width);
|
||||
|
||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.CODE_128, realWidth, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "png", os);
|
||||
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
String resultImage = new String("data:image/png;base64," + encoder.encode(os.toByteArray()));
|
||||
|
||||
return resultImage;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
private static int getBarCode128NoPaddingWidth(int expectWidth, String contents, int maxWidth) {
|
||||
boolean[] code = new Code128Writer().encode(contents);
|
||||
|
||||
int inputWidth = code.length;
|
||||
|
||||
double outputWidth = (double) Math.max(expectWidth, inputWidth);
|
||||
double multiple = outputWidth / inputWidth;
|
||||
|
||||
//优先取大的
|
||||
int returnVal = 0;
|
||||
int ceil = (int) Math.ceil(multiple);
|
||||
if (inputWidth * ceil <= maxWidth) {
|
||||
returnVal = inputWidth * ceil;
|
||||
} else {
|
||||
int floor = (int) Math.floor(multiple);
|
||||
returnVal = inputWidth * floor;
|
||||
}
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
public static String getBarCode93ImageBase64(String content, int width, int height) {
|
||||
try {
|
||||
Map<EncodeHintType, Object> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
int realWidth = getBarCode128NoPaddingWidth(width, content, width);
|
||||
|
||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.CODE_93, realWidth, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "png", os);
|
||||
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
String resultImage = new String("data:image/png;base64," + encoder.encode(os.toByteArray()));
|
||||
|
||||
return resultImage;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印条码
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class AcceptanceRecordFormController {
|
||||
WarehousingBatchList byId1 = warehousingBatchListService.getById(byId.getWarehousingBatchListId());
|
||||
WarehousingContent byId2 = warehousingContentService.getById(byId1.getWarehousingContentId());
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(byId2.getAcceptanceRecordFormId());
|
||||
if (acceptanceRecordFormVO.getStatus()==4){
|
||||
if (acceptanceRecordFormVO.getStatus() == 6) {
|
||||
return R.ok(acceptanceRecordFormVO);
|
||||
} else return R.failed(null);
|
||||
|
||||
@@ -107,15 +107,17 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "分页查询验收任务", notes = "分页查询验收任务")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_page')")
|
||||
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormPage(Page<AcceptanceRecordForm> page, String reagentConsumableName, @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<AcceptanceRecordFormVO>> getAcceptanceRecordFormPage(Page<AcceptanceRecordForm> page, Integer status, String reagentConsumableName, @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();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.<AcceptanceRecordForm>query()
|
||||
.eq(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.ne("status", 4)
|
||||
.eq(status != null, "status", status)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(acceptanceRecordFormVOPage);
|
||||
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
|
||||
@@ -135,11 +137,8 @@ public class AcceptanceRecordFormController {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
|
||||
|
||||
|
||||
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.<AcceptanceRecordForm>query()
|
||||
.eq(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("status", 4)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
@@ -173,6 +172,26 @@ public class AcceptanceRecordFormController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量验收
|
||||
*
|
||||
* @param acceptanceRecordFormDTOList 批量验收
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "批量验收(验收记录表)", notes = "批量验收(验收记录表)")
|
||||
@SysLog("批量验收")
|
||||
@PutMapping("/culkCommit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')")
|
||||
public R<String> culkCommit(@RequestBody List<AcceptanceRecordFormDTO> acceptanceRecordFormDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
acceptanceRecordFormService.culkCommit(acceptanceRecordFormDTOList, dlpUser);
|
||||
|
||||
return R.ok("批量验收成功");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 一级审核(验收记录表)
|
||||
*
|
||||
|
||||
@@ -9,7 +9,9 @@ import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.dto.ApplicationForUseDTO;
|
||||
import digital.laboratory.platform.reagent.entity.ApplicationForUse;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumablesSet;
|
||||
import digital.laboratory.platform.reagent.service.ApplicationForUseService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesSetService;
|
||||
import digital.laboratory.platform.reagent.vo.ApplicationForUseVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -45,6 +47,8 @@ public class ApplicationForUseController {
|
||||
|
||||
private final ApplicationForUseService applicationForUseService;
|
||||
|
||||
private final ReagentConsumablesSetService reagentConsumablesSetService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材领用申请表)
|
||||
*
|
||||
@@ -89,20 +93,20 @@ public class ApplicationForUseController {
|
||||
/**
|
||||
* 新增(试剂耗材领用申请表)
|
||||
*
|
||||
* @param applicationForUseDTOList (试剂耗材领用申请表)
|
||||
* @param applicationForUseDTO (试剂耗材领用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材领用申请表)", notes = "新增(试剂耗材领用申请表)")
|
||||
@SysLog("新增(试剂耗材领用申请表)")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_add')")
|
||||
public R<ApplicationForUseVO> postAddObject(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
public R<ApplicationForUseVO> postAddObject(@RequestBody ApplicationForUseDTO applicationForUseDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ApplicationForUseVO applicationForUse = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser);
|
||||
ApplicationForUseVO applicationForUse = applicationForUseService.addApplication(applicationForUseDTO, dlpUser);
|
||||
|
||||
if (applicationForUse != null) {
|
||||
return R.ok(applicationForUse, "保存成功");
|
||||
@@ -112,25 +116,27 @@ public class ApplicationForUseController {
|
||||
/**
|
||||
* 修改(试剂耗材领用申请表)
|
||||
*
|
||||
* @param applicationForUseDTOList (试剂耗材领用申请表)
|
||||
* @param id (试剂耗材领用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材领用申请表)", notes = "修改(试剂耗材领用申请表)")
|
||||
@SysLog("修改(试剂耗材领用申请表)")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')")
|
||||
public R<ApplicationForUseVO> putUpdateById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
public R<String> putUpdateById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ApplicationForUseVO applicationForUse = applicationForUseService.editApplication(applicationForUseDTOList, dlpUser);
|
||||
ReagentConsumablesSet byId = reagentConsumablesSetService.getById(id);
|
||||
|
||||
if ( reagentConsumablesSetService.updateById(byId)){
|
||||
return R.ok("修改成功");
|
||||
}else {
|
||||
return R.failed("修改失败");
|
||||
}}
|
||||
|
||||
if (applicationForUse != null) {
|
||||
return R.ok(applicationForUse, "修改成功");
|
||||
} else return R.failed("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材领用申请表)
|
||||
@@ -155,20 +161,20 @@ public class ApplicationForUseController {
|
||||
/**
|
||||
* 提交试剂耗材领用申请表
|
||||
*
|
||||
* @param applicationForUseDTOList (试剂耗材领用申请表)
|
||||
* @param id (试剂耗材领用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "提交试剂耗材领用申请表", notes = "提交试剂耗材领用申请表")
|
||||
@SysLog("修改试剂耗材领用申请表")
|
||||
@PostMapping("/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_commit')")
|
||||
public R<ApplicationForUseVO> commitById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
public R<ApplicationForUseVO> commitById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ApplicationForUseVO applicationForUse = applicationForUseService.commitApplication(applicationForUseDTOList, dlpUser);
|
||||
ApplicationForUseVO applicationForUse = applicationForUseService.commitApplication(id, dlpUser);
|
||||
|
||||
if (applicationForUse != null) {
|
||||
return R.ok(applicationForUse, "提交成功");
|
||||
|
||||
@@ -190,13 +190,13 @@ public class CentralizedRequestController {
|
||||
@SysLog("提交集中采购申请")
|
||||
@PostMapping("/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_commit')")
|
||||
public R<CentralizedRequest> postCommitObject(@RequestBody List<CentralizedRequestDTO> centralizedRequestDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
public R<CentralizedRequest> postCommitObject(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CentralizedRequest centralizedRequest = centralizedRequestService.commitRequest(centralizedRequestDTOList, dlpUser);
|
||||
CentralizedRequest centralizedRequest = centralizedRequestService.commitRequest(id, dlpUser);
|
||||
|
||||
if (centralizedRequest != null) {
|
||||
return R.ok(centralizedRequest, "提交成功");
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_page')")
|
||||
public R<IPage<ComplianceCheckVO>> getComplianceCheckPage(Page<ComplianceCheck> page, String rid, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<ComplianceCheckVO>> getComplianceCheckPage(Page<ComplianceCheck> page, String rid, String 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, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ComplianceCheckController {
|
||||
|
||||
IPage<ComplianceCheckVO> complianceCheckList = complianceCheckService.getComplianceCheckVOPage(page, Wrappers.<ComplianceCheck>query()
|
||||
.eq("reference_material_id", rid)
|
||||
.eq("status", 3)
|
||||
.eq("status", 6)
|
||||
.orderByDesc("create_time"));
|
||||
return R.ok(complianceCheckList);
|
||||
}
|
||||
@@ -122,7 +122,8 @@ public class ComplianceCheckController {
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time").or()
|
||||
.eq(StrUtil.isNotBlank(status), "status", status)
|
||||
.orderByDesc("create_time")
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -83,14 +83,14 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_page')")
|
||||
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, String rid, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") java.time.LocalDate endTime, String referenceMaterialName, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, String commitStatus, String rid, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") java.time.LocalDate endTime, String referenceMaterialName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (StrUtil.isNotBlank(rid)) {
|
||||
|
||||
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
|
||||
.eq("commit_status", 2)
|
||||
.eq("commit_status", 6)
|
||||
.eq(StrUtil.isNotBlank(rid), "reference_material_id", rid)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
@@ -103,6 +103,7 @@ public class PeriodVerificationImplementationController {
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.eq(StrUtil.isNotBlank(rid), "reference_material_id", rid)
|
||||
.eq(StrUtil.isNotBlank(commitStatus), "commit_status", commitStatus)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(periodVerificationImplementationSList);
|
||||
@@ -133,30 +134,6 @@ public class PeriodVerificationImplementationController {
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 通过id删除(标准物质期间核查实施情况及结果记录表)
|
||||
// * @param periodVerificationImplementationId id
|
||||
// * @return R
|
||||
// */
|
||||
// @ApiOperation(value = "通过id删除(标准物质期间核查实施情况及结果记录表)", notes = "通过id删除(标准物质期间核查实施情况及结果记录表)")
|
||||
// @SysLog("通过id删除(标准物质期间核查实施情况及结果记录表)" )
|
||||
// @DeleteMapping("/{periodVerificationImplementationId}" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_del')" )
|
||||
// public R<PeriodVerificationImplementation> deleteById(@PathVariable String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
|
||||
// Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
//
|
||||
// PeriodVerificationImplementation oldPeriodVerificationImplementation = periodVerificationImplementationService.getById(periodVerificationImplementationId);
|
||||
//
|
||||
// if (periodVerificationImplementationService.removeById(periodVerificationImplementationId)) {
|
||||
// return R.ok(oldPeriodVerificationImplementation, "对象删除成功");
|
||||
// }
|
||||
// else {
|
||||
// return R.failed(oldPeriodVerificationImplementation, "对象删除失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 提交(标准物质期间核查实施情况及结果记录表)
|
||||
*
|
||||
|
||||
@@ -94,13 +94,13 @@ 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,Integer category, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<CatalogueDetails> list = purchaseCatalogueService.getList(name);
|
||||
List<CatalogueDetails> list = purchaseCatalogueService.getList(name,category);
|
||||
|
||||
return R.ok(list);
|
||||
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.config.QRCodeUtils;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.utils.QRCodeUtils;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -31,8 +29,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -85,7 +81,7 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "标准物质列表", notes = "标准物质列表")
|
||||
@GetMapping("/RList")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<Page<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryPage(Integer current, Integer size, String reagentConsumableName, Integer referenceMaterialStatus, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -93,14 +89,15 @@ public class ReagentConsumableInventoryController {
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
QueryWrapper<ReferenceMaterial> referenceMaterialQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
String number = reagentConsumableName;
|
||||
|
||||
if (reagentConsumableName != null) {
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> allList = reagentConsumableInventoryService.getAllList(current, size, reagentConsumableInventoryQueryWrapper, referenceMaterialStatus);
|
||||
Page<ReagentConsumableInventoryFullVO> allList = reagentConsumableInventoryService.getAllList(current, size, reagentConsumableInventoryQueryWrapper, referenceMaterialStatus, number);
|
||||
return R.ok(allList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
@@ -108,7 +105,7 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
|
||||
@GetMapping("/standardList")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<IPage<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page<ReagentConsumableInventory> page, Integer warning, String remark, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -135,7 +132,7 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
||||
@GetMapping("/List")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, Integer warning, String remark, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -167,7 +164,7 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表")
|
||||
@GetMapping("/MList")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<IPage<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -191,7 +188,7 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表")
|
||||
@GetMapping("/full")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
// @PreAuthorize("@pms.hasPermission(' ')")
|
||||
public R<List<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(String category, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -244,14 +241,14 @@ public class ReagentConsumableInventoryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 BARCODE 图像
|
||||
* 标准物质打印二维码
|
||||
*
|
||||
* @param code QRCODE字符串
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "生成条形码", notes = "生成条形码")
|
||||
@ApiOperation(value = "标准物质打印二维码", notes = "标准物质打印二维码")
|
||||
@GetMapping("/code")
|
||||
@PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')")
|
||||
// @PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')")
|
||||
|
||||
public String getBarCodeImageBase64(String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
|
||||
@@ -261,10 +258,25 @@ public class ReagentConsumableInventoryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 BARCODE 图像
|
||||
* 标准储备溶液打印二维码
|
||||
*
|
||||
* @param code QRCODE字符串
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "标准储备溶液打印二维码", notes = "标准储备溶液打印二维码")
|
||||
@GetMapping("/codeSolution")
|
||||
// @PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')")
|
||||
|
||||
public String printSolutionTag(String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
|
||||
return reagentConsumableInventoryService.printSolutionTag(code);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码录入物品编码
|
||||
*
|
||||
* @param code 物品二维码
|
||||
*/
|
||||
@ApiOperation(value = "扫码录入物品编码", notes = "扫码录入物品编码")
|
||||
@PutMapping("/code")
|
||||
@@ -276,5 +288,48 @@ public class ReagentConsumableInventoryController {
|
||||
return R.ok("录入成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 录入标准物质自带的二维码信息
|
||||
*
|
||||
* @param code 物品二维码
|
||||
* @param id 标准物质ID
|
||||
*/
|
||||
@ApiOperation(value = "录入标准物质自带的二维码信息", notes = "录入标准物质自带的二维码信息")
|
||||
@PutMapping("/RMCode")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<String> setRMCode(String id, String code, HttpServletResponse httpServletResponse) {
|
||||
|
||||
reagentConsumableInventoryService.setRMCode(id, code);
|
||||
|
||||
return R.ok("录入成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过扫码,获取标准物质所有信息
|
||||
*
|
||||
* @param id id
|
||||
*/
|
||||
@ApiOperation(value = "", notes = "通过id,获取标准物质所有信息")
|
||||
@GetMapping("/getByCode")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<ReagentConsumableInventoryFullVO> getByCode(String id, String number, HttpServletResponse httpServletResponse) {
|
||||
|
||||
if (StrUtil.isNotBlank(number)) {
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));
|
||||
|
||||
if (referenceMaterial != null) {
|
||||
|
||||
return R.ok(reagentConsumableInventoryService.getByCode(referenceMaterial.getId()));
|
||||
} else {
|
||||
|
||||
return R.failed("未能查询到该标准物质的详细信息");
|
||||
}
|
||||
}
|
||||
|
||||
ReagentConsumableInventoryFullVO byCode = reagentConsumableInventoryService.getByCode(id);
|
||||
|
||||
|
||||
return R.ok(byCode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@@ -31,7 +32,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材领用记录表) 前端控制器
|
||||
*
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
@@ -78,8 +79,10 @@ public class RequisitionRecordController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param requisitionRecord (试剂耗材领用记录表)
|
||||
* @return
|
||||
@@ -87,83 +90,17 @@ public class RequisitionRecordController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_requisition_record_get')" )
|
||||
public R<IPage<RequisitionRecordVO>> getRequisitionRecordPage(Page<RequisitionRecord> page, RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<RequisitionRecordVO>> getRequisitionRecordPage(Page<RequisitionRecord> page, String name, RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<RequisitionRecordVO> requisitionRecordSList = requisitionRecordService.getRequisitionRecordVOPage(page, Wrappers.<RequisitionRecord>query()
|
||||
.orderByDesc("create_time")
|
||||
.like(StrUtil.isNotBlank(name), "reagent_consumable_name", name)
|
||||
.orderByDesc("date_of_claim")
|
||||
);
|
||||
return R.ok(requisitionRecordSList);
|
||||
// return R.ok(requisitionRecordService.page(page, Wrappers.query(requisitionRecord)));
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 新增(试剂耗材领用记录表)
|
||||
// * @param requisitionRecord (试剂耗材领用记录表)
|
||||
// * @return R
|
||||
// */
|
||||
// @ApiOperation(value = "新增(试剂耗材领用记录表)", notes = "新增(试剂耗材领用记录表)")
|
||||
// @SysLog("新增(试剂耗材领用记录表)" )
|
||||
// @PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_requisition_record_add')" )
|
||||
// public R<RequisitionRecord> postAddObject(@RequestBody RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
// Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
//
|
||||
// requisitionRecord.setRequisitionRecordId(IdWorker.get32UUID().toUpperCase());
|
||||
// if (requisitionRecordService.save(requisitionRecord)) {
|
||||
// return R.ok(requisitionRecord, "对象创建成功");
|
||||
// }
|
||||
// else {
|
||||
// return R.failed(requisitionRecord, "对象创建失败");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改(试剂耗材领用记录表)
|
||||
// * @param requisitionRecord (试剂耗材领用记录表)
|
||||
// * @return R
|
||||
// */
|
||||
// @ApiOperation(value = "修改(试剂耗材领用记录表)", notes = "修改(试剂耗材领用记录表)")
|
||||
// @SysLog("修改(试剂耗材领用记录表)" )
|
||||
// @PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_requisition_record_edit')" )
|
||||
// public R<RequisitionRecord> putUpdateById(@RequestBody RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
// Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
//
|
||||
// if (requisitionRecordService.updateById(requisitionRecord)) {
|
||||
// return R.ok(requisitionRecord, "保存对象成功");
|
||||
// }
|
||||
// else {
|
||||
// return R.failed(requisitionRecord, "保存对象失败");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除(试剂耗材领用记录表)
|
||||
// * @param requisitionRecordId id
|
||||
// * @return R
|
||||
// */
|
||||
// @ApiOperation(value = "通过id删除(试剂耗材领用记录表)", notes = "通过id删除(试剂耗材领用记录表)")
|
||||
// @SysLog("通过id删除(试剂耗材领用记录表)" )
|
||||
// @DeleteMapping("/{requisitionRecordId}" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_requisition_record_del')" )
|
||||
// public R<RequisitionRecord> deleteById(@PathVariable String requisitionRecordId, HttpServletRequest theHttpServletRequest) {
|
||||
// Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
//
|
||||
// RequisitionRecord oldRequisitionRecord = requisitionRecordService.getById(requisitionRecordId);
|
||||
//
|
||||
// if (requisitionRecordService.removeById(requisitionRecordId)) {
|
||||
// return R.ok(oldRequisitionRecord, "对象删除成功");
|
||||
// }
|
||||
// else {
|
||||
// return R.failed(oldRequisitionRecord, "对象删除失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -62,13 +62,26 @@ public class StandardMaterialApplicationController {
|
||||
* @param id, id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@ApiOperation(value = "通过id/扫码出的编号查询", notes = "通过id/扫码出的编号查询")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')")
|
||||
public R<StandardMaterialApplicationVO> getById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
public R<StandardMaterialApplicationVO> getById(String id, String number, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (StrUtil.isNotBlank(number)) {
|
||||
|
||||
StandardMaterialApplication reference_material_number = standardMaterialApplicationService.getOne(Wrappers.<StandardMaterialApplication>query().eq(StrUtil.isNotBlank(number), "reference_material_number", number)
|
||||
.eq("status", 0));
|
||||
|
||||
|
||||
if (reference_material_number != null) {
|
||||
StandardMaterialApplicationVO standardMaterialApplicationVO = standardMaterialApplicationService.getStandardMaterialApplicationVO(reference_material_number.getStandardMaterialApplicationId());
|
||||
|
||||
return R.ok(standardMaterialApplicationVO);
|
||||
} else return R.failed("没有查询到该标准物质领用/归还的信息");
|
||||
}
|
||||
|
||||
StandardMaterialApplicationVO standardMaterialApplicationVO = standardMaterialApplicationService.getStandardMaterialApplicationVO(id);
|
||||
|
||||
return R.ok(standardMaterialApplicationVO);
|
||||
@@ -79,18 +92,18 @@ public class StandardMaterialApplicationController {
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "领用分页查询", notes = "领用分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_page')")
|
||||
public R<IPage<StandardMaterialApplicationVO>> getStandardMaterialApplicationPage(Page<StandardMaterialApplication> page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<StandardMaterialApplicationVO>> getStandardMaterialApplicationPage(Page<StandardMaterialApplication> page, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardMaterialApplicationVO> standardMaterialApplicationSList = standardMaterialApplicationService.getPage(page, Wrappers.<StandardMaterialApplication>query()
|
||||
.orderByDesc("create_time")
|
||||
.like(StrUtil.isNotBlank(name), "reference_substance_name", name)
|
||||
.orderByDesc("date_of_claim")
|
||||
);
|
||||
return R.ok(standardMaterialApplicationSList);
|
||||
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
|
||||
@@ -100,7 +113,6 @@ public class StandardMaterialApplicationController {
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "归还任务分页查询", notes = "归还任务分页查询")
|
||||
|
||||
@@ -16,7 +16,6 @@ import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO;
|
||||
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
|
||||
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
|
||||
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService;
|
||||
import digital.laboratory.platform.reagent.utils.String2DateConverter;
|
||||
import digital.laboratory.platform.reagent.vo.SolutionUseFormVO;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
|
||||
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO;
|
||||
@@ -103,8 +102,6 @@ public class StandardReserveSolutionController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准储备溶液配制及使用记录表)
|
||||
*
|
||||
@@ -155,13 +152,28 @@ public class StandardReserveSolutionController {
|
||||
@ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录")
|
||||
@GetMapping("/full")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')")
|
||||
public R<StandardReserveSolutionVO> getFullVOById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
public R<StandardReserveSolutionVO> getFullVOById(String id, String number, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (StrUtil.isNotBlank(number)) {
|
||||
|
||||
StandardReserveSolution solution_numbering = standardReserveSolutionService.getOne(Wrappers.<StandardReserveSolution>query().eq("solution_numbering", number)
|
||||
.eq("status", 0));
|
||||
|
||||
if (solution_numbering != null) {
|
||||
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(solution_numbering.getId());
|
||||
return R.ok(byFullVOId);
|
||||
}else {
|
||||
return R.failed("未能查询到该标准储备溶液的入库信息");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(id);
|
||||
|
||||
return R.ok(byFullVOId);
|
||||
|
||||
//return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId));
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class WarehousingRecordFormController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
public R<IPage<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage(Page <WarehousingRecordForm>page, @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<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, String 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();
|
||||
|
||||
@@ -94,6 +94,7 @@ public class WarehousingRecordFormController {
|
||||
|
||||
IPage<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOPage(page, Wrappers.<WarehousingRecordForm>query()
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.eq(StrUtil.isNotBlank(status), "status", status)
|
||||
.le(endTime != null, "create_time", endTime));
|
||||
|
||||
return R.ok(warehousingRecordFormVOList);
|
||||
@@ -129,20 +130,20 @@ public class WarehousingRecordFormController {
|
||||
/**
|
||||
* 新增签收记录表
|
||||
*
|
||||
* @param warehousingRecordFormDTOList 签收记录表
|
||||
* @param warehousingRecordFormDTO 签收记录表
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增签收记录表", notes = "新增签收记录表")
|
||||
@SysLog("新增签收记录表")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
|
||||
public R<WarehousingRecordFormVO> postAddObject(@RequestBody List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
|
||||
public R<WarehousingRecordFormVO> postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.addFormById(warehousingRecordFormDTOList, dlpUser);
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser);
|
||||
|
||||
if (warehousingRecordFormVO != null) {
|
||||
return R.ok(warehousingRecordFormVO, "入库成功");
|
||||
|
||||
@@ -12,7 +12,6 @@ public class ApplicationForUseDTO {
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "(备注)")
|
||||
private String remarks;
|
||||
|
||||
|
||||
@@ -19,5 +19,4 @@ public class AuditAndApproveDTO {
|
||||
|
||||
private String approveOpinion;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -39,4 +39,7 @@ public class OutgoingContentsDTO {
|
||||
@ApiModelProperty(value = "(位置信息)")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value="(领用物品明细ID)")
|
||||
private String reagentConsumablesSetId;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ import lombok.NoArgsConstructor;
|
||||
@ApiModel(value = "采购目录DTO")
|
||||
|
||||
public class PurchaseCatalogueDTO {
|
||||
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.time.LocalDateTime;
|
||||
public class StandardReserveSolutionDTO {
|
||||
|
||||
@ApiModelProperty(value = "(定容体积(mL))")
|
||||
private String constantVolume;
|
||||
private Double constantVolume;
|
||||
|
||||
@ApiModelProperty(value = "(配置浓度(mg/mL))")
|
||||
private String configurationConcentration;
|
||||
@@ -21,7 +21,7 @@ public class StandardReserveSolutionDTO {
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
@ApiModelProperty(value="(标准物质称取量)")
|
||||
private String referenceMaterialScale;
|
||||
private Double referenceMaterialScale;
|
||||
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AcceptanceRecordForm extends BaseEntity {
|
||||
/**
|
||||
* (部门负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value = "(三及审核意见)")
|
||||
@ApiModelProperty(value = "(三级审核意见)")
|
||||
private String auditOpinionOfThreeLevel;
|
||||
|
||||
@ApiModelProperty(value = "(提交时间)")
|
||||
|
||||
@@ -29,7 +29,7 @@ public class BatchDetails extends BaseEntity {
|
||||
* (批次)
|
||||
*/
|
||||
@ApiModelProperty(value="(批次)")
|
||||
private Integer batch;
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* (批号)
|
||||
|
||||
@@ -26,6 +26,13 @@ import lombok.EqualsAndHashCode;
|
||||
@ApiModel(value = "(采购目录明细)")
|
||||
public class CatalogueDetails extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 纯度等级
|
||||
*/
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -23,7 +25,7 @@ import lombok.EqualsAndHashCode;
|
||||
public class CategoryTable extends BaseEntity {
|
||||
|
||||
/**
|
||||
* type
|
||||
* 类别
|
||||
*/
|
||||
@ApiModelProperty(value="类别")
|
||||
private String category;
|
||||
@@ -36,11 +38,10 @@ public class CategoryTable extends BaseEntity {
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* species
|
||||
* 种类
|
||||
*/
|
||||
@ApiModelProperty(value="种类")
|
||||
private String species;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,12 @@ public class OutgoingContents extends BaseEntity {
|
||||
@ApiModelProperty(value="(试剂耗材出库登记表ID)")
|
||||
private String deliveryRegistrationFormId;
|
||||
|
||||
/**
|
||||
* (领用物品明细ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用物品明细ID)")
|
||||
private String reagentConsumablesSetId;
|
||||
|
||||
/**
|
||||
* (出库用途)
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PeriodVerificationImplementation extends BaseEntity {
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态(0:未提交,1:已提交,2:审核通过,-1:审核未通过))")
|
||||
@ApiModelProperty(value="(提交状态(0:未核查,1:已核查,2:审核通过,-2:审核未通过))")
|
||||
private Integer commitStatus;
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,8 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "试剂耗材库存")
|
||||
public class ReagentConsumableInventory extends BaseEntity {
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@@ -24,6 +24,8 @@ import lombok.EqualsAndHashCode;
|
||||
@ApiModel(value = "(试剂耗材类)")
|
||||
public class ReagentConsumables extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value="纯度等级")
|
||||
private String purityGrade;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
|
||||
@@ -68,6 +68,9 @@ public class RequisitionRecord extends BaseEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
private String reagentConsumableName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* requisitionRecordId
|
||||
|
||||
@@ -38,5 +38,6 @@ public class ReviewAndApprove {
|
||||
@ApiModelProperty(value="指导书数组")
|
||||
List<InstructionBookVO> instructionBookList;
|
||||
|
||||
@ApiModelProperty(value="集中采购申请数组")
|
||||
List<CentralizedRequestVO> centralizedRequestVOList;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class StandardReserveSolution extends BaseEntity {
|
||||
* (定容体积(mL))
|
||||
*/
|
||||
@ApiModelProperty(value="(定容体积(mL))")
|
||||
private String constantVolume;
|
||||
private Double constantVolume;
|
||||
/**
|
||||
* (配制人ID)
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ public class StandardReserveSolution extends BaseEntity {
|
||||
* (标准物质称取量)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质称取量)")
|
||||
private String referenceMaterialScale;
|
||||
private Double referenceMaterialScale;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class WarehousingRecordForm extends BaseEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value="状态")
|
||||
@ApiModelProperty(value="状态 0:未入库 1:未完成入库 2:已完成入库")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import digital.laboratory.platform.reagent.entity.RequisitionRecord;
|
||||
import digital.laboratory.platform.reagent.vo.RequisitionRecordVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -19,7 +20,7 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface RequisitionRecordMapper extends BaseMapper<RequisitionRecord> {
|
||||
|
||||
IPage<RequisitionRecordVO> getRequisitionRecordVOPage (IPage<RequisitionRecord> page, QueryWrapper<RequisitionRecord> qw);
|
||||
IPage<RequisitionRecordVO> getRequisitionRecordVOPage (IPage<RequisitionRecord> page, @Param(Constants.WRAPPER) QueryWrapper<RequisitionRecord> qw);
|
||||
|
||||
List<RequisitionRecordVO> getRequisitionRecordVO (String id);
|
||||
|
||||
|
||||
@@ -8,9 +8,11 @@ import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormDTO;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm;
|
||||
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (验收记录表)服务类
|
||||
@@ -20,6 +22,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||
*/
|
||||
public interface AcceptanceRecordFormService extends IService<AcceptanceRecordForm> {
|
||||
|
||||
@Transactional
|
||||
void culkCommit(List<AcceptanceRecordFormDTO> acceptanceRecordFormDTOList, DLPUser dlpUser);
|
||||
|
||||
AcceptanceRecordForm commitForm(AcceptanceRecordFormDTO acceptanceRecordFormDTO, DLPUser dlpUser);
|
||||
|
||||
AcceptanceRecordForm addForm(String reagentConsumableId, String supplierId);
|
||||
|
||||
@@ -24,13 +24,10 @@ public interface ApplicationForUseService extends IService<ApplicationForUse> {
|
||||
|
||||
List<ApplicationForUseVO> getApplicationForUseVOList (QueryWrapper<ApplicationForUse> qw);
|
||||
|
||||
ApplicationForUseVO addApplication(List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser);
|
||||
|
||||
//
|
||||
ApplicationForUseVO editApplication (List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser);
|
||||
ApplicationForUseVO addApplication(ApplicationForUseDTO applicationForUseDTO , DLPUser dlpUser);
|
||||
|
||||
//提交领用申请记录
|
||||
ApplicationForUseVO commitApplication(List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser);
|
||||
ApplicationForUseVO commitApplication(String id, DLPUser dlpUser);
|
||||
|
||||
Boolean delApplication(String applicationForUseId);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
public interface CentralizedRequestService extends IService<CentralizedRequest> {
|
||||
CentralizedRequest addRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser);
|
||||
|
||||
CentralizedRequest commitRequest(List<CentralizedRequestDTO> centralizedRequestDTOList,DLPUser dlpUser);
|
||||
CentralizedRequest commitRequest(String id,DLPUser dlpUser);
|
||||
|
||||
DetailsOfCentralized editDetailsById(CentralizedRequestDTO centralizedRequestDto);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface PurchaseCatalogueService extends IService<PurchaseCatalogue> {
|
||||
|
||||
PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId);
|
||||
|
||||
List<CatalogueDetails> getList(String name);
|
||||
List<CatalogueDetails> getList(String name ,Integer category);
|
||||
|
||||
PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,9 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
|
||||
ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity);
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw,Integer status);
|
||||
Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw,Integer status,String number);
|
||||
|
||||
ReagentConsumableInventoryFullVO getByCode(String id);
|
||||
|
||||
//分页查询试剂耗材
|
||||
IPage<ReagentConsumableInventoryFullVO> getAllRM(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw);
|
||||
@@ -44,5 +46,9 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
//试剂/耗材扫描物品编码进行持久化
|
||||
void setCode(String id, String code);
|
||||
|
||||
void setRMCode(String id, String code);
|
||||
|
||||
String buildCodeLabelContent(String code);
|
||||
|
||||
String printSolutionTag(String id);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@ public interface WarehousingRecordFormService extends IService<WarehousingRecord
|
||||
|
||||
WarehousingRecordFormVO getWarehousingRecordFormVO (String warehousingFormId);
|
||||
@Transactional
|
||||
WarehousingRecordFormVO addFormById(List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, DLPUser dlpUser);
|
||||
WarehousingRecordFormVO addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser);
|
||||
IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm>qw);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.config.PageUtils;
|
||||
import digital.laboratory.platform.reagent.utils.PageUtils;
|
||||
import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormDTO;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm;
|
||||
@@ -31,6 +31,7 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -50,9 +51,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecordFormMapper, AcceptanceRecordForm> implements AcceptanceRecordFormService {
|
||||
|
||||
@Autowired
|
||||
private AcceptanceRecordFormService acceptanceRecordFormService;
|
||||
|
||||
@Autowired
|
||||
private BlacklistService blacklistService;
|
||||
|
||||
@@ -65,10 +63,20 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void culkCommit(List<AcceptanceRecordFormDTO> acceptanceRecordFormDTOList,DLPUser dlpUser){
|
||||
|
||||
for (AcceptanceRecordFormDTO acceptanceRecordFormDTO : acceptanceRecordFormDTOList) {
|
||||
|
||||
AcceptanceRecordForm acceptanceRecordForm = this.commitForm(acceptanceRecordFormDTO, dlpUser);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcceptanceRecordForm commitForm(AcceptanceRecordFormDTO acceptanceRecordFormDTO, DLPUser dlpUser) {
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(acceptanceRecordFormDTO.getAcceptanceRecordFormId());
|
||||
AcceptanceRecordForm byId = this.getById(acceptanceRecordFormDTO.getAcceptanceRecordFormId());
|
||||
//将审核审批信息清空
|
||||
if (byId.getStatus() == -2) {
|
||||
|
||||
@@ -81,7 +89,8 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
byId.setCreateBy(dlpUser.getId());
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("重新提交失败"));
|
||||
@@ -101,7 +110,8 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
byId.setCreateBy(dlpUser.getId());
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("重新提交失败"));
|
||||
@@ -125,22 +135,20 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
byId.setCreateBy(dlpUser.getId());
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("重新提交失败"));
|
||||
}
|
||||
}
|
||||
BeanUtils.copyProperties(acceptanceRecordFormDTO, byId);
|
||||
|
||||
byId.setUserName(dlpUser.getName());
|
||||
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
byId.setCreateBy(dlpUser.getId());
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("保存失败"));
|
||||
@@ -164,7 +172,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
acceptanceRecordForm.setStatus(0);
|
||||
|
||||
if ((acceptanceRecordFormService.save(acceptanceRecordForm))) {
|
||||
if ((this.save(acceptanceRecordForm))) {
|
||||
|
||||
return acceptanceRecordForm;
|
||||
|
||||
@@ -195,7 +203,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus, 4);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
List<AcceptanceRecordForm> list = this.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS = new ArrayList<>();
|
||||
|
||||
@@ -203,7 +211,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = this.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS.add(acceptanceRecordFormVO);
|
||||
}
|
||||
@@ -230,7 +238,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
@Override//一级审核
|
||||
public AcceptanceRecordForm primaryAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(auditAndApproveDTO.getUuId());
|
||||
AcceptanceRecordForm byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 1) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
@@ -245,7 +253,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
} else byId.setStatus(-2);
|
||||
|
||||
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
@@ -253,7 +261,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
@Override//二级审核
|
||||
public AcceptanceRecordForm secondaryAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(auditAndApproveDTO.getUuId());
|
||||
AcceptanceRecordForm byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 2) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
@@ -267,7 +275,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
byId.setStatus(3);
|
||||
} else byId.setStatus(-3);
|
||||
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
@@ -275,7 +283,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
@Override//三级审核
|
||||
public AcceptanceRecordForm threeLevelAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(auditAndApproveDTO.getUuId());
|
||||
AcceptanceRecordForm byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 3) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
@@ -291,10 +299,10 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
blacklistService.addListById2(byId.getReagentConsumableId(), byId.getSupplierId());
|
||||
}
|
||||
byId.setStatus(4);
|
||||
byId.setStatus(6);
|
||||
} else byId.setStatus(-4);
|
||||
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
@@ -35,8 +35,6 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
@Autowired
|
||||
private ReagentConsumablesSetService reagentConsumablesSetService;
|
||||
|
||||
@Autowired
|
||||
private ApplicationForUseService applicationForUseService;
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -75,7 +73,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
for (ApplicationForUseVO record : records) {
|
||||
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(record.getId());
|
||||
ApplicationForUseVO applicationForUseVO = this.getApplicationForUseVO(record.getId());
|
||||
|
||||
BeanUtils.copyProperties(applicationForUseVO, record);
|
||||
}
|
||||
@@ -90,19 +88,23 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
@Transactional
|
||||
@Override//创建领用申请表(试剂耗材领用、标准物质领用、标准溶液领用)
|
||||
public ApplicationForUseVO addApplication(List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser) {
|
||||
//录入领用申请表
|
||||
public ApplicationForUseVO addApplication(ApplicationForUseDTO applicationForUseDTO, DLPUser dlpUser) {
|
||||
|
||||
ApplicationForUse applicationForUse = new ApplicationForUse();
|
||||
|
||||
if (applicationForUseDTO.getApplicationForUseId() != null & (this.getById(applicationForUseDTO.getApplicationForUseId()) != null
|
||||
)) {
|
||||
applicationForUse = this.getById(applicationForUseDTO.getApplicationForUseId());
|
||||
//录入领用申请表
|
||||
|
||||
} else {
|
||||
applicationForUse.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
applicationForUse.setStatus(0);
|
||||
|
||||
applicationForUse.setRecipientId(dlpUser.getId());
|
||||
|
||||
List<ReagentConsumablesSet> reagentConsumablesSets = new ArrayList<>();
|
||||
}
|
||||
//录入领用申请内容
|
||||
for (ApplicationForUseDTO applicationForUseDTO : applicationForUseDTOList) {
|
||||
//生成领用登记表集合
|
||||
ReagentConsumablesSet reagentConsumablesSet = new ReagentConsumablesSet();
|
||||
|
||||
@@ -115,9 +117,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
if (applicationForUseDTO.getReferenceMaterialId() != null) {
|
||||
|
||||
reagentConsumablesSet.setReferenceMaterialId(applicationForUseDTO.getReferenceMaterialId());
|
||||
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, applicationForUseDTO.getReagentConsumableId());
|
||||
@@ -126,46 +126,23 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
Integer totalQuantity = one.getTotalQuantity();
|
||||
|
||||
reagentConsumablesSets.add(reagentConsumablesSet);
|
||||
|
||||
if (reagentConsumablesSet.getQuantity() > totalQuantity) {
|
||||
|
||||
throw new RuntimeException(String.format("领用数量不能大于库存量"));
|
||||
}
|
||||
}
|
||||
if (applicationForUseService.save(applicationForUse) & reagentConsumablesSetService.saveBatch(reagentConsumablesSets)
|
||||
if (this.save(applicationForUse) & reagentConsumablesSetService.save(reagentConsumablesSet)
|
||||
) {
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse.getId());
|
||||
ApplicationForUseVO applicationForUseVO = this.getApplicationForUseVO(applicationForUse.getId());
|
||||
return applicationForUseVO;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override//修改领用申请表
|
||||
public ApplicationForUseVO editApplication(List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser) {
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getById(applicationForUseDTOList.get(0).getApplicationForUseId());
|
||||
//删除领用申请明细
|
||||
applicationForUseService.delApplication(applicationForUse.getId());
|
||||
|
||||
ApplicationForUse applicationForUse1 = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser);
|
||||
|
||||
if (applicationForUse1 != null) {
|
||||
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse1.getId());
|
||||
|
||||
return applicationForUseVO;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
|
||||
@Override//提交领用申请记录
|
||||
@Transactional
|
||||
public ApplicationForUseVO commitApplication(String id, DLPUser dlpUser) {
|
||||
|
||||
public ApplicationForUseVO commitApplication(List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser) {
|
||||
|
||||
if (applicationForUseDTOList.get(0).getApplicationForUseId() == null) {
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser);
|
||||
ApplicationForUse applicationForUse = this.getById(id);
|
||||
|
||||
applicationForUse.setStatus(1);
|
||||
|
||||
@@ -175,52 +152,21 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
applicationForUse.setDateOfCollection(LocalDateTime.now());
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumablesSet> reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getId());
|
||||
|
||||
List<ReagentConsumablesSet> list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
applicationForUseService.updateById(applicationForUse);
|
||||
this.updateById(applicationForUse);
|
||||
|
||||
deliveryRegistrationFormService.addFrom(applicationForUse.getId());
|
||||
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse.getId());
|
||||
ApplicationForUseVO applicationForUseVO = this.getApplicationForUseVO(applicationForUse.getId());
|
||||
|
||||
return applicationForUseVO;
|
||||
|
||||
} else {
|
||||
LambdaQueryWrapper<ApplicationForUse> applicationForUseLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
applicationForUseLambdaQueryWrapper.eq(ApplicationForUse::getId, applicationForUseDTOList.get(0).getApplicationForUseId());
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getOne(applicationForUseLambdaQueryWrapper);
|
||||
|
||||
applicationForUse.setStatus(1);
|
||||
|
||||
applicationForUse.setDateOfCollection(LocalDateTime.now());
|
||||
|
||||
String code = getCode();
|
||||
|
||||
applicationForUse.setClaimCode(code);
|
||||
|
||||
applicationForUseService.updateById(applicationForUse);
|
||||
|
||||
deliveryRegistrationFormService.addFrom(applicationForUse.getId());
|
||||
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse.getId());
|
||||
|
||||
return applicationForUseVO;
|
||||
}
|
||||
}
|
||||
|
||||
@Override//通过ID删除领用申请表(标准物质领用/归还登记表)
|
||||
@Transactional
|
||||
public Boolean delApplication(String applicationForUseId) {
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getById(applicationForUseId);
|
||||
ApplicationForUse applicationForUse = this.getById(applicationForUseId);
|
||||
|
||||
if (applicationForUse.getStatus() == 0) {
|
||||
|
||||
@@ -230,7 +176,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
List<ReagentConsumablesSet> list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
|
||||
return reagentConsumablesSetService.removeBatchByIds(list) & applicationForUseService.removeById(applicationForUse);
|
||||
return reagentConsumablesSetService.removeBatchByIds(list) & this.removeById(applicationForUse);
|
||||
|
||||
} else throw new RuntimeException(String.format("当前状态不能删除"));
|
||||
}
|
||||
@@ -245,7 +191,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
//判断随机数是否重复
|
||||
applicationForUseQueryWrapper.eq("claim_code", substring);
|
||||
|
||||
if (applicationForUseService.getOne(applicationForUseQueryWrapper) != null) {
|
||||
if (this.getOne(applicationForUseQueryWrapper) != null) {
|
||||
|
||||
substring = random.substring(random.length() - 6);
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class BatchDetailsServiceImpl extends ServiceImpl<BatchDetailsMapper, BatchDetails> implements BatchDetailsService {
|
||||
|
||||
@Autowired
|
||||
private BatchDetailsService batchDetailsService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
@@ -50,7 +47,7 @@ public class BatchDetailsServiceImpl extends ServiceImpl<BatchDetailsMapper, Bat
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId,reagentConsumableInventoryId)
|
||||
.eq(BatchDetails::getServiceStatus,1);
|
||||
|
||||
List<BatchDetails> list = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
|
||||
List<BatchDetails> list = this.list(batchDetailsLambdaQueryWrapper);
|
||||
|
||||
ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class BlacklistServiceImpl extends ServiceImpl<BlacklistMapper, Blacklist> implements BlacklistService {
|
||||
|
||||
@Autowired
|
||||
private BlacklistServiceImpl blacklistService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -40,7 +37,7 @@ public class BlacklistServiceImpl extends ServiceImpl<BlacklistMapper, Blacklist
|
||||
blacklist.setResultsOfComplianceCheck(false);
|
||||
blacklist.setReagentConsumableId(reagentConsumableId);
|
||||
|
||||
if (blacklistService.save(blacklist)) {
|
||||
if (this.save(blacklist)) {
|
||||
|
||||
return blacklist;
|
||||
} else return null;
|
||||
@@ -55,7 +52,7 @@ public class BlacklistServiceImpl extends ServiceImpl<BlacklistMapper, Blacklist
|
||||
blacklist.setSupplierId(supplierId);
|
||||
blacklist.setReagentConsumableId(reagentConsumableId);
|
||||
|
||||
if (blacklistService.save(blacklist)) {
|
||||
if (this.save(blacklist)) {
|
||||
|
||||
return blacklist;
|
||||
} else return null;
|
||||
@@ -68,7 +65,7 @@ public class BlacklistServiceImpl extends ServiceImpl<BlacklistMapper, Blacklist
|
||||
|
||||
blacklistLambdaQueryWrapper.eq(Blacklist::getSupplierId, supplierInformationId);
|
||||
|
||||
List<Blacklist> list = blacklistService.list(blacklistLambdaQueryWrapper);
|
||||
List<Blacklist> list = this.list(blacklistLambdaQueryWrapper);
|
||||
|
||||
List<BlackListVO> blackListVOS = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
|
||||
import digital.laboratory.platform.reagent.mapper.CatalogueDetailsMapper;
|
||||
@@ -20,15 +21,13 @@ import java.util.List;
|
||||
@Service
|
||||
public class CatalogueDetailsServiceImpl extends ServiceImpl<CatalogueDetailsMapper, CatalogueDetails> implements CatalogueDetailsService {
|
||||
|
||||
@Autowired
|
||||
private CatalogueDetailsService catalogueDetailsService;
|
||||
|
||||
@Override
|
||||
public List<CatalogueDetails> getCatalogueDetailsList(String purchaseCatalogueId) {
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueId));
|
||||
List<CatalogueDetails> list = this.list(Wrappers.<CatalogueDetails>query().eq("purchase_catalogue_id",purchaseCatalogueId).orderByDesc("create_time"));
|
||||
|
||||
return list;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.CategoryTable;
|
||||
import digital.laboratory.platform.reagent.mapper.CategoryTableMapper;
|
||||
@@ -21,8 +22,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, CategoryTable> implements CategoryTableService {
|
||||
|
||||
@Autowired
|
||||
private CategoryTableService categoryTableService;
|
||||
|
||||
@Override
|
||||
public CategoryTable addSpecies(String category, String species) {
|
||||
@@ -33,7 +32,7 @@ public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, C
|
||||
|
||||
categoryTableLambdaQueryWrapper.eq(CategoryTable::getCategory, category);
|
||||
|
||||
CategoryTable one = categoryTableService.getOne(categoryTableLambdaQueryWrapper);
|
||||
CategoryTable one = this.getOne(categoryTableLambdaQueryWrapper);
|
||||
|
||||
if (one == null) {
|
||||
|
||||
@@ -45,7 +44,7 @@ public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, C
|
||||
|
||||
categoryTable.setCategory(category);
|
||||
|
||||
categoryTableService.save(categoryTable);
|
||||
this.save(categoryTable);
|
||||
|
||||
return categoryTable;
|
||||
}
|
||||
@@ -53,13 +52,12 @@ public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, C
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean delSpeciesById(String categoryTableId) {
|
||||
|
||||
CategoryTable byId = categoryTableService.getById(categoryTableId);
|
||||
CategoryTable byId = this.getById(categoryTableId);
|
||||
|
||||
return categoryTableService.removeById(byId);
|
||||
return this.removeById(byId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,7 +67,7 @@ public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, C
|
||||
|
||||
typeTableLambdaQueryWrapper.eq(CategoryTable::getCategory, category);
|
||||
|
||||
List<CategoryTable> list = categoryTableService.list(typeTableLambdaQueryWrapper);
|
||||
List<CategoryTable> list = this.list(typeTableLambdaQueryWrapper);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -46,10 +46,6 @@ import java.util.List;
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedRequestMapper, CentralizedRequest> implements CentralizedRequestService {
|
||||
|
||||
@Autowired
|
||||
private CentralizedRequestService centralizedRequestService;
|
||||
|
||||
@Autowired
|
||||
private DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
|
||||
@@ -84,6 +80,12 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
@Override//增加集中采购申请
|
||||
public CentralizedRequest addRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
|
||||
|
||||
String centralizedRequestId = centralizedRequestDTOList.get(0).getCentralizedRequestId();
|
||||
|
||||
List<DetailsOfCentralized> detailsOfCentralizedList = new ArrayList<>();
|
||||
|
||||
if (centralizedRequestId == null) {
|
||||
|
||||
CentralizedRequest centralizedRequest = new CentralizedRequest();
|
||||
|
||||
centralizedRequest.setApplicantId(dlpUser.getId());
|
||||
@@ -95,52 +97,64 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
centralizedRequest.setApplicantName(dlpUser.getName());
|
||||
|
||||
List<DetailsOfCentralized> detailsOfCentralizedList = new ArrayList<>();
|
||||
//将DTO赋值给明细表
|
||||
for (CentralizedRequestDTO centralizedRequestDto : centralizedRequestDTOList) {
|
||||
for (CentralizedRequestDTO centralizedRequestDTO : centralizedRequestDTOList) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = new DetailsOfCentralized();
|
||||
|
||||
BeanUtils.copyProperties(centralizedRequestDto, detailsOfCentralized);
|
||||
BeanUtils.copyProperties(centralizedRequestDTO, detailsOfCentralized);
|
||||
|
||||
detailsOfCentralized.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
detailsOfCentralized.setCentralizedRequestId(centralizedRequest.getId());
|
||||
|
||||
detailsOfCentralizedList.add(detailsOfCentralized);
|
||||
|
||||
|
||||
}
|
||||
if (centralizedRequestService.save(centralizedRequest) && detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
|
||||
|
||||
if (this.save(centralizedRequest) && detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
|
||||
return centralizedRequest;
|
||||
} else return null;
|
||||
|
||||
|
||||
//将DTO赋值给明细表
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
CentralizedRequest centralizedRequest = this.getById(centralizedRequestId);
|
||||
|
||||
|
||||
for (CentralizedRequestDTO centralizedRequestDTO : centralizedRequestDTOList) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = new DetailsOfCentralized();
|
||||
|
||||
BeanUtils.copyProperties(centralizedRequestDTO, detailsOfCentralized);
|
||||
|
||||
detailsOfCentralized.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
detailsOfCentralized.setCentralizedRequestId(centralizedRequest.getId());
|
||||
|
||||
detailsOfCentralizedList.add(detailsOfCentralized);
|
||||
|
||||
}
|
||||
|
||||
if (detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
|
||||
|
||||
return centralizedRequest;
|
||||
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override//提交申请
|
||||
public CentralizedRequest commitRequest(List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
|
||||
|
||||
if (centralizedRequestDTOList.get(0).getCentralizedRequestId() == null) {
|
||||
|
||||
CentralizedRequest centralizedRequest = centralizedRequestService.addRequest(centralizedRequestDTOList, dlpUser);
|
||||
|
||||
centralizedRequest.setDateOfApplication(LocalDateTime.now());
|
||||
|
||||
centralizedRequest.setStatus(1);
|
||||
|
||||
if (centralizedRequestService.updateById(centralizedRequest)) {
|
||||
return centralizedRequest;
|
||||
} else return null;
|
||||
} else {
|
||||
|
||||
CentralizedRequest byId = centralizedRequestService.getById(centralizedRequestDTOList.get(0).getCentralizedRequestId());
|
||||
|
||||
byId.setDateOfApplication(LocalDateTime.now());
|
||||
|
||||
public CentralizedRequest commitRequest(String id, DLPUser dlpUser) {
|
||||
CentralizedRequest byId = this.getById(id);
|
||||
byId.setStatus(1);
|
||||
|
||||
if (centralizedRequestService.updateById(byId)) {
|
||||
byId.setDateOfApplication(LocalDateTime.now());
|
||||
this.updateById(byId);
|
||||
return byId;
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +200,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
detailsOfCentralizedService.removeBatchByIds(list);
|
||||
|
||||
}
|
||||
return centralizedRequestService.removeById(centralizedRequestId);
|
||||
return this.removeById(centralizedRequestId);
|
||||
|
||||
}
|
||||
|
||||
@@ -204,7 +218,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
//查询状态为1的采购申请:已提交
|
||||
centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus, 1);
|
||||
|
||||
List<CentralizedRequest> list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper);
|
||||
List<CentralizedRequest> list = this.list(centralizedRequestLambdaQueryWrapper);
|
||||
|
||||
ArrayList<CentralizedRequestVO> centralizedRequestVOArrayList = new ArrayList<>();
|
||||
|
||||
@@ -248,7 +262,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
@Override
|
||||
public CentralizedRequest auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
CentralizedRequest byId = centralizedRequestService.getById(auditAndApproveDTO.getUuId());
|
||||
CentralizedRequest byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setAuditId(dlpUser.getId());
|
||||
byId.setAuditTime(LocalDateTime.now());
|
||||
@@ -256,11 +270,11 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
byId.setAuditResult(auditAndApproveDTO.getAuditResult());
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setStatus(2);
|
||||
byId.setStatus(6);
|
||||
} else {
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
if (centralizedRequestService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
@@ -271,7 +285,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
if (type.equals("集中采购申请")) {
|
||||
|
||||
CentralizedRequestVO centralizedRequest = centralizedRequestService.getCentralizedRequestVO(id);
|
||||
CentralizedRequestVO centralizedRequest = this.getCentralizedRequestVO(id);
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = centralizedRequest.getDetailsOfCentralizedVOList();
|
||||
|
||||
@@ -349,7 +363,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
if (type.equals("集中采购申请")) {
|
||||
|
||||
CentralizedRequestVO centralizedRequestVO = centralizedRequestService.getCentralizedRequestVO(id);
|
||||
CentralizedRequestVO centralizedRequestVO = this.getCentralizedRequestVO(id);
|
||||
PurchasingPlanVO byId = purchasingPlanService.getPurchasingPlanVO(centralizedRequestVO.getPurchasingPlanId());
|
||||
firstAuditName = centralizedRequestVO.getAuditorName();
|
||||
secondAuditName = byId.getCreateName();
|
||||
|
||||
@@ -52,10 +52,6 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
@Autowired
|
||||
private CheckScheduleService checkScheduleService;
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
@@ -89,9 +85,9 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
periodVerificationPlans.add(periodVerificationPlan);
|
||||
}
|
||||
|
||||
if (checkScheduleService.save(checkSchedule) && periodVerificationPlanService.saveBatch(periodVerificationPlans)) {
|
||||
if (this.save(checkSchedule) && periodVerificationPlanService.saveBatch(periodVerificationPlans)) {
|
||||
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.getCheckScheduleVO(checkSchedule.getId());
|
||||
CheckScheduleVO checkScheduleVO = this.getCheckScheduleVO(checkSchedule.getId());
|
||||
|
||||
return checkScheduleVO;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
@@ -102,7 +98,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
@Transactional
|
||||
public CheckSchedule editPlan(List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS) {
|
||||
|
||||
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
|
||||
CheckSchedule byId = this.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
|
||||
|
||||
LambdaQueryWrapper<PeriodVerificationPlan> periodVerificationPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -127,7 +123,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
periodVerificationPlans.add(periodVerificationPlan);
|
||||
}
|
||||
|
||||
if (checkScheduleService.updateById(byId) && periodVerificationPlanService.saveBatch(periodVerificationPlans)) {
|
||||
if (this.updateById(byId) && periodVerificationPlanService.saveBatch(periodVerificationPlans)) {
|
||||
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
@@ -138,14 +134,14 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
@Transactional
|
||||
public CheckSchedule commitPlan(List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, DLPUser dlpUser) {
|
||||
|
||||
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
|
||||
CheckSchedule byId = this.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
|
||||
|
||||
if (byId == null) {
|
||||
|
||||
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
CheckSchedule checkSchedule = this.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
checkSchedule.setStatus(1);
|
||||
checkSchedule.setCommitTime(LocalDateTime.now());
|
||||
checkScheduleService.updateById(checkSchedule);
|
||||
this.updateById(checkSchedule);
|
||||
|
||||
return checkSchedule;
|
||||
|
||||
@@ -153,19 +149,19 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
|
||||
if (byId.getStatus()==-2){
|
||||
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
CheckScheduleVO checkScheduleVO = this.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
|
||||
return checkScheduleVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CheckSchedule checkSchedule = checkScheduleService.editPlan(periodVerificationPlanDTOS);
|
||||
CheckSchedule checkSchedule = this.editPlan(periodVerificationPlanDTOS);
|
||||
|
||||
checkSchedule.setStatus(1);
|
||||
checkSchedule.setCommitTime(LocalDateTime.now());
|
||||
|
||||
checkScheduleService.updateById(checkSchedule);
|
||||
this.updateById(checkSchedule);
|
||||
|
||||
return checkSchedule;
|
||||
}
|
||||
@@ -175,7 +171,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
@Override
|
||||
public CheckSchedule auditPlan(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
CheckSchedule byId = checkScheduleService.getById(auditAndApproveDTO.getUuId());
|
||||
CheckSchedule byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setAuditOpinionOfTechnical(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditResultOfTechnical(auditAndApproveDTO.getAuditResult());
|
||||
@@ -195,12 +191,12 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
periodVerificationImplementationService.addById(periodVerificationPlan);
|
||||
|
||||
}
|
||||
byId.setStatus(2);
|
||||
byId.setStatus(6);
|
||||
} else {
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
|
||||
if (checkScheduleService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
@@ -44,8 +44,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMapper, ComplianceCheck> implements ComplianceCheckService {
|
||||
|
||||
@Autowired
|
||||
private ComplianceCheckService complianceCheckService;
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
@@ -122,7 +120,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
complianceCheck.setStatus(-1);
|
||||
|
||||
if (complianceCheckService.save(complianceCheck)) {
|
||||
if (this.save(complianceCheck)) {
|
||||
return complianceCheck;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("新增失败"));
|
||||
@@ -136,7 +134,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
for (ComplianceCheckDTO complianceCheckDTO : list) {
|
||||
|
||||
ComplianceCheck complianceCheck = complianceCheckService.addCheck(complianceCheckDTO, dlpUser);
|
||||
ComplianceCheck complianceCheck = this.addCheck(complianceCheckDTO, dlpUser);
|
||||
|
||||
complianceCheck.setReagentConsumableName(reagentConsumablesService.getById(complianceCheckDTO.getReagentConsumableId()).getReagentConsumableName());
|
||||
|
||||
@@ -151,14 +149,21 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
@Override//删除符合性检查
|
||||
public Boolean delCheckById(String complianceCheckId) {
|
||||
|
||||
return complianceCheckService.removeById(complianceCheckId);
|
||||
ComplianceCheck byId = this.getById(complianceCheckId);
|
||||
|
||||
if (byId.getStatus()!=0){
|
||||
|
||||
throw new RuntimeException(String.format("当前状态无法删除"));
|
||||
}
|
||||
|
||||
return this.removeById(complianceCheckId);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override//录入结论
|
||||
public ComplianceCheck editCheckById(ComplianceCheckDTO complianceCheckDTO) {
|
||||
|
||||
ComplianceCheck byId = complianceCheckService.getById(complianceCheckDTO.getComplianceCheckId());
|
||||
ComplianceCheck byId = this.getById(complianceCheckDTO.getComplianceCheckId());
|
||||
|
||||
if (complianceCheckDTO.getInspectionScheme() == null) {
|
||||
throw new RuntimeException(String.format("请先制定检查方案"));
|
||||
@@ -172,7 +177,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
byId.setNonconformingItem(nonconformingItem);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("录入失败"));
|
||||
@@ -183,13 +188,13 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
@Override//录入方案
|
||||
public ComplianceCheck addScheme(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser) {
|
||||
|
||||
ComplianceCheck byId = complianceCheckService.getById(complianceCheckDTO.getComplianceCheckId());
|
||||
ComplianceCheck byId = this.getById(complianceCheckDTO.getComplianceCheckId());
|
||||
|
||||
byId.setInspectionScheme(complianceCheckDTO.getInspectionScheme());
|
||||
|
||||
byId.setStatus(0);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else return null;
|
||||
|
||||
@@ -201,7 +206,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
String complianceCheckId = complianceCheckDTO.getComplianceCheckId();
|
||||
|
||||
ComplianceCheck byId = complianceCheckService.getById(complianceCheckId);
|
||||
ComplianceCheck byId = this.getById(complianceCheckId);
|
||||
|
||||
String nonconformingItem = complianceCheckDTO.getNonconformingItem();
|
||||
byId.setExecutorId(dlpUser.getId());
|
||||
@@ -244,7 +249,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
@@ -255,7 +260,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
@Override//一级审核
|
||||
public ComplianceCheck primaryAuditCheck(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
ComplianceCheck byId = complianceCheckService.getById(auditAndApproveDTO.getUuId());
|
||||
ComplianceCheck byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 1) {
|
||||
throw new RuntimeException(String.format("当前状态不可审核"));
|
||||
@@ -274,7 +279,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
@@ -284,7 +289,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
@Override//二级审核
|
||||
public ComplianceCheck secondaryAuditCheck(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
ComplianceCheck byId = complianceCheckService.getById(auditAndApproveDTO.getUuId());
|
||||
ComplianceCheck byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 2) {
|
||||
throw new RuntimeException(String.format("当前状态不可审核"));
|
||||
@@ -297,12 +302,12 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
byId.setSecondaryAuditorId(dlpUser.getId());
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setStatus(3);
|
||||
byId.setStatus(6);
|
||||
} else {
|
||||
byId.setStatus(-3);
|
||||
}
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@@ -20,10 +20,6 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class DecentralizeDetailsServiceImpl extends ServiceImpl<DecentralizeDetailsMapper, DecentralizeDetails> implements DecentralizeDetailsService {
|
||||
|
||||
@Autowired
|
||||
private DecentralizeDetailsService decentralizeDetailsService;
|
||||
|
||||
@Autowired
|
||||
private DecentralizedRequestService decentralizedRequestService;
|
||||
|
||||
@@ -34,7 +30,7 @@ public class DecentralizeDetailsServiceImpl extends ServiceImpl<DecentralizeDeta
|
||||
|
||||
LambdaQueryWrapper<DecentralizeDetails> eq = decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, decentralizedRequestId);
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
||||
List<DecentralizeDetails> decentralizeDetailsList = this.list(decentralizeDetailsLambdaQueryWrapper);
|
||||
|
||||
return decentralizeDetailsList;
|
||||
}
|
||||
|
||||
@@ -33,8 +33,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRequestMapper, DecentralizedRequest> implements DecentralizedRequestService {
|
||||
|
||||
@Autowired
|
||||
private DecentralizedRequestService decentralizedRequestService;
|
||||
@Autowired
|
||||
private DecentralizeDetailsService decentralizeDetailsService;
|
||||
|
||||
@@ -105,7 +103,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
list.add(decentralizedDetails);
|
||||
}
|
||||
if (decentralizedRequestService.save(decentralizedRequest) & decentralizeDetailsService.saveBatch(list)) {
|
||||
if (this.save(decentralizedRequest) & decentralizeDetailsService.saveBatch(list)) {
|
||||
return decentralizedRequest;
|
||||
} else return null;
|
||||
}
|
||||
@@ -148,7 +146,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
decentralizeDetailsService.removeBatchByIds(list);
|
||||
}
|
||||
|
||||
return decentralizedRequestService.removeById(decentralizedRequestService.getById(decentralizedRequestId));
|
||||
return this.removeById(this.getById(decentralizedRequestId));
|
||||
|
||||
}
|
||||
|
||||
@@ -158,25 +156,25 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
if (decentralizedRequestId == null) {
|
||||
|
||||
DecentralizedRequest decentralizedRequest = decentralizedRequestService.addRequest(decentralizedRequestDTOList, dlpUser);
|
||||
DecentralizedRequest decentralizedRequest = this.addRequest(decentralizedRequestDTOList, dlpUser);
|
||||
|
||||
decentralizedRequest.setStatus(1);
|
||||
|
||||
decentralizedRequest.setCommitTime(LocalDateTime.now());
|
||||
decentralizedRequest.setDateOfApplication(LocalDateTime.now());
|
||||
|
||||
if (decentralizedRequestService.updateById(decentralizedRequest)) {
|
||||
if (this.updateById(decentralizedRequest)) {
|
||||
return decentralizedRequest;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
} else {
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(decentralizedRequestId);
|
||||
DecentralizedRequest byId = this.getById(decentralizedRequestId);
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
}
|
||||
@@ -186,7 +184,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
@Override//一级审核
|
||||
public DecentralizedRequest primaryAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDto.getUuId());
|
||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus() != 1) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
@@ -206,7 +204,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else return null;
|
||||
|
||||
@@ -216,7 +214,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
@Override//二级审核
|
||||
public DecentralizedRequest secondaryAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDto.getUuId());
|
||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus() != 2) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
@@ -236,7 +234,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
byId.setStatus(-3);
|
||||
}
|
||||
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else return null;
|
||||
}
|
||||
@@ -245,7 +243,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
@Override//三级审核
|
||||
public DecentralizedRequest threeLevelAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDTO) {
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDTO.getUuId());
|
||||
DecentralizedRequest byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 3) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
@@ -265,7 +263,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
byId.setStatus(-4);
|
||||
}
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else return null;
|
||||
}
|
||||
@@ -274,7 +272,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
@Transactional
|
||||
public DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto) {
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDto.getUuId());
|
||||
DecentralizedRequest byId = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus() != 4) {
|
||||
throw new RuntimeException(String.format("当前状态不能审批"));
|
||||
@@ -328,7 +326,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
purchaseList.setType("分散采购申请");
|
||||
|
||||
byId.setPurchaseListId(purchaseList.getId());
|
||||
decentralizedRequestService.updateById(byId);
|
||||
this.updateById(byId);
|
||||
|
||||
purchaseListService.save(purchaseList);
|
||||
|
||||
@@ -351,7 +349,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
} else {
|
||||
byId.setStatus(-5);
|
||||
}
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else return null;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO;
|
||||
import digital.laboratory.platform.reagent.vo.OutgoingContentsVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -47,10 +48,6 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
@Autowired
|
||||
private OutgoingContentsService outgoingContentsService;
|
||||
|
||||
@Autowired
|
||||
private DeliveryRegistrationFormService deliveryRegistrationFormService;
|
||||
|
||||
@Autowired
|
||||
private ComplianceCheckService complianceCheckService;
|
||||
|
||||
@@ -105,12 +102,12 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
//循环领用集合,创建出库集合
|
||||
for (ReagentConsumablesSet reagentConsumablesSet : list) {
|
||||
|
||||
OutgoingContents outgoingContents = new OutgoingContents();
|
||||
|
||||
ReagentConsumables one = reagentConsumablesService.getById(reagentConsumablesSet.getReagentConsumableId());
|
||||
|
||||
if (one.getCategory().equals("标准物质") | one.getCategory().equals("标准储备溶液")) {
|
||||
|
||||
OutgoingContents outgoingContents = new OutgoingContents();
|
||||
|
||||
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(reagentConsumablesSet.getReferenceMaterialId());
|
||||
@@ -130,34 +127,68 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
outgoingContents.setLatticeId(referenceMaterial.getLatticeId());
|
||||
outgoingContents.setBoxId(referenceMaterial.getBoxId());
|
||||
outgoingContents.setCode(referenceMaterial.getCode());
|
||||
outgoingContents.setReagentConsumablesSetId(reagentConsumablesSet.getId());
|
||||
|
||||
|
||||
outgoingContentsList.add(outgoingContents);
|
||||
} else {
|
||||
|
||||
BatchDetails byId1 = batchDetailsService.getById(reagentConsumablesSet.getBatchDetailsId());
|
||||
String reagentConsumableId = reagentConsumablesSet.getReagentConsumableId();
|
||||
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", reagentConsumableId));
|
||||
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.orderByAsc("create_time")
|
||||
.gt("quantity", 0));
|
||||
|
||||
|
||||
List<BatchDetails> batchDetails = new ArrayList<>();
|
||||
|
||||
Integer quantity = reagentConsumablesSet.getQuantity();
|
||||
|
||||
Integer batchQuantity = 0;
|
||||
|
||||
for (int i = 0; i < batchDetailsList.size(); i++) {
|
||||
|
||||
batchQuantity += batchDetailsList.get(i).getQuantity();
|
||||
|
||||
batchDetails.add(batchDetailsList.get(i));
|
||||
|
||||
if (batchQuantity >= quantity) {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < batchDetails.size(); i++) {
|
||||
|
||||
OutgoingContents outgoingContents = new OutgoingContents();
|
||||
outgoingContents.setId(IdWorker.get32UUID().toUpperCase());
|
||||
outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getId());
|
||||
outgoingContents.setQuantity(reagentConsumablesSet.getQuantity());
|
||||
outgoingContents.setQuantity(batchDetails.get(i).getQuantity());
|
||||
outgoingContents.setRemarks(reagentConsumablesSet.getRemarks());
|
||||
outgoingContents.setOutboundUse(reagentConsumablesSet.getPurpose());
|
||||
outgoingContents.setReagentConsumableId(reagentConsumablesSet.getReagentConsumableId());
|
||||
outgoingContents.setReagentConsumableType(one.getCategory());
|
||||
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
||||
outgoingContents.setLocation(byId1.getLocation());
|
||||
outgoingContents.setLatticeId(byId1.getLatticeId());
|
||||
outgoingContents.setBoxId(byId1.getBoxId());
|
||||
outgoingContents.setBatchDetailsId(batchDetails.get(i).getBatchDetailsId());
|
||||
outgoingContents.setLocation(batchDetails.get(i).getLocation());
|
||||
outgoingContents.setLatticeId(batchDetails.get(i).getLatticeId());
|
||||
outgoingContents.setBoxId(batchDetails.get(i).getBoxId());
|
||||
outgoingContents.setCode(one.getCode());
|
||||
outgoingContents.setReagentConsumablesSetId(reagentConsumablesSet.getId());
|
||||
|
||||
if (i == batchDetails.size() - 1) {
|
||||
|
||||
Integer x = quantity - (batchQuantity - batchDetailsList.get(i).getQuantity());
|
||||
|
||||
outgoingContents.setQuantity(x);
|
||||
}
|
||||
outgoingContentsList.add(outgoingContents);
|
||||
|
||||
}
|
||||
reagentConsumablesSet.setOutgoingContentId(outgoingContents.getId());
|
||||
|
||||
reagentConsumablesSetService.updateById(reagentConsumablesSet);
|
||||
|
||||
|
||||
}
|
||||
if (deliveryRegistrationFormService.save(deliveryRegistrationForm) && outgoingContentsService.saveBatch(outgoingContentsList) &
|
||||
}
|
||||
if (this.save(deliveryRegistrationForm) && outgoingContentsService.saveBatch(outgoingContentsList) &
|
||||
applicationForUseService.updateById(byId)) {
|
||||
|
||||
return deliveryRegistrationForm;
|
||||
@@ -168,7 +199,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
@Transactional
|
||||
public DeliveryRegistrationForm commitForm(List<OutgoingContentsDTO> outgoingContentsDTOS, DLPUser dlpUser) {
|
||||
//得到出库登记表
|
||||
DeliveryRegistrationForm byId = deliveryRegistrationFormService.getById(outgoingContentsDTOS.get(0).getDeliveryRegistrationFormId());
|
||||
DeliveryRegistrationForm byId = this.getById(outgoingContentsDTOS.get(0).getDeliveryRegistrationFormId());
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
@@ -198,10 +229,14 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
for (OutgoingContentsDTO outgoingContentsDTO : outgoingContentsDTOS) {
|
||||
//传入出库数量,区分出库数量与领用数量
|
||||
ReagentConsumablesSet reagentConsumablesSet = reagentConsumablesSetService.getOne(Wrappers.<ReagentConsumablesSet>query().
|
||||
eq("outgoing_content_id", outgoingContentsDTO.getId()));
|
||||
ReagentConsumablesSet reagentConsumablesSet = reagentConsumablesSetService.getById(outgoingContentsDTO.getReagentConsumablesSetId());
|
||||
|
||||
if (reagentConsumablesSet.getQuantityDelivered() == null) {
|
||||
|
||||
reagentConsumablesSet.setQuantityDelivered(outgoingContentsDTO.getQuantity());
|
||||
} else {
|
||||
reagentConsumablesSet.setQuantityDelivered(reagentConsumablesSet.getQuantityDelivered() + outgoingContentsDTO.getQuantity());
|
||||
}
|
||||
|
||||
reagentConsumablesSetService.updateById(reagentConsumablesSet);
|
||||
|
||||
@@ -266,7 +301,8 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
batchDetails.setServiceStatus(-1);
|
||||
}
|
||||
|
||||
batchDetailsService.updateById(batchDetails);}
|
||||
batchDetailsService.updateById(batchDetails);
|
||||
}
|
||||
|
||||
//查找出对应的仓库信息,将库存量减少
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.reduceById(outgoingContents.getReagentConsumableId(), outgoingContents.getQuantity());
|
||||
@@ -341,7 +377,8 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
batchDetails.setServiceStatus(-1);
|
||||
}
|
||||
batchDetailsService.updateById(batchDetails);}
|
||||
batchDetailsService.updateById(batchDetails);
|
||||
}
|
||||
if (reagentConsumableInventory.getTotalQuantity() < 0) {
|
||||
throw new RuntimeException(String.format("出库数量不能超过库存量"));
|
||||
}
|
||||
@@ -361,7 +398,8 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
batchDetails.setServiceStatus(-1);
|
||||
}
|
||||
|
||||
batchDetailsService.updateById(batchDetails);}
|
||||
batchDetailsService.updateById(batchDetails);
|
||||
}
|
||||
|
||||
requisitionRecord.setDateOfClaim(LocalDateTime.now());
|
||||
requisitionRecord.setRecipientId(one.getRecipientId());
|
||||
@@ -393,7 +431,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
if (standardMaterialApplications.size() != 0) {
|
||||
standardMaterialApplicationService.saveBatch(standardMaterialApplications);
|
||||
}
|
||||
if (outgoingContentsService.saveBatch(outgoingContentsList)&& deliveryRegistrationFormService.updateById(byId)) {
|
||||
if (outgoingContentsService.saveBatch(outgoingContentsList) && this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
}
|
||||
@@ -437,9 +475,12 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
BatchDetails byId = batchDetailsService.getById(outgoingContents.getBatchDetailsId());
|
||||
|
||||
if (byId != null) {
|
||||
|
||||
outgoingContentsVO.setBatch(byId.getBatch());
|
||||
|
||||
outgoingContentsVO.setSupplierName(supplierInformationService.getById(byId.getSupplierId()).getSupplierName());
|
||||
}
|
||||
|
||||
outgoingContentsVOS.add(outgoingContentsVO);
|
||||
}
|
||||
@@ -449,6 +490,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
return deliveryRegistrationFormVOById;
|
||||
}
|
||||
|
||||
@Override//通过ID查询出库内容
|
||||
public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOByCode(String claimCode) {
|
||||
|
||||
|
||||
@@ -28,10 +28,6 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentralizedMapper, DetailsOfCentralized> implements DetailsOfCentralizedService {
|
||||
|
||||
@Autowired
|
||||
private DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -63,7 +59,7 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentra
|
||||
|
||||
detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getProcurementContentId, purchasingPlanId);
|
||||
|
||||
List<DetailsOfCentralized> list = detailsOfCentralizedService.list(detailsOfCentralizedLambdaQueryWrapper);
|
||||
List<DetailsOfCentralized> list = this.list(detailsOfCentralizedLambdaQueryWrapper);
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOS = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper, EvaluationForm> implements EvaluationFormService {
|
||||
|
||||
@Autowired
|
||||
private EvaluationFormService evaluationFormService;
|
||||
@Autowired
|
||||
private ProvideServicesOrSuppliesService provideServicesOrSuppliesService;
|
||||
@Autowired
|
||||
@@ -76,7 +74,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
evaluationForm.setStatus(0);
|
||||
evaluationForm.setSupplierInformationId(supplierInformationId);
|
||||
|
||||
if (evaluationFormService.save(evaluationForm)) {
|
||||
if (this.save(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else return null;
|
||||
|
||||
@@ -103,7 +101,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
throw new RuntimeException(String.format("请完善评价信息后再提交"));
|
||||
}
|
||||
|
||||
EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId());
|
||||
EvaluationForm evaluationForm = this.getById(evaluationFormDTO.getEvaluationFormId());
|
||||
|
||||
if (evaluationForm.getStatus() == -3) {
|
||||
|
||||
@@ -118,7 +116,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
evaluationForm.setStatus(2);
|
||||
evaluationForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
if (this.updateById(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
|
||||
@@ -143,7 +141,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
evaluationForm.setStatus(2);
|
||||
evaluationForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
if (this.updateById(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
|
||||
@@ -153,13 +151,14 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
evaluationForm.setPrimaryUserId(dlpUser.getId());
|
||||
|
||||
evaluationForm.setCreateBy(dlpUser.getId());
|
||||
evaluationForm.setCommentsDateFromPrimary(LocalDate.now());
|
||||
|
||||
evaluationForm.setStatus(2);
|
||||
|
||||
evaluationForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
if (this.updateById(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
}
|
||||
@@ -167,7 +166,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
@Override//二级审核
|
||||
public EvaluationForm auditFormOfSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
EvaluationForm byId = evaluationFormService.getById(auditAndApproveDTO.getUuId());
|
||||
EvaluationForm byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setSecondaryUserId(dlpUser.getId());
|
||||
|
||||
@@ -181,7 +180,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
byId.setStatus(3);
|
||||
} else byId.setStatus(-3);
|
||||
|
||||
if (evaluationFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
@@ -192,7 +191,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
public EvaluationForm auditFormOfThreeLevel(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
EvaluationForm byId = evaluationFormService.getById(auditAndApproveDTO.getUuId());
|
||||
EvaluationForm byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setThreeLevelUserId(dlpUser.getId());
|
||||
|
||||
@@ -203,10 +202,10 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
byId.setCommentsResultFromThreeLevel(auditAndApproveDTO.getAuditResult());
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setStatus(4);
|
||||
byId.setStatus(6);
|
||||
} else byId.setStatus(-4);
|
||||
|
||||
if (evaluationFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@@ -27,9 +27,6 @@ import java.time.LocalDateTime;
|
||||
@Service
|
||||
public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMapper, InstructionBook> implements InstructionBookService {
|
||||
|
||||
@Autowired
|
||||
private InstructionBookService instructionBookService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -48,11 +45,11 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult()==true){
|
||||
|
||||
byId.setCommitStatus(2);
|
||||
byId.setCommitStatus(6);
|
||||
}
|
||||
else byId.setCommitStatus(-2);
|
||||
|
||||
if (instructionBookService.updateById(byId)){
|
||||
if (this.updateById(byId)){
|
||||
|
||||
return byId;
|
||||
}else return null;
|
||||
|
||||
@@ -51,9 +51,6 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
@Autowired
|
||||
private PeriodVerificationPlanService periodVerificationPlanService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
@Autowired
|
||||
@@ -124,7 +121,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
periodVerificationImplementation.setVerificationBasis(periodVerificationPlan.getVerificationBasis());
|
||||
periodVerificationImplementation.setCommitStatus(0);
|
||||
|
||||
if (periodVerificationImplementationService.save(periodVerificationImplementation)) {
|
||||
if (this.save(periodVerificationImplementation)) {
|
||||
return periodVerificationImplementation;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
|
||||
@@ -133,7 +130,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
@Override//录入期间核查结果记录表
|
||||
public PeriodVerificationImplementation editById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) {
|
||||
|
||||
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId());
|
||||
PeriodVerificationImplementation byId = this.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId());
|
||||
|
||||
BeanUtils.copyProperties(periodVerificationImplementationDTO, byId);
|
||||
|
||||
@@ -153,7 +150,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
reagentConsumablesService.updateById(byId2);
|
||||
|
||||
if (periodVerificationImplementationService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
@@ -163,7 +160,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
@Override//提交期间核查结果记录表
|
||||
public PeriodVerificationImplementation commitById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) {
|
||||
|
||||
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO, dlpUser);
|
||||
PeriodVerificationImplementation periodVerificationImplementation = this.editById(periodVerificationImplementationDTO, dlpUser);
|
||||
|
||||
periodVerificationImplementation.setCommitTime(LocalDateTime.now());
|
||||
|
||||
@@ -182,7 +179,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
periodVerificationImplementation.setCommitStatus(1);
|
||||
|
||||
if (periodVerificationImplementationService.updateById(periodVerificationImplementation)) {
|
||||
if (this.updateById(periodVerificationImplementation)) {
|
||||
|
||||
return periodVerificationImplementation;
|
||||
|
||||
@@ -192,7 +189,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
@Override//审核期间核查结果记录表
|
||||
public PeriodVerificationImplementation auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(auditAndApproveDTO.getUuId());
|
||||
PeriodVerificationImplementation byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setAuditResultOfTechnical(auditAndApproveDTO.getAuditResult());
|
||||
byId.setAuditOpinionOfTechnical(auditAndApproveDTO.getAuditOpinion());
|
||||
@@ -207,7 +204,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
periodVerificationPlan.setImplementationDate(byId.getCheckingTime());
|
||||
|
||||
periodVerificationPlan.setInspectorId(dlpUser.getId());
|
||||
periodVerificationPlan.setInspectorId(byId.getInspectorId());
|
||||
|
||||
periodVerificationPlan.setDeviationAndUncertainty(byId.getDeviationAndUncertainty());
|
||||
|
||||
@@ -215,10 +212,10 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
periodVerificationPlanService.updateById(periodVerificationPlan);
|
||||
|
||||
byId.setCommitStatus(2);
|
||||
byId.setCommitStatus(6);
|
||||
} else byId.setCommitStatus(-2);
|
||||
|
||||
if (periodVerificationImplementationService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
@@ -35,9 +35,6 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationPlanService periodVerificationPlanService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
@@ -75,7 +72,7 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
|
||||
|
||||
ArrayList<PeriodVerificationPlanVO> periodVerificationPlanVOArrayList = new ArrayList<>();
|
||||
//查询审核已通过的期间核查计划
|
||||
List<CheckSchedule> checkScheduleList = checkScheduleService.list(Wrappers.<CheckSchedule>query().eq("status", 2));
|
||||
List<CheckSchedule> checkScheduleList = checkScheduleService.list(Wrappers.<CheckSchedule>query().eq("status", 6));
|
||||
//获取所有的计划明细
|
||||
for (CheckSchedule checkSchedule : checkScheduleList) {
|
||||
|
||||
@@ -86,6 +83,10 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
|
||||
periodVerificationPlanVOArrayList.addAll(periodVerificationPlanVOS);
|
||||
}
|
||||
//循环计划明细,判断是否需要创建该期间核查计划
|
||||
/*
|
||||
* 每一次创建计划之后,不会存在下次核查日期,在核查人未核查之前不会创建新的
|
||||
* 若核查人核查完成之后,就会生成下次核查日期,也就会进入循环
|
||||
* 若条件满足,则创建期间核查,同时再次清空下次核查日期,也就是在新创建,但未核查的情况下,并不会重复创建*/
|
||||
for (PeriodVerificationPlan periodVerificationPlan : periodVerificationPlanVOArrayList) {
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(periodVerificationPlan.getReferenceMaterialId());
|
||||
@@ -98,7 +99,7 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
|
||||
|
||||
periodVerificationPlan.setDateOfNextCheck(null);
|
||||
|
||||
periodVerificationPlanService.updateById(periodVerificationPlan);
|
||||
this.updateById(periodVerificationPlan);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class ProcurementContentServiceImpl extends ServiceImpl<ProcurementContentMapper, ProcurementContent> implements ProcurementContentService {
|
||||
|
||||
@Autowired
|
||||
private ProcurementContentService procurementContentService;
|
||||
|
||||
@Autowired
|
||||
private DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
@Autowired
|
||||
|
||||
@@ -25,9 +25,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideServicesOrSuppliesMapper, ProvideServicesOrSupplies> implements ProvideServicesOrSuppliesService {
|
||||
|
||||
@Autowired
|
||||
private ProvideServicesOrSuppliesService provideServicesOrSuppliesService;
|
||||
|
||||
@Autowired
|
||||
private EvaluationFormService evaluationFormService;
|
||||
|
||||
@@ -50,7 +47,7 @@ public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideSer
|
||||
|
||||
provideServicesOrSupplies.setReagentConsumableId(reagentConsumableId);
|
||||
|
||||
provideServicesOrSuppliesService.save(provideServicesOrSupplies);
|
||||
this.save(provideServicesOrSupplies);
|
||||
|
||||
return provideServicesOrSupplies;
|
||||
|
||||
@@ -64,7 +61,7 @@ public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideSer
|
||||
|
||||
provideServicesOrSuppliesLambdaQueryWrapper.eq(ProvideServicesOrSupplies::getEvaluationFormId,one.getId());
|
||||
//通过评价表ID,找出该供应商提供的所有供应品
|
||||
List<ProvideServicesOrSupplies> list = provideServicesOrSuppliesService.list(provideServicesOrSuppliesLambdaQueryWrapper);
|
||||
List<ProvideServicesOrSupplies> list = this.list(provideServicesOrSuppliesLambdaQueryWrapper);
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> provideServicesOrSuppliesVOS = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -7,10 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.config.PageUtils;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.dto.PurchaseCatalogueDTO;
|
||||
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
|
||||
@@ -40,8 +38,6 @@ import java.util.*;
|
||||
|
||||
|
||||
public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueMapper, PurchaseCatalogue> implements PurchaseCatalogueService {
|
||||
@Autowired
|
||||
private PurchaseCatalogueService purchaseCatalogueService;
|
||||
@Autowired
|
||||
private CatalogueDetailsService catalogueDetailsService;
|
||||
|
||||
@@ -85,7 +81,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
typeTableService.addSpecies(catalogueDetails.getCategory(), catalogueDetails.getSpecies());
|
||||
}
|
||||
|
||||
if (purchaseCatalogueService.save(purchaseCatalogue) & catalogueDetailsService.saveBatch(catalogueDetailsList)) {
|
||||
if (this.save(purchaseCatalogue) & catalogueDetailsService.saveBatch(catalogueDetailsList)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
}
|
||||
@@ -116,9 +112,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
if (list.size() > 0 & list != null) {
|
||||
catalogueDetailsService.removeBatchByIds(list);
|
||||
}
|
||||
|
||||
return
|
||||
purchaseCatalogueService.removeById(purchaseCatalogueId);
|
||||
this.removeById(purchaseCatalogueId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,8 +121,16 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
CatalogueDetails catalogueDetails = new CatalogueDetails();
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = this.getPurchaseCatalogueVO(purchaseCatalogueDTO.getPurchaseCatalogueId());
|
||||
|
||||
int size = purchaseCatalogueVO.getCatalogueDetailsListList().size();
|
||||
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO, catalogueDetails);
|
||||
|
||||
String yyyy = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy");
|
||||
|
||||
catalogueDetails.setPurchaseCatalogueNumber(yyyy + "-" + size + 1);
|
||||
|
||||
if (catalogueDetailsService.save(catalogueDetails)) {
|
||||
|
||||
return catalogueDetails;
|
||||
@@ -143,7 +146,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
for (PurchaseCatalogueVO record : records) {
|
||||
|
||||
PurchaseCatalogue byId = purchaseCatalogueService.getById(record.getPurchaseCatalogueId());
|
||||
PurchaseCatalogue byId = this.getById(record.getPurchaseCatalogueId());
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -187,7 +190,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId().equals("") | purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.addCatalogue(dlpUser, purchaseCatalogueDTOList);
|
||||
PurchaseCatalogue purchaseCatalogue = this.addCatalogue(dlpUser, purchaseCatalogueDTOList);
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
|
||||
@@ -195,17 +198,15 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(1);
|
||||
}
|
||||
|
||||
purchaseCatalogue.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
|
||||
} else {
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId()
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId()
|
||||
);
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
|
||||
purchaseCatalogue.setStatus(2);
|
||||
@@ -214,7 +215,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
}
|
||||
purchaseCatalogue.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
}
|
||||
@@ -224,7 +225,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
@Transactional
|
||||
public PurchaseCatalogue primaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(auditAndApproveDto.getUuId());
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
purchaseCatalogue.setAuditOpinion(auditAndApproveDto.getAuditOpinion());
|
||||
|
||||
@@ -247,12 +248,18 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
for (CatalogueDetails catalogueDetails : list) {
|
||||
|
||||
ReagentConsumables one = 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("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity()
|
||||
));
|
||||
.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(StrUtil.isNotBlank(catalogueDetails.getPackagedCopies()), "packaged_copies", catalogueDetails.getPackagedCopies())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getAlias()), "alias", catalogueDetails.getAlias())
|
||||
);
|
||||
|
||||
if (one == null) {
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||
@@ -264,12 +271,12 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
}
|
||||
}
|
||||
|
||||
purchaseCatalogue.setStatus(3);
|
||||
purchaseCatalogue.setStatus(6);
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(-3);
|
||||
}
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
}
|
||||
@@ -278,17 +285,17 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
@Override
|
||||
public PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(purchaseCatalogueId);
|
||||
PurchaseCatalogue purchaseCatalogue = this.getById(purchaseCatalogueId);
|
||||
|
||||
purchaseCatalogue.setStatus(4);
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
if (this.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Override//查询已发布的采购目录
|
||||
public List<CatalogueDetails> getList(String name) {
|
||||
public List<CatalogueDetails> getList(String name, Integer category) {
|
||||
|
||||
QueryWrapper<PurchaseCatalogue> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
@@ -296,7 +303,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
QueryWrapper<PurchaseCatalogue> queryWrapper1 = queryWrapper.orderByDesc("update_time");
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(queryWrapper1);
|
||||
List<PurchaseCatalogue> list = this.list(queryWrapper1);
|
||||
|
||||
if (list.size() == 0) {
|
||||
return null;
|
||||
@@ -311,6 +318,12 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.like(CatalogueDetails::getReagentConsumableName, name);
|
||||
}
|
||||
if (category != null) {
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.like(category == 1, CatalogueDetails::getCategory, "试剂");
|
||||
catalogueDetailsLambdaQueryWrapper.like(category == 2, CatalogueDetails::getCategory, "耗材");
|
||||
catalogueDetailsLambdaQueryWrapper.like(category == 3, CatalogueDetails::getCategory, "标准物质");
|
||||
}
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseListDetailsServiceImpl extends ServiceImpl<PurchaseListDetailsMapper, PurchaseListDetails> implements PurchaseListDetailsService {
|
||||
@Autowired
|
||||
private PurchaseListDetailsService purchaseListDetailsService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -46,8 +46,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, PurchaseList> implements PurchaseListService {
|
||||
|
||||
@Autowired
|
||||
private PurchaseListService purchaseListService;
|
||||
@Autowired
|
||||
private PurchaseListDetailsService purchaseListDetailsService;
|
||||
|
||||
@@ -94,7 +92,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
PurchaseListVO purchaseListVO = new PurchaseListVO();
|
||||
|
||||
PurchaseList byId = purchaseListService.getById(purchaseListId);
|
||||
PurchaseList byId = this.getById(purchaseListId);
|
||||
|
||||
List<PurchaseListDetailsVO> purchaseListDetailsVOList = purchaseListDetailsService.getPurchaseListDetailsVOList(purchaseListId);
|
||||
|
||||
@@ -137,7 +135,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
@Override//提交采购清单
|
||||
public PurchaseList commitById(String id) {
|
||||
|
||||
PurchaseList purchaseList = purchaseListService.getById(id);
|
||||
PurchaseList purchaseList = this.getById(id);
|
||||
//将集中采购与分散采购申请的状态改变
|
||||
if (purchaseList.getType().equals("采购计划")) {
|
||||
|
||||
@@ -214,7 +212,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
warehousingContentList.add(warehousingContent);
|
||||
}
|
||||
|
||||
if (purchaseListService.updateById(purchaseList) & warehousingRecordFormService.save(warehousingRecordForm)
|
||||
if (this.updateById(purchaseList) & warehousingRecordFormService.save(warehousingRecordForm)
|
||||
& warehousingContentService.saveBatch(warehousingContentList)) {
|
||||
return purchaseList;
|
||||
} else {
|
||||
@@ -228,7 +226,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
String purchaseListId = purchaseListDTO.getPurchaseListId();
|
||||
|
||||
PurchaseList byId = purchaseListService.getById(purchaseListId);
|
||||
PurchaseList byId = this.getById(purchaseListId);
|
||||
|
||||
PurchaseListDetails purchaseListDetails = purchaseListDetailsService.getById(purchaseListDTO.getId());
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper, PurchasingPlan> implements PurchasingPlanService {
|
||||
|
||||
@Autowired
|
||||
private PurchasingPlanService purchasingPlanService;
|
||||
@Autowired
|
||||
private ProcurementContentService procurementContentService;
|
||||
|
||||
@@ -206,18 +203,10 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
list.add(procurementContent);
|
||||
}
|
||||
}
|
||||
double x = 0;
|
||||
for (
|
||||
ProcurementContent procurementContent : list) {
|
||||
|
||||
x = x + procurementContent.getNumberOfApplications() * procurementContent.getUnitPrice();
|
||||
|
||||
}
|
||||
|
||||
purchasingPlan.setAppropriationBudget(x);
|
||||
if (purchasingPlanService.save(purchasingPlan) & procurementContentService.saveBatch(list)) {
|
||||
|
||||
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());
|
||||
if (this.save(purchasingPlan) & procurementContentService.saveBatch(list)) {
|
||||
calculatedAmount(purchasingPlan.getPurchasingPlanId());
|
||||
PurchasingPlanVO purchasingPlanVO = this.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());
|
||||
return purchasingPlanVO;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
@@ -273,7 +262,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
byId.setUnitPrice(purchasingPlanDTO.getUnitPrice());
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(byId.getPurchasingPlanId());
|
||||
PurchasingPlan purchasingPlan = this.getById(byId.getPurchasingPlanId());
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(purchasingPlanDTO.getDetailsOfCentralizedId());
|
||||
|
||||
@@ -320,9 +309,9 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
detailsOfCentralized.setQuantityPurchased(0);
|
||||
}
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(byId.getPurchasingPlanId());
|
||||
PurchasingPlan purchasingPlan = this.getById(byId.getPurchasingPlanId());
|
||||
|
||||
if (purchasingPlanService.getById(byId.getPurchasingPlanId()).getStatus() == 0
|
||||
if (this.getById(byId.getPurchasingPlanId()).getStatus() == 0
|
||||
&& detailsOfCentralizedService.updateBatchById(list) && procurementContentService.removeById(procurementContentId)) {
|
||||
|
||||
LambdaQueryWrapper<ProcurementContent> procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -333,7 +322,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
if (list1.size() == 0) {
|
||||
|
||||
purchasingPlanService.removeById(purchasingPlan);
|
||||
this.removeById(purchasingPlan);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -424,17 +413,29 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
public PurchasingPlan commitById(String purchasingPlanId) {
|
||||
|
||||
|
||||
PurchasingPlan byId = purchasingPlanService.getById(purchasingPlanId);
|
||||
|
||||
if (byId.getStatus()!=0){
|
||||
throw new RuntimeException(String.format("当前状态无法提交"));
|
||||
PurchasingPlan byId = this.getById(purchasingPlanId);
|
||||
//若是审核审批不通过时的提交,则需清空原有的审核审批信息
|
||||
if (byId.getStatus()==-4){
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
}
|
||||
if (byId.getStatus()==-5){
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
byId.setApproverId("");
|
||||
byId.setApprovalOpinion("");
|
||||
byId.setApprovalResult(false);
|
||||
byId.setApprovalTime(null);
|
||||
}
|
||||
|
||||
byId.setStatus(1);
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
|
||||
if (purchasingPlanService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
calculatedAmount(byId.getPurchasingPlanId());
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
@@ -446,7 +447,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
@Override
|
||||
public PurchasingPlan auditById(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(auditAndApproveDto.getUuId());
|
||||
PurchasingPlan purchasingPlan = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (purchasingPlan.getStatus() != 1) {
|
||||
throw new RuntimeException(String.format("当前状态不可审核"));
|
||||
@@ -465,7 +466,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
purchasingPlan.setStatus(-4);
|
||||
}
|
||||
|
||||
if (purchasingPlanService.updateById(purchasingPlan)) {
|
||||
if (this.updateById(purchasingPlan)) {
|
||||
return purchasingPlan;
|
||||
} else {
|
||||
return null;
|
||||
@@ -475,7 +476,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
@Override
|
||||
public PurchasingPlan approveById(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(auditAndApproveDto.getUuId());
|
||||
PurchasingPlan purchasingPlan = this.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (purchasingPlan.getStatus() != 4) {
|
||||
throw new RuntimeException(String.format("当前状态不可审批"));
|
||||
@@ -530,7 +531,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
purchasingPlan.setStatus(-5);
|
||||
}
|
||||
|
||||
if (purchasingPlanService.updateById(purchasingPlan)) {
|
||||
if (this.updateById(purchasingPlan)) {
|
||||
return purchasingPlan;
|
||||
} else {
|
||||
return null;
|
||||
@@ -540,7 +541,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
//计算经费预算方法
|
||||
public PurchasingPlan calculatedAmount(String purchasingPlanId) {
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(purchasingPlanId);
|
||||
PurchasingPlan purchasingPlan = this.getById(purchasingPlanId);
|
||||
|
||||
LambdaQueryWrapper<ProcurementContent> procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -556,7 +557,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
}
|
||||
purchasingPlan.setAppropriationBudget(x);
|
||||
|
||||
if (purchasingPlanService.updateById(purchasingPlan)) {
|
||||
if (this.updateById(purchasingPlan)) {
|
||||
return purchasingPlan;
|
||||
} else throw new RuntimeException(String.format("计算失败"));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -15,10 +15,11 @@ import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteTemplate2htmlService;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.config.PageUtils;
|
||||
import digital.laboratory.platform.reagent.utils.PageUtils;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.utils.QRCodeUtils;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
@@ -30,7 +31,6 @@ import org.springframework.stereotype.Service;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -45,9 +45,6 @@ import java.util.Map;
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentConsumableInventoryMapper, ReagentConsumableInventory> implements ReagentConsumableInventoryService {
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
@Autowired
|
||||
private BatchDetailsService batchDetailsService;
|
||||
@Autowired
|
||||
@@ -78,7 +75,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
@Override//试剂耗材/标准物质标准物质管理列表
|
||||
@Override//标准物质标准物质管理列表
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw, Integer warning) {
|
||||
|
||||
|
||||
@@ -97,7 +94,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
if (list.size() != 0) {
|
||||
for (BatchDetails batchDetails : list) {
|
||||
|
||||
ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventory byId = this.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryVO);
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
|
||||
@@ -148,7 +145,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
if (list.size() != 0) {
|
||||
for (BatchDetails batchDetails : list) {
|
||||
|
||||
ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventory byId = this.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryVO);
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
|
||||
@@ -189,12 +186,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumableId);
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
ReagentConsumableInventory one = this.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
one.setTotalQuantity(one.getTotalQuantity() + quantity);
|
||||
|
||||
|
||||
if (reagentConsumableInventoryService.updateById(one)) {
|
||||
if (this.updateById(one)) {
|
||||
|
||||
return one;
|
||||
} else throw new RuntimeException(String.format("库存添加失败"));
|
||||
@@ -207,7 +204,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumableId);
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
ReagentConsumableInventory one = this.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
one.setTotalQuantity(one.getTotalQuantity() - quantity);
|
||||
|
||||
@@ -216,7 +213,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
one.setWarningInformation("库存不足");
|
||||
}
|
||||
|
||||
if (reagentConsumableInventoryService.updateById(one)) {
|
||||
if (this.updateById(one)) {
|
||||
|
||||
return one;
|
||||
} else throw new RuntimeException(String.format("库存减少失败"));
|
||||
@@ -224,11 +221,85 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
|
||||
@Override//分页查询标准物质
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw, Integer status) {
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw,Integer status,String number) {
|
||||
//如果扫码
|
||||
if (StrUtil.isNotBlank(number)){
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));
|
||||
|
||||
if (referenceMaterial!=null) {
|
||||
|
||||
ReagentConsumableInventoryFullVO byCode = this.getByCode(referenceMaterial.getId());
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOS = new ArrayList<>();
|
||||
|
||||
reagentConsumableInventoryFullVOS.add(byCode);
|
||||
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOS);
|
||||
|
||||
return pages;
|
||||
|
||||
}}
|
||||
// List<ReferenceMaterial> list = referenceMaterialService.list(qw);
|
||||
//
|
||||
// List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
|
||||
//
|
||||
//
|
||||
// for (ReferenceMaterial referenceMaterial : list) {
|
||||
//
|
||||
// ReagentConsumableInventory reagentConsumableInventory = this.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
//
|
||||
// ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
//
|
||||
// BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
|
||||
//
|
||||
// reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber());
|
||||
//
|
||||
// reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId());
|
||||
//
|
||||
// BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||
//
|
||||
// SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
|
||||
//
|
||||
// LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//
|
||||
// standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId());
|
||||
//
|
||||
// StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
//
|
||||
// reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
|
||||
// reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
// reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber());
|
||||
// reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId());
|
||||
// reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
|
||||
// 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());
|
||||
// reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate());
|
||||
// reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
// reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod());
|
||||
// }
|
||||
// reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
//
|
||||
//
|
||||
// }
|
||||
// PageUtils pageUtils = new PageUtils();
|
||||
////
|
||||
// Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
|
||||
//
|
||||
// return pages;
|
||||
// }
|
||||
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
List<ReagentConsumableInventory> list = this.list(qw);
|
||||
|
||||
ArrayList<ReferenceMaterial> referenceMaterialList = new ArrayList<>();
|
||||
//通过仓库类信息,查找对应的该类所有标准物质
|
||||
@@ -259,7 +330,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
|
||||
ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryFullVO);
|
||||
|
||||
@@ -284,7 +355,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
|
||||
reagentConsumableInventoryFullVO.setStorageLife(Integer.valueOf(batchDetails.getLimitDate()));
|
||||
reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult());
|
||||
if (one1 != null) {
|
||||
|
||||
@@ -301,7 +371,50 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
|
||||
|
||||
return pages;
|
||||
return pages;}
|
||||
|
||||
|
||||
@Override//通过ID,获取标准物质所有信息
|
||||
public ReagentConsumableInventoryFullVO getByCode(String id) {
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(id);
|
||||
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
|
||||
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryFullVO);
|
||||
|
||||
reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber());
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId());
|
||||
|
||||
StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
|
||||
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber());
|
||||
reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId());
|
||||
reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
|
||||
reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult());
|
||||
if (one1 != null) {
|
||||
reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration());
|
||||
reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate());
|
||||
reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod());
|
||||
}
|
||||
|
||||
return reagentConsumableInventoryFullVO;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +422,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Override
|
||||
public IPage<ReagentConsumableInventoryFullVO> getAllRM(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw) {
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
List<ReagentConsumableInventory> list = this.list(qw);
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOS = new ArrayList<>();
|
||||
|
||||
@@ -347,7 +460,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
@Override
|
||||
public List<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw) {
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
List<ReagentConsumableInventory> list = this.list(qw);
|
||||
// return list;
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
|
||||
@@ -461,45 +574,73 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(id);
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query()
|
||||
ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("reagent_consumable_id", id));
|
||||
|
||||
if (byId != null & one != null) {
|
||||
byId.setCode(code);
|
||||
one.setCode(code);
|
||||
|
||||
reagentConsumableInventoryService.updateById(one);
|
||||
this.updateById(one);
|
||||
reagentConsumablesService.updateById(byId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//标准物质条形码打印
|
||||
public String buildCodeLabelContent(String id) {
|
||||
public void setRMCode(String id, String code) {
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(id);
|
||||
|
||||
if (referenceMaterial != null) {
|
||||
|
||||
referenceMaterial.setCode(code);
|
||||
|
||||
referenceMaterialService.updateById(referenceMaterial);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//标准物质二维码打印
|
||||
public String buildCodeLabelContent(String id) {
|
||||
//录入二维码信息
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(id);
|
||||
|
||||
referenceMaterialServiceById.setCode(referenceMaterialServiceById.getNumber());
|
||||
referenceMaterialService.updateById(referenceMaterialServiceById);
|
||||
|
||||
if (referenceMaterialServiceById == null) {
|
||||
|
||||
throw new RuntimeException(String.format("请先入库后再进行打印条码"));
|
||||
}
|
||||
|
||||
//获取打印信息
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
referenceMaterialServiceById.setCode(LocalDateTimeUtil.format(LocalDateTime.now(), "yyyyMMddHHmmssSSS"));
|
||||
|
||||
referenceMaterialService.updateById(referenceMaterialServiceById);
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(referenceMaterialServiceById.getReagentConsumableId());
|
||||
String reagentConsumableName = byId.getReagentConsumableName();
|
||||
ReferenceMaterialVO referenceMaterial = new ReferenceMaterialVO();
|
||||
BatchDetails byId1 = batchDetailsService.getById(referenceMaterialServiceById.getBatchDetailsId());
|
||||
BeanUtils.copyProperties(referenceMaterialServiceById, referenceMaterial);
|
||||
referenceMaterial.setCodeName(referenceMaterial.getNumber() + "-" + referenceMaterialServiceById.getCode());
|
||||
//完善打印信息
|
||||
referenceMaterial.setReferenceMaterialName(byId.getReagentConsumableName());
|
||||
referenceMaterial.setTime(byId1.getExpirationDate());
|
||||
data.put("referenceMaterial", referenceMaterial);
|
||||
|
||||
String templateFileName = "标准物质标签模板.vm";
|
||||
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String printSolutionTag(String id) {
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
String qrCodeImageBase64 = QRCodeUtils.getQRCodeImageBase64(standardReserveSolutionVOById.getSolutionName(), 12, 12);
|
||||
data.put("standardReserveSolution", standardReserveSolutionVOById);
|
||||
String templateFileName = "标准储备溶液标签模板.vm";
|
||||
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName, data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumablesMapper, ReagentConsumables> implements ReagentConsumablesService {
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
@Override
|
||||
public ReagentConsumables addReagentConsumables(Object object){
|
||||
|
||||
@@ -29,7 +27,7 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumable
|
||||
|
||||
reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
if (!(reagentConsumablesService.save(reagentConsumables))){
|
||||
if (!(this.save(reagentConsumables))){
|
||||
|
||||
throw new RuntimeException(String.format("系统错误,试剂耗材目录更新失败"));
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsumablesSetMapper, ReagentConsumablesSet> implements ReagentConsumablesSetService {
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesSetService reagentConsumablesSetService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -47,7 +44,7 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUseId);
|
||||
|
||||
List<ReagentConsumablesSet> list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
List<ReagentConsumablesSet> list = this.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
|
||||
List<ReagentConsumablesSetVO> reagentConsumablesSetVOS = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class ReferenceMaterialServiceImpl extends ServiceImpl<ReferenceMaterialMapper, ReferenceMaterial> implements ReferenceMaterialService {
|
||||
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
@@ -54,7 +52,7 @@ public class ReferenceMaterialServiceImpl extends ServiceImpl<ReferenceMaterialM
|
||||
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getBatchDetailsId,batchDetailsId);
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(referenceMaterialLambdaQueryWrapper);
|
||||
List<ReferenceMaterial> list = this.list(referenceMaterialLambdaQueryWrapper);
|
||||
|
||||
List<ReferenceMaterialVO> referenceMaterialVOS = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ public class RequisitionRecordServiceImpl extends ServiceImpl<RequisitionRecordM
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Autowired
|
||||
private RequisitionRecordService requisitionRecordService;
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@@ -73,8 +71,9 @@ public class RequisitionRecordServiceImpl extends ServiceImpl<RequisitionRecordM
|
||||
requisitionRecord.setRemarks(outgoingContents.getRemarks());
|
||||
requisitionRecord.setDrawingAmount(outgoingContents.getQuantity());
|
||||
requisitionRecord.setSpecificationAndModel(byId.getSpecificationAndModel());
|
||||
requisitionRecord.setReagentConsumableName(byId.getReagentConsumableName());
|
||||
|
||||
if (requisitionRecordService.save(requisitionRecord)){
|
||||
if (this.save(requisitionRecord)){
|
||||
return requisitionRecord;
|
||||
}else throw new RuntimeException(String.format("试剂耗材领用记录表创建失败"));
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
//分散采购申请一级已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 2).or().eq(DecentralizedRequest::getStatus, -2);
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getPrimaryAuditorId,dlpUser.getId());
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
@@ -579,7 +579,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
//分散采购申请二级已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 3).or().eq(DecentralizedRequest::getStatus, -3);
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getSecondaryAuditorId, dlpUser.getId());
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
@@ -599,7 +599,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
//分散采购申请三级已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 4).or().eq(DecentralizedRequest::getStatus, -4);
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getThreeLevelAuditId,dlpUser.getId());
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
@@ -618,7 +618,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
//分散采购申请已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 5).or().eq(DecentralizedRequest::getStatus, -5);
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getApproverId,dlpUser.getId());
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
@@ -637,7 +637,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
//采购目录一级已审核列表
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 2).or().eq(PurchaseCatalogue::getStatus, -2);
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId,dlpUser.getId());
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
@@ -657,7 +657,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 3).or().eq(PurchaseCatalogue::getStatus, -3);
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId,dlpUser.getId());
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
@@ -678,7 +678,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getStatus, 2).or().eq(PurchasingPlan::getStatus, -2);
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getPrimaryAuditorId,dlpUser.getId());
|
||||
|
||||
List<PurchasingPlan> list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper);
|
||||
|
||||
@@ -697,7 +697,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getStatus, 5).or().eq(PurchasingPlan::getStatus, -5);
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getApproverId,dlpUser.getId());
|
||||
|
||||
List<PurchasingPlan> list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper);
|
||||
|
||||
@@ -717,7 +717,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,2).or().eq(AcceptanceRecordForm::getStatus, -2);
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getPrimaryAuditorId,dlpUser.getId());
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
@@ -738,7 +738,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,3).or().eq(AcceptanceRecordForm::getStatus, -3);
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getSecondaryAuditorId,dlpUser.getId());
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
@@ -759,7 +759,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,4).or().eq(AcceptanceRecordForm::getStatus, -4);
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getThreeLevelAuditorId,dlpUser.getId());
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
@@ -779,7 +779,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,2).or().eq(ComplianceCheck::getStatus, -2);
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getPrimaryAuditorId,dlpUser.getId());
|
||||
|
||||
List<ComplianceCheck> list = complianceCheckService.list(complianceCheckLambdaQueryWrapper);
|
||||
|
||||
@@ -799,7 +799,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,3).or().eq(ComplianceCheck::getStatus, -3);
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getSecondaryAuditorId,dlpUser.getId());
|
||||
|
||||
List<ComplianceCheck> list = complianceCheckService.list(complianceCheckLambdaQueryWrapper);
|
||||
|
||||
@@ -818,7 +818,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<CheckSchedule> checkScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getStatus,2).or().eq(CheckSchedule::getStatus, -2);
|
||||
checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getTechnicalDirectorId,dlpUser.getId());
|
||||
|
||||
List<CheckSchedule> list = checkScheduleService.list(checkScheduleLambdaQueryWrapper);
|
||||
|
||||
@@ -837,7 +837,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<PeriodVerificationImplementation> periodVerificationImplementationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getCommitStatus,2).or().eq(PeriodVerificationImplementation::getCommitStatus, -2);
|
||||
periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getTechnicalDirectorId,dlpUser.getId());
|
||||
|
||||
List<PeriodVerificationImplementation> list = periodVerificationImplementationService.list(periodVerificationImplementationLambdaQueryWrapper);
|
||||
|
||||
@@ -858,8 +858,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::getSecondaryAuditorId,dlpUser.getId());
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
@@ -877,7 +876,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,5).or().eq(StandardMaterialApprovalForm::getCommitStatus, -5);
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getApproverId,dlpUser.getId());
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
@@ -896,7 +895,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,3).or().eq(EvaluationForm::getStatus, -3);
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSecondaryUserId,dlpUser.getId());
|
||||
|
||||
List<EvaluationForm> list = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
@@ -915,7 +914,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,4).or().eq(EvaluationForm::getStatus, -4);
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getThreeLevelUserId,dlpUser.getId());
|
||||
|
||||
List<EvaluationForm> list = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
@@ -934,7 +933,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
LambdaQueryWrapper<InstructionBook> instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
instructionBookLambdaQueryWrapper.eq(InstructionBook::getCommitStatus,2).or().eq(InstructionBook::getCommitStatus, -2);
|
||||
instructionBookLambdaQueryWrapper.eq(InstructionBook::getTechnicalDirectorId,dlpUser.getId());
|
||||
|
||||
List<InstructionBook> list = instructionBookService.list(instructionBookLambdaQueryWrapper);
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
@Service//标准溶液使用记录
|
||||
public class SolutionUseFormServiceImpl extends ServiceImpl<SolutionUseFormMapper, SolutionUseForm> implements SolutionUseFormService {
|
||||
|
||||
@Autowired
|
||||
private SolutionUseFormService solutionUseFormService;
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
@Override
|
||||
@@ -50,14 +47,14 @@ public class SolutionUseFormServiceImpl extends ServiceImpl<SolutionUseFormMappe
|
||||
|
||||
solutionUseFormLambdaQueryWrapper.eq(SolutionUseForm::getSolutionId,standardReserveSolution.getId());
|
||||
|
||||
List<SolutionUseForm> list = solutionUseFormService.list(solutionUseFormLambdaQueryWrapper);
|
||||
List<SolutionUseForm> list = this.list(solutionUseFormLambdaQueryWrapper);
|
||||
//判断使用次序
|
||||
if (list==null){
|
||||
solutionUseForm.setOrderOfUse(1);
|
||||
}else {
|
||||
solutionUseForm.setOrderOfUse(list.size()+1);
|
||||
}
|
||||
if (solutionUseFormService.save(solutionUseForm)){
|
||||
if (this.save(solutionUseForm)){
|
||||
return solutionUseForm;
|
||||
}else throw new RuntimeException(String.format("标准储备溶液使用记录保存失败"));
|
||||
}
|
||||
|
||||
@@ -48,9 +48,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class StandardMaterialApplicationServiceImpl extends ServiceImpl<StandardMaterialApplicationMapper, StandardMaterialApplication> implements StandardMaterialApplicationService {
|
||||
|
||||
@Autowired
|
||||
private StandardMaterialApplicationService standardMaterialApplicationService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -85,7 +82,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
@Transactional
|
||||
public StandardMaterialApplication returnById(StandardMaterialApplicationDTO standardMaterialApplicationDTO) {
|
||||
|
||||
StandardMaterialApplication byId = standardMaterialApplicationService.getById(standardMaterialApplicationDTO.getStandardMaterialApplicationId());
|
||||
StandardMaterialApplication byId = this.getById(standardMaterialApplicationDTO.getStandardMaterialApplicationId());
|
||||
|
||||
byId.setPurposeAndQuantity(standardMaterialApplicationDTO.getPurposeAndQuantity());
|
||||
byId.setDateOfReturn(LocalDateTime.now());
|
||||
@@ -146,7 +143,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
solutionUseFormService.updateById(one);
|
||||
}
|
||||
//
|
||||
if (standardMaterialApplicationService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("归还失败"));
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ import java.util.HashMap;
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<StandardMaterialApprovalFormMapper, StandardMaterialApprovalForm> implements StandardMaterialApprovalFormService {
|
||||
|
||||
@Autowired
|
||||
private StandardMaterialApprovalFormService standardMaterialApprovalFormService;
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@@ -82,7 +78,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
standardMaterialApprovalForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
|
||||
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)) {
|
||||
if (this.save(standardMaterialApprovalForm)) {
|
||||
return standardMaterialApprovalForm;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
@@ -112,7 +108,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
@Override//审核
|
||||
public StandardMaterialApprovalForm auditSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
|
||||
StandardMaterialApprovalForm byId = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setAuditOpinionOfSecondary(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditResultOfSecondary(auditAndApproveDTO.getAuditResult());
|
||||
@@ -123,7 +119,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
} else {
|
||||
byId.setCommitStatus(-4);
|
||||
}
|
||||
if (standardMaterialApprovalFormService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
@@ -131,7 +127,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
@Override//审批
|
||||
public StandardMaterialApprovalForm approveById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardMaterialApprovalForm byId1 = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
|
||||
StandardMaterialApprovalForm byId1 = this.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId1.setOpinionOfApproval(auditAndApproveDTO.getApproveOpinion());
|
||||
byId1.setResultOfApproval(auditAndApproveDTO.getApproveResult());
|
||||
@@ -180,7 +176,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
} else {
|
||||
byId1.setCommitStatus(-5);
|
||||
}
|
||||
if (standardMaterialApprovalFormService.updateById(byId1)) {
|
||||
if (this.updateById(byId1)) {
|
||||
return byId1;
|
||||
} else throw new RuntimeException(String.format("审批失败"));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -36,8 +37,12 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -52,9 +57,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardReserveSolutionMapper, StandardReserveSolution> implements StandardReserveSolutionService {
|
||||
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
@Autowired
|
||||
private SolutionUseFormService solutionUseFormService;
|
||||
|
||||
@@ -87,7 +89,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
List<SolutionUseFormVO> solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId());
|
||||
|
||||
if (solutionUseFormVOList != null) {
|
||||
standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList);}
|
||||
standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList);
|
||||
}
|
||||
|
||||
return standardReserveSolutionVOById;
|
||||
}
|
||||
@@ -105,6 +108,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution);
|
||||
|
||||
standardReserveSolution.setReferenceMaterialScale(standardReserveSolutionDTO.getReferenceMaterialScale());
|
||||
standardReserveSolution.setConstantVolume(standardReserveSolutionDTO.getConstantVolume());
|
||||
|
||||
standardReserveSolution.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
standardReserveSolution.setDispenserId(dlpUser.getId());
|
||||
@@ -112,24 +118,28 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
standardReserveSolution.setConfigurationDate(LocalDateTime.now());
|
||||
|
||||
standardReserveSolution.setStatus(0);
|
||||
//计算浓度
|
||||
Double v = standardReserveSolution.getReferenceMaterialScale() / standardReserveSolution.getConstantVolume();
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
BigDecimal bigDecimal = new BigDecimal(v);
|
||||
|
||||
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName, standardReserveSolution.getSolutionName());
|
||||
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration, standardReserveSolution.getConfigurationConcentration());
|
||||
BigDecimal bigDecimal1 = bigDecimal.setScale(2);
|
||||
|
||||
ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
|
||||
standardReserveSolution.setConfigurationConcentration(bigDecimal1.toString());
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableName, standardReserveSolution.getSolutionName());
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getConfigurationConcentration, standardReserveSolution.getConfigurationConcentration());
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
//判断是否存在过该标准储备溶液,若未存在,则将其存入试剂耗材类
|
||||
if (one == null) {
|
||||
|
||||
ReagentConsumables reagentConsumables = new ReagentConsumables();
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
//创建一个标准储备溶液的种类对象
|
||||
ReagentConsumables reagentConsumables1 = reagentConsumablesService.getById(byId.getReagentConsumableId());
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumables1, reagentConsumables);
|
||||
|
||||
reagentConsumables1.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName());
|
||||
reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
|
||||
@@ -138,14 +148,140 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
reagentConsumables1.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
reagentConsumablesService.save(reagentConsumables1);
|
||||
//创建标准储备溶液的库存对象
|
||||
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumables1, reagentConsumableInventory);
|
||||
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
reagentConsumableInventory.setStatus(1);
|
||||
|
||||
reagentConsumableInventory.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setTotalQuantity(0);
|
||||
|
||||
//创建标准储备溶液对象
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
//获取当前年月日
|
||||
LocalDate date = LocalDate.now(); // get the current date
|
||||
//获取当前年月日
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
String format = date.format(formatter);
|
||||
|
||||
String prefix = reagentConsumableInventory.getEnglishName() + "-" + format+"-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
.orderByDesc("number"));
|
||||
|
||||
int newNo = 1;
|
||||
|
||||
if ((list != null) && (list.size() > 0)) {
|
||||
ReferenceMaterial referenceMaterial1 = list.get(0);
|
||||
String strMaxNo = StrUtil.removePrefixIgnoreCase(referenceMaterial1.getNumber(), prefix);
|
||||
try {
|
||||
int maxno = Integer.parseUnsignedInt(strMaxNo);
|
||||
newNo = maxno + 1;
|
||||
} catch (NumberFormatException e) {
|
||||
// 如果后缀有非数字, 则无视之, 重头编码
|
||||
newNo = 1;
|
||||
}
|
||||
}
|
||||
//创建标准溶液对象,并生成编号
|
||||
referenceMaterial.setStatus(-4);
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + format + "-" + newNo);
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId.getBatchDetailsId());
|
||||
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
|
||||
standardReserveSolution.setReferenceId(referenceMaterial.getId());
|
||||
|
||||
|
||||
standardReserveSolution.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
|
||||
if (reagentConsumableInventoryService.save(reagentConsumableInventory) && this
|
||||
.save(standardReserveSolution)) {
|
||||
StandardReserveSolutionFullVO byFullVOId = this.getByFullVOId(standardReserveSolution.getId());
|
||||
return byFullVOId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("配置失败"));
|
||||
}
|
||||
|
||||
if (standardReserveSolutionService.save(standardReserveSolution)) {
|
||||
} else {
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(standardReserveSolution.getId());
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId1.getBatchDetailsId());
|
||||
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
|
||||
LocalDate date = LocalDate.now(); // get the current date
|
||||
//获取当前年月日
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
String format = date.format(formatter);
|
||||
|
||||
//创建标准溶液对象,并生成编号
|
||||
referenceMaterial.setStatus(-4);
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
|
||||
String prefix = one.getEnglishName() + "-" + format+"-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
.orderByDesc("number"));
|
||||
|
||||
int newNo = 1;
|
||||
|
||||
if ((list != null) && (list.size() > 0)) {
|
||||
ReferenceMaterial referenceMaterial1 = list.get(0);
|
||||
String strMaxNo = StrUtil.removePrefixIgnoreCase(referenceMaterial1.getNumber(), prefix);
|
||||
try {
|
||||
int maxno = Integer.parseUnsignedInt(strMaxNo);
|
||||
newNo = maxno + 1;
|
||||
} catch (NumberFormatException e) {
|
||||
// 如果后缀有非数字, 则无视之, 重头编码
|
||||
newNo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
referenceMaterial.setNumber(one.getEnglishName() + "-" + format + "-" + newNo);
|
||||
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
|
||||
standardReserveSolution.setReferenceId(referenceMaterial.getId());
|
||||
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
//将存储信息录入仓库表
|
||||
|
||||
standardReserveSolution.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
|
||||
if (this.save(standardReserveSolution)) {
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = this.getStandardReserveSolutionVOById(standardReserveSolution.getId());
|
||||
|
||||
return standardReserveSolutionVOById;
|
||||
} else throw new RuntimeException(String.format("配置失败"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override//标准储备溶液入库任务
|
||||
@@ -165,8 +301,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
record.setLatticeId(byId.getLatticeId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return standardReserveSolutionVOPage;
|
||||
}
|
||||
|
||||
@@ -181,123 +315,36 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
String boxId = standardReserveSolutionFullDTO.getBoxId();
|
||||
|
||||
String warehousingRemarks = standardReserveSolutionFullDTO.getWarehousingRemarks();
|
||||
|
||||
|
||||
//提供格子位置与标准储备溶液配置表ID
|
||||
StandardReserveSolution byId = standardReserveSolutionService.getById(id);
|
||||
StandardReserveSolution byId = this.getById(id);
|
||||
byId.setStatus(1);
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(byId.getReferenceMaterialId());
|
||||
byId.setWarehousingRemarks(warehousingRemarks);
|
||||
//为标准储备溶液对象赋值位置信息
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(byId.getReferenceId());
|
||||
|
||||
remoteCabinetService.updateCabinet(standardReserveSolutionFullDTO.getLatticeId(),byId1.getId(),"1");
|
||||
referenceMaterialServiceById.setBoxId(boxId);
|
||||
referenceMaterialServiceById.setLocation(location);
|
||||
referenceMaterialServiceById.setLatticeId(latticeId);
|
||||
referenceMaterialServiceById.setStatus(0);
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId1.getBatchDetailsId());
|
||||
referenceMaterialService.updateById(referenceMaterialServiceById);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterialServiceById.getReagentConsumableInventoryId());
|
||||
|
||||
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName, byId.getSolutionName());
|
||||
if (reagentConsumableInventory.getTotalQuantity() != null) {
|
||||
|
||||
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration, byId.getConfigurationConcentration());
|
||||
//查询出该标准储备溶液的对象
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumables.getReagentConsumableId());
|
||||
//判断仓库是否存在过该标准储备溶液 (标准储备溶液ID与标准物质共用一个RMID,但标准储备溶液具有)
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
//若不存在,则创建一条该标准储备溶液的仓库信息记录表
|
||||
if (one == null) {
|
||||
|
||||
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);
|
||||
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
reagentConsumableInventory.setStatus(1);
|
||||
|
||||
reagentConsumableInventory.setConfigurationConcentration(byId.getConfigurationConcentration());
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
//获取当前年月日
|
||||
Date date = new Date();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
formatter.format(date);
|
||||
//创建标准溶液对象,并生成编号
|
||||
referenceMaterial.setStatus(0);
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
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());
|
||||
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + 1);
|
||||
|
||||
} else {
|
||||
reagentConsumableInventory.setTotalQuantity(1);
|
||||
reagentConsumableInventory.setStorageLife(byId.getValidityPeriod());
|
||||
|
||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
batchDetails.setLatticeId(latticeId);
|
||||
|
||||
byId.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
byId.setWarehousingRemarks(warehousingRemarks);
|
||||
|
||||
if (reagentConsumableInventoryService.save(reagentConsumableInventory) && standardReserveSolutionService
|
||||
.updateById(byId)) {
|
||||
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId());
|
||||
return byFullVOId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("入库失败"));
|
||||
}
|
||||
|
||||
} else {
|
||||
if (this.updateById(byId) && reagentConsumableInventoryService.updateById(reagentConsumableInventory)) {
|
||||
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
//获取当前年月日
|
||||
Date date = new Date();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
|
||||
|
||||
formatter.format(date);
|
||||
//创建标准溶液对象,并生成编号
|
||||
referenceMaterial.setStatus(0);
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date));
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
referenceMaterial.setLatticeId(latticeId);
|
||||
referenceMaterial.setLocation(standardReserveSolutionFullDTO.getLocation());
|
||||
referenceMaterial.setBoxId(boxId);
|
||||
|
||||
byId.setReferenceId(referenceMaterial.getId());
|
||||
|
||||
referenceMaterialService.save(referenceMaterial);
|
||||
//将存储信息录入仓库表
|
||||
|
||||
one.setTotalQuantity(one.getTotalQuantity() + 1);
|
||||
one.setStorageLife(byId.getValidityPeriod());
|
||||
}
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
byId.setWarehousingRemarks(warehousingRemarks);
|
||||
|
||||
|
||||
if (standardReserveSolutionService.updateById(byId) && reagentConsumableInventoryService.updateById(one)) {
|
||||
|
||||
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId());
|
||||
StandardReserveSolutionFullVO byFullVOId = this.getByFullVOId(byId.getId());
|
||||
return byFullVOId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("入库失败"));
|
||||
@@ -307,7 +354,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
@Override//通过ID查找已入库的标准储备溶液信息
|
||||
public StandardReserveSolutionFullVO getByFullVOId(String id) {
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = this.getStandardReserveSolutionVOById(id);
|
||||
|
||||
StandardReserveSolutionFullVO standardReserveSolutionFullVO = new StandardReserveSolutionFullVO();
|
||||
|
||||
@@ -315,6 +362,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
return standardReserveSolutionFullVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void standardReserveSolutionTablePDF(StandardReserveSolutionVO standardReserveSolutionVO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("standardReserveSolutionTablePDF.................");
|
||||
|
||||
@@ -48,9 +48,6 @@ import java.util.List;
|
||||
@SuppressWarnings("all")
|
||||
public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSolutionCurveMapper, StandardSolutionCurve> implements StandardSolutionCurveService {
|
||||
|
||||
@Autowired
|
||||
private StandardSolutionCurveService standardSolutionCurveService;
|
||||
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
@@ -108,7 +105,7 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
standardSolutionCurve.setReferenceMaterialId(referenceMaterial.getId());
|
||||
standardSolutionCurve.setDispenserId(dlpUser.getId());
|
||||
|
||||
if (standardSolutionCurveService.save(standardSolutionCurve)) {
|
||||
if (this.save(standardSolutionCurve)) {
|
||||
return standardSolutionCurve;
|
||||
} else throw new RuntimeException(String.format("配置失败"));
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.dto.SupplierInformationDTO;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationForm;
|
||||
@@ -28,9 +29,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformationMapper, SupplierInformation> implements SupplierInformationService {
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Autowired
|
||||
private EvaluationFormService evaluationFormService;
|
||||
|
||||
@@ -45,7 +43,7 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
|
||||
LambdaQueryWrapper<SupplierInformation> supplierInformationQueryWrapper = new LambdaQueryWrapper();
|
||||
|
||||
List<SupplierInformation> list = supplierInformationService.list(supplierInformationQueryWrapper);
|
||||
List<SupplierInformation> list = this.list(supplierInformationQueryWrapper);
|
||||
|
||||
if (list.size() != 0) {
|
||||
|
||||
@@ -53,13 +51,14 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
if (information.getSupplierName().equals(supplierInformationDTO.getSupplierName())) {
|
||||
throw new RuntimeException(String.format("该供应商信息已存在"));
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
BeanUtils.copyProperties(supplierInformationDTO, supplierInformation);
|
||||
|
||||
supplierInformation.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
supplierInformationService.save(supplierInformation);
|
||||
this.save(supplierInformation);
|
||||
|
||||
return supplierInformation;
|
||||
|
||||
@@ -68,20 +67,27 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
@Override
|
||||
public SupplierInformation editInfoById(SupplierInformationDTO supplierInformationDTO) {
|
||||
|
||||
SupplierInformation byId = supplierInformationService.getById(supplierInformationDTO.getId());
|
||||
SupplierInformation supplier_name = this.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", supplierInformationDTO.getSupplierName()));
|
||||
|
||||
if (supplier_name != null) {
|
||||
throw new RuntimeException(String.format("该供应商信息已存在"));
|
||||
}
|
||||
|
||||
SupplierInformation byId = this.getById(supplierInformationDTO.getId());
|
||||
|
||||
BeanUtils.copyProperties(supplierInformationDTO, byId);
|
||||
|
||||
if (supplierInformationService.updateById(byId)) {
|
||||
if (this.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierInformationVO getVOById(String supplierInformationId) {
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(supplierInformationId);
|
||||
SupplierInformation supplierInformation = this.getById(supplierInformationId);
|
||||
|
||||
SupplierInformationVO supplierInformationVO = new SupplierInformationVO();
|
||||
|
||||
@@ -95,6 +101,4 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -64,10 +64,7 @@ public class WarehousingBatchListServiceImpl extends ServiceImpl<WarehousingBatc
|
||||
}
|
||||
}
|
||||
warehousingBatchListVO.setIdList(rvos);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return warehousingBatchListVOList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.PageUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -11,33 +8,22 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.config.PageUtils;
|
||||
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper;
|
||||
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 org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -49,9 +35,6 @@ import java.util.List;
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRecordFormMapper, WarehousingRecordForm> implements WarehousingRecordFormService {
|
||||
@Autowired
|
||||
private WarehousingRecordFormService warehousingRecordFormService;
|
||||
|
||||
@Autowired
|
||||
private WarehousingContentService warehousingContentService;
|
||||
|
||||
@@ -111,7 +94,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
@Override//查看采购入库
|
||||
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) {
|
||||
|
||||
WarehousingRecordForm byId = warehousingRecordFormService.getById(warehousingFormId);
|
||||
WarehousingRecordForm byId = this.getById(warehousingFormId);
|
||||
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO();
|
||||
|
||||
@@ -127,22 +110,19 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
@Transactional
|
||||
@Override//录入入库明细
|
||||
public WarehousingRecordFormVO addFormById(List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, DLPUser dlpUser) {
|
||||
|
||||
for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) {
|
||||
public WarehousingRecordFormVO addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser) {
|
||||
|
||||
if (warehousingRecordFormDTO.getLatticeId().isEmpty() & warehousingRecordFormDTO.getLocation().isEmpty() &
|
||||
warehousingRecordFormDTO.getBoxId().isEmpty()) {
|
||||
|
||||
throw new RuntimeException(String.format("请选择存放位置后再进行提交"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
boolean flag = true;
|
||||
|
||||
int i = 0;
|
||||
//签收内容循环
|
||||
for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) {
|
||||
|
||||
|
||||
String latticeId = warehousingRecordFormDTO.getLatticeId();
|
||||
//录入签收批次信息
|
||||
@@ -203,13 +183,17 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
BatchDetails batchDetails = new BatchDetails();
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
|
||||
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails);
|
||||
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
batchDetails.setServiceStatus(1);
|
||||
batchDetails.setPurchaseTime(LocalDateTime.now());
|
||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
batchDetails.setSupplierId(byId.getSupplierId());
|
||||
batchDetails.setBatch(1);
|
||||
batchDetails.setBatch(year + "-" + 1);
|
||||
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate());
|
||||
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(reagentConsumables.getPackagedCopies()));
|
||||
batchDetails.setWarehousingBatchListId(warehousingBatchList.getId());
|
||||
@@ -257,10 +241,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
//更新格子信息(标准物质传入对象ID)
|
||||
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1");
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
|
||||
String location = warehousingRecordFormDTO.getLocation();
|
||||
|
||||
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-";
|
||||
@@ -321,13 +301,23 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
batchDetails.setWarehousingBatchListId(warehousingBatchList.getId());
|
||||
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId());
|
||||
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
|
||||
Integer years = Integer.valueOf(year);
|
||||
|
||||
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId())
|
||||
.eq("supplier_id", byId.getSupplierId()));
|
||||
.eq("supplier_id", byId.getSupplierId())
|
||||
.like( "batch",years));
|
||||
|
||||
if (batchDetailsList.size() == 0) {
|
||||
batchDetails.setBatch(1);
|
||||
batchDetails.setBatch(year + "-" + 1);
|
||||
} else {
|
||||
batchDetails.setBatch(batchDetailsList.size() + 1);
|
||||
Integer x = batchDetailsList.size() + 1;
|
||||
batchDetails.setBatch(year + "-" +x );
|
||||
}
|
||||
if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) {
|
||||
batchDetails.setLocation(warehousingRecordFormDTO.getLocation());
|
||||
@@ -357,9 +347,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
//更新格子信息(试剂耗材传入类ID)
|
||||
|
||||
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
|
||||
String location = warehousingRecordFormDTO.getLocation();
|
||||
|
||||
@@ -393,20 +380,19 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
batchDetailsService.save(batchDetails);
|
||||
}
|
||||
warehousingBatchListService.save(warehousingBatchList);
|
||||
}
|
||||
|
||||
|
||||
LambdaQueryWrapper<WarehousingContent> warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
WarehousingContent byId = warehousingContentService.getById(warehousingRecordFormDTOList.get(0).getWarehousingContentId());
|
||||
WarehousingContent byId1 = warehousingContentService.getById(warehousingRecordFormDTO.getWarehousingContentId());
|
||||
|
||||
String warehousingRecordFormId = byId.getWarehousingRecordFormId();
|
||||
String warehousingRecordFormId = byId1.getWarehousingRecordFormId();
|
||||
|
||||
warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getWarehousingRecordFormId, warehousingRecordFormId);
|
||||
|
||||
List<WarehousingContent> list = warehousingContentService.list(warehousingContentLambdaQueryWrapper);
|
||||
|
||||
WarehousingRecordForm warehousingRecordForm = warehousingRecordFormService.getById(warehousingRecordFormId);
|
||||
|
||||
WarehousingRecordForm warehousingRecordForm = this.getById(warehousingRecordFormId);
|
||||
|
||||
|
||||
//遍历采购内容,判断试剂耗材是否入库完毕
|
||||
@@ -434,7 +420,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
List<SupplierInformation> supplierInformations = new ArrayList<>();
|
||||
|
||||
|
||||
//创建供应商评价表
|
||||
/*
|
||||
通过循环签收内容,获得所有的供应商列表
|
||||
@@ -467,9 +452,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
warehousingRecordForm.setStatus(1);
|
||||
}
|
||||
|
||||
warehousingRecordFormService.updateById(warehousingRecordForm);
|
||||
this.updateById(warehousingRecordForm);
|
||||
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.getWarehousingRecordFormVO(warehousingRecordFormId);
|
||||
WarehousingRecordFormVO warehousingRecordFormVO = this.getWarehousingRecordFormVO(warehousingRecordFormId);
|
||||
|
||||
return warehousingRecordFormVO;
|
||||
}
|
||||
@@ -503,7 +488,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
public List<PurchaseRequestPrintVO> getPurchaseRequestPrint(String id) {
|
||||
|
||||
WarehousingRecordForm byId = warehousingRecordFormService.getById(id);
|
||||
WarehousingRecordForm byId = this.getById(id);
|
||||
|
||||
List<WarehousingContent> warehousingContentList = warehousingContentService.list(Wrappers.<WarehousingContent>query().eq("warehousing_record_form_id", id));
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.status;
|
||||
|
||||
public enum DataStatus {
|
||||
Not_Submitted(0,"未提交"),
|
||||
Have_Submitted(1,"已提交"),
|
||||
Have_Audit(2,"已审核"),
|
||||
Have_Approved(3,"已审批"),
|
||||
HaveBeenReleased(4,"已发布"),
|
||||
Failed_To_Pass_The_Audit(-1,"审核未通过"),
|
||||
Failed_To_Pass_The_Approve(-2,"审批未通过");
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
private DataStatus (Integer code,String message) {
|
||||
this.code=code;
|
||||
this.message=message;
|
||||
|
||||
|
||||
|
||||
}}
|
||||
@@ -35,8 +35,6 @@ public class MaturityCalculation {
|
||||
|
||||
@Scheduled(cron = "0 0 0 * * ? ")
|
||||
public void calculate() {
|
||||
|
||||
|
||||
//查找出有库存量的物品所有批次信息(状态为1)
|
||||
List<BatchDetails> list1 = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("service_status", 1));
|
||||
String warningInformation = null;
|
||||
@@ -46,19 +44,13 @@ public class MaturityCalculation {
|
||||
warningInformation = "即将过期";
|
||||
batchDetails.setWarningInformation(warningInformation);
|
||||
batchDetailsService.updateById(batchDetails);
|
||||
} else if (batchDetails.getExpirationDate().isBefore(LocalDate.now())) {
|
||||
}
|
||||
|
||||
if (batchDetails.getExpirationDate().isBefore(LocalDate.now())) {
|
||||
warningInformation = "已过期";
|
||||
batchDetails.setWarningInformation(warningInformation);
|
||||
batchDetailsService.updateById(batchDetails);
|
||||
|
||||
}
|
||||
if (batchDetails.getCreateTime().plusMonths(Integer.valueOf(batchDetails.getLimitDate())).isBefore(LocalDateTime.now().plusDays(7))) {
|
||||
batchDetails.setWarningInformation(batchDetails.getWarningInformation() + ",即将到达存储期限");
|
||||
} else if (batchDetails.getCreateTime().plusMonths(Integer.valueOf(batchDetails.getLimitDate())).isBefore(LocalDateTime.now())) {
|
||||
|
||||
batchDetails.setWarningInformation("已超过存储期限");
|
||||
}
|
||||
|
||||
}
|
||||
List<StandardReserveSolution> list = standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
||||
.eq("status", 1));
|
||||
@@ -66,14 +58,7 @@ public class MaturityCalculation {
|
||||
for (StandardReserveSolution standardReserveSolution : list) {
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
||||
if (referenceMaterialServiceById.getStatus() != -4) {
|
||||
if (standardReserveSolution.getConfigurationDate().plusMonths(standardReserveSolution.getValidityPeriod()).isBefore(LocalDateTime.now().plusDays(7))) {
|
||||
|
||||
standardReserveSolution.setWarningInformation("即将到达存储期限");
|
||||
} else if (standardReserveSolution.getConfigurationDate().plusMonths(standardReserveSolution.getValidityPeriod()).isBefore(LocalDateTime.now())) {
|
||||
standardReserveSolution.setWarningInformation("已超过存储期限");
|
||||
}
|
||||
}
|
||||
standardReserveSolutionService.updateById(standardReserveSolution);
|
||||
|
||||
}
|
||||
@@ -96,7 +81,7 @@ public class MaturityCalculation {
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolution.getReferenceId());
|
||||
if (referenceMaterialServiceById.getStatus() == -4) {
|
||||
|
||||
standardReserveSolution.setWarningInformation("已全部使用完毕");
|
||||
standardReserveSolution.setWarningInformation("已全部使用完毕或已报废");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -114,7 +99,6 @@ public class MaturityCalculation {
|
||||
|
||||
reagentConsumableInventory.setWarningInformation("库存不足");
|
||||
|
||||
System.out.println("计算库存信息");
|
||||
} else {
|
||||
reagentConsumableInventory.setWarningInformation("库存充足");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package digital.laboratory.platform.reagent.config;
|
||||
package digital.laboratory.platform.reagent.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
package digital.laboratory.platform.reagent.utils;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.MultiFormatWriter;
|
||||
import com.google.zxing.client.j2se.MatrixToImageWriter;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.oned.Code128Writer;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import org.springframework.util.StringUtils;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class QRCodeUtils {
|
||||
|
||||
//二维码
|
||||
public static String getQRCodeImageBase64(String content, int width, int height) {
|
||||
if (!StringUtils.isEmpty(content)) {
|
||||
ServletOutputStream stream = null;
|
||||
|
||||
HashMap<EncodeHintType, Comparable> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
try {
|
||||
QRCodeWriter writer = new QRCodeWriter();
|
||||
BitMatrix bitMatrix = writer.encode(content, BarcodeFormat.QR_CODE, width, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "png", os);
|
||||
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
String resultImage = new String("data:image/png;base64," + encoder.encode(os.toByteArray()));
|
||||
|
||||
return resultImage;
|
||||
} catch (Exception e) {
|
||||
} finally {
|
||||
if (stream != null) {
|
||||
try {
|
||||
stream.flush();
|
||||
stream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
//二维码
|
||||
public static BufferedImage genQRCode(String content, int width, int height) {
|
||||
if (!StringUtils.isEmpty(content)) {
|
||||
|
||||
HashMap<EncodeHintType, Comparable> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
try {
|
||||
QRCodeWriter writer = new QRCodeWriter();
|
||||
BitMatrix bitMatrix = writer.encode(content, BarcodeFormat.QR_CODE, width, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
return bufferedImage;
|
||||
} catch (Exception e) {
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//打印条形码
|
||||
public static String getBarCode128ImageBase64(String content, int width, int height) {
|
||||
try {
|
||||
Map<EncodeHintType, Object> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
int realWidth = getBarCode128NoPaddingWidth(width, content, width);
|
||||
|
||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.CODE_128, realWidth, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "png", os);
|
||||
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
String resultImage = new String("data:image/png;base64," + encoder.encode(os.toByteArray()));
|
||||
|
||||
return resultImage;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static int getBarCode128NoPaddingWidth(int expectWidth, String contents, int maxWidth) {
|
||||
boolean[] code = new Code128Writer().encode(contents);
|
||||
|
||||
int inputWidth = code.length;
|
||||
|
||||
double outputWidth = (double) Math.max(expectWidth, inputWidth);
|
||||
double multiple = outputWidth / inputWidth;
|
||||
|
||||
//优先取大的
|
||||
int returnVal = 0;
|
||||
int ceil = (int) Math.ceil(multiple);
|
||||
if (inputWidth * ceil <= maxWidth) {
|
||||
returnVal = inputWidth * ceil;
|
||||
} else {
|
||||
int floor = (int) Math.floor(multiple);
|
||||
returnVal = inputWidth * floor;
|
||||
}
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
public static String getBarCode93ImageBase64(String content, int width, int height) {
|
||||
try {
|
||||
Map<EncodeHintType, Object> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
|
||||
int realWidth = getBarCode128NoPaddingWidth(width, content, width);
|
||||
|
||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.CODE_93, realWidth, height, hints);
|
||||
|
||||
BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "png", os);
|
||||
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
String resultImage = new String("data:image/png;base64," + encoder.encode(os.toByteArray()));
|
||||
|
||||
return resultImage;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印条码
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.utils;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public class String2DateConverter {
|
||||
|
||||
public Date convert(String s) throws ParseException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
return (Date) sdf.parse(s);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,10 +33,13 @@ public class AcceptanceRecordFormVO extends AcceptanceRecordForm {
|
||||
@ApiModelProperty(value = "(试剂耗材对象)")
|
||||
private ReagentConsumables reagentConsumables;
|
||||
|
||||
|
||||
private String type = "验收记录";
|
||||
|
||||
private String createName;
|
||||
|
||||
/*
|
||||
* 打印参数*/
|
||||
private Boolean theSameBrandAndModelPrint;
|
||||
private Boolean consistentQuantityPrint;
|
||||
private Boolean packingInGoodConditionPrint;
|
||||
@@ -44,4 +47,7 @@ public class AcceptanceRecordFormVO extends AcceptanceRecordForm {
|
||||
private Boolean deliveryCyclePrint;
|
||||
|
||||
|
||||
private String department;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.status.DataStatus;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
|
||||
@@ -21,5 +21,6 @@ public class CheckScheduleVO extends CheckSchedule {
|
||||
private String createName;
|
||||
|
||||
private String type = "期间核查计划";
|
||||
private String department ;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public class ComplianceCheckVO extends ComplianceCheck {
|
||||
@ApiModelProperty(value="(二级审核人名称)")
|
||||
private String secondaryAuditorName;
|
||||
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty(value="(试剂耗材对象)")
|
||||
private ReagentConsumables reagentConsumables;
|
||||
|
||||
@@ -26,12 +26,19 @@ public class EvaluationFormVO extends EvaluationForm {
|
||||
@ApiModelProperty(value = "(三级评价人名称)")
|
||||
private String threeLevelUserName;
|
||||
|
||||
@ApiModelProperty(value = "(类型)")
|
||||
private String type = "供应商评价";
|
||||
|
||||
@ApiModelProperty(value = "(提供服务牌或供应品集合)")
|
||||
private List<ProvideServicesOrSuppliesVO> provideServicesOrSuppliesVOList;
|
||||
|
||||
@ApiModelProperty(value = "(提交人姓名)")
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty(value = "(部门)")
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty(value = "(供应商名称)")
|
||||
private String supplierName;
|
||||
|
||||
}
|
||||
|
||||
@@ -17,4 +17,5 @@ public class InstructionBookVO extends InstructionBook {
|
||||
|
||||
private String technicalDirectorName;
|
||||
|
||||
private String department;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class OutgoingContentsVO extends OutgoingContents {
|
||||
|
||||
private ReagentConsumableInventory reagentConsumableInventory;
|
||||
|
||||
private Integer batch;
|
||||
private String batch;
|
||||
private String supplierName;
|
||||
|
||||
|
||||
|
||||
@@ -32,4 +32,6 @@ public class PeriodVerificationImplementationVO extends PeriodVerificationImplem
|
||||
|
||||
private String instructionBook;
|
||||
|
||||
private String department;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ public class PeriodVerificationPlanVO extends PeriodVerificationPlan {
|
||||
|
||||
private String type = "期间核查计划";
|
||||
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty(value = "(打印标签)")
|
||||
private String P;
|
||||
private String D;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PurchasingPlanVO extends PurchasingPlan {
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty(value="部门名称")
|
||||
private String orgName;
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty(value="采购计划明细")
|
||||
private List <ProcurementContentVO> procurementContentVOList;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ReagentConsumableInventoryFullVO extends ReagentConsumableInventory
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty(value = "批次")
|
||||
private Integer batch;
|
||||
private String batch;
|
||||
|
||||
@ApiModelProperty(value = "标准物质ID")
|
||||
private String referenceMaterialId;
|
||||
|
||||
@@ -4,6 +4,9 @@ import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ReferenceMaterialVO extends ReferenceMaterial {
|
||||
|
||||
@@ -21,4 +24,6 @@ public class ReferenceMaterialVO extends ReferenceMaterial {
|
||||
private Integer i ;
|
||||
|
||||
private String codeName;
|
||||
|
||||
private LocalDate time;
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ public class RequisitionRecordVO extends RequisitionRecord {
|
||||
|
||||
private String recipientName;
|
||||
|
||||
private String reagentConsumableName;
|
||||
|
||||
@ApiModelProperty(value = "领用时间")
|
||||
private String dateOfClaims;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ public class StandardMaterialApprovalFormVO extends StandardMaterialApprovalForm
|
||||
private String approverName;
|
||||
private String secondaryAuditorName;
|
||||
private String createName;
|
||||
private String department;
|
||||
private Integer reasonForApplicationPrint;
|
||||
|
||||
private String type = "标准物质停用_报废销毁_恢复_降级使用审批";
|
||||
|
||||
@@ -52,12 +52,18 @@
|
||||
<result property="secondaryAuditorName" column="secondary_auditor_name"></result>
|
||||
<result property="threeLevelAuditorName" column="three_level_auditor_name"></result>
|
||||
<result property="createName" column="create_name"></result>
|
||||
<result property="department" column="department"></result>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="getAcceptanceRecordFormVOSQL">
|
||||
SELECT arf.*,
|
||||
(
|
||||
select department
|
||||
from dlp_base.sys_user
|
||||
where user_id = arf.create_by) as department
|
||||
,
|
||||
(select si.supplier_name
|
||||
from supplier_information si
|
||||
where si.id = arf.supplier_id) as supplier_name,
|
||||
@@ -85,6 +91,11 @@
|
||||
<select id="getAcceptanceRecordFormVO" resultMap="acceptanceRecordFormVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO">
|
||||
SELECT arf.*,
|
||||
(
|
||||
select department
|
||||
from dlp_base.sys_user
|
||||
where user_id = arf.create_by) as department
|
||||
,
|
||||
(select si.supplier_name
|
||||
from supplier_information si
|
||||
where si.id = arf.supplier_id)as supplier_name,
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="casNumber" column="cas_number"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="purityGrade" column="purity_grade"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="digital.laboratory.platform.reagent.mapper.TypeTableMapper">
|
||||
<mapper namespace="digital.laboratory.platform.reagent.mapper.CategoryTableMapper">
|
||||
|
||||
<resultMap id="typeTableMap" type="digital.laboratory.platform.reagent.entity.CategoryTable">
|
||||
<resultMap id="CategoryTableMap" type="digital.laboratory.platform.reagent.entity.CategoryTable">
|
||||
<id property="id" column="id"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="species" column="species"/>
|
||||
@@ -86,7 +86,7 @@
|
||||
WHERE user.user_id=cr.audit_id
|
||||
) AS auditor_name
|
||||
FROM centralized_request cr
|
||||
WHERE cr.status = 2
|
||||
WHERE cr.status = 6
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user